rk: fiq_debugger: better support cpu cmd, never switch when target cpu is offline
author黄涛 <huangtao@rock-chips.com>
Thu, 12 Jul 2012 01:30:38 +0000 (09:30 +0800)
committer黄涛 <huangtao@rock-chips.com>
Thu, 12 Jul 2012 01:49:51 +0000 (09:49 +0800)
arch/arm/common/fiq_debugger.c

index c95af41324a9892a03407048bafd329ac7aebf0e..9617d374df4b82bb0525570697e45667ae9a1e2b 100644 (file)
@@ -630,6 +630,11 @@ static void switch_cpu(struct fiq_debugger_state *state, int cpu)
        else {
                struct cpumask cpumask;
 
+               if (!cpu_online(cpu)) {
+                       debug_printf(state, "cpu %d offline\n", cpu);
+                       return;
+               }
+
                cpumask_clear(&cpumask);
                cpumask_set_cpu(cpu, &cpumask);