Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips Sign extend va for use with cache ops



details:   https://anonhg.NetBSD.org/src/rev/53d099d08fa2
branches:  trunk
changeset: 347588:53d099d08fa2
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Sep 04 07:47:12 2016 +0000

description:
Sign extend va for use with cache ops

diffstat:

 sys/arch/mips/mips/pmap_machdep.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 7d0d60f13c20 -r 53d099d08fa2 sys/arch/mips/mips/pmap_machdep.c
--- a/sys/arch/mips/mips/pmap_machdep.c Sun Sep 04 07:38:45 2016 +0000
+++ b/sys/arch/mips/mips/pmap_machdep.c Sun Sep 04 07:47:12 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_machdep.c,v 1.6 2016/09/04 07:38:45 skrll Exp $   */
+/*     $NetBSD: pmap_machdep.c,v 1.7 2016/09/04 07:47:12 skrll Exp $   */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.6 2016/09/04 07:38:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.7 2016/09/04 07:47:12 skrll Exp $");
 
 /*
  *     Manages physical address maps.
@@ -563,9 +563,9 @@
                if (p == curlwp->l_proc
                    && mips_cache_info.mci_pdcache_way_mask < PAGE_SIZE)
                    /* XXX check icache mask too? */
-                       mips_icache_sync_range(va, len);
+                       mips_icache_sync_range((intptr_t)va, len);
                else
-                       mips_icache_sync_range_index(va, len);
+                       mips_icache_sync_range_index((intptr_t)va, len);
        } else {
                pmap_t pmap = p->p_vmspace->vm_map.pmap;
                kpreempt_disable();
@@ -645,7 +645,7 @@
 
        struct vm_page_md * const mdpg = VM_PAGE_TO_MD(pg);
        pv_entry_t pv = &mdpg->mdpg_first;
-       const vaddr_t va = trunc_page(pv->pv_va);
+       const register_t va = (intptr_t)trunc_page(pv->pv_va);
 
        /*
         * If onproc is empty, we could do a



Home | Main Index | Thread Index | Old Index