summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-12-20 10:45:34 +1000
committerNathan Rossi <nathan@nathanrossi.com>2016-12-21 21:51:23 +1000
commit47f17c451a534cb8a7d7360ea6f97a6c9f6be798 (patch)
tree24415d03e0c30564e605284fd98702717ccdb30a
parentf154b9854f996b4774f80348a5808d0569a1c60c (diff)
downloadmeta-xilinx-47f17c451a534cb8a7d7360ea6f97a6c9f6be798.tar.gz
linux-yocto_4.8: Resolve CONFIG_DEBUG_RODATA for Zynq
This patch resolves a previous commit (ea4ca65aaf) which only mitigated the issue caused due to CONFIG_DEBUG_RODATA for Zynq. This issue has been properly fixed in the next version of the kernel (v4.10) and this change backports the patch to the v4.8 kernel for linux-yocto(-tiny). Additionally this change removes the forced disabling of CONFIG_DEBUG_RODATA allowing for Zynq platforms to use the feature without issue. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r--recipes-kernel/linux/config/xilinx-common/bsp/xilinx/soc/zynq7.cfg3
-rw-r--r--recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend5
-rw-r--r--recipes-kernel/linux/linux-yocto_4.8.bbappend5
-rw-r--r--recipes-kernel/linux/linux/ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch39
4 files changed, 49 insertions, 3 deletions
diff --git a/recipes-kernel/linux/config/xilinx-common/bsp/xilinx/soc/zynq7.cfg b/recipes-kernel/linux/config/xilinx-common/bsp/xilinx/soc/zynq7.cfg
index b6dc0dbd..93584875 100644
--- a/recipes-kernel/linux/config/xilinx-common/bsp/xilinx/soc/zynq7.cfg
+++ b/recipes-kernel/linux/config/xilinx-common/bsp/xilinx/soc/zynq7.cfg
@@ -40,6 +40,3 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
40CONFIG_CPU_IDLE=y 40CONFIG_CPU_IDLE=y
41CONFIG_ARM_ZYNQ_CPUIDLE=y 41CONFIG_ARM_ZYNQ_CPUIDLE=y
42 42
43# DEBUG_RODATA causes issues with the lower 512KB of memory which doesn't do DMA
44# CONFIG_DEBUG_RODATA is not set
45
diff --git a/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
index 651e0d72..a345230b 100644
--- a/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
+++ b/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -2,3 +2,8 @@
2require linux-xilinx-configs.inc 2require linux-xilinx-configs.inc
3require linux-xilinx-machines.inc 3require linux-xilinx-machines.inc
4 4
5FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
6SRC_URI_append = " \
7 file://ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch \
8 "
9
diff --git a/recipes-kernel/linux/linux-yocto_4.8.bbappend b/recipes-kernel/linux/linux-yocto_4.8.bbappend
index 651e0d72..a345230b 100644
--- a/recipes-kernel/linux/linux-yocto_4.8.bbappend
+++ b/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -2,3 +2,8 @@
2require linux-xilinx-configs.inc 2require linux-xilinx-configs.inc
3require linux-xilinx-machines.inc 3require linux-xilinx-machines.inc
4 4
5FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
6SRC_URI_append = " \
7 file://ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch \
8 "
9
diff --git a/recipes-kernel/linux/linux/ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch b/recipes-kernel/linux/linux/ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch
new file mode 100644
index 00000000..9aa014b7
--- /dev/null
+++ b/recipes-kernel/linux/linux/ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch
@@ -0,0 +1,39 @@
1From 06305673edf7adc6b035f81f727bdcb18ff6fe9b Mon Sep 17 00:00:00 2001
2From: Kyle Roeschley <kyle.roeschley@ni.com>
3Date: Mon, 31 Oct 2016 11:26:17 -0500
4Subject: [PATCH] ARM: zynq: Reserve correct amount of non-DMA RAM
5
6On Zynq, we haven't been reserving the correct amount of DMA-incapable
7RAM to keep DMA away from it (per the Zynq TRM Section 4.1, it should be
8the first 512k). In older kernels, this was masked by the
9memblock_reserve call in arm_memblock_init(). Now, reserve the correct
10amount excplicitly rather than relying on swapper_pg_dir, which is an
11address and not a size anyway.
12
13Fixes: 46f5b96 ("ARM: zynq: Reserve not DMAable space in front of the
14kernel")
15
16Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
17Tested-by: Nathan Rossi <nathan@nathanrossi.com>
18Signed-off-by: Michal Simek <michal.simek@xilinx.com>
19Upstream-Status: Backport [from v4.10, 7a3cc2a7b2]
20---
21 arch/arm/mach-zynq/common.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
25index d12002cd63..ed11864831 100644
26--- a/arch/arm/mach-zynq/common.c
27+++ b/arch/arm/mach-zynq/common.c
28@@ -59,7 +59,7 @@ void __iomem *zynq_scu_base;
29 static void __init zynq_memory_init(void)
30 {
31 if (!__pa(PAGE_OFFSET))
32- memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
33+ memblock_reserve(__pa(PAGE_OFFSET), 0x80000);
34 }
35
36 static struct platform_device zynq_cpuidle_device = {
37--
382.11.0
39