1. 11 4月, 2010 1 次提交
  2. 09 4月, 2010 1 次提交
  3. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  4. 28 3月, 2010 6 次提交
  5. 20 2月, 2010 8 次提交
  6. 18 2月, 2010 1 次提交
  7. 09 2月, 2010 2 次提交
    • A
      [SCSI] qla2xxx: Obtain proper host structure during response-queue processing. · a67093d4
      Anirban Chakraborty 提交于
      Original code incorrectly assumed only status-type-0
      IOCBs would be queued to the response-queue, and thus all
      entries would safely reference a VHA from the IOCB
      'handle.'
      
      Cc: stable@kernel.org
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      a67093d4
    • X
      [SCSI] qla2xxx: make msix interrupt handler safe for irq · 0f19bc68
      Xiaotian Feng 提交于
      Yinghai has reported a lockdep warning on qla2xxx:
      
      [   77.965784] WARNING: at kernel/lockdep.c:2332
      trace_hardirqs_on_caller+0xc6/0x14b()
      [   77.977492] Hardware name: Sun
      [   77.979485] Modules linked in:
      [   77.994337] Pid: 0, comm: swapper Not tainted
      2.6.33-rc4-tip-yh-03949-g3a8e3f5-dirty #64
      [   78.000120] Call Trace:
      [   78.013298]  <IRQ>  [<ffffffff81076b54>] warn_slowpath_common+0x7c/0x94
      [   78.017746]  [<ffffffff81cd712c>] ? _raw_spin_unlock_irq+0x30/0x36
      [   78.035171]  [<ffffffff81076b80>] warn_slowpath_null+0x14/0x16
      [   78.040152]  [<ffffffff810a2ae8>] trace_hardirqs_on_caller+0xc6/0x14b
      [   78.055400]  [<ffffffff810a2b7a>] trace_hardirqs_on+0xd/0xf
      [   78.058951]  [<ffffffff81cd712c>] _raw_spin_unlock_irq+0x30/0x36
      [   78.074889]  [<ffffffff816461ef>] qla24xx_msix_default+0x243/0x281
      [   78.091598]  [<ffffffff810a5752>] ? __lock_release+0xa5/0xae
      [   78.096799]  [<ffffffff810c02ae>] handle_IRQ_event+0x53/0x113
      [   78.111568]  [<ffffffff810c2061>] handle_edge_irq+0xf3/0x13b
      [   78.116255]  [<ffffffff81035109>] handle_irq+0x24/0x2f
      [   78.132063]  [<ffffffff81cdc4b4>] do_IRQ+0x5c/0xc3
      [   78.134684]  [<ffffffff81cd7393>] ret_from_intr+0x0/0xf
      [   78.137903]  <EOI>  [<ffffffff81039a56>] ? mwait_idle+0xaf/0xbb
      [   78.155674]  [<ffffffff81039a4d>] ? mwait_idle+0xa6/0xbb
      [   78.158600]  [<ffffffff81031c7c>] cpu_idle+0x61/0xa1
      [   78.174333]  [<ffffffff81c85d7a>] rest_init+0x7e/0x80
      [   78.178122]  [<ffffffff82832d1f>] start_kernel+0x316/0x31d
      [   78.193623]  [<ffffffff82832297>] x86_64_start_reservations+0xa7/0xab
      [   78.198924]  [<ffffffff8283237f>] x86_64_start_kernel+0xe4/0xeb
      [   78.214540] ---[ end trace be4529f30a2e4ef5 ]---
      
      This was happened when qla2xxx msix interrupt handler is trying to enable
      IRQs by spin_unlock_irq(). We should make interrupt handler safe for IRQs,
      use spin_lock_irqsave/spin_unlock_irqrestore, this will not break the IRQs
      status in interrupt handler.
      Reported-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NXiaotian Feng <dfeng@redhat.com>
      Acked-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      0f19bc68
  8. 19 1月, 2010 4 次提交
  9. 18 1月, 2010 3 次提交
  10. 31 12月, 2009 5 次提交
  11. 10 12月, 2009 4 次提交
    • G
    • A
      [SCSI] qla2xxx: fix for multiqueue in MISX disabled case · 3155754a
      Anirban Chakraborty 提交于
       Fix to accommodate a hardware bug in multiqueue mode that does not
       work properly when acknowledgement of MSIX Interrupts is disabled.
      Signed-off-by: NAnirban Chakraborty <anirban.chakraborty@qlogic.com>
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      3155754a
    • G
      [SCSI] qla2xxx: Queue depth ramp up/down modification changes. · c45dd305
      Giridhar Malavali 提交于
      Removed the module parameters ql2xqfulltracking and ql2xqfullrampup
      since the queue depth ramp up/down functionality is moved to scsi-ml.
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c45dd305
    • M
      [SCSI] qla2xxx: dpc thread can execute before scsi host has been added · 1486400f
      Michael Reed 提交于
      Fix crash in qla2x00_fdmi_register() due to the dpc
      thread executing before the scsi host has been fully
      added.
      
      Unable to handle kernel NULL pointer dereference (address 00000000000001d0)
      qla2xxx_7_dpc[4140]: Oops 8813272891392 [1]
      
      Call Trace:
       [<a000000100016910>] show_stack+0x50/0xa0
                                      sp=e00000b07c59f930 bsp=e00000b07c591400
       [<a000000100017180>] show_regs+0x820/0x860
                                      sp=e00000b07c59fb00 bsp=e00000b07c5913a0
       [<a00000010003bd60>] die+0x1a0/0x2e0
                                      sp=e00000b07c59fb00 bsp=e00000b07c591360
       [<a0000001000681a0>] ia64_do_page_fault+0x8c0/0x9e0
                                      sp=e00000b07c59fb00 bsp=e00000b07c591310
       [<a00000010000c8e0>] ia64_native_leave_kernel+0x0/0x270
                                      sp=e00000b07c59fb90 bsp=e00000b07c591310
       [<a000000207197350>] qla2x00_fdmi_register+0x850/0xbe0 [qla2xxx]
                                      sp=e00000b07c59fd60 bsp=e00000b07c591290
       [<a000000207171570>] qla2x00_configure_loop+0x1930/0x34c0 [qla2xxx]
                                      sp=e00000b07c59fd60 bsp=e00000b07c591128
       [<a0000002071732b0>] qla2x00_loop_resync+0x1b0/0x2e0 [qla2xxx]
                                      sp=e00000b07c59fdf0 bsp=e00000b07c5910c0
       [<a000000207166d40>] qla2x00_do_dpc+0x9a0/0xce0 [qla2xxx]
                                      sp=e00000b07c59fdf0 bsp=e00000b07c590fa0
       [<a0000001000d5bb0>] kthread+0x110/0x140
                                      sp=e00000b07c59fe00 bsp=e00000b07c590f68
       [<a000000100014a30>] kernel_thread_helper+0xd0/0x100
                                      sp=e00000b07c59fe30 bsp=e00000b07c590f40
       [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
                                      sp=e00000b07c59fe30 bsp=e00000b07c590f40
      
      crash> dis a000000207197350
      0xa000000207197350 <qla2x00_fdmi_register+2128>:        [MMI]       ld1 r45=[r14];;
      crash> scsi_qla_host.host 0xe00000b058c73ff8
        host = 0xe00000b058c73be0,
      crash> Scsi_Host.shost_data 0xe00000b058c73be0
        shost_data = 0x0,  <<<<<<<<<<<
      
      The fc_transport fc_* workqueue threads have yet to be created.
      
      crash> ps | grep _7
         3891      2   2  e00000b075c80000  IN   0.0       0      0  [scsi_eh_7]
         4140      2   3  e00000b07c590000  RU   0.0       0      0  [qla2xxx_7_dpc]
      
      The thread creating adding the Scsi_Host is blocked due to other
      activity in sysfs.
      
      crash> bt 3762
      PID: 3762   TASK: e00000b071e70000  CPU: 3   COMMAND: "modprobe"
       #0 [BSP:e00000b071e71548] schedule at a000000100727e00
       #1 [BSP:e00000b071e714c8] __mutex_lock_slowpath at a0000001007295a0
       #2 [BSP:e00000b071e714a8] mutex_lock at a000000100729830
       #3 [BSP:e00000b071e71478] sysfs_addrm_start at a0000001002584f0
       #4 [BSP:e00000b071e71440] create_dir at a000000100259350
       #5 [BSP:e00000b071e71410] sysfs_create_subdir at a000000100259510
       #6 [BSP:e00000b071e713b0] internal_create_group at a00000010025c880
       #7 [BSP:e00000b071e71388] sysfs_create_group at a00000010025cc50
       #8 [BSP:e00000b071e71368] dpm_sysfs_add at a000000100425050
       #9 [BSP:e00000b071e71310] device_add at a000000100417d90
      #10 [BSP:e00000b071e712d8] scsi_add_host at a00000010045a380
      #11 [BSP:e00000b071e71268] qla2x00_probe_one at a0000002071be950
      #12 [BSP:e00000b071e71248] local_pci_probe at a00000010032e490
      #13 [BSP:e00000b071e71218] pci_device_probe at a00000010032ecd0
      #14 [BSP:e00000b071e711d8] driver_probe_device at a00000010041d480
      #15 [BSP:e00000b071e711a8] __driver_attach at a00000010041d6e0
      #16 [BSP:e00000b071e71170] bus_for_each_dev at a00000010041c240
      #17 [BSP:e00000b071e71150] driver_attach at a00000010041d0a0
      #18 [BSP:e00000b071e71108] bus_add_driver at a00000010041b080
      #19 [BSP:e00000b071e710c0] driver_register at a00000010041dea0
      #20 [BSP:e00000b071e71088] __pci_register_driver at a00000010032f610
      #21 [BSP:e00000b071e71058] (unknown) at a000000207200270
      #22 [BSP:e00000b071e71018] do_one_initcall at a00000010000a9c0
      #23 [BSP:e00000b071e70f98] sys_init_module at a0000001000fef00
      #24 [BSP:e00000b071e70f98] ia64_ret_from_syscall at a00000010000c740
      
      So, it appears that qla2xxx dpc thread is moving forward before the
      scsi host has been completely added.
      
      This patch moves the setting of the init_done (and online) flag to
      after the call to scsi_add_host() to hold off the dpc thread.
      
      Found via large lun count testing using 2.6.31.
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Acked-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      1486400f
  12. 05 12月, 2009 4 次提交