1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Fix compilation for 5.14

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-10-18 16:01:57 +02:00
parent 1fcd853b8d
commit 1741a86684
142 changed files with 20808 additions and 105 deletions

View file

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -161,6 +161,7 @@ extern void cleanup_module(void);
@@ -164,6 +164,7 @@ extern void cleanup_module(void);
/* Generic info of form tag = "info" */
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* For userspace: you can also call me... */
#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
@@ -230,12 +231,12 @@ extern void cleanup_module(void);
@@ -233,12 +234,12 @@ extern void cleanup_module(void);
* Author(s), use "Name <email>" or just "Name", for multiple
* authors use multiple MODULE_AUTHOR() statements/lines.
*/
@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Creates an alias so file2alias.c can find device table. */
#define MODULE_DEVICE_TABLE(type, name) \
extern typeof(name) __mod_##type##__##name##_device_table \
@@ -262,7 +263,9 @@ extern typeof(name) __mod_##type##__##na
@@ -265,7 +266,9 @@ extern typeof(name) __mod_##type##__##na
*/
#if defined(MODULE) || !defined(CONFIG_SYSFS)
@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#else
#define MODULE_VERSION(_version) \
MODULE_INFO(version, _version); \
@@ -285,7 +288,7 @@ extern typeof(name) __mod_##type##__##na
@@ -288,7 +291,7 @@ extern typeof(name) __mod_##type##__##na
/* Optional firmware file (or files) needed by the module
* format is simply firmware file name. Multiple firmware
* files require multiple MODULE_FIRMWARE() specifiers */
@ -75,9 +75,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
+
#define __MODULE_INFO(tag, name, info) \
static const char __UNIQUE_ID(name)[] \
__used __section(".modinfo") __attribute__((unused, aligned(1))) \
@@ -31,7 +41,7 @@ static const char __UNIQUE_ID(name)[]
static const char __UNIQUE_ID(name)[] \
__used __section(".modinfo") __aligned(1) \
@@ -31,7 +41,7 @@
/* One for each parameter, describing how to use it. Some files do
multiple of these per line, so can't just use MODULE_INFO. */
#define MODULE_PARM_DESC(_parm, desc) \
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2337,6 +2337,13 @@ config UNUSED_KSYMS_WHITELIST
@@ -2324,6 +2324,13 @@ config UNUSED_KSYMS_WHITELIST
one per line. The path can be absolute, or relative to the kernel
source tree.
@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config MODULES_TREE_LOOKUP
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3247,9 +3247,11 @@ static int setup_load_info(struct load_i
@@ -3227,9 +3227,11 @@ static int setup_load_info(struct load_i
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
@@ -3270,6 +3272,7 @@ static int check_modinfo(struct module *
@@ -3250,6 +3252,7 @@ static int check_modinfo(struct module *
mod->name);
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
}
@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2037,7 +2037,9 @@ static void read_symbols(const char *mod
@@ -2024,7 +2024,9 @@ static void read_symbols(const char *mod
symname = remove_dot(info.strtab + sym->st_name);
handle_symbol(mod, &info, sym, symname);
@ -137,9 +137,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
@@ -2250,8 +2252,10 @@ static void add_header(struct buffer *b,
buf_printf(b, "\n");
@@ -2203,8 +2205,10 @@ static void add_header(struct buffer *b,
buf_printf(b, "BUILD_SALT;\n");
buf_printf(b, "BUILD_LTO_INFO;\n");
buf_printf(b, "\n");
+#ifndef CONFIG_MODULE_STRIPPED
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
buf_printf(b, "\n");
buf_printf(b, "__visible struct module __this_module\n");
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
@@ -2268,8 +2272,10 @@ static void add_header(struct buffer *b,
@@ -2221,8 +2225,10 @@ static void add_header(struct buffer *b,
static void add_intree_flag(struct buffer *b, int is_intree)
{
@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
/* Cannot check for assembler */
@@ -2282,8 +2288,10 @@ static void add_retpoline(struct buffer
@@ -2235,8 +2241,10 @@ static void add_retpoline(struct buffer
static void add_staging_flag(struct buffer *b, const char *name)
{
@ -170,7 +170,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
/**
@@ -2367,11 +2375,13 @@ static void add_depends(struct buffer *b
@@ -2316,11 +2324,13 @@ static void add_depends(struct buffer *b
static void add_srcversion(struct buffer *b, struct module *mod)
{
@ -184,9 +184,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
static void write_buf(struct buffer *b, const char *fname)
@@ -2630,7 +2640,9 @@ int main(int argc, char **argv)
@@ -2569,7 +2579,9 @@ int main(int argc, char **argv)
add_staging_flag(&buf, mod->name);
err |= add_versions(&buf, mod);
add_versions(&buf, mod);
add_depends(&buf, mod);
+#ifndef CONFIG_MODULE_STRIPPED
add_moddevtable(&buf, mod);