diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2014-07-09 22:29:20 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-28 00:10:23 -0400 |
commit | 13b3d13b813ab834fac67dc05f8b86dbcc29c134 (patch) | |
tree | eb13d92d8920a73e5152be63cd4fb5622e65e3ad /arch | |
parent | 376af5947c0e441ccbf98f0212d4ffbf171528f6 (diff) |
powerpc: Remove MMU_FTR_SLB
We now only support cpus that use an SLB, so we don't need an MMU
feature to indicate that.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/cputable.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu.h | 8 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu_context.h | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 1 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 6 | ||||
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 8 |
8 files changed, 10 insertions, 29 deletions
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 4b132cf48a4f..ca20cc3ee04d 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -195,8 +195,7 @@ extern const char *powerpc_base_platform; | |||
195 | 195 | ||
196 | #define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN) | 196 | #define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN) |
197 | 197 | ||
198 | #define MMU_FTR_PPCAS_ARCH_V2 (MMU_FTR_SLB | MMU_FTR_TLBIEL | \ | 198 | #define MMU_FTR_PPCAS_ARCH_V2 (MMU_FTR_TLBIEL | MMU_FTR_16M_PAGE) |
199 | MMU_FTR_16M_PAGE) | ||
200 | 199 | ||
201 | /* We only set the altivec features if the kernel was compiled with altivec | 200 | /* We only set the altivec features if the kernel was compiled with altivec |
202 | * support | 201 | * support |
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index e61f24ed4e65..3d5abfe6ba67 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h | |||
@@ -64,9 +64,9 @@ | |||
64 | */ | 64 | */ |
65 | #define MMU_FTR_USE_PAIRED_MAS ASM_CONST(0x01000000) | 65 | #define MMU_FTR_USE_PAIRED_MAS ASM_CONST(0x01000000) |
66 | 66 | ||
67 | /* MMU is SLB-based | 67 | /* Doesn't support the B bit (1T segment) in SLBIE |
68 | */ | 68 | */ |
69 | #define MMU_FTR_SLB ASM_CONST(0x02000000) | 69 | #define MMU_FTR_NO_SLBIE_B ASM_CONST(0x02000000) |
70 | 70 | ||
71 | /* Support 16M large pages | 71 | /* Support 16M large pages |
72 | */ | 72 | */ |
@@ -88,10 +88,6 @@ | |||
88 | */ | 88 | */ |
89 | #define MMU_FTR_1T_SEGMENT ASM_CONST(0x40000000) | 89 | #define MMU_FTR_1T_SEGMENT ASM_CONST(0x40000000) |
90 | 90 | ||
91 | /* Doesn't support the B bit (1T segment) in SLBIE | ||
92 | */ | ||
93 | #define MMU_FTR_NO_SLBIE_B ASM_CONST(0x80000000) | ||
94 | |||
95 | /* MMU feature bit sets for various CPUs */ | 91 | /* MMU feature bit sets for various CPUs */ |
96 | #define MMU_FTRS_DEFAULT_HPTE_ARCH_V2 \ | 92 | #define MMU_FTRS_DEFAULT_HPTE_ARCH_V2 \ |
97 | MMU_FTR_HPTE_TABLE | MMU_FTR_PPCAS_ARCH_V2 | 93 | MMU_FTR_HPTE_TABLE | MMU_FTR_PPCAS_ARCH_V2 |
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index f5690e2689c7..73382eba02dc 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h | |||
@@ -76,8 +76,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
76 | * sub architectures. | 76 | * sub architectures. |
77 | */ | 77 | */ |
78 | #ifdef CONFIG_PPC_STD_MMU_64 | 78 | #ifdef CONFIG_PPC_STD_MMU_64 |
79 | if (mmu_has_feature(MMU_FTR_SLB)) | 79 | switch_slb(tsk, next); |
80 | switch_slb(tsk, next); | ||
81 | #else | 80 | #else |
82 | /* Out of line for now */ | 81 | /* Out of line for now */ |
83 | switch_mmu_context(prev, next); | 82 | switch_mmu_context(prev, next); |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 6528c5e2cc44..d6b22e8c8ee1 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -482,16 +482,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_STCX_CHECKS_ADDRESS) | |||
482 | ld r8,KSP(r4) /* new stack pointer */ | 482 | ld r8,KSP(r4) /* new stack pointer */ |
483 | #ifdef CONFIG_PPC_BOOK3S | 483 | #ifdef CONFIG_PPC_BOOK3S |
484 | BEGIN_FTR_SECTION | 484 | BEGIN_FTR_SECTION |
485 | BEGIN_FTR_SECTION_NESTED(95) | ||
486 | clrrdi r6,r8,28 /* get its ESID */ | 485 | clrrdi r6,r8,28 /* get its ESID */ |
487 | clrrdi r9,r1,28 /* get current sp ESID */ | 486 | clrrdi r9,r1,28 /* get current sp ESID */ |
488 | FTR_SECTION_ELSE_NESTED(95) | 487 | FTR_SECTION_ELSE |
489 | clrrdi r6,r8,40 /* get its 1T ESID */ | 488 | clrrdi r6,r8,40 /* get its 1T ESID */ |
490 | clrrdi r9,r1,40 /* get current sp 1T ESID */ | 489 | clrrdi r9,r1,40 /* get current sp 1T ESID */ |
491 | ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_1T_SEGMENT, 95) | 490 | ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_1T_SEGMENT) |
492 | FTR_SECTION_ELSE | ||
493 | b 2f | ||
494 | ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_SLB) | ||
495 | clrldi. r0,r6,2 /* is new ESID c00000000? */ | 491 | clrldi. r0,r6,2 /* is new ESID c00000000? */ |
496 | cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */ | 492 | cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */ |
497 | cror eq,4*cr1+eq,eq | 493 | cror eq,4*cr1+eq,eq |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index be99774d3f44..e39f388fc25c 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1175,7 +1175,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
1175 | #endif | 1175 | #endif |
1176 | 1176 | ||
1177 | #ifdef CONFIG_PPC_STD_MMU_64 | 1177 | #ifdef CONFIG_PPC_STD_MMU_64 |
1178 | if (mmu_has_feature(MMU_FTR_SLB)) { | 1178 | { |
1179 | unsigned long sp_vsid; | 1179 | unsigned long sp_vsid; |
1180 | unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp; | 1180 | unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp; |
1181 | 1181 | ||
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index b694b0730971..1914791dd329 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -155,7 +155,6 @@ static struct ibm_pa_feature { | |||
155 | } ibm_pa_features[] __initdata = { | 155 | } ibm_pa_features[] __initdata = { |
156 | {0, 0, PPC_FEATURE_HAS_MMU, 0, 0, 0}, | 156 | {0, 0, PPC_FEATURE_HAS_MMU, 0, 0, 0}, |
157 | {0, 0, PPC_FEATURE_HAS_FPU, 0, 1, 0}, | 157 | {0, 0, PPC_FEATURE_HAS_FPU, 0, 1, 0}, |
158 | {0, MMU_FTR_SLB, 0, 0, 2, 0}, | ||
159 | {CPU_FTR_CTRL, 0, 0, 0, 3, 0}, | 158 | {CPU_FTR_CTRL, 0, 0, 0, 3, 0}, |
160 | {CPU_FTR_NOEXECUTE, 0, 0, 0, 6, 0}, | 159 | {CPU_FTR_NOEXECUTE, 0, 0, 0, 6, 0}, |
161 | {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, | 160 | {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index fb8bea71327d..6b7c1c824cf9 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -828,8 +828,7 @@ void __init early_init_mmu(void) | |||
828 | htab_initialize(); | 828 | htab_initialize(); |
829 | 829 | ||
830 | /* Initialize SLB management */ | 830 | /* Initialize SLB management */ |
831 | if (mmu_has_feature(MMU_FTR_SLB)) | 831 | slb_initialize(); |
832 | slb_initialize(); | ||
833 | } | 832 | } |
834 | 833 | ||
835 | #ifdef CONFIG_SMP | 834 | #ifdef CONFIG_SMP |
@@ -840,8 +839,7 @@ void early_init_mmu_secondary(void) | |||
840 | mtspr(SPRN_SDR1, _SDR1); | 839 | mtspr(SPRN_SDR1, _SDR1); |
841 | 840 | ||
842 | /* Initialize SLB */ | 841 | /* Initialize SLB */ |
843 | if (mmu_has_feature(MMU_FTR_SLB)) | 842 | slb_initialize(); |
844 | slb_initialize(); | ||
845 | } | 843 | } |
846 | #endif /* CONFIG_SMP */ | 844 | #endif /* CONFIG_SMP */ |
847 | 845 | ||
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index dc8cf285c3ff..8d198b5e9e0a 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -2690,7 +2690,7 @@ static void xmon_print_symbol(unsigned long address, const char *mid, | |||
2690 | } | 2690 | } |
2691 | 2691 | ||
2692 | #ifdef CONFIG_PPC_BOOK3S_64 | 2692 | #ifdef CONFIG_PPC_BOOK3S_64 |
2693 | static void dump_slb(void) | 2693 | void dump_segments(void) |
2694 | { | 2694 | { |
2695 | int i; | 2695 | int i; |
2696 | unsigned long esid,vsid,valid; | 2696 | unsigned long esid,vsid,valid; |
@@ -2722,12 +2722,6 @@ static void dump_slb(void) | |||
2722 | } | 2722 | } |
2723 | } | 2723 | } |
2724 | } | 2724 | } |
2725 | |||
2726 | void dump_segments(void) | ||
2727 | { | ||
2728 | if (mmu_has_feature(MMU_FTR_SLB)) | ||
2729 | dump_slb(); | ||
2730 | } | ||
2731 | #endif | 2725 | #endif |
2732 | 2726 | ||
2733 | #ifdef CONFIG_PPC_STD_MMU_32 | 2727 | #ifdef CONFIG_PPC_STD_MMU_32 |