Skip to content

Commit 3ca5722

Browse files
committed
x86/apic: Mark single target interrupts
If the interrupt destination mode of the APIC is physical then the effective affinity is restricted to a single CPU. Mark the interrupt accordingly in the domain allocation code, so the core code can avoid pointless affinity setting attempts. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Keith Busch <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Christoph Hellwig <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
1 parent 8f31a98 commit 3ca5722

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/x86/kernel/apic/vector.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
371371
irq_data);
372372
if (err)
373373
goto error;
374+
/*
375+
* If the apic destination mode is physical, then the
376+
* effective affinity is restricted to a single target
377+
* CPU. Mark the interrupt accordingly.
378+
*/
379+
if (!apic->irq_dest_mode)
380+
irqd_set_single_target(irq_data);
374381
}
375382

376383
return 0;

0 commit comments

Comments
 (0)