diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-08-07 15:47:40 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-08-07 15:47:40 +0000 |
commit | 1d558391dcfbc79a4bef603ff605edfacc81ab95 (patch) | |
tree | 018c6f7a824c6e0af6d3d82c526bf880fa733f96 /sys/arch | |
parent | 47d58e92f1cad201560bf1cb5402f58c4c87af73 (diff) |
Make sure interrupts are properly masked at the level they're established at.
The old code left an interrupt enabled at that level, making spl-protection
non functional.
Remove __packed from struct hppa_iv. Instead re-order the members to pack
things efficient on a 64-bit host. Remove explicit padding.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa64/hppa64/intr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/hppa64/hppa64/intr.c b/sys/arch/hppa64/hppa64/intr.c index 6e7d2789ba8..807b9fdd7fc 100644 --- a/sys/arch/hppa64/hppa64/intr.c +++ b/sys/arch/hppa64/hppa64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.5 2011/04/13 15:23:53 jsing Exp $ */ +/* $OpenBSD: intr.c,v 1.6 2011/08/07 15:47:39 kettenis Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -51,14 +51,13 @@ struct hppa_iv { char flags; #define HPPA_IV_SOFT 0x01 char pad; - int pad2; + u_int bit; int (*handler)(void *); void *arg; - u_int bit; struct hppa_iv *share; struct hppa_iv *next; struct evcount *cnt; -} __packed; +}; struct hppa_iv *intr_list; struct hppa_iv intr_table[CPU_NINTS] __attribute__ ((aligned(64))) = { @@ -173,7 +172,7 @@ cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg, if (!cnt) return (NULL); - imask[pri] |= (1UL << irq); + imask[pri - 1] |= (1UL << irq); iv = &intr_table[irq]; iv->pri = pri; @@ -315,7 +314,7 @@ softintr_establish(int pri, void (*handler)(void *), void *arg) iv->next = nv; iv = nv; } else - imask[pri] |= (1 << irq); + imask[pri - 1] |= (1 << irq); iv->pri = pri; iv->irq = 0; |