diff options
-rw-r--r-- | sys/arch/hppa/hppa/genassym.cf | 3 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/intr.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/locore.S | 15 | ||||
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/hppa/include/intr.h | 6 |
5 files changed, 18 insertions, 17 deletions
diff --git a/sys/arch/hppa/hppa/genassym.cf b/sys/arch/hppa/hppa/genassym.cf index 45ed38d2cc9..bb4d2bd18f1 100644 --- a/sys/arch/hppa/hppa/genassym.cf +++ b/sys/arch/hppa/hppa/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.35 2010/04/19 14:05:04 jsing Exp $ +# $OpenBSD: genassym.cf,v 1.36 2010/04/19 16:32:53 jsing Exp $ # # Copyright (c) 1982, 1990, 1993 @@ -160,6 +160,7 @@ struct cpu_info member ci_curproc member ci_psw member ci_cpl +member ci_ipending # system calls export SYSCALLGATE diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c index 9e8603c187c..b68cc509f00 100644 --- a/sys/arch/hppa/hppa/intr.c +++ b/sys/arch/hppa/hppa/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.28 2010/04/19 14:05:04 jsing Exp $ */ +/* $OpenBSD: intr.c,v 1.29 2010/04/19 16:32:53 jsing Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -69,7 +69,7 @@ struct hppa_iv intr_table[CPU_NINTS] __attribute__ ((aligned(32))) = { { 0 }, { 0 }, { IPL_SOFTTTY , 0, HPPA_IV_SOFT, 0, 0, NULL } }; -volatile u_long ipending, imask[NIPL] = { +volatile u_long imask[NIPL] = { 0, 1 << (IPL_SOFTCLOCK - 1), 1 << (IPL_SOFTNET - 1), @@ -292,11 +292,11 @@ cpu_intr(void *v) if (ci->ci_in_intr++) frame->tf_flags |= TFF_INTR; - while ((mask = ipending & ~imask[s])) { + while ((mask = ci->ci_ipending & ~imask[s])) { int r, bit = fls(mask) - 1; struct hppa_iv *iv = &intr_table[bit]; - ipending &= ~(1L << bit); + ci->ci_ipending &= ~(1L << bit); if (iv->flags & HPPA_IV_CALL) continue; diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 9aad8795079..2f88ad4b5d9 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.167 2010/04/19 14:05:04 jsing Exp $ */ +/* $OpenBSD: locore.S,v 1.168 2010/04/19 16:32:53 jsing Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -2104,7 +2104,6 @@ intr_ticks #define INTR_PROF_AFT /* */ #endif - .import ipending, data .import imask, data .import intr_table, data .align 32 @@ -2117,9 +2116,9 @@ ENTRY(TLABEL(intr),0) ldil L%intr_table + 32*32, r1 ldo R%intr_table + 32*32(r1), r1 - ldil L%ipending, r17 + mfctl cr29, r17 b $intr_cont - ldw R%ipending(r17), r24 + ldw CI_IPENDING(r17), r24 $intr_ffs addi -32, r1, r1 @@ -2144,8 +2143,8 @@ $intr_cont comb,<>,n r0, r8, $intr_ffs ldw -32(r1), r0 /* preload cache */ - ldil L%ipending, r25 - stw r24, R%ipending(r25) + mfctl cr29, r25 + stw r24, CI_IPENDING(r25) mfctl cr29, r17 ldw CI_CPL(r17), r17 ldil L%imask, r16 @@ -2265,8 +2264,8 @@ $ibrk_spllower ldo 4(r9), r9 mtctl r9, pcoq - ldil L%ipending, r8 - ldw R%ipending(r8), r8 + mfctl cr29, r8 + ldw CI_IPENDING(r8), r8 ldil L%imask, r9 ldo R%imask(r9), r9 mfctl cr29, r17 diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index 6f16c1dfe24..c057c79c8d2 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.66 2010/04/19 14:05:04 jsing Exp $ */ +/* $OpenBSD: cpu.h,v 1.67 2010/04/19 16:32:53 jsing Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -77,6 +77,7 @@ struct cpu_info { register_t ci_psw; /* Processor Status Word. */ volatile int ci_cpl; + volatile u_long ci_ipending; volatile int ci_in_intr; int ci_want_resched; diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h index ab94763bd2a..aaa8b23b471 100644 --- a/sys/arch/hppa/include/intr.h +++ b/sys/arch/hppa/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.28 2009/12/31 13:22:02 jsing Exp $ */ +/* $OpenBSD: intr.h,v 1.29 2010/04/19 16:32:53 jsing Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -57,7 +57,7 @@ #include <machine/atomic.h> -extern volatile u_long ipending, imask[NIPL]; +extern volatile u_long imask[NIPL]; #ifdef DIAGNOSTIC void splassert_fail(int, int, const char *); @@ -137,7 +137,7 @@ hppa_intr_enable(register_t eiem) #define splhigh() splraise(IPL_HIGH) #define spl0() spllower(IPL_NONE) -#define softintr(mask) atomic_setbits_long(&ipending, mask) +#define softintr(mask) atomic_setbits_long(&curcpu()->ci_ipending, mask) #define SOFTINT_MASK ((1 << (IPL_SOFTCLOCK - 1)) | \ (1 << (IPL_SOFTNET - 1)) | (1 << (IPL_SOFTTTY - 1))) |