[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7959075-2874-c774-9e01-221cb5e4e18c@arm.com>
Date: Mon, 2 Jul 2018 08:44:05 +0100
From: Marc Zyngier <marc.zyngier@....com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org, Yang Yingliang <yangyingliang@...wei.com>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Sumit Garg <sumit.garg@...aro.org>
Subject: Re: [PATCH 4.14 088/157] irqchip/gic-v3-its: Dont bind LPI to
unavailable NUMA node
On 01/07/18 17:22, Greg Kroah-Hartman wrote:
> 4.14-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Yang Yingliang <yangyingliang@...wei.com>
>
> commit c1797b11a09c8323c92b074fd48b89a936c991d0 upstream.
>
> On a NUMA system, if an ITS is local to an offline node, the ITS driver may
> pick an offline CPU to bind the LPI. In this case, pick an online CPU (and
> the first one will do).
>
> But on some systems, binding an LPI to non-local node CPU may cause
> deadlock (see Cavium erratum 23144). In this case, just fail the activate
> and return an error code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@....com>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Jason Cooper <jason@...edaemon.net>
> Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
> Cc: Sumit Garg <sumit.garg@...aro.org>
> Cc: stable@...r.kernel.org
> Link: https://lkml.kernel.org/r/20180622095254.5906-5-marc.zyngier@arm.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -2221,7 +2221,14 @@ static void its_irq_domain_activate(stru
> cpu_mask = cpumask_of_node(its_dev->its->numa_node);
>
> /* Bind the LPI to the first possible CPU */
> - cpu = cpumask_first(cpu_mask);
> + cpu = cpumask_first_and(cpu_mask, cpu_online_mask);
> + if (cpu >= nr_cpu_ids) {
> + if (its_dev->its->flags & ITS_FLAGS_WORKAROUND_CAVIUM_23144)
> + return -EINVAL;
As reported by the kbuild robot, you need to drop the return value here
(the prototype was changed post 4.14). A WARN_ON() could be useful to
detect the case though.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists