If we're using a PIPT L2 cache, only merge 2 segments if both the virtual

and the physical addreses are contiguous.

Submitted by:	Thomas Skibo <ThomasSkibo@sbcglobal.net>
This commit is contained in:
Olivier Houchard 2013-03-04 10:41:54 +00:00
parent bdb9fa5c87
commit 8fd49af627

View File

@ -1007,6 +1007,9 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
} else {
sl = &map->slist[map->sync_count - 1];
if (map->sync_count == 0 ||
#ifdef ARM_L2_PIPT
curaddr != sl->busaddr + sl->datacount ||
#endif
vaddr != sl->vaddr + sl->datacount) {
if (++map->sync_count > dmat->nsegments)
goto cleanup;