Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/core
[linux-2.6.git] / kernel / irq / manage.c
index 1c50550..cbc3828 100644 (file)
 
 #include "internals.h"
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS)
 cpumask_var_t irq_default_affinity;
 
-static int init_irq_default_affinity(void)
-{
-       alloc_cpumask_var(&irq_default_affinity, GFP_KERNEL);
-       cpumask_setall(irq_default_affinity);
-       return 0;
-}
-core_initcall(init_irq_default_affinity);
-
 /**
  *     synchronize_irq - wait for pending IRQ handlers (on other CPUs)
  *     @irq: interrupt number to wait for
@@ -117,7 +109,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
 /*
  * Generic version of the affinity autoselector.
  */
-int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
+static int setup_affinity(unsigned int irq, struct irq_desc *desc)
 {
        if (!irq_can_set_affinity(irq))
                return 0;
@@ -141,7 +133,7 @@ set_affinity:
        return 0;
 }
 #else
-static inline int do_irq_select_affinity(unsigned int irq, struct irq_desc *d)
+static inline int setup_affinity(unsigned int irq, struct irq_desc *d)
 {
        return irq_select_affinity(irq);
 }
@@ -157,14 +149,14 @@ int irq_select_affinity_usr(unsigned int irq)
        int ret;
 
        spin_lock_irqsave(&desc->lock, flags);
-       ret = do_irq_select_affinity(irq, desc);
+       ret = setup_affinity(irq, desc);
        spin_unlock_irqrestore(&desc->lock, flags);
 
        return ret;
 }
 
 #else
-static inline int do_irq_select_affinity(int irq, struct irq_desc *desc)
+static inline int setup_affinity(unsigned int irq, struct irq_desc *desc)
 {
        return 0;
 }
@@ -496,7 +488,7 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
                        desc->status |= IRQ_NO_BALANCING;
 
                /* Set default affinity mask once everything is setup */
-               do_irq_select_affinity(irq, desc);
+               setup_affinity(irq, desc);
 
        } else if ((new->flags & IRQF_TRIGGER_MASK)
                        && (new->flags & IRQF_TRIGGER_MASK)