[PATCH v3] ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
peng.fan at nxp.com
Wed Mar 6 06:36:56 PST 2019
> -----Original Message-----
> From: Kohji Okuno [mailto:okuno.kohji at jp.panasonic.com]
> Sent: 2019年3月5日 18:38
> To: shawnguo at kernel.org
> Cc: linux-arm-kernel at lists.infradead.org; s.hauer at pengutronix.de;
> kernel at pengutronix.de; Fabio Estevam <fabio.estevam at nxp.com>;
> dl-linux-imx <linux-imx at nxp.com>; okuno.kohji at jp.panasonic.com
> Subject: Re: [PATCH v3] ARM: imx6q: cpuidle: fix bug that CPU might not wake
> up at expected time
> Hi Shawn,
> I found the fix of the same issue on linux-imx repository. Could you refer to
> the following?
> Regarding the fix of cpuidle-imx6q.c, my fix is better, I think.
> But, we may also need to modify pm-imx6.c.
> # I cannot understand why they doesn't release their modifications.
This patch has been tried to upstream long time ago, https://lkml.org/lkml/2017/12/30/65
> Best regards,
> Kohji Okuno
> Shawn Guo <shawnguo at kernel.org> wrote:
> > On Tue, Feb 26, 2019 at 11:34:13AM +0900, Kohji Okuno wrote:
> >> In the current cpuidle implementation for i.MX6q, the CPU that sets
> >> 'WAIT_UNCLOCKED' and the CPU that returns to 'WAIT_CLOCKED' are
> >> always the same. While the CPU that sets 'WAIT_UNCLOCKED' is in IDLE
> >> state of "WAIT", if the other CPU wakes up and enters IDLE state of "WFI"
> >> istead of "WAIT", this CPU can not wake up at expired time.
> >> Because, in the case of "WFI", the CPU must be waked up by the local
> >> timer interrupt. But, while 'WAIT_UNCLOCKED' is set, the local timer
> >> is stopped, when all CPUs execute "wfi" instruction. As a result, the
> >> local timer interrupt is not fired.
> >> In this situation, this CPU will wake up by IRQ different from local
> >> timer. (e.g. broacast tiemr)
> > s/tiemr/timer
> >> So, this fix changes CPU to return to 'WAIT_CLOCKED'.
> >> Signed-off-by: Kohji Okuno <okuno.kohji at jp.panasonic.com>
> > Applied the patch with following Fixes tag.
> > Fixes: e5f9dec8ff5f ("ARM: imx6q: support WAIT mode using cpuidle")
> > Thanks for the fixing.
> > Shawn
More information about the linux-arm-kernel