]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/x86/kernel/apic/io_apic.c: move io_apic_level_ack_pending() inside CONFIG_GENERI...
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 3 May 2012 05:43:13 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:13 +0000 (15:46 +1000)
x86_64 allnoconfig:

arch/x86/kernel/apic/io_apic.c:382: warning: 'io_apic_level_ack_pending' defined but not used

Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/apic/io_apic.c

index e88300d8e80aa2465aec91af3768578dee32c727..c348c57b7f7b802a891a671b645360b089e45c12 100644 (file)
@@ -379,29 +379,6 @@ static void __io_apic_modify(unsigned int apic, unsigned int reg, unsigned int v
        writel(value, &io_apic->data);
 }
 
-static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
-{
-       struct irq_pin_list *entry;
-       unsigned long flags;
-
-       raw_spin_lock_irqsave(&ioapic_lock, flags);
-       for_each_irq_pin(entry, cfg->irq_2_pin) {
-               unsigned int reg;
-               int pin;
-
-               pin = entry->pin;
-               reg = io_apic_read(entry->apic, 0x10 + pin*2);
-               /* Is the remote IRR bit set? */
-               if (reg & IO_APIC_REDIR_REMOTE_IRR) {
-                       raw_spin_unlock_irqrestore(&ioapic_lock, flags);
-                       return true;
-               }
-       }
-       raw_spin_unlock_irqrestore(&ioapic_lock, flags);
-
-       return false;
-}
-
 union entry_union {
        struct { u32 w1, w2; };
        struct IO_APIC_route_entry entry;
@@ -2552,6 +2529,30 @@ static void ack_apic_edge(struct irq_data *data)
 atomic_t irq_mis_count;
 
 #ifdef CONFIG_GENERIC_PENDING_IRQ
+
+static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
+{
+       struct irq_pin_list *entry;
+       unsigned long flags;
+
+       raw_spin_lock_irqsave(&ioapic_lock, flags);
+       for_each_irq_pin(entry, cfg->irq_2_pin) {
+               unsigned int reg;
+               int pin;
+
+               pin = entry->pin;
+               reg = io_apic_read(entry->apic, 0x10 + pin*2);
+               /* Is the remote IRR bit set? */
+               if (reg & IO_APIC_REDIR_REMOTE_IRR) {
+                       raw_spin_unlock_irqrestore(&ioapic_lock, flags);
+                       return true;
+               }
+       }
+       raw_spin_unlock_irqrestore(&ioapic_lock, flags);
+
+       return false;
+}
+
 static inline bool ioapic_irqd_mask(struct irq_data *data, struct irq_cfg *cfg)
 {
        /* If we are moving the irq we need to mask it */