summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorLauren Post <lauren.post@freescale.com>2015-09-17 14:27:36 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2015-09-18 16:09:57 -0300
commit11dc7f6d9a797afd0346fa8f44a7cf9b58b1090f (patch)
tree7326ce907899c80b1cf299d3f3e1b14f3b9ef9aa /recipes-kernel
parentdfd22e739b96a21c17c8c4f24b3f98d51b076958 (diff)
downloadmeta-fsl-arm-11dc7f6d9a797afd0346fa8f44a7cf9b58b1090f.tar.gz
linux-imx: Patches to fix gcc 5.2 build issues
Cherry picked patches from future kernel versions to fix gcc5.2 build errors Signed-off-by: Lauren Post <lauren.post@freescale.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch48
-rw-r--r--recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch59
-rw-r--r--recipes-kernel/linux/linux-imx_3.14.38.bb2
3 files changed, 109 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
new file mode 100644
index 0000000..47f13c7
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
@@ -0,0 +1,48 @@
1From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
2From: Behan Webster <behanw@converseincode.com>
3Date: Wed, 24 Sep 2014 01:06:46 +0100
4Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
5
6With compilers which follow the C99 standard (like modern versions of gcc and
7clang), "extern inline" does the wrong thing (emits code for an externally
8linkable version of the inline function). In this case using static inline
9and removing the NULL version of return_address in return_address.c does
10the right thing.
11
12Signed-off-by: Behan Webster <behanw@converseincode.com>
13Reviewed-by: Mark Charlebois <charlebm@gmail.com>
14Acked-by: Steven Rostedt <rostedt@goodmis.org>
15Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16
17diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
18index 39eb16b..bfe2a2f 100644
19--- a/arch/arm/include/asm/ftrace.h
20+++ b/arch/arm/include/asm/ftrace.h
21@@ -45,7 +45,7 @@ void *return_address(unsigned int);
22
23 #else
24
25-extern inline void *return_address(unsigned int level)
26+static inline void *return_address(unsigned int level)
27 {
28 return NULL;
29 }
30diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
31index fafedd8..f6aa84d 100644
32--- a/arch/arm/kernel/return_address.c
33+++ b/arch/arm/kernel/return_address.c
34@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
35 #warning "TODO: return_address should use unwind tables"
36 #endif
37
38-void *return_address(unsigned int level)
39-{
40- return NULL;
41-}
42-
43 #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
44
45 EXPORT_SYMBOL_GPL(return_address);
46--
47cgit v0.10.2
48
diff --git a/recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch b/recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
new file mode 100644
index 0000000..0ab03fb
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-3.14.38/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
@@ -0,0 +1,59 @@
1From a2561791169351cbf1ac5ca0c4299a0eef7eca65 Mon Sep 17 00:00:00 2001
2From: Behan Webster <behanw@converseincode.com>
3Date: Tue, 3 Sep 2013 22:27:26 -0400
4Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in
5 glue-cache.h
6
7With compilers which follow the C99 standard (like modern versions of gcc and
8clang), "extern inline" does the wrong thing (emits code for an externally
9linkable version of the inline function). "static inline" is the correct choice
10instead.
11
12Author: Behan Webster <behanw@converseincode.com>
13Signed-off-by: Behan Webster <behanw@converseincode.com>
14Reviewed-by: Mark Charlebois <charlebm@gmail.com>
15---
16 arch/arm/include/asm/glue-cache.h | 22 +++++++++++-----------
17 1 file changed, 11 insertions(+), 11 deletions(-)
18
19diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
20index c81adc0..a3c24cd 100644
21--- a/arch/arm/include/asm/glue-cache.h
22+++ b/arch/arm/include/asm/glue-cache.h
23@@ -130,22 +130,22 @@
24 #endif
25
26 #ifndef __ASSEMBLER__
27-extern inline void nop_flush_icache_all(void) { }
28-extern inline void nop_flush_kern_cache_all(void) { }
29-extern inline void nop_flush_kern_cache_louis(void) { }
30-extern inline void nop_flush_user_cache_all(void) { }
31-extern inline void nop_flush_user_cache_range(unsigned long a,
32+static inline void nop_flush_icache_all(void) { }
33+static inline void nop_flush_kern_cache_all(void) { }
34+static inline void nop_flush_kern_cache_louis(void) { }
35+static inline void nop_flush_user_cache_all(void) { }
36+static inline void nop_flush_user_cache_range(unsigned long a,
37 unsigned long b, unsigned int c) { }
38
39-extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
40-extern inline int nop_coherent_user_range(unsigned long a,
41+static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
42+static inline int nop_coherent_user_range(unsigned long a,
43 unsigned long b) { return 0; }
44-extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
45+static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
46
47-extern inline void nop_dma_flush_range(const void *a, const void *b) { }
48+static inline void nop_dma_flush_range(const void *a, const void *b) { }
49
50-extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
51-extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
52+static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
53+static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
54 #endif
55
56 #ifndef MULTI_CACHE
57--
582.1.4
59
diff --git a/recipes-kernel/linux/linux-imx_3.14.38.bb b/recipes-kernel/linux/linux-imx_3.14.38.bb
index fd816e7..886298f 100644
--- a/recipes-kernel/linux/linux-imx_3.14.38.bb
+++ b/recipes-kernel/linux/linux-imx_3.14.38.bb
@@ -36,6 +36,8 @@ SRCREV_mx7 = "e4944a51c4bb950a8f13e421eefc000a87350e23"
36 36
37SRC_URI += " \ 37SRC_URI += " \
38 file://0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch \ 38 file://0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch \
39 file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch \
40 file://0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
39" 41"
40 42
41COMPATIBLE_MACHINE = "(mx6|mx6ul|mx7)" 43COMPATIBLE_MACHINE = "(mx6|mx6ul|mx7)"