public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: ppc-dev <linuxppc-dev@ozlabs•org>, paulus@samba•org
Subject: Re: [POWERPC] fix cell pmu initialisation
Date: Tue, 5 Dec 2006 14:34:07 +0100	[thread overview]
Message-ID: <200612051434.07917.arnd@arndb.de> (raw)
In-Reply-To: <20061205155414.4afdcc77.sfr@canb.auug.org.au>

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 <><

  reply	other threads:[~2006-12-05 13:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05  4:54 [POWERPC] fix cell pmu initialisation Stephen Rothwell
2006-12-05 13:34 ` Arnd Bergmann [this message]
2006-12-05 20:07   ` Benjamin Herrenschmidt
2006-12-05 22:21     ` Michael Ellerman
2006-12-05 22:31       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612051434.07917.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox