linux/arch
Catalin Marinas 3be9b84689 arm64: support DMA zone above 4GB
Commit 791ab8b2e3 ("arm64: Ignore any DMA offsets in the
max_zone_phys() calculation") made arm64 DMA/DMA32 zones span the entire
RAM when RAM starts above 32-bits. This breaks hardware with DMA area
that start above 32-bits. But the commit log says that "we haven't
noticed any such hardware". It turns out that such hardware does exist.

One such platform has RAM starting at 32GB with an internal bus that has
the following DMA limits:

  #address-cells = <2>;
  #size-cells = <2>;
  dma-ranges = <0x00 0xc0000000 0x08 0x00000000 0x00 0x40000000>;

That is, devices under this bus see 1GB of DMA range between 3GB-4GB in
their address space. This range is mapped to CPU memory at 32GB-33GB.
With current code DMA allocations for devices under this bus are not
limited to DMA area, leading to run-time allocation failure.

This commit reinstates DMA zone at the bottom of RAM. The result is DMA
zone that properly reflects the hardware constraints as follows:

[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000800000000-0x000000083fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000840000000-0x0000000bffffffff]

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[baruch: split off the original patch]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2024-08-22 06:18:11 +02:00
..
alpha alpha: fix ioread64be()/iowrite64be() helpers 2024-08-01 15:48:03 +02:00
arc
arm ARM: riscpc: ecard: Fix the build 2024-08-13 11:34:52 +02:00
arm64 arm64: support DMA zone above 4GB 2024-08-22 06:18:11 +02:00
csky
hexagon
loongarch LoongArch: KVM: Remove undefined a6 argument comment for kvm_hypercall() 2024-08-07 17:37:14 +08:00
m68k Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
microblaze
mips mips: sgi-ip22: Fix the build 2024-08-13 11:34:55 +02:00
nios2 Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
openrisc
parisc parisc: fix a possible DMA corruption 2024-07-29 16:19:07 +02:00
powerpc dma-mapping: replace zone_dma_bits by zone_dma_limit 2024-08-22 06:18:00 +02:00
riscv Merge patch series "RISC-V: hwprobe: Misaligned scalar perf fix and rename" 2024-08-15 13:12:21 -07:00
s390 dma-mapping: replace zone_dma_bits by zone_dma_limit 2024-08-22 06:18:00 +02:00
sh sh updates for v6.11 2024-07-23 11:57:52 -07:00
sparc Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
um minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
x86 KVM: x86: Disallow read-only memslots for SEV-ES and SEV-SNP (and TDX) 2024-08-14 12:28:24 -04:00
xtensa
.gitignore
Kconfig