diff options
author | alc <alc@FreeBSD.org> | 2004-01-14 06:14:35 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-01-14 06:14:35 +0000 |
commit | dcc8e5e949d93d081515e13e37f66cc463ea0c58 (patch) | |
tree | 13799b6bc36820de74b59b5696224d258f3a1f32 /sys/dev/idt | |
parent | 050a771ddf1b42721c4c7057ea386792642afcf4 (diff) | |
download | FreeBSD-src-dcc8e5e949d93d081515e13e37f66cc463ea0c58.zip FreeBSD-src-dcc8e5e949d93d081515e13e37f66cc463ea0c58.tar.gz |
Use contigmalloc() instead of vm_page_alloc_contig(). Pass M_ZERO to
contigmalloc() instead of calling bzero().
Diffstat (limited to 'sys/dev/idt')
-rw-r--r-- | sys/dev/idt/idt.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/idt/idt.c b/sys/dev/idt/idt.c index 1b0de99..0edceeb 100644 --- a/sys/dev/idt/idt.c +++ b/sys/dev/idt/idt.c @@ -671,8 +671,8 @@ nicstar_init(nicstar_reg_t * const idt) * bits) */ /* allocate space for TSQ, RSQ, SCD for VBR,ABR, UBR */ - idt->fixbuf = vm_page_alloc_contig(NICSTAR_FIXPAGES * PAGE_SIZE, - 0x100000, 0xffffffff, 0x2000); + idt->fixbuf = (vm_offset_t)contigmalloc(NICSTAR_FIXPAGES * PAGE_SIZE, + M_DEVBUF, M_NOWAIT | M_ZERO, 0x100000, 0xffffffff, 0x2000, 0); if (idt->fixbuf == 0) return; /* no space card disabled */ @@ -692,8 +692,6 @@ nicstar_init(nicstar_reg_t * const idt) /* initialize variable rate mbuf queues */ - bzero((caddr_t)idt->fixbuf, NICSTAR_FIXPAGES * PAGE_SIZE); - /* TSQ initialization */ for (p = (u_long *)idt->fixbuf; p < (u_long *)(idt->fixbuf + 0x2000);) { *p++ = 0x00000000; @@ -1376,8 +1374,8 @@ idt_mcheck_init(IDT * idt) int x; size = round_page(sizeof(struct mbuf *) * 1024); - idt->mcheck = (struct mbuf **) vm_page_alloc_contig(size, - 0x100000, 0xffffffff, 0x2000); + idt->mcheck = contigmalloc(size, M_DEVBUF, M_NOWAIT, + 0x100000, 0xffffffff, 0x2000, 0); if (idt->mcheck == NULL) return (1); @@ -1402,8 +1400,8 @@ idt_malloc_contig(int pages) { vm_offset_t retval; - retval = vm_page_alloc_contig(pages * PAGE_SIZE, - 0x100000, 0xffffffff, 0x2000); + retval = (vm_offset_t)contigmalloc(pages * PAGE_SIZE, + M_DEVBUF, M_NOWAIT, 0x100000, 0xffffffff, 0x2000, 0); #ifdef UNDEF printf("idt: vm_offset_t allocated %d pages at %x\n", pages, retval); #endif @@ -2061,8 +2059,8 @@ idt_connect_init(IDT * idt, int vpibits) pages = (sizeof(CONNECTION) * MAX_CONNECTION) + PAGE_SIZE - 1; pages /= PAGE_SIZE; - idt->connection = (CONNECTION *) vm_page_alloc_contig(pages * PAGE_SIZE, - 0x100000, 0xffffffff, 0x2000); + idt->connection = contigmalloc(pages * PAGE_SIZE, M_DEVBUF, M_NOWAIT, + 0x100000, 0xffffffff, 0x2000, 0); if (idt->connection == NULL) return (1); |