Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/rmi Use EIMR/EIRR regs definitions from <mips/...
details: https://anonhg.NetBSD.org/src/rev/114eba193e92
branches: trunk
changeset: 936355:114eba193e92
user: simonb <simonb%NetBSD.org@localhost>
date: Sun Jul 26 07:48:07 2020 +0000
description:
Use EIMR/EIRR regs definitions from <mips/cpuregs.h>
diffstat:
sys/arch/mips/rmi/rmixl_spl.S | 52 ++++++++++++++++++++---------------------
sys/arch/mips/rmi/rmixl_subr.S | 17 +++++--------
2 files changed, 32 insertions(+), 37 deletions(-)
diffs (212 lines):
diff -r 032980bc3acb -r 114eba193e92 sys/arch/mips/rmi/rmixl_spl.S
--- a/sys/arch/mips/rmi/rmixl_spl.S Sun Jul 26 07:47:27 2020 +0000
+++ b/sys/arch/mips/rmi/rmixl_spl.S Sun Jul 26 07:48:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_spl.S,v 1.4 2015/06/19 06:32:08 matt Exp $ */
+/* $NetBSD: rmixl_spl.S,v 1.5 2020/07/26 07:48:07 simonb Exp $ */
/*-
* Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <mips/asm.h>
#include <mips/cpuregs.h>
-RCSID("$NetBSD: rmixl_spl.S,v 1.4 2015/06/19 06:32:08 matt Exp $");
+RCSID("$NetBSD: rmixl_spl.S,v 1.5 2020/07/26 07:48:07 simonb Exp $");
#include "assym.h"
@@ -47,8 +47,6 @@
#define RMIXL_EIRR_PRESERVE (RMIXL_INT_MASK_5 | RMIXL_SOFT_INT_MASK)
#define RMIXL_INT_MASK_1 (MIPS_INT_MASK_1 >> 8)
#define RMIXL_INT_MASK_5 (MIPS_INT_MASK_5 >> 8)
-#define RMIXL_COP_0_EIRR _(9), 6
-#define RMIXL_COP_0_EIMR _(9), 7
.set noreorder
@@ -89,9 +87,9 @@
ori t0, MIPS_SR_INT_IE # set IE
mtc0 zero, MIPS_COP_0_STATUS ## disable all ints in STATUS
COP0_SYNC
- dmtc0 zero, RMIXL_COP_0_EIMR ## " " " " EIMR
+ dmtc0 zero, MIPS_COP_0_EIMR ## " " " " EIMR
COP0_SYNC
- dmtc0 zero, RMIXL_COP_0_EIRR ## clear EIRR
+ dmtc0 zero, MIPS_COP_0_EIRR ## clear EIRR
COP0_SYNC
mtc0 t0, MIPS_COP_0_STATUS ## set STATUS | IE
JR_HB_RA
@@ -110,8 +108,8 @@
* Can only use a0-a3 and v0-v1
* old IPL is returned in v0
*/
- dmfc0 a2, RMIXL_COP_0_EIMR # save EIMR
- dmtc0 zero, RMIXL_COP_0_EIMR ## disable all interrupts
+ dmfc0 a2, MIPS_COP_0_EIMR # save EIMR
+ dmtc0 zero, MIPS_COP_0_EIMR ## disable all interrupts
COP0_SYNC
PTR_L a3, L_CPU(MIPS_CURLWP) ##
INT_L v0, CPU_INFO_CPL(a3) ## get current IPL from cpu_info
@@ -119,10 +117,10 @@
bnez v1, 1f ## yes, don't change.
nop
INT_S a1, CPU_INFO_CPL(a3) ## save IPL in cpu_info
- dmtc0 a0, RMIXL_COP_0_EIMR ## set new EIMR
+ dmtc0 a0, MIPS_COP_0_EIMR ## set new EIMR
JR_HB_RA
1:
- dmtc0 a2, RMIXL_COP_0_EIMR ## restore saved EIMR
+ dmtc0 a2, MIPS_COP_0_EIMR ## restore saved EIMR
JR_HB_RA
STATIC_LEAF(_splsw_splx)
@@ -132,17 +130,17 @@
PTR_ADDU v1, a2 # add to table addr
REG_L v1, (v1) # load EIMR bits for this IPL
- dmtc0 zero, RMIXL_COP_0_EIMR ## disable all interrupts
+ dmtc0 zero, MIPS_COP_0_EIMR ## disable all interrupts
COP0_SYNC
PTR_L a3, L_CPU(MIPS_CURLWP) ## get cpu_info
INT_S a0, CPU_INFO_CPL(a3) ## save IPL in cpu_info
- dmtc0 v1, RMIXL_COP_0_EIMR ## set new EIMR
+ dmtc0 v1, MIPS_COP_0_EIMR ## set new EIMR
JR_HB_RA
END(_splsw_splx)
STATIC_LEAF(_splsw_spl0)
REG_L v1, _C_LABEL(ipl_eimr_map) + 8*IPL_NONE
- dmtc0 zero, RMIXL_COP_0_EIMR ## disable all interrupts
+ dmtc0 zero, MIPS_COP_0_EIMR ## disable all interrupts
COP0_SYNC
PTR_L a3, L_CPU(MIPS_CURLWP) ## get cpu_info
#if IPL_NONE == 0
@@ -150,22 +148,22 @@
#else
#error IPL_NONE != 0
#endif
- dmtc0 v1, RMIXL_COP_0_EIMR ## set new EIMR
+ dmtc0 v1, MIPS_COP_0_EIMR ## set new EIMR
JR_HB_RA
END(_splsw_spl0)
STATIC_LEAF(_splsw_setsoftintr)
dsrl a0, 8 # convert CAUSE bit to EIRR bit
and a0, RMIXL_SOFT_INT_MASK # restrict to softint bits
- dmfc0 v1, RMIXL_COP_0_EIMR # save EIMR register
- dmtc0 zero, RMIXL_COP_0_EIMR ## disable all interrupts
+ dmfc0 v1, MIPS_COP_0_EIMR # save EIMR register
+ dmtc0 zero, MIPS_COP_0_EIMR ## disable all interrupts
COP0_SYNC
- dmfc0 v0, RMIXL_COP_0_EIRR ## load EIRR
+ dmfc0 v0, MIPS_COP_0_EIRR ## load EIRR
and v0, RMIXL_EIRR_PRESERVE ## preserve clock & softints
or v0, a0 ## set new softint bit
- dmtc0 v0, RMIXL_COP_0_EIRR ## store EIRR
+ dmtc0 v0, MIPS_COP_0_EIRR ## store EIRR
COP0_SYNC
- dmtc0 v1, RMIXL_COP_0_EIMR ## restore EIMR
+ dmtc0 v1, MIPS_COP_0_EIMR ## restore EIMR
JR_HB_RA
END(_splsw_setsoftintr)
@@ -173,14 +171,14 @@
dsrl a0, 8 # convert CAUSE bit to EIRR bit
and a0, RMIXL_SOFT_INT_MASK # restrict to softint bits
xor a0, RMIXL_EIRR_PRESERVE # clear from preserve mask
- dmfc0 v1, RMIXL_COP_0_EIMR # save EIMR register
- dmtc0 zero, RMIXL_COP_0_EIMR ## disable all interrupts
+ dmfc0 v1, MIPS_COP_0_EIMR # save EIMR register
+ dmtc0 zero, MIPS_COP_0_EIMR ## disable all interrupts
COP0_SYNC
- dmfc0 v0, RMIXL_COP_0_EIRR ## load EIRR
+ dmfc0 v0, MIPS_COP_0_EIRR ## load EIRR
and v0, a0 ## apply preserve mask
- dmtc0 v0, RMIXL_COP_0_EIRR ## store EIRR
+ dmtc0 v0, MIPS_COP_0_EIRR ## store EIRR
COP0_SYNC
- dmtc0 v1, RMIXL_COP_0_EIMR ## restore EIMR
+ dmtc0 v1, MIPS_COP_0_EIMR ## restore EIMR
JR_HB_RA
END(_splsw_clrsoftintr)
@@ -196,7 +194,7 @@
STATIC_LEAF(_splsw_splhigh)
STATIC_XLEAF(_splsw_splhigh_noprof)
- dmtc0 zero, RMIXL_COP_0_EIMR ## disable all interrupts
+ dmtc0 zero, MIPS_COP_0_EIMR ## disable all interrupts
COP0_SYNC
PTR_L a3, L_CPU(MIPS_CURLWP) ## get cpu_info from curlwp
li a1, IPL_HIGH ##
@@ -257,7 +255,7 @@
END(_splsw_splsoftclock)
STATIC_LEAF(_splsw_splintr)
- dmfc0 ta1, RMIXL_COP_0_EIRR # get active interrupts
+ dmfc0 ta1, MIPS_COP_0_EIRR # get active interrupts
# restrict to hard int bits:
and v1, ta1, RMIXL_SOFT_INT_MASK # v1 = ta1 & ~RMIXL_SOFT_INT_MASK
xor v1, ta1 # " "
@@ -309,7 +307,7 @@
PTR_L t0, L_CPU(MIPS_CURLWP)
INT_L t1, CPU_INFO_CPL(t0) # get current priority level
- dmfc0 t0, RMIXL_COP_0_EIMR # get current EIMR
+ dmfc0 t0, MIPS_COP_0_EIMR # get current EIMR
PTR_LA t2, _C_LABEL(ipl_eimr_map)
sll t1, MAP_SCALESHIFT # shift cpl to array index
diff -r 032980bc3acb -r 114eba193e92 sys/arch/mips/rmi/rmixl_subr.S
--- a/sys/arch/mips/rmi/rmixl_subr.S Sun Jul 26 07:47:27 2020 +0000
+++ b/sys/arch/mips/rmi/rmixl_subr.S Sun Jul 26 07:48:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_subr.S,v 1.6 2015/06/07 08:03:10 matt Exp $ */
+/* $NetBSD: rmixl_subr.S,v 1.7 2020/07/26 07:48:07 simonb Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -37,13 +37,10 @@
#include <mips/asm.h>
#include <mips/cpuregs.h>
-RCSID("$NetBSD: rmixl_subr.S,v 1.6 2015/06/07 08:03:10 matt Exp $");
+RCSID("$NetBSD: rmixl_subr.S,v 1.7 2020/07/26 07:48:07 simonb Exp $");
#include "assym.h"
-#define RMIXL_COP_0_EIRR _(9), 6
-#define RMIXL_COP_0_EIMR _(9), 7
-
.set noreorder
.set arch=xlr
.text
@@ -83,14 +80,14 @@
* clobbered by the EIRR read-modify-write
*/
LEAF(rmixl_eirr_ack)
- dmtc0 zero, RMIXL_COP_0_EIMR /* EIMR = 0 */
+ dmtc0 zero, MIPS_COP_0_EIMR /* EIMR = 0 */
COP0_SYNC
- dmfc0 a3, RMIXL_COP_0_EIRR /* a3 = EIRR */
+ dmfc0 a3, MIPS_COP_0_EIRR /* a3 = EIRR */
and a3, a2 /* a3 &= preserve */
or a3, a1 /* a3 |= vecbit */
- dmtc0 a3, RMIXL_COP_0_EIRR /* EIRR = a3 */
+ dmtc0 a3, MIPS_COP_0_EIRR /* EIRR = a3 */
COP0_SYNC
- dmtc0 a0, RMIXL_COP_0_EIMR /* EIMR = eimr */
+ dmtc0 a0, MIPS_COP_0_EIMR /* EIMR = eimr */
JR_HB_RA
END(rmixl_eirr_ack)
@@ -144,7 +141,7 @@
li t0, 0
#endif
- mtc0 zero, RMIXL_COP_0_EIMR /* disable all in MIPS_COP_0_EIMR */
+ mtc0 zero, MIPS_COP_0_EIMR /* disable all in MIPS_COP_0_EIMR */
mtc0 t0, MIPS_COP_0_STATUS
Home |
Main Index |
Thread Index |
Old Index