From: Huibin Hong Date: Thu, 19 Jan 2017 02:12:23 +0000 (+0800) Subject: fiq_debugger: Switch current cpu when the former cpu is offline X-Git-Tag: firefly_0821_release~702 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=89764582fb129c0a7f1973dadd75d118cacb0ac3;p=firefly-linux-kernel-4.4.55.git fiq_debugger: Switch current cpu when the former cpu is offline Change-Id: Ie1a5fe5c3496e5182f0f9aaab336a4d0ff683dfa Signed-off-by: Huibin Hong --- diff --git a/drivers/staging/android/fiq_debugger/fiq_debugger.c b/drivers/staging/android/fiq_debugger/fiq_debugger.c index 8a63290e5a9f..c9a38705f3ad 100644 --- a/drivers/staging/android/fiq_debugger/fiq_debugger.c +++ b/drivers/staging/android/fiq_debugger/fiq_debugger.c @@ -647,7 +647,7 @@ static bool fiq_debugger_handle_uart_interrupt(struct fiq_debugger_state *state, int count = 0; bool signal_helper = false; - if (this_cpu != state->current_cpu) { + if ((this_cpu != state->current_cpu) && (cpu_online(state->current_cpu))) { if (state->in_fiq) return false; @@ -665,6 +665,9 @@ static bool fiq_debugger_handle_uart_interrupt(struct fiq_debugger_state *state, return false; } + if (this_cpu != state->current_cpu) + state->current_cpu = this_cpu; + state->in_fiq = true; while ((c = fiq_debugger_getc(state)) != FIQ_DEBUGGER_NO_CHAR) {