diff options
author | Márton Németh <nm127@freemail.hu> | 2012-05-08 03:24:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-08 05:23:15 -0400 |
commit | d1ecad6eee8629c6b425580aad76cf99b85956e9 (patch) | |
tree | caf9b53eef231395a26938c5fdc11f87545c1cef /arch/x86/kernel/apic | |
parent | 9438ef7f4ea73d5430a330fc206f97826eb9fb16 (diff) |
x86/apic: Only compile local function if used with !CONFIG_GENERIC_PENDING_IRQ
The local function io_apic_level_ack_pending() is only called
from io_apic_level_ack_pending(). The later function is only
compiled if CONFIG_GENERIC_PENDING_IRQ is defined. Move the
io_apic_level_ack_pending() to the existing #ifdef
CONFIG_GENERIC_PENDING_IRQ code block.
This will remove the following warning message during compiling
without CONFIG_GENERIC_PENDING_IRQ defined:
* arch/x86/kernel/apic/io_apic.c:382: warning: ‘io_apic_level_ack_pending’ defined but not used
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Link: http://lkml.kernel.org/r/1336461860.2296.3.camel@sbsiddha-mobl2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 973539c128a4..e245365670a4 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -346,29 +346,6 @@ void native_io_apic_modify(unsigned int apic, unsigned int reg, unsigned int val | |||
346 | writel(value, &io_apic->data); | 346 | writel(value, &io_apic->data); |
347 | } | 347 | } |
348 | 348 | ||
349 | static bool io_apic_level_ack_pending(struct irq_cfg *cfg) | ||
350 | { | ||
351 | struct irq_pin_list *entry; | ||
352 | unsigned long flags; | ||
353 | |||
354 | raw_spin_lock_irqsave(&ioapic_lock, flags); | ||
355 | for_each_irq_pin(entry, cfg->irq_2_pin) { | ||
356 | unsigned int reg; | ||
357 | int pin; | ||
358 | |||
359 | pin = entry->pin; | ||
360 | reg = io_apic_read(entry->apic, 0x10 + pin*2); | ||
361 | /* Is the remote IRR bit set? */ | ||
362 | if (reg & IO_APIC_REDIR_REMOTE_IRR) { | ||
363 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); | ||
364 | return true; | ||
365 | } | ||
366 | } | ||
367 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); | ||
368 | |||
369 | return false; | ||
370 | } | ||
371 | |||
372 | union entry_union { | 349 | union entry_union { |
373 | struct { u32 w1, w2; }; | 350 | struct { u32 w1, w2; }; |
374 | struct IO_APIC_route_entry entry; | 351 | struct IO_APIC_route_entry entry; |
@@ -2519,6 +2496,29 @@ static void ack_apic_edge(struct irq_data *data) | |||
2519 | atomic_t irq_mis_count; | 2496 | atomic_t irq_mis_count; |
2520 | 2497 | ||
2521 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 2498 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
2499 | static bool io_apic_level_ack_pending(struct irq_cfg *cfg) | ||
2500 | { | ||
2501 | struct irq_pin_list *entry; | ||
2502 | unsigned long flags; | ||
2503 | |||
2504 | raw_spin_lock_irqsave(&ioapic_lock, flags); | ||
2505 | for_each_irq_pin(entry, cfg->irq_2_pin) { | ||
2506 | unsigned int reg; | ||
2507 | int pin; | ||
2508 | |||
2509 | pin = entry->pin; | ||
2510 | reg = io_apic_read(entry->apic, 0x10 + pin*2); | ||
2511 | /* Is the remote IRR bit set? */ | ||
2512 | if (reg & IO_APIC_REDIR_REMOTE_IRR) { | ||
2513 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); | ||
2514 | return true; | ||
2515 | } | ||
2516 | } | ||
2517 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); | ||
2518 | |||
2519 | return false; | ||
2520 | } | ||
2521 | |||
2522 | static inline bool ioapic_irqd_mask(struct irq_data *data, struct irq_cfg *cfg) | 2522 | static inline bool ioapic_irqd_mask(struct irq_data *data, struct irq_cfg *cfg) |
2523 | { | 2523 | { |
2524 | /* If we are moving the irq we need to mask it */ | 2524 | /* If we are moving the irq we need to mask it */ |