Skip to contentSkip to conversation

dmaengine: zynqmp_dma: Sync DMA and coherent masks

PATCH Applied Harini Katakam 3 participants 5 messages Mar 16, 2023 – Mar 31, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: zynqmp_dma: Sync DMA and coherent masks

Align ZDMA DMA as well as coherent memory masks to 44 bit. This is required when using >32 bit memory regions.

---
 drivers/dma/xilinx/zynqmp_dma.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/dma/xilinx/zynqmp_dma.c +5 -1
index 3f4ee3954384..34d7d20ffc09 100644
@@ -1051,7 +1051,11 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
 	zdev->dev = &pdev->dev;
 	INIT_LIST_HEAD(&zdev->common.channels);
 
-	dma_set_mask(&pdev->dev, DMA_BIT_MASK(44));
+	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
+	if (ret) {
+		dev_err(&pdev->dev, "DMA not available for address range\n");
+		return ret;
+	}
 	dma_cap_set(DMA_MEMCPY, zdev->common.cap_mask);
 
 	p = &zdev->common;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 2 lines · Harini Katakam

Align ZDMA DMA as well as coherent memory masks to 44 bit. This is required when using >32 bit memory regions.

It doesn't look like description aligned with the change below.
You are using 44 bit already and the patch itself just checking return value from that function.

M

#2 lore raw

Hi Michal,

Quoted 13 lines

-----Original Message-----
From: Simek, Michal <[email protected]>
Sent: Tuesday, March 21, 2023 8:15 PM
To: Katakam, Harini <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; Pandey, Radhey Shyam <[email protected]>
Subject: Re: [PATCH] dmaengine: zynqmp_dma: Sync DMA and coherent masks

Quoted 7 lines
Quoted 2 lines · Harini Katakam

Align ZDMA DMA as well as coherent memory masks to 44 bit. This is required when using >32 bit memory regions.

It doesn't look like description aligned with the change below. You are using 44 bit already and the patch itself just checking return value from that function.

Current code sets dma_set_mask; I changed it to dma_set_mask_and_coherent

Regards,
Harini

Quoted 2 lines

M

maintainer Acked-by
#3 lore raw
Quoted 16 lines · Harini

Hi Michal,

Quoted 14 lines

-----Original Message-----
From: Simek, Michal <[email protected]>
Sent: Tuesday, March 21, 2023 8:15 PM
To: Katakam, Harini <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; Pandey, Radhey Shyam <[email protected]>
Subject: Re: [PATCH] dmaengine: zynqmp_dma: Sync DMA and coherent masks

On 3/16/23 10:33, Harini Katakam wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Align ZDMA DMA as well as coherent memory masks to 44 bit. This is required when using >32 bit memory regions.

It doesn't look like description aligned with the change below. You are using 44 bit already and the patch itself just checking return value from that function.

Current code sets dma_set_mask; I changed it to dma_set_mask_and_coherent

Ah ok. Then

Thanks,
Michal

maintainer Applied
#4 lore raw
In reply to Harini Katakam
Quoted 2 lines · Harini Katakam

Align ZDMA DMA as well as coherent memory masks to 44 bit. This is required when using >32 bit memory regions.

Applied, thanks

Signature · 1 line
~Vinod