arm: turn off cpu on panic

Since interrupts are disabled on panic, linux cannot reset a
panic'd core when NMI are disabled (for e.g. mcreboot/mcstop)

Just always offline it, so linux can get it back

Change-Id: If8107172375f2924e02bd4c36e24645ec38a8999
This commit is contained in:
Dominique Martinet
2019-02-04 15:58:54 +09:00
committed by Masamichi Takagi
parent 60dcd0e798
commit fe08ac4a67
3 changed files with 21 additions and 4 deletions

View File

@ -4,8 +4,9 @@
#include <ihk/monitor.h>
extern struct cpu_local_var *clv;
extern void eventfd(int type);
extern void arch_print_stack();
void eventfd(int type);
void arch_print_stack(void);
void arch_cpu_stop(void);
void panic(const char *msg)
{
@ -21,6 +22,9 @@ void panic(const char *msg)
arch_print_stack();
/* do not assume anything after this is executed */
arch_cpu_stop();
while (1) {
cpu_halt();
}