x86: use cpumask_of_cpu()
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 5 Apr 2008 13:39:08 +0000 (22:39 +0900)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:36 +0000 (17:41 +0200)
Use cpumask_of_cpu() rather than the pair of cpus_clear() and cpu_set().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/genapic_flat_64.c
arch/x86/kernel/io_apic_64.c

index 6a44e8dace372519aa23eadfcb3df70bda21792e..1a9c68845ee8c8538e6b6e6f1c04d5d4a19fb9be 100644 (file)
@@ -138,12 +138,9 @@ static cpumask_t physflat_target_cpus(void)
 
 static cpumask_t physflat_vector_allocation_domain(int cpu)
 {
-       cpumask_t domain = CPU_MASK_NONE;
-       cpu_set(cpu, domain);
-       return domain;
+       return cpumask_of_cpu(cpu);
 }
 
-
 static void physflat_send_IPI_mask(cpumask_t cpumask, int vector)
 {
        send_IPI_mask_sequence(cpumask, vector);
index 09ea0ec39de6036b81047dd9d08cc4659cb6cbcd..b54464b26658227413cbbd17b810cf77ed9a14d6 100644 (file)
@@ -1362,9 +1362,7 @@ static int ioapic_retrigger_irq(unsigned int irq)
        unsigned long flags;
 
        spin_lock_irqsave(&vector_lock, flags);
-       cpus_clear(mask);
-       cpu_set(first_cpu(cfg->domain), mask);
-
+       mask = cpumask_of_cpu(first_cpu(cfg->domain));
        send_IPI_mask(mask, cfg->vector);
        spin_unlock_irqrestore(&vector_lock, flags);