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 <asm/hazards.h>
14 #include <asm/asmmacro-32.h>
17 #include <asm/asmmacro-64.h>
19 #ifdef CONFIG_MIPS_MT_SMTC
20 #include <asm/mipsmtregs.h>
23 #ifdef CONFIG_MIPS_MT_SMTC
24 .macro local_irq_enable reg
=t0
25 mfc0
\reg
, CP0_TCSTATUS
26 ori
\reg
, \reg
, TCSTATUS_IXMT
27 xori
\reg
, \reg
, TCSTATUS_IXMT
28 mtc0
\reg
, CP0_TCSTATUS
32 .macro local_irq_disable reg
=t0
33 mfc0
\reg
, CP0_TCSTATUS
34 ori
\reg
, \reg
, TCSTATUS_IXMT
35 mtc0
\reg
, CP0_TCSTATUS
38 #elif defined(CONFIG_CPU_MIPSR2)
39 .macro local_irq_enable reg
=t0
44 .macro local_irq_disable reg
=t0
49 .macro local_irq_enable reg
=t0
56 .macro local_irq_disable reg
=t0
63 #endif /* CONFIG_MIPS_MT_SMTC */
66 * Temporary until all gas have MT ASE support
69 .word
0x41600bc1 | (\reg
<< 16)
73 .word
0x41600be1 | (\reg
<< 16)
77 .word
0x41600001 | (\reg
<< 16)
81 .word
0x41600021 | (\reg
<< 16)
84 .macro MFTR rt
=0, rd
=0, u
=0, sel
=0
85 .word
0x41000000 | (\rt
<< 16) | (\rd
<< 11) | (\u
<< 5) | (\sel
)
88 .macro MTTR rt
=0, rd
=0, u
=0, sel
=0
89 .word
0x41800000 | (\rt
<< 16) | (\rd
<< 11) | (\u
<< 5) | (\sel
)
92 #endif /* _ASM_ASMMACRO_H */