[parisc-linux] System bus walk patch

Helge Deller deller@gmx.de
Fri, 2 Feb 2001 23:22:16 +0100


> > +#ifdef __LP64__
> > +#define FPA 0xFFFFFFFFFFF80000 /* Fixed Physical Address - Location of
> > the Central Bus */ +#else /* !__LP64__ */
> > +#define FPA 0xFFF80000         /* Fixed Physical Address - Location of
> > the Central Bus */ +#endif /* __LP64__ */
>
> I'm sure there's a way to do this without #ifdef's... something like
>
> #define FPA (unsigned long)-80000
>
> but perhaps that feels obfuscated -- after all we're after an address here.
>
> #define FPA ((unsigned long)(signed int)0xfff80000)

or just as I did it in led.c
#define KITTYHAWK_LCD_CMD  (0xfffffffff0190000UL) /* 64bit-ready */ 
which is automatically casted by the compiler ?

Helge