Re: Regression from 2.6.26: Hibernation (possibly suspend) brokenon Toshiba R500 (bisected)

From: Linus Torvalds
Date: Mon Dec 01 2008 - 22:32:59 EST

On Tue, 2 Dec 2008, Rafael J. Wysocki wrote:
> r_size = resource_size(r);
> /* For bridges size != alignment */
> - align = resource_alignment(r);
> + align = (i < PCI_BRIDGE_RESOURCES) ? r_size : r->start;

Hmm. This means that something set the alignment flags incorrectly. The
resource _should_ have IORESOURCE_SIZEALIGN set for a resource with size
alignment, and IORESOURCE_STARTALIGN for one that has start alignment.

Your patch doesn't fix anything, it just hides the bug.

It would be good to hear what resource this is, and where it got set. So
instead of that broken patch that just hides the problem, please try to
debug it with something like

resource_size_t expected_align;

expected_align = (i < PCI_BRIDGE_RESOURCES) ? r_size : r->start;
align = resource_alignment(r);
if (align != expected_align) {
"BAR %d %llx-%llx wrong alignment flags %lx %llx (%llx)\n",
(unsigned long long) r->start,
(unsigned long long) r->end,
(unsigned long long) align,
(unsigned long long) expected_align);
/* Hacky and wrong, but trying to keep things
align = expected_align;

or something like that. And then we just need to figure out which setup
routine sets the wrong alignment flag,.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at