kernel: bump to 4.4.39
[openwrt/openwrt.git] / target / linux / layerscape / patches-4.4 / 3009-armv8-aarch32-Allow-RAM-to-be-mapped-for-LayerScape-.patch
1 From ef25bf644b7de83849a2f804c84bb54cd2f1255f Mon Sep 17 00:00:00 2001
2 From: Alison Wang <b18965@freescale.com>
3 Date: Mon, 11 Apr 2016 17:25:40 +0800
4 Subject: [PATCH 09/70] armv8: aarch32: Allow RAM to be mapped for LayerScape
5 SoC
6
7 This patch is based on Kernel v4.1.8. As in v4.1.8, memremap() is not
8 introduced and the WARN() check is not relaxed to allow MT_MEMORY_RW
9 mappings of pfn_valid() pages, this patch is needed as a workaround for
10 spin-table address which locates in RAM to be mapped.
11
12 For the latest kernel in upstream, this patch is not needed anymore.
13
14 Signed-off-by: Alison Wang <alison.wang@nxp.com>
15 ---
16 arch/arm/mm/ioremap.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19 --- a/arch/arm/mm/ioremap.c
20 +++ b/arch/arm/mm/ioremap.c
21 @@ -298,8 +298,10 @@ static void __iomem * __arm_ioremap_pfn_
22 /*
23 * Don't allow RAM to be mapped - this causes problems with ARMv6+
24 */
25 +#ifndef CONFIG_ARCH_LAYERSCAPE
26 if (WARN_ON(pfn_valid(pfn)))
27 return NULL;
28 +#endif
29
30 area = get_vm_area_caller(size, VM_IOREMAP, caller);
31 if (!area)