Lines Matching refs:curSeg
1328 Segment64 curSeg = { 0, 0 }; in genIOVMSegments() local
1451 if (curSegValid && ((curSeg.fIOVMAddr + curSeg.fLength) == state->fIOVMAddr)) { in genIOVMSegments()
1454 curSeg.fLength += length; in genIOVMSegments()
1468 curSeg.fIOVMAddr = state->fIOVMAddr; in genIOVMSegments()
1469 curSeg.fLength = length; in genIOVMSegments()
1476 if ((kWalkClient & op) && (curSeg.fIOVMAddr + curSeg.fLength - 1) > maxPhys) { in genIOVMSegments()
1478 curSegValid = curSeg.fIOVMAddr = 0; in genIOVMSegments()
1481 } else if (curSeg.fIOVMAddr <= maxPhys) { in genIOVMSegments()
1484 newLength = (maxPhys + 1 - curSeg.fIOVMAddr); in genIOVMSegments()
1485 DEBG("trunc %qx, %qx-> %qx\n", curSeg.fIOVMAddr, curSeg.fLength, newLength); in genIOVMSegments()
1486 remain = curSeg.fLength - newLength; in genIOVMSegments()
1487 state->fIOVMAddr = newLength + curSeg.fIOVMAddr; in genIOVMSegments()
1489 curSeg.fLength = newLength; in genIOVMSegments()
1493 UInt64 addr = curSeg.fIOVMAddr; in genIOVMSegments()
1498 DEBG("sparse switch %qx, %qx ", addr, curSeg.fLength); in genIOVMSegments()
1513 curSeg.fIOVMAddr = ptoa_64(vm_page_get_phys_page(remap)) in genIOVMSegments()
1519 if (newLength < curSeg.fLength) { in genIOVMSegments()
1520 remain = curSeg.fLength - newLength; in genIOVMSegments()
1523 curSeg.fLength = newLength; in genIOVMSegments()
1527 DEBG("-> %qx, %qx offset %qx\n", curSeg.fIOVMAddr, curSeg.fLength, offset); in genIOVMSegments()
1535 if (curSeg.fLength > fMaxSegmentSize) { in genIOVMSegments()
1536 leftover += curSeg.fLength - fMaxSegmentSize; in genIOVMSegments()
1537 curSeg.fLength = fMaxSegmentSize; in genIOVMSegments()
1538 state->fIOVMAddr = curSeg.fLength + curSeg.fIOVMAddr; in genIOVMSegments()
1544 reduce = (curSeg.fLength & fAlignMaskLength); in genIOVMSegments()
1545 if (reduce && (curSeg.fLength > reduce)) { in genIOVMSegments()
1547 curSeg.fLength -= reduce; in genIOVMSegments()
1548 state->fIOVMAddr = curSeg.fLength + curSeg.fIOVMAddr; in genIOVMSegments()
1555 if (reduce && (curSeg.fLength > reduce)) { in genIOVMSegments()
1557 curSeg.fLength -= reduce; in genIOVMSegments()
1558 state->fIOVMAddr = curSeg.fLength + curSeg.fIOVMAddr; in genIOVMSegments()
1565 curSeg.fIOVMAddr, curSeg.fLength); in genIOVMSegments()
1577 misaligned = (0 != (mask & curSeg.fIOVMAddr)); in genIOVMSegments()
1580 misaligned |= (0 != (mask & curSeg.fLength)); in genIOVMSegments()
1584 DEBG("cursor misaligned %qx:%qx\n", curSeg.fIOVMAddr, curSeg.fLength); in genIOVMSegments()
1586 curSegValid = curSeg.fIOVMAddr = 0; in genIOVMSegments()
1593 curSeg.fLength -= (offset - memLength); in genIOVMSegments()
1606 IOLog("DMA[%p] outseg 0x%qx, 0x%qx\n", this, curSeg.fIOVMAddr, curSeg.fLength); in genIOVMSegments()
1609 ret = (*outSegFunc)(reference, this, curSeg, segmentsP, segIndex++); in genIOVMSegments()
1610 curSegValid = curSeg.fIOVMAddr = 0; in genIOVMSegments()
1620 IOLog("DMA[%p] outseg 0x%qx, 0x%qx\n", this, curSeg.fIOVMAddr, curSeg.fLength); in genIOVMSegments()
1623 ret = (*outSegFunc)(reference, this, curSeg, segmentsP, segIndex++); in genIOVMSegments()