ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-mips / asmmacro.h
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) 2003 Ralf Baechle
7  */
8 #ifndef _ASM_ASMMACRO_H
9 #define _ASM_ASMMACRO_H
10  
11 #include <linux/config.h>
12  
13 #ifdef CONFIG_MIPS32
14 #include <asm/asmmacro-32.h>
15 #endif
16 #ifdef CONFIG_MIPS64
17 #include <asm/asmmacro-64.h>
18 #endif
19
20         .macro  local_irq_enable reg=t0
21         mfc0    \reg, CP0_STATUS
22         ori     \reg, \reg, 1
23         mtc0    \reg, CP0_STATUS
24         .endm
25
26         .macro  local_irq_disable reg=t0
27         mfc0    \reg, CP0_STATUS
28         ori     \reg, \reg, 1
29         xori    \reg, \reg, 1
30         mtc0    \reg, CP0_STATUS
31         SSNOP; SSNOP; SSNOP
32         .endm
33
34 #ifdef CONFIG_CPU_SB1
35         .macro  fpu_enable_hazard
36         .set    push
37         .set    noreorder
38         .set    mips2
39         SSNOP
40         bnezl   $0, .+4
41          SSNOP
42         .set    pop
43         .endm
44 #else
45         .macro  fpu_enable_hazard
46         .endm
47 #endif
48
49 #endif /* _ASM_ASMMACRO_H */