Module Name: src Committed By: thorpej Date: Thu Sep 17 00:48:57 UTC 2020
Modified Files: src/sys/arch/alpha/alpha: interrupt.c locore.s src/sys/arch/alpha/include: intr.h Log Message: Reduce the __HAVE_FAST_SOFTINTS #ifdef perimeter. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/arch/alpha/alpha/interrupt.c cvs rdiff -u -r1.133 -r1.134 src/sys/arch/alpha/alpha/locore.s cvs rdiff -u -r1.76 -r1.77 src/sys/arch/alpha/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/alpha/alpha/interrupt.c diff -u src/sys/arch/alpha/alpha/interrupt.c:1.85 src/sys/arch/alpha/alpha/interrupt.c:1.86 --- src/sys/arch/alpha/alpha/interrupt.c:1.85 Wed Sep 16 04:07:32 2020 +++ src/sys/arch/alpha/alpha/interrupt.c Thu Sep 17 00:48:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.85 2020/09/16 04:07:32 thorpej Exp $ */ +/* $NetBSD: interrupt.c,v 1.86 2020/09/17 00:48:56 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.85 2020/09/16 04:07:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.86 2020/09/17 00:48:56 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -450,7 +450,9 @@ badaddr_read(void *addr, size_t size, vo return (rv); } -#ifdef __HAVE_FAST_SOFTINTS +/* + * Fast soft interrupt support. + */ #define SOFTINT_CLOCK_MASK __BIT(SOFTINT_CLOCK) #define SOFTINT_BIO_MASK __BIT(SOFTINT_BIO) @@ -468,6 +470,8 @@ badaddr_read(void *addr, size_t size, vo #define SOFTINTS_ELIGIBLE(ipl) \ ((ALPHA_ALL_SOFTINTS << ((ipl) << 1)) & ALPHA_ALL_SOFTINTS) +#ifdef __HAVE_FAST_SOFTINTS + /* Validate some assumptions the code makes. */ __CTASSERT(SOFTINT_TO_IPL(SOFTINT_CLOCK) == ALPHA_PSL_IPL_SOFT_LO); __CTASSERT(SOFTINT_TO_IPL(SOFTINT_BIO) == ALPHA_PSL_IPL_SOFT_LO); @@ -522,6 +526,17 @@ softint_init_md(lwp_t * const l, u_int c *machdep = si_bit; } +#else /* ! __HAVE_FAST_SOFTINTS */ + +/* Temporary stub for alpha_softint_switchto(). */ +void +softint_dispatch(struct lwp * const pinned __unused, int const s __unused) +{ + panic("softint_dispatch"); +} + +#endif /* __HAVE_FAST_SOFTINTS */ + /* * Helper macro. * @@ -547,6 +562,7 @@ softint_init_md(lwp_t * const l, u_int c void alpha_softint_dispatch(int const ipl) { +#ifdef __HAVE_FAST_SOFTINTS struct lwp * const l = curlwp; struct cpu_info * const ci = l->l_cpu; unsigned long ssir; @@ -564,9 +580,11 @@ alpha_softint_dispatch(int const ipl) DOSOFTINT(BIO); DOSOFTINT(CLOCK); } +#else + panic("alpha_softint_dispatch"); +#endif /* __HAVE_FAST_SOFTINTS */ } -#endif /* __HAVE_FAST_SOFTINTS */ /* * spllower: @@ -578,12 +596,10 @@ void spllower(int const ipl) { -#ifdef __HAVE_FAST_SOFTINTS if (ipl < ALPHA_PSL_IPL_SOFT_HI && curcpu()->ci_ssir) { (void) alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH); alpha_softint_dispatch(ipl); } -#endif /* __HAVE_FAST_SOFTINTS */ (void) alpha_pal_swpipl(ipl); } Index: src/sys/arch/alpha/alpha/locore.s diff -u src/sys/arch/alpha/alpha/locore.s:1.133 src/sys/arch/alpha/alpha/locore.s:1.134 --- src/sys/arch/alpha/alpha/locore.s:1.133 Wed Sep 16 04:07:32 2020 +++ src/sys/arch/alpha/alpha/locore.s Thu Sep 17 00:48:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.133 2020/09/16 04:07:32 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.134 2020/09/17 00:48:56 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include <machine/asm.h> -__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.133 2020/09/16 04:07:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.134 2020/09/17 00:48:56 thorpej Exp $"); #include "assym.h" @@ -256,13 +256,11 @@ LEAF(exception_return, 1) /* XXX shoul GET_CURLWP mov v0, s0 /* s0 = curlwp */ -#ifdef __HAVE_FAST_SOFTINTS /* see if a soft interrupt is pending. */ 2: ldq t1, L_CPU(s0) /* t1 = curlwp->l_cpu */ ldq t1, CPU_INFO_SSIR(t1) /* soft int pending? */ bne t1, 6f /* yes */ /* no */ -#endif /* __HAVE_FAST_SOFTINTS */ /* --- END inline spllower() --- */ @@ -291,7 +289,6 @@ LEAF(exception_return, 1) /* XXX shoul .set at /* NOTREACHED */ -#ifdef __HAVE_FAST_SOFTINTS /* We've got a softint */ 6: ldiq a0, ALPHA_PSL_IPL_HIGH call_pal PAL_OSF1_swpipl @@ -303,7 +300,6 @@ LEAF(exception_return, 1) /* XXX shoul mov s2, a0 call_pal PAL_OSF1_swpipl br 2b -#endif /* __HAVE_FAST_SOFTINTS */ /* We've got an AST */ 7: stl zero, L_MD_ASTPENDING(s0) /* no AST pending */ @@ -655,7 +651,6 @@ LEAF(savectx, 1) /**************************************************************************/ -#ifdef __HAVE_FAST_SOFTINTS /* * void alpha_softint_switchto(struct lwp *current, int ipl, struct lwp *next) * Switch away from the current LWP to the specified softint LWP, and @@ -755,7 +750,6 @@ LEAF_NOPROFILE(alpha_softint_return, 0) lda sp, 16(sp) /* pop stack frame */ RET END(alpha_softint_return) -#endif /* __HAVE_FAST_SOFTINTS */ /* * struct lwp *cpu_switchto(struct lwp *current, struct lwp *next, @@ -787,7 +781,6 @@ LEAF(cpu_switchto, 0) mov a0, s4 /* save old curlwp */ mov a1, s2 /* save new lwp */ -#ifdef __HAVE_FAST_SOFTINTS /* * Check to see if we're doing a light-weight switch back to * an interrupted LWP (referred to as the "pinned" LWP) from @@ -797,7 +790,6 @@ LEAF(cpu_switchto, 0) */ bne a2, 3f /* yes, go handle it */ /* no, normal context switch */ -#endif /* __HAVE_FAST_SOFTINTS */ /* Switch to the new PCB. */ ldq a0, L_MD_PCBPADDR(s2) @@ -840,7 +832,6 @@ LEAF(cpu_switchto, 0) RET -#ifdef __HAVE_FAST_SOFTINTS 3: /* * Registers right now: * @@ -855,7 +846,6 @@ LEAF(cpu_switchto, 0) stq sp, PCB_HWPCB_KSP(a3) /* save old SP */ ldq sp, PCB_HWPCB_KSP(a2) /* restore new SP */ br 1b /* finish up */ -#endif /* __HAVE_FAST_SOFTINTS */ END(cpu_switchto) /* Index: src/sys/arch/alpha/include/intr.h diff -u src/sys/arch/alpha/include/intr.h:1.76 src/sys/arch/alpha/include/intr.h:1.77 --- src/sys/arch/alpha/include/intr.h:1.76 Wed Sep 16 04:07:32 2020 +++ src/sys/arch/alpha/include/intr.h Thu Sep 17 00:48:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.76 2020/09/16 04:07:32 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.77 2020/09/17 00:48:56 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -155,11 +155,9 @@ _splraise(int s) #include <sys/spl.h> -#ifdef __HAVE_FAST_SOFTINTS /* Fast soft interrupt dispatch. */ void alpha_softint_dispatch(int); void alpha_softint_switchto(struct lwp *, int, struct lwp *); -#endif /* __HAVE_FAST_SOFTINTS */ /* * Interprocessor interrupts. In order how we want them processed.