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
6 * Copyright (C) 2003 Ralf Baechle
8 #ifndef _ASM_ASMMACRO_H
9 #define _ASM_ASMMACRO_H
11 #include <linux/config.h>
12 #include <asm/hazards.h>
15 #include <asm/asmmacro-32.h>
18 #include <asm/asmmacro-64.h>
20 #ifdef CONFIG_MIPS_MT_SMTC
21 #include <asm/mipsmtregs.h>
24 #ifdef CONFIG_MIPS_MT_SMTC
25 .macro local_irq_enable reg
=t0
26 mfc0
\reg
, CP0_TCSTATUS
27 ori
\reg
, \reg
, TCSTATUS_IXMT
28 xori
\reg
, \reg
, TCSTATUS_IXMT
29 mtc0
\reg
, CP0_TCSTATUS
33 .macro local_irq_disable reg
=t0
34 mfc0
\reg
, CP0_TCSTATUS
35 ori
\reg
, \reg
, TCSTATUS_IXMT
36 mtc0
\reg
, CP0_TCSTATUS
40 .macro local_irq_enable reg
=t0
47 .macro local_irq_disable reg
=t0
54 #endif /* CONFIG_MIPS_MT_SMTC */
57 .macro fpu_enable_hazard
67 .macro fpu_enable_hazard
72 * Temporary until all gas have MT ASE support
75 .word (0x41600bc1 | (\reg
<< 16))
79 .word (0x41600be1 | (\reg
<< 16))
83 .word (0x41600001 | (\reg
<< 16))
87 .word (0x41600021 | (\reg
<< 16))
90 .macro MFTR rt
=0, rd
=0, u
=0, sel
=0
91 .word (0x41000000 | (\rt
<< 16) | (\rd
<< 11) | (\u
<< 5) | (\sel
))
94 .macro MTTR rt
=0, rd
=0, u
=0, sel
=0
95 .word (0x41800000 | (\rt
<< 16) | (\rd
<< 11) | (\u
<< 5) | (\sel
))
98 #endif /* _ASM_ASMMACRO_H */