aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>2011-07-04 14:38:03 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2011-07-12 09:21:55 -0400
commit91b191c71eae79c0e652c52a968d06cd96b539c5 (patch)
treef1f0aeccbba77d3a89dfbc951578570e35debe7f
parent112d1fe9f7715db423ffeec5ac1beccff6093dc4 (diff)
powerpc/44x: don't use tlbivax on AMP systems
Since other OS's may be running on the other cores don't use tlbivax Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
-rw-r--r--arch/powerpc/include/asm/mmu.h7
-rw-r--r--arch/powerpc/kernel/setup_32.c2
-rw-r--r--arch/powerpc/mm/tlb_hash32.c4
-rw-r--r--arch/powerpc/mm/tlb_nohash.c19
4 files changed, 31 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 4138b21ae80a..bb5591f424b3 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -120,9 +120,14 @@ static inline int mmu_has_feature(unsigned long feature)
120 return (cur_cpu_spec->mmu_features & feature); 120 return (cur_cpu_spec->mmu_features & feature);
121} 121}
122 122
123static inline void mmu_clear_feature(unsigned long feature)
124{
125 cur_cpu_spec->mmu_features &= ~feature;
126}
127
123extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup; 128extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;
124 129
125/* MMU initialization (64-bit only fo now) */ 130/* MMU initialization */
126extern void early_init_mmu(void); 131extern void early_init_mmu(void);
127extern void early_init_mmu_secondary(void); 132extern void early_init_mmu_secondary(void);
128 133
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 1d2fbc905303..7544e39b4156 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -126,6 +126,8 @@ notrace void __init machine_init(unsigned long dt_ptr)
126 /* Do some early initialization based on the flat device tree */ 126 /* Do some early initialization based on the flat device tree */
127 early_init_devtree(__va(dt_ptr)); 127 early_init_devtree(__va(dt_ptr));
128 128
129 early_init_mmu();
130
129 probe_machine(); 131 probe_machine();
130 132
131 setup_kdump_trampoline(); 133 setup_kdump_trampoline();
diff --git a/arch/powerpc/mm/tlb_hash32.c b/arch/powerpc/mm/tlb_hash32.c
index 27b863c14941..9a445f64accd 100644
--- a/arch/powerpc/mm/tlb_hash32.c
+++ b/arch/powerpc/mm/tlb_hash32.c
@@ -177,3 +177,7 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
177 flush_range(vma->vm_mm, start, end); 177 flush_range(vma->vm_mm, start, end);
178} 178}
179EXPORT_SYMBOL(flush_tlb_range); 179EXPORT_SYMBOL(flush_tlb_range);
180
181void __init early_init_mmu(void)
182{
183}
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 3722185d1865..7355211b93b3 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -35,6 +35,7 @@
35#include <linux/preempt.h> 35#include <linux/preempt.h>
36#include <linux/spinlock.h> 36#include <linux/spinlock.h>
37#include <linux/memblock.h> 37#include <linux/memblock.h>
38#include <linux/of_fdt.h>
38 39
39#include <asm/tlbflush.h> 40#include <asm/tlbflush.h>
40#include <asm/tlb.h> 41#include <asm/tlb.h>
@@ -266,6 +267,17 @@ EXPORT_SYMBOL(flush_tlb_page);
266 267
267#endif /* CONFIG_SMP */ 268#endif /* CONFIG_SMP */
268 269
270#ifdef CONFIG_PPC_47x
271void __init early_init_mmu_47x(void)
272{
273#ifdef CONFIG_SMP
274 unsigned long root = of_get_flat_dt_root();
275 if (of_get_flat_dt_prop(root, "cooperative-partition", NULL))
276 mmu_clear_feature(MMU_FTR_USE_TLBIVAX_BCAST);
277#endif /* CONFIG_SMP */
278}
279#endif /* CONFIG_PPC_47x */
280
269/* 281/*
270 * Flush kernel TLB entries in the given range 282 * Flush kernel TLB entries in the given range
271 */ 283 */
@@ -593,4 +605,11 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
593 /* Finally limit subsequent allocations */ 605 /* Finally limit subsequent allocations */
594 memblock_set_current_limit(first_memblock_base + ppc64_rma_size); 606 memblock_set_current_limit(first_memblock_base + ppc64_rma_size);
595} 607}
608#else /* ! CONFIG_PPC64 */
609void __init early_init_mmu(void)
610{
611#ifdef CONFIG_PPC_47x
612 early_init_mmu_47x();
613#endif
614}
596#endif /* CONFIG_PPC64 */ 615#endif /* CONFIG_PPC64 */