diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2022-03-01 14:03:44 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2022-03-01 14:39:43 +0000 |
| commit | 2e956c30cab6a36fee9a3d5159c3903406e3e5e7 (patch) | |
| tree | 554cbb6fb3e3ae25ba8f59f28836d81af0d50e03 /sys/riscv | |
| parent | 82f4e0d0f06456f2d070d2e0692a8f318f4eb90b (diff) | |
Diffstat (limited to 'sys/riscv')
| -rw-r--r-- | sys/riscv/include/cpufunc.h | 7 | ||||
| -rw-r--r-- | sys/riscv/riscv/pmap.c | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/sys/riscv/include/cpufunc.h b/sys/riscv/include/cpufunc.h index 0f27fc45d57d..7b7afb50fee8 100644 --- a/sys/riscv/include/cpufunc.h +++ b/sys/riscv/include/cpufunc.h @@ -120,13 +120,6 @@ extern int64_t icache_line_size; #define cpu_icache_sync_range(a, s) #define cpu_icache_sync_range_checked(a, s) -static __inline void -load_satp(uint64_t val) -{ - - __asm __volatile("csrw satp, %0" :: "r"(val)); -} - #define cpufunc_nullop() riscv_nullop() void riscv_nullop(void); diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 545d77f808c7..d26d6113ee36 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -4402,7 +4402,7 @@ pmap_activate_sw(struct thread *td) pmap = vmspace_pmap(td->td_proc->p_vmspace); if (pmap == oldpmap) return; - load_satp(pmap->pm_satp); + csr_write(satp, pmap->pm_satp); hart = PCPU_GET(hart); #ifdef SMP |
