From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752419AbdHRJGY (ORCPT ); Fri, 18 Aug 2017 05:06:24 -0400 Received: from terminus.zytor.com ([65.50.211.136]:53619 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbdHRJGV (ORCPT ); Fri, 18 Aug 2017 05:06:21 -0400 Date: Fri, 18 Aug 2017 02:01:58 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: linux-kernel@vger.kernel.org, paul.burton@imgtec.com, matt.redfearn@imgtec.com, chris@zankel.net, jcmvbkbc@gmail.com, mingo@kernel.org, andrew@lunn.ch, gregory.clement@free-electrons.com, jason@lakedaemon.net, hpa@zytor.com, james.hogan@imgtec.com, tglx@linutronix.de, xuwei5@hisilicon.com, marc.zyngier@arm.com, sebastian.hesselbarth@gmail.com, cernekee@gmail.com, f.fainelli@gmail.com Reply-To: gregory.clement@free-electrons.com, hpa@zytor.com, jason@lakedaemon.net, linux-kernel@vger.kernel.org, paul.burton@imgtec.com, jcmvbkbc@gmail.com, chris@zankel.net, matt.redfearn@imgtec.com, mingo@kernel.org, andrew@lunn.ch, sebastian.hesselbarth@gmail.com, cernekee@gmail.com, f.fainelli@gmail.com, tglx@linutronix.de, xuwei5@hisilicon.com, james.hogan@imgtec.com, marc.zyngier@arm.com In-Reply-To: <20170818083925.10108-13-marc.zyngier@arm.com> References: <20170818083925.10108-13-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irqchip/xtensa-mx: Report that effective affinity is a single target Git-Commit-ID: 500912121411e0175d44b69a7810ac6068e78326 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: 500912121411e0175d44b69a7810ac6068e78326 Gitweb: http://git.kernel.org/tip/500912121411e0175d44b69a7810ac6068e78326 Author: Marc Zyngier AuthorDate: Fri, 18 Aug 2017 09:39:25 +0100 Committer: Thomas Gleixner CommitDate: Fri, 18 Aug 2017 10:54:43 +0200 irqchip/xtensa-mx: Report that effective affinity is a single target The xtensa-mx driver only targets a single CPU at a time, even if the notional affinity is wider. Let's inform the core code about this. 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-13-marc.zyngier@arm.com --- drivers/irqchip/Kconfig | 1 + drivers/irqchip/irq-xtensa-mx.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index bca9a88..1139de9 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -223,6 +223,7 @@ config VERSATILE_FPGA_IRQ_NR config XTENSA_MX bool select IRQ_DOMAIN + select GENERIC_IRQ_EFFECTIVE_AFF_MASK config XILINX_INTC bool diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-mx.c index 72a391e..a15a951 100644 --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c @@ -32,6 +32,7 @@ static int xtensa_mx_irq_map(struct irq_domain *d, unsigned int irq, irq_set_status_flags(irq, IRQ_LEVEL); return 0; } + irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq))); return xtensa_irq_map(d, irq, hw); } @@ -121,9 +122,12 @@ static int xtensa_mx_irq_retrigger(struct irq_data *d) static int xtensa_mx_irq_set_affinity(struct irq_data *d, const struct cpumask *dest, bool force) { - unsigned mask = 1u << cpumask_any_and(dest, cpu_online_mask); + int cpu = cpumask_any_and(dest, cpu_online_mask); + unsigned mask = 1u << cpu; set_er(mask, MIROUT(d->hwirq - HW_IRQ_MX_BASE)); + irq_data_update_effective_affinity(d, cpumask_of(cpu)); + return 0; }