Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src Revert xmd(4).
details: https://anonhg.NetBSD.org/src/rev/252916ff7bd5
branches: uebayasi-xip
changeset: 751856:252916ff7bd5
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Mon Nov 15 15:11:52 2010 +0000
description:
Revert xmd(4).
diffstat:
share/man/man9/pmap.9 | 39 +----
sys/arch/acorn26/acorn26/mem.c | 12 +-
sys/arch/acorn26/acorn26/pmap.c | 11 +-
sys/arch/alpha/alpha/mem.c | 7 +-
sys/arch/alpha/alpha/pmap.c | 17 +-
sys/arch/amd64/amd64/mem.c | 6 +-
sys/arch/arm/arm32/mem.c | 7 +-
sys/arch/arm/arm32/pmap.c | 11 +-
sys/common/pmap/pmap_common.c | 53 ------
sys/dev/xmd.c | 306 ----------------------------------------
sys/uvm/files.uvm | 4 +-
sys/uvm/uvm_pmap.h | 5 +-
12 files changed, 24 insertions(+), 454 deletions(-)
diffs (truncated from 678 to 300 lines):
diff -r 662b1f6d830d -r 252916ff7bd5 share/man/man9/pmap.9
--- a/share/man/man9/pmap.9 Mon Nov 15 14:38:21 2010 +0000
+++ b/share/man/man9/pmap.9 Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pmap.9,v 1.42.2.3 2010/10/30 08:41:14 uebayasi Exp $
+.\" $NetBSD: pmap.9,v 1.42.2.4 2010/11/15 15:11:52 uebayasi Exp $
.\"
.\" Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 30, 2010
+.Dd November 4, 2009
.Dt PMAP 9
.Os
.Sh NAME
@@ -69,12 +69,6 @@
.Fn "pmap_protect" "pmap_t pmap" "vaddr_t sva" "vaddr_t eva" "vm_prot_t prot"
.Ft void
.Fn "pmap_unwire" "pmap_t pmap" "vaddr_t va"
-.Ft void *
-.Fn "pmap_physload_device" "vaddr_t addr" "off_t off" "int prot" "int flags"
-.Ft void
-.Fn "pmap_unphysload_device" "void *phys"
-.Ft paddr_t
-.Fn "pmap_mmap" "vaddr_t addr" "off_t off"
.Ft bool
.Fn "pmap_extract" "pmap_t pmap" "vaddr_t va" "paddr_t *pap"
.Ft void
@@ -600,35 +594,6 @@
.Dq wired
attribute on the mapping for virtual address
.Fa va .
-.It void * Fn "pmap_physload_device" "vaddr_t addr" "off_t off" \
- "int prot" "int flags"
-This function registers a kernel virtual address region of system
-memory described by
-.Fa addr
-and
-.Fa off
-as a physical device memory segment like a NOR FlashROM,
-and return a cookie pointer to the registered segment.
-The registered region will be mapped into user address space.
-.It void Fn "pmap_physunload_device" "void *phys"
-Free a physical segment previously allocated by
-.Fn pmap_physload_device 9 .
-.It paddr_t Fn "pmap_mmap" "vaddr_t addr" "off_t off"
-This function converts a given kernel virtual address described by
-.Fa addr
-and
-.Fa off
-to a physical mmap cookie.
-This interface is only used by machine-dependent memory devices,
-.Xr mem 4
-and
-.Xr xmd 4 ,
-to map part of kernel memory to user address spaces.
-.Pp
-Note that the
-.Fn pmap_mmap
-cares only addresses.
-Callers are respensible to check protection.
.It bool Fn "pmap_extract" "pmap_t pmap" "vaddr_t va" "paddr_t *pap"
This function extracts a mapping from the specified physical map.
It serves two purposes: to determine if a mapping exists for the specified
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/acorn26/acorn26/mem.c
--- a/sys/arch/acorn26/acorn26/mem.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/acorn26/acorn26/mem.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.14.2.1 2010/10/30 08:41:05 uebayasi Exp $ */
+/* $NetBSD: mem.c,v 1.14.2.2 2010/11/15 15:11:52 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.14.2.1 2010/10/30 08:41:05 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.14.2.2 2010/11/15 15:11:52 uebayasi Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -212,9 +212,7 @@
/* XXX This may botch our cacheing assumptions. Do we care? */
ppn = atop(off);
- KASSERT(ppn >= 0);
- if (ppn >= physmem)
- return -1;
-
- return pmap_mmap(0, off);
+ if (ppn >= 0 && ppn < physmem)
+ return ppn;
+ return -1;
}
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/acorn26/acorn26/pmap.c
--- a/sys/arch/acorn26/acorn26/pmap.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/acorn26/acorn26/pmap.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.30.2.5 2010/10/30 08:41:05 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.30.2.6 2010/11/15 15:11:52 uebayasi Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 Ben Harris
* All rights reserved.
@@ -102,7 +102,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.30.2.5 2010/10/30 08:41:05 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.30.2.6 2010/11/15 15:11:52 uebayasi Exp $");
#include <sys/kernel.h> /* for cold */
#include <sys/malloc.h>
@@ -723,13 +723,6 @@
splx(s);
}
-paddr_t
-pmap_mmap(vaddr_t addr, off_t off)
-{
-
- return atop(addr + off);
-}
-
bool
pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *ppa)
{
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/alpha/alpha/mem.c
--- a/sys/arch/alpha/alpha/mem.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/alpha/alpha/mem.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.40.2.1 2010/10/30 08:41:06 uebayasi Exp $ */
+/* $NetBSD: mem.c,v 1.40.2.2 2010/11/15 15:11:53 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -78,7 +78,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.40.2.1 2010/10/30 08:41:06 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.40.2.2 2010/11/15 15:11:53 uebayasi Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -216,6 +216,5 @@
*/
if ((prot & alpha_pa_access(off)) != prot)
return (-1);
-
- return pmap_mmap(0, off);
+ return (alpha_btop(off));
}
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.252.2.9 2010/11/10 08:59:12 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.252.2.10 2010/11/15 15:11:53 uebayasi Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc.
@@ -140,7 +140,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.252.2.9 2010/11/10 08:59:12 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.252.2.10 2010/11/15 15:11:53 uebayasi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2034,19 +2034,6 @@
}
/*
- * pmap_mmap [ INTERFACE ]
- *
- * Convert the given kernel virtual address to the page frame
- * number (mmap cookie).
- */
-paddr_t
-pmap_mmap(vaddr_t addr, off_t off)
-{
-
- return alpha_btop(addr + off);
-}
-
-/*
* pmap_extract: [ INTERFACE ]
*
* Extract the physical address associated with the given
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/amd64/amd64/mem.c
--- a/sys/arch/amd64/amd64/mem.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/amd64/amd64/mem.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.19.2.1 2010/10/30 08:41:06 uebayasi Exp $ */
+/* $NetBSD: mem.c,v 1.19.2.2 2010/11/15 15:11:53 uebayasi Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.19.2.1 2010/10/30 08:41:06 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.19.2.2 2010/11/15 15:11:53 uebayasi Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -260,5 +260,5 @@
if (check_pa_acc(off, prot) != 0)
return -1;
- return pmap_mmap(0, off);
+ return x86_btop(off);
}
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/arm/arm32/mem.c
--- a/sys/arch/arm/arm32/mem.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/arm/arm32/mem.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.26.6.7 2010/11/06 08:08:14 uebayasi Exp $ */
+/* $NetBSD: mem.c,v 1.26.6.8 2010/11/15 15:11:53 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
#include "opt_xip.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26.6.7 2010/11/06 08:08:14 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26.6.8 2010/11/15 15:11:53 uebayasi Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -220,6 +220,5 @@
if (off >= ctob(physmem) && kauth_authorize_machdep(l->l_cred,
KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL) != 0)
return -1;
-
- return pmap_mmap(0, off);
+ return arm_btop(off);
}
diff -r 662b1f6d830d -r 252916ff7bd5 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Mon Nov 15 14:38:21 2010 +0000
+++ b/sys/arch/arm/arm32/pmap.c Mon Nov 15 15:11:52 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.211.2.22 2010/11/10 08:59:13 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.211.2.23 2010/11/15 15:11:53 uebayasi Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.211.2.22 2010/11/10 08:59:13 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.211.2.23 2010/11/15 15:11:53 uebayasi Exp $");
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
@@ -3518,13 +3518,6 @@
cpu_cpwait();
}
-paddr_t
-pmap_mmap(vaddr_t addr, off_t off)
-{
-
- return arm_btop(vtophys(addr + off));
-}
-
bool
pmap_extract(pmap_t pm, vaddr_t va, paddr_t *pap)
{
diff -r 662b1f6d830d -r 252916ff7bd5 sys/common/pmap/pmap_common.c
--- a/sys/common/pmap/pmap_common.c Mon Nov 15 14:38:21 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/* $NetBSD: pmap_common.c,v 1.1.2.2 2010/11/02 14:05:28 uebayasi Exp $ */
-
-/*-
- * Copyright (c) 2010 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
Home |
Main Index |
Thread Index |
Old Index