From 3de9d6fbe4a7150a92a2f6f2f6450a4e274f062d Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 29 Aug 1999 09:03:58 +0000 Subject: Don't restrict our requests for contiguous memory to addresses >= 1MB. This fixes, at least, panics in ncr_attach() on i386's with about 5MB of memory. The restriction was a hack to leave some low memory for ISA DMA, but on i386's we now allocate pages from the top down, so all the restriction did was cause our allocations to fail when there is no free memory above 1MB. --- sys/dev/bktr/bktr_core.c | 10 ++++------ sys/dev/sf/if_sf.c | 2 +- sys/dev/sk/if_sk.c | 4 ++-- sys/dev/ti/if_ti.c | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index 46cf72e121e6..71c38fd2c311 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -7019,10 +7019,9 @@ get_bktr_mem( int unit, unsigned size ) { vm_offset_t addr = 0; - addr = vm_page_alloc_contig(size, 0x100000, 0xffffffff, 1<<24); + addr = vm_page_alloc_contig(size, 0, 0xffffffff, 1<<24); if (addr == 0) - addr = vm_page_alloc_contig(size, 0x100000, 0xffffffff, - PAGE_SIZE); + addr = vm_page_alloc_contig(size, 0, 0xffffffff, PAGE_SIZE); if (addr == 0) { printf("bktr%d: Unable to allocate %d bytes of memory.\n", unit, size); @@ -7479,10 +7478,9 @@ get_bktr_mem( int unit, unsigned size ) { vm_offset_t addr = 0; - addr = vm_page_alloc_contig(size, 0x100000, 0xffffffff, 1<<24); + addr = vm_page_alloc_contig(size, 0, 0xffffffff, 1<<24); if (addr == 0) - addr = vm_page_alloc_contig(size, 0x100000, 0xffffffff, - PAGE_SIZE); + addr = vm_page_alloc_contig(size, 0, 0xffffffff, PAGE_SIZE); if (addr == 0) { printf("bktr%d: Unable to allocate %d bytes of memory.\n", unit, size); diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index 9a79c2635291..a07b04f16760 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -1079,7 +1079,7 @@ static int sf_attach(dev) /* Allocate the descriptor queues. */ sc->sf_ldata = contigmalloc(sizeof(struct sf_list_data), M_DEVBUF, - M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); + M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->sf_ldata == NULL) { printf("sf%d: no memory for list buffers!\n", unit); diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 4038967091a8..7fa3d1c4b7cf 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -647,7 +647,7 @@ static int sk_alloc_jumbo_mem(sc_if) /* Grab a big chunk o' storage. */ sc_if->sk_cdata.sk_jumbo_buf = contigmalloc(SK_JMEM, M_DEVBUF, - M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); + M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc_if->sk_cdata.sk_jumbo_buf == NULL) { printf("sk%d: no memory for jumbo buffers!\n", sc_if->sk_unit); @@ -1088,7 +1088,7 @@ static int sk_attach_xmac(sc, port) /* Allocate the descriptor queues. */ sc_if->sk_rdata = contigmalloc(sizeof(struct sk_ring_data), M_DEVBUF, - M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); + M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc_if->sk_rdata == NULL) { printf("sk%d: no memory for list buffers!\n", sc_if->sk_unit); diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 5195324852b4..0d47987a23f3 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -603,7 +603,7 @@ static int ti_alloc_jumbo_mem(sc) /* Grab a big chunk o' storage. */ sc->ti_cdata.ti_jumbo_buf = contigmalloc(TI_JMEM, M_DEVBUF, - M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); + M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->ti_cdata.ti_jumbo_buf == NULL) { printf("ti%d: no memory for jumbo buffers!\n", sc->ti_unit); @@ -1663,7 +1663,7 @@ static int ti_attach(dev) /* Allocate the general information block and ring buffers. */ sc->ti_rdata = contigmalloc(sizeof(struct ti_ring_data), M_DEVBUF, - M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); + M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->ti_rdata == NULL) { bus_teardown_intr(dev, sc->ti_irq, sc->ti_intrhand); -- cgit v1.3