Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Thomas Schlichter (schlicht@uni-mannheim.de)
Thu, 10 Jul 2003 12:49:27 +0200


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:
> > 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/