Module Name: src Committed By: thorpej Date: Sat Jan 20 00:19:12 UTC 2024
Modified Files: src/sys/arch/m68k/m68k: m68k_intr_stubs.s src/sys/arch/news68k/news68k: genassym.cf Log Message: Support the hardware-assisted AST on news68k in the common interrupt stubs. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/m68k/m68k/m68k_intr_stubs.s cvs rdiff -u -r1.36 -r1.37 src/sys/arch/news68k/news68k/genassym.cf 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/m68k/m68k/m68k_intr_stubs.s diff -u src/sys/arch/m68k/m68k/m68k_intr_stubs.s:1.4 src/sys/arch/m68k/m68k/m68k_intr_stubs.s:1.5 --- src/sys/arch/m68k/m68k/m68k_intr_stubs.s:1.4 Fri Jan 19 18:18:54 2024 +++ src/sys/arch/m68k/m68k/m68k_intr_stubs.s Sat Jan 20 00:19:12 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: m68k_intr_stubs.s,v 1.4 2024/01/19 18:18:54 thorpej Exp $ */ +/* $NetBSD: m68k_intr_stubs.s,v 1.5 2024/01/20 00:19:12 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -50,11 +50,16 @@ #endif /* - * XXX Some platforms (e.g. news68k) have hardware-assisted ASTs, and - * XXX thus don't need to branch to rei() after an interrupt. Figure - * XXX out a way to handle these platforms. This works for now; the - * XXX hardware-assist is just an optimization. + * If a platform supports hardware-assisted ASTs, we don't branch to + * rei() after the interrupt. Instead, we simply do an rte. Such + * platforms will have their own vector stub for dealing with ASTs, + * which will in turn call rei(). */ +#ifdef __HAVE_M68K_HW_AST +#define INTERRUPT_RETURN rte +#else +#define INTERRUPT_RETURN jra _ASM_LABEL(rei) +#endif /* __HAVE_M68K_HW_AST */ /* * Vector stub for auto-vectored interrupts. Calls the dispatch @@ -67,7 +72,7 @@ ENTRY_NOPROFILE(intrstub_autovec) jbsr _C_LABEL(m68k_intr_autovec) INTERRUPT_RESTOREREG subql #1,_C_LABEL(intr_depth) - jra _ASM_LABEL(rei) + INTERRUPT_RETURN #ifdef __HAVE_M68K_INTR_VECTORED /* @@ -80,5 +85,5 @@ ENTRY_NOPROFILE(intrstub_vectored) jbsr _C_LABEL(m68k_intr_vectored) INTERRUPT_RESTOREREG subql #1,_C_LABEL(intr_depth) - jra _ASM_LABEL(rei) + INTERRUPT_RETURN #endif /* __HAVE_M68K_INTR_VECTORED */ Index: src/sys/arch/news68k/news68k/genassym.cf diff -u src/sys/arch/news68k/news68k/genassym.cf:1.36 src/sys/arch/news68k/news68k/genassym.cf:1.37 --- src/sys/arch/news68k/news68k/genassym.cf:1.36 Mon Jan 15 20:21:50 2024 +++ src/sys/arch/news68k/news68k/genassym.cf Sat Jan 20 00:19:12 2024 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.36 2024/01/15 20:21:50 thorpej Exp $ +# $NetBSD: genassym.cf,v 1.37 2024/01/20 00:19:12 thorpej Exp $ # # Copyright (c) 1982, 1990, 1993 @@ -75,6 +75,7 @@ endif define M68K_MMU_MOTOROLA 1 define __HAVE_M68K_INTR_VECTORED 1 +define __HAVE_M68K_HW_AST 1 # values for fputype define FPU_NONE FPU_NONE