|
@@ -148,7 +148,7 @@ static void stop_this_cpu(void *dummy)
|
|
/*
|
|
/*
|
|
* Remove this CPU:
|
|
* Remove this CPU:
|
|
*/
|
|
*/
|
|
- cpu_clear(smp_processor_id(), cpu_online_map);
|
|
|
|
|
|
+ set_cpu_online(smp_processor_id(), false);
|
|
for (;;) {
|
|
for (;;) {
|
|
if (cpu_wait)
|
|
if (cpu_wait)
|
|
(*cpu_wait)(); /* Wait if available. */
|
|
(*cpu_wait)(); /* Wait if available. */
|
|
@@ -174,7 +174,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
|
mp_ops->prepare_cpus(max_cpus);
|
|
mp_ops->prepare_cpus(max_cpus);
|
|
set_cpu_sibling_map(0);
|
|
set_cpu_sibling_map(0);
|
|
#ifndef CONFIG_HOTPLUG_CPU
|
|
#ifndef CONFIG_HOTPLUG_CPU
|
|
- init_cpu_present(&cpu_possible_map);
|
|
|
|
|
|
+ init_cpu_present(cpu_possible_mask);
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
@@ -248,7 +248,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
|
while (!cpu_isset(cpu, cpu_callin_map))
|
|
while (!cpu_isset(cpu, cpu_callin_map))
|
|
udelay(100);
|
|
udelay(100);
|
|
|
|
|
|
- cpu_set(cpu, cpu_online_map);
|
|
|
|
|
|
+ set_cpu_online(cpu, true);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -320,13 +320,12 @@ void flush_tlb_mm(struct mm_struct *mm)
|
|
if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
|
|
if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
|
|
smp_on_other_tlbs(flush_tlb_mm_ipi, mm);
|
|
smp_on_other_tlbs(flush_tlb_mm_ipi, mm);
|
|
} else {
|
|
} else {
|
|
- cpumask_t mask = cpu_online_map;
|
|
|
|
unsigned int cpu;
|
|
unsigned int cpu;
|
|
|
|
|
|
- cpu_clear(smp_processor_id(), mask);
|
|
|
|
- for_each_cpu_mask(cpu, mask)
|
|
|
|
- if (cpu_context(cpu, mm))
|
|
|
|
|
|
+ for_each_online_cpu(cpu) {
|
|
|
|
+ if (cpu != smp_processor_id() && cpu_context(cpu, mm))
|
|
cpu_context(cpu, mm) = 0;
|
|
cpu_context(cpu, mm) = 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
local_flush_tlb_mm(mm);
|
|
local_flush_tlb_mm(mm);
|
|
|
|
|
|
@@ -360,13 +359,12 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned l
|
|
|
|
|
|
smp_on_other_tlbs(flush_tlb_range_ipi, &fd);
|
|
smp_on_other_tlbs(flush_tlb_range_ipi, &fd);
|
|
} else {
|
|
} else {
|
|
- cpumask_t mask = cpu_online_map;
|
|
|
|
unsigned int cpu;
|
|
unsigned int cpu;
|
|
|
|
|
|
- cpu_clear(smp_processor_id(), mask);
|
|
|
|
- for_each_cpu_mask(cpu, mask)
|
|
|
|
- if (cpu_context(cpu, mm))
|
|
|
|
|
|
+ for_each_online_cpu(cpu) {
|
|
|
|
+ if (cpu != smp_processor_id() && cpu_context(cpu, mm))
|
|
cpu_context(cpu, mm) = 0;
|
|
cpu_context(cpu, mm) = 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
local_flush_tlb_range(vma, start, end);
|
|
local_flush_tlb_range(vma, start, end);
|
|
preempt_enable();
|
|
preempt_enable();
|
|
@@ -407,13 +405,12 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
|
|
|
|
|
|
smp_on_other_tlbs(flush_tlb_page_ipi, &fd);
|
|
smp_on_other_tlbs(flush_tlb_page_ipi, &fd);
|
|
} else {
|
|
} else {
|
|
- cpumask_t mask = cpu_online_map;
|
|
|
|
unsigned int cpu;
|
|
unsigned int cpu;
|
|
|
|
|
|
- cpu_clear(smp_processor_id(), mask);
|
|
|
|
- for_each_cpu_mask(cpu, mask)
|
|
|
|
- if (cpu_context(cpu, vma->vm_mm))
|
|
|
|
|
|
+ for_each_online_cpu(cpu) {
|
|
|
|
+ if (cpu != smp_processor_id() && cpu_context(cpu, vma->vm_mm))
|
|
cpu_context(cpu, vma->vm_mm) = 0;
|
|
cpu_context(cpu, vma->vm_mm) = 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
local_flush_tlb_page(vma, page);
|
|
local_flush_tlb_page(vma, page);
|
|
preempt_enable();
|
|
preempt_enable();
|