summaryrefslogtreecommitdiff
path: root/sys/arch/armv7
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-01-31 00:14:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-01-31 00:14:51 +0000
commitaae810b19e487a3f73ce2fc1d6e12f92ac70dc90 (patch)
treeadb359947319ac3e39736814d2031f40b8a3655b /sys/arch/armv7
parenta03f045f48a39ba65b737268a8092c97eb0d9f87 (diff)
Switch from PSR_X_bit and X32_bit PSR macro names to just PSR_X.
This matches FreeBSD and makes things a bit more consistent. Discussed with Patrick.
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r--sys/arch/armv7/armv7/armv7_start.S4
-rw-r--r--sys/arch/armv7/armv7/intr.c8
-rw-r--r--sys/arch/armv7/omap/intc.c10
-rw-r--r--sys/arch/armv7/omap/omgpio.c6
-rw-r--r--sys/arch/armv7/sunxi/a1xintc.c10
5 files changed, 19 insertions, 19 deletions
diff --git a/sys/arch/armv7/armv7/armv7_start.S b/sys/arch/armv7/armv7/armv7_start.S
index d745e962fc8..6ec8ef6280c 100644
--- a/sys/arch/armv7/armv7/armv7_start.S
+++ b/sys/arch/armv7/armv7/armv7_start.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: armv7_start.S,v 1.4 2016/01/23 15:38:48 jsg Exp $ */
+/* $OpenBSD: armv7_start.S,v 1.5 2016/01/31 00:14:50 jsg Exp $ */
/* $NetBSD: lubbock_start.S,v 1.1 2003/06/18 10:51:15 bsh Exp $ */
/*
@@ -102,7 +102,7 @@ _C_LABEL(bootstrap_start):
mrs r0, cpsr
bic r0, r0, #(PSR_MODE)
orr r0, r0, #(PSR_SVC32_MODE)
- orr r0, r0, #(I32_bit | F32_bit | A32_bit)
+ orr r0, r0, #(PSR_I | PSR_F | PSR_A)
msr spsr_fsxc, r0
adr lr, 1f
ELR
diff --git a/sys/arch/armv7/armv7/intr.c b/sys/arch/armv7/armv7/intr.c
index b481375baaf..b096bed7542 100644
--- a/sys/arch/armv7/armv7/intr.c
+++ b/sys/arch/armv7/armv7/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.3 2015/06/13 07:16:37 jsg Exp $ */
+/* $OpenBSD: intr.c,v 1.4 2016/01/31 00:14:50 jsg Exp $ */
/*
* Copyright (c) 2011 Dale Rahn <drahn@openbsd.org>
*
@@ -151,7 +151,7 @@ arm_setsoftintr(int si)
int oldirqstate;
/* XXX atomic? */
- oldirqstate = disable_interrupts(I32_bit);
+ oldirqstate = disable_interrupts(PSR_I);
ci->ci_ipending |= SI_TO_IRQBIT(si);
restore_interrupts(oldirqstate);
@@ -168,7 +168,7 @@ arm_do_pending_intr(int pcpl)
static int processing = 0;
int oldirqstate;
- oldirqstate = disable_interrupts(I32_bit);
+ oldirqstate = disable_interrupts(PSR_I);
if (processing == 1) {
/* Don't use splx... we are here already! */
@@ -184,7 +184,7 @@ arm_do_pending_intr(int pcpl)
arm_intr_func.setipl(ipl); \
restore_interrupts(oldirqstate); \
softintr_dispatch(si); \
- oldirqstate = disable_interrupts(I32_bit); \
+ oldirqstate = disable_interrupts(PSR_I); \
}
do {
diff --git a/sys/arch/armv7/omap/intc.c b/sys/arch/armv7/omap/intc.c
index 8c662a70f05..335f9e6794d 100644
--- a/sys/arch/armv7/omap/intc.c
+++ b/sys/arch/armv7/omap/intc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: intc.c,v 1.4 2016/01/31 00:14:50 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -170,7 +170,7 @@ intc_attach(struct device *parent, struct device *self, void *args)
intc_irq_handler);
intc_setipl(IPL_HIGH); /* XXX ??? */
- enable_interrupts(I32_bit);
+ enable_interrupts(PSR_I);
}
void
@@ -269,7 +269,7 @@ intc_setipl(int new)
if (intc_attached == 0)
return;
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
#if 0
{
volatile static int recursed = 0;
@@ -342,7 +342,7 @@ intc_intr_establish(int irqno, int level, int (*func)(void *),
if (irqno < 0 || irqno >= INTC_NUM_IRQ)
panic("intc_intr_establish: bogus irqnumber %d: %s",
irqno, name);
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
/* no point in sleeping unless someone can free memory. */
ih = (struct intrhand *)malloc (sizeof *ih, M_DEVBUF,
@@ -376,7 +376,7 @@ intc_intr_disestablish(void *cookie)
int psw;
struct intrhand *ih = cookie;
int irqno = ih->ih_irq;
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
TAILQ_REMOVE(&intc_handler[irqno].iq_list, ih, ih_list);
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
diff --git a/sys/arch/armv7/omap/omgpio.c b/sys/arch/armv7/omap/omgpio.c
index 3acf4deef6e..5df65bdc899 100644
--- a/sys/arch/armv7/omap/omgpio.c
+++ b/sys/arch/armv7/omap/omgpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omgpio.c,v 1.5 2014/07/14 08:55:07 rapha Exp $ */
+/* $OpenBSD: omgpio.c,v 1.6 2016/01/31 00:14:50 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -621,7 +621,7 @@ omgpio_intr_establish(struct omgpio_softc *sc, unsigned int gpio, int level, int
gpio, sc->sc_handlers[GPIO_PIN_TO_OFFSET(gpio)]->ih_name,
name);
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
/* no point in sleeping unless someone can free memory. */
ih = (struct intrhand *)malloc( sizeof *ih, M_DEVBUF,
@@ -656,7 +656,7 @@ omgpio_intr_disestablish(struct omgpio_softc *sc, void *cookie)
struct intrhand *ih = cookie;
struct omgpio_softc *sc = omgpio_cd.cd_devs[GPIO_PIN_TO_INST(ih->ih_gpio)];
int gpio = ih->ih_gpio;
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
ih = sc->sc_handlers[GPIO_PIN_TO_OFFSET(gpio)];
sc->sc_handlers[GPIO_PIN_TO_OFFSET(gpio)] = NULL;
diff --git a/sys/arch/armv7/sunxi/a1xintc.c b/sys/arch/armv7/sunxi/a1xintc.c
index 42f28722bef..67407a9ebdd 100644
--- a/sys/arch/armv7/sunxi/a1xintc.c
+++ b/sys/arch/armv7/sunxi/a1xintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: a1xintc.c,v 1.6 2015/05/20 03:49:23 jsg Exp $ */
+/* $OpenBSD: a1xintc.c,v 1.7 2016/01/31 00:14:50 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2013 Artturi Alm
@@ -194,7 +194,7 @@ a1xintc_attach(struct device *parent, struct device *self, void *args)
a1xintc_intr_establish, a1xintc_intr_disestablish, a1xintc_intr_string,
a1xintc_irq_handler);
a1xintc_setipl(IPL_HIGH); /* XXX ??? */
- enable_interrupts(I32_bit);
+ enable_interrupts(PSR_I);
printf("\n");
}
@@ -297,7 +297,7 @@ a1xintc_setipl(int new)
return;
}
#endif
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
ci->ci_cpl = new;
for (i = 0; i < NBANKS; i++)
bus_space_write_4(a1xintc_iot, a1xintc_ioh,
@@ -365,7 +365,7 @@ a1xintc_intr_establish(int irq, int lvl, int (*f)(void *), void *arg, char *name
DPRINTF(("intr_establish: irq %d level %d [%s]\n", irq, lvl,
name != NULL ? name : "NULL"));
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
/* no point in sleeping unless someone can free memory. */
ih = (struct intrhand *)malloc (sizeof *ih, M_DEVBUF,
@@ -403,7 +403,7 @@ a1xintc_intr_disestablish(void *cookie)
int psw;
uint32_t er;
- psw = disable_interrupts(I32_bit);
+ psw = disable_interrupts(PSR_I);
TAILQ_REMOVE(&a1xintc_handler[irq].iq_list, ih, ih_list);