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)
Sep 30 2024, 7:38 PM
Unknown Object (File)
Sep 30 2024, 4:33 AM
Unknown Object (File)
Sep 27 2024, 12:39 PM
Unknown Object (File)
Sep 26 2024, 2:50 PM
Unknown Object (File)
Sep 24 2024, 4:13 PM
Unknown Object (File)
Sep 22 2024, 6:18 PM
Unknown Object (File)
Sep 16 2024, 1:06 AM
Unknown Object (File)
Sep 13 2024, 11:55 AM
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