11da177e4SLinus Torvalds/* 21da177e4SLinus Torvalds * This file is subject to the terms and conditions of the GNU General Public 31da177e4SLinus Torvalds * License. See the file "COPYING" in the main directory of this archive 41da177e4SLinus Torvalds * for more details. 51da177e4SLinus Torvalds * 61da177e4SLinus Torvalds * Copyright (C) 1999 Ralf Baechle 71da177e4SLinus Torvalds * Copyright (C) 1999 Silicon Graphics, Inc. 81da177e4SLinus Torvalds */ 91da177e4SLinus Torvalds#include <asm/mipsregs.h> 101da177e4SLinus Torvalds#include <asm/regdef.h> 111da177e4SLinus Torvalds#include <asm/stackframe.h> 121da177e4SLinus Torvalds 131da177e4SLinus Torvalds .macro tlb_do_page_fault, write 141da177e4SLinus Torvalds NESTED(tlb_do_page_fault_\write, PT_SIZE, sp) 15*866b6a89SCorey Minyard .cfi_signal_frame 16*866b6a89SCorey Minyard SAVE_ALL docfi=1 171da177e4SLinus Torvalds MFC0 a2, CP0_BADVADDR 181da177e4SLinus Torvalds KMODE 191da177e4SLinus Torvalds move a0, sp 201da177e4SLinus Torvalds REG_S a2, PT_BVADDR(sp) 211da177e4SLinus Torvalds li a1, \write 22*866b6a89SCorey Minyard jal do_page_fault 23*866b6a89SCorey Minyard j ret_from_exception 241da177e4SLinus Torvalds END(tlb_do_page_fault_\write) 251da177e4SLinus Torvalds .endm 261da177e4SLinus Torvalds 271da177e4SLinus Torvalds tlb_do_page_fault 0 281da177e4SLinus Torvalds tlb_do_page_fault 1 29