aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/io_apic.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 3a45d2ec9740..4baa9cbd630a 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2517,39 +2517,6 @@ static void irq_complete_move(struct irq_desc **descp)
2517static inline void irq_complete_move(struct irq_desc **descp) {} 2517static inline void irq_complete_move(struct irq_desc **descp) {}
2518#endif 2518#endif
2519 2519
2520static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
2521{
2522 int apic, pin;
2523 struct irq_pin_list *entry;
2524
2525 entry = cfg->irq_2_pin;
2526 for (;;) {
2527
2528 if (!entry)
2529 break;
2530
2531 apic = entry->apic;
2532 pin = entry->pin;
2533 io_apic_eoi(apic, pin);
2534 entry = entry->next;
2535 }
2536}
2537
2538static void
2539eoi_ioapic_irq(struct irq_desc *desc)
2540{
2541 struct irq_cfg *cfg;
2542 unsigned long flags;
2543 unsigned int irq;
2544
2545 irq = desc->irq;
2546 cfg = desc->chip_data;
2547
2548 spin_lock_irqsave(&ioapic_lock, flags);
2549 __eoi_ioapic_irq(irq, cfg);
2550 spin_unlock_irqrestore(&ioapic_lock, flags);
2551}
2552
2553static void ack_apic_edge(unsigned int irq) 2520static void ack_apic_edge(unsigned int irq)
2554{ 2521{
2555 struct irq_desc *desc = irq_to_desc(irq); 2522 struct irq_desc *desc = irq_to_desc(irq);
@@ -2659,6 +2626,39 @@ static void ack_apic_level(unsigned int irq)
2659} 2626}
2660 2627
2661#ifdef CONFIG_INTR_REMAP 2628#ifdef CONFIG_INTR_REMAP
2629static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
2630{
2631 int apic, pin;
2632 struct irq_pin_list *entry;
2633
2634 entry = cfg->irq_2_pin;
2635 for (;;) {
2636
2637 if (!entry)
2638 break;
2639
2640 apic = entry->apic;
2641 pin = entry->pin;
2642 io_apic_eoi(apic, pin);
2643 entry = entry->next;
2644 }
2645}
2646
2647static void
2648eoi_ioapic_irq(struct irq_desc *desc)
2649{
2650 struct irq_cfg *cfg;
2651 unsigned long flags;
2652 unsigned int irq;
2653
2654 irq = desc->irq;
2655 cfg = desc->chip_data;
2656
2657 spin_lock_irqsave(&ioapic_lock, flags);
2658 __eoi_ioapic_irq(irq, cfg);
2659 spin_unlock_irqrestore(&ioapic_lock, flags);
2660}
2661
2662static void ir_ack_apic_edge(unsigned int irq) 2662static void ir_ack_apic_edge(unsigned int irq)
2663{ 2663{
2664 ack_APIC_irq(); 2664 ack_APIC_irq();