]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Create non-empty ZONE_DMA when DRAM starts above 4GB
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 18 Jul 2014 10:54:37 +0000 (11:54 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 23 Jul 2014 10:23:58 +0000 (11:23 +0100)
commit4fa95b6f87e835ab638db214e320e5048617a8f9
treedc9cc23e17eac20dd41b27b7ae13c72be230255d
parentc3a65de6eb958bf16bdf92545d8ecb9b509cb7e1
arm64: Create non-empty ZONE_DMA when DRAM starts above 4GB

ZONE_DMA is created to allow 32-bit only devices to access memory in the
absence of an IOMMU. On systems where the memory starts above 4GB, it is
expected that some devices have a DMA offset hardwired to be able to
access the bottom of the memory. Linux currently supports DT bindings
for the DMA offsets but they are not (easily) available early during
boot.

This patch tries to guess a DMA offset and assumes that ZONE_DMA
corresponds to the 32-bit mask above the start of DRAM.

Fixes: 254107ff0b (arm64: Limit the CMA buffer to 32-bit if ZONE_DMA)
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Mark Salter <msalter@redhat.com>
Tested-by: Mark Salter <msalter@redhat.com>
Tested-by: Anup Patel <anup.patel@linaro.org>
arch/arm64/mm/init.c