kernel: add panic() function that accepts a cpu_context
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
static int has_panicked = 0;
|
||||
|
||||
void panic(const char *fmt, ...)
|
||||
void panic_irq(struct cpu_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
char buf[512];
|
||||
va_list args;
|
||||
@@ -29,7 +29,7 @@ void panic(const char *fmt, ...)
|
||||
|
||||
printk("cpu: %u", this_cpu());
|
||||
|
||||
ml_print_cpu_state(NULL);
|
||||
ml_print_cpu_state(ctx);
|
||||
|
||||
if (READ_ONCE(has_panicked)) {
|
||||
ml_halt_cpu();
|
||||
|
||||
Reference in New Issue
Block a user