diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-17 20:54:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-17 20:54:18 +0000 |
commit | 81343b1aa9521c707413b624b863c29672abff6f (patch) | |
tree | edd3b913b548050a190e830fd9ee56f3d31896d9 | |
parent | 1188f8e26544e63c188d70de83de7288afc4a290 (diff) |
make more dma pools -- all the way up to 64K. at least the scsi
SCIOCCOMMAND wants a dma'able object that big. should we handle
this another way, by handling that data in a buf?
ok krw
-rw-r--r-- | sys/kern/dma_alloc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/dma_alloc.c b/sys/kern/dma_alloc.c index aae29c151b5..e5a3c616372 100644 --- a/sys/kern/dma_alloc.c +++ b/sys/kern/dma_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma_alloc.c,v 1.3 2010/07/15 03:20:47 deraadt Exp $ */ +/* $OpenBSD: dma_alloc.c,v 1.4 2011/03/17 20:54:17 deraadt Exp $ */ /* * Copyright (c) 2010 Theo de Raadt <deraadt@openbsd.org> * @@ -21,9 +21,11 @@ static __inline int dma_alloc_index(size_t size); -#define DMA_BUCKET_OFFSET 4 -static char dmanames[14 - DMA_BUCKET_OFFSET][8]; -struct pool dmapools[14 - DMA_BUCKET_OFFSET]; +/* Create dma pools from objects sized 2^4 to 2^16 */ +#define DMA_PAGE_SHIFT 16 +#define DMA_BUCKET_OFFSET 4 +static char dmanames[DMA_PAGE_SHIFT - DMA_BUCKET_OFFSET + 1][10]; +struct pool dmapools[DMA_PAGE_SHIFT - DMA_BUCKET_OFFSET + 1]; void dma_alloc_init(void) |