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)
Fri, Sep 27, 12:39 PM
Unknown Object (File)
Thu, Sep 26, 2:50 PM
Unknown Object (File)
Tue, Sep 24, 4:13 PM
Unknown Object (File)
Sun, Sep 22, 6:18 PM
Unknown Object (File)
Mon, Sep 16, 1:06 AM
Unknown Object (File)
Fri, Sep 13, 11:55 AM
Unknown Object (File)
Wed, Sep 11, 6:27 AM
Unknown Object (File)
Tue, Sep 10, 5:05 PM
Subscribers

Details

Summary

While here, eliminate a single-use local variable.

PR: 266103

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 47182
Build 44069: arc lint + arc unit

Event Timeline

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

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

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.

917

Optionally; this is the prevalent style.

markj marked 3 inline comments as done.

Handle Mitchell's comments.

sys/riscv/riscv/pmap.c
912

Yes, I believe so.

mhorne added inline comments.
sys/riscv/riscv/pmap.c
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