]> err.no Git - linux-2.6/commitdiff
[PATCH] irq: Remove set_native_irq_info
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 23 Feb 2007 11:13:55 +0000 (04:13 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Feb 2007 18:34:07 +0000 (10:34 -0800)
This patch replaces all instances of "set_native_irq_info(irq, mask)"
with "irq_desc[irq].affinity = mask".  The latter form is clearer
uses fewer abstractions, and makes access to this field uniform
accross different architectures.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/io_apic.c
arch/ia64/kernel/msi_ia64.c
arch/ia64/sn/kernel/msi_sn.c
arch/x86_64/kernel/io_apic.c
include/linux/irq.h

index 4ccebd454e256786d0e8e32fc9e540bf97ab5b72..6fec4dab70bb92f5adcd6105f513352cdf4bccf0 100644 (file)
@@ -343,7 +343,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
                        break;
                entry = irq_2_pin + entry->next;
        }
-       set_native_irq_info(irq, cpumask);
+       irq_desc[irq].affinity = cpumask;
        spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
@@ -1354,7 +1354,7 @@ static void __init setup_IO_APIC_irqs(void)
                }
                spin_lock_irqsave(&ioapic_lock, flags);
                __ioapic_write_entry(apic, pin, entry);
-               set_native_irq_info(irq, TARGET_CPUS);
+               irq_desc[irq].affinity = TARGET_CPUS;
                spin_unlock_irqrestore(&ioapic_lock, flags);
        }
        }
@@ -2585,7 +2585,7 @@ static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
        msg.address_lo |= MSI_ADDR_DEST_ID(dest);
 
        write_msi_msg(irq, &msg);
-       set_native_irq_info(irq, mask);
+       irq_desc[irq].affinity = mask;
 }
 #endif /* CONFIG_SMP */
 
@@ -2669,7 +2669,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
        dest = cpu_mask_to_apicid(mask);
 
        target_ht_irq(irq, dest);
-       set_native_irq_info(irq, mask);
+       irq_desc[irq].affinity = mask;
 }
 #endif
 
@@ -2875,7 +2875,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
 
        spin_lock_irqsave(&ioapic_lock, flags);
        __ioapic_write_entry(ioapic, pin, entry);
-       set_native_irq_info(irq, TARGET_CPUS);
+       irq_desc[irq].affinity = TARGET_CPUS;
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        return 0;
index 0d05450c91c458211b8f00b72f9e3e169460d601..e7220900ea14b012afe30aa09cced503f15a3937 100644 (file)
@@ -60,7 +60,7 @@ static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
        msg.address_lo = addr;
 
        write_msi_msg(irq, &msg);
-       set_native_irq_info(irq, cpu_mask);
+       irq_desc[irq].affinity = cpu_mask;
 }
 #endif /* CONFIG_SMP */
 
index ea3dc38d73fd49a3a022eee42373d80c8c74065f..49873aa4a37dcb2e1705e70081dfb7e9c11d291d 100644 (file)
@@ -204,7 +204,7 @@ static void sn_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
        msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
 
        write_msi_msg(irq, &msg);
-       set_native_irq_info(irq, cpu_mask);
+       irq_desc[irq].affinity = cpu_mask;
 }
 #endif /* CONFIG_SMP */
 
index 357b354921c13251d0f467b37683bedcf81fff05..184721348f59e1b0077cf3705b2f276e76b99ca9 100644 (file)
@@ -261,7 +261,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
 
        spin_lock_irqsave(&ioapic_lock, flags);
        __target_IO_APIC_irq(irq, dest, vector);
-       set_native_irq_info(irq, mask);
+       irq_desc[irq].affinity = mask;
        spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 #endif
@@ -857,7 +857,7 @@ static void __init setup_IO_APIC_irq(int apic, int pin, int idx, int irq)
        ioapic_write_entry(apic, pin, entry);
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       set_native_irq_info(irq, TARGET_CPUS);
+       irq_desc[irq].affinity = TARGET_CPUS;
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
 }
@@ -1930,7 +1930,7 @@ static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
        msg.address_lo |= MSI_ADDR_DEST_ID(dest);
 
        write_msi_msg(irq, &msg);
-       set_native_irq_info(irq, mask);
+       irq_desc[irq].affinity = mask;
 }
 #endif /* CONFIG_SMP */
 
@@ -2018,7 +2018,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
        dest = cpu_mask_to_apicid(tmp);
 
        target_ht_irq(irq, dest, vector);
-       set_native_irq_info(irq, mask);
+       irq_desc[irq].affinity = mask;
 }
 #endif
 
@@ -2143,7 +2143,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
        ioapic_write_entry(ioapic, pin, entry);
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       set_native_irq_info(irq, TARGET_CPUS);
+       irq_desc[irq].affinity = TARGET_CPUS;
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        return 0;
index aa5b3e6178a03657681915bfad659fec34111c40..b0a44b8e0281bf5b28aeffe58c4ad5f43a7dc1e1 100644 (file)
@@ -199,17 +199,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
 # define handle_dynamic_tick(a)                do { } while (0)
 #endif
 
-#ifdef CONFIG_SMP
-static inline void set_native_irq_info(int irq, cpumask_t mask)
-{
-       irq_desc[irq].affinity = mask;
-}
-#else
-static inline void set_native_irq_info(int irq, cpumask_t mask)
-{
-}
-#endif
-
 #ifdef CONFIG_SMP
 
 #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)