On Tue, Jun 11, 2024, at 13:37, Stefan Wahren wrote: > Am 11.06.24 um 13:08 schrieb Arnd Bergmann: >> On Tue, Jun 11, 2024, at 12:47, Stefan Wahren wrote: > > if (len == 0) > pr_warn_once("%s: sg_dma_len() == 0\n", __func__); > else if (i && (i != (dma_buffers - 1)) && (len & ~PAGE_MASK)) > pr_warn_once("%s: following block not page aligned\n", > __func__); > else if (i && (addr & ~PAGE_MASK)) { > pr_warn_once("%s: block %u, DMA address %pad doesn't align > with PAGE_MASK 0x%lx\n", __func__, i, &addr, PAGE_MASK); > pr_warn_once("sg_dma_is_swiotlb: %d, dma_flags: %x\n", > sg_dma_is_swiotlb(sg), sg->dma_flags); > pr_warn_once("type = %s\n", (type == PAGELIST_WRITE) ? > "PAGELIST_WRITE" : "PAGELIST_READ"); > if (buf) > pr_warn_once("buf = %p, count = %zu\n", buf, count); > else > pr_warn_once("ubuf = %p, count = %zu\n", ubuf, count); > } > > Output: > > [ 66.184030] create_pagelist: block 1, DMA address 0x00000000f5fc7800 > doesn't align with PAGE_MASK 0xfffffffffffff000 > [ 66.184056] sg_dma_is_swiotlb: 0, dma_flags: 0 > [ 66.184063] type = PAGELIST_READ > [ 66.184066] ubuf = 00000000266a70a7, count = 0