summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/arch/rlx/include/asm/asmmacro.h
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/realtek/files/arch/rlx/include/asm/asmmacro.h')
-rw-r--r--target/linux/realtek/files/arch/rlx/include/asm/asmmacro.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/realtek/files/arch/rlx/include/asm/asmmacro.h b/target/linux/realtek/files/arch/rlx/include/asm/asmmacro.h
new file mode 100644
index 000000000..3583b9f78
--- /dev/null
+++ b/target/linux/realtek/files/arch/rlx/include/asm/asmmacro.h
@@ -0,0 +1,29 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 Ralf Baechle
+ */
+#ifndef _ASM_ASMMACRO_H
+#define _ASM_ASMMACRO_H
+
+#include <asm/hazards.h>
+#include <asm/asmmacro-32.h>
+
+ .macro local_irq_enable reg=t0
+ mfc0 \reg, CP0_STATUS
+ ori \reg, \reg, 1
+ mtc0 \reg, CP0_STATUS
+ irq_enable_hazard
+ .endm
+
+ .macro local_irq_disable reg=t0
+ mfc0 \reg, CP0_STATUS
+ ori \reg, \reg, 1
+ xori \reg, \reg, 1
+ mtc0 \reg, CP0_STATUS
+ irq_disable_hazard
+ .endm
+
+#endif /* _ASM_ASMMACRO_H */