Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/riscv/riscv Use sfence.vm instruction and change pt...
details: https://anonhg.NetBSD.org/src/rev/d197e0ad3b62
branches: trunk
changeset: 337042:d197e0ad3b62
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 31 01:14:57 2015 +0000
description:
Use sfence.vm instruction and change ptbr cse to sptbr csr
diffstat:
sys/arch/riscv/riscv/pmap_machdep.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 8383ae39c01c -r d197e0ad3b62 sys/arch/riscv/riscv/pmap_machdep.c
--- a/sys/arch/riscv/riscv/pmap_machdep.c Tue Mar 31 01:14:02 2015 +0000
+++ b/sys/arch/riscv/riscv/pmap_machdep.c Tue Mar 31 01:14:57 2015 +0000
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pmap_machdep.c,v 1.1 2015/03/28 16:13:56 matt Exp $");
+__RCSID("$NetBSD: pmap_machdep.c,v 1.2 2015/03/31 01:14:57 matt Exp $");
#include <sys/param.h>
@@ -144,7 +144,7 @@
void
pmap_md_pdetab_activate(struct pmap *pmap)
{
- __asm("csrw\tptbr, %0" :: "r"(pmap->pm_md.md_ptbr));
+ __asm("csrw\tsptbr, %0" :: "r"(pmap->pm_md.md_ptbr));
}
void
@@ -176,18 +176,18 @@
void
tlb_invalidate_asids(tlb_asid_t lo, tlb_asid_t hi)
{
- (void) riscvreg_fatc_read();
+ __asm __volatile("sfence.vm" ::: "memory");
}
void
tlb_invalidate_addr(vaddr_t va, tlb_asid_t asid)
{
- (void) riscvreg_fatc_read();
+ __asm __volatile("sfence.vm" ::: "memory");
}
bool
tlb_update_addr(vaddr_t va, tlb_asid_t asid, pt_entry_t pte, bool insert_p)
{
- (void) riscvreg_fatc_read();
+ __asm __volatile("sfence.vm" ::: "memory");
return false;
}
Home |
Main Index |
Thread Index |
Old Index