Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add a flags argument to pmap_kenter_pa(9).
details: https://anonhg.NetBSD.org/src/rev/5b0fe603c714
branches: trunk
changeset: 748853:5b0fe603c714
user: cegger <cegger%NetBSD.org@localhost>
date: Sat Nov 07 07:27:40 2009 +0000
description:
Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
diffstat:
sys/arch/acorn26/acorn26/pmap.c | 6 +++---
sys/arch/alpha/alpha/pmap.c | 6 +++---
sys/arch/amd64/amd64/bios32.c | 8 ++++----
sys/arch/amd64/amd64/gdt.c | 8 ++++----
sys/arch/amd64/amd64/machdep.c | 14 +++++++-------
sys/arch/amiga/amiga/pmap.c | 6 +++---
sys/arch/arc/arc/bus_space_sparse.c | 7 ++++---
sys/arch/arm/arm32/arm32_machdep.c | 7 ++++---
sys/arch/arm/arm32/pmap.c | 11 ++++++-----
sys/arch/arm/arm32/stubs.c | 6 +++---
sys/arch/arm/gemini/gemini_space.c | 6 +++---
sys/arch/arm/imx/imx31_space.c | 6 +++---
sys/arch/arm/ixp12x0/ixp12x0_io.c | 6 +++---
sys/arch/arm/mainbus/mainbus_io.c | 6 +++---
sys/arch/arm/omap/omap_space.c | 6 +++---
sys/arch/arm/s3c2xx0/s3c2xx0_space.c | 6 +++---
sys/arch/arm/sa11x0/sa11x0_io.c | 6 +++---
sys/arch/arm/xscale/ixp425_pci_space.c | 6 +++---
sys/arch/arm/xscale/pxa2x0_space.c | 6 +++---
sys/arch/atari/atari/machdep.c | 6 +++---
sys/arch/atari/atari/pmap.c | 6 +++---
sys/arch/cesfic/cesfic/autoconf.c | 6 +++---
sys/arch/dreamcast/dev/g2/gapspci_dma.c | 6 +++---
sys/arch/evbarm/adi_brh/obio_space.c | 6 +++---
sys/arch/evbarm/hdl_g/obio_space.c | 6 +++---
sys/arch/evbarm/iq80310/obio_space.c | 6 +++---
sys/arch/evbarm/iq80321/obio_space.c | 6 +++---
sys/arch/evbppc/evbppc/evbppc_machdep.c | 6 +++---
sys/arch/evbppc/walnut/machdep.c | 6 +++---
sys/arch/evbsh3/evbsh3/machdep.c | 6 +++---
sys/arch/ews4800mips/dev/ga.c | 6 +++---
sys/arch/ews4800mips/sbd/fb_sbdio.c | 6 +++---
sys/arch/hp300/hp300/machdep.c | 6 +++---
sys/arch/hp700/hp700/machdep.c | 6 +++---
sys/arch/hp700/hp700/mainbus.c | 8 ++++----
sys/arch/hpcmips/hpcmips/bus_space.c | 6 +++---
sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c | 6 +++---
sys/arch/hppa/hppa/pmap.c | 8 ++++----
sys/arch/i386/i386/bios32.c | 8 ++++----
sys/arch/i386/i386/dumpsys.c | 6 +++---
sys/arch/i386/i386/gdt.c | 12 ++++++------
sys/arch/i386/i386/kvm86.c | 6 +++---
sys/arch/i386/i386/machdep.c | 17 +++++++++--------
sys/arch/i386/pnpbios/pnpbios.c | 6 +++---
sys/arch/ia64/ia64/pmap.c | 6 +++---
sys/arch/iyonix/iyonix/obio_space.c | 6 +++---
sys/arch/landisk/dev/obio.c | 6 +++---
sys/arch/landisk/landisk/bus_dma.c | 6 +++---
sys/arch/m68k/m68k/pmap_motorola.c | 6 +++---
sys/arch/m68k/m68k/vm_machdep.c | 6 +++---
sys/arch/mips/alchemy/au_himem_space.c | 6 +++---
sys/arch/mips/mips/pmap.c | 6 +++---
sys/arch/news68k/news68k/machdep.c | 6 +++---
sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c | 7 ++++---
sys/arch/powerpc/ibm4xx/pmap.c | 8 ++++----
sys/arch/powerpc/include/oea/pmap.h | 4 ++--
sys/arch/powerpc/oea/oea_machdep.c | 8 ++++----
sys/arch/powerpc/oea/pmap.c | 8 ++++----
sys/arch/powerpc/powerpc/bus_dma.c | 6 +++---
sys/arch/powerpc/powerpc/vm_machdep.c | 8 ++++----
sys/arch/sh3/sh3/pmap.c | 6 +++---
sys/arch/sparc/include/pmap.h | 8 ++++----
sys/arch/sparc/sparc/autoconf.c | 6 +++---
sys/arch/sparc/sparc/iommu.c | 10 ++++++----
sys/arch/sparc/sparc/machdep.c | 17 +++++++++--------
sys/arch/sparc/sparc/pmap.c | 20 ++++++++++----------
sys/arch/sparc64/dev/iommu.c | 10 ++++++----
sys/arch/sparc64/sparc64/cpu.c | 6 +++---
sys/arch/sparc64/sparc64/machdep.c | 8 ++++----
sys/arch/sparc64/sparc64/pmap.c | 6 +++---
sys/arch/sparc64/sparc64/vm_machdep.c | 6 +++---
sys/arch/sun2/sun2/machdep.c | 6 +++---
sys/arch/sun2/sun2/pmap.c | 6 +++---
sys/arch/sun3/sun3/machdep.c | 6 +++---
sys/arch/sun3/sun3/pmap.c | 6 +++---
sys/arch/sun3/sun3x/bus_subr.c | 6 +++---
sys/arch/sun3/sun3x/pmap.c | 12 ++++++------
sys/arch/usermode/usermode/pmap.c | 6 +++---
sys/arch/vax/vax/pmap.c | 6 +++---
sys/arch/x86/acpi/acpi_wakeup.c | 6 +++---
sys/arch/x86/include/pmap.h | 4 ++--
sys/arch/x86/x86/bus_space.c | 8 ++++----
sys/arch/x86/x86/cpu.c | 8 ++++----
sys/arch/x86/x86/mpbios.c | 6 +++---
sys/arch/x86/x86/pmap.c | 14 +++++++-------
sys/arch/x86/x86/vga_post.c | 10 +++++-----
sys/arch/x86/x86/vm_machdep.c | 6 +++---
sys/arch/xen/x86/cpu.c | 8 ++++----
sys/arch/xen/xen/xengnt.c | 6 +++---
sys/kern/kern_malloc_debug.c | 6 +++---
sys/kern/kern_verifiedexec.c | 6 +++---
sys/kern/uipc_socket.c | 6 +++---
sys/nfs/nfs_serv.c | 6 +++---
sys/uvm/uvm_bio.c | 7 ++++---
sys/uvm/uvm_emap.c | 6 +++---
sys/uvm/uvm_km.c | 9 +++++----
sys/uvm/uvm_kmguard.c | 6 +++---
sys/uvm/uvm_map.c | 6 +++---
sys/uvm/uvm_page.c | 8 ++++----
sys/uvm/uvm_pager.c | 6 +++---
sys/uvm/uvm_pmap.h | 4 ++--
101 files changed, 365 insertions(+), 353 deletions(-)
diffs (truncated from 3145 to 300 lines):
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/acorn26/acorn26/pmap.c
--- a/sys/arch/acorn26/acorn26/pmap.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/acorn26/acorn26/pmap.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.29 2009/10/21 21:11:58 rmind Exp $ */
+/* $NetBSD: pmap.c,v 1.30 2009/11/07 07:27:40 cegger 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.29 2009/10/21 21:11:58 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.30 2009/11/07 07:27:40 cegger Exp $");
#include <sys/kernel.h> /* for cold */
#include <sys/malloc.h>
@@ -738,7 +738,7 @@
}
void
-pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
+pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags)
{
UVMHIST_FUNC("pmap_kenter_pa");
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.248 2009/10/26 03:51:42 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.249 2009/11/07 07:27:40 cegger 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.248 2009/10/26 03:51:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.249 2009/11/07 07:27:40 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1870,7 +1870,7 @@
* Note: no locking is necessary in this function.
*/
void
-pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
+pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags)
{
pt_entry_t *pte, npte;
long cpu_id = cpu_number();
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/amd64/amd64/bios32.c
--- a/sys/arch/amd64/amd64/bios32.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/amd64/amd64/bios32.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bios32.c,v 1.18 2009/05/16 07:46:45 cegger Exp $ */
+/* $NetBSD: bios32.c,v 1.19 2009/11/07 07:27:40 cegger Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.18 2009/05/16 07:46:45 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.19 2009/11/07 07:27:40 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -173,9 +173,9 @@
for (; pa < end; pa+= NBPG, eva+= NBPG)
#ifdef XEN
- pmap_kenter_ma(eva, pa, VM_PROT_READ);
+ pmap_kenter_ma(eva, pa, VM_PROT_READ, 0);
#else
- pmap_kenter_pa(eva, pa, VM_PROT_READ);
+ pmap_kenter_pa(eva, pa, VM_PROT_READ, 0);
#endif
pmap_update(pmap_kernel());
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/amd64/amd64/gdt.c
--- a/sys/arch/amd64/amd64/gdt.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/amd64/amd64/gdt.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gdt.c,v 1.21 2009/03/21 14:41:29 ad Exp $ */
+/* $NetBSD: gdt.c,v 1.22 2009/11/07 07:27:40 cegger Exp $ */
/*-
* Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.21 2009/03/21 14:41:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.22 2009/11/07 07:27:40 cegger Exp $");
#include "opt_multiprocessor.h"
#include "opt_xen.h"
@@ -140,7 +140,7 @@
panic("gdt_init: no pages");
}
pmap_kenter_pa(va, VM_PAGE_TO_PHYS(pg),
- VM_PROT_READ | VM_PROT_WRITE);
+ VM_PROT_READ | VM_PROT_WRITE, 0);
}
pmap_update(pmap_kernel());
memcpy(gdtstore, old_gdt, DYNSEL_START);
@@ -230,7 +230,7 @@
uvm_wait("gdt_grow");
}
pmap_kenter_pa(va, VM_PAGE_TO_PHYS(pg),
- VM_PROT_READ | VM_PROT_WRITE);
+ VM_PROT_READ | VM_PROT_WRITE, 0);
}
pmap_update(pmap_kernel());
}
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.135 2009/10/27 03:05:27 rmind Exp $ */
+/* $NetBSD: machdep.c,v 1.136 2009/11/07 07:27:40 cegger Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.135 2009/10/27 03:05:27 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.136 2009/11/07 07:27:40 cegger Exp $");
/* #define XENDEBUG_LOW */
@@ -328,7 +328,7 @@
for (x = 0; x < btoc(msgbuf_p_seg[y].sz); x++, sz += PAGE_SIZE)
pmap_kenter_pa((vaddr_t)msgbuf_vaddr + sz,
msgbuf_p_seg[y].paddr + x * PAGE_SIZE,
- VM_PROT_READ | UVM_PROT_WRITE);
+ VM_PROT_READ | UVM_PROT_WRITE, 0);
}
pmap_update(pmap_kernel());
@@ -1360,20 +1360,20 @@
pmap_growkernel(VM_MIN_KERNEL_ADDRESS + 32 * 1024 * 1024);
kpreempt_disable();
- pmap_kenter_pa(idt_vaddr, idt_paddr, VM_PROT_READ|VM_PROT_WRITE);
+ pmap_kenter_pa(idt_vaddr, idt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
pmap_update(pmap_kernel());
memset((void *)idt_vaddr, 0, PAGE_SIZE);
#ifndef XEN
pmap_changeprot_local(idt_vaddr, VM_PROT_READ);
#endif
pmap_kenter_pa(idt_vaddr + PAGE_SIZE, idt_paddr + PAGE_SIZE,
- VM_PROT_READ|VM_PROT_WRITE);
+ VM_PROT_READ|VM_PROT_WRITE, 0);
#ifdef XEN
/* Steal one more page for LDT */
pmap_kenter_pa(idt_vaddr + 2 * PAGE_SIZE, idt_paddr + 2 * PAGE_SIZE,
- VM_PROT_READ|VM_PROT_WRITE);
+ VM_PROT_READ|VM_PROT_WRITE, 0);
#endif
- pmap_kenter_pa(lo32_vaddr, lo32_paddr, VM_PROT_READ|VM_PROT_WRITE);
+ pmap_kenter_pa(lo32_vaddr, lo32_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
pmap_update(pmap_kernel());
#ifndef XEN
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/amiga/amiga/pmap.c
--- a/sys/arch/amiga/amiga/pmap.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/amiga/amiga/pmap.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.155 2009/10/21 21:11:58 rmind Exp $ */
+/* $NetBSD: pmap.c,v 1.156 2009/11/07 07:27:40 cegger Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.155 2009/10/21 21:11:58 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.156 2009/11/07 07:27:40 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1187,7 +1187,7 @@
}
void
-pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
+pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags)
{
struct pmap *pmap = pmap_kernel();
pt_entry_t *pte;
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/arc/arc/bus_space_sparse.c
--- a/sys/arch/arc/arc/bus_space_sparse.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/arc/arc/bus_space_sparse.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space_sparse.c,v 1.15 2008/04/28 20:23:13 martin Exp $ */
+/* $NetBSD: bus_space_sparse.c,v 1.16 2009/11/07 07:27:41 cegger Exp $ */
/* NetBSD: bus_machdep.c,v 1.1 2000/01/26 18:48:00 drochner Exp */
/*-
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.15 2008/04/28 20:23:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.16 2009/11/07 07:27:41 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -121,7 +121,8 @@
start, end);
for (va = vaddr; start < end;
start += PAGE_SIZE, va += PAGE_SIZE)
- pmap_kenter_pa(va, start, VM_PROT_READ|VM_PROT_WRITE);
+ pmap_kenter_pa(va, start,
+ VM_PROT_READ|VM_PROT_WRITE, 0);
pmap_update(pmap_kernel());
vaddr += (offset & PGOFSET);
if (cacheable)
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm32_machdep.c,v 1.66 2009/08/11 17:04:14 matt Exp $ */
+/* $NetBSD: arm32_machdep.c,v 1.67 2009/11/07 07:27:41 cegger Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.66 2009/08/11 17:04:14 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.67 2009/11/07 07:27:41 cegger Exp $");
#include "opt_md.h"
#include "opt_pmap_debug.h"
@@ -223,7 +223,8 @@
/* msgbufphys was setup during the secondary boot strap */
for (loop = 0; loop < btoc(MSGBUFSIZE); ++loop)
pmap_kenter_pa((vaddr_t)msgbufaddr + loop * PAGE_SIZE,
- msgbufphys + loop * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE);
+ msgbufphys + loop * PAGE_SIZE,
+ VM_PROT_READ|VM_PROT_WRITE, 0);
pmap_update(pmap_kernel());
initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE));
diff -r 304263c9a009 -r 5b0fe603c714 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Sat Nov 07 03:10:05 2009 +0000
+++ b/sys/arch/arm/arm32/pmap.c Sat Nov 07 07:27:40 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.200 2009/10/22 19:50:55 rmind Exp $ */
+/* $NetBSD: pmap.c,v 1.201 2009/11/07 07:27:41 cegger Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -212,7 +212,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.200 2009/10/22 19:50:55 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.201 2009/11/07 07:27:41 cegger Exp $");
#ifdef PMAP_DEBUG
@@ -3308,7 +3308,7 @@
* from here.
*/
void
-pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
+pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags)
{
struct l2_bucket *l2b;
pt_entry_t *ptep, opte;
@@ -4745,7 +4745,8 @@
* pmap_kenter_pa and let that routine do the hard work.
*/
KASSERT(SLIST_EMPTY(&pg->mdpage.pvh_list));
- pmap_kenter_pa(va, pa, VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE);
+ pmap_kenter_pa(va, pa,
+ VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE, 0);
#endif
}
@@ -5432,7 +5433,7 @@
paddr_t pa = VM_PAGE_TO_PHYS(m);
pmap_kenter_pa(va, pa,
- VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE);
+ VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE, 0);
/*
Home |
Main Index |
Thread Index |
Old Index