rk: fiq_debugger: support cpu switch when fiq is used
author黄涛 <huangtao@rock-chips.com>
Thu, 15 Mar 2012 08:08:26 +0000 (16:08 +0800)
committer黄涛 <huangtao@rock-chips.com>
Thu, 15 Mar 2012 08:15:52 +0000 (16:15 +0800)
arch/arm/common/fiq_debugger.c

index 203f08ddfc70b3bb7c3c35152e421d0025531f37..a0a5a805dfad9fae707a97737075f51b2c69a79d 100644 (file)
@@ -587,6 +587,17 @@ static void switch_cpu(struct fiq_debugger_state *state, int cpu)
 {
        if (!debug_have_fiq(state))
                smp_call_function_single(cpu, take_affinity, state, false);
+#ifdef CONFIG_PLAT_RK
+       else {
+               struct cpumask cpumask;
+
+               cpumask_clear(&cpumask);
+               cpumask_set_cpu(cpu, &cpumask);
+
+               irq_set_affinity(state->fiq, &cpumask);
+               irq_set_affinity(state->uart_irq, &cpumask);
+       }
+#endif
        state->current_cpu = cpu;
 }