diff options
author | Matt Evans <matt@ozlabs.org> | 2011-04-06 15:48:50 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-27 00:18:52 -0400 |
commit | 44ae3ab3358e962039c36ad4ae461ae9fb29596c (patch) | |
tree | 08c0628a5226c0535b7fe236be64b48e5eb0fbd6 /arch/powerpc/include/asm/cputable.h | |
parent | eca590f402332ab873d13f2d8d00fa0b91cfff36 (diff) |
powerpc: Free up some CPU feature bits by moving out MMU-related features
Some of the 64bit PPC CPU features are MMU-related, so this patch moves
them to MMU_FTR_ bits. All cpu_has_feature()-style tests are moved to
mmu_has_feature(), and seven feature bits are freed as a result.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/cputable.h')
-rw-r--r-- | arch/powerpc/include/asm/cputable.h | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 2d71523ebb03..3db2476704d6 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -178,23 +178,17 @@ extern const char *powerpc_base_platform; | |||
178 | #define LONG_ASM_CONST(x) 0 | 178 | #define LONG_ASM_CONST(x) 0 |
179 | #endif | 179 | #endif |
180 | 180 | ||
181 | #define CPU_FTR_SLB LONG_ASM_CONST(0x0000000100000000) | 181 | |
182 | #define CPU_FTR_16M_PAGE LONG_ASM_CONST(0x0000000200000000) | ||
183 | #define CPU_FTR_TLBIEL LONG_ASM_CONST(0x0000000400000000) | ||
184 | #define CPU_FTR_HVMODE_206 LONG_ASM_CONST(0x0000000800000000) | 182 | #define CPU_FTR_HVMODE_206 LONG_ASM_CONST(0x0000000800000000) |
185 | #define CPU_FTR_IABR LONG_ASM_CONST(0x0000002000000000) | 183 | #define CPU_FTR_IABR LONG_ASM_CONST(0x0000002000000000) |
186 | #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000004000000000) | 184 | #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000004000000000) |
187 | #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000008000000000) | 185 | #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000008000000000) |
188 | #define CPU_FTR_SMT LONG_ASM_CONST(0x0000010000000000) | 186 | #define CPU_FTR_SMT LONG_ASM_CONST(0x0000010000000000) |
189 | #define CPU_FTR_LOCKLESS_TLBIE LONG_ASM_CONST(0x0000040000000000) | ||
190 | #define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000) | ||
191 | #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) | 187 | #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) |
192 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) | 188 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) |
193 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) | 189 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) |
194 | #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) | 190 | #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) |
195 | #define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000) | 191 | #define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000) |
196 | #define CPU_FTR_1T_SEGMENT LONG_ASM_CONST(0x0004000000000000) | ||
197 | #define CPU_FTR_NO_SLBIE_B LONG_ASM_CONST(0x0008000000000000) | ||
198 | #define CPU_FTR_VSX LONG_ASM_CONST(0x0010000000000000) | 192 | #define CPU_FTR_VSX LONG_ASM_CONST(0x0010000000000000) |
199 | #define CPU_FTR_SAO LONG_ASM_CONST(0x0020000000000000) | 193 | #define CPU_FTR_SAO LONG_ASM_CONST(0x0020000000000000) |
200 | #define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0040000000000000) | 194 | #define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0040000000000000) |
@@ -206,9 +200,10 @@ extern const char *powerpc_base_platform; | |||
206 | 200 | ||
207 | #ifndef __ASSEMBLY__ | 201 | #ifndef __ASSEMBLY__ |
208 | 202 | ||
209 | #define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_SLB | \ | 203 | #define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN) |
210 | CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \ | 204 | |
211 | CPU_FTR_NODSISRALIGN | CPU_FTR_16M_PAGE) | 205 | #define MMU_FTR_PPCAS_ARCH_V2 (MMU_FTR_SLB | MMU_FTR_TLBIEL | \ |
206 | MMU_FTR_16M_PAGE) | ||
212 | 207 | ||
213 | /* We only set the altivec features if the kernel was compiled with altivec | 208 | /* We only set the altivec features if the kernel was compiled with altivec |
214 | * support | 209 | * support |
@@ -408,38 +403,34 @@ extern const char *powerpc_base_platform; | |||
408 | #define CPU_FTRS_POWER5 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 403 | #define CPU_FTRS_POWER5 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
409 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 404 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
410 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 405 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
411 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 406 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_PURR | \ |
412 | CPU_FTR_PURR | CPU_FTR_STCX_CHECKS_ADDRESS | \ | 407 | CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB) |
413 | CPU_FTR_POPCNTB) | ||
414 | #define CPU_FTRS_POWER6 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 408 | #define CPU_FTRS_POWER6 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
415 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 409 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
416 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 410 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
417 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 411 | CPU_FTR_COHERENT_ICACHE | \ |
418 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ | 412 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ |
419 | CPU_FTR_DSCR | CPU_FTR_UNALIGNED_LD_STD | \ | 413 | CPU_FTR_DSCR | CPU_FTR_UNALIGNED_LD_STD | \ |
420 | CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB) | 414 | CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB) |
421 | #define CPU_FTRS_POWER7 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 415 | #define CPU_FTRS_POWER7 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
422 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_HVMODE_206 |\ | 416 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_HVMODE_206 |\ |
423 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 417 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
424 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 418 | CPU_FTR_COHERENT_ICACHE | \ |
425 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ | 419 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ |
426 | CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT | \ | 420 | CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT | \ |
427 | CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD) | 421 | CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD) |
428 | #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 422 | #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
429 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 423 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
430 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 424 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
431 | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE | \ | 425 | CPU_FTR_PAUSE_ZERO | CPU_FTR_CELL_TB_BUG | CPU_FTR_CP_USE_DCBTZ | \ |
432 | CPU_FTR_CELL_TB_BUG | CPU_FTR_CP_USE_DCBTZ | \ | ||
433 | CPU_FTR_UNALIGNED_LD_STD) | 426 | CPU_FTR_UNALIGNED_LD_STD) |
434 | #define CPU_FTRS_PA6T (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 427 | #define CPU_FTRS_PA6T (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
435 | CPU_FTR_PPCAS_ARCH_V2 | \ | 428 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP | \ |
436 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \ | 429 | CPU_FTR_PURR | CPU_FTR_REAL_LE) |
437 | CPU_FTR_PURR | CPU_FTR_REAL_LE | CPU_FTR_NO_SLBIE_B) | ||
438 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) | 430 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) |
439 | 431 | ||
440 | #define CPU_FTRS_A2 (CPU_FTR_USE_TB | CPU_FTR_SMT | CPU_FTR_DBELL | \ | 432 | #define CPU_FTRS_A2 (CPU_FTR_USE_TB | CPU_FTR_SMT | CPU_FTR_DBELL | \ |
441 | CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | \ | 433 | CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN) |
442 | CPU_FTR_16M_PAGE) | ||
443 | 434 | ||
444 | #ifdef __powerpc64__ | 435 | #ifdef __powerpc64__ |
445 | #ifdef CONFIG_PPC_BOOK3E | 436 | #ifdef CONFIG_PPC_BOOK3E |
@@ -449,7 +440,7 @@ extern const char *powerpc_base_platform; | |||
449 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ | 440 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ |
450 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ | 441 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ |
451 | CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ | 442 | CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ |
452 | CPU_FTR_1T_SEGMENT | CPU_FTR_VSX) | 443 | CPU_FTR_VSX) |
453 | #endif | 444 | #endif |
454 | #else | 445 | #else |
455 | enum { | 446 | enum { |