HomeFreeBSD

riscv: Fix pmap_kextract racing with concurrent superpage promotion/demotion

Description

riscv: Fix pmap_kextract racing with concurrent superpage promotion/demotion

This repeats amd64's cfcbf8c6fd3b (r180498) and i386's cf3508519c5e
(r202894) but for riscv; pmap_kextract must be lock-free and so it can
race with superpage promotion and demotion, thus the L2 entry must only
be loaded once to avoid using inconsistent state.

PR: 250866
Reviewed by: markj, mhorne
Tested by: David Gilbert <dgilbert@daveg.ca>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31253

(cherry picked from commit 4a235049082ee1cb044873ad9aff12cf73d0fd3b)

Details

Provenance
jrtc27Authored on Jul 22 2021, 7:02 PM
Reviewer
markj
Differential Revision
D31253: riscv: Fix pmap_kextract racing with concurrent superpage promotion/demotion
Parents
rG16ee8fe56b8b: riscv: Include spibus and spigen in GENERIC
Branches
Unknown
Tags
Unknown