Thread (52 messages) 52 messages, 4 authors, 8h ago

Re: [PATCH v8 01/23] dma-direct: return struct page from dma_direct_alloc_from_pool()

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2026-07-22 19:59:14
Also in: linux-coco, linux-iommu, linux-s390, linuxppc-dev, lkml, stable

On Tue, Jul 21, 2026 at 06:33:21PM +0300, Leon Romanovsky wrote:
Something like, but probably void* needs to be phys_addr_t:

static inline struct page *dma_phys_to_page(void *addr)
{
#ifdef CONFIG_DMA_DIRECT_REMAP
	return vmalloc_to_page(addr);
#else
	return virt_to_page(addr);
#endif
}
I don't like this, we don't know for sure the addr will be in a vmap
and this will fail if it isn't.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help