summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-01-13 20:36:03 +0000
committeralc <alc@FreeBSD.org>2004-01-13 20:36:03 +0000
commit745dcfe7b6cb26cefa42c29700235957ffb48dd2 (patch)
tree0c010159c3255bfd7a72261d7a4c0c9f785498a6
parentd68207fc54b7252cd54135a2e85f7049ff32ba04 (diff)
downloadFreeBSD-src-745dcfe7b6cb26cefa42c29700235957ffb48dd2.zip
FreeBSD-src-745dcfe7b6cb26cefa42c29700235957ffb48dd2.tar.gz
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.
-rw-r--r--sys/dev/pdq/pdqvar.h4
1 files 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))
OpenPOWER on IntegriCloud