summaryrefslogtreecommitdiff
path: root/sys/kern/dma_alloc.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-09-15 02:00:19 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-09-15 02:00:19 +0000
commit9d8236625502d9aebd87ee4b8aa759eb7dd062ae (patch)
tree608f67fdaff3caceaeb03f449b57d21037a3fe79 /sys/kern/dma_alloc.c
parent2470899b803a7fb5d135883edd5ddd82d6a592c7 (diff)
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/kern/dma_alloc.c')
-rw-r--r--sys/kern/dma_alloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/dma_alloc.c b/sys/kern/dma_alloc.c
index 94329b05e0f..08e5e56ca04 100644
--- a/sys/kern/dma_alloc.c
+++ b/sys/kern/dma_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma_alloc.c,v 1.12 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: dma_alloc.c,v 1.13 2016/09/15 02:00:16 dlg Exp $ */
/*
* Copyright (c) 2010 Theo de Raadt <deraadt@openbsd.org>
@@ -38,10 +38,9 @@ dma_alloc_init(void)
for (i = 0; i < nitems(dmapools); i++) {
snprintf(dmanames[i], sizeof(dmanames[0]), "dma%d",
1 << (i + DMA_BUCKET_OFFSET));
- pool_init(&dmapools[i], 1 << (i + DMA_BUCKET_OFFSET), 0, 0, 0,
- dmanames[i], NULL);
+ pool_init(&dmapools[i], 1 << (i + DMA_BUCKET_OFFSET), 0,
+ IPL_VM, 0, dmanames[i], NULL);
pool_set_constraints(&dmapools[i], &kp_dma_contig);
- pool_setipl(&dmapools[i], IPL_VM);
/* XXX need pool_setlowat(&dmapools[i], dmalowat); */
}
}