This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / mips / mm / tlb64-glue-r4k.S
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 <linux/init.h>
10 #include <asm/mipsregs.h>
11 #include <asm/regdef.h>
12 #include <asm/stackframe.h>
13
14         .macro  __BUILD_cli
15         CLI
16         .endm
17
18         .macro  __BUILD_sti
19         STI
20         .endm
21
22         .macro  __BUILD_kmode
23         KMODE
24         .endm
25
26         .macro  tlb_handler name interruptible writebit
27         NESTED(__\name, PT_SIZE, sp)
28         SAVE_ALL
29         dmfc0   a2, CP0_BADVADDR
30         __BUILD_\interruptible
31         li      a1, \writebit
32         sd      a2, PT_BVADDR(sp)
33         move    a0, sp
34         jal     do_page_fault
35         j       ret_from_exception
36         END(__\name)
37         .endm
38
39         tlb_handler     xtlb_mod kmode 1
40         tlb_handler     xtlb_tlbl kmode 0
41         tlb_handler     xtlb_tlbs kmode 1