diff options
-rw-r--r-- | sys/arch/sparc64/dev/iommu.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/viommu.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c index 41d347fb823..b4d7faa1525 100644 --- a/sys/arch/sparc64/dev/iommu.c +++ b/sys/arch/sparc64/dev/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.65 2012/08/17 20:46:50 kettenis Exp $ */ +/* $OpenBSD: iommu.c,v 1.66 2013/01/15 03:14:01 kettenis Exp $ */ /* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */ /* @@ -1134,7 +1134,7 @@ iommu_dvmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa, */ seg->ds_addr = sgstart; - seg->ds_len = boundary - (sgstart & bd_mask); + seg->ds_len = boundary - (sgstart & ~bd_mask); sgstart += seg->ds_len; /* sgend stays the same */ length -= seg->ds_len; diff --git a/sys/arch/sparc64/dev/viommu.c b/sys/arch/sparc64/dev/viommu.c index 9c14a566480..3a84e3f0ff8 100644 --- a/sys/arch/sparc64/dev/viommu.c +++ b/sys/arch/sparc64/dev/viommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viommu.c,v 1.12 2011/05/18 23:36:31 ariane Exp $ */ +/* $OpenBSD: viommu.c,v 1.13 2013/01/15 03:14:01 kettenis Exp $ */ /* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */ /* @@ -666,7 +666,7 @@ viommu_dvmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa, */ seg->ds_addr = sgstart; - seg->ds_len = boundary - (sgstart & bd_mask); + seg->ds_len = boundary - (sgstart & ~bd_mask); sgstart += seg->ds_len; /* sgend stays the same */ length -= seg->ds_len; |