Subject: Re: [POWERPC] fix cell pmu initialisation

From: Arnd Bergmann <[email-masked]>
Date: Tue, 5 Dec 2006 14:34:07 +0100

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)
> =A0{
> =A0=A0=A0=A0=A0=A0=A0=A0unsigned int irq;
> =A0=A0=A0=A0=A0=A0=A0=A0int rc, node;
> =A0
> +=A0=A0=A0=A0=A0=A0=A0if (!machine_is(cell))
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return 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=20
   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 <><