summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/macintr.c18
-rw-r--r--sys/arch/macppc/dev/openpic.c22
-rw-r--r--sys/arch/macppc/macppc/machdep.c4
-rw-r--r--sys/arch/macppc/pci/mpcpcibus.c8
-rw-r--r--sys/arch/powerpc/include/intr.h16
-rw-r--r--sys/arch/powerpc/powerpc/mutex.S10
-rw-r--r--sys/arch/socppc/dev/ipic.c18
-rw-r--r--sys/arch/socppc/socppc/machdep.c4
8 files changed, 50 insertions, 50 deletions
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index 28dfdd6f5c1..9f277f0c08c 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.40 2010/09/20 06:33:47 matthew Exp $ */
+/* $OpenBSD: macintr.c,v 1.41 2011/01/08 18:10:22 deraadt Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -373,7 +373,7 @@ intr_calculatemasks()
for (irq = 0; irq < ICU_LEN; irq++)
if (m_intrlevel[irq] & (1 << level))
irqs |= 1 << irq;
- imask[level] = irqs | SINT_ALLMASK;
+ cpu_imask[level] = irqs | SINT_ALLMASK;
}
/*
@@ -383,22 +383,22 @@ intr_calculatemasks()
* Enforce a hierarchy that gives slow devices a better chance at not
* dropping data.
*/
- imask[IPL_NET] |= imask[IPL_BIO];
- imask[IPL_TTY] |= imask[IPL_NET];
- imask[IPL_VM] |= imask[IPL_TTY];
- imask[IPL_CLOCK] |= imask[IPL_VM] | SPL_CLOCKMASK;
+ cpu_imask[IPL_NET] |= cpu_imask[IPL_BIO];
+ cpu_imask[IPL_TTY] |= cpu_imask[IPL_NET];
+ cpu_imask[IPL_VM] |= cpu_imask[IPL_TTY];
+ cpu_imask[IPL_CLOCK] |= cpu_imask[IPL_VM] | SPL_CLOCKMASK;
/*
* These are pseudo-levels.
*/
- imask[IPL_NONE] = 0x00000000;
- imask[IPL_HIGH] = 0xffffffff;
+ cpu_imask[IPL_NONE] = 0x00000000;
+ cpu_imask[IPL_HIGH] = 0xffffffff;
/* And eventually calculate the complete masks. */
for (irq = 0; irq < ICU_LEN; irq++) {
register int irqs = 1 << irq;
for (q = m_intrhand[irq]; q; q = q->ih_next)
- irqs |= imask[q->ih_level];
+ irqs |= cpu_imask[q->ih_level];
m_intrmask[irq] = irqs | SINT_ALLMASK;
}
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index 175db440e22..c3bb6df2ecd 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.62 2010/09/20 06:33:47 matthew Exp $ */
+/* $OpenBSD: openpic.c,v 1.63 2011/01/08 18:10:22 deraadt Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -398,9 +398,9 @@ openpic_calc_mask()
if (o_virq[irq] != 0) {
/* Enable (dont mask) interrupts at lower levels */
for (i = IPL_NONE; i < min; i++)
- imask[i] &= ~(1 << o_virq[irq]);
+ cpu_imask[i] &= ~(1 << o_virq[irq]);
for (; i <= IPL_HIGH; i++)
- imask[i] |= (1 << o_virq[irq]);
+ cpu_imask[i] |= (1 << o_virq[irq]);
}
}
@@ -409,11 +409,11 @@ openpic_calc_mask()
for (i = IPL_NONE; i <= IPL_HIGH; i++) {
if (i > IPL_NONE)
- imask[i] |= SINT_ALLMASK;
+ cpu_imask[i] |= SINT_ALLMASK;
if (i >= IPL_CLOCK)
- imask[i] |= SPL_CLOCKMASK;
+ cpu_imask[i] |= SPL_CLOCKMASK;
}
- imask[IPL_HIGH] = 0xffffffff;
+ cpu_imask[IPL_HIGH] = 0xffffffff;
}
/*
@@ -483,12 +483,12 @@ openpic_do_pending_int()
while (hwpend) {
/* this still doesn't handle the interrupts in priority order */
for (pri = IPL_HIGH; pri >= IPL_NONE; pri--) {
- pripending = hwpend & ~imask[pri];
+ pripending = hwpend & ~cpu_imask[pri];
if (pripending == 0)
continue;
irq = 31 - cntlzw(pripending);
ci->ci_ipending &= ~(1 << irq);
- ci->ci_cpl = imask[o_intrmaxlvl[o_hwirq[irq]]];
+ ci->ci_cpl = cpu_imask[o_intrmaxlvl[o_hwirq[irq]]];
openpic_enable_irq_mask(~ci->ci_cpl);
ih = o_intrhand[irq];
while(ih) {
@@ -713,12 +713,12 @@ ext_intr_openpic()
if ((pcpl & r_imen) != 0) {
/* Masked! Mark this as pending. */
ci->ci_ipending |= r_imen;
- openpic_enable_irq_mask(~imask[o_intrmaxlvl[realirq]]);
+ openpic_enable_irq_mask(~cpu_imask[o_intrmaxlvl[realirq]]);
openpic_eoi(ci->ci_cpuid);
} else {
- openpic_enable_irq_mask(~imask[o_intrmaxlvl[realirq]]);
+ openpic_enable_irq_mask(~cpu_imask[o_intrmaxlvl[realirq]]);
openpic_eoi(ci->ci_cpuid);
- ocpl = splraise(imask[o_intrmaxlvl[realirq]]);
+ ocpl = splraise(cpu_imask[o_intrmaxlvl[realirq]]);
ih = o_intrhand[irq];
while (ih) {
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index c0decaddff3..dc738063938 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.122 2010/11/22 21:07:18 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.123 2011/01/08 18:10:23 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -836,7 +836,7 @@ dumpsys()
}
-int imask[IPL_NUM];
+int cpu_imask[IPL_NUM];
int
lcsplx(int ipl)
diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c
index b6b8a94a43f..33d91c03056 100644
--- a/sys/arch/macppc/pci/mpcpcibus.c
+++ b/sys/arch/macppc/pci/mpcpcibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpcpcibus.c,v 1.41 2010/12/04 17:06:31 miod Exp $ */
+/* $OpenBSD: mpcpcibus.c,v 1.42 2011/01/08 18:10:23 deraadt Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -520,11 +520,11 @@ find_node_intr(int parent, u_int32_t *addr, u_int32_t *intr)
int iparent, len, mlen, alen, ilen;
int match, i, step;
u_int32_t map[144], *mp, *mp1;
- u_int32_t imask[8], maskedaddr[8];
+ u_int32_t cpu_imask[8], maskedaddr[8];
u_int32_t address_cells, interrupt_cells, mask_cells;
len = OF_getprop(parent, "interrupt-map", map, sizeof(map));
- mlen = OF_getprop(parent, "interrupt-map-mask", imask, sizeof(imask));
+ mlen = OF_getprop(parent, "interrupt-map-mask", cpu_imask, sizeof(cpu_imask));
alen = OF_getprop(parent, "#address-cells",
&address_cells, sizeof(address_cells));
ilen = OF_getprop(parent, "#interrupt-cells",
@@ -537,7 +537,7 @@ find_node_intr(int parent, u_int32_t *addr, u_int32_t *intr)
if (mask_cells != (mlen / sizeof(u_int32_t)))
goto nomap;
for (i = 0; i < mask_cells; i++)
- maskedaddr[i] = addr[i] & imask[i];
+ maskedaddr[i] = addr[i] & cpu_imask[i];
/* interrupt-map is formatted as follows
* int * #address-cells, int * #interrupt-cells, int, int, int
diff --git a/sys/arch/powerpc/include/intr.h b/sys/arch/powerpc/include/intr.h
index 955605df495..a8144d3e827 100644
--- a/sys/arch/powerpc/include/intr.h
+++ b/sys/arch/powerpc/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.45 2010/12/21 14:56:24 claudio Exp $ */
+/* $OpenBSD: intr.h,v 1.46 2011/01/08 18:10:20 deraadt Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA.
@@ -67,7 +67,7 @@ void splx(int);
void do_pending_int(void);
-extern int imask[IPL_NUM];
+extern int cpu_imask[IPL_NUM];
/* SPL asserts */
#define splassert(wantipl) /* nothing */
@@ -119,12 +119,12 @@ void softintr_schedule(void *);
#define SINT_NET SINTMASK(SI_SOFTNET)
#define SINT_TTY SINTMASK(SI_SOFTTTY)
-#define splbio() splraise(imask[IPL_BIO])
-#define splnet() splraise(imask[IPL_NET])
-#define spltty() splraise(imask[IPL_TTY])
-#define splaudio() splraise(imask[IPL_AUDIO])
-#define splclock() splraise(imask[IPL_CLOCK])
-#define splvm() splraise(imask[IPL_VM])
+#define splbio() splraise(cpu_imask[IPL_BIO])
+#define splnet() splraise(cpu_imask[IPL_NET])
+#define spltty() splraise(cpu_imask[IPL_TTY])
+#define splaudio() splraise(cpu_imask[IPL_AUDIO])
+#define splclock() splraise(cpu_imask[IPL_CLOCK])
+#define splvm() splraise(cpu_imask[IPL_VM])
#define splsched() splhigh()
#define spllock() splhigh()
#define splstatclock() splhigh()
diff --git a/sys/arch/powerpc/powerpc/mutex.S b/sys/arch/powerpc/powerpc/mutex.S
index 2b87dae2434..eca21b514d7 100644
--- a/sys/arch/powerpc/powerpc/mutex.S
+++ b/sys/arch/powerpc/powerpc/mutex.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: mutex.S,v 1.11 2010/09/28 20:27:55 miod Exp $ */
+/* $OpenBSD: mutex.S,v 1.12 2011/01/08 18:10:22 deraadt Exp $ */
/*
* Copyright (c) 2007 Dale Rahn
@@ -39,9 +39,9 @@ ENTRY(mtx_enter)
.L_retry:
GET_CPUINFO(%r4)
lwz %r5,MTX_WANTIPL(%r3) # load new ipl
- lis %r6,_C_LABEL(imask)@ha # convert into cpl
+ lis %r6,_C_LABEL(cpu_imask)@ha # convert into cpl
slwi %r5,%r5,2
- addi %r5,%r5,_C_LABEL(imask)@l
+ addi %r5,%r5,_C_LABEL(cpu_imask)@l
lwzx %r5,%r5,%r6
lwz %r7,CI_CPL(%r4) # load current cpl
or %r6,%r5,%r7 # raise cpl
@@ -94,9 +94,9 @@ ENTRY(mtx_enter_try)
stw %r0,36(%r1) # save return address
GET_CPUINFO(%r4)
lwz %r5,MTX_WANTIPL(%r3) # load new ipl
- lis %r6,_C_LABEL(imask)@ha # convert into cpl
+ lis %r6,_C_LABEL(cpu_imask)@ha # convert into cpl
slwi %r5,%r5,2
- addi %r5,%r5,_C_LABEL(imask)@l
+ addi %r5,%r5,_C_LABEL(cpu_imask)@l
lwzx %r5,%r5,%r6
lwz %r7,CI_CPL(%r4) # load current cpl
or %r6,%r5,%r7 # raise cpl
diff --git a/sys/arch/socppc/dev/ipic.c b/sys/arch/socppc/dev/ipic.c
index 389fc44f007..6e250257176 100644
--- a/sys/arch/socppc/dev/ipic.c
+++ b/sys/arch/socppc/dev/ipic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipic.c,v 1.13 2010/09/20 06:33:48 matthew Exp $ */
+/* $OpenBSD: ipic.c,v 1.14 2011/01/08 18:10:22 deraadt Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -223,7 +223,7 @@ intr_calculatemasks(void)
int level;
for (level = IPL_NONE; level < IPL_NUM; level++)
- imask[level] = SINT_ALLMASK | (1 << level);
+ cpu_imask[level] = SINT_ALLMASK | (1 << level);
/*
* There are tty, network and disk drivers that use free() at interrupt
@@ -232,16 +232,16 @@ intr_calculatemasks(void)
* Enforce a hierarchy that gives slow devices a better chance at not
* dropping data.
*/
- imask[IPL_NET] |= imask[IPL_BIO];
- imask[IPL_TTY] |= imask[IPL_NET];
- imask[IPL_VM] |= imask[IPL_TTY];
- imask[IPL_CLOCK] |= imask[IPL_VM] | SPL_CLOCKMASK;
+ cpu_imask[IPL_NET] |= cpu_imask[IPL_BIO];
+ cpu_imask[IPL_TTY] |= cpu_imask[IPL_NET];
+ cpu_imask[IPL_VM] |= cpu_imask[IPL_TTY];
+ cpu_imask[IPL_CLOCK] |= cpu_imask[IPL_VM] | SPL_CLOCKMASK;
/*
* These are pseudo-levels.
*/
- imask[IPL_NONE] = 0x00000000;
- imask[IPL_HIGH] = 0xffffffff;
+ cpu_imask[IPL_NONE] = 0x00000000;
+ cpu_imask[IPL_HIGH] = 0xffffffff;
sc->sc_simsr_h[IPL_NET] |= sc->sc_simsr_h[IPL_BIO];
sc->sc_simsr_h[IPL_TTY] |= sc->sc_simsr_h[IPL_NET];
@@ -341,7 +341,7 @@ ext_intr(void)
ipic_write(sc, IPIC_SIMSR_H, sc->sc_simsr_h[ih->ih_level]);
ipic_write(sc, IPIC_SIMSR_L, sc->sc_simsr_l[ih->ih_level]);
ipic_write(sc, IPIC_SEMSR, sc->sc_semsr[ih->ih_level]);
- ocpl = splraise(imask[ih->ih_level]);
+ ocpl = splraise(cpu_imask[ih->ih_level]);
ppc_intr_enable(1);
KERNEL_LOCK();
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index 1cae8676d43..626faed79ff 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.26 2010/06/27 13:28:46 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.27 2011/01/08 18:10:22 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -482,7 +482,7 @@ dumpsys(void)
{
}
-int imask[IPL_NUM];
+int cpu_imask[IPL_NUM];
int
lcsplx(int ipl)