diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-01-08 18:10:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-01-08 18:10:24 +0000 |
commit | 87b03074369dfae21d797cf3f96642469441a79c (patch) | |
tree | a8e8f8249e24d2b359d223f679ca740472256ed7 /sys/arch/macppc | |
parent | 36f14486ea394cd56938caae3641b13f676212eb (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')
-rw-r--r-- | sys/arch/macppc/dev/macintr.c | 18 | ||||
-rw-r--r-- | sys/arch/macppc/dev/openpic.c | 22 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/pci/mpcpcibus.c | 8 |
4 files changed, 26 insertions, 26 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 |