Skip to content

Commit

Permalink
x86: x2apic, IR: Move eoi_ioapic_irq() into a CONFIG_INTR_REMAP section
Browse files Browse the repository at this point in the history
Address the following complier warning:

   arch/x86/kernel/apic/io_apic.c:2543: warning: `eoi_ioapic_irq' defined but not used

By moving that function (and eoi_ioapic_irq()) into an existing
#ifdef CONFIG_INTR_REMAP section of the code.

[ Impact: cleanup ]

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: dwmw2@infradead.org
Cc: Weidong Han <weidong.han@intel.com>
LKML-Reference: <20090420200450.271099000@linux-os.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Weidong Han <weidong.han@intel.com>
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed Apr 21, 2009
1 parent fc1edaf commit 25629d8
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2517,39 +2517,6 @@ static void irq_complete_move(struct irq_desc **descp)
static inline void irq_complete_move(struct irq_desc **descp) {}
#endif

static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
{
int apic, pin;
struct irq_pin_list *entry;

entry = cfg->irq_2_pin;
for (;;) {

if (!entry)
break;

apic = entry->apic;
pin = entry->pin;
io_apic_eoi(apic, pin);
entry = entry->next;
}
}

static void
eoi_ioapic_irq(struct irq_desc *desc)
{
struct irq_cfg *cfg;
unsigned long flags;
unsigned int irq;

irq = desc->irq;
cfg = desc->chip_data;

spin_lock_irqsave(&ioapic_lock, flags);
__eoi_ioapic_irq(irq, cfg);
spin_unlock_irqrestore(&ioapic_lock, flags);
}

static void ack_apic_edge(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
Expand Down Expand Up @@ -2659,6 +2626,39 @@ static void ack_apic_level(unsigned int irq)
}

#ifdef CONFIG_INTR_REMAP
static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
{
int apic, pin;
struct irq_pin_list *entry;

entry = cfg->irq_2_pin;
for (;;) {

if (!entry)
break;

apic = entry->apic;
pin = entry->pin;
io_apic_eoi(apic, pin);
entry = entry->next;
}
}

static void
eoi_ioapic_irq(struct irq_desc *desc)
{
struct irq_cfg *cfg;
unsigned long flags;
unsigned int irq;

irq = desc->irq;
cfg = desc->chip_data;

spin_lock_irqsave(&ioapic_lock, flags);
__eoi_ioapic_irq(irq, cfg);
spin_unlock_irqrestore(&ioapic_lock, flags);
}

static void ir_ack_apic_edge(unsigned int irq)
{
ack_APIC_irq();
Expand Down

0 comments on commit 25629d8

Please sign in to comment.