diff options
Diffstat (limited to 'sys/arch/sparc64')
-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) |