Fix loading memory allocated with bus_dmamem_alloc(9). The old could would
authorkettenis <kettenis@openbsd.org>
Fri, 9 Jan 2015 14:23:25 +0000 (14:23 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 9 Jan 2015 14:23:25 +0000 (14:23 +0000)
commit144d17a9a0e836a63c7b0e29d5a9e01dc1cd03a0
treed8f5ebe326d102cb53c97010ad302ee07aa3d90f
parent3d99c00ee54c2a3efcdbd4c1eccd11bb8395adc8
Fix loading memory allocated with bus_dmamem_alloc(9).  The old could would
always load all allocated pages instead of the size specified in the
bus_dmamap_load_raw(9) call.  Also fixes the corner case where a specified
boundary is less than the page size, which would always create multiple
segments, even if the specified size was smaller than the boundary.

Fixes xhci(4) on sparc64.
sys/arch/sparc64/dev/iommu.c
sys/arch/sparc64/dev/viommu.c