aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-07-23 19:15:20 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-19 20:12:40 -0400
commit44c58ccc8dc25f78a4f641901f17092c93dd0458 (patch)
treeb995a96edcc23c509580751cc923a161e969c1c8 /arch/powerpc
parenta245067e204f69c69abf92d94fc45ec65bf1f07e (diff)
powerpc: Modify some ppc_asm.h macros to accomodate 64-bits Book3E
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/ppc_asm.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index f9729529c20d..dfae6e916dfb 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -375,8 +375,15 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
375#define PPC440EP_ERR42 375#define PPC440EP_ERR42
376#endif 376#endif
377 377
378 378/*
379#if defined(CONFIG_BOOKE) 379 * toreal/fromreal/tophys/tovirt macros. 32-bit BookE makes them
380 * keep the address intact to be compatible with code shared with
381 * 32-bit classic.
382 *
383 * On the other hand, I find it useful to have them behave as expected
384 * by their name (ie always do the addition) on 64-bit BookE
385 */
386#if defined(CONFIG_BOOKE) && !defined(CONFIG_PPC64)
380#define toreal(rd) 387#define toreal(rd)
381#define fromreal(rd) 388#define fromreal(rd)
382 389
@@ -426,10 +433,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
426 .previous 433 .previous
427#endif 434#endif
428 435
429#ifdef CONFIG_PPC64 436#ifdef CONFIG_PPC_BOOK3S_64
430#define RFI rfid 437#define RFI rfid
431#define MTMSRD(r) mtmsrd r 438#define MTMSRD(r) mtmsrd r
432
433#else 439#else
434#define FIX_SRR1(ra, rb) 440#define FIX_SRR1(ra, rb)
435#ifndef CONFIG_40x 441#ifndef CONFIG_40x