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 Fix mm_md_direct_mapped_phys
details: https://anonhg.NetBSD.org/src/rev/0f09d001ddae
branches: trunk
changeset: 766040:0f09d001ddae
user: matt <matt%NetBSD.org@localhost>
date: Tue Jun 14 05:30:40 2011 +0000
description:
Fix mm_md_direct_mapped_phys
diffstat:
sys/arch/mips/mips/mips_machdep.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diffs (45 lines):
diff -r 415e1965c407 -r 0f09d001ddae sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Tue Jun 14 05:28:00 2011 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Tue Jun 14 05:30:40 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_machdep.c,v 1.243 2011/06/12 03:35:44 rmind Exp $ */
+/* $NetBSD: mips_machdep.c,v 1.244 2011/06/14 05:30:40 matt Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.243 2011/06/12 03:35:44 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.244 2011/06/14 05:30:40 matt Exp $");
#define __INTR_PRIVATE
#include "opt_cputype.h"
@@ -2206,16 +2206,19 @@
#endif /* PARANOIA */
bool
-mm_md_direct_mapped_phys(paddr_t paddr, vaddr_t *vaddr)
+mm_md_direct_mapped_phys(paddr_t pa, vaddr_t *vap)
{
-
- /* XXX: Broken. */
#ifdef _LP64
- *vaddr = MIPS_PHYS_TO_XKPHYS_CACHED(paddr);
-#else
- *vaddr = MIPS_PHYS_TO_KSEG0(paddr);
+ if (MIPS_XKSEG_P(pa)) {
+ *vap = MIPS_PHYS_TO_XKPHYS_CACHED(pa);
+ return true;
+ }
#endif
- return true;
+ if (MIPS_KSEG0_P(pa)) {
+ *vap = MIPS_PHYS_TO_KSEG0(pa);
+ return true;
+ }
+ return false;
}
int
Home |
Main Index |
Thread Index |
Old Index