1. 24 10月, 2007 1 次提交
  2. 23 10月, 2007 1 次提交
  3. 20 9月, 2007 1 次提交
  4. 12 9月, 2007 1 次提交
  5. 13 2月, 2007 1 次提交
  6. 12 2月, 2007 1 次提交
  7. 08 2月, 2007 1 次提交
  8. 08 12月, 2006 1 次提交
  9. 07 10月, 2006 1 次提交
    • J
      Various drivers' irq handlers: kill dead code, needless casts · c7bec5ab
      Jeff Garzik 提交于
      - Eliminate casts to/from void*
      
      - Eliminate checks for conditions that never occur.  These typically
        fall into two classes:
      
      	1) Checking for 'dev_id == NULL', then it is never called with
      	NULL as an argument.
      
      	2) Checking for invalid irq number, when the only caller (the
      	system) guarantees the irq handler is called with the proper
      	'irq' number argument.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c7bec5ab
  10. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  11. 01 10月, 2006 2 次提交
  12. 04 8月, 2006 1 次提交
  13. 03 7月, 2006 1 次提交
  14. 27 6月, 2006 1 次提交
  15. 20 5月, 2006 1 次提交
    • J
      [SCSI] fix (unlikely) memory leak in DAC960 driver · 07fb75a5
      Jesper Juhl 提交于
      The Coverity checker found a memory leak (bug nr. 1245) in
       drivers/block/DAC960.c::DAC960_V2_ProcessCompletedCommand()
      
      The leak is pretty unlikely since it requires that the first of two
      successive kmalloc() calls fail while the second one succeeds. But it can
      still happen even if it's unlikely.
      
      If the first call that allocates 'PhysicalDeviceInfo' fails but the one
      that allocates 'InquiryUnitSerialNumber' succeeds, then we will leak the
      memory allocated to 'InquiryUnitSerialNumber' when the variable goes out
      of scope.
      
      A simple fix for this is to change the existing code that frees
      'PhysicalDeviceInfo' if that one was allocated but
      'InquiryUnitSerialNumber' was not, into a check for either pointer
      being NULL and if so just free both. This is safe since kfree() can
      deal with being passed a NULL pointer and it avoids the leak.
      
      While I was there I also removed the casts of the kmalloc() return
      value since it's pointless.
      I also updated the driver version since this patch changes the workings of
      the code (however slightly).
      
      This issue could probably be fixed a lot more elegantly, but the code
      is a big mess IMHO and I just took the least intrusive route to a fix
      that I could find instead of starting on a cleanup as well (that can
      come later).
      
      Please consider for inclusion.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      07fb75a5
  16. 29 3月, 2006 1 次提交
  17. 27 3月, 2006 1 次提交
  18. 25 3月, 2006 1 次提交
  19. 09 3月, 2006 1 次提交
  20. 10 1月, 2006 1 次提交
  21. 09 1月, 2006 2 次提交
    • T
      [PATCH] drivers/block: Use ARRAY_SIZE macro · 945f390f
      Tobias Klauser 提交于
      Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
      duplicate of ARRAY_SIZE. Some trailing whitespaces are also removed.
      
      drivers/block/acsi* has been left out as it's marked BROKEN.
      Signed-off-by: NTobias Klauser <tklauser@nuerscht.ch>
      Cc: Jens Axboe <axboe@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      945f390f
    • C
      [PATCH] Add block_device_operations.getgeo block device method · a885c8c4
      Christoph Hellwig 提交于
      HDIO_GETGEO is implemented in most block drivers, and all of them have to
      duplicate the code to copy the structure to userspace, as well as getting
      the start sector.  This patch moves that to common code [1] and adds a
      ->getgeo method to fill out the raw kernel hd_geometry structure.  For many
      drivers this means ->ioctl can go away now.
      
      [1] the s390 block drivers are odd in this respect.  xpram sets ->start
          to 4 always which seems more than odd, and the dasd driver shifts
          the start offset around, probably because of it's non-standard
          sector size.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: <mike.miller@hp.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a885c8c4
  22. 06 1月, 2006 1 次提交
    • T
      [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn() · 8ffdc655
      Tejun Heo 提交于
      add @uptodate argument to end_that_request_last() and @error
      to rq_end_io_fn().  there's no generic way to pass error code
      to request completion function, making generic error handling
      of non-fs request difficult (rq->errors is driver-specific and
      each driver uses it differently).  this patch adds @uptodate
      to end_that_request_last() and @error to rq_end_io_fn().
      
      for fs requests, this doesn't really matter, so just using the
      same uptodate argument used in the last call to
      end_that_request_first() should suffice.  imho, this can also
      help the generic command-carrying request jens is working on.
      Signed-off-by: Ntejun heo <htejun@gmail.com>
      Signed-Off-By: NJens Axboe <axboe@suse.de>
      8ffdc655
  23. 07 11月, 2005 1 次提交
  24. 06 5月, 2005 1 次提交
    • C
      [PATCH] DAC960: add support for Mylex AcceleRAID 4/5/600 · 5b76ffd5
      Christoph Hellwig 提交于
      This patch adds support for a new class of DAC960 controllers.  It's based
      on the GPLed idac320 driver from IBM for Linux 2.4.18.  That driver is a
      fork of the 2.4.18 version of DAC960 that adds support for this new type of
      controllers (internally called "GEM Series"), that differ from other DAC960
      V2 firmware controllers only in the register offsets and removes support
      for all others.
      
      This patch instead integrates support for these controllers into the DAC960
      driver.
      
      Thanks to Anders Norrbring for pointing me to the idac320 driver and
      testing this patch.
      
      No Signed-Off: line because all code is either copy & pasted from IBM's
      idac320 driver or support for other controllers in the 2.6 DAC960 driver.
      
      Note: the really odd formating matches the rest of the DAC960 driver.
      
      Cc: Dave Olien <dmo@osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5b76ffd5
  25. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4