diff options
author | Zhenhua Luo <zhenhua.luo@freescale.com> | 2015-10-16 13:43:15 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-04-19 15:03:20 -0300 |
commit | 9a049c4f24022320c42cd50173cb4506ec9496ee (patch) | |
tree | fdfb86b75650369e84d7c218f6f1aa6890c5b514 /recipes-kernel | |
parent | 37ebd90eababce03cfbaeef2514d76a75492a4aa (diff) | |
download | meta-freescale-9a049c4f24022320c42cd50173cb4506ec9496ee.tar.gz |
linux-qoriq: fix gcc 5.2 build issues of ls1021atwr
Cherry picked patches from future kernel versions to fix gcc5.2 build
errors
(Port from meta-fsl-arm rev: d4da62e1972d78a0ebfa51e6bad232732144e4b2)
Signed-off-by: Chunrong Guo <B40290@freescale.com>
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Diffstat (limited to 'recipes-kernel')
4 files changed, 163 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch new file mode 100644 index 00000000..47f13c71 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001 | ||
2 | From: Behan Webster <behanw@converseincode.com> | ||
3 | Date: Wed, 24 Sep 2014 01:06:46 +0100 | ||
4 | Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h | ||
5 | |||
6 | With compilers which follow the C99 standard (like modern versions of gcc and | ||
7 | clang), "extern inline" does the wrong thing (emits code for an externally | ||
8 | linkable version of the inline function). In this case using static inline | ||
9 | and removing the NULL version of return_address in return_address.c does | ||
10 | the right thing. | ||
11 | |||
12 | Signed-off-by: Behan Webster <behanw@converseincode.com> | ||
13 | Reviewed-by: Mark Charlebois <charlebm@gmail.com> | ||
14 | Acked-by: Steven Rostedt <rostedt@goodmis.org> | ||
15 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
16 | |||
17 | diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h | ||
18 | index 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 | } | ||
30 | diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c | ||
31 | index 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 | -- | ||
47 | cgit v0.10.2 | ||
48 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch b/recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch new file mode 100644 index 00000000..0ab03fb9 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From a2561791169351cbf1ac5ca0c4299a0eef7eca65 Mon Sep 17 00:00:00 2001 | ||
2 | From: Behan Webster <behanw@converseincode.com> | ||
3 | Date: Tue, 3 Sep 2013 22:27:26 -0400 | ||
4 | Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in | ||
5 | glue-cache.h | ||
6 | |||
7 | With compilers which follow the C99 standard (like modern versions of gcc and | ||
8 | clang), "extern inline" does the wrong thing (emits code for an externally | ||
9 | linkable version of the inline function). "static inline" is the correct choice | ||
10 | instead. | ||
11 | |||
12 | Author: Behan Webster <behanw@converseincode.com> | ||
13 | Signed-off-by: Behan Webster <behanw@converseincode.com> | ||
14 | Reviewed-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 | |||
19 | diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h | ||
20 | index 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 | -- | ||
58 | 2.1.4 | ||
59 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch b/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch new file mode 100644 index 00000000..6d067764 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 16b34c08f43c6e65f21a8cab536c497edb6c886e Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <B40290@freescale.com> | ||
3 | Date: Thu, 8 Oct 2015 22:48:22 -0500 | ||
4 | Subject: [PATCH] use static inline in ARM lifeboot.h | ||
5 | |||
6 | --- | ||
7 | drivers/input/mouse/lifebook.h | 2 +- | ||
8 | drivers/input/mouse/sentelic.h | 2 +- | ||
9 | drivers/input/mouse/trackpoint.h | 2 +- | ||
10 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h | ||
13 | index 4c4326c..e4c2453 100644 | ||
14 | --- a/drivers/input/mouse/lifebook.h | ||
15 | +++ b/drivers/input/mouse/lifebook.h | ||
16 | @@ -19,7 +19,7 @@ int lifebook_init(struct psmouse *psmouse); | ||
17 | inline void lifebook_module_init(void) | ||
18 | { | ||
19 | } | ||
20 | -inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) | ||
21 | +static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) | ||
22 | { | ||
23 | return -ENOSYS; | ||
24 | } | ||
25 | diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h | ||
26 | index aa697ec..9e69e94 100644 | ||
27 | --- a/drivers/input/mouse/sentelic.h | ||
28 | +++ b/drivers/input/mouse/sentelic.h | ||
29 | @@ -123,7 +123,7 @@ struct fsp_data { | ||
30 | extern int fsp_detect(struct psmouse *psmouse, bool set_properties); | ||
31 | extern int fsp_init(struct psmouse *psmouse); | ||
32 | #else | ||
33 | -inline int fsp_detect(struct psmouse *psmouse, bool set_properties) | ||
34 | +static inline int fsp_detect(struct psmouse *psmouse, bool set_properties) | ||
35 | { | ||
36 | return -ENOSYS; | ||
37 | } | ||
38 | diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h | ||
39 | index ecd0547..693735c 100644 | ||
40 | --- a/drivers/input/mouse/trackpoint.h | ||
41 | +++ b/drivers/input/mouse/trackpoint.h | ||
42 | @@ -147,7 +147,7 @@ struct trackpoint_data | ||
43 | #ifdef CONFIG_MOUSE_PS2_TRACKPOINT | ||
44 | int trackpoint_detect(struct psmouse *psmouse, bool set_properties); | ||
45 | #else | ||
46 | -inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties) | ||
47 | +static inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties) | ||
48 | { | ||
49 | return -ENOSYS; | ||
50 | } | ||
51 | -- | ||
52 | 2.3.3 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bb b/recipes-kernel/linux/linux-qoriq_3.12.bb index 57f0fc2c..1d973cde 100644 --- a/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/recipes-kernel/linux/linux-qoriq_3.12.bb | |||
@@ -3,6 +3,9 @@ require recipes-kernel/linux/linux-qoriq.inc | |||
3 | SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ | 3 | SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ |
4 | file://modify-defconfig-t1040-nr-cpus.patch \ | 4 | file://modify-defconfig-t1040-nr-cpus.patch \ |
5 | file://net-sctp-CVE-2014-0101.patch \ | 5 | file://net-sctp-CVE-2014-0101.patch \ |
6 | file://0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \ | ||
7 | file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch \ | ||
8 | file://0003-use-static-inline-in-ARM-lifeboot.h.patch \ | ||
6 | " | 9 | " |
7 | 10 | ||
8 | SRCREV = "f488de6741d5ba805b9fe813d2ddf32368d3a888" | 11 | SRCREV = "f488de6741d5ba805b9fe813d2ddf32368d3a888" |