Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out
From: Thomas Schlichter <hidden>
Date: 2003-07-10 10:35:08
Also in:
lkml
On Thursday 10 July 2003 12:30, William Lee Irwin III wrote:
On Thu, Jul 10, 2003 at 11:59:49AM +0200, Thomas Schlichter wrote:quoted
And I don't know why everybody hates my patches... ;-(
That was just fun, but OK, I forgot the 'fun' tags... ;-)
It's not that anyone hates them, it's that pass 1: the semantics (0 == empty cpu set) needed preserving
Well the original code already had 2 different semantics: In the MP case it returned the mask of currently allowed CPUs which should have been 1 for UP but was 0... So as the value returned by apm_save_cpus() was only used for apm_restore_cpus () I optimized it away. Which was just an other change of the semantics...ACK
pass 2: remove code instead of changing redundant stuff
ACK
NFI YTF gcc doesn't optimize out the whole shebang. At any rate, if we're pounding APM BIOS calls or apm_power_off() like wild monkeys there's something far more disturbing going wrong than 64B of code gcc couldn't optimize (it's probably due to some jump target being aligned to death or some such nonsense).
OK, I see you're right and your actual patch looks better to me because it makes the semantics consistent! So come on and let's take it into the tree...! Thomas -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>