[OpenBIOS] [RFC v2] ppc: SDR1 fixes
Segher Boessenkool
segher at kernel.crashing.org
Sun Nov 21 01:10:39 CET 2010
> Signed-off-by: Andreas Färber <andreas.faerber at web.de>
Acked-by: Segher Boessenkool <segher at kernel.crashing.org>
But one change please...
> +#ifdef __powerpc64__
> + return 1UL << (sdr1 & 0x1f);
> +#else
> + return (((sdr1 & 0x1ff) << 10) | 0x3ff) + 1;
> +#endif
((sdr1 & 0x1ff) + 1) << 10
looks a bit less silly :-)
I'm not sure you got the size calculations right, but let's assume
you tested it :-)
Segher
More information about the OpenBIOS
mailing list