From 745dcfe7b6cb26cefa42c29700235957ffb48dd2 Mon Sep 17 00:00:00 2001 From: alc Date: Tue, 13 Jan 2004 20:36:03 +0000 Subject: Use contigmalloc() and contigfree() instead of vm_page_alloc_contig() and kmem_free(). Note: The FreeBSD-specific code in this file has been subsumed by the FreeBSD-specific header file, pdq_freebsd.h. That header file already specifies the use of contigmalloc() and contigfree(). Thus, the purpose of this change is to avoid having nonsensical examples of FreeBSD-specific memory allocation in our source tree. --- sys/dev/pdq/pdqvar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h index 1ac3d85..282d79e 100644 --- a/sys/dev/pdq/pdqvar.h +++ b/sys/dev/pdq/pdqvar.h @@ -96,8 +96,8 @@ enum _pdq_type_t { #define PDQ_OS_MEMALLOC(n) malloc(n, M_DEVBUF, M_NOWAIT) #define PDQ_OS_MEMFREE(p, n) free((void *) p, M_DEVBUF) #ifdef __FreeBSD__ -#define PDQ_OS_MEMALLOC_CONTIG(n) vm_page_alloc_contig(n, 0, 0xffffffff, PAGE_SIZE) -#define PDQ_OS_MEMFREE_CONTIG(p, n) kmem_free(kernel_map, (vaddr_t) p, n) +#define PDQ_OS_MEMALLOC_CONTIG(n) contigmalloc(n, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0) +#define PDQ_OS_MEMFREE_CONTIG(p, n) contigfree((void *) p, n, M_DEVBUF) #else #if !defined(PDQ_BUS_DMA) #define PDQ_OS_MEMALLOC_CONTIG(n) uvm_km_alloc(kernel_map, round_page(n)) -- cgit v1.1