summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2019-11-19 20:02:51 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2019-11-19 19:38:07 -0300
commitdfc6944b1c5ffe2cb1e43483ce56c343e9a06fae (patch)
tree8722dbf5386cb66384900ec03b77908c6deb25dc
parent1db79a1dbe1f6835986196b4570ee70eccd35a64 (diff)
downloadmeta-freescale-dfc6944b1c5ffe2cb1e43483ce56c343e9a06fae.tar.gz
linux-fslc-imx_4.9-1.0.x: replace patchset to the one from stable
Replace the patchset, which resolves kernel compilation issues when gcc9 is used. Original patchset introduced here was the initial commit that solved the issue, while this patchset is cherry-picked from stable tree branch linux-4.9.y and included included in v4.9.188 upwards. Once linux-fslc-imx would get updated past v4.9.188 - this patchset should be removed from the layer. Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch47
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/0001-compiler-attributes-add-support-for-copy-gcc-9.patch132
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-__init-__exit-attrs-to-i.patch84
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-init-exit-attrs-to-.patch135
-rw-r--r--recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb4
5 files changed, 133 insertions, 269 deletions
diff --git a/recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch b/recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch
new file mode 100644
index 00000000..aef97ea6
--- /dev/null
+++ b/recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch
@@ -0,0 +1,47 @@
1From fe5844365ec6c4d61838f289926f4d55da94d2fb Mon Sep 17 00:00:00 2001
2From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
3Date: Fri, 2 Aug 2019 12:37:56 +0200
4Subject: [PATCH 1/2] Backport minimal compiler_attributes.h to support GCC 9
5
6This adds support for __copy to v4.9.y so that we can use it in
7init/exit_module to avoid -Werror=missing-attributes errors on GCC 9.
8
9Link: https://lore.kernel.org/lkml/259986242.BvXPX32bHu@devpool35/
10Cc: <stable@vger.kernel.org>
11Suggested-by: Rolf Eike Beer <eb@emlix.com>
12Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14---
15 include/linux/compiler.h | 16 ++++++++++++++++
16 1 file changed, 16 insertions(+)
17
18diff --git a/include/linux/compiler.h b/include/linux/compiler.h
19index 3050de0dac96..0020ee1cab37 100644
20--- a/include/linux/compiler.h
21+++ b/include/linux/compiler.h
22@@ -54,6 +54,22 @@ extern void __chk_io_ptr(const volatile void __iomem *);
23
24 #ifdef __KERNEL__
25
26+/*
27+ * Minimal backport of compiler_attributes.h to add support for __copy
28+ * to v4.9.y so that we can use it in init/exit_module to avoid
29+ * -Werror=missing-attributes errors on GCC 9.
30+ */
31+#ifndef __has_attribute
32+# define __has_attribute(x) __GCC4_has_attribute_##x
33+# define __GCC4_has_attribute___copy__ 0
34+#endif
35+
36+#if __has_attribute(__copy__)
37+# define __copy(symbol) __attribute__((__copy__(symbol)))
38+#else
39+# define __copy(symbol)
40+#endif
41+
42 #ifdef __GNUC__
43 #include <linux/compiler-gcc.h>
44 #endif
45--
462.17.1
47
diff --git a/recipes-kernel/linux/linux-fslc-imx/0001-compiler-attributes-add-support-for-copy-gcc-9.patch b/recipes-kernel/linux/linux-fslc-imx/0001-compiler-attributes-add-support-for-copy-gcc-9.patch
deleted file mode 100644
index a234c0c3..00000000
--- a/recipes-kernel/linux/linux-fslc-imx/0001-compiler-attributes-add-support-for-copy-gcc-9.patch
+++ /dev/null
@@ -1,132 +0,0 @@
1From mboxrd@z Thu Jan 1 00:00:00 1970
2Return-Path: <SRS0=AQQw=UD=vger.kernel.org=stable-owner@kernel.org>
3X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
4 aws-us-west-2-korg-lkml-1.web.codeaurora.org
5X-Spam-Level:
6X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,
7 DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,
8 SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT
9 autolearn=ham autolearn_force=no version=3.4.0
10Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
11 by smtp.lore.kernel.org (Postfix) with ESMTP id 354C8C282CE
12 for <stable@archiver.kernel.org>; Tue, 4 Jun 2019 13:25:01 +0000 (UTC)
13Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
14 by mail.kernel.org (Postfix) with ESMTP id 0D01C24291
15 for <stable@archiver.kernel.org>; Tue, 4 Jun 2019 13:25:01 +0000 (UTC)
16Authentication-Results: mail.kernel.org;
17 dkim=pass (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="HG5nfXC5"
18Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
19 id S1727392AbfFDNZA (ORCPT <rfc822;stable@archiver.kernel.org>);
20 Tue, 4 Jun 2019 09:25:00 -0400
21Received: from mail.kmu-office.ch ([178.209.48.109]:48336 "EHLO
22 mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
23 with ESMTP id S1727340AbfFDNZA (ORCPT
24 <rfc822;stable@vger.kernel.org>); Tue, 4 Jun 2019 09:25:00 -0400
25Received: from trochilidae.toradex.int (unknown [46.140.72.82])
26 by mail.kmu-office.ch (Postfix) with ESMTPSA id 8BE845C2138;
27 Tue, 4 Jun 2019 15:24:55 +0200 (CEST)
28DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim;
29 t=1559654695;
30 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
31 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
32 content-transfer-encoding:content-transfer-encoding:in-reply-to:
33 references; bh=2lQNwDLO9/HfsHTvSmLn5csGG1S09yt0LuSYqXeE0y0=;
34 b=HG5nfXC5qPZvu4E7tM2iveXY8wtjralMObB8KMvD1S6NWkkOwkeLjXonm495Hz+G+geOig
35 NlbMrAg5b6wYCzvMgqUeSBmGkYCjB/7IFlotEiTcUNmOCorD2pTasqUOcpObuc6WqBkEjM
36 3seyrLJVs51y9A3weXf9CMO3OMOXwRA=
37From: Stefan Agner <stefan@agner.ch>
38To: gregkh@linuxfoundation.org
39Cc: stable@vger.kernel.org,
40 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
41 Martin Sebor <msebor@gcc.gnu.org>,
42 Nick Desaulniers <ndesaulniers@google.com>,
43 Stefan Agner <stefan@agner.ch>
44Subject: [PATCH BACKPORT 4.19 1/2] Compiler Attributes: add support for __copy (gcc >= 9)
45Date: Tue, 4 Jun 2019 15:24:40 +0200
46Message-Id: <20190604132441.15383-1-stefan@agner.ch>
47X-Mailer: git-send-email 2.21.0
48MIME-Version: 1.0
49Content-Type: text/plain; charset=UTF-8
50Content-Transfer-Encoding: 8bit
51Sender: stable-owner@vger.kernel.org
52Precedence: bulk
53List-ID: <stable.vger.kernel.org>
54X-Mailing-List: stable@vger.kernel.org
55Archived-At: <https://lore.kernel.org/stable/20190604132441.15383-1-stefan@agner.ch/>
56List-Archive: <https://lore.kernel.org/stable/>
57List-Post: <mailto:stable@vger.kernel.org>
58
59From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
60
61[ Upstream commit c0d9782f5b6d7157635ae2fd782a4b27d55a6013 ]
62
63>From the GCC manual:
64
65 copy
66 copy(function)
67
68 The copy attribute applies the set of attributes with which function
69 has been declared to the declaration of the function to which
70 the attribute is applied. The attribute is designed for libraries
71 that define aliases or function resolvers that are expected
72 to specify the same set of attributes as their targets. The copy
73 attribute can be used with functions, variables, or types. However,
74 the kind of symbol to which the attribute is applied (either
75 function or variable) must match the kind of symbol to which
76 the argument refers. The copy attribute copies only syntactic and
77 semantic attributes but not attributes that affect a symbol’s
78 linkage or visibility such as alias, visibility, or weak.
79 The deprecated attribute is also not copied.
80
81 https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
82
83The upcoming GCC 9 release extends the -Wmissing-attributes warnings
84(enabled by -Wall) to C and aliases: it warns when particular function
85attributes are missing in the aliases but not in their target, e.g.:
86
87 void __cold f(void) {}
88 void __alias("f") g(void);
89
90diagnoses:
91
92 warning: 'g' specifies less restrictive attribute than
93 its target 'f': 'cold' [-Wmissing-attributes]
94
95Using __copy(f) we can copy the __cold attribute from f to g:
96
97 void __cold f(void) {}
98 void __copy(f) __alias("f") g(void);
99
100This attribute is most useful to deal with situations where an alias
101is declared but we don't know the exact attributes the target has.
102
103For instance, in the kernel, the widely used module_init/exit macros
104define the init/cleanup_module aliases, but those cannot be marked
105always as __init/__exit since some modules do not have their
106functions marked as such.
107
108Cc: <stable@vger.kernel.org> # 4.14+
109Suggested-by: Martin Sebor <msebor@gcc.gnu.org>
110Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
111Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
112Signed-off-by: Stefan Agner <stefan@agner.ch>
113---
114 include/linux/compiler-gcc.h | 4 ++++
115 include/linux/compiler_types.h | 4 ++++
116 2 files changed, 8 insertions(+)
117
118Index: git/include/linux/compiler-gcc.h
119===================================================================
120--- git.orig/include/linux/compiler-gcc.h
121+++ git/include/linux/compiler-gcc.h
122@@ -282,6 +282,10 @@
123
124 #endif /* gcc version >= 40000 specific checks */
125
126+#if GCC_VERSION >= 90100
127+#define __copy(symbol) __attribute__((__copy__(symbol)))
128+#endif
129+
130 #if !defined(__noclone)
131 #define __noclone /* not needed */
132 #endif
diff --git a/recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-__init-__exit-attrs-to-i.patch b/recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-__init-__exit-attrs-to-i.patch
new file mode 100644
index 00000000..8472a151
--- /dev/null
+++ b/recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-__init-__exit-attrs-to-i.patch
@@ -0,0 +1,84 @@
1From 2d75d1869fb3d9d7d47ae7c0ac6fab4e7dd9487e Mon Sep 17 00:00:00 2001
2From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
3Date: Fri, 2 Aug 2019 12:37:57 +0200
4Subject: [PATCH 2/2] include/linux/module.h: copy __init/__exit attrs to
5 init/cleanup_module
6
7commit a6e60d84989fa0e91db7f236eda40453b0e44afa upstream.
8
9The upcoming GCC 9 release extends the -Wmissing-attributes warnings
10(enabled by -Wall) to C and aliases: it warns when particular function
11attributes are missing in the aliases but not in their target.
12
13In particular, it triggers for all the init/cleanup_module
14aliases in the kernel (defined by the module_init/exit macros),
15ending up being very noisy.
16
17These aliases point to the __init/__exit functions of a module,
18which are defined as __cold (among other attributes). However,
19the aliases themselves do not have the __cold attribute.
20
21Since the compiler behaves differently when compiling a __cold
22function as well as when compiling paths leading to calls
23to __cold functions, the warning is trying to point out
24the possibly-forgotten attribute in the alias.
25
26In order to keep the warning enabled, we decided to silence
27this case. Ideally, we would mark the aliases directly
28as __init/__exit. However, there are currently around 132 modules
29in the kernel which are missing __init/__exit in their init/cleanup
30functions (either because they are missing, or for other reasons,
31e.g. the functions being called from somewhere else); and
32a section mismatch is a hard error.
33
34A conservative alternative was to mark the aliases as __cold only.
35However, since we would like to eventually enforce __init/__exit
36to be always marked, we chose to use the new __copy function
37attribute (introduced by GCC 9 as well to deal with this).
38With it, we copy the attributes used by the target functions
39into the aliases. This way, functions that were not marked
40as __init/__exit won't have their aliases marked either,
41and therefore there won't be a section mismatch.
42
43Note that the warning would go away marking either the extern
44declaration, the definition, or both. However, we only mark
45the definition of the alias, since we do not want callers
46(which only see the declaration) to be compiled as if the function
47was __cold (and therefore the paths leading to those calls
48would be assumed to be unlikely).
49
50Link: https://lore.kernel.org/lkml/259986242.BvXPX32bHu@devpool35/
51Cc: <stable@vger.kernel.org>
52Link: https://lore.kernel.org/lkml/20190123173707.GA16603@gmail.com/
53Link: https://lore.kernel.org/lkml/20190206175627.GA20399@gmail.com/
54Suggested-by: Martin Sebor <msebor@gcc.gnu.org>
55Acked-by: Jessica Yu <jeyu@kernel.org>
56Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
57Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
58---
59 include/linux/module.h | 4 ++--
60 1 file changed, 2 insertions(+), 2 deletions(-)
61
62diff --git a/include/linux/module.h b/include/linux/module.h
63index 0c3207d26ac0..06aca48417c9 100644
64--- a/include/linux/module.h
65+++ b/include/linux/module.h
66@@ -129,13 +129,13 @@ extern void cleanup_module(void);
67 #define module_init(initfn) \
68 static inline initcall_t __inittest(void) \
69 { return initfn; } \
70- int init_module(void) __attribute__((alias(#initfn)));
71+ int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
72
73 /* This is only required if you want to be unloadable. */
74 #define module_exit(exitfn) \
75 static inline exitcall_t __exittest(void) \
76 { return exitfn; } \
77- void cleanup_module(void) __attribute__((alias(#exitfn)));
78+ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
79
80 #endif
81
82--
832.17.1
84
diff --git a/recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-init-exit-attrs-to-.patch b/recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-init-exit-attrs-to-.patch
deleted file mode 100644
index 758a8a07..00000000
--- a/recipes-kernel/linux/linux-fslc-imx/0002-include-linux-module.h-copy-init-exit-attrs-to-.patch
+++ /dev/null
@@ -1,135 +0,0 @@
1From mboxrd@z Thu Jan 1 00:00:00 1970
2Return-Path: <SRS0=AQQw=UD=vger.kernel.org=stable-owner@kernel.org>
3X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
4 aws-us-west-2-korg-lkml-1.web.codeaurora.org
5X-Spam-Level:
6X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,
7 DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,
8 SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT
9 autolearn=ham autolearn_force=no version=3.4.0
10Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
11 by smtp.lore.kernel.org (Postfix) with ESMTP id 63BF0C46470
12 for <stable@archiver.kernel.org>; Tue, 4 Jun 2019 13:25:01 +0000 (UTC)
13Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
14 by mail.kernel.org (Postfix) with ESMTP id 3D9B223D29
15 for <stable@archiver.kernel.org>; Tue, 4 Jun 2019 13:25:01 +0000 (UTC)
16Authentication-Results: mail.kernel.org;
17 dkim=pass (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="QWkQ/3jN"
18Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
19 id S1727340AbfFDNZA (ORCPT <rfc822;stable@archiver.kernel.org>);
20 Tue, 4 Jun 2019 09:25:00 -0400
21Received: from mail.kmu-office.ch ([178.209.48.109]:48348 "EHLO
22 mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
23 with ESMTP id S1727343AbfFDNZA (ORCPT
24 <rfc822;stable@vger.kernel.org>); Tue, 4 Jun 2019 09:25:00 -0400
25Received: from trochilidae.toradex.int (unknown [46.140.72.82])
26 by mail.kmu-office.ch (Postfix) with ESMTPSA id A3CC45C1F29;
27 Tue, 4 Jun 2019 15:24:57 +0200 (CEST)
28DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim;
29 t=1559654697;
30 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
31 to:to:cc:cc:mime-version:mime-version:content-type:
32 content-transfer-encoding:content-transfer-encoding:
33 in-reply-to:in-reply-to:references:references;
34 bh=tc6JvYRo2QJoJQVnFd/oGDG0/z6TF30OxAP+nBfruDc=;
35 b=QWkQ/3jNBkysiiD5SMb2UF+0YtSMCbOyP2/dUXeDQChYIal8jUex+QvYHjBh6l4Gff6WwG
36 3Zd44X6jE/KqxygBkoglOSb/dHwZ5AS8B8vpUM8vh2CzhrW4fD9eguoEIImOJJZ9RHgx0b
37 Gwno+ZPPhuPOcFbSrBwNsKK6mZLGttY=
38From: Stefan Agner <stefan@agner.ch>
39To: gregkh@linuxfoundation.org
40Cc: stable@vger.kernel.org,
41 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
42 Martin Sebor <msebor@gcc.gnu.org>,
43 Jessica Yu <jeyu@kernel.org>, Stefan Agner <stefan@agner.ch>
44Subject: [PATCH BACKPORT 4.19 2/2] include/linux/module.h: copy __init/__exit attrs to init/cleanup_module
45Date: Tue, 4 Jun 2019 15:24:41 +0200
46Message-Id: <20190604132441.15383-2-stefan@agner.ch>
47X-Mailer: git-send-email 2.21.0
48In-Reply-To: <20190604132441.15383-1-stefan@agner.ch>
49References: <20190604132441.15383-1-stefan@agner.ch>
50MIME-Version: 1.0
51Content-Transfer-Encoding: 8bit
52Sender: stable-owner@vger.kernel.org
53Precedence: bulk
54List-ID: <stable.vger.kernel.org>
55X-Mailing-List: stable@vger.kernel.org
56Archived-At: <https://lore.kernel.org/stable/20190604132441.15383-2-stefan@agner.ch/>
57List-Archive: <https://lore.kernel.org/stable/>
58List-Post: <mailto:stable@vger.kernel.org>
59
60From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
61
62[ Upstream commit a6e60d84989fa0e91db7f236eda40453b0e44afa ]
63
64The upcoming GCC 9 release extends the -Wmissing-attributes warnings
65(enabled by -Wall) to C and aliases: it warns when particular function
66attributes are missing in the aliases but not in their target.
67
68In particular, it triggers for all the init/cleanup_module
69aliases in the kernel (defined by the module_init/exit macros),
70ending up being very noisy.
71
72These aliases point to the __init/__exit functions of a module,
73which are defined as __cold (among other attributes). However,
74the aliases themselves do not have the __cold attribute.
75
76Since the compiler behaves differently when compiling a __cold
77function as well as when compiling paths leading to calls
78to __cold functions, the warning is trying to point out
79the possibly-forgotten attribute in the alias.
80
81In order to keep the warning enabled, we decided to silence
82this case. Ideally, we would mark the aliases directly
83as __init/__exit. However, there are currently around 132 modules
84in the kernel which are missing __init/__exit in their init/cleanup
85functions (either because they are missing, or for other reasons,
86e.g. the functions being called from somewhere else); and
87a section mismatch is a hard error.
88
89A conservative alternative was to mark the aliases as __cold only.
90However, since we would like to eventually enforce __init/__exit
91to be always marked, we chose to use the new __copy function
92attribute (introduced by GCC 9 as well to deal with this).
93With it, we copy the attributes used by the target functions
94into the aliases. This way, functions that were not marked
95as __init/__exit won't have their aliases marked either,
96and therefore there won't be a section mismatch.
97
98Note that the warning would go away marking either the extern
99declaration, the definition, or both. However, we only mark
100the definition of the alias, since we do not want callers
101(which only see the declaration) to be compiled as if the function
102was __cold (and therefore the paths leading to those calls
103would be assumed to be unlikely).
104
105Cc: <stable@vger.kernel.org> # 4.14+
106Link: https://lore.kernel.org/lkml/20190123173707.GA16603@gmail.com/
107Link: https://lore.kernel.org/lkml/20190206175627.GA20399@gmail.com/
108Suggested-by: Martin Sebor <msebor@gcc.gnu.org>
109Acked-by: Jessica Yu <jeyu@kernel.org>
110Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
111Signed-off-by: Stefan Agner <stefan@agner.ch>
112---
113 include/linux/module.h | 4 ++--
114 1 file changed, 2 insertions(+), 2 deletions(-)
115
116Index: git/include/linux/module.h
117===================================================================
118--- git.orig/include/linux/module.h
119+++ git/include/linux/module.h
120@@ -129,13 +129,13 @@ extern void cleanup_module(void);
121 #define module_init(initfn) \
122 static inline initcall_t __inittest(void) \
123 { return initfn; } \
124- int init_module(void) __attribute__((alias(#initfn)));
125+ int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
126
127 /* This is only required if you want to be unloadable. */
128 #define module_exit(exitfn) \
129 static inline exitcall_t __exittest(void) \
130 { return exitfn; } \
131- void cleanup_module(void) __attribute__((alias(#exitfn)));
132+ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
133
134 #endif
135
diff --git a/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb b/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb
index 3f4371d3..7114cd22 100644
--- a/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb
+++ b/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb
@@ -12,8 +12,8 @@ PV .= "+git${SRCPV}"
12 12
13SRCBRANCH = "4.9-1.0.x-imx" 13SRCBRANCH = "4.9-1.0.x-imx"
14SRCREV = "953c6e30c9701fda69ef08e2476c541dc4fb1453" 14SRCREV = "953c6e30c9701fda69ef08e2476c541dc4fb1453"
15SRC_URI += "file://0001-compiler-attributes-add-support-for-copy-gcc-9.patch \ 15SRC_URI += "file://0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch \
16 file://0002-include-linux-module.h-copy-init-exit-attrs-to-.patch \ 16 file://0002-include-linux-module.h-copy-__init-__exit-attrs-to-i.patch \
17 " 17 "
18 18
19COMPATIBLE_MACHINE = "(mx6|mx7)" 19COMPATIBLE_MACHINE = "(mx6|mx7)"