CVS commit: src/sys

"Nick Hudson" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	skrll
Date:		Sun Apr 19 15:09:50 UTC 2026

Modified Files:
	src/sys/arch/aarch64/aarch64: aarch64_tlb.c pmap.c pmap_machdep.c
	src/sys/arch/aarch64/include: pmap.h pmap_machdep.h
	src/sys/arch/arm/arm32: arm32_tlb.c pmap.c
	src/sys/arch/arm/include/arm32: pmap.h
	src/sys/arch/m68k/include: pmap_coldfire.h
	src/sys/arch/mips/include: pmap.h
	src/sys/arch/powerpc/include/booke: pmap.h
	src/sys/arch/riscv/include: pmap.h
	src/sys/arch/riscv/riscv: pmap_machdep.c
	src/sys/uvm/pmap: pmap.c pmap_segtab.c pmap_tlb.c

Log Message:
pmap: move userland xtab activate/deactivate into pmap_md_asid{,de}activate

pmap_segtab_{,de}activate() no longer calls pmap_md_xtab_{,de}activate()

Instead move the calls into
    - pmap_tlb_asid_acquire()
    - pmap_tlb_asid_deactivate()

respectively.

Rename xtab to asid at the same time so that the functions are now named
pmap_md_asid_{,de}activate(), and are provided as static inline to improve
code size.

On arm32 and aarch64 TTBR0 is disabled for the entire time that a userland
process in not pmap_activate()ed and only ever enabled if a userland
process is pmap_activate()ed. This results in less twiddling of the disable
bit, and no speculation window there incorrect TTBR0 walks can occur.

The last part makes GENERIC64_PMAPMI stable on Fusion on an M4 laptop.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/aarch64_tlb.c
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/pmap_machdep.c
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/aarch64/include/pmap.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/include/pmap_machdep.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/arm32/arm32_tlb.c
cvs rdiff -u -r1.447 -r1.448 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/arm/include/arm32/pmap.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/include/pmap_coldfire.h
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/mips/include/pmap.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/booke/pmap.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/riscv/include/pmap.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/riscv/riscv/pmap_machdep.c
cvs rdiff -u -r1.88 -r1.89 src/sys/uvm/pmap/pmap.c
cvs rdiff -u -r1.34 -r1.35 src/sys/uvm/pmap/pmap_segtab.c
cvs rdiff -u -r1.66 -r1.67 src/sys/uvm/pmap/pmap_tlb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.