Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-km]: src/sys/arch/arm convert arch/arm to new apis.
details: https://anonhg.NetBSD.org/src/rev/a1fb9e90e73a
branches: yamt-km
changeset: 573307:a1fb9e90e73a
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Jan 28 10:33:58 2005 +0000
description:
convert arch/arm to new apis.
diffstat:
sys/arch/arm/arm32/bus_dma.c | 10 ++++++----
sys/arch/arm/arm32/pmap.c | 10 +++++-----
sys/arch/arm/arm32/vm_machdep.c | 8 ++++----
sys/arch/arm/ep93xx/ep93xx_space.c | 11 +++++++----
sys/arch/arm/footbridge/footbridge_io.c | 10 ++++++----
sys/arch/arm/iomd/console/vidcrender.c | 7 ++++---
sys/arch/arm/iomd/vidc20config.c | 7 ++++---
sys/arch/arm/ixp12x0/ixp12x0_io.c | 9 +++++----
sys/arch/arm/mainbus/mainbus_io.c | 6 +++---
sys/arch/arm/s3c2xx0/s3c2800_pci.c | 6 +++---
sys/arch/arm/s3c2xx0/s3c2xx0_space.c | 6 +++---
sys/arch/arm/sa11x0/sa11x0_io.c | 6 +++---
sys/arch/arm/xscale/i80312_space.c | 10 ++++++----
sys/arch/arm/xscale/i80321_space.c | 11 +++++++----
sys/arch/arm/xscale/ixp425_pci_space.c | 9 +++++----
sys/arch/arm/xscale/ixp425_space.c | 11 +++++++----
sys/arch/arm/xscale/pxa2x0_space.c | 15 +++++++++++----
17 files changed, 89 insertions(+), 63 deletions(-)
diffs (truncated from 591 to 300 lines):
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.42 2005/01/02 22:47:26 chris Exp $ */
+/* $NetBSD: bus_dma.c,v 1.42.4.1 2005/01/28 10:33:58 yamt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.42 2005/01/02 22:47:26 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.42.4.1 2005/01/28 10:33:58 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -828,7 +828,7 @@
#endif /* DEBUG_DMA */
size = round_page(size);
- va = uvm_km_valloc(kernel_map, size);
+ va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY);
if (va == 0)
return (ENOMEM);
@@ -894,7 +894,9 @@
#endif /* DIAGNOSTIC */
size = round_page(size);
- uvm_km_free(kernel_map, (vaddr_t)kva, size);
+ pmap_remove(pmap_kernel(), (vaddr_t)kva, (vaddr_t)kva + size);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, (vaddr_t)kva, size, UVM_KMF_VAONLY);
}
/*
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/arm32/pmap.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.150 2005/01/14 02:28:54 joff Exp $ */
+/* $NetBSD: pmap.c,v 1.150.4.1 2005/01/28 10:33:58 yamt 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.150 2005/01/14 02:28:54 joff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.150.4.1 2005/01/28 10:33:58 yamt Exp $");
#ifdef PMAP_DEBUG
@@ -4123,8 +4123,8 @@
return (rv);
}
- new_page = uvm_km_kmemalloc(kernel_map, NULL, PAGE_SIZE,
- (flags & PR_WAITOK) ? 0 : UVM_KMF_NOWAIT);
+ new_page = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_WIRED | ((flags & PR_WAITOK) ? 0 : UVM_KMF_NOWAIT));
KASSERT(new_page > last_bootstrap_page);
last_bootstrap_page = new_page;
@@ -4181,7 +4181,7 @@
for (loop = 0; loop < needed; loop++, l1++) {
/* Allocate a L1 page table */
- va = uvm_km_valloc(kernel_map, L1_TABLE_SIZE);
+ va = uvm_km_alloc(kernel_map, L1_TABLE_SIZE, 0, UVM_KMF_VAONLY);
if (va == 0)
panic("Cannot allocate L1 KVM");
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/arm32/vm_machdep.c
--- a/sys/arch/arm/arm32/vm_machdep.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/arm32/vm_machdep.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.32 2004/08/28 22:12:40 thorpej Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.32.6.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.32 2004/08/28 22:12:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.32.6.1 2005/01/28 10:33:59 yamt Exp $");
#include "opt_armfpe.h"
#include "opt_pmap_debug.h"
@@ -333,7 +333,7 @@
faddr = trunc_page((vaddr_t)bp->b_saveaddr = bp->b_data);
off = (vaddr_t)bp->b_data - faddr;
len = round_page(off + len);
- taddr = uvm_km_valloc_wait(phys_map, len);
+ taddr = uvm_km_alloc(phys_map, len, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
bp->b_data = (caddr_t)(taddr + off);
/*
@@ -381,7 +381,7 @@
pmap_remove(pmap_kernel(), addr, addr + len);
pmap_update(pmap_kernel());
- uvm_km_free_wakeup(phys_map, addr, len);
+ uvm_km_free(phys_map, addr, len, UVM_KMF_VAONLY);
bp->b_data = bp->b_saveaddr;
bp->b_saveaddr = 0;
}
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/ep93xx/ep93xx_space.c
--- a/sys/arch/arm/ep93xx/ep93xx_space.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/ep93xx/ep93xx_space.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ep93xx_space.c,v 1.1 2004/12/22 19:08:16 joff Exp $ */
+/* $NetBSD: ep93xx_space.c,v 1.1.6.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 2004 Jesse Off
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ep93xx_space.c,v 1.1 2004/12/22 19:08:16 joff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ep93xx_space.c,v 1.1.6.1 2005/01/28 10:33:59 yamt Exp $");
/*
* bus_space I/O functions for ep93xx
@@ -156,7 +156,8 @@
startpa = trunc_page(bpa);
/* Get some VM. */
- if ((va = uvm_km_valloc(kernel_map, endpa - startpa)) == 0)
+ va = uvm_km_alloc(kernel_map, endpa - startpa, 0, UVM_KMF_VAONLY);
+ if (va == 0)
return ENOMEM;
/* Store the bus space handle */
@@ -187,7 +188,9 @@
endva = round_page(bsh + size);
va = trunc_page(bsh);
- uvm_km_free(kernel_map, va, endva - va);
+ pmap_remove(pmap_kernel(), va, endva);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, va, endva - va, UVM_KMF_VAONLY);
}
int
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/footbridge/footbridge_io.c
--- a/sys/arch/arm/footbridge/footbridge_io.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/footbridge/footbridge_io.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_io.c,v 1.9 2003/04/01 23:19:10 thorpej Exp $ */
+/* $NetBSD: footbridge_io.c,v 1.9.12.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 1997 Causality Limited
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: footbridge_io.c,v 1.9 2003/04/01 23:19:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_io.c,v 1.9.12.1 2005/01/28 10:33:59 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -208,7 +208,7 @@
* multiple mappings
*/
- va = uvm_km_valloc(kernel_map, endpa - startpa);
+ va = uvm_km_alloc(kernel_map, endpa - startpa, 0, UVM_KMF_VAONLY);
if (va == 0)
return ENOMEM;
@@ -277,7 +277,9 @@
startva = trunc_page(bsh);
endva = round_page(bsh + size);
- uvm_km_free(kernel_map, startva, endva - startva);
+ pmap_remove(pmap_kernel(), startva, endva - startve);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, startva, endva - startva, UVM_KMF_VAONLY);
}
void
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/iomd/console/vidcrender.c
--- a/sys/arch/arm/iomd/console/vidcrender.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/iomd/console/vidcrender.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vidcrender.c,v 1.13 2003/09/21 15:12:19 matt Exp $ */
+/* $NetBSD: vidcrender.c,v 1.13.10.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vidcrender.c,v 1.13 2003/09/21 15:12:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidcrender.c,v 1.13.10.1 2005/01/28 10:33:59 yamt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1246,7 +1246,8 @@
if (!cursor_data) {
/* Allocate cursor memory first time round */
- cursor_data = (char *)uvm_km_zalloc(kernel_map, PAGE_SIZE);
+ cursor_data = (char *)uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_VAONLY);
if (!cursor_data)
panic("Cannot allocate memory for hardware cursor");
(void) pmap_extract(pmap_kernel(), (vaddr_t)cursor_data, &pa);
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/iomd/vidc20config.c
--- a/sys/arch/arm/iomd/vidc20config.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/iomd/vidc20config.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vidc20config.c,v 1.17 2003/09/21 15:12:16 matt Exp $ */
+/* $NetBSD: vidc20config.c,v 1.17.10.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 2001 Reinoud Zandijk
@@ -48,7 +48,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vidc20config.c,v 1.17 2003/09/21 15:12:16 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidc20config.c,v 1.17.10.1 2005/01/28 10:33:59 yamt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -581,7 +581,8 @@
if (!cursor_data) {
/* Allocate cursor memory first time round */
- cursor_data = (char *)uvm_km_zalloc(kernel_map, PAGE_SIZE);
+ cursor_data = (char *)uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_WIRED | UVM_KMF_ZERO);
if (!cursor_data)
panic("Cannot allocate memory for hardware cursor");
(void) pmap_extract(pmap_kernel(), (vaddr_t)cursor_data, &pa);
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/ixp12x0/ixp12x0_io.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_io.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_io.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp12x0_io.c,v 1.9 2003/07/13 07:15:22 igy Exp $ */
+/* $NetBSD: ixp12x0_io.c,v 1.9.10.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 2002, 2003
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixp12x0_io.c,v 1.9 2003/07/13 07:15:22 igy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp12x0_io.c,v 1.9.10.1 2005/01/28 10:33:59 yamt Exp $");
/*
* bus_space I/O functions for ixp12x0
@@ -159,7 +159,8 @@
offset = bpa & PAGE_MASK;
startpa = trunc_page(bpa);
- if ((va = uvm_km_valloc(kernel_map, endpa - startpa)) == 0)
+ va = uvm_km_alloc(kernel_map, endpa - startpa, 0, UVM_KMF_VAONLY);
+ if (va == 0)
return ENOMEM;
*bshp = va + offset;
@@ -190,7 +191,7 @@
va = trunc_page(bsh);
pmap_kremove(va, endva - va);
- uvm_km_free(kernel_map, va, endva - va);
+ uvm_km_free(kernel_map, va, endva - va, UVM_KMF_VAONLY);
}
int
diff -r d914f01ffe5a -r a1fb9e90e73a sys/arch/arm/mainbus/mainbus_io.c
--- a/sys/arch/arm/mainbus/mainbus_io.c Thu Jan 27 14:30:33 2005 +0000
+++ b/sys/arch/arm/mainbus/mainbus_io.c Fri Jan 28 10:33:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus_io.c,v 1.15 2004/01/01 18:07:27 chris Exp $ */
+/* $NetBSD: mainbus_io.c,v 1.15.10.1 2005/01/28 10:33:59 yamt Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus_io.c,v 1.15 2004/01/01 18:07:27 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus_io.c,v 1.15.10.1 2005/01/28 10:33:59 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
Home |
Main Index |
Thread Index |
Old Index