]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: Modify some ppc_asm.h macros to accomodate 64-bits Book3E
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 23 Jul 2009 23:15:20 +0000 (23:15 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 20 Aug 2009 00:12:40 +0000 (10:12 +1000)
The way I intend to use tophys/tovirt on 64-bit BookE is different
from the "trick" that we currently play for 32-bit BookE so change
the condition of definition of these macros to make it so.

Also, make sure we only use rfid and mtmsrd instead of rfi and mtmsr
for 64-bit server processors, not all 64-bit processors.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/include/asm/ppc_asm.h

index f9729529c20d2a2339951216cf9ed565c73491a6..dfae6e916dfbd04ef04a9fa9379840bfc980cbc3 100644 (file)
@@ -375,8 +375,15 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
 #define PPC440EP_ERR42
 #endif
 
-
-#if defined(CONFIG_BOOKE)
+/*
+ * toreal/fromreal/tophys/tovirt macros. 32-bit BookE makes them
+ * keep the address intact to be compatible with code shared with
+ * 32-bit classic.
+ *
+ * On the other hand, I find it useful to have them behave as expected
+ * by their name (ie always do the addition) on 64-bit BookE
+ */
+#if defined(CONFIG_BOOKE) && !defined(CONFIG_PPC64)
 #define toreal(rd)
 #define fromreal(rd)
 
@@ -426,10 +433,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
        .previous
 #endif
 
-#ifdef CONFIG_PPC64
+#ifdef CONFIG_PPC_BOOK3S_64
 #define RFI            rfid
 #define MTMSRD(r)      mtmsrd  r
-
 #else
 #define FIX_SRR1(ra, rb)
 #ifndef CONFIG_40x