if (i == map->dm_nsegs) { printf("map length: 0x%llx\n", (unsigned long long)map->dm_mapsize); printf("looking for 0x%llx/0x%llx\n", (unsigned long long)orig_offset, (unsigned long long)len); for (i = 0; i < map->dm_nsegs; i++) { printf("%d: addr 0x%llx len 0x%llx\n", i, (unsigned long long)map->dm_segs[i].ds_addr, (unsigned long long)map->dm_segs[i].ds_len); }
if (i == map->dm_nsegs)
iommu_dvmamap_sync(t, is, map, offset, len, ops)	bus_dma_tag_t t;	struct iommu_state *is;	bus_dmamap_t map;	bus_addr_t offset;	bus_size_t len;	int ops;{	bus_addr_t orig_offset = offset;	bus_size_t count;	int i, needsflush = 0;	for (i = 0; i < map->dm_nsegs; i++) {		if (offset < map->dm_segs[i].ds_len)			break;		offset -= map->dm_segs[i].ds_len;	}	if (i == map->dm_nsegs) {		printf("map length: 0x%llx\n", (unsigned long long)map->dm_mapsize);		printf("looking for 0x%llx/0x%llx\n",		    (unsigned long long)orig_offset, (unsigned long long)len);		for (i = 0; i < map->dm_nsegs; i++) {			printf("%d: addr 0x%llx len 0x%llx\n", i,			    (unsigned long long)map->dm_segs[i].ds_addr,			    (unsigned long long)map->dm_segs[i].ds_len);		}		panic("iommu_dvmamap_sync: too short %lu", offset);	}	for (; len > 0 && i < map->dm_nsegs; i++) {		count = min(map->dm_segs[i].ds_len - offset, len);		needsflush += iommu_dvmamap_sync_seg(t, is, &map->dm_segs[i],		    offset, count, ops);		len -= count;	}	if (i == map->dm_nsegs && len > 0)		panic("iommu_dvmamap_sync: leftover %lu", len);	if (needsflush)		iommu_strbuf_flush_done(is);}