Module Name: src Committed By: skrll Date: Tue Aug 9 08:59:08 UTC 2016
Modified Files: src/sys/arch/mips/mips: mipsX_subr.S vm_machdep.c Log Message: Fixup the #if to reflect when we can have non-direct mappable USPACE To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.150 -r1.151 src/sys/arch/mips/mips/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.85 src/sys/arch/mips/mips/mipsX_subr.S:1.86 --- src/sys/arch/mips/mips/mipsX_subr.S:1.85 Tue Aug 9 08:56:23 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Tue Aug 9 08:59:08 2016 @@ -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 @@ END(MIPSX(lwp_trampoline)) * 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 @@ MIPSX(entry0set): _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 Index: src/sys/arch/mips/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.150 src/sys/arch/mips/mips/vm_machdep.c:1.151 --- src/sys/arch/mips/mips/vm_machdep.c:1.150 Sun Jul 31 15:33:42 2016 +++ src/sys/arch/mips/mips/vm_machdep.c Tue Aug 9 08:59:08 2016 @@ -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 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 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)