Commit f2699245 authored by Arnaud S. Launay's avatar Arnaud S. Launay Committed by Linus Torvalds

[PATCH] Warning fix for i386 io apic

  Patch enclosed to correct the following warning in 2.5.20.

  io_apic.c:223: warning: `move' defined but not used

  I discussed it with Rusty, so I extended the SMP part and
  declared a null function for UP (my first thought was to #ifdef
  balance_irq() ).
parent 39c330aa
...@@ -219,6 +219,7 @@ extern unsigned long irq_affinity [NR_IRQS]; ...@@ -219,6 +219,7 @@ extern unsigned long irq_affinity [NR_IRQS];
#define IRQ_ALLOWED(cpu,allowed_mask) \ #define IRQ_ALLOWED(cpu,allowed_mask) \
((1 << cpu) & (allowed_mask)) ((1 << cpu) & (allowed_mask))
#if CONFIG_SMP
static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned long now, int direction) static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned long now, int direction)
{ {
int search_idle = 1; int search_idle = 1;
...@@ -247,7 +248,6 @@ static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned lon ...@@ -247,7 +248,6 @@ static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned lon
static inline void balance_irq(int irq) static inline void balance_irq(int irq)
{ {
#if CONFIG_SMP
irq_balance_t *entry = irq_balance + irq; irq_balance_t *entry = irq_balance + irq;
unsigned long now = jiffies; unsigned long now = jiffies;
...@@ -263,8 +263,10 @@ static inline void balance_irq(int irq) ...@@ -263,8 +263,10 @@ static inline void balance_irq(int irq)
entry->cpu = move(entry->cpu, allowed_mask, now, random_number); entry->cpu = move(entry->cpu, allowed_mask, now, random_number);
set_ioapic_affinity(irq, 1 << entry->cpu); set_ioapic_affinity(irq, 1 << entry->cpu);
} }
#endif
} }
#else /* !SMP */
static inline void balance_irq(int irq) { }
#endif
/* /*
* support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to * support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment