b6c1b429eba2ef6a05a78158e85b52a747df6e4a
[openwrt/staging/pepe2k.git] /
1 From 953f00c3ceb5879d8f0d2f2683d70ff93efedad4 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 21 Feb 2024 14:16:21 +0000
4 Subject: [PATCH 0908/1085] arm64/Kconfig: Don't set
5 DMA_BOUNCE_UNALIGNED_KMALLOC
6
7 If enabled, DMA_BOUNCE_UNALIGNED_KMALLOC causes the swiotlb buffers
8 (64MB, by default) to be allocated, even on systems where the DMA
9 controller can reach all of RAM. This is a huge amount of RAM to
10 waste on a device with only 512MB to start with, such as the Zero 2 W.
11
12 See: https://github.com/raspberrypi/linux/issues/5975
13
14 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
15 ---
16 arch/arm64/Kconfig | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19 --- a/arch/arm64/Kconfig
20 +++ b/arch/arm64/Kconfig
21 @@ -122,7 +122,8 @@ config ARM64
22 select CRC32
23 select DCACHE_WORD_ACCESS
24 select DYNAMIC_FTRACE if FUNCTION_TRACER
25 - select DMA_BOUNCE_UNALIGNED_KMALLOC
26 + # Disable this to save 64MB when DMA controllers can reach all of RAM
27 + # select DMA_BOUNCE_UNALIGNED_KMALLOC
28 select DMA_DIRECT_REMAP
29 select EDAC_SUPPORT
30 select FRAME_POINTER