[PATCH 5/6] Support for the Ebony 440GP reference board in arch/powerpc

Olof Johansson olof at lixom.net
Sun May 6 05:02:44 EST 2007


On Sat, May 05, 2007 at 01:43:01PM -0500, Milton Miller wrote:
> Olof wrote:
> 
> > > +static void ebony_exit(void)
> > > +{
> > > +     unsigned long tmp;
> > > +
> > > +     asm volatile (
> > > +             "mfspr  %0,%1\n"
> > > +             "oris   %0,%0,%2 at h\n"
> > > +             "mtspr  %1,%0"
> > > +             : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
> >
> > You don't have to pass in the constants here, you can specify them in
> > the asm. Makes it a little more readable.
> 
> How?   CPP doesn't apply inside the strings.
> 
> Did you mean because these defines were immediately above:
> 
> > > +> +#define SPRN_DBCR0           0x134
> > > +#define   DBCR0_RST_SYSTEM   0x30000000
> 
> could just be comments in the asm?
> 
> That works until someone moves them to an include file.

Hm, I thought i had done that in the past myself. I guess not. Nevermind
then.


-Olof



More information about the Linuxppc-dev mailing list