summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-08 18:10:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-08 18:10:24 +0000
commit87b03074369dfae21d797cf3f96642469441a79c (patch)
treea8e8f8249e24d2b359d223f679ca740472256ed7 /sys/arch/macppc/dev
parent36f14486ea394cd56938caae3641b13f676212eb (diff)
rename imask[] to cpu_imask[] to because imask is too loud as far as
kernel namespace ok miod
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r--sys/arch/macppc/dev/macintr.c18
-rw-r--r--sys/arch/macppc/dev/openpic.c22
2 files changed, 20 insertions, 20 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) {