Module Name: src Committed By: thorpej Date: Wed Mar 11 13:30:31 UTC 2020
Modified Files: src/sys/arch/mips/mips: pmap_machdep.c src/sys/arch/powerpc/booke: booke_pmap.c src/sys/arch/powerpc/include/booke: pmap.h src/sys/arch/riscv/include: pmap.h src/sys/arch/riscv/riscv: pmap_machdep.c riscv_machdep.c src/sys/uvm/pmap: pmap.c pmap.h Log Message: With DEBUG defined, it's possible to execute a TLB-vs-segmap consistency check from a (soft) interrupt handler. But if a platform does not otherwise require the pmap_tlb_miss_lock, then where will be a brief window of inconsistency that, while harmless, will still fire an assertion in the consistency check. Fix this with the following changes: 1- Refactor the pmap_tlb_miss_lock into MI code and rename it from pmap_tlb_miss_lock_{enter,exit}() to pmap_tlb_miss_lock_{enter,exit}(). MD code can still define the "md" hooks as necessary, and if so, will override the common implementation. 2- Provde a pmap_bootstrap_common() function to perform common pmap bootstrap operations, namely initializing the pmap_tlb_miss_lock if it's needed. If MD code overrides the implementation, it's responsible for initializing its own lock. 3- Call pmap_bootstrap_common() from the mips, powerpc booke, and riscv pmap_bootstrap() routines. (This required adding one for riscv.) 4- Switch powerpc booke to the common pmap_tlb_miss_lock. 5- Enable pmap_tlb_miss_lock if DEBUG is defined, even if it's not otherwise required. PR port-mips/55062 (Failed assertion in pmap_md_tlb_check_entry()) To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/mips/pmap_machdep.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/booke/booke_pmap.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/booke/pmap.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/include/pmap.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/riscv/pmap_machdep.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/riscv/riscv/riscv_machdep.c cvs rdiff -u -r1.45 -r1.46 src/sys/uvm/pmap/pmap.c cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/pmap/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.