[PATCH] [POWERPC v2] Add a comment about the Book-e tophys/tovirt macros

Paul Mackerras paulus at samba.org
Sat May 17 16:10:06 EST 2008


Kumar Gala writes:

> +/*
> + * We use addis to ensure compatiblity with the "classic" ppc versions
> + * of these macros that might have rs as 0, which means a value of 0
> + * not r0
> + */
>  #define tophys(rd,rs)				\
>  	addis	rd,rs,0

Still seems clear as mud.  I think you're trying to say that some
callers use rs = 0 to get the tophys offset in rd, rather than
converting the address in r0, and so this version has to do that too
(i.e. set register rd to 0 when rs == 0)?

Paul.



More information about the Linuxppc-dev mailing list