mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
rk: disable preempt_disable when power off
On power off, pmic driver use mutex, so can not disable preemption. Else will see this bug: rk30_pm_power_off start... act8846_device_shutdown BUG: scheduling while atomic: Thread-102/1505/0x00000002 [<c043e390>] (unwind_backtrace+0x0/0xf8) from [<c09019f0>] (__schedule+0x7ec/0x8a8) [<c09019f0>] (__schedule+0x7ec/0x8a8) from [<c0902ca8>] (__mutex_lock_slowpath+0x128/0x1bc) [<c0902ca8>] (__mutex_lock_slowpath+0x128/0x1bc) from [<c0902da8>] (mutex_lock+0x6c/0x70) [<c0902da8>] (mutex_lock+0x6c/0x70) from [<c06213d8>] (act8846_reg_read+0x28/0x4c) [<c06213d8>] (act8846_reg_read+0x28/0x4c) from [<c062159c>] (act8846_device_shutdown+0x24/0x80) [<c062159c>] (act8846_device_shutdown+0x24/0x80) from [<c044f060>] (rk30_pm_power_off+0x4c/0x78) [<c044f060>] (rk30_pm_power_off+0x4c/0x78) from [<c0439dbc>] (machine_power_off+0x1c/0x24) [<c0439dbc>] (machine_power_off+0x1c/0x24) from [<c0481488>] (sys_reboot+0x154/0x214) [<c0481488>] (sys_reboot+0x154/0x214) from [<c0438f80>] (ret_fast_syscall+0x0/0x30) And smp_send_stop is doing nothing on rk platform when power off, so it is no need to disable preemption.
This commit is contained in:
@@ -279,7 +279,9 @@ void machine_shutdown(void)
|
||||
* thread that might wind up blocking on
|
||||
* one of the stopped CPUs.
|
||||
*/
|
||||
#ifndef CONFIG_PLAT_RK
|
||||
preempt_disable();
|
||||
#endif
|
||||
|
||||
smp_send_stop();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user