]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
cpumask: Cleanup more uses of CPU_MASK and NODE_MASK
authorMike Travis <travis@sgi.com>
Sat, 5 Apr 2008 01:11:12 +0000 (18:11 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:44:58 +0000 (19:44 +0200)
 *  Replace usages of CPU_MASK_NONE, CPU_MASK_ALL, NODE_MASK_NONE,
    NODE_MASK_ALL to reduce stack requirements for large NR_CPUS
    and MAXNODES counts.

 *  In some cases, the cpumask variable was initialized but then overwritten
    with another value.  This is the case for changes like this:

    -       cpumask_t oldmask = CPU_MASK_ALL;
    +       cpumask_t oldmask;

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/io_apic_64.c
kernel/irq/chip.c
mm/allocpercpu.c

index b54464b26658227413cbbd17b810cf77ed9a14d6..9ba11d07920f794c71e11de98d51d8430e129cf2 100644 (file)
@@ -785,7 +785,7 @@ static void __clear_irq_vector(int irq)
                per_cpu(vector_irq, cpu)[vector] = -1;
 
        cfg->vector = 0;
-       cfg->domain = CPU_MASK_NONE;
+       cpus_clear(cfg->domain);
 }
 
 void __setup_vector_irq(int cpu)
index fdb3fbe2b0c4cbb2e0512098c24a0a5a83f21c0d..964964baefa23c2a8bdee504aa053d078ba29ad9 100644 (file)
@@ -47,7 +47,7 @@ void dynamic_irq_init(unsigned int irq)
        desc->irq_count = 0;
        desc->irqs_unhandled = 0;
 #ifdef CONFIG_SMP
-       desc->affinity = CPU_MASK_ALL;
+       cpus_setall(desc->affinity);
 #endif
        spin_unlock_irqrestore(&desc->lock, flags);
 }
index b0012e27fea8796da01cfb2172d1d5930c60d22f..f4026bae6eedadb9e077e3500480fc47feb25624 100644 (file)
@@ -82,9 +82,10 @@ EXPORT_SYMBOL_GPL(percpu_populate);
 int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp,
                           cpumask_t *mask)
 {
-       cpumask_t populated = CPU_MASK_NONE;
+       cpumask_t populated;
        int cpu;
 
+       cpus_clear(populated);
        for_each_cpu_mask(cpu, *mask)
                if (unlikely(!percpu_populate(__pdata, size, gfp, cpu))) {
                        __percpu_depopulate_mask(__pdata, &populated);