mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
soc: rockchip: fiq debugger: check "target_cpu" before switch cpu
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com> Change-Id: I2ed0fb4c5aa60b735a7570e13dffd2ee8e646f3b
This commit is contained in:
committed by
Tao Huang
parent
614d7a8339
commit
8cfed66d7f
@@ -763,6 +763,11 @@ static int fiq_debugger_cpu_offine_migrate_fiq(unsigned int cpu)
|
||||
if ((sip_fiq_debugger_is_enabled()) &&
|
||||
(sip_fiq_debugger_get_target_cpu() == cpu)) {
|
||||
target_cpu = cpumask_any_but(cpu_online_mask, cpu);
|
||||
if (target_cpu >= nr_cpu_ids) {
|
||||
pr_err("%s: migrate fiq fail!\n", __func__);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
sip_fiq_debugger_switch_cpu(target_cpu);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user