Message ID | 20190529154229.14911-1-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | Mainlined |
Commit | 99ae52edeba17c78753695e0d94d49c5f9e9a803 |
Headers | show |
Series | arm: imx6: cpuidle: Use raw_spinlock_t | expand |
Hi Sebastian, On Wed, May 29, 2019 at 12:42 PM Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > > The idle call back is invoked with disabled interrupts and requires > raw_spinlock_t locks to work. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Should this fix go to the stable trees? If so, please add a Fixes tag and Cc stable. Thanks
On 2019-05-30 10:54:16 [-0300], Fabio Estevam wrote: > Hi Sebastian, Hi Fabio, > Should this fix go to the stable trees? If so, please add a Fixes tag > and Cc stable. It makes no difference for !RT builds so I would avoid it. The RT releases for the relevant kernels will pick it up along with other RT related fixes. > Thanks Sebastian
On Thu, May 30, 2019 at 11:03 AM Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > It makes no difference for !RT builds so I would avoid it. The RT > releases for the relevant kernels will pick it up along with other RT > related fixes. Thanks for the clarification: Reviewed-by: Fabio Estevam <festevam@gmail.com>
On Wed, May 29, 2019 at 05:42:29PM +0200, Sebastian Andrzej Siewior wrote: > The idle call back is invoked with disabled interrupts and requires > raw_spinlock_t locks to work. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Applied with changing subject prefix to 'ARM: imx6: ...', thanks. Shawn
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 326e870d71239..d9ac80aa1eb0a 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c @@ -17,22 +17,22 @@ #include "hardware.h" static int num_idle_cpus = 0; -static DEFINE_SPINLOCK(cpuidle_lock); +static DEFINE_RAW_SPINLOCK(cpuidle_lock); static int imx6q_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - spin_lock(&cpuidle_lock); + raw_spin_lock(&cpuidle_lock); if (++num_idle_cpus == num_online_cpus()) imx6_set_lpm(WAIT_UNCLOCKED); - spin_unlock(&cpuidle_lock); + raw_spin_unlock(&cpuidle_lock); cpu_do_idle(); - spin_lock(&cpuidle_lock); + raw_spin_lock(&cpuidle_lock); if (num_idle_cpus-- == num_online_cpus()) imx6_set_lpm(WAIT_CLOCKED); - spin_unlock(&cpuidle_lock); + raw_spin_unlock(&cpuidle_lock); return index; }
The idle call back is invoked with disabled interrupts and requires raw_spinlock_t locks to work. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- arch/arm/mach-imx/cpuidle-imx6q.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)