From: Santosh Shilimkar Date: Mon, 2 Dec 2013 19:29:12 +0000 (+0100) Subject: ARM: 7908/1: mm: Fix the arm_dma_limit calculation X-Git-Tag: v4.9.8~7158^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=787b0d5c1ca7ff24feb6f92e4c7f4410ee7d81a8;p=platform%2Fkernel%2Flinux-rpi3.git ARM: 7908/1: mm: Fix the arm_dma_limit calculation Current code is using PHYS_OFFSET to calculate the arm_dma_limit which will lead to wrong calculations in cases where PHYS_OFFSET is updated runtime. So fix the code by using __pv_phys_offset instead of PHYS_OFFSET. Cc: Catalin Marinas Cc: Nicolas Pitre Signed-off-by: Santosh Shilimkar Signed-off-by: Russell King --- diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 3e8f106e..1f7b19a 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -229,7 +229,7 @@ void __init setup_dma_zone(const struct machine_desc *mdesc) #ifdef CONFIG_ZONE_DMA if (mdesc->dma_zone_size) { arm_dma_zone_size = mdesc->dma_zone_size; - arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1; + arm_dma_limit = __pv_phys_offset + arm_dma_zone_size - 1; } else arm_dma_limit = 0xffffffff; arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT;