void die_if_kernel(char *str, struct pt_regs *regs) { unsigned long i; unsigned long *pc; /* Amuse the user. */ printk( " \\|/ ____ \\|/\n" " \"@'/ ,. \\`@\"\n" " /_| \\__/ |_\\\n" " \\__U_/\n"); printk("%s(%d): %s\n", current->comm, current->pid, str); show_regs(regs); #if CONFIG_AP1000 ap_panic(); #endif printk("Instruction DUMP:"); pc = (unsigned long *) regs->pc; for(i = -3; i < 6; i++) printk("%c%08lx%c",i?' ':'<',pc[i],i?' ':'>'); printk("\n"); if(regs->psr & PSR_PS) do_exit(SIGKILL); do_exit(SIGSEGV); }
static void unexpected_irq(int irq, void *dev_id, struct pt_regs *regs) { ap_panic("** unexpected interrupt %d **\n",irq); }