[PATCH 1/1] irqchip/irq-imx-gpcv2: Disable cpuidle on imx8mq

Martin Kepplinger martin.kepplinger at puri.sm
Wed Dec 1 03:21:07 PST 2021


Am Freitag, dem 05.11.2021 um 10:55 +0100 schrieb Alexander Stein:
> Due to errata e11171 sleeping CPUs cannot be woken up by IPIs.
> 
> Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
> ---
> With reference to [1] cpuidle is broken on imx8mq with no workaround
> available in mainline, probably never will.
> In order to avoid to avoid booting and deadlocking imx8mq systems,
> disable cpuidle unconditionally.
> I was wondering which driver would be the best to add this code (it
> would work pretty much everywhere), but I opted for irq-imx-gpcv2 as
> this is used imx8mq (and imx7d) only.
> I also added '#ifdef CONFIG_CPU_IDLE' to avoid this warning when
> cpuidle
> support is not compiled in, although cpuidle support without the psci
> driver will this issue this warning. But using
> CONFIG_ARM_PSCI_CPUIDLE
> here looks odd to me.
> 
> [1] 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2021-November/694075.html

hi Alexander,

Did you see the deadlocking problems you mention? What I see in imx8mq
is simply having the WFI cpuidle state, and no other one (the "real"
one where wakeup is broken dua to the mentioned erratum).

So I don't see the need for this patch,

thank you,

                        martin


> 
>  drivers/irqchip/irq-imx-gpcv2.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-
> imx-gpcv2.c
> index 5b5a365dbd5e..6a2fc3c7df67 100644
> --- a/drivers/irqchip/irq-imx-gpcv2.c
> +++ b/drivers/irqchip/irq-imx-gpcv2.c
> @@ -3,6 +3,7 @@
>   * Copyright (C) 2015 Freescale Semiconductor, Inc.
>   */
>  
> +#include <linux/cpuidle.h>
>  #include <linux/of_address.h>
>  #include <linux/of_irq.h>
>  #include <linux/slab.h>
> @@ -221,6 +222,13 @@ static int __init imx_gpcv2_irqchip_init(struct
> device_node *node,
>  
>         core_num = (unsigned long)id->data;
>  
> +#ifdef CONFIG_CPU_IDLE
> +       if (of_machine_is_compatible("fsl,imx8mq")) {
> +               pr_warn("Disabling cpuidle on i.MX8M due to errata
> e11171\n");
> +               disable_cpuidle();
> +       }
> +#endif
> +
>         parent_domain = irq_find_host(parent);
>         if (!parent_domain) {
>                 pr_err("%pOF: unable to get parent domain\n", node);





More information about the linux-arm-kernel mailing list