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

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
rGd5341d72a11b: mmc: Drain the intrhook in mmc_detach()
Branches
Unknown
Tags
Unknown