Page MenuHomeFreeBSD

arm64: Create a TLBI invalidate for the kernel
ClosedPublic

Authored by andrew on Aug 27 2025, 5:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 21, 8:00 AM
Unknown Object (File)
Fri, Sep 19, 3:40 AM
Unknown Object (File)
Wed, Sep 17, 9:29 PM
Unknown Object (File)
Mon, Sep 15, 7:36 AM
Unknown Object (File)
Sun, Sep 14, 12:14 PM
Unknown Object (File)
Sat, Sep 13, 8:11 PM
Unknown Object (File)
Sat, Sep 13, 8:01 PM
Unknown Object (File)
Sat, Sep 13, 7:05 AM
Subscribers

Details

Summary

Add pmap_s1_invalidate_all_kernel to remove the need to check for the
kernel_pmap when it's passed in.

While here replace pmap calls to cpu_tlb_flushID with
pmap_s1_invalidate_all_kernel as they are identical.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Aug 29 2025, 2:53 PM
sys/arm64/arm64/pmap.c
7981

Because kernel_pmap is a constant, not a variable, the code generated for pmap_s1_invalidate_all(kernel_pmap) is already the same as the newly proposed pmap_s1_invalidate_all_kernel(). In short, I don't see a compelling need for this new function.

sys/arm64/arm64/pmap.c
7981

I'm trying to centralise tlb handling to minimise where we need to implement workarounds.

The only remaining caller of pmap_invalidate_all is pmap_remove_pages & that can't take the kernel pamp. We could replace the kernel check in pmap_s1_invalidate_all with a KASSERT in a later change.