The branch main has been updated by andrew:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fa23bfb425d53a87064d86ec9ae0ae5e31aa5d5b

commit fa23bfb425d53a87064d86ec9ae0ae5e31aa5d5b
Author:     Andrew Turner <and...@freebsd.org>
AuthorDate: 2025-09-04 17:24:30 +0000
Commit:     Andrew Turner <and...@freebsd.org>
CommitDate: 2025-09-04 17:24:30 +0000

    arm64: Replace cpu_tlb_flushID in initarm
    
    Replace cpu_tlb_flushID with pmap_s1_invalidate_all_kernel in initarm.
    They are identical in the SMP case.
    
    Reviewed by:    alc
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D52184
---
 sys/arm64/arm64/machdep.c | 2 +-
 sys/arm64/arm64/pmap.c    | 4 +---
 sys/arm64/include/pmap.h  | 2 ++
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 627b02e82d34..47c701e8588c 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -858,7 +858,7 @@ initarm(struct arm64_bootparams *abp)
 
        cninit();
        set_ttbr0(abp->kern_ttbr0);
-       cpu_tlb_flushID();
+       pmap_s1_invalidate_all_kernel();
 
        if (!valid)
                panic("Invalid bus configuration: %s",
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index af156727d9d2..0c359c6eea01 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -201,8 +201,6 @@ __exclusive_cache_line static struct pmap_large_md_page 
pv_dummy_large;
 #define pv_dummy pv_dummy_large.pv_page
 __read_mostly static struct pmap_large_md_page *pv_table;
 
-static __inline void pmap_s1_invalidate_all_kernel(void);
-
 static struct pmap_large_md_page *
 _pa_to_pmdp(vm_paddr_t pa)
 {
@@ -1963,7 +1961,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, 
vm_offset_t eva,
                pmap_s2_invalidate_range(pmap, sva, eva, final_only);
 }
 
-static __inline void
+void
 pmap_s1_invalidate_all_kernel(void)
 {
        dsb(ishst);
diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h
index 357c1a0d8232..406b6e2c5e0a 100644
--- a/sys/arm64/include/pmap.h
+++ b/sys/arm64/include/pmap.h
@@ -175,6 +175,8 @@ int pmap_fault(pmap_t, uint64_t, uint64_t);
 
 struct pcb *pmap_switch(struct thread *);
 
+void   pmap_s1_invalidate_all_kernel(void);
+
 extern void (*pmap_clean_stage2_tlbi)(void);
 extern void (*pmap_stage2_invalidate_range)(uint64_t, vm_offset_t, vm_offset_t,
     bool);

Reply via email to