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/include | |
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/include')
-rw-r--r-- | arch/powerpc/include/asm/feature-fixups.h | 13 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu.h | 8 |
2 files changed, 14 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h index bdc0d6877bce..9a67a38bf7b9 100644 --- a/arch/powerpc/include/asm/feature-fixups.h +++ b/arch/powerpc/include/asm/feature-fixups.h | |||
@@ -146,6 +146,19 @@ label##5: \ | |||
146 | 146 | ||
147 | #ifndef __ASSEMBLY__ | 147 | #ifndef __ASSEMBLY__ |
148 | 148 | ||
149 | #define ASM_FTR_IF(section_if, section_else, msk, val) \ | ||
150 | stringify_in_c(BEGIN_FTR_SECTION) \ | ||
151 | section_if "; " \ | ||
152 | stringify_in_c(FTR_SECTION_ELSE) \ | ||
153 | section_else "; " \ | ||
154 | stringify_in_c(ALT_FTR_SECTION_END((msk), (val))) | ||
155 | |||
156 | #define ASM_FTR_IFSET(section_if, section_else, msk) \ | ||
157 | ASM_FTR_IF(section_if, section_else, (msk), (msk)) | ||
158 | |||
159 | #define ASM_FTR_IFCLR(section_if, section_else, msk) \ | ||
160 | ASM_FTR_IF(section_if, section_else, (msk), 0) | ||
161 | |||
149 | #define ASM_MMU_FTR_IF(section_if, section_else, msk, val) \ | 162 | #define ASM_MMU_FTR_IF(section_if, section_else, msk, val) \ |
150 | stringify_in_c(BEGIN_MMU_FTR_SECTION) \ | 163 | stringify_in_c(BEGIN_MMU_FTR_SECTION) \ |
151 | section_if "; " \ | 164 | section_if "; " \ |
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index a39304b74f84..4138b21ae80a 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h | |||
@@ -56,11 +56,6 @@ | |||
56 | */ | 56 | */ |
57 | #define MMU_FTR_NEED_DTLB_SW_LRU ASM_CONST(0x00200000) | 57 | #define MMU_FTR_NEED_DTLB_SW_LRU ASM_CONST(0x00200000) |
58 | 58 | ||
59 | /* This indicates that the processor uses the ISA 2.06 server tlbie | ||
60 | * mnemonics | ||
61 | */ | ||
62 | #define MMU_FTR_TLBIE_206 ASM_CONST(0x00400000) | ||
63 | |||
64 | /* Enable use of TLB reservation. Processor should support tlbsrx. | 59 | /* Enable use of TLB reservation. Processor should support tlbsrx. |
65 | * instruction and MAS0[WQ]. | 60 | * instruction and MAS0[WQ]. |
66 | */ | 61 | */ |
@@ -105,8 +100,7 @@ | |||
105 | #define MMU_FTRS_PPC970 MMU_FTRS_POWER4 | 100 | #define MMU_FTRS_PPC970 MMU_FTRS_POWER4 |
106 | #define MMU_FTRS_POWER5 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE | 101 | #define MMU_FTRS_POWER5 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE |
107 | #define MMU_FTRS_POWER6 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE | 102 | #define MMU_FTRS_POWER6 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE |
108 | #define MMU_FTRS_POWER7 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE | \ | 103 | #define MMU_FTRS_POWER7 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE |
109 | MMU_FTR_TLBIE_206 | ||
110 | #define MMU_FTRS_CELL MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \ | 104 | #define MMU_FTRS_CELL MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \ |
111 | MMU_FTR_CI_LARGE_PAGE | 105 | MMU_FTR_CI_LARGE_PAGE |
112 | #define MMU_FTRS_PA6T MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \ | 106 | #define MMU_FTRS_PA6T MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \ |