Module Name: src Committed By: matt Date: Sun Sep 6 22:57:11 UTC 2009
Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: vm_machdep.c Log Message: Use VM_MIN_KERNEL_ADDRESS instead of MIPS_KSEG2_START. Switch to MIPS_KSEG?_P To generate a diff of this commit: cvs rdiff -u -r1.121.6.1.2.2 -r1.121.6.1.2.3 \ 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/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.2 src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.3 --- src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.2 Sun Aug 23 04:06:01 2009 +++ src/sys/arch/mips/mips/vm_machdep.c Sun Sep 6 22:57:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.121.6.1.2.2 2009/08/23 04:06:01 matt Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.121.6.1.2.3 2009/09/06 22:57:11 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -80,7 +80,7 @@ #include "opt_coredump.h" #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.121.6.1.2.2 2009/08/23 04:06:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.121.6.1.2.3 2009/09/06 22:57:11 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -357,7 +357,7 @@ pt_entry_t *pte; paddr_t phys; - if (kva >= MIPS_KSEG2_START) { + if (kva >= VM_MIN_KERNEL_ADDRESS) { if (kva >= VM_MAX_KERNEL_ADDRESS) goto overrun; @@ -373,19 +373,13 @@ phys = mips_tlbpfn_to_paddr(pte->pt_entry) | (kva & PGOFSET); return phys; } - if (kva >= (vaddr_t)MIPS_KSEG1_START) + if (MIPS_KSEG1_P(kva)) return MIPS_KSEG1_TO_PHYS(kva); - if (kva >= (vaddr_t)MIPS_KSEG0_START) + if (MIPS_KSEG0_P(kva)) return MIPS_KSEG0_TO_PHYS(kva); #ifdef _LP64 -#if 0 - if (kva >= (vaddr_t)MIPS_XKSEG_START) - return MIPS_XKPHYS_TO_PHYS(kva); -#endif - - if (kva >= (vaddr_t)MIPS_XKPHYS_START - && kva < (vaddr_t)MIPS_XKSEG_START) + if (MIPS_XKPHYS_P(kva)) return MIPS_XKPHYS_TO_PHYS(kva); #endif overrun: