public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.21-rc3-mm2: BUG: at drivers/pci/pci.c:679 pci_restore_state during suspend testing
@ 2007-03-09  0:13 Rafael J. Wysocki
  2007-03-10  3:00 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2007-03-09  0:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML

Hi,

I get the following traces from 2.6.21-rc3-mm2 during the "resume" phase
of testing with 'echo test > /sys/power/disk && echo disk > /sys/power/state':

acpi thermal:00: resuming
pci 0000:00:00.0: resuming
pcieport-driver 0000:00:01.0: resuming
BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
 [<ffffffff803ab3e9>] pci_restore_state+0x229/0x270
 [<ffffffff803b10f9>] pcie_portdrv_restore_config+0x19/0x40
 [<ffffffff803b1171>] pcie_portdrv_resume+0x11/0x20
 [<ffffffff803ad92c>] pci_device_resume+0x2c/0x70
 [<ffffffff80411d41>] resume_device+0xe1/0x160
 [<ffffffff80411e69>] dpm_resume+0xa9/0x110
 [<ffffffff80411f18>] device_resume+0x48/0x60
 [<ffffffff802bb355>] pm_suspend_disk+0x235/0x250
 [<ffffffff802b99c5>] enter_state+0x65/0x250
 [<ffffffff802b9c2a>] state_store+0x7a/0xa0
 [<ffffffff80316734>] subsys_attr_store+0x24/0x30
 [<ffffffff803168a0>] sysfs_write_file+0x100/0x140
 [<ffffffff802181cf>] vfs_write+0xdf/0x180
 [<ffffffff80218d10>] sys_write+0x50/0x90
 [<ffffffff8026529e>] system_call+0x7e/0x83

PCI: Setting latency timer of device 0000:00:01.0 to 64
pcieport-driver 0000:00:02.0: resuming
BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
 [<ffffffff803ab3e9>] pci_restore_state+0x229/0x270
 [<ffffffff803b10f9>] pcie_portdrv_restore_config+0x19/0x40
 [<ffffffff803b1171>] pcie_portdrv_resume+0x11/0x20
 [<ffffffff803ad92c>] pci_device_resume+0x2c/0x70
 [<ffffffff80411d41>] resume_device+0xe1/0x160
 [<ffffffff80411e69>] dpm_resume+0xa9/0x110
 [<ffffffff80411f18>] device_resume+0x48/0x60
 [<ffffffff802bb355>] pm_suspend_disk+0x235/0x250
 [<ffffffff802b99c5>] enter_state+0x65/0x250
 [<ffffffff802b9c2a>] state_store+0x7a/0xa0
 [<ffffffff80316734>] subsys_attr_store+0x24/0x30
 [<ffffffff803168a0>] sysfs_write_file+0x100/0x140
 [<ffffffff802181cf>] vfs_write+0xdf/0x180
 [<ffffffff80218d10>] sys_write+0x50/0x90
 [<ffffffff8026529e>] system_call+0x7e/0x83

PCI: Setting latency timer of device 0000:00:02.0 to 64
agpgart-amd64 0000:00:04.0: resuming
pci 0000:00:05.0: resuming
PCI: Setting latency timer of device 0000:00:05.0 to 64
pci 0000:00:06.0: resuming
PCI: Setting latency timer of device 0000:00:06.0 to 64
pci 0000:00:07.0: resuming
pci 0000:00:07.1: resuming
Intel ICH 0000:00:08.0: resuming
ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18
uli526x 0000:00:11.0: resuming
ACPI: PCI Interrupt 0000:00:11.0[A] -> GSI 17 (level, low) -> IRQ 17
pci 0000:00:12.0: resuming
sata_uli 0000:00:12.1: resuming
ACPI: PCI Interrupt 0000:00:12.1[A] -> GSI 19 (level, low) -> IRQ 19
ohci_hcd 0000:00:13.0: resuming
ACPI: PCI Interrupt 0000:00:13.0[A] -> GSI 20 (level, low) -> IRQ 20
ohci_hcd 0000:00:13.1: resuming
ACPI: PCI Interrupt 0000:00:13.1[B] -> GSI 21 (level, low) -> IRQ 21
ohci_hcd 0000:00:13.2: resuming
ACPI: PCI Interrupt 0000:00:13.2[C] -> GSI 22 (level, low) -> IRQ 22
ehci_hcd 0000:00:13.3: resuming
PCI: Enabling device 0000:00:13.3 (0000 -> 0002)
ACPI: PCI Interrupt 0000:00:13.3[D] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:13.3 to 64
PM: Writing back config space on device 0000:00:13.3 at offset f (was 20100400, writing 20100405)
PM: Writing back config space on device 0000:00:13.3 at offset 4 (was 0, writing ff6fe800)
PM: Writing back config space on device 0000:00:13.3 at offset 3 (was 804000, writing 802010)
PM: Writing back config space on device 0000:00:13.3 at offset 1 (was 2b00006, writing 2b00116)
pci 0000:00:18.0: resuming
pci 0000:00:18.1: resuming
pci 0000:00:18.2: resuming
k8temp 0000:00:18.3: resuming
pci 0000:01:00.0: resuming
BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
 [<ffffffff803ab3e9>] pci_restore_state+0x229/0x270
 [<ffffffff803ad93a>] pci_device_resume+0x3a/0x70
 [<ffffffff80411d41>] resume_device+0xe1/0x160
 [<ffffffff80411e69>] dpm_resume+0xa9/0x110
 [<ffffffff80411f18>] device_resume+0x48/0x60
 [<ffffffff802bb355>] pm_suspend_disk+0x235/0x250
 [<ffffffff802b99c5>] enter_state+0x65/0x250
 [<ffffffff802b9c2a>] state_store+0x7a/0xa0
 [<ffffffff80316734>] subsys_attr_store+0x24/0x30
 [<ffffffff803168a0>] sysfs_write_file+0x100/0x140
 [<ffffffff802181cf>] vfs_write+0xdf/0x180
 [<ffffffff80218d10>] sys_write+0x50/0x90
 [<ffffffff8026529e>] system_call+0x7e/0x83

pci 0000:01:00.1: resuming
BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
 [<ffffffff803ab3e9>] pci_restore_state+0x229/0x270
 [<ffffffff803ad93a>] pci_device_resume+0x3a/0x70
 [<ffffffff80411d41>] resume_device+0xe1/0x160
 [<ffffffff80411e69>] dpm_resume+0xa9/0x110
 [<ffffffff80411f18>] device_resume+0x48/0x60
 [<ffffffff802bb355>] pm_suspend_disk+0x235/0x250
 [<ffffffff802b99c5>] enter_state+0x65/0x250
 [<ffffffff802b9c2a>] state_store+0x7a/0xa0
 [<ffffffff80316734>] subsys_attr_store+0x24/0x30
 [<ffffffff803168a0>] sysfs_write_file+0x100/0x140
 [<ffffffff802181cf>] vfs_write+0xdf/0x180
 [<ffffffff80218d10>] sys_write+0x50/0x90
 [<ffffffff8026529e>] system_call+0x7e/0x83

8139too 0000:04:06.0: resuming

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

* Re: 2.6.21-rc3-mm2: BUG: at drivers/pci/pci.c:679 pci_restore_state during suspend testing
  2007-03-09  0:13 2.6.21-rc3-mm2: BUG: at drivers/pci/pci.c:679 pci_restore_state during suspend testing Rafael J. Wysocki
@ 2007-03-10  3:00 ` Andrew Morton
  2007-03-10  4:00   ` Eric W. Biederman
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2007-03-10  3:00 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Eric W. Biederman

> On Fri, 9 Mar 2007 01:13:14 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> I get the following traces from 2.6.21-rc3-mm2 during the "resume" phase
> of testing with 'echo test > /sys/power/disk && echo disk > /sys/power/state':
> 
> acpi thermal:00: resuming
> pci 0000:00:00.0: resuming
> pcieport-driver 0000:00:01.0: resuming
> BUG: at drivers/pci/pci.c:679 pci_restore_state()
> 
> Call Trace:
>  [<ffffffff803ab3e9>] pci_restore_state+0x229/0x270
>  [<ffffffff803b10f9>] pcie_portdrv_restore_config+0x19/0x40
>  [<ffffffff803b1171>] pcie_portdrv_resume+0x11/0x20
>  [<ffffffff803ad92c>] pci_device_resume+0x2c/0x70
>  [<ffffffff80411d41>] resume_device+0xe1/0x160
>  [<ffffffff80411e69>] dpm_resume+0xa9/0x110
>  [<ffffffff80411f18>] device_resume+0x48/0x60
>  [<ffffffff802bb355>] pm_suspend_disk+0x235/0x250
>  [<ffffffff802b99c5>] enter_state+0x65/0x250
>  [<ffffffff802b9c2a>] state_store+0x7a/0xa0
>  [<ffffffff80316734>] subsys_attr_store+0x24/0x30
>  [<ffffffff803168a0>] sysfs_write_file+0x100/0x140
>  [<ffffffff802181cf>] vfs_write+0xdf/0x180
>  [<ffffffff80218d10>] sys_write+0x50/0x90
>  [<ffffffff8026529e>] system_call+0x7e/0x83

Yes, a number of people (including myself) have been hitting these
new warnings.  I don't think we know why yet, but Eric is offline
for a bit and I'm travelling.  We'll sort it out over the next few
weeks I guess.

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

* Re: 2.6.21-rc3-mm2: BUG: at drivers/pci/pci.c:679 pci_restore_state during suspend testing
  2007-03-10  3:00 ` Andrew Morton
@ 2007-03-10  4:00   ` Eric W. Biederman
  0 siblings, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2007-03-10  4:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Rafael J. Wysocki, linux-kernel

Andrew Morton <akpm@linux-foundation.org> writes:

>> On Fri, 9 Mar 2007 01:13:14 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>> I get the following traces from 2.6.21-rc3-mm2 during the "resume" phase
>> of testing with 'echo test > /sys/power/disk && echo disk > /sys/power/state':
>> 
>> acpi thermal:00: resuming
>> pci 0000:00:00.0: resuming
>> pcieport-driver 0000:00:01.0: resuming
>> BUG: at drivers/pci/pci.c:679 pci_restore_state()
>> 
>> Call Trace:
>>  [<ffffffff803ab3e9>] pci_restore_state+0x229/0x270
>>  [<ffffffff803b10f9>] pcie_portdrv_restore_config+0x19/0x40
>>  [<ffffffff803b1171>] pcie_portdrv_resume+0x11/0x20
>>  [<ffffffff803ad92c>] pci_device_resume+0x2c/0x70
>>  [<ffffffff80411d41>] resume_device+0xe1/0x160
>>  [<ffffffff80411e69>] dpm_resume+0xa9/0x110
>>  [<ffffffff80411f18>] device_resume+0x48/0x60
>>  [<ffffffff802bb355>] pm_suspend_disk+0x235/0x250
>>  [<ffffffff802b99c5>] enter_state+0x65/0x250
>>  [<ffffffff802b9c2a>] state_store+0x7a/0xa0
>>  [<ffffffff80316734>] subsys_attr_store+0x24/0x30
>>  [<ffffffff803168a0>] sysfs_write_file+0x100/0x140
>>  [<ffffffff802181cf>] vfs_write+0xdf/0x180
>>  [<ffffffff80218d10>] sys_write+0x50/0x90
>>  [<ffffffff8026529e>] system_call+0x7e/0x83
>
> Yes, a number of people (including myself) have been hitting these
> new warnings.  I don't think we know why yet, but Eric is offline
> for a bit and I'm travelling.  We'll sort it out over the next few
> weeks I guess.

I'm online again.  I had fun getting caught in the trailing edge of a blizzard
in Nebraska earlier but I have found my way back to my apartment and my computer 
and friends.

Jeff Garzik is the one who really spotted what the problem is.  He pointed
out that pci_save_state and pci_restore_state have not historically required
being paired (as the usually are during suspend and resume) and there is
a practical use in resetting devices for not requiring them to be paired.

The recent additions to pci_save_state and pci_restore_state for the msi,
pci-e, pci-x all assumed those calls would be paired, and thus allocated
a buffer on save and freed the buffer and restore.

My WARN_ON's tested to ensure all of the buffers were freed.

However drivers like the tg3 that use pci_save/restore_state for more than
just suspend/resume wind up triggering the warning.

I have recently sent out two patches to remove the pairing requirement
but I haven't figured out suspend/resume for any of my machines so I
couldn't test them.

Eric

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

end of thread, other threads:[~2007-03-10  4:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09  0:13 2.6.21-rc3-mm2: BUG: at drivers/pci/pci.c:679 pci_restore_state during suspend testing Rafael J. Wysocki
2007-03-10  3:00 ` Andrew Morton
2007-03-10  4:00   ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox