Skip to content

Commit

Permalink
x86/apic: Mark single target interrupts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas Gleixner committed Jun 22, 2017
1 parent 8f31a98 commit 3ca5722
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/x86/kernel/apic/vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
irq_data);
if (err)
goto error;
/*
* If the apic destination mode is physical, then the
* effective affinity is restricted to a single target
* CPU. Mark the interrupt accordingly.
*/
if (!apic->irq_dest_mode)
irqd_set_single_target(irq_data);
}

return 0;
Expand Down

0 comments on commit 3ca5722

Please sign in to comment.