Thread (53 messages) 53 messages, 6 authors, 2024-08-05

Re: [PATCH v3 6/7] Drivers: hv: vmbus: Get the IRQ number from DT

From: Roman Kisel <hidden>
Date: 2024-07-29 16:36:45
Also in: linux-acpi, linux-arch, linux-arm-kernel, linux-pci, lkml


On 7/27/2024 1:56 AM, Krzysztof Kozlowski wrote:
On 27/07/2024 00:59, Roman Kisel wrote:
quoted
@@ -2338,6 +2372,21 @@ static int vmbus_device_add(struct platform_device *pdev)
  		cur_res = &res->sibling;
  	}
  
+	/*
+	 * Hyper-V always assumes DMA cache coherency, and the DMA subsystem
+	 * might default to 'not coherent' on some architectures.
+	 * Avoid high-cost cache coherency maintenance done by the CPU.
+	 */
+#if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \
+	defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \
+	defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL)
+
+	if (!of_property_read_bool(np, "dma-coherent"))
+		pr_warn("Assuming cache coherent DMA transactions, no 'dma-coherent' node supplied\n");
Why do you need this property at all, if it is allways dma-coherent? Are
you supporting dma-noncoherent somewhere?
No support for non-coherent. Wanted to do a sanity check. Had better 
check for dma-noncoherent and warn about that I believe.
Best regards,
Krzysztof
-- 
Thank you,
Roman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help