Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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> |
Ingo Molnar | b17b015 | 2017-02-08 18:51:35 +0100 | [diff] [blame] | 13 | #include <linux/sched/debug.h> |
Arnd Bergmann | fc69910 | 2017-03-08 08:29:31 +0100 | [diff] [blame] | 14 | #include <linux/sched/signal.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | #include <asm/traps.h> |
Linus Torvalds | 7c0f6ba | 2016-12-24 11:46:01 -0800 | [diff] [blame] | 16 | #include <linux/uaccess.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #include <asm/addrspace.h> |
| 18 | #include <asm/ptrace.h> |
| 19 | #include <asm/tlbdebug.h> |
| 20 | |
Dmitri Vorobiev | 36a09d7 | 2009-03-30 22:53:24 +0300 | [diff] [blame] | 21 | static int ip32_be_handler(struct pt_regs *regs, int is_fixup) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | { |
| 23 | int data = regs->cp0_cause & 4; |
| 24 | |
| 25 | if (is_fixup) |
| 26 | return MIPS_BE_FIXUP; |
| 27 | |
| 28 | printk("Got %cbe at 0x%lx\n", data ? 'd' : 'i', regs->cp0_epc); |
| 29 | show_regs(regs); |
| 30 | dump_tlb_all(); |
| 31 | while(1); |
| 32 | force_sig(SIGBUS, current); |
| 33 | } |
| 34 | |
| 35 | void __init ip32_be_init(void) |
| 36 | { |
| 37 | board_be_handler = ip32_be_handler; |
| 38 | } |