* [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t
@ 2019-05-29 15:42 Sebastian Andrzej Siewior
2019-05-30 13:54 ` Fabio Estevam
2019-06-06 0:59 ` Shawn Guo
0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-05-29 15:42 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Shawn Guo, Sascha Hauer, NXP Linux Team, Pengutronix Kernel Team,
tglx, Fabio Estevam, Sebastian Andrzej Siewior
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(-)
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;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t
2019-05-29 15:42 [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t Sebastian Andrzej Siewior
@ 2019-05-30 13:54 ` Fabio Estevam
2019-05-30 14:03 ` Sebastian Andrzej Siewior
2019-06-06 0:59 ` Shawn Guo
1 sibling, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2019-05-30 13:54 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Sascha Hauer, NXP Linux Team, Pengutronix Kernel Team,
Thomas Gleixner, Shawn Guo,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t
2019-05-30 13:54 ` Fabio Estevam
@ 2019-05-30 14:03 ` Sebastian Andrzej Siewior
2019-05-30 14:06 ` Fabio Estevam
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-05-30 14:03 UTC (permalink / raw)
To: Fabio Estevam
Cc: Sascha Hauer, NXP Linux Team, Pengutronix Kernel Team,
Thomas Gleixner, Shawn Guo,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t
2019-05-30 14:03 ` Sebastian Andrzej Siewior
@ 2019-05-30 14:06 ` Fabio Estevam
0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2019-05-30 14:06 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Sascha Hauer, NXP Linux Team, Pengutronix Kernel Team,
Thomas Gleixner, Shawn Guo,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
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>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t
2019-05-29 15:42 [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t Sebastian Andrzej Siewior
2019-05-30 13:54 ` Fabio Estevam
@ 2019-06-06 0:59 ` Shawn Guo
1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2019-06-06 0:59 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Sascha Hauer, NXP Linux Team, Pengutronix Kernel Team, tglx,
Fabio Estevam, linux-arm-kernel
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-06 0:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 15:42 [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t Sebastian Andrzej Siewior
2019-05-30 13:54 ` Fabio Estevam
2019-05-30 14:03 ` Sebastian Andrzej Siewior
2019-05-30 14:06 ` Fabio Estevam
2019-06-06 0:59 ` Shawn Guo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.