^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * License. See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) 1999 Ralf Baechle
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright (C) 1999 Silicon Graphics, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <asm/mipsregs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <asm/regdef.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <asm/stackframe.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) .macro tlb_do_page_fault, write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) NESTED(tlb_do_page_fault_\write, PT_SIZE, sp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) .cfi_signal_frame
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) SAVE_ALL docfi=1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) MFC0 a2, CP0_BADVADDR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) KMODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) move a0, sp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) REG_S a2, PT_BVADDR(sp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) li a1, \write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) jal do_page_fault
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) j ret_from_exception
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) END(tlb_do_page_fault_\write)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) .endm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) tlb_do_page_fault 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) tlb_do_page_fault 1