|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 5/6] xen: swiotlb: Switch to physical address mapping callbacks
On Thu, Sep 18, 2025 at 05:09:28PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
>
> Combine resource and page mappings routines to one function
> and remove .map_resource/.unmap_resource callbacks completely.
>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
> ---
> drivers/xen/swiotlb-xen.c | 63 ++++++++++++++++++---------------------
> 1 file changed, 29 insertions(+), 34 deletions(-)
<...>
> + if (attrs & DMA_ATTR_MMIO) {
> + if (unlikely(!dma_capable(dev, phys, size, false))) {
> + dev_err_once(
> + dev,
> + "DMA addr %pad+%zu overflow (mask %llx, bus
> limit %llx).\n",
> + &dma_addr, size, *dev->dma_mask,
> + dev->bus_dma_limit);
> + WARN_ON_ONCE(1);
> + return DMA_MAPPING_ERROR;
> + }
> + return phys;
> + }
This need to be fixed by the following change (dma_addr->phys):
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 48936179c940b..ccf25027bec19 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -215,8 +215,8 @@ static dma_addr_t xen_swiotlb_map_phys(struct device *dev,
phys_addr_t phys,
if (unlikely(!dma_capable(dev, phys, size, false))) {
dev_err_once(
dev,
- "DMA addr %pad+%zu overflow (mask %llx, bus
limit %llx).\n",
- &dma_addr, size, *dev->dma_mask,
+ "DMA addr %pa+%zu overflow (mask %llx, bus
limit %llx).\n",
+ &phys, size, *dev->dma_mask,
dev->bus_dma_limit);
WARN_ON_ONCE(1);
return DMA_MAPPING_ERROR;
Thanks
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |