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 ...
This commit is contained in:
@@ -127,7 +127,7 @@ static inline void switch_mm(struct mm_struct *prev,
|
||||
|
||||
if (prev != next) {
|
||||
#ifdef CONFIG_SMP
|
||||
cpu_set(cpu, next->cpu_vm_mask);
|
||||
cpumask_set_cpu(cpu, mm_cpumask(next));
|
||||
#endif /* CONFIG_SMP */
|
||||
/* Set MPTB = next->pgd */
|
||||
*(volatile unsigned long *)MPTB = (unsigned long)next->pgd;
|
||||
@@ -135,7 +135,7 @@ static inline void switch_mm(struct mm_struct *prev,
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
else
|
||||
if (!cpu_test_and_set(cpu, next->cpu_vm_mask))
|
||||
if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
|
||||
activate_context(next);
|
||||
#endif /* CONFIG_SMP */
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ extern void smp_send_timer(void);
|
||||
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_ipi(cpumask_t mask);
|
||||
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
||||
|
||||
#endif /* not __ASSEMBLY__ */
|
||||
|
||||
|
@@ -85,7 +85,7 @@ void smp_ipi_timer_interrupt(struct pt_regs *);
|
||||
void smp_local_timer_interrupt(void);
|
||||
|
||||
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);
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
@@ -113,7 +113,7 @@ unsigned long send_IPI_mask_phys(cpumask_t, int, int);
|
||||
void smp_send_reschedule(int 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)
|
||||
spin_lock(&flushcache_lock);
|
||||
mask=cpus_addr(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();
|
||||
while (flushcache_cpumask)
|
||||
mb();
|
||||
@@ -264,7 +264,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
|
||||
preempt_disable();
|
||||
cpu_id = smp_processor_id();
|
||||
mmc = &mm->context[cpu_id];
|
||||
cpu_mask = mm->cpu_vm_mask;
|
||||
cpu_mask = *mm_cpumask(mm);
|
||||
cpu_clear(cpu_id, cpu_mask);
|
||||
|
||||
if (*mmc != NO_CONTEXT) {
|
||||
@@ -273,7 +273,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
|
||||
if (mm == current->mm)
|
||||
activate_context(mm);
|
||||
else
|
||||
cpu_clear(cpu_id, mm->cpu_vm_mask);
|
||||
cpumask_clear_cpu(cpu_id, mm_cpumask(mm));
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
if (!cpus_empty(cpu_mask))
|
||||
@@ -334,7 +334,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
|
||||
preempt_disable();
|
||||
cpu_id = smp_processor_id();
|
||||
mmc = &mm->context[cpu_id];
|
||||
cpu_mask = mm->cpu_vm_mask;
|
||||
cpu_mask = *mm_cpumask(mm);
|
||||
cpu_clear(cpu_id, cpu_mask);
|
||||
|
||||
#ifdef DEBUG_SMP
|
||||
@@ -424,7 +424,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
|
||||
* We have to send the IPI only to
|
||||
* CPUs affected.
|
||||
*/
|
||||
send_IPI_mask(cpumask, INVALIDATE_TLB_IPI, 0);
|
||||
send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0);
|
||||
|
||||
while (!cpus_empty(flush_cpumask)) {
|
||||
/* nothing. lockup detection does not belong here */
|
||||
@@ -469,7 +469,7 @@ void smp_invalidate_interrupt(void)
|
||||
if (flush_mm == current->active_mm)
|
||||
activate_context(flush_mm);
|
||||
else
|
||||
cpu_clear(cpu_id, flush_mm->cpu_vm_mask);
|
||||
cpumask_clear_cpu(cpu_id, mm_cpumask(flush_mm));
|
||||
} else {
|
||||
unsigned long va = flush_va;
|
||||
|
||||
@@ -546,14 +546,14 @@ static void stop_this_cpu(void *dummy)
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
cpumask = cpu_online_map;
|
||||
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)
|
||||
* ---------- --- --------------------------------------------------------
|
||||
*
|
||||
*==========================================================================*/
|
||||
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;
|
||||
int cpu_id, phys_id;
|
||||
@@ -761,11 +761,11 @@ static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try)
|
||||
if (num_cpus <= 1) /* NO MP */
|
||||
return;
|
||||
|
||||
cpus_and(tmp, cpumask, cpu_online_map);
|
||||
BUG_ON(!cpus_equal(cpumask, tmp));
|
||||
cpumask_and(&tmp, cpumask, cpu_online_mask);
|
||||
BUG_ON(!cpumask_equal(cpumask, &tmp));
|
||||
|
||||
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)
|
||||
cpu_set(phys_id, physid_mask);
|
||||
}
|
||||
|
@@ -178,7 +178,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++)
|
||||
physid_set(phys_id, phys_cpu_present_map);
|
||||
#ifndef CONFIG_HOTPLUG_CPU
|
||||
cpu_present_map = cpu_possible_map;
|
||||
init_cpu_present(&cpu_possible_map);
|
||||
#endif
|
||||
|
||||
show_mp_info(nr_cpu);
|
||||
|
Reference in New Issue
Block a user