aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/idle.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-01-29 06:14:11 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-03-31 06:04:12 -0400
commite38df288a9db56c1bdb60aa4fb2354cde57fdc5f (patch)
tree5fb6d68eb0294355c03ee52b02fdd2549f819740 /arch/mips/kernel/idle.c
parent602e8a345a916e91256497e13575d0690cd1565f (diff)
MIPS: idle: Workaround wait + FDC problems
On certain cores (namely proAptiv and P5600) incoming data via a Fast Debug Channel (FDC) while the core is blocked on a wait instruction will cause the wait not to wake up even when another interrupt is received. This makes an idle target stop as soon as you send FDC data to it, until the debug probe interrupts it and restarts the wait instruction. This is worked around by avoiding using r4k_wait on these cores if CONFIG_MIPS_EJTAG_FDC_TTY is enabled (which would imply the user intends to use the FDC). [ralf@linux-mips.org: Fix conflict.] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/9144/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/idle.c')
-rw-r--r--arch/mips/kernel/idle.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c
index 368c88b7eb6c..e4f62b7875d2 100644
--- a/arch/mips/kernel/idle.c
+++ b/arch/mips/kernel/idle.c
@@ -176,6 +176,17 @@ void __init check_wait(void)
176 cpu_wait = rm7k_wait_irqoff; 176 cpu_wait = rm7k_wait_irqoff;
177 break; 177 break;
178 178
179 case CPU_PROAPTIV:
180 case CPU_P5600:
181 /*
182 * Incoming Fast Debug Channel (FDC) data during a wait
183 * instruction causes the wait never to resume, even if an
184 * interrupt is received. Avoid using wait at all if FDC data is
185 * likely to be received.
186 */
187 if (IS_ENABLED(CONFIG_MIPS_EJTAG_FDC_TTY))
188 break;
189 /* fall through */
179 case CPU_M14KC: 190 case CPU_M14KC:
180 case CPU_M14KEC: 191 case CPU_M14KEC:
181 case CPU_24K: 192 case CPU_24K:
@@ -183,8 +194,6 @@ void __init check_wait(void)
183 case CPU_1004K: 194 case CPU_1004K:
184 case CPU_1074K: 195 case CPU_1074K:
185 case CPU_INTERAPTIV: 196 case CPU_INTERAPTIV:
186 case CPU_PROAPTIV:
187 case CPU_P5600:
188 case CPU_M5150: 197 case CPU_M5150:
189 case CPU_QEMU_GENERIC: 198 case CPU_QEMU_GENERIC:
190 cpu_wait = r4k_wait; 199 cpu_wait = r4k_wait;