Source-Changes-HG archive

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

[src/rmind-uvmplock]: src/sys/arch/hp700/hp700 Fix mm_md_direct_mapped_phys.



details:   https://anonhg.NetBSD.org/src/rev/de2e38b47077
branches:  rmind-uvmplock
changeset: 753070:de2e38b47077
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Mar 08 16:19:48 2011 +0000

description:
Fix mm_md_direct_mapped_phys.

diffstat:

 sys/arch/hp700/hp700/machdep.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r c6203df4fe43 -r de2e38b47077 sys/arch/hp700/hp700/machdep.c
--- a/sys/arch/hp700/hp700/machdep.c    Sun Mar 06 01:38:45 2011 +0000
+++ b/sys/arch/hp700/hp700/machdep.c    Tue Mar 08 16:19:48 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.79.2.7 2011/03/05 20:50:28 rmind Exp $   */
+/*     $NetBSD: machdep.c,v 1.79.2.8 2011/03/08 16:19:48 skrll Exp $   */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79.2.7 2011/03/05 20:50:28 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79.2.8 2011/03/08 16:19:48 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -2088,7 +2088,10 @@
 mm_md_direct_mapped_phys(paddr_t paddr, vaddr_t *vaddr)
 {
 
-       *vaddr = ptoa(physmem) - paddr;
+       if (atop(paddr) > physmem)
+               return false;
+        *vaddr = paddr;
+
        return true;
 }
 



Home | Main Index | Thread Index | Old Index