git: 972c4dc33bd7 - stable/14 - arm64: Replace cpu_tlb_flushID in initarm

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Thu, 15 Jan 2026 14:51:07 UTC
The branch stable/14 has been updated by andrew:

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

commit 972c4dc33bd76495581f4067234ca73865d65e09
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-09-04 17:24:30 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-01-14 21:14:15 +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
    
    (cherry picked from commit fa23bfb425d53a87064d86ec9ae0ae5e31aa5d5b)
---
 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 bf7b9ea810e4..7599e5301223 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -985,7 +985,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 b25c862b8ea3..f4b2e0d4e895 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -194,8 +194,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)
 {
@@ -1730,7 +1728,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 a250b5a20420..5b5b4eb9f59b 100644
--- a/sys/arm64/include/pmap.h
+++ b/sys/arm64/include/pmap.h
@@ -166,6 +166,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_invalidate_vpipt_icache)(void);
 extern void (*pmap_stage2_invalidate_range)(uint64_t, vm_offset_t, vm_offset_t,