From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750953AbdHRJCS (ORCPT ); Fri, 18 Aug 2017 05:02:18 -0400 Received: from terminus.zytor.com ([65.50.211.136]:56811 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbdHRJCP (ORCPT ); Fri, 18 Aug 2017 05:02:15 -0400 Date: Fri, 18 Aug 2017 01:57:42 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: paul.burton@imgtec.com, james.hogan@imgtec.com, mingo@kernel.org, hpa@zytor.com, matt.redfearn@imgtec.com, gregory.clement@free-electrons.com, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, f.fainelli@gmail.com, jason@lakedaemon.net, sebastian.hesselbarth@gmail.com, tglx@linutronix.de, cernekee@gmail.com, chris@zankel.net, jcmvbkbc@gmail.com, andrew@lunn.ch, xuwei5@hisilicon.com Reply-To: f.fainelli@gmail.com, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, jason@lakedaemon.net, paul.burton@imgtec.com, james.hogan@imgtec.com, gregory.clement@free-electrons.com, matt.redfearn@imgtec.com, hpa@zytor.com, mingo@kernel.org, jcmvbkbc@gmail.com, andrew@lunn.ch, xuwei5@hisilicon.com, cernekee@gmail.com, sebastian.hesselbarth@gmail.com, tglx@linutronix.de, chris@zankel.net In-Reply-To: <20170818083925.10108-2-marc.zyngier@arm.com> References: <20170818083925.10108-2-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq: Restrict effective affinity to interrupts actually using it Git-Commit-ID: 74def747bcd09692bdbf8c6a15350795b0f11ca8 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 Commit-ID: 74def747bcd09692bdbf8c6a15350795b0f11ca8 Gitweb: http://git.kernel.org/tip/74def747bcd09692bdbf8c6a15350795b0f11ca8 Author: Marc Zyngier AuthorDate: Fri, 18 Aug 2017 09:39:14 +0100 Committer: Thomas Gleixner CommitDate: Fri, 18 Aug 2017 10:54:39 +0200 genirq: Restrict effective affinity to interrupts actually using it 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 a non empty effective affinity. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Cc: Andrew Lunn Cc: James Hogan Cc: Jason Cooper Cc: Paul Burton Cc: Chris Zankel Cc: Kevin Cernekee Cc: Wei Xu Cc: Max Filippov Cc: Florian Fainelli Cc: Gregory Clement Cc: Matt Redfearn Cc: Sebastian Hesselbarth Link: http://lkml.kernel.org/r/20170818083925.10108-2-marc.zyngier@arm.com --- 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 d2d54379..dcfac6c 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 (!cpumask_empty(d->common->effective_affinity)) + return d->common->effective_affinity; + + return d->common->affinity; } static inline void irq_data_update_effective_affinity(struct irq_data *d, const struct cpumask *m)