Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/arch
Module Name: src
Committed By: thorpej
Date: Sat Nov 14 19:02:13 UTC 2026
Modified Files:
src/sys/arch/amiga/amiga: locore.s
src/sys/arch/atari/atari: locore.s
src/sys/arch/atari/dev: hdfd_intr.s
src/sys/arch/cesfic/cesfic: locore.s
src/sys/arch/hp300/hp300: locore.s
src/sys/arch/luna68k/luna68k: locore.s
src/sys/arch/m68k/fpsp: netbsd.sa
src/sys/arch/m68k/include: asm.h cpu.h proc.h
src/sys/arch/m68k/m68k: compat_13_sigreturn13.s compat_16_sigreturn14.s
genassym.cf m68k_intr_stubs.s m68k_trap.c reenter_syscall.s
switch_subr.s trap_subr.s
src/sys/arch/mac68k/mac68k: intr.c locore.s
src/sys/arch/news68k/news68k: locore.s
src/sys/arch/next68k/next68k: locore.s
src/sys/arch/sun2/sun2: clock.c locore.s
src/sys/arch/sun3/sun3: clock.c locore.s
src/sys/arch/sun3/sun3x: clock.c locore.s
src/sys/arch/x68k/x68k: locore.s
Log Message:
Re-work AST processing, eliminating the global "astpending" variable.
The need for an AST is now tracked on a per-LWP basis (patterned after
the Alpha port).
The elimination of the "astpending" global necessitated an overhaul
of the code flow for checking for them. The old rei code block leveraged
that "astpending" could be checked without having to use a register.
Now, a register must be used, so the check for pending ASTs needs to
be done before registers are restored after a trap. So, a couple of
new asm macros are introduced to aid in this split-duty regime:
- CHECK_ASTPENDING() uses the specified scratch register to check for
pending ASTs and sets the Z flag accordingly (Z set == no pending AST).
- RTE_AST replaces the old pattern of unconditionally branching to the
rei code block and instead conditionally branches to the now-renamed-to-
rte_ast code block and perfors an RTE if the branch is not taken. This
makes the code ever so slightly larger, but actually eliminates a branch
in the case where an AST was not pending.
Care must be taken to only execute insns that do not change the CCs
between CHECK_ASTPENDING() and RTE_AST. Happily, MOVEM.L and ADDQ.L with
an address register as the destination operand are a-ok. The new pattern
looks like this:
movl FR_SP(%sp),%a0 | restore
movl %a0,%usp | user SP
CHECK_ASTPENDING(%a0) | check for AST
moveml (%sp)+,#0x7FFF | restore most user regs
addql #8,%sp | pop SP and stack adjust
RTE_AST
New INTERRUPT_ENTER and INTERRUPT_EXIT macros are added to reduce the
boilerplate for interrupt vectors, and take care of ordering the
operations correctly in anticipation of a future where incrementing
and decrementing the interrupt depth also requires a register in
certain configurations. Old interrupt vector helper macros now
begin with an under-bar to emphasize that they are implementation
details and that their direct use requires caution.
This is another brick in the foundation for MP support for m68k.
To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/arch/amiga/amiga/locore.s
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/atari/atari/locore.s
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/atari/dev/hdfd_intr.s
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/cesfic/cesfic/locore.s
cvs rdiff -u -r1.220 -r1.221 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/fpsp/netbsd.sa
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/m68k/include/asm.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/cpu.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/proc.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/m68k/compat_13_sigreturn13.s \
src/sys/arch/m68k/m68k/reenter_syscall.s
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/m68k/compat_16_sigreturn14.s
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/genassym.cf \
src/sys/arch/m68k/m68k/m68k_intr_stubs.s
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/m68k/m68k_trap.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/m68k/m68k/trap_subr.s
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mac68k/mac68k/intr.c
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/mac68k/mac68k/locore.s
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/next68k/next68k/locore.s
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sun2/sun2/clock.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/sun3/sun3/clock.c
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sun3/sun3x/clock.c
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/sun3/sun3x/locore.s
cvs rdiff -u -r1.165 -r1.166 src/sys/arch/x68k/x68k/locore.s
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index