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>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
eca590f402
commit
44ae3ab335
@@ -70,6 +70,54 @@
|
||||
*/
|
||||
#define MMU_FTR_USE_PAIRED_MAS ASM_CONST(0x01000000)
|
||||
|
||||
/* MMU is SLB-based
|
||||
*/
|
||||
#define MMU_FTR_SLB ASM_CONST(0x02000000)
|
||||
|
||||
/* Support 16M large pages
|
||||
*/
|
||||
#define MMU_FTR_16M_PAGE ASM_CONST(0x04000000)
|
||||
|
||||
/* Supports TLBIEL variant
|
||||
*/
|
||||
#define MMU_FTR_TLBIEL ASM_CONST(0x08000000)
|
||||
|
||||
/* Supports tlbies w/o locking
|
||||
*/
|
||||
#define MMU_FTR_LOCKLESS_TLBIE ASM_CONST(0x10000000)
|
||||
|
||||
/* Large pages can be marked CI
|
||||
*/
|
||||
#define MMU_FTR_CI_LARGE_PAGE ASM_CONST(0x20000000)
|
||||
|
||||
/* 1T segments available
|
||||
*/
|
||||
#define MMU_FTR_1T_SEGMENT ASM_CONST(0x40000000)
|
||||
|
||||
/* Doesn't support the B bit (1T segment) in SLBIE
|
||||
*/
|
||||
#define MMU_FTR_NO_SLBIE_B ASM_CONST(0x80000000)
|
||||
|
||||
/* MMU feature bit sets for various CPUs */
|
||||
#define MMU_FTRS_DEFAULT_HPTE_ARCH_V2 \
|
||||
MMU_FTR_HPTE_TABLE | MMU_FTR_PPCAS_ARCH_V2
|
||||
#define MMU_FTRS_POWER4 MMU_FTRS_DEFAULT_HPTE_ARCH_V2
|
||||
#define MMU_FTRS_PPC970 MMU_FTRS_POWER4
|
||||
#define MMU_FTRS_POWER5 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE
|
||||
#define MMU_FTRS_POWER6 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE
|
||||
#define MMU_FTRS_POWER7 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE | \
|
||||
MMU_FTR_TLBIE_206
|
||||
#define MMU_FTRS_CELL MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \
|
||||
MMU_FTR_CI_LARGE_PAGE
|
||||
#define MMU_FTRS_PA6T MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \
|
||||
MMU_FTR_CI_LARGE_PAGE | MMU_FTR_NO_SLBIE_B
|
||||
#define MMU_FTRS_A2 MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX | \
|
||||
MMU_FTR_USE_TLBIVAX_BCAST | \
|
||||
MMU_FTR_LOCK_BCAST_INVAL | \
|
||||
MMU_FTR_USE_TLBRSRV | \
|
||||
MMU_FTR_USE_PAIRED_MAS | \
|
||||
MMU_FTR_TLBIEL | \
|
||||
MMU_FTR_16M_PAGE
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/cputable.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user