diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2019-05-29 17:42:29 +0200 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2019-06-06 08:58:11 +0800 |
commit | 99ae52edeba17c78753695e0d94d49c5f9e9a803 (patch) | |
tree | 30bb63e8ffb8fc492e041b96f36e90c37454b907 /arch/arm/mach-imx | |
parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) | |
download | lwn-99ae52edeba17c78753695e0d94d49c5f9e9a803.tar.gz lwn-99ae52edeba17c78753695e0d94d49c5f9e9a803.zip |
ARM: imx6: cpuidle: Use raw_spinlock_t
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>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/cpuidle-imx6q.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 326e870d7123..d9ac80aa1eb0 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; } |