diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-12-20 10:45:34 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-12-21 21:51:23 +1000 |
commit | 47f17c451a534cb8a7d7360ea6f97a6c9f6be798 (patch) | |
tree | 24415d03e0c30564e605284fd98702717ccdb30a | |
parent | f154b9854f996b4774f80348a5808d0569a1c60c (diff) | |
download | meta-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>
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 | |||
40 | CONFIG_CPU_IDLE=y | 40 | CONFIG_CPU_IDLE=y |
41 | CONFIG_ARM_ZYNQ_CPUIDLE=y | 41 | CONFIG_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 @@ | |||
2 | require linux-xilinx-configs.inc | 2 | require linux-xilinx-configs.inc |
3 | require linux-xilinx-machines.inc | 3 | require linux-xilinx-machines.inc |
4 | 4 | ||
5 | FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" | ||
6 | SRC_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 @@ | |||
2 | require linux-xilinx-configs.inc | 2 | require linux-xilinx-configs.inc |
3 | require linux-xilinx-machines.inc | 3 | require linux-xilinx-machines.inc |
4 | 4 | ||
5 | FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" | ||
6 | SRC_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 @@ | |||
1 | From 06305673edf7adc6b035f81f727bdcb18ff6fe9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Kyle Roeschley <kyle.roeschley@ni.com> | ||
3 | Date: Mon, 31 Oct 2016 11:26:17 -0500 | ||
4 | Subject: [PATCH] ARM: zynq: Reserve correct amount of non-DMA RAM | ||
5 | |||
6 | On Zynq, we haven't been reserving the correct amount of DMA-incapable | ||
7 | RAM to keep DMA away from it (per the Zynq TRM Section 4.1, it should be | ||
8 | the first 512k). In older kernels, this was masked by the | ||
9 | memblock_reserve call in arm_memblock_init(). Now, reserve the correct | ||
10 | amount excplicitly rather than relying on swapper_pg_dir, which is an | ||
11 | address and not a size anyway. | ||
12 | |||
13 | Fixes: 46f5b96 ("ARM: zynq: Reserve not DMAable space in front of the | ||
14 | kernel") | ||
15 | |||
16 | Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com> | ||
17 | Tested-by: Nathan Rossi <nathan@nathanrossi.com> | ||
18 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
19 | Upstream-Status: Backport [from v4.10, 7a3cc2a7b2] | ||
20 | --- | ||
21 | arch/arm/mach-zynq/common.c | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c | ||
25 | index 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 | -- | ||
38 | 2.11.0 | ||
39 | |||