diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-06-02 01:27:40 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-06-02 01:27:40 +0000 |
commit | f40a79ff8274209551798d2f9957a8a25048af15 (patch) | |
tree | f5fd4b6da83e055312b3add8080a1ef032944bb8 /sys/arch | |
parent | 620133b6e680fcc790c6856e362e3bef1896b0f0 (diff) |
allow for dma maps larger than 64 pages; jason@ ok
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/iommu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c index 5caf6e2439c..d72f5246fb9 100644 --- a/sys/arch/sparc64/dev/iommu.c +++ b/sys/arch/sparc64/dev/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.36 2004/12/25 23:02:25 miod Exp $ */ +/* $OpenBSD: iommu.c,v 1.37 2005/06/02 01:27:39 mickey Exp $ */ /* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */ /* @@ -582,7 +582,7 @@ iommu_dvmamap_create(bus_dma_tag_t t, bus_dma_tag_t t0, struct strbuf_ctl *sb, if (ret) return (ret); - ims = iommu_iomap_create(nsegments); + ims = iommu_iomap_create((size + PAGE_MASK) >> PAGE_SHIFT); if (ims == NULL) { bus_dmamap_destroy(t0, map); @@ -1696,9 +1696,6 @@ iommu_iomap_create(int n) struct strbuf_flush *sbf; vaddr_t va; - if (n < 64) - n = 64; - ims = malloc(sizeof(*ims) + (n - 1) * sizeof(ims->ims_map.ipm_map[0]), M_DEVBUF, M_NOWAIT); if (ims == NULL) |