diff options
Diffstat (limited to 'arch/m32r/kernel/smp.c')
-rw-r--r-- | arch/m32r/kernel/smp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index a4576ac7e870..8b1f6eb76870 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -275,12 +275,14 @@ static void flush_tlb_all_ipi(void *info) | |||
275 | *==========================================================================*/ | 275 | *==========================================================================*/ |
276 | void smp_flush_tlb_mm(struct mm_struct *mm) | 276 | void smp_flush_tlb_mm(struct mm_struct *mm) |
277 | { | 277 | { |
278 | int cpu_id = smp_processor_id(); | 278 | int cpu_id; |
279 | cpumask_t cpu_mask; | 279 | cpumask_t cpu_mask; |
280 | unsigned long *mmc = &mm->context[cpu_id]; | 280 | unsigned long *mmc; |
281 | unsigned long flags; | 281 | unsigned long flags; |
282 | 282 | ||
283 | preempt_disable(); | 283 | preempt_disable(); |
284 | cpu_id = smp_processor_id(); | ||
285 | mmc = &mm->context[cpu_id]; | ||
284 | cpu_mask = mm->cpu_vm_mask; | 286 | cpu_mask = mm->cpu_vm_mask; |
285 | cpu_clear(cpu_id, cpu_mask); | 287 | cpu_clear(cpu_id, cpu_mask); |
286 | 288 | ||
@@ -343,12 +345,14 @@ void smp_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
343 | void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) | 345 | void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) |
344 | { | 346 | { |
345 | struct mm_struct *mm = vma->vm_mm; | 347 | struct mm_struct *mm = vma->vm_mm; |
346 | int cpu_id = smp_processor_id(); | 348 | int cpu_id; |
347 | cpumask_t cpu_mask; | 349 | cpumask_t cpu_mask; |
348 | unsigned long *mmc = &mm->context[cpu_id]; | 350 | unsigned long *mmc; |
349 | unsigned long flags; | 351 | unsigned long flags; |
350 | 352 | ||
351 | preempt_disable(); | 353 | preempt_disable(); |
354 | cpu_id = smp_processor_id(); | ||
355 | mmc = &mm->context[cpu_id]; | ||
352 | cpu_mask = mm->cpu_vm_mask; | 356 | cpu_mask = mm->cpu_vm_mask; |
353 | cpu_clear(cpu_id, cpu_mask); | 357 | cpu_clear(cpu_id, cpu_mask); |
354 | 358 | ||