diff options
author | Michael Neuling <mikey@neuling.org> | 2011-04-06 14:23:29 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-04 01:19:26 -0400 |
commit | a32e252f7cdfb3675a4e50215cfac356ed8952c4 (patch) | |
tree | 6ed462115dc518d39707f9c00ef19cad5acd1fc8 /arch/powerpc/mm | |
parent | 476eb4912601a8c01e6702b9a029f476b4b131d2 (diff) |
powerpc: Use new CPU feature bit to select 2.06 tlbie
This removes MMU_FTR_TLBIE_206 as we can now use CPU_FTR_HVMODE_206. It
also changes the logic to select which tlbie to use to be based on this
new CPU feature bit.
This also duplicates the ASM_FTR_IF/SET/CLR defines for CPU features
(copied from MMU features).
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index c23eef2b81a6..dfd764896db0 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -50,9 +50,8 @@ static inline void __tlbie(unsigned long va, int psize, int ssize) | |||
50 | case MMU_PAGE_4K: | 50 | case MMU_PAGE_4K: |
51 | va &= ~0xffful; | 51 | va &= ~0xffful; |
52 | va |= ssize << 8; | 52 | va |= ssize << 8; |
53 | asm volatile(ASM_MMU_FTR_IFCLR("tlbie %0,0", PPC_TLBIE(%1,%0), | 53 | asm volatile(ASM_FTR_IFCLR("tlbie %0,0", PPC_TLBIE(%1,%0), %2) |
54 | %2) | 54 | : : "r" (va), "r"(0), "i" (CPU_FTR_HVMODE_206) |
55 | : : "r" (va), "r"(0), "i" (MMU_FTR_TLBIE_206) | ||
56 | : "memory"); | 55 | : "memory"); |
57 | break; | 56 | break; |
58 | default: | 57 | default: |
@@ -61,9 +60,8 @@ static inline void __tlbie(unsigned long va, int psize, int ssize) | |||
61 | va |= penc << 12; | 60 | va |= penc << 12; |
62 | va |= ssize << 8; | 61 | va |= ssize << 8; |
63 | va |= 1; /* L */ | 62 | va |= 1; /* L */ |
64 | asm volatile(ASM_MMU_FTR_IFCLR("tlbie %0,1", PPC_TLBIE(%1,%0), | 63 | asm volatile(ASM_FTR_IFCLR("tlbie %0,1", PPC_TLBIE(%1,%0), %2) |
65 | %2) | 64 | : : "r" (va), "r"(0), "i" (CPU_FTR_HVMODE_206) |
66 | : : "r" (va), "r"(0), "i" (MMU_FTR_TLBIE_206) | ||
67 | : "memory"); | 65 | : "memory"); |
68 | break; | 66 | break; |
69 | } | 67 | } |