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 Fixup the #if to reflect when we can have...



details:   https://anonhg.NetBSD.org/src/rev/5aa3d997edb6
branches:  trunk
changeset: 346986:5aa3d997edb6
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Aug 09 08:59:08 2016 +0000

description:
Fixup the #if to reflect when we can have non-direct mappable USPACE

diffstat:

 sys/arch/mips/mips/mipsX_subr.S |  6 +++---
 sys/arch/mips/mips/vm_machdep.c |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 26006720cdc4 -r 5aa3d997edb6 sys/arch/mips/mips/mipsX_subr.S
--- a/sys/arch/mips/mips/mipsX_subr.S   Tue Aug 09 08:56:23 2016 +0000
+++ b/sys/arch/mips/mips/mipsX_subr.S   Tue Aug 09 08:59:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mipsX_subr.S,v 1.85 2016/08/09 08:56:23 skrll Exp $    */
+/*     $NetBSD: mipsX_subr.S,v 1.86 2016/08/09 08:59:08 skrll Exp $    */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -2715,7 +2715,7 @@
  * sure TBIS(it) in the case.
  */
 LEAF_NOPROFILE(MIPSX(cpu_switch_resume))
-#if !defined(ENABLE_MIPS_16KB_PAGE) && !defined(ENABLE_MIPS_8KB_PAGE)
+#if (USPACE > PAGE_SIZE) || !defined(_LP64)
        INT_L   a1, L_MD_UPTE_0(a0)             # a1 = upte[0]
 #if (PGSHIFT & 1)
        INT_ADD a2, a1, MIPS3_PG_NEXT           # a2 = upper half
@@ -2785,7 +2785,7 @@
        _MTC0   ta1, MIPS_COP_0_TLB_HI          # restore TLB_HI
        COP0_SYNC
 MIPSX(resume):
-#endif /* !ENABLE_MIPS_16KB_PAGE */
+#endif /* (USPACE > PAGE_SIZE) || !defined(_LP64) */
 #ifdef MIPSNNR2
        PTR_L   v0, L_PRIVATE(a0)               # get lwp private
        _MTC0   v0, MIPS_COP_0_USERLOCAL        # make available for rdhwr
diff -r 26006720cdc4 -r 5aa3d997edb6 sys/arch/mips/mips/vm_machdep.c
--- a/sys/arch/mips/mips/vm_machdep.c   Tue Aug 09 08:56:23 2016 +0000
+++ b/sys/arch/mips/mips/vm_machdep.c   Tue Aug 09 08:59:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.150 2016/07/31 15:33:42 skrll Exp $   */
+/*     $NetBSD: vm_machdep.c,v 1.151 2016/08/09 08:59:08 skrll Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.150 2016/07/31 15:33:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.151 2016/08/09 08:59:08 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_coredump.h"
@@ -115,9 +115,9 @@
                tf->tf_regs[_R_SP] = (intptr_t)stack + stacksize;
 
        l2->l_md.md_utf = tf;
-#if (USPACE > PAGE_SIZE)
+#if (USPACE > PAGE_SIZE) || !defined(_LP64)
        if (!pmap_md_direct_mapped_vaddr_p(ua2)) {
-               __CTASSERT((PGSHIFT & 1) || UPAGES % 2 == 0);
+               CTASSERT((PGSHIFT == 12) == (UPAGES == 2));
                pt_entry_t * const pte = pmap_pte_lookup(pmap_kernel(), ua2);
                const uint32_t x = MIPS_HAS_R4K_MMU
                    ? (MIPS3_PG_RO | MIPS3_PG_WIRED)



Home | Main Index | Thread Index | Old Index