Skip to content

Commit c025577

Browse files
committed
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: dccfe31 ("x86/vector: Simplify vector move cleanup") Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Song Liu <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Song Liu <[email protected]> Cc: Dmitry Safonov <[email protected]> Cc: [email protected] Cc: Mike Travis <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Tariq Toukan <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent d340ebd commit c025577

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

arch/x86/include/asm/apic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ static inline void apic_set_eoi_write(void (*eoi_write)(u32 reg, u32 v)) {}
436436

437437
#endif /* CONFIG_X86_LOCAL_APIC */
438438

439+
extern void apic_ack_irq(struct irq_data *data);
440+
439441
static inline void ack_APIC_irq(void)
440442
{
441443
/*

arch/x86/kernel/apic/vector.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,13 +809,18 @@ static int apic_retrigger_irq(struct irq_data *irqd)
809809
return 1;
810810
}
811811

812-
void apic_ack_edge(struct irq_data *irqd)
812+
void apic_ack_irq(struct irq_data *irqd)
813813
{
814-
irq_complete_move(irqd_cfg(irqd));
815814
irq_move_irq(irqd);
816815
ack_APIC_irq();
817816
}
818817

818+
void apic_ack_edge(struct irq_data *irqd)
819+
{
820+
irq_complete_move(irqd_cfg(irqd));
821+
apic_ack_irq(irqd);
822+
}
823+
819824
static struct irq_chip lapic_controller = {
820825
.name = "APIC",
821826
.irq_ack = apic_ack_edge,

0 commit comments

Comments
 (0)