From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697AbdHOLiR (ORCPT ); Tue, 15 Aug 2017 07:38:17 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50522 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751703AbdHOLfH (ORCPT ); Tue, 15 Aug 2017 07:35:07 -0400 From: Marc Zyngier To: linux-kernel@vger.kernel.org Cc: Wei Xu , James Hogan , Thomas Gleixner , Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Kevin Cernekee , Florian Fainelli , Chris Zankel , Max Filippov , Paul Burton , Matt Redfearn Subject: [PATCH 01/12] genirq: Restrict effective affinity to single-target interrupts Date: Tue, 15 Aug 2017 12:34:36 +0100 Message-Id: <20170815113447.14507-2-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170815113447.14507-1-marc.zyngier@arm.com> References: <20170815113447.14507-1-marc.zyngier@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just because CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is selected doesn't mean that all the interrupts are using the effective affinity mask. For a number of them, this mask is likely to be empty. In order to deal with this, let's restrict the use of the effective affinity mask to these interrupts that have been configured as "single target". Signed-off-by: Marc Zyngier --- include/linux/irq.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index d2d543794093..af1510642b8a 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -781,7 +781,10 @@ static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d) static inline struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d) { - return d->common->effective_affinity; + if (irqd_is_single_target(d)) + return d->common->effective_affinity; + else + return d->common->affinity; } static inline void irq_data_update_effective_affinity(struct irq_data *d, const struct cpumask *m) -- 2.11.0