PROBLEM: flush_tlb_all_ipi() SMP lockup in 2.4
Hello,
I am having a problem with the 2.4 kernel locking up when I load the sym53c8xx SCSI driver. The lockup occurs on a MSI K7D Master motherboard (AMD 760MPX chipset; dual Athlon CPUs) with two dual-channel LSI22903 SCSI cards (LSI Logic 53c1010-66). The lockup happens only with two SCSI cards installed; with only one SCSI card installed it works fine. For debugging purposes there are no SCSI devices attached; the lockup happens when loading the driver, not when accessing devices. I have tested two completely different sets of hardware in the same configuration with the same results.
I enabled the NMI watchdog timer to get an oops report of the lockup. It actually oopses in one of two different places. Both oops reports are included below.
The lockup is triggered by a call to either ioremap() or iounmap(). To rule out a simple ioremap/iounmap usage error, I added printk() messages to each call to ioremap/iounmap in the sym53c8xx driver, but everything checked out O.K. Only valid PCI memory on the SCSI card was ioremap()ed, and everything that was ioremap()ed was also iounmap()ed. These messages are also included below for each oops. Looking at these messages, it seems likely that the reason the driver loads successfully when only one SCSI card is installed is because less memory is ioremap()ed in that case.
The more interesting part is that the lockup happens only when the insmod process runs on the second CPU. If insmod runs on the first CPU, the driver loads successfully. This is why I am emailing linux-smp rather than linux-scsi, since it seems the SCSI driver itself is fine, but it is triggering a more generic SMP problem, possibly with flush_tlb_all_ipi() or smp_call_function() as seen in the oops reports below.
One thing I tried was to add a call to set_cpus_allowed(current, 0x01) in the sym53c8xx_detect function before any PCI access was done. The result was that the lockup still occurred, but on CPU #0 instead. This may indicate that something is going wrong with insmod itself or in the scsi midlevel before Scsi_Host_Template->detect() is called and only being triggered later.
Since that didn't work, I made the sym53c8xx driver load fail if smp_processor_id() != 0. Using this method, I just retry modprobe until it runs on CPU #0, and the driver loads successfully. I have not yet tested whether or not the driver actually works once it is loaded via this method.
I was initially using 2.4.21-rc1 but also tried 2.4.21-rc3 today with the same results.
Any help in solving this problem would be greatly appreciated.
Anthony J. Battersby
Cybernetics
----------------------------------------------------------------------
Oops report #1. The pci_unmap_mem() function in sym53c8xx calls iounmap(), which triggers the lockup.
ksymoops 2.4.4 on i686 2.4.21-rc1-debug. Options used
-V (default)
-k 20030523004504.ksyms (specified)
-l 20030523004504.modules (specified)
-o /lib/modules/2.4.21-rc1-debug/ (default)
-m /boot/System.map-2.4.21-rc1-debug (specified)NMI Watchdog detected LOCKUP on CPU1, eip c011286b, registers:
CPU: 1 EIP: 0010:[<c011286b>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00000097
eax: 00000000 ebx: 00000001 ecx: c100001c edx: d082b000
esi: 00000001 edi: cf8c20fc ebp: cfb1bb20 esp: cfb1baf8
ds: 0018 es: 0018 ss: 0018
Process insmod (pid: 239, stackpage=cfb1b000)
Stack: c01126b0 00000000 00000000 00000000 00000001 c011aa2b 00003a48
0002b000
cfb46974 00000000 cfb1bb3c c0112724 c01126b0 00000000 00000001
00000001
cfb46974 cfb1bb50 c0134509 d0829000 00002000 d0829000 cfb1bb68
d083ca14
Call Trace: [<c01126b0>] [<c011aa2b>] [<c0112724>] [<c01126b0>][<c0134509>]
[<d083ca14>] [<d084a3d9>] [<d083fc8b>] [<d084a586>] [<c01b87b7>]
[<d084d9e0>]
[<d083fe69>] [<d084d9e0>] [<d084d9e0>] [<c011bf26>] [<d083c060>]
[<c01076b3>]
Code: 39 d8 75 f9 85 f6 74 09 eb 00 8b 45 e4 39 d8 75 f9 81 3d ac
Quoted 1 line
Quoted 1 line
EIP;
c011286b<smp_call_function+9b/f0> <=====
Trace; c01126b0 <flush_tlb_all_ipi+0/60>
Trace; c011aa2b <call_console_drivers+eb/100> Trace; c0112724 <flush_tlb_all+14/80>
Trace; c01126b0 <flush_tlb_all_ipi+0/60>
Trace; c0134509 <vfree+39/c0>
Trace; d083ca14 <[sym53c8xx]pci_unmap_mem+24/50> Trace; d084a3d9 <[sym53c8xx].rodata.end+19ea/29b1> Trace; d083fc8b <[sym53c8xx]sym53c8xx_detect+35b/470> Trace; d084a586 <[sym53c8xx].rodata.end+1b97/29b1> Trace; c01b87b7 <scsi_register_host+97/360> Trace; d084d9e0 <[sym53c8xx]driver_template+0/80> Trace; d083fe69 <[sym53c8xx]init_this_scsi_driver+19/40> Trace; d084d9e0 <[sym53c8xx]driver_template+0/80> Trace; d084d9e0 <[sym53c8xx]driver_template+0/80> Trace; c011bf26 <sys_init_module+596/680> Trace; d083c060 <[sym53c8xx]sym_fw1_patch+0/60> Trace; c01076b3 <system_call+33/38>
Code; c011286b <smp_call_function+9b/f0> 00000000 <_EIP>:
Code; c011286b <smp_call_function+9b/f0> <=====
0: 39 d8 cmp %ebx,%eax <=====
Code; c011286d <smp_call_function+9d/f0>
2: 75 f9 jne fffffffd <_EIP+0xfffffffd> c0112868
<smp_call_function+98/f0>
Code; c011286f <smp_call_function+9f/f0>
4: 85 f6 test %esi,%esi
Code; c0112871 <smp_call_function+a1/f0>
6: 74 09 je 11 <_EIP+0x11> c011287c
<smp_call_function+ac/f0>
Code; c0112873 <smp_call_function+a3/f0>
8: eb 00 jmp a <_EIP+0xa> c0112875
<smp_call_function+a5/f0>
Code; c0112875 <smp_call_function+a5/f0>
a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax
Code; c0112878 <smp_call_function+a8/f0>
d: 39 d8 cmp %ebx,%eax
Code; c011287a <smp_call_function+aa/f0>
f: 75 f9 jne a <_EIP+0xa> c0112875
<smp_call_function+a5/f0>
Code; c011287c <smp_call_function+ac/f0>
11: 81 3d ac 00 00 00 00 cmpl $0x0,0xac
Code; c0112883 <smp_call_function+b3/f0>
18: 00 00 00
----------------------------------------------------------------------
Kernel messages to go with oops #1, including ioremap/iounmap printk()s I added.
ioremap(0xFC006000, 8192)ioremap(0xFC006000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC009000, 128)ioremap(0xFC009000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC000000, 8192)ioremap(0xFC000000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC00B000, 128)ioremap(0xFC00B000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC002000, 8192)ioremap(0xFC002000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC008000, 128)ioremap(0xFC008000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC004000, 8192)ioremap(0xFC004000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC00A000, 128)ioremap(0xFC00A000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC009000, 128)ioremap(0xFC009000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC009000, 256)ioremap(0xFC009000, 256) = 0xD081A000ioremap(0xFC006000, 8192)ioremap(0xFC006000, 8192) = 0xD081C000
sym0: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
sym0: using LOAD/STORE-based firmware.
sym0: handling phase mismatch from SCRIPTS.
sym0: SCAN AT BOOT disabled for targets 0 1 2 3 4 5 6 8 9 10 11 12 13 14 15.
sym0: SCSI BUS has been reset.ioremap(0xFC00B000, 128)ioremap(0xFC00B000, 128) = 0xD081F000
iounmap(0xD081F000)
iounmap doneioremap(0xFC00B000, 256)ioremap(0xFC00B000, 256) = 0xD081F000ioremap(0xFC000000, 8192)ioremap(0xFC000000, 8192) = 0xD0821000
sym1: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym1: open drain IRQ line driver, using on-chip SRAM
sym1: using LOAD/STORE-based firmware.
sym1: handling phase mismatch from SCRIPTS.
sym1: SCSI BUS has been reset.ioremap(0xFC008000, 128)ioremap(0xFC008000, 128) = 0xD0824000
iounmap(0xD0824000)
iounmap doneioremap(0xFC008000, 256)ioremap(0xFC008000, 256) = 0xD0824000ioremap(0xFC002000, 8192)ioremap(0xFC002000, 8192) = 0xD0826000
sym2: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym2: open drain IRQ line driver, using on-chip SRAM
sym2: using LOAD/STORE-based firmware.
sym2: handling phase mismatch from SCRIPTS.
sym2: SCAN AT BOOT disabled for targets 0 1 2 3 4 5 6 8 9 10 11 12 13 14 15.
sym2: SCSI BUS has been reset.ioremap(0xFC00A000, 128)ioremap(0xFC00A000, 128) = 0xD0829000
iounmap(0xD0829000)
--> The NMI watchdog oopses in the call to iounmap() above.
----------------------------------------------------------------------
Oops report #2. The pci_map_mem() function in sym53c8xx calls ioremap(), which triggers the lockup.
ksymoops 2.4.4 on i686 2.4.21-rc1-debug. Options used
-V (default)
-k 20030523004504.ksyms (specified)
-l 20030523004504.modules (specified)
-o /lib/modules/2.4.21-rc1-debug/ (default)
-m /boot/System.map-2.4.21-rc1-debug (specified)NMI Watchdog detected LOCKUP on CPU1, eip c011286b, registers:
CPU: 1 EIP: 0010:[<c011286b>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00000097
eax: 00000000 ebx: 00000001 ecx: cff360a8 edx: d082a000
esi: 00000001 edi: 0002a000 ebp: cf88dab0 esp: cf88da88
ds: 0018 es: 0018 ss: 0018
Process insmod (pid: 229, stackpage=cf88d000)
Stack: c01126b0 00000000 00000000 00000000 00000001 00010838 cf88dac0
c0195775
0002a000 00400000 cf88dacc c0112724 c01126b0 00000000 00000001
00000001
0002a000 cf88db00 c0115258 fc00b000 cff360a8 0002a000 fbfe1000
c0101d0c
Call Trace: [<c01126b0>] [<c0195775>] [<c0112724>] [<c01126b0>][<c0115258>]
[<c0115343>] [<d083c9bc>] [<d083f0ae>] [<d083fc8b>] [<d084a586>]
[<c01b87b7>]
[<d084d9e0>] [<d083fe69>] [<d084d9e0>] [<d084d9e0>] [<c011bf26>]
[<d083c060>]
[<c01076b3>]
Code: 39 d8 75 f9 85 f6 74 09 eb 00 8b 45 e4 39 d8 75 f9 81 3d ac
Quoted 1 line
Quoted 1 line
EIP;
c011286b<smp_call_function+9b/f0> <=====
Trace; c01126b0 <flush_tlb_all_ipi+0/60>
Trace; c0195775 <vt_console_print+2a5/2c0> Trace; c0112724 <flush_tlb_all+14/80>
Trace; c01126b0 <flush_tlb_all_ipi+0/60>
Trace; c0115258 <remap_area_pages+208/220> Trace; c0115343 <__ioremap+d3/f0>
Trace; d083c9bc <[sym53c8xx]pci_map_mem+3c/70> Trace; d083f0ae <[sym53c8xx]sym_get_nvram+2e/60> Trace; d083fc8b <[sym53c8xx]sym53c8xx_detect+35b/470> Trace; d084a586 <[sym53c8xx].rodata.end+1b97/29b1> Trace; c01b87b7 <scsi_register_host+97/360> Trace; d084d9e0 <[sym53c8xx]driver_template+0/80> Trace; d083fe69 <[sym53c8xx]init_this_scsi_driver+19/40> Trace; d084d9e0 <[sym53c8xx]driver_template+0/80> Trace; d084d9e0 <[sym53c8xx]driver_template+0/80> Trace; c011bf26 <sys_init_module+596/680> Trace; d083c060 <[sym53c8xx]sym_fw1_patch+0/60> Trace; c01076b3 <system_call+33/38>
Code; c011286b <smp_call_function+9b/f0> 00000000 <_EIP>:
Code; c011286b <smp_call_function+9b/f0> <=====
0: 39 d8 cmp %ebx,%eax <=====
Code; c011286d <smp_call_function+9d/f0>
2: 75 f9 jne fffffffd <_EIP+0xfffffffd> c0112868
<smp_call_function+98/f0>
Code; c011286f <smp_call_function+9f/f0>
4: 85 f6 test %esi,%esi
Code; c0112871 <smp_call_function+a1/f0>
6: 74 09 je 11 <_EIP+0x11> c011287c
<smp_call_function+ac/f0>
Code; c0112873 <smp_call_function+a3/f0>
8: eb 00 jmp a <_EIP+0xa> c0112875
<smp_call_function+a5/f0>
Code; c0112875 <smp_call_function+a5/f0>
a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax
Code; c0112878 <smp_call_function+a8/f0>
d: 39 d8 cmp %ebx,%eax
Code; c011287a <smp_call_function+aa/f0>
f: 75 f9 jne a <_EIP+0xa> c0112875
<smp_call_function+a5/f0>
Code; c011287c <smp_call_function+ac/f0>
11: 81 3d ac 00 00 00 00 cmpl $0x0,0xac
Code; c0112883 <smp_call_function+b3/f0>
18: 00 00 00
----------------------------------------------------------------------
Kernel messages to go with oops #2, including ioremap/iounmap printk()s I added.
ioremap(0xFC006000, 8192)ioremap(0xFC006000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC009000, 128)ioremap(0xFC009000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC000000, 8192)ioremap(0xFC000000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC00B000, 128)ioremap(0xFC00B000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC002000, 8192)ioremap(0xFC002000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC008000, 128)ioremap(0xFC008000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC004000, 8192)ioremap(0xFC004000, 8192) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC00A000, 128)ioremap(0xFC00A000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC009000, 128)ioremap(0xFC009000, 128) = 0xD081A000
iounmap(0xD081A000)
iounmap doneioremap(0xFC009000, 256)ioremap(0xFC009000, 256) = 0xD081A000ioremap(0xFC006000, 8192)ioremap(0xFC006000, 8192) = 0xD081C000
sym0: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
sym0: using LOAD/STORE-based firmware.
sym0: handling phase mismatch from SCRIPTS.
sym0: SCAN AT BOOT disabled for targets 0 1 2 3 4 5 6 8 9 10 11 12 13 14 15.
sym0: SCSI BUS has been reset.ioremap(0xFC00B000, 128)ioremap(0xFC00B000, 128) = 0xD081F000
iounmap(0xD081F000)
iounmap doneioremap(0xFC00B000, 256)ioremap(0xFC00B000, 256) = 0xD081F000ioremap(0xFC000000, 8192)ioremap(0xFC000000, 8192) = 0xD0821000
sym1: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym1: open drain IRQ line driver, using on-chip SRAM
sym1: using LOAD/STORE-based firmware.
sym1: handling phase mismatch from SCRIPTS.
sym1: SCSI BUS has been reset.ioremap(0xFC008000, 128)ioremap(0xFC008000, 128) = 0xD0824000
iounmap(0xD0824000)
iounmap doneioremap(0xFC008000, 256)ioremap(0xFC008000, 256) = 0xD0824000ioremap(0xFC002000, 8192)ioremap(0xFC002000, 8192) = 0xD0826000
sym2: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym2: open drain IRQ line driver, using on-chip SRAM
sym2: using LOAD/STORE-based firmware.
sym2: handling phase mismatch from SCRIPTS.
sym2: SCAN AT BOOT disabled for targets 0 1 2 3 4 5 6 8 9 10 11 12 13 14 15.
sym2: SCSI BUS has been reset.ioremap(0xFC00A000, 128)
--> The NMI watchdog oopses in the call to ioremap() above.
----------------------------------------------------------------------
lspci -vvv
Sorry, no PCI name database. The SCSI cards are "Class 0100: 1000:0021 (rev 01)".
00:00.0 Class 0600: 1022:700c (rev 11)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort+ >SERR- <PERR-
Latency: 32 Region 0: Memory at f0000000 (32-bit, prefetchable) [size=128M] Region 1: Memory at fc00c000 (32-bit, prefetchable) [size=4K] Region 2: I/O ports at e400 [disabled] [size=4] Capabilities: [a0] AGP version 2.0 Status: RQ=15 SBA+ 64bit- FW- Rate=x1,x2 Command: RQ=0 SBA+ AGP- 64bit- FW- Rate=<none>
00:01.0 Class 0604: 1022:700d
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
Latency: 32 Bus: primary=00, secondary=01, subordinate=01, sec-latency=32 I/O behind bridge: 0000f000-00000fff Memory behind bridge: fff00000-000fffff Prefetchable memory behind bridge: fff00000-000fffff BridgeCtl: Parity- SERR+ NoISA+ VGA- MAbort- >Reset- FastB2B-
00:07.0 Class 0601: 1022:7440 (rev 05)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
Latency: 0
00:07.1 Class 0101: 1022:7441 (rev 04) (prog-if 8a [Master SecP PriP])
Subsystem: 1022:7441 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 32 Region 4: I/O ports at d000 [size=16]
00:07.3 Class 0680: 1022:7443 (rev 03)
Subsystem: 1022:7443 Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
00:08.0 Class 0100: 1000:0021 (rev 01)
Subsystem: 1000:1020 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 72 (4250ns min, 4500ns max), cache line size 08 Interrupt: pin A routed to IRQ 10 Region 0: I/O ports at d400 [size=256] Region 1: Memory at fc009000 (64-bit, non-prefetchable) [size=1K] Region 3: Memory at fc006000 (64-bit, non-prefetchable) [size=8K] Expansion ROM at <unassigned> [disabled] [size=128K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:08.1 Class 0100: 1000:0021 (rev 01)
Subsystem: 1000:1020 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 72 (4250ns min, 4500ns max), cache line size 08 Interrupt: pin B routed to IRQ 11 Region 0: I/O ports at d800 [size=256] Region 1: Memory at fc00b000 (64-bit, non-prefetchable) [size=1K] Region 3: Memory at fc000000 (64-bit, non-prefetchable) [size=8K] Expansion ROM at <unassigned> [disabled] [size=128K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:09.0 Class 0100: 1000:0021 (rev 01)
Subsystem: 1000:1020 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 72 (4250ns min, 4500ns max), cache line size 08 Interrupt: pin A routed to IRQ 11 Region 0: I/O ports at dc00 [size=256] Region 1: Memory at fc008000 (64-bit, non-prefetchable) [size=1K] Region 3: Memory at fc002000 (64-bit, non-prefetchable) [size=8K] Expansion ROM at <unassigned> [disabled] [size=128K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:09.1 Class 0100: 1000:0021 (rev 01)
Subsystem: 1000:1020 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 72 (4250ns min, 4500ns max), cache line size 08 Interrupt: pin B routed to IRQ 12 Region 0: I/O ports at e000 [size=256] Region 1: Memory at fc00a000 (64-bit, non-prefetchable) [size=1K] Region 3: Memory at fc004000 (64-bit, non-prefetchable) [size=8K] Expansion ROM at <unassigned> [disabled] [size=128K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:10.0 Class 0604: 1022:7448 (rev 05)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort+ >SERR- <PERR-
Latency: 32 Bus: primary=00, secondary=02, subordinate=02, sec-latency=32 I/O behind bridge: 0000c000-0000cfff Memory behind bridge: f9000000-fbffffff Prefetchable memory behind bridge: fff00000-000fffff BridgeCtl: Parity- SERR+ NoISA+ VGA+ MAbort- >Reset- FastB2B-
02:00.0 Class 0c03: 1022:7449 (rev 07) (prog-if 10)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR+
Latency: 32 (20000ns max), cache line size 08 Interrupt: pin D routed to IRQ 5 Region 0: Memory at fb020000 (32-bit, non-prefetchable) [size=4K]
02:05.0 Class 0300: 1002:4754 (rev 41)
Subsystem: 1002:4754 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 32 (2000ns min), cache line size 08 Region 0: Memory at f9000000 (32-bit, non-prefetchable) [size=16M] Region 1: I/O ports at c000 [size=256] Region 2: Memory at fb022000 (32-bit, non-prefetchable) [size=4K] Expansion ROM at <unassigned> [disabled] [size=128K]
02:09.0 Class 0200: 8086:1229 (rev 10)
Subsystem: 1014:0207 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 32 (2000ns min, 14000ns max), cache line size 08 Interrupt: pin A routed to IRQ 11 Region 0: Memory at fb021000 (32-bit, non-prefetchable) [size=4K] Region 1: I/O ports at c400 [size=64] Region 2: Memory at fb000000 (32-bit, non-prefetchable) [size=128K] Expansion ROM at <unassigned> [disabled] [size=64K] Capabilities: [dc] Power Management version 2 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=2 PME-
----------------------------------------------------------------------
dmesg output (different kernel than the oopses above, but same results)
Linux version 2.4.21-rc3-debug ([email protected]) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)) #1 SMP Fri May 23 09:57:39 EDT 2003
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fff0000 (usable)
BIOS-e820: 000000000fff0000 - 000000000fff3000 (ACPI NVS)
BIOS-e820: 000000000fff3000 - 0000000010000000 (ACPI data)
BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
255MB LOWMEM available.
found SMP MP-table at 000f4b00
hm, page 000f4000 reserved twice.
hm, page 000f5000 reserved twice.
hm, page 000f1000 reserved twice.
hm, page 000f2000 reserved twice.
On node 0 totalpages: 65520
zone(0): 4096 pages.
zone(1): 61424 pages.
zone(2): 0 pages.
Intel MultiProcessor Specification v1.4
Virtual Wire compatibility mode.
OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000 Processor #0 Pentium(tm) Pro APIC version 17
Processor #1 Pentium(tm) Pro APIC version 17
I/O APIC #2 Version 17 at 0xFEC00000.
Enabling APIC mode: Flat. Using 1 I/O APICs
Processors: 2
Kernel command line: auto BOOT_IMAGE=linux-debug ro root=301 noapic nmi_watchdog=2 console=tty0 console=ttyS0,115200
Initializing CPU#0
Detected 1666.772 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 3322.67 BogoMIPS
Memory: 256768k/262080k available (1203k kernel code, 4928k reserved, 303k data, 104k init, 0k highmem)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes) Inode cache hash table entries: 16384 (order: 5, 131072 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes) Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
CPU: CLK_CTL MSR was 6003d22f. Reprogramming to 2003d22f
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: After generic, caps: 0383fbff c1cbfbff 00000000 00000000 CPU: Common caps: 0383fbff c1cbfbff 00000000 00000000
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done. Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch ([email protected])
mtrr: detected mtrr type: Intel
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
Intel machine check reporting enabled on CPU#0.
CPU: After generic, caps: 0383fbff c1cbfbff 00000000 00000000 CPU: Common caps: 0383fbff c1cbfbff 00000000 00000000 CPU0: AMD Athlon(tm) MP 2000+ stepping 01 per-CPU timeslice cutoff: 731.44 usecs.
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Booting processor 1/1 eip 2000
Initializing CPU#1
masked ExtINT on CPU#1
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Calibrating delay loop... 3329.22 BogoMIPS
CPU: CLK_CTL MSR was 6003d22f. Reprogramming to 2003d22f
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
Intel machine check reporting enabled on CPU#1.
CPU: After generic, caps: 0383fbff c1cbfbff 00000000 00000000 CPU: Common caps: 0383fbff c1cbfbff 00000000 00000000 CPU1: AMD Athlon(tm) MP stepping 01
Total of 2 processors activated (6651.90 BogoMIPS).
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1666.7531 MHz.
..... host bus clock speed is 266.6804 MHz.
cpu: 0, clocks: 2666804, slice: 888934 CPU0<T0:2666800,T1:1777856,D:10,S:888934,C:2666804>
cpu: 1, clocks: 2666804, slice: 888934 CPU1<T0:2666800,T1:888928,D:4,S:888934,C:2666804>
checking TSC synchronization across CPUs: passed.
Waiting on wait_init_idle (map = 0x2)
All processors have done init_idle
mtrr: your CPUs had inconsistent fixed MTRR settings
mtrr: probably your BIOS does not setup all CPUs
PCI: PCI BIOS revision 2.10 entry at 0xfb130, last bus=2
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Using IRQ router default [1022/700c] at 00:00.0
BIOS failed to enable PCI standards compliance, fixing this error. Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Real Time Clock Driver v1.10e
Uniform Multi-Platform E-IDE driver Revision: 7.00beta3-.2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
AMD7441: IDE controller at PCI slot 00:07.1
AMD7441: chipset revision 4
AMD7441: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xxAMD_IDE: PCI device 1022:7441 (rev 04) UDMA100 controller on pci00:07.1
ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio
hda: IBM-DMCA-21440, ATA DISK drive
blk: queue c02eeec0, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: attached ide-disk driver.
hda: 2818368 sectors (1443 MB) w/96KiB Cache, CHS=699/64/63, DMA Partition check:
hda: hda1 hda2
SCSI subsystem driver Revision: 1.00usb.c: registered new driver usbdevfsusb.c: registered new driver hubhost/usb-uhci.c: $Revision: 1.275 $ time 09:59:25 May 23 2003 host/usb-uhci.c: High bandwidth mode enabledhost/usb-uhci.c: v1.275:USB Universal Host Controller Interface driver host/usb-ohci.c: USB OHCI at membase 0xd080d000, IRQ 5 host/usb-ohci.c: usb-02:00.0, PCI device 1022:7449usb.c: new USB bus registered, assigned bus number 1hub.c: USB hub foundhub.c: 4 ports detectedusb.c: registered new driver hidhid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <[email protected]> hid-core.c: USB HID support drivers
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 1024 buckets, 16Kbytes
TCP: Hash tables configured (established 8192 bind 10922)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery. kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.hub.c: new USB device 02:00.0-1, assigned address 2usb.c: USB device 2 (vend/prod 0x403/0x6001) is not claimed by any active driver.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 104k freedhub.c: new USB device 02:00.0-2, assigned address 3usb.c: USB device 3 (vend/prod 0x529/0x1) is not claimed by any active driver.
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal eepro100.c:v1.09j-t 9/29/99 Donald Becker
http://www.scyld.com/network/eepro100.htmleepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <[email protected]> and others
eth0: OEM i82557/i82558 10/100 Ethernet, 00:10:DC:FC:39:D2, IRQ 11.
Board assembly a32040-002, Physical connectors present: RJ45 Primary interface chip i82555 PHY #1.
General self-test: passed.
Serial sub-system self-test: passed.
Internal registers self-test: passed.
ROM checksum self-test: passed (0xd0a6c714).
spurious 8259A interrupt: IRQ7.
----------------------------------------------------------------------
cat /proc/cpuinfo
processor : 0vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm) MP 2000+
stepping : 1
cpu MHz : 1666.772
cache size : 256 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 3322.67
processor : 1vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm) MP
stepping : 1
cpu MHz : 1666.772
cache size : 256 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 3329.22
----------------------------------------------------------------------
Quoted 3 lines · Tony Battersby
purposes there are no SCSI devices attached; the lockup happens when loading the driver, not when accessing devices. I have tested two completely different sets of hardware in the same configuration with the same results.
Interesting
Quoted 3 lines
The lockup is triggered by a call to either
ioremap()oriounmap(). To rule out a simple ioremap/iounmap usage error, I addedprintk()messages to each call to ioremap/iounmap in the sym53c8xx driver, but everything checked out
This looks like an error path freeing an io mapping with a lock held. Certainly it looks like a scsi driver bug not an SMP bug
Quoted 9 lines
-----Original Message-----
From: Alan Cox [mailto:[email protected]]
Sent: Monday, May 26, 2003 7:32 PM
To: [email protected]
Cc: [email protected]
Subject: Re: PROBLEM:flush_tlb_all_ipi()SMP lockup in 2.4This looks like an error path freeing an io mapping with a lock held. Certainly it looks like a scsi driver bug not an SMP bug
Thanks for the hint. I just determined that the driver holds io_request_lock while calling ioremap/iounmap, which is what is causing the problem. I will email the driver maintainer about it.
Anthony J. Battersby
Cybernetics