From 5b7464e80f28b504b231fa6c2e190b611c1eea5c Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Mon, 6 Dec 1999 07:29:57 +0000 Subject: Make this work for uvm. --- sys/dev/pci/aeon.c | 7 ++++++- sys/dev/pci/hifn7751.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/aeon.c b/sys/dev/pci/aeon.c index 93319eedb17..3d7c5814f97 100644 --- a/sys/dev/pci/aeon.c +++ b/sys/dev/pci/aeon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aeon.c,v 1.3 1999/02/24 06:09:45 deraadt Exp $ */ +/* $OpenBSD: aeon.c,v 1.4 1999/12/06 07:29:56 art Exp $ */ /* * Invertex AEON driver @@ -150,8 +150,13 @@ aeon_attach(parent, self, aux) sc->sc_st1 = pa->pa_memt; printf(" mem %x %x", sc->sc_sh0, sc->sc_sh1); +#if defined(UVM) + sc->sc_dma = (struct aeon_dma *)uvm_pagealloc_contig(sizeof(*sc->sc_dma), + 0x100000, 0xffffffff, PAGE_SIZE); +#else sc->sc_dma = (struct aeon_dma *)vm_page_alloc_contig(sizeof(*sc->sc_dma), 0x100000, 0xffffffff, PAGE_SIZE); +#endif bzero(sc->sc_dma, sizeof(*sc->sc_dma)); aeon_reset_board(sc); diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c index 13bc79851cb..30ed0a94f7e 100644 --- a/sys/dev/pci/hifn7751.c +++ b/sys/dev/pci/hifn7751.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hifn7751.c,v 1.3 1999/02/24 06:09:45 deraadt Exp $ */ +/* $OpenBSD: hifn7751.c,v 1.4 1999/12/06 07:29:56 art Exp $ */ /* * Invertex AEON driver @@ -150,8 +150,13 @@ aeon_attach(parent, self, aux) sc->sc_st1 = pa->pa_memt; printf(" mem %x %x", sc->sc_sh0, sc->sc_sh1); +#if defined(UVM) + sc->sc_dma = (struct aeon_dma *)uvm_pagealloc_contig(sizeof(*sc->sc_dma), + 0x100000, 0xffffffff, PAGE_SIZE); +#else sc->sc_dma = (struct aeon_dma *)vm_page_alloc_contig(sizeof(*sc->sc_dma), 0x100000, 0xffffffff, PAGE_SIZE); +#endif bzero(sc->sc_dma, sizeof(*sc->sc_dma)); aeon_reset_board(sc); -- cgit v1.2.3