[POWERPC] fix cell pmu initialisation
Arnd Bergmann
arnd at arndb.de
Wed Dec 6 00:34:07 EST 2006
On Tuesday 05 December 2006 05:54, Stephen Rothwell wrote:
> -int __init cbe_init_pm_irq(void)
> +static int __init cbe_init_pm_irq(void)
> {
> unsigned int irq;
> int rc, node;
>
> + if (!machine_is(cell))
> + return 0;
> +
This looks like a working fix at the moment, but it will break if we
add machine more descriptions have these registers.
I see three options here how to solve this:
1. export a method from cbe_regs.c to find out whether the pmd
regs are available and test that in cbe_init_pm_irq().
2. take you patch as is, with a comment hinting to fix it up
when needed.
3. change cbe_init_pm_irq to be called explicitly from cbe_regs_init(),
which already scans the device tree correctly.
Arnd <><
More information about the Linuxppc-dev
mailing list