aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2025-09-04 17:24:30 +0000
committerAndrew Turner <andrew@FreeBSD.org>2025-09-04 17:24:30 +0000
commitfa23bfb425d53a87064d86ec9ae0ae5e31aa5d5b (patch)
treedc9a94ec745ca05c4da1e0f8875a527921385a67
parent8df4dc90952be7afee36e3cc80c1a76e2c66fbac (diff)
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
-rw-r--r--sys/arm64/arm64/machdep.c2
-rw-r--r--sys/arm64/arm64/pmap.c4
-rw-r--r--sys/arm64/include/pmap.h2
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);