Page MenuHomeFreeBSD

riscv: Handle invalid L2 entries in pmap_extract()
ClosedPublic

Authored by markj on Aug 30 2022, 2:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 1:54 AM
Unknown Object (File)
Dec 12 2023, 5:51 PM
Unknown Object (File)
Nov 29 2023, 9:25 AM
Unknown Object (File)
Nov 26 2023, 6:11 AM
Unknown Object (File)
Nov 14 2023, 10:29 AM
Unknown Object (File)
Oct 13 2023, 9:20 AM
Unknown Object (File)
Aug 28 2023, 6:05 PM
Unknown Object (File)
Aug 28 2023, 6:04 PM
Subscribers

Details

Summary

While here, eliminate a single-use local variable.

PR: 266103

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Aug 30 2022, 2:53 PM
mhorne added inline comments.
sys/riscv/riscv/pmap.c
911–912

I guess the comment means we are unable to allocate 1G leaf pages?

915–916

I think the parens are wrong, it should be:

((l2 = pmap_load(l2p)) & PTE_V) != 0

Otherwise the value assigned to l2 might be PTE_V, I'm not sure about operator precedence here.

916–917

Optionally; this is the prevalent style.

markj marked 3 inline comments as done.

Handle Mitchell's comments.

sys/riscv/riscv/pmap.c
911–912

Yes, I believe so.

mhorne added inline comments.
sys/riscv/riscv/pmap.c
916–917

You still have redundant parenthesis around pmap_load(l2p).

This revision is now accepted and ready to land.Aug 30 2022, 4:45 PM