diff options
author | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2019-11-25 16:08:31 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-02-28 17:50:45 +0100 |
commit | 4e0c54bc5bc8381e031af5147b66b4dadeecc626 (patch) | |
tree | 2e1774d4cabb704881094118350d43cc1fa6ff4b /target/linux/generic/hack-5.4/204-module_strip.patch | |
parent | c16517d26de30c90dabce1e456615fd7fbdce07c (diff) | |
download | upstream-4e0c54bc5bc8381e031af5147b66b4dadeecc626.tar.gz upstream-4e0c54bc5bc8381e031af5147b66b4dadeecc626.tar.bz2 upstream-4e0c54bc5bc8381e031af5147b66b4dadeecc626.zip |
kernel: add support for kernel 5.4
The following patches were removed because they are integrated in the upstream kernel 5.4:
* backport-5.4/047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch
* backport-5.4/048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch
* backport-5.4/080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch
* backport-5.4/080-v5.1-0002-bcma-use-dev_-printing-functions.patch
* backport-5.4/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch
* backport-5.4/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch
* backport-5.4/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch
* backport-5.4/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch
* backport-5.4/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
* backport-5.4/450-v5.0-mtd-spinand-winbond-Add-support-for-W25N01GV.patch
* backport-5.4/451-v5.0-mtd-spinand-Add-initial-support-for-Toshiba-TC58CVG2.patch
* backport-5.4/452-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
* backport-5.4/455-v5.1-mtd-spinand-Add-support-for-all-Toshiba-Memory-produ.patch
* backport-5.4/456-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
* backport-5.4/460-v5.0-mtd-spi-nor-Add-support-for-mx25u12835f.patch
* backport-5.4/460-v5.3-mtd-spinand-Define-macros-for-page-read-ops-with-thr.patch
* backport-5.4/461-v5.3-mtd-spinand-Add-support-for-two-byte-device-IDs.patch
* backport-5.4/462-v5.3-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UFxxG.patch
* backport-5.4/463-v5.3-mtd-spinand-Add-initial-support-for-Paragon-PN26G0xA.patch
* backport-5.4/700-v5.1-net-phylink-only-call-mac_config-during-resolve-when.patch
* backport-5.4/701-v5.2-net-phylink-ensure-inband-AN-works-correctly.patch
* backport-5.4/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch
* backport-5.4/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch
* backport-5.4/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch
* backport-5.4/705-v5.1-net-phy-provide-full-set-of-accessor-functions-to-MM.patch
* backport-5.4/706-v5.1-net-phy-add-register-modifying-helpers-returning-1-o.patch
* backport-5.4/707-v5.1-net-phy-add-genphy_c45_check_and_restart_aneg.patch
* backport-5.4/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch
* backport-5.4/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch
* backport-5.4/710-v5.3-net-phy-allow-Clause-45-access-via-mii-ioctl.patch
* backport-5.4/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch
* backport-5.4/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch
* backport-5.4/713-v5.2-net-phylink-avoid-reducing-support-mask.patch
* backport-5.4/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch
* backport-5.4/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch
* backport-5.4/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch
* backport-5.4/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch
* pending-5.4/103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
* pending-5.4/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
* pending-5.4/132-spi-spi-gpio-fix-crash-when-num-chipselects-is-0.patch
* pending-5.4/220-optimize_inlining.patch
* pending-5.4/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
* pending-5.4/475-mtd-spi-nor-Add-Winbond-w25q128jv-support.patch
* pending-5.4/477-mtd-add-spi-nor-add-mx25u3235f.patch
* pending-5.4/479-mtd-spi-nor-add-eon-en25qh64.patch
Some bigger changes were done to this feature and we did not port this patch yet:
* hack-5.4/207-disable-modorder.patch
This depends on BOOTMEM which was removed from the kernel, this needs some bigger changes:
* hack-5.4/930-crashlog.patch
A different version of the FPU disable patch was merged upstream, OpenWrt needs some adaptations.
* pending-5.4/304-mips_disable_fpu.patch
- no crashlog support yet as a required file got deleted upstream
- Removed patch below, which is now seen as a recursive dependency [1]
- Removed patch below due to build error [2]
- fix still required to avoid identical function def [3]
- Fixes included from Blocktrron
- Fixes included from Chunkeey
- Fix included from nbd regarding "dst leak in Flow Offload"
[1] target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch
[2] target/linux/generic/hack-5.4/207-disable-modorder.patch
[3] target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/hack-5.4/204-module_strip.patch')
-rw-r--r-- | target/linux/generic/hack-5.4/204-module_strip.patch | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index 41bb021e71..d37dfd4f98 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -160,6 +160,7 @@ extern void cleanup_module(void); +@@ -157,6 +157,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) -@@ -203,12 +204,12 @@ extern void cleanup_module(void); +@@ -216,12 +217,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 \ -@@ -235,7 +236,9 @@ extern typeof(name) __mod_##type##__##na +@@ -248,7 +249,9 @@ extern typeof(name) __mod_##type##__##na */ #if defined(MODULE) || !defined(CONFIG_SYSFS) @@ -48,19 +48,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> +#define MODULE_VERSION(_version) __MODULE_INFO_DISABLED(version) #else #define MODULE_VERSION(_version) \ - static struct module_version_attribute ___modver_attr = { \ -@@ -257,7 +260,7 @@ extern typeof(name) __mod_##type##__##na + MODULE_INFO(version, _version); \ +@@ -271,7 +274,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 */ -#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware) +#define MODULE_FIRMWARE(_firmware) MODULE_INFO_STRIP(firmware, _firmware) - struct notifier_block; + #define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns) --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h -@@ -17,6 +17,16 @@ +@@ -20,10 +20,24 @@ /* Chosen so that structs with an unsigned long line up. */ #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) @@ -74,20 +74,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> +#define __MODULE_INFO_STRIP(tag, name, info) __MODULE_INFO(tag, name, info) +#endif + - #ifdef MODULE ++#ifdef MODULE #define __MODULE_INFO(tag, name, info) \ static const char __UNIQUE_ID(name)[] \ -@@ -24,8 +34,7 @@ static const char __UNIQUE_ID(name)[] - = __stringify(tag) "=" info - #else /* !MODULE */ - /* This struct is here for syntactic coherency, it is not used */ --#define __MODULE_INFO(tag, name, info) \ -- struct __UNIQUE_ID(name) {} + __used __attribute__((section(".modinfo"), unused, aligned(1))) \ + = __MODULE_INFO_PREFIX __stringify(tag) "=" info ++#else +#define __MODULE_INFO(tag, name, info) __MODULE_INFO_DISABLED(name) - #endif ++#endif + #define __MODULE_PARM_TYPE(name, _type) \ __MODULE_INFO(parmtype, name##type, #name ":" _type) -@@ -33,7 +42,7 @@ static const char __UNIQUE_ID(name)[] +@@ -31,7 +45,7 @@ static const char __UNIQUE_ID(name)[] /* 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) \ @@ -98,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/init/Kconfig +++ b/init/Kconfig -@@ -1997,6 +1997,13 @@ config TRIM_UNUSED_KSYMS +@@ -2233,6 +2233,13 @@ config TRIM_UNUSED_KSYMS If unsure, or if you need to build out-of-tree modules, say N. @@ -114,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3029,9 +3029,11 @@ static int setup_load_info(struct load_i +@@ -3107,9 +3107,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3052,6 +3054,7 @@ static int check_modinfo(struct module * +@@ -3130,6 +3132,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } @@ -137,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1983,7 +1983,9 @@ static void read_symbols(const char *mod +@@ -2051,7 +2051,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_modversions(mod, &info, sym, symname); @@ -145,9 +143,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> handle_moddevtable(mod, &info, sym, symname); +#endif } - if (!is_vmlinux(modname) || vmlinux_section_warnings) - check_sec_ref(mod, modname, &info); -@@ -2146,8 +2148,10 @@ static void add_header(struct buffer *b, + + /* Apply symbol namespaces from __kstrtabns_<symbol> entries. */ +@@ -2265,8 +2267,10 @@ static void add_header(struct buffer *b, buf_printf(b, "\n"); buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "\n"); @@ -157,8 +155,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> +#endif buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); - buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); -@@ -2164,8 +2168,10 @@ static void add_header(struct buffer *b, + buf_printf(b, "__section(.gnu.linkonce.this_module) = {\n"); +@@ -2283,8 +2287,10 @@ static void add_header(struct buffer *b, static void add_intree_flag(struct buffer *b, int is_intree) { @@ -169,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } /* Cannot check for assembler */ -@@ -2178,8 +2184,10 @@ static void add_retpoline(struct buffer +@@ -2297,8 +2303,10 @@ static void add_retpoline(struct buffer static void add_staging_flag(struct buffer *b, const char *name) { @@ -180,7 +178,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } /** -@@ -2278,11 +2286,13 @@ static void add_depends(struct buffer *b +@@ -2382,11 +2390,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -194,10 +192,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } static void write_if_changed(struct buffer *b, const char *fname) -@@ -2519,7 +2529,9 @@ int main(int argc, char **argv) +@@ -2656,7 +2666,9 @@ int main(int argc, char **argv) add_staging_flag(&buf, mod->name); err |= add_versions(&buf, mod); - add_depends(&buf, mod, modules); + add_depends(&buf, mod); +#ifndef CONFIG_MODULE_STRIPPED add_moddevtable(&buf, mod); +#endif |