Most recent kernel where this bug did not occur: 2.6.18-rc2 Distribution: kernel from kernel.org, debian linux Hardware Environment: gateway desktop,model: E1600-SE PCI 2.2 PCI Power Management 1.1 or later ACPI 2.0 APM 1.2 DMI 2.0 AC '97 version 2.1 Wired for Management 2.0 or later PC 99 compliant Intel 810E, which includes the following: GMCH ICH2 FWH Software Environment: Problem Description: S3 resume hangs on Wake on LAN. Even if boot with init=/bin/sh, this problem still exist. But: S3 resume works fine on power button. S5 resume works fine on Wake on LAN. Steps to reproduce: 1) enable PCI1 wakeup echo PCI1 > /proc/acpi/wakeup 2) suspend to ram echo -n mem > /sys/power/state 3)send Magic packet from other computer. on receive the packet, messages show up on screen is: Intel Machine check architecture supported ... BUG: soft lockup dected on CPU#0 .... ACPI Exeception(evgpe-0678) AE_NO_MEMORY unable to queue handler for GPE[B] ... dmesg -s40000: Linux version 2.6.17 (root@water14) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #2 Fri Jul 21 14:22:44 EDT 2006 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000001fec0000 (usable) BIOS-e820: 000000001fec0000 - 000000001fef8000 (ACPI data) BIOS-e820: 000000001fef8000 - 000000001ff00000 (ACPI NVS) BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved) BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved) 0MB HIGHMEM available. 510MB LOWMEM available. On node 0 totalpages: 130752 DMA zone: 4096 pages, LIFO batch:0 Normal zone: 126656 pages, LIFO batch:31 DMI 2.3 present. ACPI: RSDP (v000 AMI ) @ 0x000ff980 ACPI: RSDT (v001 GATEWA N0BPE040 0x20010823 MSFT 0x00001011) @ 0x1fef0000 ACPI: FADT (v001 GATEWA N0BPE040 0x20010823 MSFT 0x00001011) @ 0x1fef1000 ACPI: SSDT (v001 GATEWA N0BPE040 0x00000012 MSFT 0x0100000b) @ 0x1fee2f78 ACPI: DSDT (v001 GATEWA N0BPE040 0x20010712 MSFT 0x0100000b) @ 0x00000000 ACPI: PM-Timer IO Port: 0x408 Allocating PCI resources starting at 20000000 (gap: 1ff00000:dfc80000) Built 1 zonelists Kernel command line: root=/dev/hdc1 ro acpi=on acpi_sleep=s3_bios nolapic Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Initializing CPU#0 PID hash table entries: 2048 (order: 11, 8192 bytes) Detected 930.477 MHz processor. Using pmtmr for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 510884k/523008k available (1729k kernel code, 11536k reserved, 562k data, 160k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay using timer specific routine.. 1862.38 BogoMIPS (lpj=3724774) Security Framework v1.0.0 initialized Mount-cache hash table entries: 512 CPU: After generic identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 00000000 00000000 CPU: After vendor identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 00000000 00000000 CPU: L1 I cache: 16K, L1 D cache: 16K CPU: L2 cache: 256K CPU: After all inits, caps: 0383f9ff 00000000 00000000 00000040 00000000 00000000 00000000 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. CPU: Intel Pentium III (Coppermine) stepping 06 Checking 'hlt' instruction... OK. SMP alternatives: switching to UP code Freeing SMP alternatives: 0k freed tbxface-0109 [02] load_tables : ACPI Tables successfully acquired Parsing all Control Methods: Table [DSDT](id 0006) - 447 Objects with 37 Devices 136 Methods 22 Regions Parsing all Control Methods: Table [SSDT](id 0004) - 1 Objects with 0 Devices 0 Methods 0 Regions ACPI Namespace successfully loaded at root c0384630 ACPI: setting ELCR to 0200 (from 0e40) evxfevnt-0091 [03] enable : Transition to ACPI mode successful checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd Freeing initrd memory: 4380k freed NET: Registered protocol family 16 ACPI: bus type pci registered PCI: PCI BIOS revision 2.10 entry at 0xfda95, last bus=1 Setting up standard PCI resources ACPI: Subsystem revision 20060127 evgpeblk-0941 [06] ev_create_gpe_block : GPE 00 to 0F [_GPE] 2 regs on int 0x9 evgpeblk-0941 [06] ev_create_gpe_block : GPE 10 to 1F [_GPE] 2 regs on int 0x9 evgpeblk-1037 [05] ev_initialize_gpe_bloc: Found 4 Wake, Enabled 0 Runtime GPEs in this block evgpeblk-1037 [05] ev_initialize_gpe_bloc: Found 1 Wake, Enabled 0 Runtime GPEs in this block Completing Region/Field/Buffer/Package initialization:.................................................................................... Initialized 22/22 Regions 17/17 Fields 34/34 Buffers 11/11 Packages (457 nodes) Executing all Device _STA and_INI methods:........................................ 40 Devices found - executed 0 _STA, 2 _INI methods ACPI: Interpreter enabled ACPI: Using PIC for interrupt routing ACPI: PCI Root Bridge [PCI0] (0000:00) PCI: Probing PCI hardware (bus 00) Boot video device is 0000:00:01.0 PCI quirk: region 0400-047f claimed by ICH4 ACPI/GPIO/TCO PCI quirk: region 0500-053f claimed by ICH4 GPIO PCI: Transparent bridge - 0000:00:1e.0 ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT] ACPI: Power Resource [FDDP] (off) ACPI: Power Resource [URP1] (off) ACPI: Power Resource [LPTP] (off) ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12) ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 *6 7 9 10 11 12) ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 11 12) *0, disabled. ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 12) ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 *10 11 12) ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11 12) *0, disabled. ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 11 12) *0, disabled. ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 11 12) *0, disabled. Linux Plug and Play Support v0.97 (c) Adam Belay pnp: PnP ACPI init pnp: PnP ACPI: found 11 devices PnPBIOS: Disabled by ACPI PNP PCI: Using ACPI for IRQ routing PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report PCI: Ignore bogus resource 6 [0:0] of 0000:00:01.0 PCI: Bridge: 0000:00:1e.0 IO window: d000-dfff MEM window: ff800000-ff8fffff PREFETCH window: f6a00000-f6afffff PCI: Setting latency timer of device 0000:00:1e.0 to 64 NET: Registered protocol family 2 IP route cache hash table entries: 4096 (order: 2, 16384 bytes) TCP established hash table entries: 16384 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes) TCP: Hash tables configured (established 16384 bind 8192) TCP reno registered VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Initializing Cryptographic API io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered isapnp: Scanning for PnP cards... isapnp: No Plug & Play device found Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12 serio: i8042 AUX port at 0x60,0x64 irq 12 serio: i8042 KBD port at 0x60,0x64 irq 1 TCP bic registered NET: Registered protocol family 8 NET: Registered protocol family 20 Using IPI Shortcut mode ACPI wakeup devices: SBTN PCI1 SBRG UAR1 USB AC9 SMB ACPI: (supports S0 S1 S3 S4 S5) RAMDISK: cramfs filesystem found at block 0 RAMDISK: Loading 4380KiB [1 disk] into ram disk... done. VFS: Mounted root (cramfs filesystem) readonly. Freeing unused kernel memory: 160k freed input: AT Translated Set 2 keyboard as /class/input/input0 NET: Registered protocol family 1 Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx ICH2: IDE controller at PCI slot 0000:00:1f.1 ICH2: chipset revision 2 ICH2: not 100% native mode: will probe irqs later ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio Probing IDE interface ide0... hda: LG CD-RW CED-8120B, ATAPI CD/DVD-ROM drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 Probing IDE interface ide1... hdc: WDC WD400BB-53AUA1, ATA DISK drive ide1 at 0x170-0x177,0x376 on irq 15 hdc: max request size: 128KiB hdc: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100) hdc: cache flushes not supported hdc: hdc1 hdc2 < hdc5 hdc6 hdc7 hdc8 hdc9 > 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. EXT3-fs: mounted filesystem with ordered data mode. Adding 440960k swap on /dev/hdc5. Priority:-1 extents:1 across:440960k EXT3 FS on hdc1, internal journal Generic RTC Driver v1.07 usbcore: registered new driver usbfs usbcore: registered new driver hub usbcore: registered new driver usbkbd drivers/usb/input/usbkbd.c: :USB HID Boot Protocol keyboard driver mice: PS/2 mouse device common for all mice kjournald starting. Commit interval 5 seconds EXT3 FS on hdc7, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hdc8, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on hdc6, internal journal EXT3-fs: mounted filesystem with ordered data mode. Linux agpgart interface v0.101 (c) Dave Jones USB Universal Host Controller Interface driver v3.0 ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 9 PCI: setting IRQ 9 as level-triggered ACPI: PCI Interrupt 0000:00:1f.2[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9 PCI: Setting latency timer of device 0000:00:1f.2 to 64 uhci_hcd 0000:00:1f.2: UHCI Host Controller uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1 uhci_hcd 0000:00:1f.2: irq 9, io base 0x0000ef80 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 6 PCI: setting IRQ 6 as level-triggered ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 6 (level, low) -> IRQ 6 PCI: Setting latency timer of device 0000:00:1f.5 to 64 intel8x0_measure_ac97_clock: measured 55579 usecs intel8x0: clocking to 48000 e100: Intel(R) PRO/100 Network Driver, 3.5.10-k2-NAPI e100: Copyright(c) 1999-2005 Intel Corporation ACPI: PCI Interrupt Link [LNKE] enabled at IRQ 10 PCI: setting IRQ 10 as level-triggered ACPI: PCI Interrupt 0000:01:08.0[A] -> Link [LNKE] -> GSI 10 (level, low) -> IRQ 10 e100: eth0: e100_probe: addr 0xff8ff000, irq 10, MAC addr 00:03:47:7C:31:EB e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex NET: Registered protocol family 17 NET: Registered protocol family 10 lo: Disabled Privacy Extensions IPv6 over IPv4 tunneling driver ACPI: Power Button (FF) [PWRF] ACPI: Sleep Button (CM) [SBTN] eth0: no IPv6 routers present lspci -vv : 0000:00:00.0 Host bridge: Intel Corp. 82810E DC-133 GMCH [Graphics Memory Controller Hub] (rev 03) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- Latency: 0 0000:00:01.0 VGA compatible controller: Intel Corp. 82810E DC-133 CGC [Chipset Graphics Controller] (rev 03) (prog-if 00 [VGA]) Subsystem: Gateway 2000: Unknown device 1600 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 Interrupt: pin A routed to IRQ 11 Region 0: Memory at f8000000 (32-bit, prefetchable) [size=64M] Region 1: Memory at ffa80000 (32-bit, non-prefetchable) [size=512K] Capabilities: [dc] Power Management version 1 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev 02) (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=64 I/O behind bridge: 0000d000-0000dfff Memory behind bridge: ff800000-ff8fffff Prefetchable memory behind bridge: f6a00000-f6afffff BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B- 0000:00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 02) 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 0000:00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 02) (prog-if 80 [Master]) Subsystem: Intel Corp.: Unknown device 4342 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 Region 4: I/O ports at ffa0 [size=16] 0000:00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 02) (prog-if 00 [UHCI]) Subsystem: Intel Corp.: Unknown device 4342 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 Interrupt: pin D routed to IRQ 9 Region 4: I/O ports at ef80 [size=32] 0000:00:1f.3 SMBus: Intel Corp. 82801BA/BAM SMBus (rev 02) Subsystem: Intel Corp.: Unknown device 4342 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- Interrupt: pin B routed to IRQ 6 Region 4: I/O ports at efa0 [size=16] 0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801BA/BAM AC'97 Audio (rev 02) Subsystem: Gateway 2000: Unknown device 1600 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 Interrupt: pin B routed to IRQ 6 Region 0: I/O ports at e800 [size=256] Region 1: I/O ports at ef00 [size=64] 0000:01:08.0 Ethernet controller: Intel Corp. 82801BA/BAM/CA/CAM Ethernet Controller (rev 01) Subsystem: Intel Corp. EtherExpress PRO/100 VE 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: 64 (2000ns min, 14000ns max), Cache Line Size: 0x08 (32 bytes) Interrupt: pin A routed to IRQ 10 Region 0: Memory at ff8ff000 (32-bit, non-prefetchable) [size=4K] Region 1: I/O ports at df00 [size=64] 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- cat /proc/interrupts: CPU0 0: 442299 XT-PIC timer 1: 8 XT-PIC i8042 2: 0 XT-PIC cascade 6: 0 XT-PIC Intel 82801BA-ICH2 9: 0 XT-PIC acpi, uhci_hcd:usb1 10: 3107 XT-PIC eth0 14: 0 XT-PIC ide0 15: 2282 XT-PIC ide1 NMI: 0 ERR: 0
>on receive the packet, messages show up on screen is: >Intel Machine check architecture supported >BUG: soft lockup dected on CPU#0 >ACPI Exeception(evgpe-0678) >AE_NO_MEMORY unable to queue handler for GPE[B]... Sounds interesting. Can you give the full log? A photo of the screen is good enough.
Created attachment 8612 [details] screen0 on wake on lan event on receiving wake on LAN magic packet: screen0 show up after a while(about 5 seconds) screen2 show up after about 1 minute screen3 show up(keep printing the messages) On power button screen-powerbutton show up then after about 5 second, system is back to normal.
Created attachment 8613 [details] screen1 on wake on lan event
Created attachment 8614 [details] screen2 on wake on lan event
Created attachment 8615 [details] screen on power button event
2.6.18-rc2 fixed the 'wrong open interrupt' bug, which should fix the softlockup issue. For the GPE 0xB issue, I guess 2.6.18-rc2 also could fix it. Can you try 2.6.18-rc2?
I just tried 2.6.18-rc2. this time, on receiving the magic packet, the only message show up on screen is: inu and the machine is dead. Wake on power button and keyboard works fine as previous version.
>inu This means CPU already goes into protected mode. Can you change printk level and retry? There might be other info hidden. echo "7 4 1 6" > /proc/sys/kernel/printk
changed printk level by echo "7 4 1 6" > /proc/sys/kernel/printk and retry, still no more message showed up on screen. One thing to mention is when I execute command: cat /proc/acpi/wakeup output is: Device Sleep state Status SBTN 4 * enabled PCI1 4 enabled SBRG 4 enabled UAR1 4 disabled USB 4 disabled AC9 4 disabled SMB 4 disabled The sleep state looks not so right. Sleep state 3 is not in the list. However, the manchine respond to Wake on LAN event from suspend to ram only after device PCI1 is enabled. Another thing to memtion is that Wake on lAN works if the machine is in "Soft Off" state by command: shutdown -h now
>The sleep state looks not so right. Sleep state 3 is not in the list. Yes, if it can wakeup system from S4, it also could from S3. Can you enable NMI watchdog in the system? hopefully watchdog could print some more info. There is a similar bug report against 2.6.18-rc2 (resume hang), but I couldn't reproduce the bug here.
I tried nmi_watchdog=1 and nmi_watchdog=2 as kernel parameter, In both cases, NMI value in /proc/interrupts is 0. Does that mean I cann't enable NMI watchdog in the system. I also tried kernel 2.6.17 by adding line "#define DEBUG" in driver/base/sys.c according to instructions in bug 6450. This time more information is printed on screen(see new attachment), I wonder if this should help.
Created attachment 8632 [details] screen0 with DEBUG info on wake on lan event
Created attachment 8633 [details] screen1 with DEBUG info on wake on lan event
>Does that mean I cann't enable NMI watchdog in the system. You haven't local APIC enabled, so no NMI watchdog. The new log looks very like Bug 6450. I'm wondering if disabling softlockup has any difference.
I have test 2.6.18-rc2 with NMI watchdog enabled. No more message is showed up on screen on wake on LAN event, that is, the only message showed up on screen is: inu. > I'm wondering if disabling softlockup has any difference. Does that mean "make menuconfig" and exclude "Detect Soft Lockups" in "Kernel debugging". I just test this and it didn't make any difference.
please try this debug patch to test wake on lan. From the bug description and the screen message, this problem is likely relative to PCI1 GPE storm. diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 8bb43ca..092a878 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c @@ -559,11 +559,12 @@ acpi_status acpi_leave_sleep_state(u8 sl } acpi_gbl_system_awake_and_running = TRUE; +#if 0 /*YU debug*/ status = acpi_hw_enable_all_runtime_gpes(); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - +#endif /* Enable power button */ (void)
just test debug patch, wake on lan still hangs:(
Did you see the flood of "Unalbe to queue handler for GPE .." message on screen?
>Did you see the flood of "Unalbe to queue handler for GPE .." message on screen? for kernel 2.6.18-rc2, the only message showed on screen is "inu" for kernel 2.6.17, I did see the flood of "Unalbe to queue handler for GPE .." message on screen before I applied this patch. Since this flood of message show up more than one minute after wake on lan event, I didn't wait for so long today(I turned the machice off when it was at screen1 and went home:) ). I will test it tommorow to see if this flood of message still shows after the patch.
The flood of "Unalbe to queue handler for GPE .." message can be seen in 2.6.17 after the debug patch.
Hmm, let's debug further, please try this: diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 62ce87d..2838e6f 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c @@ -113,6 +113,8 @@ static int acpi_pm_enter(suspend_state_t if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) acpi_clear_event(ACPI_EVENT_POWER_BUTTON); + if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) + acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block); local_irq_restore(flags); printk(KERN_DEBUG "Back to C!\n");
just tried second patch. still hangs. I don't know if this provides more information: sometimes when I use command "echo -n mem > /sys/power/state", the machine suspends, but will resume instantly. But if I use command "echo SBTN > /proc/acpi/wakeup" to disable Device SBTN, suspend works fine.(this occurs both before and after the patch)
S3 resume: Wake On LAN now works. This is indeed caused by GPE storm. what I did is: modified drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) .... case ACPI_GPE_TYPE_WAKE: ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); + status = acpi_hw_write_gpe_enable_reg(gpe_event_info); break; .... acpi_ev_disable_gpe is called in acpi_ev_gpe_dispatch to disable gpe so that it doesn't keep firing before the method has a chance to run. However, originally only ACPI_CLEAR_BIT is called, which doesn't prevent the gpe from firing. I also notice a comment in acpi_ev_disable_gpe which says: /* Mark wake-disabled or HW disable, or both */ I am wondering what's the concern that we need only do the Mark but not the HW disable as well.
Reassign the issue to bob, as this is the acpica code. Bob, is it possible we disable GPE too late in resume? acpi_leave_sleep_state will disable wake GPE, but it's called very later. Before it's called, we already did many things like restore devices' state.
case ACPI_GPE_TYPE_WAKE: The GPE masks are setup so that only "runtime" GPEs are enabled at runtime. A "Wake" GPE should always be disabled at runtime, and only enabled as the system is about to sleep. If the wake GPEs are not getting disabled when the system awakes, this could be a bug.
I'm thinking that perhaps it would make sense to disable *all* GPEs at the moment we get a wake GPE (all wake and runtime GPEs). Please try this patch below in acpi_ev_gpe_dispatch: /* Save current system state */ if (acpi_gbl_system_awake_and_running) { ACPI_SET_BIT (gpe_event_info->flags, ACPI_GPE_SYSTEM_RUNNING); } else { ACPI_CLEAR_BIT (gpe_event_info->flags, ACPI_GPE_SYSTEM_RUNNING); + + /* + * We just woke up because of a wake GPE. Disable any further GPEs + * (wake and runtime) until we are fully up and running. + */ + (void) acpi_hw_disable_all_gpes (); }
The code in #26 was released in ACPICA version 20060831
The good news is that ACPICA 20060831 shipped in Linux-2.6.21-rc1 the bad news is that we had to revert the code in comment #26 to make suspend/resume work again.
Created attachment 10651 [details] patch vs 2.6.21-rc1 fixing resume
Please re-open if this is still a problem in linux-2.6.22.stable or later.