* [PATCH] [POWERPC v2] Add a comment about the Book-e tophys/tovirt macros
@ 2008-05-16 19:20 Kumar Gala
2008-05-17 6:10 ` Paul Mackerras
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2008-05-16 19:20 UTC (permalink / raw)
To: linuxppc-dev
The Book-E versions of tophys/tovirt are not simple noops to
ensure compatibility with their "classic" ppc brethren.
---
Fix my grammar.. why I bother is beyond me.
- k
include/asm-powerpc/ppc_asm.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index 2dbd4e7..668c887 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -356,6 +356,11 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
#define toreal(rd)
#define fromreal(rd)
+/*
+ * 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
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [POWERPC v2] Add a comment about the Book-e tophys/tovirt macros
2008-05-16 19:20 [PATCH] [POWERPC v2] Add a comment about the Book-e tophys/tovirt macros Kumar Gala
@ 2008-05-17 6:10 ` Paul Mackerras
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2008-05-17 6:10 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-17 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 19:20 [PATCH] [POWERPC v2] Add a comment about the Book-e tophys/tovirt macros Kumar Gala
2008-05-17 6:10 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).