aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/cavium-octeon/setup.c')
-rw-r--r--arch/mips/cavium-octeon/setup.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index b0baa299f899..01b1b3f94feb 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -428,13 +428,16 @@ static void octeon_restart(char *command)
428 */ 428 */
429static void octeon_kill_core(void *arg) 429static void octeon_kill_core(void *arg)
430{ 430{
431 mb(); 431 if (octeon_is_simulation())
432 if (octeon_is_simulation()) {
433 /* The simulator needs the watchdog to stop for dead cores */
434 cvmx_write_csr(CVMX_CIU_WDOGX(cvmx_get_core_num()), 0);
435 /* A break instruction causes the simulator stop a core */ 432 /* A break instruction causes the simulator stop a core */
436 asm volatile ("sync\nbreak"); 433 asm volatile ("break" ::: "memory");
437 } 434
435 local_irq_disable();
436 /* Disable watchdog on this core. */
437 cvmx_write_csr(CVMX_CIU_WDOGX(cvmx_get_core_num()), 0);
438 /* Spin in a low power mode. */
439 while (true)
440 asm volatile ("wait" ::: "memory");
438} 441}
439 442
440 443