[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8492440b-b489-0ce1-865c-4505042cb061@arm.com>
Date: Thu, 7 Feb 2019 08:56:37 +0000
From: Marc Zyngier <marc.zyngier@....com>
To: Aaro Koskinen <aaro.koskinen@....fi>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>
Cc: linux-kernel@...r.kernel.org, tomli@...li.me,
"Rafael J. Wysocki" <rafael@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paul.burton@...s.com>,
James Hogan <jhogan@...nel.org>
Subject: Re: [PATCH] irqchip/i8259: fix shutdown order by moving syscore_ops
registration
[Adding the MIPS folks]
On 06/02/2019 21:26, Aaro Koskinen wrote:
> When using cpufreq on Loongson 2F MIPS platform, "poweroff"
> command gets frequently stuck in syscore_shutdown(). The reason is
> that i8259A_shutdown() gets called before cpufreq_suspend(), and if we
> have pending work then irq_work_sync() in cpufreq_dbs_governor_stop()
> gets stuck forever as we have all interrupts masked already.
>
> irq-i8259 is registering syscore_ops using device_initcall(),
> while cpufreq uses core_initcall(). Fix the shutdown order simply
> by registering the irq syscore_ops during the early IRQ init instead
> of using a separate initcall at later stage.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@....fi>
> ---
> drivers/irqchip/irq-i8259.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/irqchip/irq-i8259.c b/drivers/irqchip/irq-i8259.c
> index b0d4aab1a58c..d000870d9b6b 100644
> --- a/drivers/irqchip/irq-i8259.c
> +++ b/drivers/irqchip/irq-i8259.c
> @@ -225,14 +225,6 @@ static struct syscore_ops i8259_syscore_ops = {
> .shutdown = i8259A_shutdown,
> };
>
> -static int __init i8259A_init_sysfs(void)
> -{
> - register_syscore_ops(&i8259_syscore_ops);
> - return 0;
> -}
> -
> -device_initcall(i8259A_init_sysfs);
> -
> static void init_8259A(int auto_eoi)
> {
> unsigned long flags;
> @@ -332,6 +324,7 @@ struct irq_domain * __init __init_i8259_irqs(struct device_node *node)
> panic("Failed to add i8259 IRQ domain");
>
> setup_irq(I8259A_IRQ_BASE + PIC_CASCADE_IR, &irq2);
> + register_syscore_ops(&i8259_syscore_ops);
> return domain;
> }
>
>
Given that this is a change of behaviour that is likely to affect other
platforms (I see at least another 6 MIPS machines using the i8259),
could someone make sure that this doesn't cause any regression? This is
unlikely to affect the SGI boxes, as they predate any notion of power
management, but something like Malta could potentially be affected.
Please let me know.
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists