From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753677AbdFVRO5 (ORCPT ); Thu, 22 Jun 2017 13:14:57 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41033 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753478AbdFVROx (ORCPT ); Thu, 22 Jun 2017 13:14:53 -0400 Date: Thu, 22 Jun 2017 10:10:14 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: hch@lst.de, tglx@linutronix.de, mingo@kernel.org, mpe@ellerman.id.au, linux-kernel@vger.kernel.org, keith.busch@intel.com, peterz@infradead.org, axboe@kernel.dk, hpa@zytor.com, marc.zyngier@arm.com Reply-To: peterz@infradead.org, keith.busch@intel.com, linux-kernel@vger.kernel.org, hpa@zytor.com, marc.zyngier@arm.com, axboe@kernel.dk, tglx@linutronix.de, mingo@kernel.org, hch@lst.de, mpe@ellerman.id.au In-Reply-To: <20170619235447.508846202@linutronix.de> References: <20170619235447.508846202@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] x86/apic: Mark single target interrupts Git-Commit-ID: 3ca57222c36ba31b80aa25de313f3c8ab26a8102 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Archived-At: List-Archive: List-Post: Commit-ID: 3ca57222c36ba31b80aa25de313f3c8ab26a8102 Gitweb: http://git.kernel.org/tip/3ca57222c36ba31b80aa25de313f3c8ab26a8102 Author: Thomas Gleixner AuthorDate: Tue, 20 Jun 2017 01:37:54 +0200 Committer: Thomas Gleixner CommitDate: Thu, 22 Jun 2017 18:21:26 +0200 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 Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.508846202@linutronix.de --- arch/x86/kernel/apic/vector.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index b270a76..2567dc0 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -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;