linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mm: Fix ARCH_LOW_ADDRESS_LIMIT when CONFIG_ZONE_DMA
@ 2023-06-03  9:06 Stefan Wahren
  2023-06-03 12:33 ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2023-06-03  9:06 UTC (permalink / raw)
  To: Russell King, Arnd Bergmann, Florian Fainelli, Robin Murphy,
	Christoph Hellwig, Nicolas Saenz Julienne
  Cc: linux-arm-kernel, Stefan Wahren

Configuring VMSPLIT_2G + LPAE on Raspberry Pi 4 leads to SWIOTLB
buffer allocation beyond platform dma_zone_size of SZ_1G, which
results in broken SD card boot.

So fix this be setting ARCH_LOW_ADDRESS_LIMIT in CONFIG_ZONE_DMA
case.

Suggested-by: Russell King <linux@armlinux.org.uk>
Fixes: e9faf9b0b07a ("ARM: add multi_v7_lpae_defconfig")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/include/asm/dma.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index c6aded1b069c..e2a1916013e7 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -12,6 +12,9 @@
 	extern phys_addr_t arm_dma_zone_size; \
 	arm_dma_zone_size && arm_dma_zone_size < (0x100000000ULL - PAGE_OFFSET) ? \
 		(PAGE_OFFSET + arm_dma_zone_size) : 0xffffffffUL; })
+
+extern phys_addr_t arm_dma_limit;
+#define ARCH_LOW_ADDRESS_LIMIT arm_dma_limit
 #endif
 
 #ifdef CONFIG_ISA_DMA_API
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-06 11:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-03  9:06 [PATCH] ARM: mm: Fix ARCH_LOW_ADDRESS_LIMIT when CONFIG_ZONE_DMA Stefan Wahren
2023-06-03 12:33 ` Arnd Bergmann
2023-06-03 12:38   ` Russell King (Oracle)
2023-06-03 12:59     ` Arnd Bergmann
2023-06-03 13:52       ` Russell King (Oracle)
     [not found]       ` <20230603135820.GA13150@wunner.de>
2023-09-06 10:31         ` Stefan Wahren
2023-09-06 11:38           ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).