blob: e99eaa1fbedcc7e7cf54e3ba045382b95c708ad4 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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>
10#include <asm/page.h>
11#include <asm/regdef.h>
12#include <asm/stackframe.h>
13
14 .macro tlb_do_page_fault, write
15 NESTED(tlb_do_page_fault_\write, PT_SIZE, sp)
16 SAVE_ALL
17 MFC0 a2, CP0_BADVADDR
18 KMODE
19 move a0, sp
20 REG_S a2, PT_BVADDR(sp)
21 li a1, \write
Atsushi Nemoto23126692006-09-28 19:15:33 +090022 PTR_LA ra, ret_from_exception
23 j do_page_fault
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 END(tlb_do_page_fault_\write)
25 .endm
26
27 tlb_do_page_fault 0
28 tlb_do_page_fault 1