Commit 94a8d5ca authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (39 commits)
  cpumask: Move deprecated functions to end of header.
  cpumask: remove unused deprecated functions, avoid accusations of insanity
  cpumask: use new-style cpumask ops in mm/quicklist.
  cpumask: use mm_cpumask() wrapper: x86
  cpumask: use mm_cpumask() wrapper: um
  cpumask: use mm_cpumask() wrapper: mips
  cpumask: use mm_cpumask() wrapper: mn10300
  cpumask: use mm_cpumask() wrapper: m32r
  cpumask: use mm_cpumask() wrapper: arm
  cpumask: Use accessors for cpu_*_mask: um
  cpumask: Use accessors for cpu_*_mask: powerpc
  cpumask: Use accessors for cpu_*_mask: mips
  cpumask: Use accessors for cpu_*_mask: m32r
  cpumask: remove arch_send_call_function_ipi
  cpumask: arch_send_call_function_ipi_mask: s390
  cpumask: arch_send_call_function_ipi_mask: powerpc
  cpumask: arch_send_call_function_ipi_mask: mips
  cpumask: arch_send_call_function_ipi_mask: m32r
  cpumask: arch_send_call_function_ipi_mask: alpha
  cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: ia64
  ...
parents 2bcd57ab 6ba2ef7b
...@@ -47,7 +47,7 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS]; ...@@ -47,7 +47,7 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS];
extern int smp_num_cpus; extern int smp_num_cpus;
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#else /* CONFIG_SMP */ #else /* CONFIG_SMP */
......
...@@ -22,23 +22,6 @@ static inline int cpu_to_node(int cpu) ...@@ -22,23 +22,6 @@ static inline int cpu_to_node(int cpu)
return node; return node;
} }
static inline cpumask_t node_to_cpumask(int node)
{
cpumask_t node_cpu_mask = CPU_MASK_NONE;
int cpu;
for_each_online_cpu(cpu) {
if (cpu_to_node(cpu) == node)
cpu_set(cpu, node_cpu_mask);
}
#ifdef DEBUG_NUMA
printk("node %d: cpu_mask: %016lx\n", node, node_cpu_mask);
#endif
return node_cpu_mask;
}
extern struct cpumask node_to_cpumask_map[]; extern struct cpumask node_to_cpumask_map[];
/* FIXME: This is dumb, recalculating every time. But simple. */ /* FIXME: This is dumb, recalculating every time. But simple. */
static const struct cpumask *cpumask_of_node(int node) static const struct cpumask *cpumask_of_node(int node)
...@@ -55,7 +38,6 @@ static const struct cpumask *cpumask_of_node(int node) ...@@ -55,7 +38,6 @@ static const struct cpumask *cpumask_of_node(int node)
return &node_to_cpumask_map[node]; return &node_to_cpumask_map[node];
} }
#define pcibus_to_cpumask(bus) (cpu_online_map)
#define cpumask_of_pcibus(bus) (cpu_online_mask) #define cpumask_of_pcibus(bus) (cpu_online_mask)
#endif /* !CONFIG_NUMA */ #endif /* !CONFIG_NUMA */
......
...@@ -548,16 +548,16 @@ setup_profiling_timer(unsigned int multiplier) ...@@ -548,16 +548,16 @@ setup_profiling_timer(unsigned int multiplier)
static void static void
send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation) send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
{ {
int i; int i;
mb(); mb();
for_each_cpu_mask(i, to_whom) for_each_cpu(i, to_whom)
set_bit(operation, &ipi_data[i].bits); set_bit(operation, &ipi_data[i].bits);
mb(); mb();
for_each_cpu_mask(i, to_whom) for_each_cpu(i, to_whom)
wripir(i); wripir(i);
} }
...@@ -624,7 +624,7 @@ smp_send_reschedule(int cpu) ...@@ -624,7 +624,7 @@ smp_send_reschedule(int cpu)
printk(KERN_WARNING printk(KERN_WARNING
"smp_send_reschedule: Sending IPI to self.\n"); "smp_send_reschedule: Sending IPI to self.\n");
#endif #endif
send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE); send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
} }
void void
...@@ -636,17 +636,17 @@ smp_send_stop(void) ...@@ -636,17 +636,17 @@ smp_send_stop(void)
if (hard_smp_processor_id() != boot_cpu_id) if (hard_smp_processor_id() != boot_cpu_id)
printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n"); printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n");
#endif #endif
send_ipi_message(to_whom, IPI_CPU_STOP); send_ipi_message(&to_whom, IPI_CPU_STOP);
} }
void arch_send_call_function_ipi(cpumask_t mask) void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{ {
send_ipi_message(mask, IPI_CALL_FUNC); send_ipi_message(mask, IPI_CALL_FUNC);
} }
void arch_send_call_function_single_ipi(int cpu) void arch_send_call_function_single_ipi(int cpu)
{ {
send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE); send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
} }
static void static void
......
...@@ -334,14 +334,14 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) ...@@ -334,14 +334,14 @@ static inline void outer_flush_range(unsigned long start, unsigned long end)
#ifndef CONFIG_CPU_CACHE_VIPT #ifndef CONFIG_CPU_CACHE_VIPT
static inline void flush_cache_mm(struct mm_struct *mm) static inline void flush_cache_mm(struct mm_struct *mm)
{ {
if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
__cpuc_flush_user_all(); __cpuc_flush_user_all();
} }
static inline void static inline void
flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
{ {
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
__cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
vma->vm_flags); vma->vm_flags);
} }
...@@ -349,7 +349,7 @@ flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long ...@@ -349,7 +349,7 @@ flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long
static inline void static inline void
flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
{ {
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
unsigned long addr = user_addr & PAGE_MASK; unsigned long addr = user_addr & PAGE_MASK;
__cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
} }
...@@ -360,7 +360,7 @@ flush_ptrace_access(struct vm_area_struct *vma, struct page *page, ...@@ -360,7 +360,7 @@ flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
unsigned long uaddr, void *kaddr, unsigned long uaddr, void *kaddr,
unsigned long len, int write) unsigned long len, int write)
{ {
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
unsigned long addr = (unsigned long)kaddr; unsigned long addr = (unsigned long)kaddr;
__cpuc_coherent_kern_range(addr, addr + len); __cpuc_coherent_kern_range(addr, addr + len);
} }
......
...@@ -103,14 +103,15 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -103,14 +103,15 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* check for possible thread migration */ /* check for possible thread migration */
if (!cpus_empty(next->cpu_vm_mask) && !cpu_isset(cpu, next->cpu_vm_mask)) if (!cpumask_empty(mm_cpumask(next)) &&
!cpumask_test_cpu(cpu, mm_cpumask(next)))
__flush_icache_all(); __flush_icache_all();
#endif #endif
if (!cpu_test_and_set(cpu, next->cpu_vm_mask) || prev != next) { if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) {
check_context(next); check_context(next);
cpu_switch_mm(next->pgd, next); cpu_switch_mm(next->pgd, next);
if (cache_is_vivt()) if (cache_is_vivt())
cpu_clear(cpu, prev->cpu_vm_mask); cpumask_clear_cpu(cpu, mm_cpumask(prev));
} }
#endif #endif
} }
......
...@@ -93,7 +93,6 @@ extern void platform_cpu_enable(unsigned int cpu); ...@@ -93,7 +93,6 @@ extern void platform_cpu_enable(unsigned int cpu);
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
/* /*
* show local interrupt info * show local interrupt info
......
...@@ -350,7 +350,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) ...@@ -350,7 +350,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm)
if (tlb_flag(TLB_WB)) if (tlb_flag(TLB_WB))
dsb(); dsb();
if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) { if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) {
if (tlb_flag(TLB_V3_FULL)) if (tlb_flag(TLB_V3_FULL))
asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc"); asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc");
if (tlb_flag(TLB_V4_U_FULL)) if (tlb_flag(TLB_V4_U_FULL))
...@@ -388,7 +388,7 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) ...@@ -388,7 +388,7 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
if (tlb_flag(TLB_WB)) if (tlb_flag(TLB_WB))
dsb(); dsb();
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
if (tlb_flag(TLB_V3_PAGE)) if (tlb_flag(TLB_V3_PAGE))
asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (uaddr) : "cc"); asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (uaddr) : "cc");
if (tlb_flag(TLB_V4_U_PAGE)) if (tlb_flag(TLB_V4_U_PAGE))
......
...@@ -189,7 +189,7 @@ int __cpuexit __cpu_disable(void) ...@@ -189,7 +189,7 @@ int __cpuexit __cpu_disable(void)
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
for_each_process(p) { for_each_process(p) {
if (p->mm) if (p->mm)
cpu_clear(cpu, p->mm->cpu_vm_mask); cpumask_clear_cpu(cpu, mm_cpumask(p->mm));
} }
read_unlock(&tasklist_lock); read_unlock(&tasklist_lock);
...@@ -257,7 +257,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) ...@@ -257,7 +257,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
atomic_inc(&mm->mm_users); atomic_inc(&mm->mm_users);
atomic_inc(&mm->mm_count); atomic_inc(&mm->mm_count);
current->active_mm = mm; current->active_mm = mm;
cpu_set(cpu, mm->cpu_vm_mask); cpumask_set_cpu(cpu, mm_cpumask(mm));
cpu_switch_mm(mm->pgd, mm); cpu_switch_mm(mm->pgd, mm);
enter_lazy_tlb(mm, current); enter_lazy_tlb(mm, current);
local_flush_tlb_all(); local_flush_tlb_all();
...@@ -643,7 +643,7 @@ void flush_tlb_all(void) ...@@ -643,7 +643,7 @@ void flush_tlb_all(void)
void flush_tlb_mm(struct mm_struct *mm) void flush_tlb_mm(struct mm_struct *mm)
{ {
if (tlb_ops_need_broadcast()) if (tlb_ops_need_broadcast())
on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, &mm->cpu_vm_mask); on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mm_cpumask(mm));
else else
local_flush_tlb_mm(mm); local_flush_tlb_mm(mm);
} }
...@@ -654,7 +654,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) ...@@ -654,7 +654,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
struct tlb_args ta; struct tlb_args ta;
ta.ta_vma = vma; ta.ta_vma = vma;
ta.ta_start = uaddr; ta.ta_start = uaddr;
on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, &vma->vm_mm->cpu_vm_mask); on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mm_cpumask(vma->vm_mm));
} else } else
local_flush_tlb_page(vma, uaddr); local_flush_tlb_page(vma, uaddr);
} }
...@@ -677,7 +677,7 @@ void flush_tlb_range(struct vm_area_struct *vma, ...@@ -677,7 +677,7 @@ void flush_tlb_range(struct vm_area_struct *vma,
ta.ta_vma = vma; ta.ta_vma = vma;
ta.ta_start = start; ta.ta_start = start;
ta.ta_end = end; ta.ta_end = end;
on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, &vma->vm_mm->cpu_vm_mask); on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mm_cpumask(vma->vm_mm));
} else } else
local_flush_tlb_range(vma, start, end); local_flush_tlb_range(vma, start, end);
} }
......
...@@ -59,6 +59,6 @@ void __new_context(struct mm_struct *mm) ...@@ -59,6 +59,6 @@ void __new_context(struct mm_struct *mm)
} }
spin_unlock(&cpu_asid_lock); spin_unlock(&cpu_asid_lock);
mm->cpu_vm_mask = cpumask_of_cpu(smp_processor_id()); cpumask_copy(mm_cpumask(mm), cpumask_of(smp_processor_id()));
mm->context.id = asid; mm->context.id = asid;
} }
...@@ -50,7 +50,7 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) ...@@ -50,7 +50,7 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
void flush_cache_mm(struct mm_struct *mm) void flush_cache_mm(struct mm_struct *mm)
{ {
if (cache_is_vivt()) { if (cache_is_vivt()) {
if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
__cpuc_flush_user_all(); __cpuc_flush_user_all();
return; return;
} }
...@@ -73,7 +73,7 @@ void flush_cache_mm(struct mm_struct *mm) ...@@ -73,7 +73,7 @@ void flush_cache_mm(struct mm_struct *mm)
void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
{ {
if (cache_is_vivt()) { if (cache_is_vivt()) {
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
__cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
vma->vm_flags); vma->vm_flags);
return; return;
...@@ -97,7 +97,7 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned ...@@ -97,7 +97,7 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned
void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
{ {
if (cache_is_vivt()) { if (cache_is_vivt()) {
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
unsigned long addr = user_addr & PAGE_MASK; unsigned long addr = user_addr & PAGE_MASK;
__cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
} }
...@@ -113,7 +113,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, ...@@ -113,7 +113,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
unsigned long len, int write) unsigned long len, int write)
{ {
if (cache_is_vivt()) { if (cache_is_vivt()) {
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
unsigned long addr = (unsigned long)kaddr; unsigned long addr = (unsigned long)kaddr;
__cpuc_coherent_kern_range(addr, addr + len); __cpuc_coherent_kern_range(addr, addr + len);
} }
...@@ -126,7 +126,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, ...@@ -126,7 +126,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
} }
/* VIPT non-aliasing cache */ /* VIPT non-aliasing cache */
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) && if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)) &&
vma->vm_flags & VM_EXEC) { vma->vm_flags & VM_EXEC) {
unsigned long addr = (unsigned long)kaddr; unsigned long addr = (unsigned long)kaddr;
/* only flushing the kernel mapping on non-aliasing VIPT */ /* only flushing the kernel mapping on non-aliasing VIPT */
......
...@@ -127,7 +127,6 @@ extern int is_multithreading_enabled(void); ...@@ -127,7 +127,6 @@ extern int is_multithreading_enabled(void);
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
#else /* CONFIG_SMP */ #else /* CONFIG_SMP */
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
/* /*
* Returns a bitmask of CPUs on Node 'node'. * Returns a bitmask of CPUs on Node 'node'.
*/ */
#define node_to_cpumask(node) (node_to_cpu_mask[node])
#define cpumask_of_node(node) (&node_to_cpu_mask[node]) #define cpumask_of_node(node) (&node_to_cpu_mask[node])
/* /*
...@@ -104,8 +103,6 @@ void build_cpu_to_node_map(void); ...@@ -104,8 +103,6 @@ void build_cpu_to_node_map(void);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) #define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id)
#define topology_core_id(cpu) (cpu_data(cpu)->core_id) #define topology_core_id(cpu) (cpu_data(cpu)->core_id)
#define topology_core_siblings(cpu) (cpu_core_map[cpu])
#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) #define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
#define smt_capable() (smp_num_siblings > 1) #define smt_capable() (smp_num_siblings > 1)
......
...@@ -302,7 +302,7 @@ smp_flush_tlb_mm (struct mm_struct *mm) ...@@ -302,7 +302,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
return; return;
} }
smp_call_function_mask(mm->cpu_vm_mask, smp_call_function_many(mm_cpumask(mm),
(void (*)(void *))local_finish_flush_tlb_mm, mm, 1); (void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
local_irq_disable(); local_irq_disable();
local_finish_flush_tlb_mm(mm); local_finish_flush_tlb_mm(mm);
......
...@@ -127,7 +127,7 @@ static inline void switch_mm(struct mm_struct *prev, ...@@ -127,7 +127,7 @@ static inline void switch_mm(struct mm_struct *prev,
if (prev != next) { if (prev != next) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
cpu_set(cpu, next->cpu_vm_mask); cpumask_set_cpu(cpu, mm_cpumask(next));
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
/* Set MPTB = next->pgd */ /* Set MPTB = next->pgd */
*(volatile unsigned long *)MPTB = (unsigned long)next->pgd; *(volatile unsigned long *)MPTB = (unsigned long)next->pgd;
...@@ -135,7 +135,7 @@ static inline void switch_mm(struct mm_struct *prev, ...@@ -135,7 +135,7 @@ static inline void switch_mm(struct mm_struct *prev,
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
else else
if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
activate_context(next); activate_context(next);
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
} }
......
...@@ -88,7 +88,7 @@ extern void smp_send_timer(void); ...@@ -88,7 +88,7 @@ extern void smp_send_timer(void);
extern unsigned long send_IPI_mask_phys(cpumask_t, int, int); extern unsigned long send_IPI_mask_phys(cpumask_t, int, int);
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#endif /* not __ASSEMBLY__ */ #endif /* not __ASSEMBLY__ */
......
...@@ -85,7 +85,7 @@ void smp_ipi_timer_interrupt(struct pt_regs *); ...@@ -85,7 +85,7 @@ void smp_ipi_timer_interrupt(struct pt_regs *);
void smp_local_timer_interrupt(void); void smp_local_timer_interrupt(void);
static void send_IPI_allbutself(int, int); static void send_IPI_allbutself(int, int);
static void send_IPI_mask(cpumask_t, int, int); static void send_IPI_mask(const struct cpumask *, int, int);
unsigned long send_IPI_mask_phys(cpumask_t, int, int); unsigned long send_IPI_mask_phys(cpumask_t, int, int);
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
...@@ -113,7 +113,7 @@ unsigned long send_IPI_mask_phys(cpumask_t, int, int); ...@@ -113,7 +113,7 @@ unsigned long send_IPI_mask_phys(cpumask_t, int, int);
void smp_send_reschedule(int cpu_id) void smp_send_reschedule(int cpu_id)
{ {
WARN_ON(cpu_is_offline(cpu_id)); WARN_ON(cpu_is_offline(cpu_id));
send_IPI_mask(cpumask_of_cpu(cpu_id), RESCHEDULE_IPI, 1); send_IPI_mask(cpumask_of(cpu_id), RESCHEDULE_IPI, 1);
} }
/*==========================================================================* /*==========================================================================*
...@@ -168,7 +168,7 @@ void smp_flush_cache_all(void) ...@@ -168,7 +168,7 @@ void smp_flush_cache_all(void)
spin_lock(&flushcache_lock); spin_lock(&flushcache_lock);
mask=cpus_addr(cpumask); mask=cpus_addr(cpumask);
atomic_set_mask(*mask, (atomic_t *)&flushcache_cpumask); atomic_set_mask(*mask, (atomic_t *)&flushcache_cpumask);
send_IPI_mask(cpumask, INVALIDATE_CACHE_IPI, 0); send_IPI_mask(&cpumask, INVALIDATE_CACHE_IPI, 0);
_flush_cache_copyback_all(); _flush_cache_copyback_all();
while (flushcache_cpumask) while (flushcache_cpumask)
mb(); mb();
...@@ -264,7 +264,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm) ...@@ -264,7 +264,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
preempt_disable(); preempt_disable();
cpu_id = smp_processor_id(); cpu_id = smp_processor_id();
mmc = &mm->context[cpu_id]; mmc = &mm->context[cpu_id];
cpu_mask = mm->cpu_vm_mask; cpu_mask = *mm_cpumask(mm);
cpu_clear(cpu_id, cpu_mask); cpu_clear(cpu_id, cpu_mask);
if (*mmc != NO_CONTEXT) { if (*mmc != NO_CONTEXT) {
...@@ -273,7 +273,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm) ...@@ -273,7 +273,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
if (mm == current->mm) if (mm == current->mm)
activate_context(mm); activate_context(mm);
else else
cpu_clear(cpu_id, mm->cpu_vm_mask); cpumask_clear_cpu(cpu_id, mm_cpumask(mm));
local_irq_restore(flags); local_irq_restore(flags);
} }
if (!cpus_empty(cpu_mask)) if (!cpus_empty(cpu_mask))
...@@ -334,7 +334,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) ...@@ -334,7 +334,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
preempt_disable(); preempt_disable();
cpu_id = smp_processor_id(); cpu_id = smp_processor_id();
mmc = &mm->context[cpu_id]; mmc = &mm->context[cpu_id];
cpu_mask = mm->cpu_vm_mask; cpu_mask = *mm_cpumask(mm);
cpu_clear(cpu_id, cpu_mask); cpu_clear(cpu_id, cpu_mask);
#ifdef DEBUG_SMP #ifdef DEBUG_SMP
...@@ -424,7 +424,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, ...@@ -424,7 +424,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
* We have to send the IPI only to * We have to send the IPI only to
* CPUs affected. * CPUs affected.
*/ */
send_IPI_mask(cpumask, INVALIDATE_TLB_IPI, 0); send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0);
while (!cpus_empty(flush_cpumask)) { while (!cpus_empty(flush_cpumask)) {
/* nothing. lockup detection does not belong here */ /* nothing. lockup detection does not belong here */
...@@ -469,7 +469,7 @@ void smp_invalidate_interrupt(void) ...@@ -469,7 +469,7 @@ void smp_invalidate_interrupt(void)
if (flush_mm == current->active_mm) if (flush_mm == current->active_mm)
activate_context(flush_mm); activate_context(flush_mm);
else else
cpu_clear(cpu_id, flush_mm->cpu_vm_mask); cpumask_clear_cpu(cpu_id, mm_cpumask(flush_mm));
} else { } else {
unsigned long va = flush_va; unsigned long va = flush_va;
...@@ -546,14 +546,14 @@ static void stop_this_cpu(void *dummy) ...@@ -546,14 +546,14 @@ static void stop_this_cpu(void *dummy)
for ( ; ; ); for ( ; ; );
} }
void arch_send_call_function_ipi(cpumask_t mask) void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{ {
send_IPI_mask(mask, CALL_FUNCTION_IPI, 0); send_IPI_mask(mask, CALL_FUNCTION_IPI, 0);
} }
void arch_send_call_function_single_ipi(int cpu) void arch_send_call_function_single_ipi(int cpu)
{ {
send_IPI_mask(cpumask_of_cpu(cpu), CALL_FUNC_SINGLE_IPI, 0); send_IPI_mask(cpumask_of(cpu), CALL_FUNC_SINGLE_IPI, 0);
} }
/*==========================================================================* /*==========================================================================*
...@@ -729,7 +729,7 @@ static void send_IPI_allbutself(int ipi_num, int try) ...@@ -729,7 +729,7 @@ static void send_IPI_allbutself(int ipi_num, int try)
cpumask = cpu_online_map; cpumask = cpu_online_map;
cpu_clear(smp_processor_id(), cpumask); cpu_clear(smp_processor_id(), cpumask);
send_IPI_mask(cpumask, ipi_num, try); send_IPI_mask(&cpumask, ipi_num, try);
} }
/*==========================================================================* /*==========================================================================*
...@@ -752,7 +752,7 @@ static void send_IPI_allbutself(int ipi_num, int try) ...@@ -752,7 +752,7 @@ static void send_IPI_allbutself(int ipi_num, int try)
* ---------- --- -------------------------------------------------------- * ---------- --- --------------------------------------------------------
* *
*==========================================================================*/ *==========================================================================*/
static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try) static void send_IPI_mask(const struct cpumask *cpumask, int ipi_num, int try)
{ {
cpumask_t physid_mask, tmp; cpumask_t physid_mask, tmp;
int cpu_id, phys_id; int cpu_id, phys_id;
...@@ -761,11 +761,11 @@ static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try) ...@@ -761,11 +761,11 @@ static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try)
if (num_cpus <= 1) /* NO MP */ if (num_cpus <= 1) /* NO MP */
return; return;
cpus_and(tmp, cpumask, cpu_online_map); cpumask_and(&tmp, cpumask, cpu_online_mask);
BUG_ON(!cpus_equal(cpumask, tmp)); BUG_ON(!cpumask_equal(cpumask, &tmp));
physid_mask = CPU_MASK_NONE; physid_mask = CPU_MASK_NONE;
for_each_cpu_mask(cpu_id, cpumask){ for_each_cpu(cpu_id, cpumask) {
if ((phys_id = cpu_to_physid(cpu_id)) != -1) if ((phys_id = cpu_to_physid(cpu_id)) != -1)
cpu_set(phys_id, physid_mask); cpu_set(phys_id, physid_mask);
} }
......
...@@ -178,7 +178,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) ...@@ -178,7 +178,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++)
physid_set(phys_id, phys_cpu_present_map); physid_set(phys_id, phys_cpu_present_map);
#ifndef CONFIG_HOTPLUG_CPU #ifndef CONFIG_HOTPLUG_CPU
cpu_present_map = cpu_possible_map; init_cpu_present(&cpu_possible_map);
#endif #endif
show_mp_info(nr_cpu); show_mp_info(nr_cpu);
......
...@@ -88,7 +88,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = { ...@@ -88,7 +88,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = {
.irq = AU1000_RTC_MATCH2_INT, .irq = AU1000_RTC_MATCH2_INT,
.set_next_event = au1x_rtcmatch2_set_next_event, .set_next_event = au1x_rtcmatch2_set_next_event,
.set_mode = au1x_rtcmatch2_set_mode, .set_mode = au1x_rtcmatch2_set_mode,
.cpumask = CPU_MASK_ALL_PTR, .cpumask = cpu_all_mask,
}; };
static struct irqaction au1x_rtcmatch2_irqaction = { static struct irqaction au1x_rtcmatch2_irqaction = {
......
...@@ -24,12 +24,10 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS]; ...@@ -24,12 +24,10 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid) #define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
#define parent_node(node) (node) #define parent_node(node) (node)
#define node_to_cpumask(node) (hub_data(node)->h_cpus)
#define cpumask_of_node(node) (&hub_data(node)->h_cpus) #define cpumask_of_node(node) (&hub_data(node)->h_cpus)
struct pci_bus; struct pci_bus;
extern int pcibus_to_node(struct pci_bus *); extern int pcibus_to_node(struct pci_bus *);
#define pcibus_to_cpumask(bus) (cpu_online_map)
#define cpumask_of_pcibus(bus) (cpu_online_mask) #define cpumask_of_pcibus(bus) (cpu_online_mask)
extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
......
...@@ -178,8 +178,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -178,8 +178,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
* Mark current->active_mm as not "active" anymore. * Mark current->active_mm as not "active" anymore.
* We don't want to mislead possible IPI tlb flush routines. * We don't want to mislead possible IPI tlb flush routines.
*/ */
cpu_clear(cpu, prev->cpu_vm_mask); cpumask_clear_cpu(cpu, mm_cpumask(prev));
cpu_set(cpu, next->cpu_vm_mask); cpumask_set_cpu(cpu, mm_cpumask(next));
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -235,8 +235,8 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) ...@@ -235,8 +235,8 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next)
TLBMISS_HANDLER_SETUP_PGD(next->pgd); TLBMISS_HANDLER_SETUP_PGD(next->pgd);
/* mark mmu ownership change */ /* mark mmu ownership change */
cpu_clear(cpu, prev->cpu_vm_mask); cpumask_clear_cpu(cpu, mm_cpumask(prev));
cpu_set(cpu, next->cpu_vm_mask); cpumask_set_cpu(cpu, mm_cpumask(next));
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -258,7 +258,7 @@ drop_mmu_context(struct mm_struct *mm, unsigned cpu) ...@@ -258,7 +258,7 @@ drop_mmu_context(struct mm_struct *mm, unsigned cpu)
local_irq_save(flags); local_irq_save(flags);
if (cpu_isset(cpu, mm->cpu_vm_mask)) { if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
get_new_mmu_context(mm, cpu); get_new_mmu_context(mm, cpu);
#ifdef CONFIG_MIPS_MT_SMTC #ifdef CONFIG_MIPS_MT_SMTC
/* See comments for similar code above */ /* See comments for similar code above */
......
...@@ -19,7 +19,7 @@ struct task_struct; ...@@ -19,7 +19,7 @@ struct task_struct;
struct plat_smp_ops { struct plat_smp_ops {
void (*send_ipi_single)(int cpu, unsigned int action); void (*send_ipi_single)(int cpu, unsigned int action);
void (*send_ipi_mask)(cpumask_t mask, unsigned int action); void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
void (*init_secondary)(void); void (*init_secondary)(void);
void (*smp_finish)(void); void (*smp_finish)(void);
void (*cpus_done)(void); void (*cpus_done)(void);
......
...@@ -78,6 +78,6 @@ extern void play_dead(void); ...@@ -78,6 +78,6 @@ extern void play_dead(void);
extern asmlinkage void smp_call_function_interrupt(void); extern asmlinkage void smp_call_function_interrupt(void);
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#endif /* __ASM_SMP_H */ #endif /* __ASM_SMP_H */
...@@ -80,11 +80,11 @@ void cmp_send_ipi_single(int cpu, unsigned int action) ...@@ -80,11 +80,11 @@ void cmp_send_ipi_single(int cpu, unsigned int action)
local_irq_restore(flags); local_irq_restore(flags);
} }
static void cmp_send_ipi_mask(cpumask_t mask, unsigned int action) static void cmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
cmp_send_ipi_single(i, action); cmp_send_ipi_single(i, action);
} }
...@@ -171,7 +171,7 @@ void __init cmp_smp_setup(void) ...@@ -171,7 +171,7 @@ void __init cmp_smp_setup(void)
for (i = 1; i < NR_CPUS; i++) { for (i = 1; i < NR_CPUS; i++) {
if (amon_cpu_avail(i)) { if (amon_cpu_avail(i)) {
cpu_set(i, cpu_possible_map); set_cpu_possible(i, true);
__cpu_number_map[i] = ++ncpu; __cpu_number_map[i] = ++ncpu;
__cpu_logical_map[ncpu] = i; __cpu_logical_map[ncpu] = i;
} }
......
...@@ -70,7 +70,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0, ...@@ -70,7 +70,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0,
write_vpe_c0_vpeconf0(tmp); write_vpe_c0_vpeconf0(tmp);
/* Record this as available CPU */ /* Record this as available CPU */
cpu_set(tc, cpu_possible_map); set_cpu_possible(tc, true);
__cpu_number_map[tc] = ++ncpu; __cpu_number_map[tc] = ++ncpu;
__cpu_logical_map[ncpu] = tc; __cpu_logical_map[ncpu] = tc;
} }
...@@ -141,11 +141,11 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action) ...@@ -141,11 +141,11 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
local_irq_restore(flags); local_irq_restore(flags);
} }
static void vsmp_send_ipi_mask(cpumask_t mask, unsigned int action) static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
vsmp_send_ipi_single(i, action); vsmp_send_ipi_single(i, action);
} }
......
...@@ -18,7 +18,8 @@ static void up_send_ipi_single(int cpu, unsigned int action) ...@@ -18,7 +18,8 @@ static void up_send_ipi_single(int cpu, unsigned int action)
panic(KERN_ERR "%s called", __func__); panic(KERN_ERR "%s called", __func__);
} }
static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) static inline void up_send_ipi_mask(const struct cpumask *mask,
unsigned int action)
{ {
panic(KERN_ERR "%s called", __func__); panic(KERN_ERR "%s called", __func__);
} }
......
...@@ -128,7 +128,7 @@ asmlinkage __cpuinit void start_secondary(void) ...@@ -128,7 +128,7 @@ asmlinkage __cpuinit void start_secondary(void)
cpu_idle(); cpu_idle();
} }
void arch_send_call_function_ipi(cpumask_t mask) void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{ {
mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
} }
...@@ -183,15 +183,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus) ...@@ -183,15 +183,15 @@ 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
cpu_present_map = cpu_possible_map; init_cpu_present(&cpu_possible_map);
#endif #endif
} }
/* preload SMP state for boot cpu */ /* preload SMP state for boot cpu */
void __devinit smp_prepare_boot_cpu(void) void __devinit smp_prepare_boot_cpu(void)
{ {
cpu_set(0, cpu_possible_map); set_cpu_possible(0, true);
cpu_set(0, cpu_online_map); set_cpu_online(0, true);
cpu_set(0, cpu_callin_map); cpu_set(0, cpu_callin_map);
} }
......
...@@ -305,7 +305,7 @@ int __init smtc_build_cpu_map(int start_cpu_slot) ...@@ -305,7 +305,7 @@ int __init smtc_build_cpu_map(int start_cpu_slot)
*/ */
ntcs = ((read_c0_mvpconf0() & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1; ntcs = ((read_c0_mvpconf0() & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) { for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) {
cpu_set(i, cpu_possible_map); set_cpu_possible(i, true);
__cpu_number_map[i] = i; __cpu_number_map[i] = i;
__cpu_logical_map[i] = i; __cpu_logical_map[i] = i;
} }
...@@ -525,8 +525,8 @@ void smtc_prepare_cpus(int cpus) ...@@ -525,8 +525,8 @@ void smtc_prepare_cpus(int cpus)
* Pull any physically present but unused TCs out of circulation. * Pull any physically present but unused TCs out of circulation.
*/ */
while (tc < (((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1)) { while (tc < (((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1)) {
cpu_clear(tc, cpu_possible_map); set_cpu_possible(tc, false);
cpu_clear(tc, cpu_present_map); set_cpu_present(tc, false);
tc++; tc++;
} }
......
...@@ -43,11 +43,12 @@ static void ssmtc_send_ipi_single(int cpu, unsigned int action) ...@@ -43,11 +43,12 @@ static void ssmtc_send_ipi_single(int cpu, unsigned int action)
/* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */ /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
} }
static inline void ssmtc_send_ipi_mask(cpumask_t mask, unsigned int action) static inline void ssmtc_send_ipi_mask(const struct cpumask *mask,
unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
ssmtc_send_ipi_single(i, action); ssmtc_send_ipi_single(i, action);
} }
......
...@@ -79,7 +79,7 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma) ...@@ -79,7 +79,7 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma)
* cores it has been used on * cores it has been used on
*/ */
if (vma) if (vma)
mask = vma->vm_mm->cpu_vm_mask; mask = *mm_cpumask(vma->vm_mm);
else else
mask = cpu_online_map; mask = cpu_online_map;
cpu_clear(cpu, mask); cpu_clear(cpu, mask);
......
...@@ -21,11 +21,11 @@ static void msmtc_send_ipi_single(int cpu, unsigned int action) ...@@ -21,11 +21,11 @@ static void msmtc_send_ipi_single(int cpu, unsigned int action)
smtc_send_ipi(cpu, LINUX_SMP_IPI, action); smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
} }
static void msmtc_send_ipi_mask(cpumask_t mask, unsigned int action) static void msmtc_send_ipi_mask(const struct cpumask *mask, unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
msmtc_send_ipi_single(i, action); msmtc_send_ipi_single(i, action);
} }
......
...@@ -97,11 +97,11 @@ static void yos_send_ipi_single(int cpu, unsigned int action) ...@@ -97,11 +97,11 @@ static void yos_send_ipi_single(int cpu, unsigned int action)
} }
} }
static void yos_send_ipi_mask(cpumask_t mask, unsigned int action) static void yos_send_ipi_mask(const struct cpumask *mask, unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
yos_send_ipi_single(i, action); yos_send_ipi_single(i, action);
} }
......
...@@ -421,7 +421,7 @@ static void __init node_mem_init(cnodeid_t node) ...@@ -421,7 +421,7 @@ static void __init node_mem_init(cnodeid_t node)
/* /*
* A node with nothing. We use it to avoid any special casing in * A node with nothing. We use it to avoid any special casing in
* node_to_cpumask * cpumask_of_node
*/ */
static struct node_data null_node = { static struct node_data null_node = {
.hub = { .hub = {
......
...@@ -165,11 +165,11 @@ static void ip27_send_ipi_single(int destid, unsigned int action) ...@@ -165,11 +165,11 @@ static void ip27_send_ipi_single(int destid, unsigned int action)
REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq); REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
} }
static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action) static void ip27_send_ipi(const struct cpumask *mask, unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
ip27_send_ipi_single(i, action); ip27_send_ipi_single(i, action);
} }
......
...@@ -82,11 +82,12 @@ static void bcm1480_send_ipi_single(int cpu, unsigned int action) ...@@ -82,11 +82,12 @@ static void bcm1480_send_ipi_single(int cpu, unsigned int action)
__raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]); __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]);
} }
static void bcm1480_send_ipi_mask(cpumask_t mask, unsigned int action) static void bcm1480_send_ipi_mask(const struct cpumask *mask,
unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
bcm1480_send_ipi_single(i, action); bcm1480_send_ipi_single(i, action);
} }
......
...@@ -70,11 +70,12 @@ static void sb1250_send_ipi_single(int cpu, unsigned int action) ...@@ -70,11 +70,12 @@ static void sb1250_send_ipi_single(int cpu, unsigned int action)
__raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]); __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]);
} }
static inline void sb1250_send_ipi_mask(cpumask_t mask, unsigned int action) static inline void sb1250_send_ipi_mask(const struct cpumask *mask,
unsigned int action)
{ {
unsigned int i; unsigned int i;
for_each_cpu_mask(i, mask) for_each_cpu(i, mask)
sb1250_send_ipi_single(i, action); sb1250_send_ipi_single(i, action);
} }
......
...@@ -38,13 +38,13 @@ extern unsigned long mmu_context_cache[NR_CPUS]; ...@@ -38,13 +38,13 @@ extern unsigned long mmu_context_cache[NR_CPUS];
#define enter_lazy_tlb(mm, tsk) do {} while (0) #define enter_lazy_tlb(mm, tsk) do {} while (0)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define cpu_ran_vm(cpu, task) \ #define cpu_ran_vm(cpu, mm) \
cpu_set((cpu), (task)->cpu_vm_mask) cpumask_set_cpu((cpu), mm_cpumask(mm))
#define cpu_maybe_ran_vm(cpu, task) \ #define cpu_maybe_ran_vm(cpu, mm) \
cpu_test_and_set((cpu), (task)->cpu_vm_mask) cpumask_test_and_set_cpu((cpu), mm_cpumask(mm))
#else #else
#define cpu_ran_vm(cpu, task) do {} while (0) #define cpu_ran_vm(cpu, mm) do {} while (0)
#define cpu_maybe_ran_vm(cpu, task) true #define cpu_maybe_ran_vm(cpu, mm) true
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
/* /*
......
...@@ -30,7 +30,6 @@ extern void smp_send_all_nop(void); ...@@ -30,7 +30,6 @@ extern void smp_send_all_nop(void);
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
#endif /* !ASSEMBLY */ #endif /* !ASSEMBLY */
......
...@@ -146,7 +146,7 @@ extern void smp_generic_take_timebase(void); ...@@ -146,7 +146,7 @@ extern void smp_generic_take_timebase(void);
extern struct smp_ops_t *smp_ops; extern struct smp_ops_t *smp_ops;
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
/* Definitions relative to the secondary CPU spin loop /* Definitions relative to the secondary CPU spin loop
* and entry point. Not all of them exist on both 32 and * and entry point. Not all of them exist on both 32 and
......
...@@ -17,11 +17,6 @@ static inline int cpu_to_node(int cpu) ...@@ -17,11 +17,6 @@ static inline int cpu_to_node(int cpu)
#define parent_node(node) (node) #define parent_node(node) (node)
static inline cpumask_t node_to_cpumask(int node)
{
return numa_cpumask_lookup_table[node];
}
#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
int of_node_to_nid(struct device_node *device); int of_node_to_nid(struct device_node *device);
...@@ -36,11 +31,6 @@ static inline int pcibus_to_node(struct pci_bus *bus) ...@@ -36,11 +31,6 @@ static inline int pcibus_to_node(struct pci_bus *bus)
} }
#endif #endif
#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
CPU_MASK_ALL : \
node_to_cpumask(pcibus_to_node(bus)) \
)
#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
cpu_all_mask : \ cpu_all_mask : \
cpumask_of_node(pcibus_to_node(bus))) cpumask_of_node(pcibus_to_node(bus)))
...@@ -104,8 +94,6 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, ...@@ -104,8 +94,6 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#include <asm/smp.h> #include <asm/smp.h>
#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
#define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) #define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu))
#define topology_core_id(cpu) (cpu_to_core_id(cpu)) #define topology_core_id(cpu) (cpu_to_core_id(cpu))
......
...@@ -431,9 +431,9 @@ void __init smp_setup_cpu_maps(void) ...@@ -431,9 +431,9 @@ void __init smp_setup_cpu_maps(void)
for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
DBG(" thread %d -> cpu %d (hard id %d)\n", DBG(" thread %d -> cpu %d (hard id %d)\n",
j, cpu, intserv[j]); j, cpu, intserv[j]);
cpu_set(cpu, cpu_present_map); set_cpu_present(cpu, true);
set_hard_smp_processor_id(cpu, intserv[j]); set_hard_smp_processor_id(cpu, intserv[j]);
cpu_set(cpu, cpu_possible_map); set_cpu_possible(cpu, true);
cpu++; cpu++;
} }
} }
...@@ -479,7 +479,7 @@ void __init smp_setup_cpu_maps(void) ...@@ -479,7 +479,7 @@ void __init smp_setup_cpu_maps(void)
maxcpus); maxcpus);
for (cpu = 0; cpu < maxcpus; cpu++) for (cpu = 0; cpu < maxcpus; cpu++)
cpu_set(cpu, cpu_possible_map); set_cpu_possible(cpu, true);
out: out:
of_node_put(dn); of_node_put(dn);
} }
......
...@@ -189,11 +189,11 @@ void arch_send_call_function_single_ipi(int cpu) ...@@ -189,11 +189,11 @@ void arch_send_call_function_single_ipi(int cpu)
smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE); smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE);
} }
void arch_send_call_function_ipi(cpumask_t mask) void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{ {
unsigned int cpu; unsigned int cpu;
for_each_cpu_mask(cpu, mask) for_each_cpu(cpu, mask)
smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION); smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION);
} }
...@@ -287,7 +287,7 @@ void __devinit smp_prepare_boot_cpu(void) ...@@ -287,7 +287,7 @@ void __devinit smp_prepare_boot_cpu(void)
{ {
BUG_ON(smp_processor_id() != boot_cpuid); BUG_ON(smp_processor_id() != boot_cpuid);
cpu_set(boot_cpuid, cpu_online_map); set_cpu_online(boot_cpuid, true);
cpu_set(boot_cpuid, per_cpu(cpu_sibling_map, boot_cpuid)); cpu_set(boot_cpuid, per_cpu(cpu_sibling_map, boot_cpuid));
cpu_set(boot_cpuid, per_cpu(cpu_core_map, boot_cpuid)); cpu_set(boot_cpuid, per_cpu(cpu_core_map, boot_cpuid));
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
...@@ -307,7 +307,7 @@ int generic_cpu_disable(void) ...@@ -307,7 +307,7 @@ int generic_cpu_disable(void)
if (cpu == boot_cpuid) if (cpu == boot_cpuid)
return -EBUSY; return -EBUSY;
cpu_clear(cpu, cpu_online_map); set_cpu_online(cpu, false);
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
vdso_data->processorCount--; vdso_data->processorCount--;
fixup_irqs(cpu_online_map); fixup_irqs(cpu_online_map);
...@@ -361,7 +361,7 @@ void generic_mach_cpu_die(void) ...@@ -361,7 +361,7 @@ void generic_mach_cpu_die(void)
smp_wmb(); smp_wmb();
while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
cpu_relax(); cpu_relax();
cpu_set(cpu, cpu_online_map); set_cpu_online(cpu, true);
local_irq_enable(); local_irq_enable();
} }
#endif #endif
...@@ -508,7 +508,7 @@ int __devinit start_secondary(void *unused) ...@@ -508,7 +508,7 @@ int __devinit start_secondary(void *unused)
ipi_call_lock(); ipi_call_lock();
notify_cpu_starting(cpu); notify_cpu_starting(cpu);
cpu_set(cpu, cpu_online_map); set_cpu_online(cpu, true);
/* Update sibling maps */ /* Update sibling maps */
base = cpu_first_thread_in_core(cpu); base = cpu_first_thread_in_core(cpu);
for (i = 0; i < threads_per_core; i++) { for (i = 0; i < threads_per_core; i++) {
......
...@@ -320,7 +320,7 @@ static int __init smp_psurge_probe(void) ...@@ -320,7 +320,7 @@ static int __init smp_psurge_probe(void)
if (ncpus > NR_CPUS) if (ncpus > NR_CPUS)
ncpus = NR_CPUS; ncpus = NR_CPUS;
for (i = 1; i < ncpus ; ++i) for (i = 1; i < ncpus ; ++i)
cpu_set(i, cpu_present_map); set_cpu_present(i, true);
if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352); if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352);
...@@ -867,7 +867,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr) ...@@ -867,7 +867,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
int smp_core99_cpu_disable(void) int smp_core99_cpu_disable(void)
{ {
cpu_clear(smp_processor_id(), cpu_online_map); set_cpu_online(smp_processor_id(), false);
/* XXX reset cpu affinity here */ /* XXX reset cpu affinity here */
mpic_cpu_set_priority(0xf); mpic_cpu_set_priority(0xf);
...@@ -952,7 +952,7 @@ void __init pmac_setup_smp(void) ...@@ -952,7 +952,7 @@ void __init pmac_setup_smp(void)
int cpu; int cpu;
for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu)
cpu_set(cpu, cpu_possible_map); set_cpu_possible(cpu, true);
smp_ops = &psurge_smp_ops; smp_ops = &psurge_smp_ops;
} }
#endif /* CONFIG_PPC32 */ #endif /* CONFIG_PPC32 */
......
...@@ -94,7 +94,7 @@ static int pseries_cpu_disable(void) ...@@ -94,7 +94,7 @@ static int pseries_cpu_disable(void)
{ {
int cpu = smp_processor_id(); int cpu = smp_processor_id();
cpu_clear(cpu, cpu_online_map); set_cpu_online(cpu, false);
vdso_data->processorCount--; vdso_data->processorCount--;
/*fix boot_cpuid here*/ /*fix boot_cpuid here*/
...@@ -185,7 +185,7 @@ static int pseries_add_processor(struct device_node *np) ...@@ -185,7 +185,7 @@ static int pseries_add_processor(struct device_node *np)
for_each_cpu_mask(cpu, tmp) { for_each_cpu_mask(cpu, tmp) {
BUG_ON(cpu_isset(cpu, cpu_present_map)); BUG_ON(cpu_isset(cpu, cpu_present_map));
cpu_set(cpu, cpu_present_map); set_cpu_present(cpu, true);
set_hard_smp_processor_id(cpu, *intserv++); set_hard_smp_processor_id(cpu, *intserv++);
} }
err = 0; err = 0;
...@@ -217,7 +217,7 @@ static void pseries_remove_processor(struct device_node *np) ...@@ -217,7 +217,7 @@ static void pseries_remove_processor(struct device_node *np)
if (get_hard_smp_processor_id(cpu) != intserv[i]) if (get_hard_smp_processor_id(cpu) != intserv[i])
continue; continue;
BUG_ON(cpu_online(cpu)); BUG_ON(cpu_online(cpu));
cpu_clear(cpu, cpu_present_map); set_cpu_present(cpu, false);
set_hard_smp_processor_id(cpu, -1); set_hard_smp_processor_id(cpu, -1);
break; break;
} }
......
...@@ -62,7 +62,7 @@ extern struct mutex smp_cpu_state_mutex; ...@@ -62,7 +62,7 @@ extern struct mutex smp_cpu_state_mutex;
extern int smp_cpu_polarization[]; extern int smp_cpu_polarization[];
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#endif #endif
......
...@@ -9,7 +9,6 @@ const struct cpumask *cpu_coregroup_mask(unsigned int cpu); ...@@ -9,7 +9,6 @@ const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
extern cpumask_t cpu_core_map[NR_CPUS]; extern cpumask_t cpu_core_map[NR_CPUS];
#define topology_core_siblings(cpu) (cpu_core_map[cpu])
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) #define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
int topology_set_cpu_management(int fc); int topology_set_cpu_management(int fc);
......
...@@ -147,11 +147,11 @@ static void smp_ext_bitcall(int cpu, ec_bit_sig sig) ...@@ -147,11 +147,11 @@ static void smp_ext_bitcall(int cpu, ec_bit_sig sig)
udelay(10); udelay(10);
} }
void arch_send_call_function_ipi(cpumask_t mask) void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{ {
int cpu; int cpu;
for_each_cpu_mask(cpu, mask) for_each_cpu(cpu, mask)
smp_ext_bitcall(cpu, ec_call_function); smp_ext_bitcall(cpu, ec_call_function);
} }
......
...@@ -44,7 +44,6 @@ void plat_send_ipi(unsigned int cpu, unsigned int message); ...@@ -44,7 +44,6 @@ void plat_send_ipi(unsigned int cpu, unsigned int message);
void arch_send_call_function_single_ipi(int cpu); void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
#else #else
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define cpu_to_node(cpu) ((void)(cpu),0) #define cpu_to_node(cpu) ((void)(cpu),0)
#define parent_node(node) ((void)(node),0) #define parent_node(node) ((void)(node),0)
#define node_to_cpumask(node) ((void)node, cpu_online_map)
#define cpumask_of_node(node) ((void)node, cpu_online_mask) #define cpumask_of_node(node) ((void)node, cpu_online_mask)
#define pcibus_to_node(bus) ((void)(bus), -1) #define pcibus_to_node(bus) ((void)(bus), -1)
......
...@@ -36,7 +36,6 @@ extern int sparc64_multi_core; ...@@ -36,7 +36,6 @@ extern int sparc64_multi_core;
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
/* /*
* General functions that each host system must provide. * General functions that each host system must provide.
......
...@@ -12,22 +12,8 @@ static inline int cpu_to_node(int cpu) ...@@ -12,22 +12,8 @@ static inline int cpu_to_node(int cpu)
#define parent_node(node) (node) #define parent_node(node) (node)
static inline cpumask_t node_to_cpumask(int node)
{
return numa_cpumask_lookup_table[node];
}
#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
/*
* Returns a pointer to the cpumask of CPUs on Node 'node'.
* Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
*/
#define node_to_cpumask_ptr(v, node) \
cpumask_t *v = &(numa_cpumask_lookup_table[node])
#define node_to_cpumask_ptr_next(v, node) \
v = &(numa_cpumask_lookup_table[node])
struct pci_bus; struct pci_bus;
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
extern int pcibus_to_node(struct pci_bus *pbus); extern int pcibus_to_node(struct pci_bus *pbus);
...@@ -71,8 +57,6 @@ static inline int pcibus_to_node(struct pci_bus *pbus) ...@@ -71,8 +57,6 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
#define topology_core_id(cpu) (cpu_data(cpu).core_id) #define topology_core_id(cpu) (cpu_data(cpu).core_id)
#define topology_core_siblings(cpu) (cpu_core_map[cpu])
#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) #define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
#define mc_capable() (sparc64_multi_core) #define mc_capable() (sparc64_multi_core)
......
...@@ -35,8 +35,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -35,8 +35,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
unsigned cpu = smp_processor_id(); unsigned cpu = smp_processor_id();
if(prev != next){ if(prev != next){
cpu_clear(cpu, prev->cpu_vm_mask); cpumask_clear_cpu(cpu, mm_cpumask(prev));
cpu_set(cpu, next->cpu_vm_mask); cpumask_set_cpu(cpu, mm_cpumask(next));
if(next != &init_mm) if(next != &init_mm)
__switch_mm(&next->context.id); __switch_mm(&next->context.id);
} }
......
...@@ -111,7 +111,7 @@ void smp_prepare_cpus(unsigned int maxcpus) ...@@ -111,7 +111,7 @@ void smp_prepare_cpus(unsigned int maxcpus)
int i; int i;
for (i = 0; i < ncpus; ++i) for (i = 0; i < ncpus; ++i)
cpu_set(i, cpu_possible_map); set_cpu_possible(i, true);
cpu_clear(me, cpu_online_map); cpu_clear(me, cpu_online_map);
cpu_set(me, cpu_online_map); cpu_set(me, cpu_online_map);
......
...@@ -37,12 +37,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -37,12 +37,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
if (likely(prev != next)) { if (likely(prev != next)) {
/* stop flush ipis for the previous mm */ /* stop flush ipis for the previous mm */
cpu_clear(cpu, prev->cpu_vm_mask); cpumask_clear_cpu(cpu, mm_cpumask(prev));
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
percpu_write(cpu_tlbstate.state, TLBSTATE_OK); percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
percpu_write(cpu_tlbstate.active_mm, next); percpu_write(cpu_tlbstate.active_mm, next);
#endif #endif
cpu_set(cpu, next->cpu_vm_mask); cpumask_set_cpu(cpu, mm_cpumask(next));
/* Re-load page tables */ /* Re-load page tables */
load_cr3(next->pgd); load_cr3(next->pgd);
...@@ -58,7 +58,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -58,7 +58,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
percpu_write(cpu_tlbstate.state, TLBSTATE_OK); percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next); BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next);
if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) { if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next))) {
/* We were in lazy tlb mode and leave_mm disabled /* We were in lazy tlb mode and leave_mm disabled
* tlb flush IPI delivery. We must reload CR3 * tlb flush IPI delivery. We must reload CR3
* to make sure to use no freed page tables. * to make sure to use no freed page tables.
......
...@@ -121,7 +121,6 @@ static inline void arch_send_call_function_single_ipi(int cpu) ...@@ -121,7 +121,6 @@ static inline void arch_send_call_function_single_ipi(int cpu)
smp_ops.send_call_func_single_ipi(cpu); smp_ops.send_call_func_single_ipi(cpu);
} }
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{ {
smp_ops.send_call_func_ipi(mask); smp_ops.send_call_func_ipi(mask);
......
...@@ -227,17 +227,14 @@ static struct irq_cfg *get_one_free_irq_cfg(int node) ...@@ -227,17 +227,14 @@ static struct irq_cfg *get_one_free_irq_cfg(int node)
cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node); cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node);
if (cfg) { if (cfg) {
if (!alloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) { if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) {
kfree(cfg); kfree(cfg);
cfg = NULL; cfg = NULL;
} else if (!alloc_cpumask_var_node(&cfg->old_domain, } else if (!zalloc_cpumask_var_node(&cfg->old_domain,
GFP_ATOMIC, node)) { GFP_ATOMIC, node)) {
free_cpumask_var(cfg->domain); free_cpumask_var(cfg->domain);
kfree(cfg); kfree(cfg);
cfg = NULL; cfg = NULL;
} else {
cpumask_clear(cfg->domain);
cpumask_clear(cfg->old_domain);
} }
} }
......
...@@ -67,8 +67,8 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload) ...@@ -67,8 +67,8 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
preempt_disable(); preempt_disable();
load_LDT(pc); load_LDT(pc);
if (!cpus_equal(current->mm->cpu_vm_mask, if (!cpumask_equal(mm_cpumask(current->mm),
cpumask_of_cpu(smp_processor_id()))) cpumask_of(smp_processor_id())))
smp_call_function(flush_ldt, current->mm, 1); smp_call_function(flush_ldt, current->mm, 1);
preempt_enable(); preempt_enable();
#else #else
......
...@@ -555,10 +555,8 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) ...@@ -555,10 +555,8 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
void __init init_c1e_mask(void) void __init init_c1e_mask(void)
{ {
/* If we're using c1e_idle, we need to allocate c1e_mask. */ /* If we're using c1e_idle, we need to allocate c1e_mask. */
if (pm_idle == c1e_idle) { if (pm_idle == c1e_idle)
alloc_cpumask_var(&c1e_mask, GFP_KERNEL); zalloc_cpumask_var(&c1e_mask, GFP_KERNEL);
cpumask_clear(c1e_mask);
}
} }
static int __init idle_setup(char *str) static int __init idle_setup(char *str)
......
...@@ -1059,12 +1059,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) ...@@ -1059,12 +1059,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
#endif #endif
current_thread_info()->cpu = 0; /* needed? */ current_thread_info()->cpu = 0; /* needed? */
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL); zalloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL);
cpumask_clear(per_cpu(cpu_core_map, i));
cpumask_clear(per_cpu(cpu_sibling_map, i));
cpumask_clear(cpu_data(i).llc_shared_map);
} }
set_cpu_sibling_map(0); set_cpu_sibling_map(0);
......
...@@ -93,7 +93,6 @@ static struct irqaction irq0 = { ...@@ -93,7 +93,6 @@ static struct irqaction irq0 = {
void __init setup_default_timer_irq(void) void __init setup_default_timer_irq(void)
{ {
irq0.mask = cpumask_of_cpu(0);
setup_irq(0, &irq0); setup_irq(0, &irq0);
} }
......
...@@ -59,7 +59,8 @@ void leave_mm(int cpu) ...@@ -59,7 +59,8 @@ void leave_mm(int cpu)
{ {
if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK) if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
BUG(); BUG();
cpu_clear(cpu, percpu_read(cpu_tlbstate.active_mm)->cpu_vm_mask); cpumask_clear_cpu(cpu,
mm_cpumask(percpu_read(cpu_tlbstate.active_mm)));
load_cr3(swapper_pg_dir); load_cr3(swapper_pg_dir);
} }
EXPORT_SYMBOL_GPL(leave_mm); EXPORT_SYMBOL_GPL(leave_mm);
...@@ -234,8 +235,8 @@ void flush_tlb_current_task(void) ...@@ -234,8 +235,8 @@ void flush_tlb_current_task(void)
preempt_disable(); preempt_disable();
local_flush_tlb(); local_flush_tlb();
if (cpumask_any_but(&mm->cpu_vm_mask, smp_processor_id()) < nr_cpu_ids) if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
flush_tlb_others(&mm->cpu_vm_mask, mm, TLB_FLUSH_ALL); flush_tlb_others(mm_cpumask(mm), mm, TLB_FLUSH_ALL);
preempt_enable(); preempt_enable();
} }
...@@ -249,8 +250,8 @@ void flush_tlb_mm(struct mm_struct *mm) ...@@ -249,8 +250,8 @@ void flush_tlb_mm(struct mm_struct *mm)
else else
leave_mm(smp_processor_id()); leave_mm(smp_processor_id());
} }
if (cpumask_any_but(&mm->cpu_vm_mask, smp_processor_id()) < nr_cpu_ids) if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
flush_tlb_others(&mm->cpu_vm_mask, mm, TLB_FLUSH_ALL); flush_tlb_others(mm_cpumask(mm), mm, TLB_FLUSH_ALL);
preempt_enable(); preempt_enable();
} }
...@@ -268,8 +269,8 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va) ...@@ -268,8 +269,8 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
leave_mm(smp_processor_id()); leave_mm(smp_processor_id());
} }
if (cpumask_any_but(&mm->cpu_vm_mask, smp_processor_id()) < nr_cpu_ids) if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
flush_tlb_others(&mm->cpu_vm_mask, mm, va); flush_tlb_others(mm_cpumask(mm), mm, va);
preempt_enable(); preempt_enable();
} }
......
...@@ -1165,14 +1165,14 @@ static void xen_drop_mm_ref(struct mm_struct *mm) ...@@ -1165,14 +1165,14 @@ static void xen_drop_mm_ref(struct mm_struct *mm)
/* Get the "official" set of cpus referring to our pagetable. */ /* Get the "official" set of cpus referring to our pagetable. */
if (!alloc_cpumask_var(&mask, GFP_ATOMIC)) { if (!alloc_cpumask_var(&mask, GFP_ATOMIC)) {
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
if (!cpumask_test_cpu(cpu, &mm->cpu_vm_mask) if (!cpumask_test_cpu(cpu, mm_cpumask(mm))
&& per_cpu(xen_current_cr3, cpu) != __pa(mm->pgd)) && per_cpu(xen_current_cr3, cpu) != __pa(mm->pgd))
continue; continue;
smp_call_function_single(cpu, drop_other_mm_ref, mm, 1); smp_call_function_single(cpu, drop_other_mm_ref, mm, 1);
} }
return; return;
} }
cpumask_copy(mask, &mm->cpu_vm_mask); cpumask_copy(mask, mm_cpumask(mm));
/* It's possible that a vcpu may have a stale reference to our /* It's possible that a vcpu may have a stale reference to our
cr3, because its in lazy mode, and it hasn't yet flushed cr3, because its in lazy mode, and it hasn't yet flushed
......
...@@ -193,7 +193,7 @@ acpi_status __init acpi_os_initialize(void) ...@@ -193,7 +193,7 @@ acpi_status __init acpi_os_initialize(void)
static void bind_to_cpu0(struct work_struct *work) static void bind_to_cpu0(struct work_struct *work)
{ {
set_cpus_allowed(current, cpumask_of_cpu(0)); set_cpus_allowed_ptr(current, cpumask_of(0));
kfree(work); kfree(work);
} }
......
...@@ -511,7 +511,7 @@ int acpi_processor_preregister_performance( ...@@ -511,7 +511,7 @@ int acpi_processor_preregister_performance(
struct acpi_processor *match_pr; struct acpi_processor *match_pr;
struct acpi_psd_package *match_pdomain; struct acpi_psd_package *match_pdomain;
if (!alloc_cpumask_var(&covered_cpus, GFP_KERNEL)) if (!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))
return -ENOMEM; return -ENOMEM;
mutex_lock(&performance_mutex); mutex_lock(&performance_mutex);
...@@ -558,7 +558,6 @@ int acpi_processor_preregister_performance( ...@@ -558,7 +558,6 @@ int acpi_processor_preregister_performance(
* Now that we have _PSD data from all CPUs, lets setup P-state * Now that we have _PSD data from all CPUs, lets setup P-state
* domain info. * domain info.
*/ */
cpumask_clear(covered_cpus);
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
pr = per_cpu(processors, i); pr = per_cpu(processors, i);
if (!pr) if (!pr)
......
...@@ -77,7 +77,7 @@ static int acpi_processor_update_tsd_coord(void) ...@@ -77,7 +77,7 @@ static int acpi_processor_update_tsd_coord(void)
struct acpi_tsd_package *pdomain, *match_pdomain; struct acpi_tsd_package *pdomain, *match_pdomain;
struct acpi_processor_throttling *pthrottling, *match_pthrottling; struct acpi_processor_throttling *pthrottling, *match_pthrottling;
if (!alloc_cpumask_var(&covered_cpus, GFP_KERNEL)) if (!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))
return -ENOMEM; return -ENOMEM;
/* /*
...@@ -105,7 +105,6 @@ static int acpi_processor_update_tsd_coord(void) ...@@ -105,7 +105,6 @@ static int acpi_processor_update_tsd_coord(void)
if (retval) if (retval)
goto err_ret; goto err_ret;
cpumask_clear(covered_cpus);
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
pr = per_cpu(processors, i); pr = per_cpu(processors, i);
if (!pr) if (!pr)
......
...@@ -884,13 +884,12 @@ static int efx_wanted_rx_queues(void) ...@@ -884,13 +884,12 @@ static int efx_wanted_rx_queues(void)
int count; int count;
int cpu; int cpu;
if (unlikely(!alloc_cpumask_var(&core_mask, GFP_KERNEL))) { if (unlikely(!zalloc_cpumask_var(&core_mask, GFP_KERNEL))) {
printk(KERN_WARNING printk(KERN_WARNING
"sfc: RSS disabled due to allocation failure\n"); "sfc: RSS disabled due to allocation failure\n");
return 1; return 1;
} }
cpumask_clear(core_mask);
count = 0; count = 0;
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
if (!cpumask_test_cpu(cpu, core_mask)) { if (!cpumask_test_cpu(cpu, core_mask)) {
......
...@@ -154,9 +154,8 @@ int sync_start(void) ...@@ -154,9 +154,8 @@ int sync_start(void)
{ {
int err; int err;
if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL)) if (!zalloc_cpumask_var(&marked_cpus, GFP_KERNEL))
return -ENOMEM; return -ENOMEM;
cpumask_clear(marked_cpus);
start_cpu_work(); start_cpu_work();
......
...@@ -37,9 +37,6 @@ ...@@ -37,9 +37,6 @@
#ifndef parent_node #ifndef parent_node
#define parent_node(node) ((void)(node),0) #define parent_node(node) ((void)(node),0)
#endif #endif
#ifndef node_to_cpumask
#define node_to_cpumask(node) ((void)node, cpu_online_map)
#endif
#ifndef cpumask_of_node #ifndef cpumask_of_node
#define cpumask_of_node(node) ((void)node, cpu_online_mask) #define cpumask_of_node(node) ((void)node, cpu_online_mask)
#endif #endif
...@@ -55,18 +52,4 @@ ...@@ -55,18 +52,4 @@
#endif /* CONFIG_NUMA */ #endif /* CONFIG_NUMA */
/*
* returns pointer to cpumask for specified node
* Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
*/
#ifndef node_to_cpumask_ptr
#define node_to_cpumask_ptr(v, node) \
cpumask_t _##v = node_to_cpumask(node); \
const cpumask_t *v = &_##v
#define node_to_cpumask_ptr_next(v, node) \
_##v = node_to_cpumask(node)
#endif
#endif /* _ASM_GENERIC_TOPOLOGY_H */ #endif /* _ASM_GENERIC_TOPOLOGY_H */
This diff is collapsed.
...@@ -84,7 +84,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); ...@@ -84,7 +84,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
* struct irqaction - per interrupt action descriptor * struct irqaction - per interrupt action descriptor
* @handler: interrupt handler function * @handler: interrupt handler function
* @flags: flags (see IRQF_* above) * @flags: flags (see IRQF_* above)
* @mask: no comment as it is useless and about to be removed
* @name: name of the device * @name: name of the device
* @dev_id: cookie to identify the device * @dev_id: cookie to identify the device
* @next: pointer to the next irqaction for shared interrupts * @next: pointer to the next irqaction for shared interrupts
...@@ -97,7 +96,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); ...@@ -97,7 +96,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
struct irqaction { struct irqaction {
irq_handler_t handler; irq_handler_t handler;
unsigned long flags; unsigned long flags;
cpumask_t mask;
const char *name; const char *name;
void *dev_id; void *dev_id;
struct irqaction *next; struct irqaction *next;
......
...@@ -1817,10 +1817,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, ...@@ -1817,10 +1817,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
return 0; return 0;
} }
#endif #endif
#ifndef CONFIG_CPUMASK_OFFSTACK
static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
{ {
return set_cpus_allowed_ptr(p, &new_mask); return set_cpus_allowed_ptr(p, &new_mask);
} }
#endif
/* /*
* Architectures can set this to 1 if they have specified * Architectures can set this to 1 if they have specified
......
...@@ -73,15 +73,6 @@ int smp_call_function(void(*func)(void *info), void *info, int wait); ...@@ -73,15 +73,6 @@ int smp_call_function(void(*func)(void *info), void *info, int wait);
void smp_call_function_many(const struct cpumask *mask, void smp_call_function_many(const struct cpumask *mask,
void (*func)(void *info), void *info, bool wait); void (*func)(void *info), void *info, bool wait);
/* Deprecated: Use smp_call_function_many which takes a pointer to the mask. */
static inline int
smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
int wait)
{
smp_call_function_many(&mask, func, info, wait);
return 0;
}
void __smp_call_function_single(int cpuid, struct call_single_data *data, void __smp_call_function_single(int cpuid, struct call_single_data *data,
int wait); int wait);
...@@ -144,8 +135,6 @@ static inline int up_smp_call_function(void (*func)(void *), void *info) ...@@ -144,8 +135,6 @@ static inline int up_smp_call_function(void (*func)(void *), void *info)
static inline void smp_send_reschedule(int cpu) { } static inline void smp_send_reschedule(int cpu) { }
#define num_booting_cpus() 1 #define num_booting_cpus() 1
#define smp_prepare_boot_cpu() do {} while (0) #define smp_prepare_boot_cpu() do {} while (0)
#define smp_call_function_mask(mask, func, info, wait) \
(up_smp_call_function(func, info))
#define smp_call_function_many(mask, func, info, wait) \ #define smp_call_function_many(mask, func, info, wait) \
(up_smp_call_function(func, info)) (up_smp_call_function(func, info))
static inline void init_call_single_data(void) static inline void init_call_single_data(void)
......
...@@ -211,12 +211,6 @@ int arch_update_cpu_topology(void); ...@@ -211,12 +211,6 @@ int arch_update_cpu_topology(void);
#ifndef topology_core_id #ifndef topology_core_id
#define topology_core_id(cpu) ((void)(cpu), 0) #define topology_core_id(cpu) ((void)(cpu), 0)
#endif #endif
#ifndef topology_thread_siblings
#define topology_thread_siblings(cpu) cpumask_of_cpu(cpu)
#endif
#ifndef topology_core_siblings
#define topology_core_siblings(cpu) cpumask_of_cpu(cpu)
#endif
#ifndef topology_thread_cpumask #ifndef topology_thread_cpumask
#define topology_thread_cpumask(cpu) cpumask_of(cpu) #define topology_thread_cpumask(cpu) cpumask_of(cpu)
#endif #endif
......
...@@ -359,11 +359,6 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { } ...@@ -359,11 +359,6 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#else #else
#if NR_CPUS > BITS_PER_LONG
cpumask_t cpu_mask_all __read_mostly = CPU_MASK_ALL;
EXPORT_SYMBOL(cpu_mask_all);
#endif
/* Setup number of possible processor ids */ /* Setup number of possible processor ids */
int nr_cpu_ids __read_mostly = NR_CPUS; int nr_cpu_ids __read_mostly = NR_CPUS;
EXPORT_SYMBOL(nr_cpu_ids); EXPORT_SYMBOL(nr_cpu_ids);
......
...@@ -347,13 +347,6 @@ void __smp_call_function_single(int cpu, struct call_single_data *data, ...@@ -347,13 +347,6 @@ void __smp_call_function_single(int cpu, struct call_single_data *data,
generic_exec_single(cpu, data, wait); generic_exec_single(cpu, data, wait);
} }
/* Deprecated: shim for archs using old arch_send_call_function_ipi API. */
#ifndef arch_send_call_function_ipi_mask
# define arch_send_call_function_ipi_mask(maskp) \
arch_send_call_function_ipi(*(maskp))
#endif
/** /**
* smp_call_function_many(): Run a function on a set of other CPUs. * smp_call_function_many(): Run a function on a set of other CPUs.
* @mask: The set of cpus to run on (only runs on online subset). * @mask: The set of cpus to run on (only runs on online subset).
......
...@@ -1984,11 +1984,9 @@ __tracing_open(struct inode *inode, struct file *file) ...@@ -1984,11 +1984,9 @@ __tracing_open(struct inode *inode, struct file *file)
if (current_trace) if (current_trace)
*iter->trace = *current_trace; *iter->trace = *current_trace;
if (!alloc_cpumask_var(&iter->started, GFP_KERNEL)) if (!zalloc_cpumask_var(&iter->started, GFP_KERNEL))
goto fail; goto fail;
cpumask_clear(iter->started);
if (current_trace && current_trace->print_max) if (current_trace && current_trace->print_max)
iter->tr = &max_tr; iter->tr = &max_tr;
else else
...@@ -4389,7 +4387,7 @@ __init static int tracer_alloc_buffers(void) ...@@ -4389,7 +4387,7 @@ __init static int tracer_alloc_buffers(void)
if (!alloc_cpumask_var(&tracing_cpumask, GFP_KERNEL)) if (!alloc_cpumask_var(&tracing_cpumask, GFP_KERNEL))
goto out_free_buffer_mask; goto out_free_buffer_mask;
if (!alloc_cpumask_var(&tracing_reader_cpumask, GFP_KERNEL)) if (!zalloc_cpumask_var(&tracing_reader_cpumask, GFP_KERNEL))
goto out_free_tracing_cpumask; goto out_free_tracing_cpumask;
/* To save memory, keep the ring buffer size to its minimum */ /* To save memory, keep the ring buffer size to its minimum */
...@@ -4400,7 +4398,6 @@ __init static int tracer_alloc_buffers(void) ...@@ -4400,7 +4398,6 @@ __init static int tracer_alloc_buffers(void)
cpumask_copy(tracing_buffer_mask, cpu_possible_mask); cpumask_copy(tracing_buffer_mask, cpu_possible_mask);
cpumask_copy(tracing_cpumask, cpu_all_mask); cpumask_copy(tracing_cpumask, cpu_all_mask);
cpumask_clear(tracing_reader_cpumask);
/* TODO: make the number of buffers hot pluggable with CPUS */ /* TODO: make the number of buffers hot pluggable with CPUS */
global_trace.buffer = ring_buffer_alloc(ring_buf_size, global_trace.buffer = ring_buffer_alloc(ring_buf_size,
......
...@@ -29,7 +29,6 @@ static unsigned long max_pages(unsigned long min_pages) ...@@ -29,7 +29,6 @@ static unsigned long max_pages(unsigned long min_pages)
int node = numa_node_id(); int node = numa_node_id();
struct zone *zones = NODE_DATA(node)->node_zones; struct zone *zones = NODE_DATA(node)->node_zones;
int num_cpus_on_node; int num_cpus_on_node;
const struct cpumask *cpumask_on_node = cpumask_of_node(node);
node_free_pages = node_free_pages =
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
...@@ -42,7 +41,7 @@ static unsigned long max_pages(unsigned long min_pages) ...@@ -42,7 +41,7 @@ static unsigned long max_pages(unsigned long min_pages)
max = node_free_pages / FRACTION_OF_NODE_MEM; max = node_free_pages / FRACTION_OF_NODE_MEM;
num_cpus_on_node = cpus_weight_nr(*cpumask_on_node); num_cpus_on_node = cpumask_weight(cpumask_of_node(node));
max /= num_cpus_on_node; max /= num_cpus_on_node;
return max(max, min_pages); return max(max, min_pages);
......
...@@ -738,8 +738,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) ...@@ -738,8 +738,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
bool called = true; bool called = true;
struct kvm_vcpu *vcpu; struct kvm_vcpu *vcpu;
if (alloc_cpumask_var(&cpus, GFP_ATOMIC)) zalloc_cpumask_var(&cpus, GFP_ATOMIC);
cpumask_clear(cpus);
spin_lock(&kvm->requests_lock); spin_lock(&kvm->requests_lock);
me = smp_processor_id(); me = smp_processor_id();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment