aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/tlb_nohash.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/tlb_nohash.c')
-rw-r--r--arch/powerpc/mm/tlb_nohash.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 39ac22b13c73..7af72970faed 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -132,11 +132,11 @@ void flush_tlb_mm(struct mm_struct *mm)
132 pid = mm->context.id; 132 pid = mm->context.id;
133 if (unlikely(pid == MMU_NO_CONTEXT)) 133 if (unlikely(pid == MMU_NO_CONTEXT))
134 goto no_context; 134 goto no_context;
135 cpu_mask = mm->cpu_vm_mask; 135 if (!cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) {
136 cpu_clear(smp_processor_id(), cpu_mask);
137 if (!cpus_empty(cpu_mask)) {
138 struct tlb_flush_param p = { .pid = pid }; 136 struct tlb_flush_param p = { .pid = pid };
139 smp_call_function_mask(cpu_mask, do_flush_tlb_mm_ipi, &p, 1); 137 /* Ignores smp_processor_id() even if set. */
138 smp_call_function_many(mm_cpumask(mm),
139 do_flush_tlb_mm_ipi, &p, 1);
140 } 140 }
141 _tlbil_pid(pid); 141 _tlbil_pid(pid);
142 no_context: 142 no_context:
@@ -146,16 +146,15 @@ EXPORT_SYMBOL(flush_tlb_mm);
146 146
147void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) 147void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
148{ 148{
149 cpumask_t cpu_mask; 149 struct cpumask *cpu_mask;
150 unsigned int pid; 150 unsigned int pid;
151 151
152 preempt_disable(); 152 preempt_disable();
153 pid = vma ? vma->vm_mm->context.id : 0; 153 pid = vma ? vma->vm_mm->context.id : 0;
154 if (unlikely(pid == MMU_NO_CONTEXT)) 154 if (unlikely(pid == MMU_NO_CONTEXT))
155 goto bail; 155 goto bail;
156 cpu_mask = vma->vm_mm->cpu_vm_mask; 156 cpu_mask = mm_cpumask(vma->vm_mm);
157 cpu_clear(smp_processor_id(), cpu_mask); 157 if (!cpumask_equal(cpu_mask, cpumask_of(smp_processor_id()))) {
158 if (!cpus_empty(cpu_mask)) {
159 /* If broadcast tlbivax is supported, use it */ 158 /* If broadcast tlbivax is supported, use it */
160 if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) { 159 if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
161 int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL); 160 int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL);
@@ -167,7 +166,8 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
167 goto bail; 166 goto bail;
168 } else { 167 } else {
169 struct tlb_flush_param p = { .pid = pid, .addr = vmaddr }; 168 struct tlb_flush_param p = { .pid = pid, .addr = vmaddr };
170 smp_call_function_mask(cpu_mask, 169 /* Ignores smp_processor_id() even if set in cpu_mask */
170 smp_call_function_many(cpu_mask,
171 do_flush_tlb_page_ipi, &p, 1); 171 do_flush_tlb_page_ipi, &p, 1);
172 } 172 }
173 } 173 }