aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-12-20 10:45:34 +1000
committerNathan Rossi <nathan@nathanrossi.com>2016-12-27 22:27:57 +1000
commit180a25803b76406022cf317a2443bef832f2b174 (patch)
treeaf8db2d915723a68120a7149bb884a79f5608b9b
parent4885a05b6e78f8dbc99cb341367e3409829d72dd (diff)
downloadmeta-xilinx-180a25803b76406022cf317a2443bef832f2b174.tar.gz
meta-xilinx-180a25803b76406022cf317a2443bef832f2b174.tar.bz2
meta-xilinx-180a25803b76406022cf317a2443bef832f2b174.zip
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
CONFIG_CPU_IDLE=y
CONFIG_ARM_ZYNQ_CPUIDLE=y
-# DEBUG_RODATA causes issues with the lower 512KB of memory which doesn't do DMA
-# CONFIG_DEBUG_RODATA is not set
-
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 @@
require linux-xilinx-configs.inc
require linux-xilinx-machines.inc
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
+SRC_URI_append = " \
+ file://ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch \
+ "
+
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 @@
require linux-xilinx-configs.inc
require linux-xilinx-machines.inc
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
+SRC_URI_append = " \
+ file://ARM-zynq-Reserve-correct-amount-of-non-DMA-RAM.patch \
+ "
+
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 @@
+From 06305673edf7adc6b035f81f727bdcb18ff6fe9b Mon Sep 17 00:00:00 2001
+From: Kyle Roeschley <kyle.roeschley@ni.com>
+Date: Mon, 31 Oct 2016 11:26:17 -0500
+Subject: [PATCH] ARM: zynq: Reserve correct amount of non-DMA RAM
+
+On Zynq, we haven't been reserving the correct amount of DMA-incapable
+RAM to keep DMA away from it (per the Zynq TRM Section 4.1, it should be
+the first 512k). In older kernels, this was masked by the
+memblock_reserve call in arm_memblock_init(). Now, reserve the correct
+amount excplicitly rather than relying on swapper_pg_dir, which is an
+address and not a size anyway.
+
+Fixes: 46f5b96 ("ARM: zynq: Reserve not DMAable space in front of the
+kernel")
+
+Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
+Tested-by: Nathan Rossi <nathan@nathanrossi.com>
+Signed-off-by: Michal Simek <michal.simek@xilinx.com>
+Upstream-Status: Backport [from v4.10, 7a3cc2a7b2]
+---
+ arch/arm/mach-zynq/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
+index d12002cd63..ed11864831 100644
+--- a/arch/arm/mach-zynq/common.c
++++ b/arch/arm/mach-zynq/common.c
+@@ -59,7 +59,7 @@ void __iomem *zynq_scu_base;
+ static void __init zynq_memory_init(void)
+ {
+ if (!__pa(PAGE_OFFSET))
+- memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
++ memblock_reserve(__pa(PAGE_OFFSET), 0x80000);
+ }
+
+ static struct platform_device zynq_cpuidle_device = {
+--
+2.11.0
+