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) 1999 Ralf Baechle |
| 7 | * Copyright (C) 1999 Silicon Graphics, Inc. |
| 8 | */ |
| 9 | #include <asm/mipsregs.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include <asm/regdef.h> |
| 11 | #include <asm/stackframe.h> |
| 12 | |
| 13 | .macro tlb_do_page_fault, write |
| 14 | NESTED(tlb_do_page_fault_\write, PT_SIZE, sp) |
| 15 | SAVE_ALL |
| 16 | MFC0 a2, CP0_BADVADDR |
| 17 | KMODE |
| 18 | move a0, sp |
| 19 | REG_S a2, PT_BVADDR(sp) |
| 20 | li a1, \write |
Atsushi Nemoto | 2312669 | 2006-09-28 19:15:33 +0900 | [diff] [blame] | 21 | PTR_LA ra, ret_from_exception |
| 22 | j do_page_fault |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | END(tlb_do_page_fault_\write) |
| 24 | .endm |
| 25 | |
| 26 | tlb_do_page_fault 0 |
| 27 | tlb_do_page_fault 1 |