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 <tglx@linutronix.de> Cc: Jens Axboe <axboe@kernel.dk> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Keith Busch <keith.busch@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Christoph Hellwig <hch@lst.de> Link: http://lkml.kernel.org/r/20170619235447.508846202@linutronix.de
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)