aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic/io_apic.c46
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
349static 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
372union entry_union { 349union 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)
2519atomic_t irq_mis_count; 2496atomic_t irq_mis_count;
2520 2497
2521#ifdef CONFIG_GENERIC_PENDING_IRQ 2498#ifdef CONFIG_GENERIC_PENDING_IRQ
2499static 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
2522static inline bool ioapic_irqd_mask(struct irq_data *data, struct irq_cfg *cfg) 2522static 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 */