All of lore.kernel.org
 help / color / mirror / Atom feed
* Suspend problems in 2.6.31-rc6
@ 2009-08-17 15:11 Alan Stern
  2009-08-17 18:28 ` Rafael J. Wysocki
  0 siblings, 1 reply; 33+ messages in thread
From: Alan Stern @ 2009-08-17 15:11 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg KH, Linux-pm mailing list, Alan Cox

Rafael:

I just tried testing system suspend under vanilla 2.6.31-rc6.  I booted 
with no_console_suspend and init=/bin/bash, then did:

	cd /sys/power
	echo devices >pm_test
	echo mem >state

After the usual messages about freezing tasks, suspending devices, and
the 5-second debugging delay, nothing happened.  The system did not
restart.  It wasn't dead (it responded to Alt-SysRq key combinations)  
but it wasn't working.  This was on an x86-32 machine.

It doesn't appear to be a recent regression because 2.6.30 behaves the
same way.

With the gregkh-all-2.6.31-rc6 patch set, things are even worse.  After 
switching to the new VT, nothing appears on the screen -- not even the 
messages about freezing tasks.  I suspect there's something wrong with 
the new TTY changes but have not tried to track it down.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 15:11 Suspend problems in 2.6.31-rc6 Alan Stern
@ 2009-08-17 18:28 ` Rafael J. Wysocki
  2009-08-17 20:53   ` Alan Stern
  0 siblings, 1 reply; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-17 18:28 UTC (permalink / raw)
  To: Alan Stern; +Cc: Greg KH, Linux-pm mailing list, Alan Cox

On Monday 17 August 2009, Alan Stern wrote:
> Rafael:

Hi,

> I just tried testing system suspend under vanilla 2.6.31-rc6.  I booted 
> with no_console_suspend and init=/bin/bash, then did:
> 
> 	cd /sys/power
> 	echo devices >pm_test
> 	echo mem >state
> 
> After the usual messages about freezing tasks, suspending devices, and
> the 5-second debugging delay, nothing happened.  The system did not
> restart.  It wasn't dead (it responded to Alt-SysRq key combinations)  
> but it wasn't working.  This was on an x86-32 machine.
> 
> It doesn't appear to be a recent regression because 2.6.30 behaves the
> same way.
> 
> With the gregkh-all-2.6.31-rc6 patch set, things are even worse.  After 
> switching to the new VT, nothing appears on the screen -- not even the 
> messages about freezing tasks.  I suspect there's something wrong with 
> the new TTY changes but have not tried to track it down.

I wonder where exactly it hangs.

Can you rebuild the kernel with CONFIG_PM_VERBOSE set and
repeat the test with 'echo 8 > /proc/sys/kernel/printk' before the last
command?

Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 18:28 ` Rafael J. Wysocki
@ 2009-08-17 20:53   ` Alan Stern
  2009-08-17 21:14     ` Greg KH
                       ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Alan Stern @ 2009-08-17 20:53 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg KH, Linux-pm mailing list, Alan Cox

On Mon, 17 Aug 2009, Rafael J. Wysocki wrote:

> I wonder where exactly it hangs.
> 
> Can you rebuild the kernel with CONFIG_PM_VERBOSE set and
> repeat the test with 'echo 8 > /proc/sys/kernel/printk' before the last
> command?

That was an interesting experience.  I booted with a serial console in 
addition to the VT console.  Here's the recorded log of the boot-up:

[    0.000000] Linux version 2.6.31-rc6 (stern@iolanthe.rowland.org) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #2 SMP PREEMPT Mon Aug 17 15:44:09 EDT 2009
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   NSC Geode by NSC
[    0.000000]   Cyrix CyrixInstead
[    0.000000]   Centaur CentaurHauls
[    0.000000]   Transmeta GenuineTMx86
[    0.000000]   Transmeta TransmetaCPU
[    0.000000]   UMC UMC UMC UMC
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000002fe40000 (usable)
[    0.000000]  BIOS-e820: 000000002fe40000 - 000000002fe50000 (ACPI data)
[    0.000000]  BIOS-e820: 000000002fe50000 - 000000002ff00000 (ACPI NVS)
[    0.000000] console [earlyser0] enabled
[    0.000000] DMI 2.3 present.
[    0.000000] last_pfn = 0x2fe40 max_arch_pfn = 0x100000
[    0.000000] init_memory_mapping: 0000000000000000-000000002fe40000
[    0.000000] RAMDISK: 2fb31000 - 2fe2fafc
[    0.000000] ACPI: RSDP 000f7300 00014 (v00 ACPIAM)
[    0.000000] ACPI: RSDT 2fe40000 00030 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
[    0.000000] ACPI: FACP 2fe40200 00081 (v02 INTEL  D845GBV2 20030714 MSFT 00000097)
[    0.000000] ACPI: DSDT 2fe40370 03FD7 (v01 INTEL  D845GBV2 0000010A MSFT 0100000D)
[    0.000000] ACPI: FACS 2fe50000 00040
[    0.000000] ACPI: APIC 2fe40300 00068 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
[    0.000000] ACPI: ASF! 2fe44350 00084 (v16 AMIASF I845GASF 00000001 MSFT 0100000D)
[    0.000000] 766MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 2fe40000
[    0.000000]   low ram: 0 - 2fe40000
[    0.000000]   node 0 low ram: 00000000 - 2fe40000
[    0.000000]   node 0 bootmap 00008000 - 0000dfc8
[    0.000000] (9 early reservations) ==> bootmem [0000000000 - 002fe40000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
[    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
[    0.000000]   #3 [0001000000 - 0001848fe4]    TEXT DATA BSS ==> [0001000000 - 0001848fe4]
[    0.000000]   #4 [002fb31000 - 002fe2fafc]          RAMDISK ==> [002fb31000 - 002fe2fafc]
[    0.000000]   #5 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
[    0.000000]   #6 [0001849000 - 0001850178]              BRK ==> [0001849000 - 0001850178]
[    0.000000]   #7 [0000007000 - 0000008000]          PGTABLE ==> [0000007000 - 0000008000]
[    0.000000]   #8 [0000008000 - 000000e000]          BOOTMAP ==> [0000008000 - 000000e000]
[    0.000000] found SMP MP-table at [c00ff780] ff780
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   Normal   0x00001000 -> 0x0002fe40
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[2] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x0000009f
[    0.000000]     0: 0x00000100 -> 0x0002fe40
[    0.000000] Using APIC driver default
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x81] disabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] SMP: Allowing 2 CPUs, 1 hotplug CPUs
[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
[    0.000000] Allocating PCI resources starting at 2ff00000 (gap: 2ff00000:d0100000)
[    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 13 pages at c221b000, static data 30620 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193572
[    0.000000] Kernel command line: ro root=UUID=38b19631-670b-4ec8-be1a-a65458d523ae resume=/dev/hda7 console=ttyS0,115200 console=tty0 earlyprintk=serial,ttyS0,115200 no_console_suspend init=/bin/bash
[    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Enabling fast FPU save and restore... done.
[    0.000000] Enabling unmasked SIMD FPU exception support... done.
[    0.000000] Initializing CPU#0
[    0.000000] Memory: 761564k/784640k available (1816k kernel code, 22528k reserved, 1141k data, 264k init, 0k highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xfff1f000 - 0xfffff000   ( 896 kB)
[    0.000000]     vmalloc : 0xf0640000 - 0xfff1d000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xefe40000   ( 766 MB)
[    0.000000]       .init : 0xc12e8000 - 0xc132a000   ( 264 kB)
[    0.000000]       .data : 0xc11c61db - 0xc12e3730   (1141 kB)
[    0.000000]       .text : 0xc1000000 - 0xc11c61db   (1816 kB)
[    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] NR_IRQS:512
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 1799.633 MHz processor.
[    0.001874] Console: colour VGA+ 80x25
[    0.004000] console handover: boot [earlyser0] -> real [tty0]
[    0.000000] Linux version 2.6.31-rc6 (stern@iolanthe.rowland.org) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #2 SMP PREEMPT Mon Aug 17 15:44:09 EDT 2009
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   NSC Geode by NSC
[    0.000000]   Cyrix CyrixInstead
[    0.000000]   Centaur CentaurHauls
[    0.000000]   Transmeta GenuineTMx86
[    0.000000]   Transmeta TransmetaCPU
[    0.000000]   UMC UMC UMC UMC
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000002fe40000 (usable)
[    0.000000]  BIOS-e820: 000000002fe40000 - 000000002fe50000 (ACPI data)
[    0.000000]  BIOS-e820: 000000002fe50000 - 000000002ff00000 (ACPI NVS)
[    0.000000] console [earlyser0] enabled
[    0.000000] DMI 2.3 present.
[    0.000000] last_pfn = 0x2fe40 max_arch_pfn = 0x100000
[    0.000000] init_memory_mapping: 0000000000000000-000000002fe40000
[    0.000000] RAMDISK: 2fb31000 - 2fe2fafc
[    0.000000] ACPI: RSDP 000f7300 00014 (v00 ACPIAM)
[    0.000000] ACPI: RSDT 2fe40000 00030 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
[    0.000000] ACPI: FACP 2fe40200 00081 (v02 INTEL  D845GBV2 20030714 MSFT 00000097)
[    0.000000] ACPI: DSDT 2fe40370 03FD7 (v01 INTEL  D845GBV2 0000010A MSFT 0100000D)
[    0.000000] ACPI: FACS 2fe50000 00040
[    0.000000] ACPI: APIC 2fe40300 00068 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
[    0.000000] ACPI: ASF! 2fe44350 00084 (v16 AMIASF I845GASF 00000001 MSFT 0100000D)
[    0.000000] 766MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 2fe40000
[    0.000000]   low ram: 0 - 2fe40000
[    0.000000]   node 0 low ram: 00000000 - 2fe40000
[    0.000000]   node 0 bootmap 00008000 - 0000dfc8
[    0.000000] (9 early reservations) ==> bootmem [0000000000 - 002fe40000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
[    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
[    0.000000]   #3 [0001000000 - 0001848fe4]    TEXT DATA BSS ==> [0001000000 - 0001848fe4]
[    0.000000]   #4 [002fb31000 - 002fe2fafc]          RAMDISK ==> [002fb31000 - 002fe2fafc]
[    0.000000]   #5 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
[    0.000000]   #6 [0001849000 - 0001850178]              BRK ==> [0001849000 - 0001850178]
[    0.000000]   #7 [0000007000 - 0000008000]          PGTABLE ==> [0000007000 - 0000008000]
[    0.000000]   #8 [0000008000 - 000000e000]          BOOTMAP ==> [0000008000 - 000000e000]
[    0.000000] found SMP MP-table at [c00ff780] ff780
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   Normal   0x00001000 -> 0x0002fe40
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[2] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x0000009f
[    0.000000]     0: 0x00000100 -> 0x0002fe40
[    0.000000] Using APIC driver default
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x81] disabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] SMP: Allowing 2 CPUs, 1 hotplug CPUs
[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
[    0.000000] Allocating PCI resources starting at 2ff00000 (gap: 2ff00000:d0100000)
[    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 13 pages at c221b000, static data 30620 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193572
[    0.000000] Kernel command line: ro root=UUID=38b19631-670b-4ec8-be1a-a65458d523ae resume=/dev/hda7 console=ttyS0,115200 console=tty0 earlyprintk=serial,ttyS0,115200 no_console_suspend init=/bin/bash
[    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Enabling fast FPU save and restore... done.
[    0.000000] Enabling unmasked SIMD FPU exception support... done.
[    0.000000] Initializing CPU#0
[    0.000000] Memory: 761564k/784640k available (1816k kernel code, 22528k reserved, 1141k data, 264k init, 0k highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xfff1f000 - 0xfffff000   ( 896 kB)
[    0.000000]     vmalloc : 0xf0640000 - 0xfff1d000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xefe40000   ( 766 MB)
[    0.000000]       .init : 0xc12e8000 - 0xc132a000   ( 264 kB)
[    0.000000]       .data : 0xc11c61db - 0xc12e3730   (1141 kB)
[    0.000000]       .text : 0xc1000000 - 0xc11c61db   (1816 kB)
[    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] NR_IRQS:512
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 1799.633 MHz processor.
[    0.001874] Console: colour VGA+ 80x25
[    0.004000] console handover: boot [earlyser0] -> real [tty0]
[    0.004000] console [ttyS0] enabled
[    0.004000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.004000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.004000] ... MAX_LOCK_DEPTH:          48
[    0.004000] ... MAX_LOCKDEP_KEYS:        8191
[    0.004000] ... CLASSHASH_SIZE:          4096
[    0.004000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.004000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.004000] ... CHAINHASH_SIZE:          16384
[    0.004000]  memory used by lock dependency info: 3487 kB
[    0.004000]  per task-struct memory footprint: 1152 bytes
[    0.004037] Calibrating delay loop (skipped), value calculated using timer frequency.. 3599.26 BogoMIPS (lpj=7198532)
[    0.011166] Mount-cache hash table entries: 512
[    0.018020] CPU: Trace cache: 12K uops, L1 D cache: 8K
[    0.021658] CPU: L2 cache: 512K
[    0.024008] CPU: Hyper-Threading is disabled
[    0.028011] mce: CPU supports 4 MCE banks
[    0.032061] Checking 'hlt' instruction... OK.
[    0.052910] lockdep: fixing up alternatives.
[    0.056009] SMP alternatives: switching to UP code
[    0.067195] ACPI: Core revision 20090521
[    0.105689] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.151484] CPU0: Intel(R) Pentium(R) 4 CPU 1.80GHz stepping 07
[    0.160001] Brought up 1 CPUs
[    0.160001] Total of 1 processors activated (3599.26 BogoMIPS).
[    0.166324] NET: Registered protocol family 16
[    0.173435] ACPI: bus type pci registered
[    0.176897] PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=1
[    0.180059] PCI: Using configuration type 1 for base access
[    0.198601] bio: create slab <bio-0> at 0
[    0.255019] ACPI: Interpreter enabled
[    0.256016] ACPI: (supports S0 S1 S3 S4 S5)
[    0.261893] ACPI: Using IOAPIC for interrupt routing
[    0.311020] ACPI: Power Resource [URP1] (off)
[    0.312233] ACPI: Power Resource [FDDP] (off)
[    0.316316] ACPI: Power Resource [LPTP] (off)
[    0.321187] ACPI: PCI Root Bridge [PCI0] (0000:00)
[    0.328848] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
[    0.332027] pci 0000:00:1d.7: PME# disabled
[    0.336143] * The chipset may have PM-Timer Bug. Due to workarounds for a bug,
[    0.336146] * this clock source is slow. If you are sure your timer does not have
[    0.336149] * this bug, please use "acpi_pm_good" to disable the workaround
[    0.340095] pci 0000:00:1f.0: quirk: region 0400-047f claimed by ICH4 ACPI/GPIO/TCO
[    0.344012] pci 0000:00:1f.0: quirk: region 0480-04bf claimed by ICH4 GPIO
[    0.348506] pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
[    0.352013] pci 0000:00:1f.5: PME# disabled
[    0.356205] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
[    0.360012] pci 0000:01:00.0: PME# disabled
[    0.364182] pci 0000:01:00.1: PME# supported from D0 D1 D2 D3hot
[    0.368012] pci 0000:01:00.1: PME# disabled
[    0.372183] pci 0000:01:00.2: PME# supported from D0 D1 D2 D3hot
[    0.376012] pci 0000:01:00.2: PME# disabled
[    0.380524] pci 0000:01:01.2: PME# supported from D0 D3hot
[    0.384012] pci 0000:01:01.2: PME# disabled
[    0.388341] pci 0000:01:08.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.392012] pci 0000:01:08.0: PME# disabled
[    0.396084] pci 0000:00:1e.0: transparent bridge
[    0.422147] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[    0.430851] ACPI: PCI Interrupt Link [LNKB] (IRQs *3 4 5 6 7 9 10 11 12 14 15)
[    0.439806] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)
[    0.444759] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)
[    0.453153] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[    0.462070] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[    0.470773] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[    0.479435] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
[    0.485472] PCI: Using ACPI for IRQ routing
[    0.492311] pnp: PnP ACPI init
[    0.495524] ACPI: bus type pnp registered
[    0.522218] pnp: PnP ACPI: found 14 devices
[    0.526503] ACPI: ACPI bus type pnp unregistered
[    0.532161] system 00:05: ioport range 0x4d0-0x4d1 has been reserved
[    0.538638] system 00:0c: ioport range 0x400-0x47f has been reserved
[    0.545085] system 00:0c: ioport range 0x680-0x6ff has been reserved
[    0.551533] system 00:0c: ioport range 0x480-0x4bf has been reserved
[    0.558178] system 00:0c: iomem range 0xfec00000-0xfec00fff could not be reserved
[    0.565796] system 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
[    0.573051] system 00:0d: iomem range 0x0-0x9ffff could not be reserved
[    0.579764] system 00:0d: iomem range 0xc0000-0xdffff could not be reserved
[    0.586823] system 00:0d: iomem range 0xe0000-0xfffff could not be reserved
[    0.593885] system 00:0d: iomem range 0x100000-0x2fefffff could not be reserved
[    0.639223] pci 0000:00:1e.0: PCI bridge, secondary bus 0000:01
[    0.645241] pci 0000:00:1e.0:   IO window: 0xd000-0xdfff
[    0.650649] pci 0000:00:1e.0:   MEM window: 0xff800000-0xff8fffff
[    0.656834] pci 0000:00:1e.0:   PREFETCH window: 0xe6a00000-0xe6afffff
[    0.663806] NET: Registered protocol family 2
[    0.668830] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.677816] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.686847] TCP bind hash table entries: 65536 (order: 9, 2097152 bytes)
[    0.709925] TCP: Hash tables configured (established 131072 bind 65536)
[    0.716756] TCP reno registered
[    0.720476] NET: Registered protocol family 1
[    0.725945] Trying to unpack rootfs image as initramfs...
[    0.963522] Freeing initrd memory: 3066k freed
[    1.019820] msgmni has been set to 1493
[    1.024409] alg: No test for stdrng (krng)
[    1.028896] io scheduler noop registered
[    1.032909] io scheduler anticipatory registered
[    1.037784] io scheduler deadline registered
[    1.043005] io scheduler cfq registered (default)
[    2.628026] pci 0000:00:1d.7: EHCI: BIOS handoff failed (BIOS bug?) 01010001
[    2.635535] pci 0000:01:08.0: Firmware left e100 interrupts enabled; disabling
[    2.680223] Real Time Clock Driver v1.12b
[    2.685039] Linux agpgart interface v0.103
[    2.689372] agpgart-intel 0000:00:00.0: Intel 830M Chipset
[    2.695334] agpgart-intel 0000:00:00.0: detected 892K stolen memory
[    2.704642] agpgart-intel 0000:00:00.0: AGP aperture is 128M @ 0xf0000000
[    2.712241] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.719398] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    2.729430] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    2.749711] brd: module loaded
[    2.752875] Uniform Multi-Platform E-IDE driver
[    2.759073] piix 0000:00:1f.1: IDE controller (0x8086:0x24cb rev 0x02)
[    2.765724] PIIX_IDE 0000:00:1f.1: enabling device (0005 -> 0007)
[    2.771992] PIIX_IDE 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    2.779459] piix 0000:00:1f.1: not 100% native mode: will probe irqs later
[    2.786433]     ide0: BM-DMA at 0xffa0-0xffa7
[    2.790993]     ide1: BM-DMA at 0xffa8-0xffaf
[    3.084274] hda: ST380011A, ATA DISK drive
[    3.424027] hdb: Maxtor 6Y080P0, ATA DISK drive
[    3.429511] hda: UDMA/100 mode selected
[    3.433842] hdb: UDMA/100 mode selected
[    4.172272] hdc: PLEXTOR DVDR PX-740A, ATAPI CD/DVD-ROM drive
[    4.848864] hdc: UDMA/33 mode selected
[    4.853099] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[    4.858158] ide1 at 0x170-0x177,0x376 on irq 15
[    4.864920] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
[    4.874833] ide-gd driver 1.18
[    4.878204] hda: max request size: 512KiB
[    4.892503] hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63
[    4.900328] hda: cache flushes supported
[    4.904796]  hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 > hda4
[    5.003502] hdb: max request size: 128KiB
[    5.016666] hdb: 160086528 sectors (81964 MB) w/7936KiB Cache, CHS=65535/16/63
[    5.024297] hdb: cache flushes supported
[    5.028551]  hdb: hdb1 hdb2 hdb3 hdb4 < hdb5 hdb6 hdb7 hdb8 hdb9 >
[    5.101170] ide-cd driver 5.00
[    5.106018] ide-cd: hdc: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
[    5.113647] Uniform CD-ROM driver Revision: 3.20
[    5.131270] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
[    5.142474] serio: i8042 KBD port at 0x60,0x64 irq 1
[    5.147626] serio: i8042 AUX port at 0x60,0x64 irq 12
[    5.153721] mice: PS/2 mouse device common for all mice
[    5.160998] cpuidle: using governor ladder
[    5.165411] cpuidle: using governor menu
[    5.170726] TCP cubic registered
[    5.174050] NET: Registered protocol family 17
[    5.178694] Using IPI No-Shortcut mode
[    5.185668] Freeing unused kernel memory: 264k freed
[    5.191539] Write protecting the kernel text: 1820k
[    5.196823] Write protecting the kernel read-only data: 888k
[    5.509740] input: PS2++ Logitech Mouse as /devices/platform/i8042/serio1/input/input0
[    5.560195] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[    8.394440] kjournald starting.  Commit interval 5 seconds
[    8.400608] EXT3-fs: mounted filesystem with writeback data mode.

Here's where I changed the log level and began the suspend:

[   11.480553] SysRq : Changing Loglevel
[   11.484004] Loglevel set to 8
[   24.279093] PM: Syncing filesystems ... done.
[   24.285068] PM: Preparing system for mem sleep
[   24.290143] PM: Adding info for No Bus:vcs63
[   24.290700] PM: Adding info for No Bus:vcsa63
[   24.305317] Freezing user space processes ... (elapsed 0.00 seconds) done.
[   24.331507] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
[   24.339078] PM: Entering mem sleep
[   24.342844] agpgart-intel 0000:00:00.0: preparing suspend
[   24.348404] pci 0000:00:02.0: preparing suspend
[   24.352988] pci 0000:00:1d.0: preparing suspend
[   24.357569] pci 0000:00:1d.1: preparing suspend
[   24.362150] pci 0000:00:1d.2: preparing suspend
[   24.366731] pci 0000:00:1d.7: preparing suspend
[   24.371312] pci 0000:00:1e.0: preparing suspend
[   24.375893] pci 0000:00:1f.0: preparing suspend
[   24.380475] PIIX_IDE 0000:00:1f.1: preparing suspend
[   24.385490] pci 0000:00:1f.3: preparing suspend
[   24.390070] pci 0000:00:1f.5: preparing suspend
[   24.394651] pci 0000:01:00.0: preparing suspend
[   24.399232] pci 0000:01:00.1: preparing suspend
[   24.403813] pci 0000:01:00.2: preparing suspend
[   24.408395] pci 0000:01:01.0: preparing suspend
[   24.412976] pci 0000:01:01.1: preparing suspend
[   24.417557] pci 0000:01:01.2: preparing suspend
[   24.422138] pci 0000:01:02.0: preparing suspend
[   24.426719] pci 0000:01:08.0: preparing suspend
[   24.431376] platform pcspkr: preparing suspend
[   24.436080] serial8250 serial8250: preparing suspend
[   24.441337] i8042 i8042: preparing suspend
[   24.445577] psmouse serio1: legacy suspend
[   24.856816] atkbd serio0: legacy suspend
[   25.328042] i8042 i8042: suspend
[   25.331538] ide-cdrom 1.0: legacy suspend
[   25.335933] ide-gd 0.1: legacy suspend
[   25.406305] ide-gd 0.0: legacy suspend
[   25.412454] serial8250 serial8250: suspend
[   25.416844] platform pcspkr: suspend
[   25.420534] system 00:0d: legacy suspend
[   25.424567] system 00:0c: legacy suspend
[   25.428595] i8042 aux 00:0b: legacy suspend
[   25.432883] i8042 kbd 00:0a: legacy suspend
[   25.437169] pnp 00:09: legacy suspend
[   25.440923] serial 00:08: legacy suspend

A lot more stuff appeared on the screen here but didn't get sent over
the serial link.  Then after 5 seconds the system did resume.  A lot of
messages about PCI config-space settings appeared on the screen but not
on the serial link.  Then came this -- it did _not_ appear on the
screen:

[   30.497131] serial 00:08: activated
[   30.501039] pnp 00:09: legacy resume
[   30.505030] i8042 kbd 00:0a: legacy resume
[   30.509553] i8042 aux 00:0b: legacy resume
[   30.514075] system 00:0c: legacy resume
[   30.518333] system 00:0d: legacy resume
[   30.522616] platform pcspkr: resume
[   30.526714] serial8250 serial8250: resume
[   30.531260] ide-gd 0.0: legacy resume
[   30.537364] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[   33.776044] hda: UDMA/100 mode selected
[   33.780946] ide-gd 0.1: legacy resume
[   33.787040] hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[   37.052038] hdb: UDMA/100 mode selected
[   37.056646] ide-cdrom 1.0: legacy resume
[   37.063003] hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[   37.070384] hdc: UDMA/33 mode selected
[   37.075131] i8042 i8042: resume
[   37.079067] atkbd serio0: legacy resume
[   37.083382] psmouse serio1: legacy resume
[   37.087868] i8042 i8042: completing resume
[   37.092576] serial8250 serial8250: completing resume
[   37.098178] platform pcspkr: completing resume
[   37.103122] pci 0000:01:08.0: completing resume
[   37.108093] pci 0000:01:02.0: completing resume
[   37.113054] pci 0000:01:01.2: completing resume
[   37.118016] pci 0000:01:01.1: completing resume
[   37.122978] pci 0000:01:01.0: completing resume
[   37.127940] pci 0000:01:00.2: completing resume
[   37.132902] pci 0000:01:00.1: completing resume
[   37.137864] pci 0000:01:00.0: completing resume
[   37.142825] pci 0000:00:1f.5: completing resume
[   37.147787] pci 0000:00:1f.3: completing resume
[   37.152749] PIIX_IDE 0000:00:1f.1: completing resume
[   37.158155] pci 0000:00:1f.0: completing resume
[   37.163117] pci 0000:00:1e.0: completing resume
[   37.168079] pci 0000:00:1d.7: completing resume
[   37.173041] pci 0000:00:1d.2: completing resume
[   37.178003] pci 0000:00:1d.1: completing resume
[   37.182964] pci 0000:00:1d.0: completing resume
[   37.187926] pci 0000:00:02.0: completing resume
[   37.192889] agpgart-intel 0000:00:00.0: completing resume
[   37.198935] PM: Finishing wakeup.
[   37.202656] Restarting tasks ... done.

As far as I can tell, the system was running again.  But the screen was
still set to the alternate VT!  There was no response to normal
keystrokes or Alt-F1.  But it did respond to Alt-SysRq-h:

[   46.826069] SysRq : HELP : loglevel(0-9) reBoot Crash show-all-locks(D) terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) 

(That's from the serial log; it wasn't on the screen.)

It appears that some part of the resume messed up the VT console
driver.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 20:53   ` Alan Stern
@ 2009-08-17 21:14     ` Greg KH
  2009-08-17 21:15       ` Greg KH
  2009-08-17 21:21     ` Rafael J. Wysocki
  2009-08-18 16:07     ` Alan Stern
  2 siblings, 1 reply; 33+ messages in thread
From: Greg KH @ 2009-08-17 21:14 UTC (permalink / raw)
  To: Alan Stern; +Cc: Linux-pm mailing list, Jiri Slaby, Alan Cox

On Mon, Aug 17, 2009 at 04:53:46PM -0400, Alan Stern wrote:
> On Mon, 17 Aug 2009, Rafael J. Wysocki wrote:
> 
> > I wonder where exactly it hangs.
> > 
> > Can you rebuild the kernel with CONFIG_PM_VERBOSE set and
> > repeat the test with 'echo 8 > /proc/sys/kernel/printk' before the last
> > command?
> 
> That was an interesting experience.  I booted with a serial console in 
> addition to the VT console.  Here's the recorded log of the boot-up:
> 
> [    0.000000] Linux version 2.6.31-rc6 (stern@iolanthe.rowland.org) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #2 SMP PREEMPT Mon Aug 17 15:44:09 EDT 2009
> [    0.000000] KERNEL supported cpus:
> [    0.000000]   Intel GenuineIntel
> [    0.000000]   AMD AuthenticAMD
> [    0.000000]   NSC Geode by NSC
> [    0.000000]   Cyrix CyrixInstead
> [    0.000000]   Centaur CentaurHauls
> [    0.000000]   Transmeta GenuineTMx86
> [    0.000000]   Transmeta TransmetaCPU
> [    0.000000]   UMC UMC UMC UMC
> [    0.000000] BIOS-provided physical RAM map:
> [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> [    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> [    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
> [    0.000000]  BIOS-e820: 0000000000100000 - 000000002fe40000 (usable)
> [    0.000000]  BIOS-e820: 000000002fe40000 - 000000002fe50000 (ACPI data)
> [    0.000000]  BIOS-e820: 000000002fe50000 - 000000002ff00000 (ACPI NVS)
> [    0.000000] console [earlyser0] enabled
> [    0.000000] DMI 2.3 present.
> [    0.000000] last_pfn = 0x2fe40 max_arch_pfn = 0x100000
> [    0.000000] init_memory_mapping: 0000000000000000-000000002fe40000
> [    0.000000] RAMDISK: 2fb31000 - 2fe2fafc
> [    0.000000] ACPI: RSDP 000f7300 00014 (v00 ACPIAM)
> [    0.000000] ACPI: RSDT 2fe40000 00030 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> [    0.000000] ACPI: FACP 2fe40200 00081 (v02 INTEL  D845GBV2 20030714 MSFT 00000097)
> [    0.000000] ACPI: DSDT 2fe40370 03FD7 (v01 INTEL  D845GBV2 0000010A MSFT 0100000D)
> [    0.000000] ACPI: FACS 2fe50000 00040
> [    0.000000] ACPI: APIC 2fe40300 00068 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> [    0.000000] ACPI: ASF! 2fe44350 00084 (v16 AMIASF I845GASF 00000001 MSFT 0100000D)
> [    0.000000] 766MB LOWMEM available.
> [    0.000000]   mapped low ram: 0 - 2fe40000
> [    0.000000]   low ram: 0 - 2fe40000
> [    0.000000]   node 0 low ram: 00000000 - 2fe40000
> [    0.000000]   node 0 bootmap 00008000 - 0000dfc8
> [    0.000000] (9 early reservations) ==> bootmem [0000000000 - 002fe40000]
> [    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
> [    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
> [    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
> [    0.000000]   #3 [0001000000 - 0001848fe4]    TEXT DATA BSS ==> [0001000000 - 0001848fe4]
> [    0.000000]   #4 [002fb31000 - 002fe2fafc]          RAMDISK ==> [002fb31000 - 002fe2fafc]
> [    0.000000]   #5 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
> [    0.000000]   #6 [0001849000 - 0001850178]              BRK ==> [0001849000 - 0001850178]
> [    0.000000]   #7 [0000007000 - 0000008000]          PGTABLE ==> [0000007000 - 0000008000]
> [    0.000000]   #8 [0000008000 - 000000e000]          BOOTMAP ==> [0000008000 - 000000e000]
> [    0.000000] found SMP MP-table at [c00ff780] ff780
> [    0.000000] Zone PFN ranges:
> [    0.000000]   DMA      0x00000000 -> 0x00001000
> [    0.000000]   Normal   0x00001000 -> 0x0002fe40
> [    0.000000] Movable zone start PFN for each node
> [    0.000000] early_node_map[2] active PFN ranges
> [    0.000000]     0: 0x00000000 -> 0x0000009f
> [    0.000000]     0: 0x00000100 -> 0x0002fe40
> [    0.000000] Using APIC driver default
> [    0.000000] ACPI: PM-Timer IO Port: 0x408
> [    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
> [    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x81] disabled)
> [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
> [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
> [    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
> [    0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
> [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
> [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
> [    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
> [    0.000000] Using ACPI (MADT) for SMP configuration information
> [    0.000000] SMP: Allowing 2 CPUs, 1 hotplug CPUs
> [    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
> [    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
> [    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
> [    0.000000] Allocating PCI resources starting at 2ff00000 (gap: 2ff00000:d0100000)
> [    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
> [    0.000000] PERCPU: Embedded 13 pages at c221b000, static data 30620 bytes
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193572
> [    0.000000] Kernel command line: ro root=UUID=38b19631-670b-4ec8-be1a-a65458d523ae resume=/dev/hda7 console=ttyS0,115200 console=tty0 earlyprintk=serial,ttyS0,115200 no_console_suspend init=/bin/bash
> [    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
> [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> [    0.000000] Enabling fast FPU save and restore... done.
> [    0.000000] Enabling unmasked SIMD FPU exception support... done.
> [    0.000000] Initializing CPU#0
> [    0.000000] Memory: 761564k/784640k available (1816k kernel code, 22528k reserved, 1141k data, 264k init, 0k highmem)
> [    0.000000] virtual kernel memory layout:
> [    0.000000]     fixmap  : 0xfff1f000 - 0xfffff000   ( 896 kB)
> [    0.000000]     vmalloc : 0xf0640000 - 0xfff1d000   ( 248 MB)
> [    0.000000]     lowmem  : 0xc0000000 - 0xefe40000   ( 766 MB)
> [    0.000000]       .init : 0xc12e8000 - 0xc132a000   ( 264 kB)
> [    0.000000]       .data : 0xc11c61db - 0xc12e3730   (1141 kB)
> [    0.000000]       .text : 0xc1000000 - 0xc11c61db   (1816 kB)
> [    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
> [    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [    0.000000] NR_IRQS:512
> [    0.000000] Fast TSC calibration using PIT
> [    0.000000] Detected 1799.633 MHz processor.
> [    0.001874] Console: colour VGA+ 80x25
> [    0.004000] console handover: boot [earlyser0] -> real [tty0]
> [    0.000000] Linux version 2.6.31-rc6 (stern@iolanthe.rowland.org) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #2 SMP PREEMPT Mon Aug 17 15:44:09 EDT 2009
> [    0.000000] KERNEL supported cpus:
> [    0.000000]   Intel GenuineIntel
> [    0.000000]   AMD AuthenticAMD
> [    0.000000]   NSC Geode by NSC
> [    0.000000]   Cyrix CyrixInstead
> [    0.000000]   Centaur CentaurHauls
> [    0.000000]   Transmeta GenuineTMx86
> [    0.000000]   Transmeta TransmetaCPU
> [    0.000000]   UMC UMC UMC UMC
> [    0.000000] BIOS-provided physical RAM map:
> [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> [    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> [    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
> [    0.000000]  BIOS-e820: 0000000000100000 - 000000002fe40000 (usable)
> [    0.000000]  BIOS-e820: 000000002fe40000 - 000000002fe50000 (ACPI data)
> [    0.000000]  BIOS-e820: 000000002fe50000 - 000000002ff00000 (ACPI NVS)
> [    0.000000] console [earlyser0] enabled
> [    0.000000] DMI 2.3 present.
> [    0.000000] last_pfn = 0x2fe40 max_arch_pfn = 0x100000
> [    0.000000] init_memory_mapping: 0000000000000000-000000002fe40000
> [    0.000000] RAMDISK: 2fb31000 - 2fe2fafc
> [    0.000000] ACPI: RSDP 000f7300 00014 (v00 ACPIAM)
> [    0.000000] ACPI: RSDT 2fe40000 00030 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> [    0.000000] ACPI: FACP 2fe40200 00081 (v02 INTEL  D845GBV2 20030714 MSFT 00000097)
> [    0.000000] ACPI: DSDT 2fe40370 03FD7 (v01 INTEL  D845GBV2 0000010A MSFT 0100000D)
> [    0.000000] ACPI: FACS 2fe50000 00040
> [    0.000000] ACPI: APIC 2fe40300 00068 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> [    0.000000] ACPI: ASF! 2fe44350 00084 (v16 AMIASF I845GASF 00000001 MSFT 0100000D)
> [    0.000000] 766MB LOWMEM available.
> [    0.000000]   mapped low ram: 0 - 2fe40000
> [    0.000000]   low ram: 0 - 2fe40000
> [    0.000000]   node 0 low ram: 00000000 - 2fe40000
> [    0.000000]   node 0 bootmap 00008000 - 0000dfc8
> [    0.000000] (9 early reservations) ==> bootmem [0000000000 - 002fe40000]
> [    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
> [    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
> [    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
> [    0.000000]   #3 [0001000000 - 0001848fe4]    TEXT DATA BSS ==> [0001000000 - 0001848fe4]
> [    0.000000]   #4 [002fb31000 - 002fe2fafc]          RAMDISK ==> [002fb31000 - 002fe2fafc]
> [    0.000000]   #5 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
> [    0.000000]   #6 [0001849000 - 0001850178]              BRK ==> [0001849000 - 0001850178]
> [    0.000000]   #7 [0000007000 - 0000008000]          PGTABLE ==> [0000007000 - 0000008000]
> [    0.000000]   #8 [0000008000 - 000000e000]          BOOTMAP ==> [0000008000 - 000000e000]
> [    0.000000] found SMP MP-table at [c00ff780] ff780
> [    0.000000] Zone PFN ranges:
> [    0.000000]   DMA      0x00000000 -> 0x00001000
> [    0.000000]   Normal   0x00001000 -> 0x0002fe40
> [    0.000000] Movable zone start PFN for each node
> [    0.000000] early_node_map[2] active PFN ranges
> [    0.000000]     0: 0x00000000 -> 0x0000009f
> [    0.000000]     0: 0x00000100 -> 0x0002fe40
> [    0.000000] Using APIC driver default
> [    0.000000] ACPI: PM-Timer IO Port: 0x408
> [    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
> [    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x81] disabled)
> [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
> [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
> [    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
> [    0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
> [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
> [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
> [    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
> [    0.000000] Using ACPI (MADT) for SMP configuration information
> [    0.000000] SMP: Allowing 2 CPUs, 1 hotplug CPUs
> [    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
> [    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
> [    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
> [    0.000000] Allocating PCI resources starting at 2ff00000 (gap: 2ff00000:d0100000)
> [    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
> [    0.000000] PERCPU: Embedded 13 pages at c221b000, static data 30620 bytes
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193572
> [    0.000000] Kernel command line: ro root=UUID=38b19631-670b-4ec8-be1a-a65458d523ae resume=/dev/hda7 console=ttyS0,115200 console=tty0 earlyprintk=serial,ttyS0,115200 no_console_suspend init=/bin/bash
> [    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
> [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> [    0.000000] Enabling fast FPU save and restore... done.
> [    0.000000] Enabling unmasked SIMD FPU exception support... done.
> [    0.000000] Initializing CPU#0
> [    0.000000] Memory: 761564k/784640k available (1816k kernel code, 22528k reserved, 1141k data, 264k init, 0k highmem)
> [    0.000000] virtual kernel memory layout:
> [    0.000000]     fixmap  : 0xfff1f000 - 0xfffff000   ( 896 kB)
> [    0.000000]     vmalloc : 0xf0640000 - 0xfff1d000   ( 248 MB)
> [    0.000000]     lowmem  : 0xc0000000 - 0xefe40000   ( 766 MB)
> [    0.000000]       .init : 0xc12e8000 - 0xc132a000   ( 264 kB)
> [    0.000000]       .data : 0xc11c61db - 0xc12e3730   (1141 kB)
> [    0.000000]       .text : 0xc1000000 - 0xc11c61db   (1816 kB)
> [    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
> [    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [    0.000000] NR_IRQS:512
> [    0.000000] Fast TSC calibration using PIT
> [    0.000000] Detected 1799.633 MHz processor.
> [    0.001874] Console: colour VGA+ 80x25
> [    0.004000] console handover: boot [earlyser0] -> real [tty0]
> [    0.004000] console [ttyS0] enabled
> [    0.004000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> [    0.004000] ... MAX_LOCKDEP_SUBCLASSES:  8
> [    0.004000] ... MAX_LOCK_DEPTH:          48
> [    0.004000] ... MAX_LOCKDEP_KEYS:        8191
> [    0.004000] ... CLASSHASH_SIZE:          4096
> [    0.004000] ... MAX_LOCKDEP_ENTRIES:     16384
> [    0.004000] ... MAX_LOCKDEP_CHAINS:      32768
> [    0.004000] ... CHAINHASH_SIZE:          16384
> [    0.004000]  memory used by lock dependency info: 3487 kB
> [    0.004000]  per task-struct memory footprint: 1152 bytes
> [    0.004037] Calibrating delay loop (skipped), value calculated using timer frequency.. 3599.26 BogoMIPS (lpj=7198532)
> [    0.011166] Mount-cache hash table entries: 512
> [    0.018020] CPU: Trace cache: 12K uops, L1 D cache: 8K
> [    0.021658] CPU: L2 cache: 512K
> [    0.024008] CPU: Hyper-Threading is disabled
> [    0.028011] mce: CPU supports 4 MCE banks
> [    0.032061] Checking 'hlt' instruction... OK.
> [    0.052910] lockdep: fixing up alternatives.
> [    0.056009] SMP alternatives: switching to UP code
> [    0.067195] ACPI: Core revision 20090521
> [    0.105689] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
> [    0.151484] CPU0: Intel(R) Pentium(R) 4 CPU 1.80GHz stepping 07
> [    0.160001] Brought up 1 CPUs
> [    0.160001] Total of 1 processors activated (3599.26 BogoMIPS).
> [    0.166324] NET: Registered protocol family 16
> [    0.173435] ACPI: bus type pci registered
> [    0.176897] PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=1
> [    0.180059] PCI: Using configuration type 1 for base access
> [    0.198601] bio: create slab <bio-0> at 0
> [    0.255019] ACPI: Interpreter enabled
> [    0.256016] ACPI: (supports S0 S1 S3 S4 S5)
> [    0.261893] ACPI: Using IOAPIC for interrupt routing
> [    0.311020] ACPI: Power Resource [URP1] (off)
> [    0.312233] ACPI: Power Resource [FDDP] (off)
> [    0.316316] ACPI: Power Resource [LPTP] (off)
> [    0.321187] ACPI: PCI Root Bridge [PCI0] (0000:00)
> [    0.328848] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
> [    0.332027] pci 0000:00:1d.7: PME# disabled
> [    0.336143] * The chipset may have PM-Timer Bug. Due to workarounds for a bug,
> [    0.336146] * this clock source is slow. If you are sure your timer does not have
> [    0.336149] * this bug, please use "acpi_pm_good" to disable the workaround
> [    0.340095] pci 0000:00:1f.0: quirk: region 0400-047f claimed by ICH4 ACPI/GPIO/TCO
> [    0.344012] pci 0000:00:1f.0: quirk: region 0480-04bf claimed by ICH4 GPIO
> [    0.348506] pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
> [    0.352013] pci 0000:00:1f.5: PME# disabled
> [    0.356205] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
> [    0.360012] pci 0000:01:00.0: PME# disabled
> [    0.364182] pci 0000:01:00.1: PME# supported from D0 D1 D2 D3hot
> [    0.368012] pci 0000:01:00.1: PME# disabled
> [    0.372183] pci 0000:01:00.2: PME# supported from D0 D1 D2 D3hot
> [    0.376012] pci 0000:01:00.2: PME# disabled
> [    0.380524] pci 0000:01:01.2: PME# supported from D0 D3hot
> [    0.384012] pci 0000:01:01.2: PME# disabled
> [    0.388341] pci 0000:01:08.0: PME# supported from D0 D1 D2 D3hot D3cold
> [    0.392012] pci 0000:01:08.0: PME# disabled
> [    0.396084] pci 0000:00:1e.0: transparent bridge
> [    0.422147] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> [    0.430851] ACPI: PCI Interrupt Link [LNKB] (IRQs *3 4 5 6 7 9 10 11 12 14 15)
> [    0.439806] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)
> [    0.444759] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)
> [    0.453153] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> [    0.462070] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> [    0.470773] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> [    0.479435] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
> [    0.485472] PCI: Using ACPI for IRQ routing
> [    0.492311] pnp: PnP ACPI init
> [    0.495524] ACPI: bus type pnp registered
> [    0.522218] pnp: PnP ACPI: found 14 devices
> [    0.526503] ACPI: ACPI bus type pnp unregistered
> [    0.532161] system 00:05: ioport range 0x4d0-0x4d1 has been reserved
> [    0.538638] system 00:0c: ioport range 0x400-0x47f has been reserved
> [    0.545085] system 00:0c: ioport range 0x680-0x6ff has been reserved
> [    0.551533] system 00:0c: ioport range 0x480-0x4bf has been reserved
> [    0.558178] system 00:0c: iomem range 0xfec00000-0xfec00fff could not be reserved
> [    0.565796] system 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
> [    0.573051] system 00:0d: iomem range 0x0-0x9ffff could not be reserved
> [    0.579764] system 00:0d: iomem range 0xc0000-0xdffff could not be reserved
> [    0.586823] system 00:0d: iomem range 0xe0000-0xfffff could not be reserved
> [    0.593885] system 00:0d: iomem range 0x100000-0x2fefffff could not be reserved
> [    0.639223] pci 0000:00:1e.0: PCI bridge, secondary bus 0000:01
> [    0.645241] pci 0000:00:1e.0:   IO window: 0xd000-0xdfff
> [    0.650649] pci 0000:00:1e.0:   MEM window: 0xff800000-0xff8fffff
> [    0.656834] pci 0000:00:1e.0:   PREFETCH window: 0xe6a00000-0xe6afffff
> [    0.663806] NET: Registered protocol family 2
> [    0.668830] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
> [    0.677816] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
> [    0.686847] TCP bind hash table entries: 65536 (order: 9, 2097152 bytes)
> [    0.709925] TCP: Hash tables configured (established 131072 bind 65536)
> [    0.716756] TCP reno registered
> [    0.720476] NET: Registered protocol family 1
> [    0.725945] Trying to unpack rootfs image as initramfs...
> [    0.963522] Freeing initrd memory: 3066k freed
> [    1.019820] msgmni has been set to 1493
> [    1.024409] alg: No test for stdrng (krng)
> [    1.028896] io scheduler noop registered
> [    1.032909] io scheduler anticipatory registered
> [    1.037784] io scheduler deadline registered
> [    1.043005] io scheduler cfq registered (default)
> [    2.628026] pci 0000:00:1d.7: EHCI: BIOS handoff failed (BIOS bug?) 01010001
> [    2.635535] pci 0000:01:08.0: Firmware left e100 interrupts enabled; disabling
> [    2.680223] Real Time Clock Driver v1.12b
> [    2.685039] Linux agpgart interface v0.103
> [    2.689372] agpgart-intel 0000:00:00.0: Intel 830M Chipset
> [    2.695334] agpgart-intel 0000:00:00.0: detected 892K stolen memory
> [    2.704642] agpgart-intel 0000:00:00.0: AGP aperture is 128M @ 0xf0000000
> [    2.712241] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> [    2.719398] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [    2.729430] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [    2.749711] brd: module loaded
> [    2.752875] Uniform Multi-Platform E-IDE driver
> [    2.759073] piix 0000:00:1f.1: IDE controller (0x8086:0x24cb rev 0x02)
> [    2.765724] PIIX_IDE 0000:00:1f.1: enabling device (0005 -> 0007)
> [    2.771992] PIIX_IDE 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
> [    2.779459] piix 0000:00:1f.1: not 100% native mode: will probe irqs later
> [    2.786433]     ide0: BM-DMA at 0xffa0-0xffa7
> [    2.790993]     ide1: BM-DMA at 0xffa8-0xffaf
> [    3.084274] hda: ST380011A, ATA DISK drive
> [    3.424027] hdb: Maxtor 6Y080P0, ATA DISK drive
> [    3.429511] hda: UDMA/100 mode selected
> [    3.433842] hdb: UDMA/100 mode selected
> [    4.172272] hdc: PLEXTOR DVDR PX-740A, ATAPI CD/DVD-ROM drive
> [    4.848864] hdc: UDMA/33 mode selected
> [    4.853099] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> [    4.858158] ide1 at 0x170-0x177,0x376 on irq 15
> [    4.864920] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> [    4.874833] ide-gd driver 1.18
> [    4.878204] hda: max request size: 512KiB
> [    4.892503] hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63
> [    4.900328] hda: cache flushes supported
> [    4.904796]  hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 > hda4
> [    5.003502] hdb: max request size: 128KiB
> [    5.016666] hdb: 160086528 sectors (81964 MB) w/7936KiB Cache, CHS=65535/16/63
> [    5.024297] hdb: cache flushes supported
> [    5.028551]  hdb: hdb1 hdb2 hdb3 hdb4 < hdb5 hdb6 hdb7 hdb8 hdb9 >
> [    5.101170] ide-cd driver 5.00
> [    5.106018] ide-cd: hdc: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
> [    5.113647] Uniform CD-ROM driver Revision: 3.20
> [    5.131270] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
> [    5.142474] serio: i8042 KBD port at 0x60,0x64 irq 1
> [    5.147626] serio: i8042 AUX port at 0x60,0x64 irq 12
> [    5.153721] mice: PS/2 mouse device common for all mice
> [    5.160998] cpuidle: using governor ladder
> [    5.165411] cpuidle: using governor menu
> [    5.170726] TCP cubic registered
> [    5.174050] NET: Registered protocol family 17
> [    5.178694] Using IPI No-Shortcut mode
> [    5.185668] Freeing unused kernel memory: 264k freed
> [    5.191539] Write protecting the kernel text: 1820k
> [    5.196823] Write protecting the kernel read-only data: 888k
> [    5.509740] input: PS2++ Logitech Mouse as /devices/platform/i8042/serio1/input/input0
> [    5.560195] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
> [    8.394440] kjournald starting.  Commit interval 5 seconds
> [    8.400608] EXT3-fs: mounted filesystem with writeback data mode.
> 
> Here's where I changed the log level and began the suspend:
> 
> [   11.480553] SysRq : Changing Loglevel
> [   11.484004] Loglevel set to 8
> [   24.279093] PM: Syncing filesystems ... done.
> [   24.285068] PM: Preparing system for mem sleep
> [   24.290143] PM: Adding info for No Bus:vcs63
> [   24.290700] PM: Adding info for No Bus:vcsa63
> [   24.305317] Freezing user space processes ... (elapsed 0.00 seconds) done.
> [   24.331507] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
> [   24.339078] PM: Entering mem sleep
> [   24.342844] agpgart-intel 0000:00:00.0: preparing suspend
> [   24.348404] pci 0000:00:02.0: preparing suspend
> [   24.352988] pci 0000:00:1d.0: preparing suspend
> [   24.357569] pci 0000:00:1d.1: preparing suspend
> [   24.362150] pci 0000:00:1d.2: preparing suspend
> [   24.366731] pci 0000:00:1d.7: preparing suspend
> [   24.371312] pci 0000:00:1e.0: preparing suspend
> [   24.375893] pci 0000:00:1f.0: preparing suspend
> [   24.380475] PIIX_IDE 0000:00:1f.1: preparing suspend
> [   24.385490] pci 0000:00:1f.3: preparing suspend
> [   24.390070] pci 0000:00:1f.5: preparing suspend
> [   24.394651] pci 0000:01:00.0: preparing suspend
> [   24.399232] pci 0000:01:00.1: preparing suspend
> [   24.403813] pci 0000:01:00.2: preparing suspend
> [   24.408395] pci 0000:01:01.0: preparing suspend
> [   24.412976] pci 0000:01:01.1: preparing suspend
> [   24.417557] pci 0000:01:01.2: preparing suspend
> [   24.422138] pci 0000:01:02.0: preparing suspend
> [   24.426719] pci 0000:01:08.0: preparing suspend
> [   24.431376] platform pcspkr: preparing suspend
> [   24.436080] serial8250 serial8250: preparing suspend
> [   24.441337] i8042 i8042: preparing suspend
> [   24.445577] psmouse serio1: legacy suspend
> [   24.856816] atkbd serio0: legacy suspend
> [   25.328042] i8042 i8042: suspend
> [   25.331538] ide-cdrom 1.0: legacy suspend
> [   25.335933] ide-gd 0.1: legacy suspend
> [   25.406305] ide-gd 0.0: legacy suspend
> [   25.412454] serial8250 serial8250: suspend
> [   25.416844] platform pcspkr: suspend
> [   25.420534] system 00:0d: legacy suspend
> [   25.424567] system 00:0c: legacy suspend
> [   25.428595] i8042 aux 00:0b: legacy suspend
> [   25.432883] i8042 kbd 00:0a: legacy suspend
> [   25.437169] pnp 00:09: legacy suspend
> [   25.440923] serial 00:08: legacy suspend
> 
> A lot more stuff appeared on the screen here but didn't get sent over
> the serial link.  Then after 5 seconds the system did resume.  A lot of
> messages about PCI config-space settings appeared on the screen but not
> on the serial link.  Then came this -- it did _not_ appear on the
> screen:
> 
> [   30.497131] serial 00:08: activated
> [   30.501039] pnp 00:09: legacy resume
> [   30.505030] i8042 kbd 00:0a: legacy resume
> [   30.509553] i8042 aux 00:0b: legacy resume
> [   30.514075] system 00:0c: legacy resume
> [   30.518333] system 00:0d: legacy resume
> [   30.522616] platform pcspkr: resume
> [   30.526714] serial8250 serial8250: resume
> [   30.531260] ide-gd 0.0: legacy resume
> [   30.537364] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> [   33.776044] hda: UDMA/100 mode selected
> [   33.780946] ide-gd 0.1: legacy resume
> [   33.787040] hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> [   37.052038] hdb: UDMA/100 mode selected
> [   37.056646] ide-cdrom 1.0: legacy resume
> [   37.063003] hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> [   37.070384] hdc: UDMA/33 mode selected
> [   37.075131] i8042 i8042: resume
> [   37.079067] atkbd serio0: legacy resume
> [   37.083382] psmouse serio1: legacy resume
> [   37.087868] i8042 i8042: completing resume
> [   37.092576] serial8250 serial8250: completing resume
> [   37.098178] platform pcspkr: completing resume
> [   37.103122] pci 0000:01:08.0: completing resume
> [   37.108093] pci 0000:01:02.0: completing resume
> [   37.113054] pci 0000:01:01.2: completing resume
> [   37.118016] pci 0000:01:01.1: completing resume
> [   37.122978] pci 0000:01:01.0: completing resume
> [   37.127940] pci 0000:01:00.2: completing resume
> [   37.132902] pci 0000:01:00.1: completing resume
> [   37.137864] pci 0000:01:00.0: completing resume
> [   37.142825] pci 0000:00:1f.5: completing resume
> [   37.147787] pci 0000:00:1f.3: completing resume
> [   37.152749] PIIX_IDE 0000:00:1f.1: completing resume
> [   37.158155] pci 0000:00:1f.0: completing resume
> [   37.163117] pci 0000:00:1e.0: completing resume
> [   37.168079] pci 0000:00:1d.7: completing resume
> [   37.173041] pci 0000:00:1d.2: completing resume
> [   37.178003] pci 0000:00:1d.1: completing resume
> [   37.182964] pci 0000:00:1d.0: completing resume
> [   37.187926] pci 0000:00:02.0: completing resume
> [   37.192889] agpgart-intel 0000:00:00.0: completing resume
> [   37.198935] PM: Finishing wakeup.
> [   37.202656] Restarting tasks ... done.
> 
> As far as I can tell, the system was running again.  But the screen was
> still set to the alternate VT!  There was no response to normal
> keystrokes or Alt-F1.  But it did respond to Alt-SysRq-h:
> 
> [   46.826069] SysRq : HELP : loglevel(0-9) reBoot Crash show-all-locks(D) terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) 
> 
> (That's from the serial log; it wasn't on the screen.)
> 
> It appears that some part of the resume messed up the VT console
> driver.

Can you try the patch below from Jiri that I just added to my tree to
hopefully resolve this issue?

thanks,

greg k-h

------------------

From: Jiri Slaby <jirislaby@gmail.com>
Subject: tty: Power: fix suspend vt regression
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>, Alan Cox <alan@linux.intel.com>, "Rafael J. Wysocki" <rjw@sisk.pl>


vt_waitactive no longer accepts console parameter as console-1
since commit "vt: add an event interface". It expects console
number directly (as viewed by userspace -- counting from 1).

Fix a deadlock suspend regression by redefining adding one
to vt in vt_move_to_console.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/char/vt_ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -1757,7 +1757,7 @@ int vt_move_to_console(unsigned int vt, 
 		return -EIO;
 	}
 	release_console_sem();
-	if (vt_waitactive(vt)) {
+	if (vt_waitactive(vt + 1)) {
 		pr_debug("Suspend: Can't switch VCs.");
 		return -EINTR;
 	}

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 21:14     ` Greg KH
@ 2009-08-17 21:15       ` Greg KH
  2009-08-17 21:31         ` Jiri Slaby
  0 siblings, 1 reply; 33+ messages in thread
From: Greg KH @ 2009-08-17 21:15 UTC (permalink / raw)
  To: Alan Stern; +Cc: Linux-pm mailing list, Jiri Slaby, Alan Cox

On Mon, Aug 17, 2009 at 02:14:13PM -0700, Greg KH wrote:
> On Mon, Aug 17, 2009 at 04:53:46PM -0400, Alan Stern wrote:
> > On Mon, 17 Aug 2009, Rafael J. Wysocki wrote:
> > 
> > > I wonder where exactly it hangs.
> > > 
> > > Can you rebuild the kernel with CONFIG_PM_VERBOSE set and
> > > repeat the test with 'echo 8 > /proc/sys/kernel/printk' before the last
> > > command?
> > 
> > That was an interesting experience.  I booted with a serial console in 
> > addition to the VT console.  Here's the recorded log of the boot-up:
> > 
> > [    0.000000] Linux version 2.6.31-rc6 (stern@iolanthe.rowland.org) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #2 SMP PREEMPT Mon Aug 17 15:44:09 EDT 2009
> > [    0.000000] KERNEL supported cpus:
> > [    0.000000]   Intel GenuineIntel
> > [    0.000000]   AMD AuthenticAMD
> > [    0.000000]   NSC Geode by NSC
> > [    0.000000]   Cyrix CyrixInstead
> > [    0.000000]   Centaur CentaurHauls
> > [    0.000000]   Transmeta GenuineTMx86
> > [    0.000000]   Transmeta TransmetaCPU
> > [    0.000000]   UMC UMC UMC UMC
> > [    0.000000] BIOS-provided physical RAM map:
> > [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> > [    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> > [    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
> > [    0.000000]  BIOS-e820: 0000000000100000 - 000000002fe40000 (usable)
> > [    0.000000]  BIOS-e820: 000000002fe40000 - 000000002fe50000 (ACPI data)
> > [    0.000000]  BIOS-e820: 000000002fe50000 - 000000002ff00000 (ACPI NVS)
> > [    0.000000] console [earlyser0] enabled
> > [    0.000000] DMI 2.3 present.
> > [    0.000000] last_pfn = 0x2fe40 max_arch_pfn = 0x100000
> > [    0.000000] init_memory_mapping: 0000000000000000-000000002fe40000
> > [    0.000000] RAMDISK: 2fb31000 - 2fe2fafc
> > [    0.000000] ACPI: RSDP 000f7300 00014 (v00 ACPIAM)
> > [    0.000000] ACPI: RSDT 2fe40000 00030 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> > [    0.000000] ACPI: FACP 2fe40200 00081 (v02 INTEL  D845GBV2 20030714 MSFT 00000097)
> > [    0.000000] ACPI: DSDT 2fe40370 03FD7 (v01 INTEL  D845GBV2 0000010A MSFT 0100000D)
> > [    0.000000] ACPI: FACS 2fe50000 00040
> > [    0.000000] ACPI: APIC 2fe40300 00068 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> > [    0.000000] ACPI: ASF! 2fe44350 00084 (v16 AMIASF I845GASF 00000001 MSFT 0100000D)
> > [    0.000000] 766MB LOWMEM available.
> > [    0.000000]   mapped low ram: 0 - 2fe40000
> > [    0.000000]   low ram: 0 - 2fe40000
> > [    0.000000]   node 0 low ram: 00000000 - 2fe40000
> > [    0.000000]   node 0 bootmap 00008000 - 0000dfc8
> > [    0.000000] (9 early reservations) ==> bootmem [0000000000 - 002fe40000]
> > [    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
> > [    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
> > [    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
> > [    0.000000]   #3 [0001000000 - 0001848fe4]    TEXT DATA BSS ==> [0001000000 - 0001848fe4]
> > [    0.000000]   #4 [002fb31000 - 002fe2fafc]          RAMDISK ==> [002fb31000 - 002fe2fafc]
> > [    0.000000]   #5 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
> > [    0.000000]   #6 [0001849000 - 0001850178]              BRK ==> [0001849000 - 0001850178]
> > [    0.000000]   #7 [0000007000 - 0000008000]          PGTABLE ==> [0000007000 - 0000008000]
> > [    0.000000]   #8 [0000008000 - 000000e000]          BOOTMAP ==> [0000008000 - 000000e000]
> > [    0.000000] found SMP MP-table at [c00ff780] ff780
> > [    0.000000] Zone PFN ranges:
> > [    0.000000]   DMA      0x00000000 -> 0x00001000
> > [    0.000000]   Normal   0x00001000 -> 0x0002fe40
> > [    0.000000] Movable zone start PFN for each node
> > [    0.000000] early_node_map[2] active PFN ranges
> > [    0.000000]     0: 0x00000000 -> 0x0000009f
> > [    0.000000]     0: 0x00000100 -> 0x0002fe40
> > [    0.000000] Using APIC driver default
> > [    0.000000] ACPI: PM-Timer IO Port: 0x408
> > [    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
> > [    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x81] disabled)
> > [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
> > [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
> > [    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
> > [    0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
> > [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
> > [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
> > [    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
> > [    0.000000] Using ACPI (MADT) for SMP configuration information
> > [    0.000000] SMP: Allowing 2 CPUs, 1 hotplug CPUs
> > [    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
> > [    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
> > [    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
> > [    0.000000] Allocating PCI resources starting at 2ff00000 (gap: 2ff00000:d0100000)
> > [    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
> > [    0.000000] PERCPU: Embedded 13 pages at c221b000, static data 30620 bytes
> > [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193572
> > [    0.000000] Kernel command line: ro root=UUID=38b19631-670b-4ec8-be1a-a65458d523ae resume=/dev/hda7 console=ttyS0,115200 console=tty0 earlyprintk=serial,ttyS0,115200 no_console_suspend init=/bin/bash
> > [    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
> > [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> > [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> > [    0.000000] Enabling fast FPU save and restore... done.
> > [    0.000000] Enabling unmasked SIMD FPU exception support... done.
> > [    0.000000] Initializing CPU#0
> > [    0.000000] Memory: 761564k/784640k available (1816k kernel code, 22528k reserved, 1141k data, 264k init, 0k highmem)
> > [    0.000000] virtual kernel memory layout:
> > [    0.000000]     fixmap  : 0xfff1f000 - 0xfffff000   ( 896 kB)
> > [    0.000000]     vmalloc : 0xf0640000 - 0xfff1d000   ( 248 MB)
> > [    0.000000]     lowmem  : 0xc0000000 - 0xefe40000   ( 766 MB)
> > [    0.000000]       .init : 0xc12e8000 - 0xc132a000   ( 264 kB)
> > [    0.000000]       .data : 0xc11c61db - 0xc12e3730   (1141 kB)
> > [    0.000000]       .text : 0xc1000000 - 0xc11c61db   (1816 kB)
> > [    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
> > [    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> > [    0.000000] NR_IRQS:512
> > [    0.000000] Fast TSC calibration using PIT
> > [    0.000000] Detected 1799.633 MHz processor.
> > [    0.001874] Console: colour VGA+ 80x25
> > [    0.004000] console handover: boot [earlyser0] -> real [tty0]
> > [    0.000000] Linux version 2.6.31-rc6 (stern@iolanthe.rowland.org) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #2 SMP PREEMPT Mon Aug 17 15:44:09 EDT 2009
> > [    0.000000] KERNEL supported cpus:
> > [    0.000000]   Intel GenuineIntel
> > [    0.000000]   AMD AuthenticAMD
> > [    0.000000]   NSC Geode by NSC
> > [    0.000000]   Cyrix CyrixInstead
> > [    0.000000]   Centaur CentaurHauls
> > [    0.000000]   Transmeta GenuineTMx86
> > [    0.000000]   Transmeta TransmetaCPU
> > [    0.000000]   UMC UMC UMC UMC
> > [    0.000000] BIOS-provided physical RAM map:
> > [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> > [    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> > [    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
> > [    0.000000]  BIOS-e820: 0000000000100000 - 000000002fe40000 (usable)
> > [    0.000000]  BIOS-e820: 000000002fe40000 - 000000002fe50000 (ACPI data)
> > [    0.000000]  BIOS-e820: 000000002fe50000 - 000000002ff00000 (ACPI NVS)
> > [    0.000000] console [earlyser0] enabled
> > [    0.000000] DMI 2.3 present.
> > [    0.000000] last_pfn = 0x2fe40 max_arch_pfn = 0x100000
> > [    0.000000] init_memory_mapping: 0000000000000000-000000002fe40000
> > [    0.000000] RAMDISK: 2fb31000 - 2fe2fafc
> > [    0.000000] ACPI: RSDP 000f7300 00014 (v00 ACPIAM)
> > [    0.000000] ACPI: RSDT 2fe40000 00030 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> > [    0.000000] ACPI: FACP 2fe40200 00081 (v02 INTEL  D845GBV2 20030714 MSFT 00000097)
> > [    0.000000] ACPI: DSDT 2fe40370 03FD7 (v01 INTEL  D845GBV2 0000010A MSFT 0100000D)
> > [    0.000000] ACPI: FACS 2fe50000 00040
> > [    0.000000] ACPI: APIC 2fe40300 00068 (v01 INTEL  D845GBV2 20030714 MSFT 00000097)
> > [    0.000000] ACPI: ASF! 2fe44350 00084 (v16 AMIASF I845GASF 00000001 MSFT 0100000D)
> > [    0.000000] 766MB LOWMEM available.
> > [    0.000000]   mapped low ram: 0 - 2fe40000
> > [    0.000000]   low ram: 0 - 2fe40000
> > [    0.000000]   node 0 low ram: 00000000 - 2fe40000
> > [    0.000000]   node 0 bootmap 00008000 - 0000dfc8
> > [    0.000000] (9 early reservations) ==> bootmem [0000000000 - 002fe40000]
> > [    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
> > [    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
> > [    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
> > [    0.000000]   #3 [0001000000 - 0001848fe4]    TEXT DATA BSS ==> [0001000000 - 0001848fe4]
> > [    0.000000]   #4 [002fb31000 - 002fe2fafc]          RAMDISK ==> [002fb31000 - 002fe2fafc]
> > [    0.000000]   #5 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
> > [    0.000000]   #6 [0001849000 - 0001850178]              BRK ==> [0001849000 - 0001850178]
> > [    0.000000]   #7 [0000007000 - 0000008000]          PGTABLE ==> [0000007000 - 0000008000]
> > [    0.000000]   #8 [0000008000 - 000000e000]          BOOTMAP ==> [0000008000 - 000000e000]
> > [    0.000000] found SMP MP-table at [c00ff780] ff780
> > [    0.000000] Zone PFN ranges:
> > [    0.000000]   DMA      0x00000000 -> 0x00001000
> > [    0.000000]   Normal   0x00001000 -> 0x0002fe40
> > [    0.000000] Movable zone start PFN for each node
> > [    0.000000] early_node_map[2] active PFN ranges
> > [    0.000000]     0: 0x00000000 -> 0x0000009f
> > [    0.000000]     0: 0x00000100 -> 0x0002fe40
> > [    0.000000] Using APIC driver default
> > [    0.000000] ACPI: PM-Timer IO Port: 0x408
> > [    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
> > [    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x81] disabled)
> > [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
> > [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
> > [    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
> > [    0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
> > [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
> > [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
> > [    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
> > [    0.000000] Using ACPI (MADT) for SMP configuration information
> > [    0.000000] SMP: Allowing 2 CPUs, 1 hotplug CPUs
> > [    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
> > [    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
> > [    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
> > [    0.000000] Allocating PCI resources starting at 2ff00000 (gap: 2ff00000:d0100000)
> > [    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
> > [    0.000000] PERCPU: Embedded 13 pages at c221b000, static data 30620 bytes
> > [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193572
> > [    0.000000] Kernel command line: ro root=UUID=38b19631-670b-4ec8-be1a-a65458d523ae resume=/dev/hda7 console=ttyS0,115200 console=tty0 earlyprintk=serial,ttyS0,115200 no_console_suspend init=/bin/bash
> > [    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
> > [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> > [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> > [    0.000000] Enabling fast FPU save and restore... done.
> > [    0.000000] Enabling unmasked SIMD FPU exception support... done.
> > [    0.000000] Initializing CPU#0
> > [    0.000000] Memory: 761564k/784640k available (1816k kernel code, 22528k reserved, 1141k data, 264k init, 0k highmem)
> > [    0.000000] virtual kernel memory layout:
> > [    0.000000]     fixmap  : 0xfff1f000 - 0xfffff000   ( 896 kB)
> > [    0.000000]     vmalloc : 0xf0640000 - 0xfff1d000   ( 248 MB)
> > [    0.000000]     lowmem  : 0xc0000000 - 0xefe40000   ( 766 MB)
> > [    0.000000]       .init : 0xc12e8000 - 0xc132a000   ( 264 kB)
> > [    0.000000]       .data : 0xc11c61db - 0xc12e3730   (1141 kB)
> > [    0.000000]       .text : 0xc1000000 - 0xc11c61db   (1816 kB)
> > [    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
> > [    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> > [    0.000000] NR_IRQS:512
> > [    0.000000] Fast TSC calibration using PIT
> > [    0.000000] Detected 1799.633 MHz processor.
> > [    0.001874] Console: colour VGA+ 80x25
> > [    0.004000] console handover: boot [earlyser0] -> real [tty0]
> > [    0.004000] console [ttyS0] enabled
> > [    0.004000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> > [    0.004000] ... MAX_LOCKDEP_SUBCLASSES:  8
> > [    0.004000] ... MAX_LOCK_DEPTH:          48
> > [    0.004000] ... MAX_LOCKDEP_KEYS:        8191
> > [    0.004000] ... CLASSHASH_SIZE:          4096
> > [    0.004000] ... MAX_LOCKDEP_ENTRIES:     16384
> > [    0.004000] ... MAX_LOCKDEP_CHAINS:      32768
> > [    0.004000] ... CHAINHASH_SIZE:          16384
> > [    0.004000]  memory used by lock dependency info: 3487 kB
> > [    0.004000]  per task-struct memory footprint: 1152 bytes
> > [    0.004037] Calibrating delay loop (skipped), value calculated using timer frequency.. 3599.26 BogoMIPS (lpj=7198532)
> > [    0.011166] Mount-cache hash table entries: 512
> > [    0.018020] CPU: Trace cache: 12K uops, L1 D cache: 8K
> > [    0.021658] CPU: L2 cache: 512K
> > [    0.024008] CPU: Hyper-Threading is disabled
> > [    0.028011] mce: CPU supports 4 MCE banks
> > [    0.032061] Checking 'hlt' instruction... OK.
> > [    0.052910] lockdep: fixing up alternatives.
> > [    0.056009] SMP alternatives: switching to UP code
> > [    0.067195] ACPI: Core revision 20090521
> > [    0.105689] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
> > [    0.151484] CPU0: Intel(R) Pentium(R) 4 CPU 1.80GHz stepping 07
> > [    0.160001] Brought up 1 CPUs
> > [    0.160001] Total of 1 processors activated (3599.26 BogoMIPS).
> > [    0.166324] NET: Registered protocol family 16
> > [    0.173435] ACPI: bus type pci registered
> > [    0.176897] PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=1
> > [    0.180059] PCI: Using configuration type 1 for base access
> > [    0.198601] bio: create slab <bio-0> at 0
> > [    0.255019] ACPI: Interpreter enabled
> > [    0.256016] ACPI: (supports S0 S1 S3 S4 S5)
> > [    0.261893] ACPI: Using IOAPIC for interrupt routing
> > [    0.311020] ACPI: Power Resource [URP1] (off)
> > [    0.312233] ACPI: Power Resource [FDDP] (off)
> > [    0.316316] ACPI: Power Resource [LPTP] (off)
> > [    0.321187] ACPI: PCI Root Bridge [PCI0] (0000:00)
> > [    0.328848] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
> > [    0.332027] pci 0000:00:1d.7: PME# disabled
> > [    0.336143] * The chipset may have PM-Timer Bug. Due to workarounds for a bug,
> > [    0.336146] * this clock source is slow. If you are sure your timer does not have
> > [    0.336149] * this bug, please use "acpi_pm_good" to disable the workaround
> > [    0.340095] pci 0000:00:1f.0: quirk: region 0400-047f claimed by ICH4 ACPI/GPIO/TCO
> > [    0.344012] pci 0000:00:1f.0: quirk: region 0480-04bf claimed by ICH4 GPIO
> > [    0.348506] pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
> > [    0.352013] pci 0000:00:1f.5: PME# disabled
> > [    0.356205] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
> > [    0.360012] pci 0000:01:00.0: PME# disabled
> > [    0.364182] pci 0000:01:00.1: PME# supported from D0 D1 D2 D3hot
> > [    0.368012] pci 0000:01:00.1: PME# disabled
> > [    0.372183] pci 0000:01:00.2: PME# supported from D0 D1 D2 D3hot
> > [    0.376012] pci 0000:01:00.2: PME# disabled
> > [    0.380524] pci 0000:01:01.2: PME# supported from D0 D3hot
> > [    0.384012] pci 0000:01:01.2: PME# disabled
> > [    0.388341] pci 0000:01:08.0: PME# supported from D0 D1 D2 D3hot D3cold
> > [    0.392012] pci 0000:01:08.0: PME# disabled
> > [    0.396084] pci 0000:00:1e.0: transparent bridge
> > [    0.422147] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> > [    0.430851] ACPI: PCI Interrupt Link [LNKB] (IRQs *3 4 5 6 7 9 10 11 12 14 15)
> > [    0.439806] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)
> > [    0.444759] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)
> > [    0.453153] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> > [    0.462070] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> > [    0.470773] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
> > [    0.479435] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
> > [    0.485472] PCI: Using ACPI for IRQ routing
> > [    0.492311] pnp: PnP ACPI init
> > [    0.495524] ACPI: bus type pnp registered
> > [    0.522218] pnp: PnP ACPI: found 14 devices
> > [    0.526503] ACPI: ACPI bus type pnp unregistered
> > [    0.532161] system 00:05: ioport range 0x4d0-0x4d1 has been reserved
> > [    0.538638] system 00:0c: ioport range 0x400-0x47f has been reserved
> > [    0.545085] system 00:0c: ioport range 0x680-0x6ff has been reserved
> > [    0.551533] system 00:0c: ioport range 0x480-0x4bf has been reserved
> > [    0.558178] system 00:0c: iomem range 0xfec00000-0xfec00fff could not be reserved
> > [    0.565796] system 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
> > [    0.573051] system 00:0d: iomem range 0x0-0x9ffff could not be reserved
> > [    0.579764] system 00:0d: iomem range 0xc0000-0xdffff could not be reserved
> > [    0.586823] system 00:0d: iomem range 0xe0000-0xfffff could not be reserved
> > [    0.593885] system 00:0d: iomem range 0x100000-0x2fefffff could not be reserved
> > [    0.639223] pci 0000:00:1e.0: PCI bridge, secondary bus 0000:01
> > [    0.645241] pci 0000:00:1e.0:   IO window: 0xd000-0xdfff
> > [    0.650649] pci 0000:00:1e.0:   MEM window: 0xff800000-0xff8fffff
> > [    0.656834] pci 0000:00:1e.0:   PREFETCH window: 0xe6a00000-0xe6afffff
> > [    0.663806] NET: Registered protocol family 2
> > [    0.668830] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
> > [    0.677816] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
> > [    0.686847] TCP bind hash table entries: 65536 (order: 9, 2097152 bytes)
> > [    0.709925] TCP: Hash tables configured (established 131072 bind 65536)
> > [    0.716756] TCP reno registered
> > [    0.720476] NET: Registered protocol family 1
> > [    0.725945] Trying to unpack rootfs image as initramfs...
> > [    0.963522] Freeing initrd memory: 3066k freed
> > [    1.019820] msgmni has been set to 1493
> > [    1.024409] alg: No test for stdrng (krng)
> > [    1.028896] io scheduler noop registered
> > [    1.032909] io scheduler anticipatory registered
> > [    1.037784] io scheduler deadline registered
> > [    1.043005] io scheduler cfq registered (default)
> > [    2.628026] pci 0000:00:1d.7: EHCI: BIOS handoff failed (BIOS bug?) 01010001
> > [    2.635535] pci 0000:01:08.0: Firmware left e100 interrupts enabled; disabling
> > [    2.680223] Real Time Clock Driver v1.12b
> > [    2.685039] Linux agpgart interface v0.103
> > [    2.689372] agpgart-intel 0000:00:00.0: Intel 830M Chipset
> > [    2.695334] agpgart-intel 0000:00:00.0: detected 892K stolen memory
> > [    2.704642] agpgart-intel 0000:00:00.0: AGP aperture is 128M @ 0xf0000000
> > [    2.712241] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> > [    2.719398] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> > [    2.729430] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> > [    2.749711] brd: module loaded
> > [    2.752875] Uniform Multi-Platform E-IDE driver
> > [    2.759073] piix 0000:00:1f.1: IDE controller (0x8086:0x24cb rev 0x02)
> > [    2.765724] PIIX_IDE 0000:00:1f.1: enabling device (0005 -> 0007)
> > [    2.771992] PIIX_IDE 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
> > [    2.779459] piix 0000:00:1f.1: not 100% native mode: will probe irqs later
> > [    2.786433]     ide0: BM-DMA at 0xffa0-0xffa7
> > [    2.790993]     ide1: BM-DMA at 0xffa8-0xffaf
> > [    3.084274] hda: ST380011A, ATA DISK drive
> > [    3.424027] hdb: Maxtor 6Y080P0, ATA DISK drive
> > [    3.429511] hda: UDMA/100 mode selected
> > [    3.433842] hdb: UDMA/100 mode selected
> > [    4.172272] hdc: PLEXTOR DVDR PX-740A, ATAPI CD/DVD-ROM drive
> > [    4.848864] hdc: UDMA/33 mode selected
> > [    4.853099] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > [    4.858158] ide1 at 0x170-0x177,0x376 on irq 15
> > [    4.864920] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > [    4.874833] ide-gd driver 1.18
> > [    4.878204] hda: max request size: 512KiB
> > [    4.892503] hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63
> > [    4.900328] hda: cache flushes supported
> > [    4.904796]  hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 > hda4
> > [    5.003502] hdb: max request size: 128KiB
> > [    5.016666] hdb: 160086528 sectors (81964 MB) w/7936KiB Cache, CHS=65535/16/63
> > [    5.024297] hdb: cache flushes supported
> > [    5.028551]  hdb: hdb1 hdb2 hdb3 hdb4 < hdb5 hdb6 hdb7 hdb8 hdb9 >
> > [    5.101170] ide-cd driver 5.00
> > [    5.106018] ide-cd: hdc: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
> > [    5.113647] Uniform CD-ROM driver Revision: 3.20
> > [    5.131270] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
> > [    5.142474] serio: i8042 KBD port at 0x60,0x64 irq 1
> > [    5.147626] serio: i8042 AUX port at 0x60,0x64 irq 12
> > [    5.153721] mice: PS/2 mouse device common for all mice
> > [    5.160998] cpuidle: using governor ladder
> > [    5.165411] cpuidle: using governor menu
> > [    5.170726] TCP cubic registered
> > [    5.174050] NET: Registered protocol family 17
> > [    5.178694] Using IPI No-Shortcut mode
> > [    5.185668] Freeing unused kernel memory: 264k freed
> > [    5.191539] Write protecting the kernel text: 1820k
> > [    5.196823] Write protecting the kernel read-only data: 888k
> > [    5.509740] input: PS2++ Logitech Mouse as /devices/platform/i8042/serio1/input/input0
> > [    5.560195] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
> > [    8.394440] kjournald starting.  Commit interval 5 seconds
> > [    8.400608] EXT3-fs: mounted filesystem with writeback data mode.
> > 
> > Here's where I changed the log level and began the suspend:
> > 
> > [   11.480553] SysRq : Changing Loglevel
> > [   11.484004] Loglevel set to 8
> > [   24.279093] PM: Syncing filesystems ... done.
> > [   24.285068] PM: Preparing system for mem sleep
> > [   24.290143] PM: Adding info for No Bus:vcs63
> > [   24.290700] PM: Adding info for No Bus:vcsa63
> > [   24.305317] Freezing user space processes ... (elapsed 0.00 seconds) done.
> > [   24.331507] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
> > [   24.339078] PM: Entering mem sleep
> > [   24.342844] agpgart-intel 0000:00:00.0: preparing suspend
> > [   24.348404] pci 0000:00:02.0: preparing suspend
> > [   24.352988] pci 0000:00:1d.0: preparing suspend
> > [   24.357569] pci 0000:00:1d.1: preparing suspend
> > [   24.362150] pci 0000:00:1d.2: preparing suspend
> > [   24.366731] pci 0000:00:1d.7: preparing suspend
> > [   24.371312] pci 0000:00:1e.0: preparing suspend
> > [   24.375893] pci 0000:00:1f.0: preparing suspend
> > [   24.380475] PIIX_IDE 0000:00:1f.1: preparing suspend
> > [   24.385490] pci 0000:00:1f.3: preparing suspend
> > [   24.390070] pci 0000:00:1f.5: preparing suspend
> > [   24.394651] pci 0000:01:00.0: preparing suspend
> > [   24.399232] pci 0000:01:00.1: preparing suspend
> > [   24.403813] pci 0000:01:00.2: preparing suspend
> > [   24.408395] pci 0000:01:01.0: preparing suspend
> > [   24.412976] pci 0000:01:01.1: preparing suspend
> > [   24.417557] pci 0000:01:01.2: preparing suspend
> > [   24.422138] pci 0000:01:02.0: preparing suspend
> > [   24.426719] pci 0000:01:08.0: preparing suspend
> > [   24.431376] platform pcspkr: preparing suspend
> > [   24.436080] serial8250 serial8250: preparing suspend
> > [   24.441337] i8042 i8042: preparing suspend
> > [   24.445577] psmouse serio1: legacy suspend
> > [   24.856816] atkbd serio0: legacy suspend
> > [   25.328042] i8042 i8042: suspend
> > [   25.331538] ide-cdrom 1.0: legacy suspend
> > [   25.335933] ide-gd 0.1: legacy suspend
> > [   25.406305] ide-gd 0.0: legacy suspend
> > [   25.412454] serial8250 serial8250: suspend
> > [   25.416844] platform pcspkr: suspend
> > [   25.420534] system 00:0d: legacy suspend
> > [   25.424567] system 00:0c: legacy suspend
> > [   25.428595] i8042 aux 00:0b: legacy suspend
> > [   25.432883] i8042 kbd 00:0a: legacy suspend
> > [   25.437169] pnp 00:09: legacy suspend
> > [   25.440923] serial 00:08: legacy suspend
> > 
> > A lot more stuff appeared on the screen here but didn't get sent over
> > the serial link.  Then after 5 seconds the system did resume.  A lot of
> > messages about PCI config-space settings appeared on the screen but not
> > on the serial link.  Then came this -- it did _not_ appear on the
> > screen:
> > 
> > [   30.497131] serial 00:08: activated
> > [   30.501039] pnp 00:09: legacy resume
> > [   30.505030] i8042 kbd 00:0a: legacy resume
> > [   30.509553] i8042 aux 00:0b: legacy resume
> > [   30.514075] system 00:0c: legacy resume
> > [   30.518333] system 00:0d: legacy resume
> > [   30.522616] platform pcspkr: resume
> > [   30.526714] serial8250 serial8250: resume
> > [   30.531260] ide-gd 0.0: legacy resume
> > [   30.537364] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> > [   33.776044] hda: UDMA/100 mode selected
> > [   33.780946] ide-gd 0.1: legacy resume
> > [   33.787040] hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> > [   37.052038] hdb: UDMA/100 mode selected
> > [   37.056646] ide-cdrom 1.0: legacy resume
> > [   37.063003] hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> > [   37.070384] hdc: UDMA/33 mode selected
> > [   37.075131] i8042 i8042: resume
> > [   37.079067] atkbd serio0: legacy resume
> > [   37.083382] psmouse serio1: legacy resume
> > [   37.087868] i8042 i8042: completing resume
> > [   37.092576] serial8250 serial8250: completing resume
> > [   37.098178] platform pcspkr: completing resume
> > [   37.103122] pci 0000:01:08.0: completing resume
> > [   37.108093] pci 0000:01:02.0: completing resume
> > [   37.113054] pci 0000:01:01.2: completing resume
> > [   37.118016] pci 0000:01:01.1: completing resume
> > [   37.122978] pci 0000:01:01.0: completing resume
> > [   37.127940] pci 0000:01:00.2: completing resume
> > [   37.132902] pci 0000:01:00.1: completing resume
> > [   37.137864] pci 0000:01:00.0: completing resume
> > [   37.142825] pci 0000:00:1f.5: completing resume
> > [   37.147787] pci 0000:00:1f.3: completing resume
> > [   37.152749] PIIX_IDE 0000:00:1f.1: completing resume
> > [   37.158155] pci 0000:00:1f.0: completing resume
> > [   37.163117] pci 0000:00:1e.0: completing resume
> > [   37.168079] pci 0000:00:1d.7: completing resume
> > [   37.173041] pci 0000:00:1d.2: completing resume
> > [   37.178003] pci 0000:00:1d.1: completing resume
> > [   37.182964] pci 0000:00:1d.0: completing resume
> > [   37.187926] pci 0000:00:02.0: completing resume
> > [   37.192889] agpgart-intel 0000:00:00.0: completing resume
> > [   37.198935] PM: Finishing wakeup.
> > [   37.202656] Restarting tasks ... done.
> > 
> > As far as I can tell, the system was running again.  But the screen was
> > still set to the alternate VT!  There was no response to normal
> > keystrokes or Alt-F1.  But it did respond to Alt-SysRq-h:
> > 
> > [   46.826069] SysRq : HELP : loglevel(0-9) reBoot Crash show-all-locks(D) terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) 
> > 
> > (That's from the serial log; it wasn't on the screen.)
> > 
> > It appears that some part of the resume messed up the VT console
> > driver.
> 
> Can you try the patch below from Jiri that I just added to my tree to
> hopefully resolve this issue?
> 
> thanks,
> 
> greg k-h
> 
> ------------------
> 
> From: Jiri Slaby <jirislaby@gmail.com>
> Subject: tty: Power: fix suspend vt regression
> To: gregkh@suse.de
> Cc: linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>, Alan Cox <alan@linux.intel.com>, "Rafael J. Wysocki" <rjw@sisk.pl>
> 
> 
> vt_waitactive no longer accepts console parameter as console-1
> since commit "vt: add an event interface". It expects console
> number directly (as viewed by userspace -- counting from 1).
> 
> Fix a deadlock suspend regression by redefining adding one
> to vt in vt_move_to_console.
> 
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> Cc: Alan Cox <alan@linux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/char/vt_ioctl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/char/vt_ioctl.c
> +++ b/drivers/char/vt_ioctl.c
> @@ -1757,7 +1757,7 @@ int vt_move_to_console(unsigned int vt, 
>  		return -EIO;
>  	}
>  	release_console_sem();
> -	if (vt_waitactive(vt)) {
> +	if (vt_waitactive(vt + 1)) {
>  		pr_debug("Suspend: Can't switch VCs.");
>  		return -EINTR;
>  	}

Oh wait, I think this is only needed on top of the rest of the tty tree,
Linus's tree should not need this.

But I think Jiri is tracking down something in this area, Jiri?

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 20:53   ` Alan Stern
  2009-08-17 21:14     ` Greg KH
@ 2009-08-17 21:21     ` Rafael J. Wysocki
  2009-08-17 21:50       ` Alan Stern
  2009-08-18 16:07     ` Alan Stern
  2 siblings, 1 reply; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-17 21:21 UTC (permalink / raw)
  To: Alan Stern; +Cc: Greg KH, Linux-pm mailing list, Alan Cox

On Monday 17 August 2009, Alan Stern wrote:
> On Mon, 17 Aug 2009, Rafael J. Wysocki wrote:
...
> 
> (That's from the serial log; it wasn't on the screen.)
> 
> It appears that some part of the resume messed up the VT console
> driver.

Hm, perhaps the no_console_suspend thing doesn't really work on this machine?

Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 21:15       ` Greg KH
@ 2009-08-17 21:31         ` Jiri Slaby
  2009-08-17 21:33           ` Jiri Slaby
  0 siblings, 1 reply; 33+ messages in thread
From: Jiri Slaby @ 2009-08-17 21:31 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux-pm mailing list, Alan Cox

On 08/17/2009 11:15 PM, Greg KH wrote:
> Oh wait, I think this is only needed on top of the rest of the tty tree,
> Linus's tree should not need this.
> 
> But I think Jiri is tracking down something in this area, Jiri?

Yes, but I think it's unrelated. My problem lies probably somewhere in
kernel/cpu.c.

Anyway I use the following. The function is called with interrupts
disabled during resume. Won't it help you by a chance?

commit e5a02f5ee04b20aa84295c4912259d4fa5b7642b
Author: Jiri Slaby <jirislaby@gmail.com>
Date:   Thu Aug 13 21:53:18 2009 +0200

    fix load_debug_register locking

diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index c1f64e6..bc5368d 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -80,17 +80,15 @@ void load_debug_registers(void)
        unsigned long flags;
        struct task_struct *tsk = current;

-       spin_lock_bh(&hw_breakpoint_lock);
+       spin_lock_irqsave(&hw_breakpoint_lock, flags);

        /* Prevent IPIs for new kernel breakpoint updates */
-       local_irq_save(flags);
        arch_update_kernel_hw_breakpoint(NULL);
-       local_irq_restore(flags);

        if (test_tsk_thread_flag(tsk, TIF_DEBUG))
                arch_install_thread_hw_breakpoint(tsk);

-       spin_unlock_bh(&hw_breakpoint_lock);
+       spin_unlock_irqrestore(&hw_breakpoint_lock, flags);
 }

 /*

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 21:31         ` Jiri Slaby
@ 2009-08-17 21:33           ` Jiri Slaby
  0 siblings, 0 replies; 33+ messages in thread
From: Jiri Slaby @ 2009-08-17 21:33 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux-pm mailing list, Alan Cox

On 08/17/2009 11:31 PM, Jiri Slaby wrote:
> Anyway I use the following. The function is called with interrupts
> disabled during resume. Won't it help you by a chance?

No way, sorry, this is also a -next thing.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 21:21     ` Rafael J. Wysocki
@ 2009-08-17 21:50       ` Alan Stern
  0 siblings, 0 replies; 33+ messages in thread
From: Alan Stern @ 2009-08-17 21:50 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg KH, Linux-pm mailing list, Alan Cox

On Mon, 17 Aug 2009, Rafael J. Wysocki wrote:

> On Monday 17 August 2009, Alan Stern wrote:
> > On Mon, 17 Aug 2009, Rafael J. Wysocki wrote:
> ...
> > 
> > (That's from the serial log; it wasn't on the screen.)
> > 
> > It appears that some part of the resume messed up the VT console
> > driver.
> 
> Hm, perhaps the no_console_suspend thing doesn't really work on this machine?

It _used_ to work.  I hadn't tried it for a while before this.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-17 20:53   ` Alan Stern
  2009-08-17 21:14     ` Greg KH
  2009-08-17 21:21     ` Rafael J. Wysocki
@ 2009-08-18 16:07     ` Alan Stern
  2009-08-18 23:22       ` Rafael J. Wysocki
  2 siblings, 1 reply; 33+ messages in thread
From: Alan Stern @ 2009-08-18 16:07 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg KH, Linux-pm mailing list, Alan Cox

On Mon, 17 Aug 2009, Alan Stern wrote:

> It appears that some part of the resume messed up the VT console
> driver.

I have narrowed this down.  The problem occurs in agp_intel_resume()
in drivers/char/agp/intel-agp.c.  Here's the beginning of the routine:


static int agp_intel_resume(struct pci_dev *pdev)
{
	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
	int ret_val;

	pci_restore_state(pdev);

	/* We should restore our graphics device's config space,
	 * as host bridge (00:00) resumes before graphics device (02:00),
	 * then our access to its pci space can work right.
	 */
	if (intel_private.pcidev)
		pci_restore_state(intel_private.pcidev);


As the comment says, pdev is 0000:00:00.0 and intel_private.pcidev is
0000:00:02.0.  So this is the resume routine for 00:00.0, and it calls
pci_restore_state() for 00:02.0 before that device has been resumed.

Note that there is no corresponding agp_intel_suspend() function.

Stuff stops appearing on the screen in the middle of the second
pci_restore_state() call.  That is, I see messages about "restoring
config space at offset..." for each of the two devices, but a
debugging message added at the end of pci_restore_state() doesn't
appear for the second call.

(Should these config space changes occur at all, given that I'm
testing with "echo devices >pm_test"?)

It's also worth noting that a debugging message added to the start of
pci_restore_state() shows that for both of these calls,
pdev->state_saved is false.  It's not clear whether that matters,
though, because the suspend and resume routines in the PCI core do so
many calls to pci_save_state() and pci_restore_state() on their own.

Commenting out the second call to pci_restore_state() apparently fixes 
the problem.  I have no idea whether it's the right thing to do, 
though.

Does all this suggest any ideas?

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-18 16:07     ` Alan Stern
@ 2009-08-18 23:22       ` Rafael J. Wysocki
  2009-08-19  2:01         ` Zhenyu Wang
  2009-08-19 14:26         ` Alan Stern
  0 siblings, 2 replies; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-18 23:22 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Jesse Barnes, Zhenyu Wang, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Tuesday 18 August 2009, Alan Stern wrote:
> On Mon, 17 Aug 2009, Alan Stern wrote:
> 
> > It appears that some part of the resume messed up the VT console
> > driver.
> 
> I have narrowed this down.  The problem occurs in agp_intel_resume()
> in drivers/char/agp/intel-agp.c.  Here's the beginning of the routine:
> 
> 
> static int agp_intel_resume(struct pci_dev *pdev)
> {
> 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
> 	int ret_val;
> 
> 	pci_restore_state(pdev);
> 
> 	/* We should restore our graphics device's config space,
> 	 * as host bridge (00:00) resumes before graphics device (02:00),
> 	 * then our access to its pci space can work right.
> 	 */
> 	if (intel_private.pcidev)
> 		pci_restore_state(intel_private.pcidev);
> 
> 
> As the comment says, pdev is 0000:00:00.0 and intel_private.pcidev is
> 0000:00:02.0.  So this is the resume routine for 00:00.0, and it calls
> pci_restore_state() for 00:02.0 before that device has been resumed.
> 
> Note that there is no corresponding agp_intel_suspend() function.
> 
> Stuff stops appearing on the screen in the middle of the second
> pci_restore_state() call.  That is, I see messages about "restoring
> config space at offset..." for each of the two devices, but a
> debugging message added at the end of pci_restore_state() doesn't
> appear for the second call.
> 
> (Should these config space changes occur at all, given that I'm
> testing with "echo devices >pm_test"?)
> 
> It's also worth noting that a debugging message added to the start of
> pci_restore_state() shows that for both of these calls,
> pdev->state_saved is false.  It's not clear whether that matters,
> though, because the suspend and resume routines in the PCI core do so
> many calls to pci_save_state() and pci_restore_state() on their own.
> 
> Commenting out the second call to pci_restore_state() apparently fixes 
> the problem.  I have no idea whether it's the right thing to do, 
> though.

It is.  The PCI core have restored the PCI config already anyway at the early
resume stage.

I think the first pci_restore_state() could be dropped from there as well.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-18 23:22       ` Rafael J. Wysocki
@ 2009-08-19  2:01         ` Zhenyu Wang
  2009-08-19 14:42           ` Alan Stern
  2009-08-19 14:26         ` Alan Stern
  1 sibling, 1 reply; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-19  2:01 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, Zhenyu Wang, Jesse Barnes, Dave Airlie,
	Linux-pm mailing list, Alan Cox


[-- Attachment #1.1: Type: text/plain, Size: 2819 bytes --]

On 2009.08.19 01:22:16 +0200, Rafael J. Wysocki wrote:
> > 
> > I have narrowed this down.  The problem occurs in agp_intel_resume()
> > in drivers/char/agp/intel-agp.c.  Here's the beginning of the routine:
> > 
> > 
> > static int agp_intel_resume(struct pci_dev *pdev)
> > {
> > 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
> > 	int ret_val;
> > 
> > 	pci_restore_state(pdev);
> > 
> > 	/* We should restore our graphics device's config space,
> > 	 * as host bridge (00:00) resumes before graphics device (02:00),
> > 	 * then our access to its pci space can work right.
> > 	 */
> > 	if (intel_private.pcidev)
> > 		pci_restore_state(intel_private.pcidev);
> > 
> > 
> > As the comment says, pdev is 0000:00:00.0 and intel_private.pcidev is
> > 0000:00:02.0.  So this is the resume routine for 00:00.0, and it calls
> > pci_restore_state() for 00:02.0 before that device has been resumed.
> > 
> > Note that there is no corresponding agp_intel_suspend() function.
> > 
> > Stuff stops appearing on the screen in the middle of the second
> > pci_restore_state() call.  That is, I see messages about "restoring
> > config space at offset..." for each of the two devices, but a
> > debugging message added at the end of pci_restore_state() doesn't
> > appear for the second call.
> > 
> > (Should these config space changes occur at all, given that I'm
> > testing with "echo devices >pm_test"?)
> > 
> > It's also worth noting that a debugging message added to the start of
> > pci_restore_state() shows that for both of these calls,
> > pdev->state_saved is false.  It's not clear whether that matters,
> > though, because the suspend and resume routines in the PCI core do so
> > many calls to pci_save_state() and pci_restore_state() on their own.
> > 
> > Commenting out the second call to pci_restore_state() apparently fixes 
> > the problem.  I have no idea whether it's the right thing to do, 
> > though.
> 
> It is.  The PCI core have restored the PCI config already anyway at the early
> resume stage.
> 
> I think the first pci_restore_state() could be dropped from there as well.
> 

Rafael, as I added this restore long time ago, pci core has changed in some way?
We had problem when reconfigure agp GTT space in resume, as we must be sure
gfx device's config space has been restored properly, and as 02:00 gfx device
restored later than host bridge 00:00 device, that came to my origin patch to
restore it earlier. So do you mean this order issue is gone now?

We also do proper pci save/restore in drm/i915 driver, which is the real pci
driver for our gfx device. I'm not sure if there could any conflict between them...

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-18 23:22       ` Rafael J. Wysocki
  2009-08-19  2:01         ` Zhenyu Wang
@ 2009-08-19 14:26         ` Alan Stern
  2009-08-19 21:22           ` Rafael J. Wysocki
  1 sibling, 1 reply; 33+ messages in thread
From: Alan Stern @ 2009-08-19 14:26 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, Jesse Barnes, Zhenyu Wang, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:

> > Commenting out the second call to pci_restore_state() apparently fixes 
> > the problem.  I have no idea whether it's the right thing to do, 
> > though.
> 
> It is.  The PCI core have restored the PCI config already anyway at the early
> resume stage.
> 
> I think the first pci_restore_state() could be dropped from there as well.

What about the other AGP drivers in drivers/char/agp?  Looks like their
suspend and resume routines could all use some updating.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-19  2:01         ` Zhenyu Wang
@ 2009-08-19 14:42           ` Alan Stern
  2009-08-20  1:05             ` Zhenyu Wang
  0 siblings, 1 reply; 33+ messages in thread
From: Alan Stern @ 2009-08-19 14:42 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox

On Wed, 19 Aug 2009, Zhenyu Wang wrote:

> Rafael, as I added this restore long time ago, pci core has changed in some way?
> We had problem when reconfigure agp GTT space in resume, as we must be sure
> gfx device's config space has been restored properly, and as 02:00 gfx device
> restored later than host bridge 00:00 device, that came to my origin patch to
> restore it earlier.

Why did you do it that way?  I mean, why not restore the gfx device's 
config space in its own resume routine instead of in the host bridge's 
resume routine?

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-19 14:26         ` Alan Stern
@ 2009-08-19 21:22           ` Rafael J. Wysocki
  2009-08-20 15:17             ` Alan Stern
  2009-08-20 15:41             ` Rafael J. Wysocki
  0 siblings, 2 replies; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-19 21:22 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Jesse Barnes, Zhenyu Wang, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Wednesday 19 August 2009, Alan Stern wrote:
> On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> 
> > > Commenting out the second call to pci_restore_state() apparently fixes 
> > > the problem.  I have no idea whether it's the right thing to do, 
> > > though.
> > 
> > It is.  The PCI core have restored the PCI config already anyway at the early
> > resume stage.
> > 
> > I think the first pci_restore_state() could be dropped from there as well.
> 
> What about the other AGP drivers in drivers/char/agp?  Looks like their
> suspend and resume routines could all use some updating.

As well as many other drivers. :-)

Usually, however, restoring the PCI config space twice doesn't hurt, although
it evidently does hurt on your system.

Hm, there's a patch that should help here I think.  Can you please test
this one: http://patchwork.kernel.org/patch/40062/ ?

Best,
Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-19 14:42           ` Alan Stern
@ 2009-08-20  1:05             ` Zhenyu Wang
  2009-08-20 14:03               ` Alan Stern
  2009-08-20 15:34               ` Rafael J. Wysocki
  0 siblings, 2 replies; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-20  1:05 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox


[-- Attachment #1.1: Type: text/plain, Size: 1298 bytes --]

On 2009.08.19 10:42:07 -0400, Alan Stern wrote:
> On Wed, 19 Aug 2009, Zhenyu Wang wrote:
> 
> > Rafael, as I added this restore long time ago, pci core has changed in some way?
> > We had problem when reconfigure agp GTT space in resume, as we must be sure
> > gfx device's config space has been restored properly, and as 02:00 gfx device
> > restored later than host bridge 00:00 device, that came to my origin patch to
> > restore it earlier.
> 
> Why did you do it that way?  I mean, why not restore the gfx device's 
> config space in its own resume routine instead of in the host bridge's 
> resume routine?
> 

That's the order issue I have mentioned. intel_agp is the pci driver for
host bridge (dev 00:00), and drm/i915 is the pci driver for gfx device
(dev 00:02). Host bridge will always resume earlier than gfx device, but
for intel_agp we need to access gfx device when reconfigure GTT in resume,
we can't wait until restore happen in i915 driver.

So there might be a conflict here, as i915 driver also do pci_restore_state()
after we did reconfigure in intel_agp driver, some configs may be corrupted 
then. Although I haven't seen it in real testing. 

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-20  1:05             ` Zhenyu Wang
@ 2009-08-20 14:03               ` Alan Stern
  2009-08-21  1:17                 ` Zhenyu Wang
  2009-08-20 15:34               ` Rafael J. Wysocki
  1 sibling, 1 reply; 33+ messages in thread
From: Alan Stern @ 2009-08-20 14:03 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox

On Thu, 20 Aug 2009, Zhenyu Wang wrote:

> On 2009.08.19 10:42:07 -0400, Alan Stern wrote:
> > On Wed, 19 Aug 2009, Zhenyu Wang wrote:
> > 
> > > Rafael, as I added this restore long time ago, pci core has changed in some way?
> > > We had problem when reconfigure agp GTT space in resume, as we must be sure
> > > gfx device's config space has been restored properly, and as 02:00 gfx device
> > > restored later than host bridge 00:00 device, that came to my origin patch to
> > > restore it earlier.
> > 
> > Why did you do it that way?  I mean, why not restore the gfx device's 
> > config space in its own resume routine instead of in the host bridge's 
> > resume routine?
> > 
> 
> That's the order issue I have mentioned. intel_agp is the pci driver for
> host bridge (dev 00:00), and drm/i915 is the pci driver for gfx device
> (dev 00:02). Host bridge will always resume earlier than gfx device, but
> for intel_agp we need to access gfx device when reconfigure GTT in resume,
> we can't wait until restore happen in i915 driver.
> 
> So there might be a conflict here, as i915 driver also do pci_restore_state()
> after we did reconfigure in intel_agp driver, some configs may be corrupted 
> then. Although I haven't seen it in real testing. 

This might be a silly question, but why don't you see the same problem 
during system initialization?  The host bridge will be probed before 
the gfx device, so you can't access the gfx device while initializing 
the GTT.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-19 21:22           ` Rafael J. Wysocki
@ 2009-08-20 15:17             ` Alan Stern
  2009-08-20 16:17               ` Rafael J. Wysocki
  2009-08-21  1:21               ` Zhenyu Wang
  2009-08-20 15:41             ` Rafael J. Wysocki
  1 sibling, 2 replies; 33+ messages in thread
From: Alan Stern @ 2009-08-20 15:17 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, Jesse Barnes, Zhenyu Wang, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:

> Usually, however, restoring the PCI config space twice doesn't hurt, although
> it evidently does hurt on your system.
> 
> Hm, there's a patch that should help here I think.  Can you please test
> this one: http://patchwork.kernel.org/patch/40062/ ?

Testing confirms that Alex's patch (pci: check saved state before
restore) fixes the resume problem.  IMO it should be merged before
2.6.31 is released.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-20  1:05             ` Zhenyu Wang
  2009-08-20 14:03               ` Alan Stern
@ 2009-08-20 15:34               ` Rafael J. Wysocki
  1 sibling, 0 replies; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-20 15:34 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox

On Thursday 20 August 2009, Zhenyu Wang wrote:
> On 2009.08.19 10:42:07 -0400, Alan Stern wrote:
> > On Wed, 19 Aug 2009, Zhenyu Wang wrote:
> > 
> > > Rafael, as I added this restore long time ago, pci core has changed in some way?
> > > We had problem when reconfigure agp GTT space in resume, as we must be sure
> > > gfx device's config space has been restored properly, and as 02:00 gfx device
> > > restored later than host bridge 00:00 device, that came to my origin patch to
> > > restore it earlier.
> > 
> > Why did you do it that way?  I mean, why not restore the gfx device's 
> > config space in its own resume routine instead of in the host bridge's 
> > resume routine?
> > 
> 
> That's the order issue I have mentioned. intel_agp is the pci driver for
> host bridge (dev 00:00), and drm/i915 is the pci driver for gfx device
> (dev 00:02). Host bridge will always resume earlier than gfx device, but
> for intel_agp we need to access gfx device when reconfigure GTT in resume,
> we can't wait until restore happen in i915 driver.
> 
> So there might be a conflict here, as i915 driver also do pci_restore_state()
> after we did reconfigure in intel_agp driver, some configs may be corrupted 
> then. Although I haven't seen it in real testing. 

I think that shouldn't be a problem any more in the 2.6.29 and later kernels,
because the PCI standard config registers are now restored by the PCI bus
code at the early resume stage.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-19 21:22           ` Rafael J. Wysocki
  2009-08-20 15:17             ` Alan Stern
@ 2009-08-20 15:41             ` Rafael J. Wysocki
  2009-08-20 16:05               ` Jesse Barnes
  1 sibling, 1 reply; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-20 15:41 UTC (permalink / raw)
  To: linux-pm
  Cc: Greg KH, Zhenyu Wang, Alek Du, Jesse Barnes, Dave Airlie, Alan Cox

On Wednesday 19 August 2009, Rafael J. Wysocki wrote:
> On Wednesday 19 August 2009, Alan Stern wrote:
> > On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> > 
> > > > Commenting out the second call to pci_restore_state() apparently fixes 
> > > > the problem.  I have no idea whether it's the right thing to do, 
> > > > though.
> > > 
> > > It is.  The PCI core have restored the PCI config already anyway at the early
> > > resume stage.
> > > 
> > > I think the first pci_restore_state() could be dropped from there as well.
> > 
> > What about the other AGP drivers in drivers/char/agp?  Looks like their
> > suspend and resume routines could all use some updating.
> 
> As well as many other drivers. :-)
> 
> Usually, however, restoring the PCI config space twice doesn't hurt, although
> it evidently does hurt on your system.
> 
> Hm, there's a patch that should help here I think.  Can you please test
> this one: http://patchwork.kernel.org/patch/40062/ ?

Quoting the patch for completness.

---
From: Alek Du <alek.du@intel.com>
Subject: [PATCH] pci: check saved state before restore

Without the check, the config space may be filled with zeros. Though
the driver should try to avoid call restoring before saving, but the
pci layer also should check this.

Also removed the existing check in pci_restore_standard_config.

Signed-off-by: Alek Du <alek.du@intel.com>
---
 drivers/pci/pci-driver.c |    2 +-
 drivers/pci/pci.c        |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index d76c4c8..f99bc7f 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -508,7 +508,7 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev)
 			return error;
 	}
 
-	return pci_dev->state_saved ? pci_restore_state(pci_dev) : 0;
+	return pci_restore_state(pci_dev);
 }
 
 static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index dbd0f94..7b70312 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -846,6 +846,8 @@ pci_restore_state(struct pci_dev *dev)
 	int i;
 	u32 val;
 
+	if (!dev->state_saved)
+		return 0;
 	/* PCI Express register must be restored first */
 	pci_restore_pcie_state(dev);
 
-- 

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-20 15:41             ` Rafael J. Wysocki
@ 2009-08-20 16:05               ` Jesse Barnes
  0 siblings, 0 replies; 33+ messages in thread
From: Jesse Barnes @ 2009-08-20 16:05 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, Zhenyu Wang, Alek Du, Dave Airlie, linux-pm, Alan Cox

On Thu, 20 Aug 2009 17:41:06 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Wednesday 19 August 2009, Rafael J. Wysocki wrote:
> > On Wednesday 19 August 2009, Alan Stern wrote:
> > > On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> > > 
> > > > > Commenting out the second call to pci_restore_state()
> > > > > apparently fixes the problem.  I have no idea whether it's
> > > > > the right thing to do, though.
> > > > 
> > > > It is.  The PCI core have restored the PCI config already
> > > > anyway at the early resume stage.
> > > > 
> > > > I think the first pci_restore_state() could be dropped from
> > > > there as well.
> > > 
> > > What about the other AGP drivers in drivers/char/agp?  Looks like
> > > their suspend and resume routines could all use some updating.
> > 
> > As well as many other drivers. :-)
> > 
> > Usually, however, restoring the PCI config space twice doesn't
> > hurt, although it evidently does hurt on your system.
> > 
> > Hm, there's a patch that should help here I think.  Can you please
> > test this one: http://patchwork.kernel.org/patch/40062/ ?
> 
> Quoting the patch for completness.
> 
> ---
> From: Alek Du <alek.du@intel.com>
> Subject: [PATCH] pci: check saved state before restore

Ok, I'll send that over to Linus.  I'd been holding off on it since it
didn't actually fix any external reports.  But now that we have one...

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-20 15:17             ` Alan Stern
@ 2009-08-20 16:17               ` Rafael J. Wysocki
  2009-08-21  1:21               ` Zhenyu Wang
  1 sibling, 0 replies; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-20 16:17 UTC (permalink / raw)
  To: Alan Stern, Jesse Barnes
  Cc: Greg KH, Linux-pm mailing list, Zhenyu Wang, Alan Cox, Dave Airlie

On Thursday 20 August 2009, Alan Stern wrote:
> On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> 
> > Usually, however, restoring the PCI config space twice doesn't hurt, although
> > it evidently does hurt on your system.
> > 
> > Hm, there's a patch that should help here I think.  Can you please test
> > this one: http://patchwork.kernel.org/patch/40062/ ?
> 
> Testing confirms that Alex's patch (pci: check saved state before
> restore) fixes the resume problem.

Thanks for the confirmation.

> IMO it should be merged before 2.6.31 is released.

Well, that's a Jesse's decision, I've already acked the patch.

There is a small risk related to it, though, because it's going to affect
all of the drivers that do their own pci_restore_state().

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-20 14:03               ` Alan Stern
@ 2009-08-21  1:17                 ` Zhenyu Wang
  0 siblings, 0 replies; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-21  1:17 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox


[-- Attachment #1.1: Type: text/plain, Size: 442 bytes --]

On 2009.08.20 10:03:54 -0400, Alan Stern wrote:
> This might be a silly question, but why don't you see the same problem 
> during system initialization?  The host bridge will be probed before 
> the gfx device, so you can't access the gfx device while initializing 
> the GTT.
> 

intel_agp trys to get gfx device when probe.

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-20 15:17             ` Alan Stern
  2009-08-20 16:17               ` Rafael J. Wysocki
@ 2009-08-21  1:21               ` Zhenyu Wang
  2009-08-21  3:13                 ` Zhenyu Wang
  1 sibling, 1 reply; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-21  1:21 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox


[-- Attachment #1.1: Type: text/plain, Size: 2503 bytes --]

On 2009.08.20 11:17:45 -0400, Alan Stern wrote:
> On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> 
> > Usually, however, restoring the PCI config space twice doesn't hurt, although
> > it evidently does hurt on your system.
> > 
> > Hm, there's a patch that should help here I think.  Can you please test
> > this one: http://patchwork.kernel.org/patch/40062/ ?
> 
> Testing confirms that Alex's patch (pci: check saved state before
> restore) fixes the resume problem.  IMO it should be merged before
> 2.6.31 is released.
> 

I can't understand why Alex's patch could fix for you, or because you've
seen 'state_saved' is false in your testing, and Alex's patch just workaround
state restore for you? I don't understand why 'state_saved' is false in your
case, as pci layer should do save state for us by default, no?

Could you try with this one? And what's your gfx chip? I've tested rc6 on my
965GM yesterday, S3/S4 both seem fine...

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 8c9d50d..1f3a299 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -2303,6 +2303,12 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev)
 }
 
 #ifdef CONFIG_PM
+static int agp_intel_suspend(struct pci_dev *pdev)
+{
+	pci_save_state(dev);
+	pci_set_power_state(dev, 3);
+}
+
 static int agp_intel_resume(struct pci_dev *pdev)
 {
 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
@@ -2410,6 +2416,7 @@ static struct pci_driver agp_intel_pci_driver = {
 	.remove		= __devexit_p(agp_intel_remove),
 #ifdef CONFIG_PM
 	.resume		= agp_intel_resume,
+	.suspend	= agp_intel_suspend,
 #endif
 };
 
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index fc4b68a..f54880f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -95,7 +95,11 @@ static int i915_resume(struct drm_device *dev)
 	int ret = 0;
 
 	pci_set_power_state(dev->pdev, PCI_D0);
-	pci_restore_state(dev->pdev);
+	/* XXX as pci layer should have already early restore state
+	   for us, or intel_agp driver has taken care of reconfigure,
+	   we don't need to restore again here, which might corrupt
+	   reconfigured state...*/
+	/* pci_restore_state(dev->pdev); */
 	if (pci_enable_device(dev->pdev))
 		return -1;
 	pci_set_master(dev->pdev);

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-21  1:21               ` Zhenyu Wang
@ 2009-08-21  3:13                 ` Zhenyu Wang
  2009-08-21 14:32                   ` Alan Stern
  0 siblings, 1 reply; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-21  3:13 UTC (permalink / raw)
  To: Alan Stern, Rafael J. Wysocki, Greg KH, Linux-pm mailing list


[-- Attachment #1.1: Type: text/plain, Size: 2673 bytes --]

On 2009.08.21 09:21:32 +0800, Zhenyu Wang wrote:
> On 2009.08.20 11:17:45 -0400, Alan Stern wrote:
> > On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> > 
> > > Usually, however, restoring the PCI config space twice doesn't hurt, although
> > > it evidently does hurt on your system.
> > > 
> > > Hm, there's a patch that should help here I think.  Can you please test
> > > this one: http://patchwork.kernel.org/patch/40062/ ?
> > 
> > Testing confirms that Alex's patch (pci: check saved state before
> > restore) fixes the resume problem.  IMO it should be merged before
> > 2.6.31 is released.
> > 
> 
> I can't understand why Alex's patch could fix for you, or because you've
> seen 'state_saved' is false in your testing, and Alex's patch just workaround
> state restore for you? I don't understand why 'state_saved' is false in your
> case, as pci layer should do save state for us by default, no?
> 
> Could you try with this one? And what's your gfx chip? I've tested rc6 on my
> 965GM yesterday, S3/S4 both seem fine...
> 

oops, here's right one for testing...

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 8c9d50d..5ed62c1 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -2303,6 +2303,13 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev)
 }
 
 #ifdef CONFIG_PM
+static int agp_intel_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+	pci_save_state(pdev);
+	pci_set_power_state(pdev, 3);
+	return 0;
+}
+
 static int agp_intel_resume(struct pci_dev *pdev)
 {
 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
@@ -2410,6 +2417,7 @@ static struct pci_driver agp_intel_pci_driver = {
 	.remove		= __devexit_p(agp_intel_remove),
 #ifdef CONFIG_PM
 	.resume		= agp_intel_resume,
+	.suspend	= agp_intel_suspend,
 #endif
 };
 
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index fc4b68a..f54880f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -95,7 +95,11 @@ static int i915_resume(struct drm_device *dev)
 	int ret = 0;
 
 	pci_set_power_state(dev->pdev, PCI_D0);
-	pci_restore_state(dev->pdev);
+	/* XXX as pci layer should have already early restore state
+	   for us, or intel_agp driver has taken care of reconfigure,
+	   we don't need to restore again here, which might corrupt
+	   reconfigured state...*/
+	/* pci_restore_state(dev->pdev); */
 	if (pci_enable_device(dev->pdev))
 		return -1;
 	pci_set_master(dev->pdev);
-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-21  3:13                 ` Zhenyu Wang
@ 2009-08-21 14:32                   ` Alan Stern
  2009-08-21 17:01                     ` Rafael J. Wysocki
  2009-08-24  1:30                     ` Zhenyu Wang
  0 siblings, 2 replies; 33+ messages in thread
From: Alan Stern @ 2009-08-21 14:32 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox

On Fri, 21 Aug 2009, Zhenyu Wang wrote:

> > I can't understand why Alex's patch could fix for you, or because you've
> > seen 'state_saved' is false in your testing, and Alex's patch just workaround
> > state restore for you? I don't understand why 'state_saved' is false in your
> > case, as pci layer should do save state for us by default, no?

The PCI layer _does_ save the state, in pci_legacy_suspend_late().  
And then in pci_pm_default_resume_noirq() it restores the state and
sets state_saved to false.  That's why state_saved is false when
agp_intel_resume() runs.

> > Could you try with this one? And what's your gfx chip?

00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)


> oops, here's right one for testing...
> 
> diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> index 8c9d50d..5ed62c1 100644
> --- a/drivers/char/agp/intel-agp.c
> +++ b/drivers/char/agp/intel-agp.c
> @@ -2303,6 +2303,13 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev)
>  }
>  
>  #ifdef CONFIG_PM
> +static int agp_intel_suspend(struct pci_dev *pdev, pm_message_t state)
> +{
> +	pci_save_state(pdev);
> +	pci_set_power_state(pdev, 3);
> +	return 0;
> +}

I don't think this will help.  The state _is_ getting saved, so saving
it again won't make any difference.  The problem occurs because the
state is restored at the wrong time.

> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index fc4b68a..f54880f 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -95,7 +95,11 @@ static int i915_resume(struct drm_device *dev)
>  	int ret = 0;
>  
>  	pci_set_power_state(dev->pdev, PCI_D0);
> -	pci_restore_state(dev->pdev);
> +	/* XXX as pci layer should have already early restore state
> +	   for us, or intel_agp driver has taken care of reconfigure,
> +	   we don't need to restore again here, which might corrupt
> +	   reconfigured state...*/
> +	/* pci_restore_state(dev->pdev); */
>  	if (pci_enable_device(dev->pdev))
>  		return -1;
>  	pci_set_master(dev->pdev);

And I don't think this will help since I don't have a 915 controller.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-21 14:32                   ` Alan Stern
@ 2009-08-21 17:01                     ` Rafael J. Wysocki
  2009-08-24  2:34                       ` Zhenyu Wang
  2009-08-24  1:30                     ` Zhenyu Wang
  1 sibling, 1 reply; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-21 17:01 UTC (permalink / raw)
  To: Alan Stern, Zhenyu Wang
  Cc: Greg KH, Alek Du, Jesse Barnes, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Friday 21 August 2009, Alan Stern wrote:
> On Fri, 21 Aug 2009, Zhenyu Wang wrote:
> 
> > > I can't understand why Alex's patch could fix for you, or because you've
> > > seen 'state_saved' is false in your testing, and Alex's patch just workaround
> > > state restore for you? I don't understand why 'state_saved' is false in your
> > > case, as pci layer should do save state for us by default, no?
> 
> The PCI layer _does_ save the state, in pci_legacy_suspend_late().  
> And then in pci_pm_default_resume_noirq() it restores the state and
> sets state_saved to false.  That's why state_saved is false when
> agp_intel_resume() runs.
> 
> > > Could you try with this one? And what's your gfx chip?
> 
> 00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
> 
> 
> > oops, here's right one for testing...
> > 
> > diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> > index 8c9d50d..5ed62c1 100644
> > --- a/drivers/char/agp/intel-agp.c
> > +++ b/drivers/char/agp/intel-agp.c
> > @@ -2303,6 +2303,13 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev)
> >  }
> >  
> >  #ifdef CONFIG_PM
> > +static int agp_intel_suspend(struct pci_dev *pdev, pm_message_t state)
> > +{
> > +	pci_save_state(pdev);
> > +	pci_set_power_state(pdev, 3);
> > +	return 0;
> > +}
> 
> I don't think this will help.  The state _is_ getting saved, so saving
> it again won't make any difference.  The problem occurs because the
> state is restored at the wrong time.

Yes.  Moreover, it doesn't need to be restored at that point, because it has
already been restored earlier by the PCI bus type code.

So, Zhenyu, it is completely unnecessary to call pci_restore_state() from
a driver's ->resume() routine, because the PCI bus type driver has
already called it in its ->resume_noirq().  And please note that
pci_pm_default_resume_noirq() clears state_saved, which is why the Alek's
patch helps.

Without the Alek's patch on the Alan's system the config registers of both
PCI devices are restored twice, first by the PCI bus type at the "noirq" stage
and next by the driver.  The Alek's patch turns the second restorations into
NOPs, which is fine, because they are unnecessary in general and they break
things on the Alan's system.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-21 14:32                   ` Alan Stern
  2009-08-21 17:01                     ` Rafael J. Wysocki
@ 2009-08-24  1:30                     ` Zhenyu Wang
  1 sibling, 0 replies; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-24  1:30 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Jesse Barnes, Dave Airlie, Linux-pm mailing list, Alan Cox


[-- Attachment #1.1: Type: text/plain, Size: 1584 bytes --]

On 2009.08.21 10:32:22 -0400, Alan Stern wrote:
> > > Could you try with this one? And what's your gfx chip?
> 
> 00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
> 
> I don't think this will help.  The state _is_ getting saved, so saving
> it again won't make any difference.  The problem occurs because the
> state is restored at the wrong time.

oh, that's old chip, it looks later chip doesn't have this problem.

> 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index fc4b68a..f54880f 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -95,7 +95,11 @@ static int i915_resume(struct drm_device *dev)
> >  	int ret = 0;
> >  
> >  	pci_set_power_state(dev->pdev, PCI_D0);
> > -	pci_restore_state(dev->pdev);
> > +	/* XXX as pci layer should have already early restore state
> > +	   for us, or intel_agp driver has taken care of reconfigure,
> > +	   we don't need to restore again here, which might corrupt
> > +	   reconfigured state...*/
> > +	/* pci_restore_state(dev->pdev); */
> >  	if (pci_enable_device(dev->pdev))
> >  		return -1;
> >  	pci_set_master(dev->pdev);
> 
> And I don't think this will help since I don't have a 915 controller.
> 

This's only for other possible graphics problem involved in suspend/resume,
and drm/i915 should also work for your 845G. ;)

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-21 17:01                     ` Rafael J. Wysocki
@ 2009-08-24  2:34                       ` Zhenyu Wang
  2009-08-24 18:55                         ` Rafael J. Wysocki
                                           ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Zhenyu Wang @ 2009-08-24  2:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, Jesse Barnes, Alek Du, Dave Airlie,
	Linux-pm mailing list, Alan Cox


[-- Attachment #1.1: Type: text/plain, Size: 3151 bytes --]

On 2009.08.21 19:01:06 +0200, Rafael J. Wysocki wrote:
> Yes.  Moreover, it doesn't need to be restored at that point, because it has
> already been restored earlier by the PCI bus type code.

true.

> 
> So, Zhenyu, it is completely unnecessary to call pci_restore_state() from
> a driver's ->resume() routine, because the PCI bus type driver has
> already called it in its ->resume_noirq().  And please note that
> pci_pm_default_resume_noirq() clears state_saved, which is why the Alek's
> patch helps.
> 
> Without the Alek's patch on the Alan's system the config registers of both
> PCI devices are restored twice, first by the PCI bus type at the "noirq" stage
> and next by the driver.  The Alek's patch turns the second restorations into
> NOPs, which is fine, because they are unnecessary in general and they break
> things on the Alan's system.
> 

yeah, Alex's patch is ok in general, and Alan's problem seems specific on 845G.
So the origin restore order issue for us seems gone with pci layer early resume,
we could remove the restore in intel_agp and drm/i915, although Alex's patch makes
them noop.

How about this one? Alan, could you help to test this with drm/i915 module loaded?

thanks.

From 7ab123a67e3ab3f31051d95e74362ae711e0657e Mon Sep 17 00:00:00 2001
From: Zhenyu Wang <zhenyuw@linux.intel.com>
Date: Mon, 24 Aug 2009 10:29:07 +0800
Subject: [PATCH] agp/intel: remove restore in resume

As earlier pci driver resume has already restored space for
host bridge and graphics device, don't need to restore it
again which might cause problem on some chips, e.g 845G tested
by Alan.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/char/agp/intel-agp.c    |    9 ---------
 drivers/gpu/drm/i915/i915_drv.c |    1 -
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 8c9d50d..ed43ab2 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -2308,15 +2308,6 @@ static int agp_intel_resume(struct pci_dev *pdev)
 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
 	int ret_val;
 
-	pci_restore_state(pdev);
-
-	/* We should restore our graphics device's config space,
-	 * as host bridge (00:00) resumes before graphics device (02:00),
-	 * then our access to its pci space can work right.
-	 */
-	if (intel_private.pcidev)
-		pci_restore_state(intel_private.pcidev);
-
 	if (bridge->driver == &intel_generic_driver)
 		intel_configure();
 	else if (bridge->driver == &intel_850_driver)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index fc4b68a..645f298 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -95,7 +95,6 @@ static int i915_resume(struct drm_device *dev)
 	int ret = 0;
 
 	pci_set_power_state(dev->pdev, PCI_D0);
-	pci_restore_state(dev->pdev);
 	if (pci_enable_device(dev->pdev))
 		return -1;
 	pci_set_master(dev->pdev);
-- 
1.5.4

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-24  2:34                       ` Zhenyu Wang
@ 2009-08-24 18:55                         ` Rafael J. Wysocki
  2009-08-25  0:59                         ` Alan Stern
  2009-08-27 14:51                         ` Alan Stern
  2 siblings, 0 replies; 33+ messages in thread
From: Rafael J. Wysocki @ 2009-08-24 18:55 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Alek Du, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Monday 24 August 2009, Zhenyu Wang wrote:
> On 2009.08.21 19:01:06 +0200, Rafael J. Wysocki wrote:
> > Yes.  Moreover, it doesn't need to be restored at that point, because it has
> > already been restored earlier by the PCI bus type code.
> 
> true.
> 
> > 
> > So, Zhenyu, it is completely unnecessary to call pci_restore_state() from
> > a driver's ->resume() routine, because the PCI bus type driver has
> > already called it in its ->resume_noirq().  And please note that
> > pci_pm_default_resume_noirq() clears state_saved, which is why the Alek's
> > patch helps.
> > 
> > Without the Alek's patch on the Alan's system the config registers of both
> > PCI devices are restored twice, first by the PCI bus type at the "noirq" stage
> > and next by the driver.  The Alek's patch turns the second restorations into
> > NOPs, which is fine, because they are unnecessary in general and they break
> > things on the Alan's system.
> > 
> 
> yeah, Alex's patch is ok in general, and Alan's problem seems specific on 845G.
> So the origin restore order issue for us seems gone with pci layer early resume,
> we could remove the restore in intel_agp and drm/i915, although Alex's patch makes
> them noop.
> 
> How about this one? Alan, could you help to test this with drm/i915 module loaded?
> 
> thanks.
> 
> From 7ab123a67e3ab3f31051d95e74362ae711e0657e Mon Sep 17 00:00:00 2001
> From: Zhenyu Wang <zhenyuw@linux.intel.com>
> Date: Mon, 24 Aug 2009 10:29:07 +0800
> Subject: [PATCH] agp/intel: remove restore in resume
> 
> As earlier pci driver resume has already restored space for
> host bridge and graphics device, don't need to restore it
> again which might cause problem on some chips, e.g 845G tested
> by Alan.
> 
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> ---
>  drivers/char/agp/intel-agp.c    |    9 ---------
>  drivers/gpu/drm/i915/i915_drv.c |    1 -
>  2 files changed, 0 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> index 8c9d50d..ed43ab2 100644
> --- a/drivers/char/agp/intel-agp.c
> +++ b/drivers/char/agp/intel-agp.c
> @@ -2308,15 +2308,6 @@ static int agp_intel_resume(struct pci_dev *pdev)
>  	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
>  	int ret_val;
>  
> -	pci_restore_state(pdev);
> -
> -	/* We should restore our graphics device's config space,
> -	 * as host bridge (00:00) resumes before graphics device (02:00),
> -	 * then our access to its pci space can work right.
> -	 */
> -	if (intel_private.pcidev)
> -		pci_restore_state(intel_private.pcidev);
> -
>  	if (bridge->driver == &intel_generic_driver)
>  		intel_configure();
>  	else if (bridge->driver == &intel_850_driver)
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index fc4b68a..645f298 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -95,7 +95,6 @@ static int i915_resume(struct drm_device *dev)
>  	int ret = 0;
>  
>  	pci_set_power_state(dev->pdev, PCI_D0);
> -	pci_restore_state(dev->pdev);

You can also drop the pci_set_power_state() above, the device is already in D0
at this point.

>  	if (pci_enable_device(dev->pdev))
>  		return -1;
>  	pci_set_master(dev->pdev);
> 

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-24  2:34                       ` Zhenyu Wang
  2009-08-24 18:55                         ` Rafael J. Wysocki
@ 2009-08-25  0:59                         ` Alan Stern
  2009-08-27 14:51                         ` Alan Stern
  2 siblings, 0 replies; 33+ messages in thread
From: Alan Stern @ 2009-08-25  0:59 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Alek Du, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Mon, 24 Aug 2009, Zhenyu Wang wrote:

> yeah, Alex's patch is ok in general, and Alan's problem seems specific on 845G.
> So the origin restore order issue for us seems gone with pci layer early resume,
> we could remove the restore in intel_agp and drm/i915, although Alex's patch makes
> them noop.
> 
> How about this one? Alan, could you help to test this with drm/i915 module loaded?

I can't test it right now.  I'll do it later in the week.

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-24  2:34                       ` Zhenyu Wang
  2009-08-24 18:55                         ` Rafael J. Wysocki
  2009-08-25  0:59                         ` Alan Stern
@ 2009-08-27 14:51                         ` Alan Stern
  2009-08-27 16:18                           ` Jesse Barnes
  2 siblings, 1 reply; 33+ messages in thread
From: Alan Stern @ 2009-08-27 14:51 UTC (permalink / raw)
  To: Zhenyu Wang
  Cc: Greg KH, Jesse Barnes, Alek Du, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Mon, 24 Aug 2009, Zhenyu Wang wrote:

> yeah, Alex's patch is ok in general, and Alan's problem seems specific on 845G.
> So the origin restore order issue for us seems gone with pci layer early resume,
> we could remove the restore in intel_agp and drm/i915, although Alex's patch makes
> them noop.
> 
> How about this one? Alan, could you help to test this with drm/i915 module loaded?
> 
> thanks.
> 
> From 7ab123a67e3ab3f31051d95e74362ae711e0657e Mon Sep 17 00:00:00 2001
> From: Zhenyu Wang <zhenyuw@linux.intel.com>
> Date: Mon, 24 Aug 2009 10:29:07 +0800
> Subject: [PATCH] agp/intel: remove restore in resume
> 
> As earlier pci driver resume has already restored space for
> host bridge and graphics device, don't need to restore it
> again which might cause problem on some chips, e.g 845G tested
> by Alan.
> 
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> ---
>  drivers/char/agp/intel-agp.c    |    9 ---------
>  drivers/gpu/drm/i915/i915_drv.c |    1 -
>  2 files changed, 0 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> index 8c9d50d..ed43ab2 100644
> --- a/drivers/char/agp/intel-agp.c
> +++ b/drivers/char/agp/intel-agp.c
> @@ -2308,15 +2308,6 @@ static int agp_intel_resume(struct pci_dev *pdev)
>  	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
>  	int ret_val;
>  
> -	pci_restore_state(pdev);
> -
> -	/* We should restore our graphics device's config space,
> -	 * as host bridge (00:00) resumes before graphics device (02:00),
> -	 * then our access to its pci space can work right.
> -	 */
> -	if (intel_private.pcidev)
> -		pci_restore_state(intel_private.pcidev);
> -
>  	if (bridge->driver == &intel_generic_driver)
>  		intel_configure();
>  	else if (bridge->driver == &intel_850_driver)
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index fc4b68a..645f298 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -95,7 +95,6 @@ static int i915_resume(struct drm_device *dev)
>  	int ret = 0;
>  
>  	pci_set_power_state(dev->pdev, PCI_D0);
> -	pci_restore_state(dev->pdev);
>  	if (pci_enable_device(dev->pdev))
>  		return -1;
>  	pci_set_master(dev->pdev);

I tested the following configurations (each with your patch applied):

	Without Alex's patch and without i915 loaded;

	With Alex's patch and without i915 loaded;

	With Alex's patch and with i915 loaded.

They all worked.  (Note that I normally run without drm/i915.  The Xorg 
2D-acceleration code is buggy on my hardware, so I don't use it.)

Alan Stern

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: Suspend problems in 2.6.31-rc6
  2009-08-27 14:51                         ` Alan Stern
@ 2009-08-27 16:18                           ` Jesse Barnes
  0 siblings, 0 replies; 33+ messages in thread
From: Jesse Barnes @ 2009-08-27 16:18 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Zhenyu Wang, Alek Du, Dave Airlie,
	Linux-pm mailing list, Alan Cox

On Thu, 27 Aug 2009 10:51:47 -0400 (EDT)
Alan Stern <stern@rowland.harvard.edu> wrote:

> On Mon, 24 Aug 2009, Zhenyu Wang wrote:
> 
> > yeah, Alex's patch is ok in general, and Alan's problem seems
> > specific on 845G. So the origin restore order issue for us seems
> > gone with pci layer early resume, we could remove the restore in
> > intel_agp and drm/i915, although Alex's patch makes them noop.
> > 
> > How about this one? Alan, could you help to test this with drm/i915
> > module loaded?
> > 
> > thanks.
> > 
> > From 7ab123a67e3ab3f31051d95e74362ae711e0657e Mon Sep 17 00:00:00
> > 2001 From: Zhenyu Wang <zhenyuw@linux.intel.com>
> > Date: Mon, 24 Aug 2009 10:29:07 +0800
> > Subject: [PATCH] agp/intel: remove restore in resume
> > 
> > As earlier pci driver resume has already restored space for
> > host bridge and graphics device, don't need to restore it
> > again which might cause problem on some chips, e.g 845G tested
> > by Alan.
> > 
> > Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> > ---
> >  drivers/char/agp/intel-agp.c    |    9 ---------
> >  drivers/gpu/drm/i915/i915_drv.c |    1 -
> >  2 files changed, 0 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/char/agp/intel-agp.c
> > b/drivers/char/agp/intel-agp.c index 8c9d50d..ed43ab2 100644
> > --- a/drivers/char/agp/intel-agp.c
> > +++ b/drivers/char/agp/intel-agp.c
> > @@ -2308,15 +2308,6 @@ static int agp_intel_resume(struct pci_dev
> > *pdev) struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
> >  	int ret_val;
> >  
> > -	pci_restore_state(pdev);
> > -
> > -	/* We should restore our graphics device's config space,
> > -	 * as host bridge (00:00) resumes before graphics device
> > (02:00),
> > -	 * then our access to its pci space can work right.
> > -	 */
> > -	if (intel_private.pcidev)
> > -		pci_restore_state(intel_private.pcidev);
> > -
> >  	if (bridge->driver == &intel_generic_driver)
> >  		intel_configure();
> >  	else if (bridge->driver == &intel_850_driver)
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > b/drivers/gpu/drm/i915/i915_drv.c index fc4b68a..645f298 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -95,7 +95,6 @@ static int i915_resume(struct drm_device *dev)
> >  	int ret = 0;
> >  
> >  	pci_set_power_state(dev->pdev, PCI_D0);
> > -	pci_restore_state(dev->pdev);
> >  	if (pci_enable_device(dev->pdev))
> >  		return -1;
> >  	pci_set_master(dev->pdev);
> 
> I tested the following configurations (each with your patch applied):
> 
> 	Without Alex's patch and without i915 loaded;
> 
> 	With Alex's patch and without i915 loaded;
> 
> 	With Alex's patch and with i915 loaded.
> 
> They all worked.  (Note that I normally run without drm/i915.  The
> Xorg 2D-acceleration code is buggy on my hardware, so I don't use it.)

Could I convince you to file bugs for the problems you're seeing at
bugs.freedesktop.org?  We don't have many 845G test machines but we
have fixed several problems on that chipset recently.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2009-08-27 16:18 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-17 15:11 Suspend problems in 2.6.31-rc6 Alan Stern
2009-08-17 18:28 ` Rafael J. Wysocki
2009-08-17 20:53   ` Alan Stern
2009-08-17 21:14     ` Greg KH
2009-08-17 21:15       ` Greg KH
2009-08-17 21:31         ` Jiri Slaby
2009-08-17 21:33           ` Jiri Slaby
2009-08-17 21:21     ` Rafael J. Wysocki
2009-08-17 21:50       ` Alan Stern
2009-08-18 16:07     ` Alan Stern
2009-08-18 23:22       ` Rafael J. Wysocki
2009-08-19  2:01         ` Zhenyu Wang
2009-08-19 14:42           ` Alan Stern
2009-08-20  1:05             ` Zhenyu Wang
2009-08-20 14:03               ` Alan Stern
2009-08-21  1:17                 ` Zhenyu Wang
2009-08-20 15:34               ` Rafael J. Wysocki
2009-08-19 14:26         ` Alan Stern
2009-08-19 21:22           ` Rafael J. Wysocki
2009-08-20 15:17             ` Alan Stern
2009-08-20 16:17               ` Rafael J. Wysocki
2009-08-21  1:21               ` Zhenyu Wang
2009-08-21  3:13                 ` Zhenyu Wang
2009-08-21 14:32                   ` Alan Stern
2009-08-21 17:01                     ` Rafael J. Wysocki
2009-08-24  2:34                       ` Zhenyu Wang
2009-08-24 18:55                         ` Rafael J. Wysocki
2009-08-25  0:59                         ` Alan Stern
2009-08-27 14:51                         ` Alan Stern
2009-08-27 16:18                           ` Jesse Barnes
2009-08-24  1:30                     ` Zhenyu Wang
2009-08-20 15:41             ` Rafael J. Wysocki
2009-08-20 16:05               ` Jesse Barnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.