[linux-pm] [PATCH 3/7] PCI PM: Fix saving of device state in pci_legacy_suspend

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Feb 4 20:06:10 PST 2009


> Well I'm glad you listened to me when I told you not to fire off a rant
> email before I had another look at it ;)
> 
> Because Arjan has patched the generic bug.h so that we at least get the
> printk on powerpc, and then use our version of __WARN().

Right. A deep breath later or two ... the current upstream code in
pci-driver.c doesn't have a message, which is why I didn't see it. The
-new- code from Rafael does, and it would work thanks to Arjan fix. Now
I should indeed stop listening to you telling me it's broken before I
get a chance to verify it :-)

> As far as the code gen, with gcc 4.3.1 (debian).

 .../...

> So it's jumping over the if body, rather than moving it out of the
> straight line. It is hinting it right, so we should check if that helps
> us at all.

Right, gcc is full of sh*t as usual. Now try replacing the magic trap
which we still use in there, with a normal C function call (ie branch
out of line), see if it makes a difference. The trap statement uses an
inline asm statement and I know for a fact that the mere existence of
such a thing will make gcc already dubious idea of whether to go out of
line or not completely bonkers.

Cheers,
Ben.




More information about the linux-pm mailing list