diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2018-06-04 11:33:55 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-06 09:18:20 -0400 |
| commit | c0255770ccdc77ef2184d2a0a2e0cde09d2b44a4 (patch) | |
| tree | 12d4b58e14b721fabee51115c2153a16cb697d98 | |
| parent | d340ebd696f921d3ad01b8c0c29dd38f2ad2bf3e (diff) | |
x86/apic: Provide apic_ack_irq()
apic_ack_edge() is explicitely for handling interrupt affinity cleanup when
interrupt remapping is not available or disable.
Remapped interrupts and also some of the platform specific special
interrupts, e.g. UV, invoke ack_APIC_irq() directly.
To address the issue of failing an affinity update with -EBUSY the delayed
affinity mechanism can be reused, but ack_APIC_irq() does not handle
that. Adding this to ack_APIC_irq() is not possible, because that function
is also used for exceptions and directly handled interrupts like IPIs.
Create a new function, which just contains the conditional invocation of
irq_move_irq() and the final ack_APIC_irq().
Reuse the new function in apic_ack_edge().
Preparatory change for the real fix.
Fixes: dccfe3147b42 ("x86/vector: Simplify vector move cleanup")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Song Liu <songliubraving@fb.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <liu.song.a23@gmail.com>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: stable@vger.kernel.org
Cc: Mike Travis <mike.travis@hpe.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Tariq Toukan <tariqt@mellanox.com>
Link: https://lkml.kernel.org/r/20180604162224.471925894@linutronix.de
| -rw-r--r-- | arch/x86/include/asm/apic.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/vector.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 08acd954f00e..74a9e06b6cfd 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
| @@ -436,6 +436,8 @@ static inline void apic_set_eoi_write(void (*eoi_write)(u32 reg, u32 v)) {} | |||
| 436 | 436 | ||
| 437 | #endif /* CONFIG_X86_LOCAL_APIC */ | 437 | #endif /* CONFIG_X86_LOCAL_APIC */ |
| 438 | 438 | ||
| 439 | extern void apic_ack_irq(struct irq_data *data); | ||
| 440 | |||
| 439 | static inline void ack_APIC_irq(void) | 441 | static inline void ack_APIC_irq(void) |
| 440 | { | 442 | { |
| 441 | /* | 443 | /* |
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 72b575a0b662..b708f597eee3 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c | |||
| @@ -809,13 +809,18 @@ static int apic_retrigger_irq(struct irq_data *irqd) | |||
| 809 | return 1; | 809 | return 1; |
| 810 | } | 810 | } |
| 811 | 811 | ||
| 812 | void apic_ack_edge(struct irq_data *irqd) | 812 | void apic_ack_irq(struct irq_data *irqd) |
| 813 | { | 813 | { |
| 814 | irq_complete_move(irqd_cfg(irqd)); | ||
| 815 | irq_move_irq(irqd); | 814 | irq_move_irq(irqd); |
| 816 | ack_APIC_irq(); | 815 | ack_APIC_irq(); |
| 817 | } | 816 | } |
| 818 | 817 | ||
| 818 | void apic_ack_edge(struct irq_data *irqd) | ||
| 819 | { | ||
| 820 | irq_complete_move(irqd_cfg(irqd)); | ||
| 821 | apic_ack_irq(irqd); | ||
| 822 | } | ||
| 823 | |||
| 819 | static struct irq_chip lapic_controller = { | 824 | static struct irq_chip lapic_controller = { |
| 820 | .name = "APIC", | 825 | .name = "APIC", |
| 821 | .irq_ack = apic_ack_edge, | 826 | .irq_ack = apic_ack_edge, |
