forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/soc/rockchip/fiq_debugger/rk_fiq_debugger.c
....@@ -763,6 +763,11 @@
763763 if ((sip_fiq_debugger_is_enabled()) &&
764764 (sip_fiq_debugger_get_target_cpu() == cpu)) {
765765 target_cpu = cpumask_any_but(cpu_online_mask, cpu);
766
+ if (target_cpu >= nr_cpu_ids) {
767
+ pr_err("%s: migrate fiq fail!\n", __func__);
768
+ return -EBUSY;
769
+ }
770
+
766771 sip_fiq_debugger_switch_cpu(target_cpu);
767772 }
768773