summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/dev/sgmap_common.c4
-rw-r--r--sys/arch/hppa/hppa/mainbus.c4
-rw-r--r--sys/arch/i386/i386/machdep.c7
-rw-r--r--sys/arch/i386/pci/pci_addr_fixup.c4
-rw-r--r--sys/arch/mac68k/mac68k/bus_space.c4
-rw-r--r--sys/arch/mvmeppc/mvmeppc/bus_space.c4
-rw-r--r--sys/arch/sparc/sparc/vm_machdep.c6
-rw-r--r--sys/arch/vax/vax/pmap.c4
-rw-r--r--sys/arch/vax/vax/sgmap.c4
-rw-r--r--sys/dev/cardbus/rbus.c8
-rw-r--r--sys/kern/subr_extent.c4
-rw-r--r--sys/sys/extent.h18
-rw-r--r--sys/uvm/uvm_swap.c6
13 files changed, 33 insertions, 44 deletions
diff --git a/sys/arch/alpha/dev/sgmap_common.c b/sys/arch/alpha/dev/sgmap_common.c
index 45867565d44..552d71e7935 100644
--- a/sys/arch/alpha/dev/sgmap_common.c
+++ b/sys/arch/alpha/dev/sgmap_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgmap_common.c,v 1.1 2001/03/21 17:26:38 art Exp $ */
+/* $OpenBSD: sgmap_common.c,v 1.2 2001/07/05 10:00:25 art Exp $ */
/* $NetBSD: sgmap_common.c,v 1.13 2000/06/29 09:02:57 mrg Exp $ */
/*-
@@ -191,7 +191,7 @@ alpha_sgmap_alloc(map, origlen, sgmap, flags)
origlen, len, map->_dm_sgvalen, map->_dm_boundary, boundary);
#endif
- error = extent_alloc(sgmap->aps_ex, map->_dm_sgvalen, alignment,
+ error = extent_alloc(sgmap->aps_ex, map->_dm_sgvalen, alignment, 0,
boundary, (flags & BUS_DMA_NOWAIT) ? EX_NOWAIT : EX_WAITOK,
&map->_dm_sgva);
#if 0
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index 6c0b83f218c..9b662d02f5c 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.10 2001/01/12 23:49:52 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.11 2001/07/05 10:00:28 art Exp $ */
/*
* Copyright (c) 1998-2000 Michael Shalayeff
@@ -242,7 +242,7 @@ mbus_alloc(void *v, bus_addr_t rstart, bus_addr_t rend, bus_size_t size,
panic("bus_space_alloc: bad region start/end");
if ((error = extent_alloc_subregion(hppa_ex, rstart, rend, size,
- align, boundary, EX_NOWAIT, &bpa)))
+ align, 0, boundary, EX_NOWAIT, &bpa)))
return (error);
if ((error = mbus_add_mapping(bpa, size, cachable, bshp))) {
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 3dd8b3784dd..f57f741123f 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.166 2001/06/29 19:56:37 jason Exp $ */
+/* $OpenBSD: machdep.c,v 1.167 2001/07/05 10:00:30 art Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -476,9 +476,6 @@ allocsys(v)
#define valloc(name, type, num) \
v = (caddr_t)(((name) = (type *)v) + (num))
-#ifdef REAL_CLISTS
- valloc(cfree, struct cblock, nclist);
-#endif
valloc(timeouts, struct timeout, ntimeout);
#ifdef SYSVSHM
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
@@ -2612,7 +2609,7 @@ bus_space_alloc(t, rstart, rend, size, alignment, boundary, cacheable,
/*
* Do the requested allocation.
*/
- error = extent_alloc_subregion(ex, rstart, rend, size, alignment,
+ error = extent_alloc_subregion(ex, rstart, rend, size, alignment, 0,
boundary, EX_NOWAIT | (ioport_malloc_safe ? EX_MALLOCOK : 0),
&bpa);
diff --git a/sys/arch/i386/pci/pci_addr_fixup.c b/sys/arch/i386/pci/pci_addr_fixup.c
index a6f58407f91..e19ee40a952 100644
--- a/sys/arch/i386/pci/pci_addr_fixup.c
+++ b/sys/arch/i386/pci/pci_addr_fixup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_addr_fixup.c,v 1.10 2001/06/17 21:11:12 mickey Exp $ */
+/* $OpenBSD: pci_addr_fixup.c,v 1.11 2001/07/05 10:00:33 art Exp $ */
/* $NetBSD: pci_addr_fixup.c,v 1.7 2000/08/03 20:10:45 nathanw Exp $ */
/*-
@@ -291,7 +291,7 @@ pciaddr_do_resource_allocate(sc, pc, tag, mapreg, ex, type, addr, size)
PCIBIOS_PRINTV(("No available resources. fixup failed\n"));
return (1);
}
- error = extent_alloc_subregion(ex, start, ex->ex_end, size, size, 0,
+ error = extent_alloc_subregion(ex, start, ex->ex_end, size, size, 0, 0,
EX_FAST|EX_NOWAIT|EX_MALLOCOK, addr);
if (error) {
PCIBIOS_PRINTV(("No available resources. fixup failed\n"));
diff --git a/sys/arch/mac68k/mac68k/bus_space.c b/sys/arch/mac68k/mac68k/bus_space.c
index 855d383bee8..ab502b412fc 100644
--- a/sys/arch/mac68k/mac68k/bus_space.c
+++ b/sys/arch/mac68k/mac68k/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.8 2001/06/27 04:22:37 art Exp $ */
+/* $OpenBSD: bus_space.c,v 1.9 2001/07/05 10:00:35 art Exp $ */
/* $NetBSD: bus_space.c,v 1.5 1999/03/26 23:41:30 mycroft Exp $ */
/*-
@@ -124,7 +124,7 @@ bus_space_alloc(t, rstart, rend, size, alignment, boundary, flags, bpap, bshp)
* Do the requested allocation.
*/
error = extent_alloc_subregion(iomem_ex, rstart, rend, size, alignment,
- boundary,
+ 0, boundary,
EX_FAST | EX_NOWAIT | (iomem_malloc_safe ? EX_MALLOCOK : 0),
&bpa);
diff --git a/sys/arch/mvmeppc/mvmeppc/bus_space.c b/sys/arch/mvmeppc/mvmeppc/bus_space.c
index 89f2d990aee..d088d2c624a 100644
--- a/sys/arch/mvmeppc/mvmeppc/bus_space.c
+++ b/sys/arch/mvmeppc/mvmeppc/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.2 2001/07/04 08:31:33 niklas Exp $ */
+/* $OpenBSD: bus_space.c,v 1.3 2001/07/05 10:00:36 art Exp $ */
/* $NetBSD: bus_space.c,v 1.4 2001/06/15 15:50:05 nonaka Exp $ */
/*-
@@ -199,7 +199,7 @@ prep_memio_alloc(t, rstart, rend, size, alignment, boundary, flags,
if (rstart < ex->ex_start || rend > ex->ex_end)
panic("prep_memio_alloc: bad region start/end");
- error = extent_alloc_subregion(ex, rstart, rend, size, alignment,
+ error = extent_alloc_subregion(ex, rstart, rend, size, alignment, 0,
boundary,
EX_FAST | EX_NOWAIT | (ioport_malloc_safe ? EX_MALLOCOK : 0),
&bpa);
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c
index 433b47fdbaf..d6af17aa434 100644
--- a/sys/arch/sparc/sparc/vm_machdep.c
+++ b/sys/arch/sparc/sparc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.27 2001/06/10 01:45:04 deraadt Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.28 2001/07/05 10:00:38 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
@@ -201,12 +201,12 @@ dvma_mapin_space(map, va, len, canwait, space)
s = splhigh();
if (space & M_SPACE_D24)
- error = extent_alloc_subregion1(dvmamap_extent,
+ error = extent_alloc_subregion(dvmamap_extent,
DVMA_D24_BASE, DVMA_D24_END, len, dvma_cachealign,
va & (dvma_cachealign - 1), 0,
canwait ? EX_WAITSPACE : EX_WAITOK, &tva);
else
- error = extent_alloc1(dvmamap_extent, len, dvma_cachealign,
+ error = extent_alloc(dvmamap_extent, len, dvma_cachealign,
va & (dvma_cachealign - 1), 0,
canwait ? EX_WAITSPACE : EX_WAITOK, &tva);
splx(s);
diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c
index 93aa69ba9fe..780a43d7d11 100644
--- a/sys/arch/vax/vax/pmap.c
+++ b/sys/arch/vax/vax/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.17 2001/06/08 08:09:32 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.18 2001/07/05 10:00:40 art Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
@@ -403,7 +403,7 @@ pmap_pinit(pmap)
* XXX Ok to use kmem_alloc_wait() here?
*/
bytesiz = USRPTSIZE * sizeof(struct pte);
- res = extent_alloc(ptemap, bytesiz, 4, 0, EX_WAITSPACE|EX_WAITOK,
+ res = extent_alloc(ptemap, bytesiz, 4, 0, 0, EX_WAITSPACE|EX_WAITOK,
(u_long *)&pmap->pm_p0br);
if (res)
panic("pmap_pinit");
diff --git a/sys/arch/vax/vax/sgmap.c b/sys/arch/vax/vax/sgmap.c
index d9353f0e486..1b55dec4bbe 100644
--- a/sys/arch/vax/vax/sgmap.c
+++ b/sys/arch/vax/vax/sgmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgmap.c,v 1.4 2001/06/08 08:09:33 art Exp $ */
+/* $OpenBSD: sgmap.c,v 1.5 2001/07/05 10:00:41 art Exp $ */
/* $NetBSD: sgmap.c,v 1.8 2000/06/29 07:14:34 mrg Exp $ */
/*-
@@ -142,7 +142,7 @@ vax_sgmap_alloc(map, origlen, sgmap, flags)
origlen, len, map->_dm_sgvalen, map->_dm_boundary, boundary);
#endif
- error = extent_alloc(sgmap->aps_ex, map->_dm_sgvalen, VAX_NBPG,
+ error = extent_alloc(sgmap->aps_ex, map->_dm_sgvalen, VAX_NBPG, 0,
0, (flags & BUS_DMA_NOWAIT) ? EX_NOWAIT : EX_WAITOK,
&map->_dm_sgva);
#if 0
diff --git a/sys/dev/cardbus/rbus.c b/sys/dev/cardbus/rbus.c
index 6034ee65fe2..7110cb0fc69 100644
--- a/sys/dev/cardbus/rbus.c
+++ b/sys/dev/cardbus/rbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus.c,v 1.2 2000/05/31 15:52:50 aaron Exp $ */
+/* $OpenBSD: rbus.c,v 1.3 2001/07/05 10:00:43 art Exp $ */
/* $NetBSD: rbus.c,v 1.3 1999/11/06 06:20:53 soren Exp $ */
/*
* Copyright (c) 1999
@@ -123,14 +123,14 @@ rbus_space_alloc_subregion(rbt, substart, subend, addr, size, mask, align, flags
if (decodesize == align) {
if(extent_alloc_subregion(rbt->rb_ext, substart, subend, size, align, 0,
- exflags, (u_long *)&result)) {
+ 0, exflags, (u_long *)&result)) {
return 1;
}
} else if (decodesize == 0) {
/* maybe, the resister is overflowed. */
if (extent_alloc_subregion(rbt->rb_ext, addr, addr + size, size,
- 0, 0, exflags, (u_long *)&result)) {
+ 0, 0, 0, exflags, (u_long *)&result)) {
return 1;
}
} else {
@@ -146,7 +146,7 @@ rbus_space_alloc_subregion(rbt, substart, subend, addr, size, mask, align, flags
val = 1;
for (; search_addr + size <= subend; search_addr += boundary) {
val = extent_alloc_subregion(rbt->rb_ext,search_addr, search_addr+size,
- size, align, 0, exflags, (u_long *)&result);
+ size, align, 0, 0, exflags, (u_long *)&result);
DPRINTF(("rbus: trying [%lx:%lx] %lx\n",
search_addr, search_addr+size, align));
if (val == 0) {
diff --git a/sys/kern/subr_extent.c b/sys/kern/subr_extent.c
index a1663c4e083..0cc1260b059 100644
--- a/sys/kern/subr_extent.c
+++ b/sys/kern/subr_extent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_extent.c,v 1.15 2001/06/22 14:14:09 deraadt Exp $ */
+/* $OpenBSD: subr_extent.c,v 1.16 2001/07/05 10:00:45 art Exp $ */
/* $NetBSD: subr_extent.c,v 1.7 1996/11/21 18:46:34 cgd Exp $ */
/*-
@@ -506,7 +506,7 @@ extent_alloc_region(ex, start, size, flags)
* a power of 2.
*/
int
-extent_alloc_subregion1(ex, substart, subend, size, alignment, skew, boundary,
+extent_alloc_subregion(ex, substart, subend, size, alignment, skew, boundary,
flags, result)
struct extent *ex;
u_long substart, subend, size, alignment, skew, boundary;
diff --git a/sys/sys/extent.h b/sys/sys/extent.h
index f0e8160b9ef..dcb64b42a6a 100644
--- a/sys/sys/extent.h
+++ b/sys/sys/extent.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extent.h,v 1.5 2001/01/15 22:18:23 jason Exp $ */
+/* $OpenBSD: extent.h,v 1.6 2001/07/05 10:00:47 art Exp $ */
/* $NetBSD: extent.h,v 1.6 1997/10/09 07:43:05 jtc Exp $ */
/*-
@@ -109,25 +109,17 @@ void extent_print_all __P((void));
struct extent *extent_create __P((char *, u_long, u_long, int,
caddr_t, size_t, int));
void extent_destroy __P((struct extent *));
-int extent_alloc_subregion1 __P((struct extent *, u_long, u_long,
+int extent_alloc_subregion __P((struct extent *, u_long, u_long,
u_long, u_long, u_long, u_long, int, u_long *));
int extent_alloc_region __P((struct extent *, u_long, u_long, int));
int extent_free __P((struct extent *, u_long, u_long, int));
void extent_print __P((struct extent *));
/* Simple case of extent_alloc_subregion() */
-#define extent_alloc(_ex, _size, _alignment, _boundary, _flags, _result) \
- extent_alloc_subregion1((_ex), (_ex)->ex_start, (_ex)->ex_end, \
- (_size), (_alignment), 0, (_boundary), (_flags), (_result))
-#define extent_alloc1(_ex, _size, _alignment, _skew, _boundary, \
- _flags, _result) \
- extent_alloc_subregion1((_ex), (_ex)->ex_start, (_ex)->ex_end, \
+#define extent_alloc(_ex, _size, _alignment, _skew, _boundary, \
+ _flags, _result) \
+ extent_alloc_subregion((_ex), (_ex)->ex_start, (_ex)->ex_end, \
(_size), (_alignment), (_skew), (_boundary), (_flags), (_result))
-/* Compat version of extent_alloc_subregion() */
-#define extent_alloc_subregion(_ex, _start, _end, _size, _alignment, \
- _boundary, _flags, _result) \
- extent_alloc_subregion1((_ex), (_start), (_end), \
- (_size), (_alignment), 0, (_boundary), (_flags), (_result))
#endif /* _KERNEL || _EXTENT_TESTING */
#endif /* ! _SYS_EXTENT_H_ */
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index 61bb44095b4..76c294d06e2 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.27 2001/06/23 15:26:29 art Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.28 2001/07/05 10:00:49 art Exp $ */
/* $NetBSD: uvm_swap.c,v 1.28 1999/07/22 22:58:39 thorpej Exp $ */
/*
@@ -615,7 +615,7 @@ swapdrum_add(sdp, npages)
{
u_long result;
- if (extent_alloc(swapmap, npages, EX_NOALIGN, EX_NOBOUNDARY,
+ if (extent_alloc(swapmap, npages, EX_NOALIGN, 0, EX_NOBOUNDARY,
EX_WAITOK, &result))
panic("swapdrum_add");
@@ -1731,7 +1731,7 @@ ReTry: /* XXXMRG */
continue;
if (sdp->swd_npginuse + *nslots > sdp->swd_npages)
continue;
- if (extent_alloc(sdp->swd_ex, *nslots, EX_NOALIGN,
+ if (extent_alloc(sdp->swd_ex, *nslots, EX_NOALIGN, 0,
EX_NOBOUNDARY, EX_MALLOCOK|EX_NOWAIT,
&result) != 0) {
continue;