xref: /linux/arch/mips/sgi-ip32/ip32-berr.c (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 1994, 1995, 1996, 1999, 2000 by Ralf Baechle
7  * Copyright (C) 1999, 2000 by Silicon Graphics
8  * Copyright (C) 2002  Maciej W. Rozycki
9  */
10 #include <linux/init.h>
11 #include <linux/kernel.h>
12 #include <linux/sched.h>
13 #include <linux/sched/debug.h>
14 #include <linux/sched/signal.h>
15 #include <asm/traps.h>
16 #include <linux/uaccess.h>
17 #include <asm/addrspace.h>
18 #include <asm/ptrace.h>
19 #include <asm/tlbdebug.h>
20 
21 #include "ip32-common.h"
22 
23 static int ip32_be_handler(struct pt_regs *regs, int is_fixup)
24 {
25 	int data = regs->cp0_cause & 4;
26 
27 	if (is_fixup)
28 		return MIPS_BE_FIXUP;
29 
30 	printk("Got %cbe at 0x%lx\n", data ? 'd' : 'i', regs->cp0_epc);
31 	show_regs(regs);
32 	dump_tlb_all();
33 	while(1);
34 	force_sig(SIGBUS);
35 }
36 
37 void __init ip32_be_init(void)
38 {
39 	mips_set_be_handler(ip32_be_handler);
40 }
41