1. 30 11月, 2006 1 次提交
  2. 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
  3. 13 7月, 2006 4 次提交
  4. 03 7月, 2006 1 次提交
  5. 01 7月, 2006 3 次提交
  6. 29 6月, 2006 1 次提交
  7. 20 6月, 2006 1 次提交
    • D
      [SPARC]: Kill __irq_itoa(). · c6387a48
      David S. Miller 提交于
      This ugly hack was long overdue to die.
      
      It was a way to print out Sparc interrupts in a more freindly format,
      since IRQ numbers were arbitrary opaque 32-bit integers which vectored
      into PIL levels.  These 32-bit integers were not necessarily in the
      0-->NR_IRQS range, but the PILs they vectored to were.
      
      The idea now is that we will increase NR_IRQS a little bit and use a
      virtual<-->real IRQ number mapping scheme similar to PowerPC.
      
      That makes this IRQ printing hack irrelevant, and furthermore only a
      handful of drivers actually used __irq_itoa() making it even less
      useful.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6387a48
  8. 11 6月, 2006 2 次提交
  9. 31 5月, 2006 1 次提交
    • V
      [SCSI] kdump: mpt fusion driver initialization failure fix · 9bf0a28c
      Vivek Goyal 提交于
      MPT fusion driver initialization fails while second kernel is booting,
      after a system crash (if kdump kernel is configured).  Oops message is
      pasted below.
      
      *****************************************************************************
      Fusion MPT base driver 3.03.08
      Copyright (c) 1999-2005 LSI Logic Corporation
      Fusion MPT SAS Host driver 3.03.08 ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 5 (level, low) -> IRQ 5
      mptbase: Initiating ioc0 bringup
      BUG: unable to handle kernel paging request at virtual address 00002608
       printing eip:
      c11782fd
      *pde = 00000000
      Oops: 0000 [#1]
      Modules linked in:
      CPU:    0
      EIP:    0060:[<c11782fd>]    Not tainted VLI
      EFLAGS: 00010046   (2.6.17-rc1-16M #2)
      EIP is at mptscsih_io_done+0x27/0x3a3
      eax: c4fed000   ebx: c4fed000   ecx: 00002600   edx: 00000298
      esi: c11782d6   edi: 00002600   ebp: 00000000   esp: c1332f74
      ds: 007b   es: 007b   ss: 0068
      Process swapper (pid: 0, threadinfo=c1332000 task=c128f9c0) Stack: <0>0000006c 00000020 00000298 00002600 c4fed000 c4fed000 c11782d6 0000260 0
             00000000 c1172c49 c4fed000 c1305b40 00000005 00000000 c1172d75 c48877e0
             c1029687 00000000 c1307fb8 00000000 c1305a00 00000001 00000000 c1307fb8
      Call Trace:
       <c11782d6> mptscsih_io_done+0x0/0x3a3   <c1172c49> mpt_turbo_reply+0xbb/0xd3
       <c1172d75> mpt_interrupt+0x22/0x2b   <c1029687> misrouted_irq+0x63/0xcb
       <c10297b3> note_interrupt+0x43/0x98   <c10292f9> __do_IRQ+0x68/0x8f
       <c1003fac> do_IRQ+0x36/0x4e
       =======================
       <c1002aa6> common_interrupt+0x1a/0x20   <c1001150> mwait_idle+0x1a/0x2a
       <c10010bf> cpu_idle+0x40/0x5c   <c1308610> start_kernel+0x17a/0x17c Code: 5e 5f 5d c3 55 89 cd 57 56 53 83 ec 14 89 54 24 0c 89 44 24 10 8b 90 cc 00  00 00 8b 4c 24 0c 81 c2 98 02 00 00 85 ed 89 54 24 08 <0f> b7 79 08 89 fe 74 04  0f b7 75 08 66 39 f7 75 0d 8b 44 24 0c
      *******************************************************************************
      
      o Kdump capture kernel boot fails during initialization of MPT fusion driver.
        (LSI Logic / Symbios Logic SAS1064E PCI-Express Fusion-MPT SAS (rev 01))
      
      o Problem is easily reproducible, if system crashed while some disk activity
        like cp operation was going on.
      
      o After a system crash, devices are not shutdown and capture kernel starts
        booting while skipping BIOS. Hence underlying device is left in operational
        state. In this case scsi contoller was left with interrupt line asserted
        reply FIFO was not empty. When driver starts initializing in the second
        kernel, it receives the interrupt the moment request_irq() is called.
        Interrupt handler, reads the message from reply FIFO and tries to access
        the associated message frame and panics, as in the new kernel's context
        that message frame is not valid at all.
      
      o In this scenario, probably we should delay the request_irq() call. First
        bring up the IOC, reset it if needed and then should register for irq.
      
      o I have tested the patch with SAS1064E and 53c1030 controllers.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Acked-by: N"Moore, Eric Dean" <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      9bf0a28c
  10. 20 5月, 2006 1 次提交
    • J
      [SCSI] mptspi: reset handler shouldn't be called for other bus protocols · 4ff42a66
      James Bottomley 提交于
      All registered reset callback handlers are called during reset processing.
      The mptspi modules has its own reset callback handler, just recently
      added for issuing domain validation after host reset.  If either the mptsas or
      mptfc driver are loaded, this callback could be called. Thus resulting
      in domain validation being issued for sas or fibre end devices.
      
      Fix this by having mptbase.c check the bus type against the driver
      type and only call the reset handler if they match (or if it's a
      non-bus specific reset handler).
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      4ff42a66
  11. 28 4月, 2006 1 次提交
  12. 26 4月, 2006 2 次提交
    • M
      [SCSI] - fusion - mptfc bug fix's to prevent deadlock situations · 65207fed
      Moore, Eric 提交于
      mptbase.h
      
      	bump version number to 3.03.09
      
      	remove unneeded flags
      	define workq and remove old fc specific locks
      
      mptbase.c
      
      	initialize new lock and don't initialize two removed locks
      
      mptscsih.c
      
      	when firmware reports target is no longer there, return
              DID_REQUEUE for fc hosts so that i/o doesn't get killed until
              the transport has an opportunity to manage the loss via its
              dev loss timer
      
      	when the "eh_abort" routine is called, check to see if the
              driver has the command or not before looking to see if a reset
              is pending.  James Smart and I talked about this and believe
              that the API for this routine is: if driver doesn't have
              command, return SUCCESS.  This change helps prevent a target
              from being taken offline.  SUCCESS is returned because it's
              likely that the command completed after error recovery timed
              it out but before it could be aborted.
      
      	provide a routine to queue work to newly created workq, and
              use it.
      
      	remove "ioc" from mptscsih_abort() it was only used one time.
      	the other references were via hd->ioc, so I just moved it....
      	net change in references to ioc via hd->ioc is zero
      
      	move hd->resetPending test and hd->timeouts increment to after
      	the test for whether the command to be aborted remains known
      	to the driver
      
      	Make certain that the workq exists before queuing work to it.
      
      mptfc.c
      
      	no longer need to lock rport data structures as I was able to
      	single thread the code!  I fixed up the debug code to
      	eliminate compilation messages due to type mismatch in the
      	printk.  Got rid of some no longer needed rport flags.
      	Initialize and destroy the workq used for the rescan work.
      
      	simplify the logic regarding the increment of
              fc_rescan_work_count.  use post increment and test for zero
              vs. pre increment and test for one; eliminate work_count
              variable: queue_work can be called with the work_lock held as
              it doesn't sleep
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      65207fed
    • M
      [SCSI] mptfusion: bug fix's for raid components adding/deleting · bd23e94c
      Moore, Eric 提交于
      This patch handles case where raid hidden components
      are not being removed when power turned off to device
      attached to expander, as well as the case of
      exposing raid components when power is turned back on
      to devices attached to an expander.  (This is a repost
      of this patch, with  mptsas_is_end_device declared
      further up in the code.)
      
      This patch contains some other miscellaneous bug fix's.
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      bd23e94c
  13. 15 3月, 2006 3 次提交
  14. 01 3月, 2006 1 次提交
    • J
      [SCSI] mptspi: Add transport class Domain Validation · c92f222e
      James Bottomley 提交于
      This is the first half of a patch to add the generic domain validation
      to mptspi.  It also creates a secondary "virtual" channel for raid
      component devices since these are now exported with no_uld_attach.
      
      What Eric and I would have really liked is to export all physical
      components on channel 0 and all raid components on channel 1.
      Unfortunately, this would result in device renumbering on platforms with
      mixed RAID/Physical devices which was considered unacceptable for
      userland stability reasons.
      
      Still to be done is to plug back the extra parameter setting and DV
      pieces on reset and hotplug.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      c92f222e
  15. 05 2月, 2006 2 次提交
  16. 01 2月, 2006 5 次提交
  17. 15 1月, 2006 4 次提交
  18. 14 12月, 2005 1 次提交
  19. 02 12月, 2005 1 次提交
  20. 30 11月, 2005 1 次提交
  21. 09 11月, 2005 2 次提交
  22. 20 9月, 2005 1 次提交
    • M
      [SCSI] fusion SAS support (mptsas driver) updates · 466544d8
      Moore, Eric Dean 提交于
      Summary of Changes:
      * splitting mpt_interrupt per Christophs suggestion
      about a month ago
      * rename ScsiCfgData to SpiCfgData structure,
      then move all the raid related info into
      new structure called RaidCfgData.  This is
      done because SAS supports RAID, as well as SPI,
      so the raid stuff should be seperate.
      * incorrect timeout calculation for cntdn
      inside WaitForDoorbellAck and WaitForDoortbellInt
      * add support for interpreting SAS Log Info
      * Increase Event Log Size from 0xA to 0x32
      * Fix bug in mptsas/mptfc/mptspi - when controller
      has Initiator Mode Disabled, and only running in
      TargetMode, the mptctl would panic when loading.
      The fix is to return 0, instead of -ENODEV, in
      SCSI LLD respective probe routines
      * Fix bug in mptlan.c - driver will panic if
      there is host reset, due to dev being set to
      zero in mpt_lan_ioc_reset
      * Fix's for SPI - Echo Buffer
      * Several fix's in mptscsih_io_done - FCP Response
      info, RESIDUAL_MISMATCH, Data Underrun, etc.
      * Cleanup Error Handling - EH handlers,
      mptscsih_flush_cmds, and zeroing out ScsiLookup
      from mptscsih_qcmd
      * Cleanup asyn event handling from
      mptscsih -> mptscsih_event_process.  Also
      added support for SAS Persistent Table Full,
      an asyn event
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      466544d8