lkml.org 
[lkml]   [2008]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Regression from 2.6.26: Hibernation (possibly suspend) broken on Toshiba R500 (bisected)
Date
On Wednesday, 3 of December 2008, Rafael J. Wysocki wrote:
> On Wednesday, 3 of December 2008, Linus Torvalds wrote:
> >
> > On Wed, 3 Dec 2008, Rafael J. Wysocki wrote:
> > >
> > > Here's the output of 'lspci -vvxxx':
> >
> > Ok, I'm not finding any documented quirks that would be memory regions,
> > and in fact it doesn't look like there is even any remotely likely 32-bit
> > valies that might be pointers in your PCI config space that look remotely
> > like they might be conflicting in the area of MMIO space that we allocate
> > PCI resources from (ie 0x88000000-0x92000000).
> >
> > Of course, any odd MMIO regions might be descibed by some insane model
> > that doesn't look like an aligned 32-bit value, but that's unlikely.
> >
> > So I'm still not seeing anything wrong in there.
> >
> > > I'll run the 'pci=cbmemsize=4M' test tomorrow (need to have some sleep).
> >
> > Sure. It will be interesting to see if it makes any difference.
>
> It didn't help (failure in the 4th consecutive hibernation/resume cycle).

Moreover, to check if the problem may be related to the prefetch window,
I added the appended patch on top of -rc7 (instead of the previous debug
patch), which resulted in the following layout in /proc/iomem:

88000000-8dffffff : PCI Bus 0000:03
88000000-8bffffff : PCI CardBus 0000:04
8c000000-8c003fff : 0000:03:0b.1
8c004000-8c004fff : 0000:03:0b.0
8c004000-8c004fff : yenta_socket
8c005000-8c0057ff : 0000:03:0b.1
8c005000-8c0057ff : firewire_ohci
8c005800-8c0058ff : 0000:03:0b.3
8c005800-8c0058ff : mmc0
8c400000-8c7fffff : PCI CardBus 0000:04

and the first hibernation-resume cycle failed.

Thanks,
Rafael

---
drivers/pci/setup-bus.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -353,6 +353,25 @@ static int pbus_size_mem(struct pci_bus
r_size = resource_size(r);
/* For bridges size != alignment */
align = resource_alignment(r);
+ if (r->flags & IORESOURCE_PREFETCH) {
+ resource_size_t expected_align;
+
+ expected_align = (i < PCI_BRIDGE_RESOURCES) ?
+ r_size : r->start;
+ if (align != expected_align) {
+ dev_warn(&dev->dev,
+ "BAR %d [%llx-%llx] "
+ "alignment issue: flags=%lx "
+ "align=%llx (%llx)\n", i,
+ (unsigned long long)r->start,
+ (unsigned long long)r->end,
+ r->flags,
+ (unsigned long long)align,
+ (unsigned long long)expected_align);
+ /* Hacky and wrong, but trying to keep things */
+ align = expected_align;
+ }
+ }
order = __ffs(align) - 20;
if (order > 11) {
dev_warn(&dev->dev, "BAR %d bad alignment %llx: "

\
 
 \ /
  Last update: 2008-12-03 08:55    [W:1.722 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site