aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-4.19
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-11-01 18:01:44 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-12-15 14:28:48 +0100
commit9261e7447ea7b8d33b70ff6ea008f2041a88e255 (patch)
treec9af04326ac9953a33fc8fd3e852c11fc1eb4df3 /target/linux/generic/hack-4.19
parent52a82ce3dd901a1536c7d7d9d963e9c2d761c816 (diff)
downloadupstream-9261e7447ea7b8d33b70ff6ea008f2041a88e255.tar.gz
upstream-9261e7447ea7b8d33b70ff6ea008f2041a88e255.tar.bz2
upstream-9261e7447ea7b8d33b70ff6ea008f2041a88e255.zip
kernel: Make the patches apply on top of 4.19
This makes the patches which were just copied in the previous commit apply on top of kernel 4.19. The patches in the backports-4.19 folder were checked if they are really in kernel 4.19 based on the title and only removed if they were found in the upstream kernel. The following additional patches form the pending folder went into upstream Linux 4.19: pending-4.19/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch pending-4.19/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch pending-4.19/478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch pending-4.19/479-mtd-spi-nor-add-eon-en25qh32.patch pending-4.19/950-tty-serial-exar-generalize-rs485-setup.patch pending-4.19/340-MIPS-mm-remove-mips_dma_mapping_error.patch Bigger changes were introduced to the m25p80 spi nor driver, as far as I saw it in the new code, it now has the functionality provided in this patch: pending-4.19/450-mtd-m25p80-allow-fallback-from-spi_flash_read-to-reg.patch Part of this patch went upstream independent of OpenWrt: hack-4.19/220-gc_sections.patch This patch was reworked to match the changes done upstream. The MIPS DMA API changed a lot, this patch was rewritten to match the new DMA handling: pending-4.19/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch I did bigger manual changes to the following patches and I am not 100% sure if they are all correct: pending-4.19/0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch pending-4.19/411-mtd-partial_eraseblock_write.patch pending-4.19/600-netfilter_conntrack_flush.patch pending-4.19/611-netfilter_match_bypass_default_table.patch pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch hack-4.19/211-host_tools_portability.patch hack-4.19/221-module_exports.patch hack-4.19/321-powerpc_crtsavres_prereq.patch hack-4.19/902-debloat_proc.patch This is based on patchset from Marko Ratkaj <marko.ratkaj@sartura.hr> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/hack-4.19')
-rw-r--r--target/linux/generic/hack-4.19/202-reduce_module_size.patch4
-rw-r--r--target/linux/generic/hack-4.19/204-module_strip.patch38
-rw-r--r--target/linux/generic/hack-4.19/207-disable-modorder.patch6
-rw-r--r--target/linux/generic/hack-4.19/210-darwin_scripts_include.patch12
-rw-r--r--target/linux/generic/hack-4.19/211-host_tools_portability.patch2
-rw-r--r--target/linux/generic/hack-4.19/220-gc_sections.patch226
-rw-r--r--target/linux/generic/hack-4.19/221-module_exports.patch34
-rw-r--r--target/linux/generic/hack-4.19/230-openwrt_lzma_options.patch8
-rw-r--r--target/linux/generic/hack-4.19/250-netfilter_depends.patch4
-rw-r--r--target/linux/generic/hack-4.19/251-sound_kconfig.patch18
-rw-r--r--target/linux/generic/hack-4.19/259-regmap_dynamic.patch14
-rw-r--r--target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch6
-rw-r--r--target/linux/generic/hack-4.19/280-rfkill-stubs.patch2
-rw-r--r--target/linux/generic/hack-4.19/301-mips_image_cmdline_hack.patch2
-rw-r--r--target/linux/generic/hack-4.19/321-powerpc_crtsavres_prereq.patch9
-rw-r--r--target/linux/generic/hack-4.19/640-bridge-only-accept-EAP-locally.patch4
-rw-r--r--target/linux/generic/hack-4.19/647-netfilter-flow-acct.patch2
-rw-r--r--target/linux/generic/hack-4.19/650-netfilter-add-xt_OFFLOAD-target.patch16
-rw-r--r--target/linux/generic/hack-4.19/651-wireless_mesh_header.patch2
-rw-r--r--target/linux/generic/hack-4.19/660-fq_codel_defaults.patch2
-rw-r--r--target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch16
-rw-r--r--target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch172
-rw-r--r--target/linux/generic/hack-4.19/700-swconfig_switch_drivers.patch6
-rw-r--r--target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch4
-rw-r--r--target/linux/generic/hack-4.19/721-phy_packets.patch30
-rw-r--r--target/linux/generic/hack-4.19/773-bgmac-add-srab-switch.patch6
-rw-r--r--target/linux/generic/hack-4.19/835-misc-owl_loader.patch6
-rw-r--r--target/linux/generic/hack-4.19/901-debloat_sock_diag.patch20
-rw-r--r--target/linux/generic/hack-4.19/902-debloat_proc.patch126
-rw-r--r--target/linux/generic/hack-4.19/904-debloat_dma_buf.patch6
-rw-r--r--target/linux/generic/hack-4.19/910-kobject_uevent.patch2
-rw-r--r--target/linux/generic/hack-4.19/911-kobject_add_broadcast_uevent.patch8
-rw-r--r--target/linux/generic/hack-4.19/921-always-create-console-node-in-initramfs.patch6
-rw-r--r--target/linux/generic/hack-4.19/930-crashlog.patch22
34 files changed, 415 insertions, 426 deletions
diff --git a/target/linux/generic/hack-4.19/202-reduce_module_size.patch b/target/linux/generic/hack-4.19/202-reduce_module_size.patch
index 2cbb6add9a..644a18c99c 100644
--- a/target/linux/generic/hack-4.19/202-reduce_module_size.patch
+++ b/target/linux/generic/hack-4.19/202-reduce_module_size.patch
@@ -13,12 +13,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
-@@ -425,7 +425,7 @@ KBUILD_AFLAGS_KERNEL :=
+@@ -427,7 +427,7 @@ KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
-KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
+ KBUILD_LDFLAGS :=
GCC_PLUGINS_CFLAGS :=
- export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD
diff --git a/target/linux/generic/hack-4.19/204-module_strip.patch b/target/linux/generic/hack-4.19/204-module_strip.patch
index db65062fcf..c30bfd5c9b 100644
--- a/target/linux/generic/hack-4.19/204-module_strip.patch
+++ b/target/linux/generic/hack-4.19/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
-@@ -158,6 +158,7 @@ extern void cleanup_module(void);
+@@ -160,6 +160,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)
-@@ -201,12 +202,12 @@ extern void cleanup_module(void);
+@@ -203,12 +204,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 \
-@@ -233,7 +234,9 @@ extern typeof(name) __mod_##type##__##na
+@@ -235,7 +236,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) \
static struct module_version_attribute ___modver_attr = { \
-@@ -255,7 +258,7 @@ extern typeof(name) __mod_##type##__##na
+@@ -257,7 +260,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 */
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1903,6 +1903,13 @@ config TRIM_UNUSED_KSYMS
+@@ -1988,6 +1988,13 @@ config TRIM_UNUSED_KSYMS
If unsure, or if you need to build out-of-tree modules, say N.
@@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config MODULES_TREE_LOOKUP
--- a/kernel/module.c
+++ b/kernel/module.c
-@@ -3006,9 +3006,11 @@ static struct module *setup_load_info(st
+@@ -3002,9 +3002,11 @@ static int setup_load_info(struct load_i
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
@@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
-@@ -3029,6 +3031,7 @@ static int check_modinfo(struct module *
+@@ -3025,6 +3027,7 @@ static int check_modinfo(struct module *
mod->name);
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
}
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
-@@ -1982,7 +1982,9 @@ static void read_symbols(char *modname)
+@@ -1969,7 +1969,9 @@ static void read_symbols(const char *mod
symname = remove_dot(info.strtab + sym->st_name);
handle_modversions(mod, &info, sym, symname);
@@ -145,11 +145,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
handle_moddevtable(mod, &info, sym, symname);
+#endif
}
- if (!is_vmlinux(modname) ||
- (is_vmlinux(modname) && vmlinux_section_warnings))
-@@ -2143,8 +2145,10 @@ static void add_header(struct buffer *b,
- buf_printf(b, "#include <linux/vermagic.h>\n");
- buf_printf(b, "#include <linux/compiler.h>\n");
+ if (!is_vmlinux(modname) || vmlinux_section_warnings)
+ check_sec_ref(mod, modname, &info);
+@@ -2132,8 +2134,10 @@ static void add_header(struct buffer *b,
+ buf_printf(b, "\n");
+ buf_printf(b, "BUILD_SALT;\n");
buf_printf(b, "\n");
+#ifndef CONFIG_MODULE_STRIPPED
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
@@ -158,7 +158,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, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
-@@ -2161,8 +2165,10 @@ static void add_header(struct buffer *b,
+@@ -2150,8 +2154,10 @@ static void add_header(struct buffer *b,
static void add_intree_flag(struct buffer *b, int is_intree)
{
@@ -169,20 +169,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
/* Cannot check for assembler */
-@@ -2175,10 +2181,12 @@ static void add_retpoline(struct buffer
+@@ -2164,8 +2170,10 @@ static void add_retpoline(struct buffer
static void add_staging_flag(struct buffer *b, const char *name)
{
+#ifndef CONFIG_MODULE_STRIPPED
- static const char *staging_dir = "drivers/staging";
-
- if (strncmp(staging_dir, name, strlen(staging_dir)) == 0)
+ if (strstarts(name, "drivers/staging"))
buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n");
+#endif
}
/**
-@@ -2277,11 +2285,13 @@ static void add_depends(struct buffer *b
+@@ -2264,11 +2272,13 @@ static void add_depends(struct buffer *b
static void add_srcversion(struct buffer *b, struct module *mod)
{
@@ -196,7 +194,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
static void write_if_changed(struct buffer *b, const char *fname)
-@@ -2518,7 +2528,9 @@ int main(int argc, char **argv)
+@@ -2505,7 +2515,9 @@ int main(int argc, char **argv)
add_staging_flag(&buf, mod->name);
err |= add_versions(&buf, mod);
add_depends(&buf, mod, modules);
diff --git a/target/linux/generic/hack-4.19/207-disable-modorder.patch b/target/linux/generic/hack-4.19/207-disable-modorder.patch
index 0619dcaa7b..7d7b6a8dfb 100644
--- a/target/linux/generic/hack-4.19/207-disable-modorder.patch
+++ b/target/linux/generic/hack-4.19/207-disable-modorder.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
-@@ -1237,7 +1237,6 @@ all: modules
+@@ -1224,7 +1224,6 @@ all: modules
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1266,7 +1265,6 @@ _modinst_:
+@@ -1253,7 +1252,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
-@@ -94,7 +94,7 @@ modorder-target := $(obj)/modules.order
+@@ -78,7 +78,7 @@ modorder-target := $(obj)/modules.order
# We keep a list of all modules in $(MODVERDIR)
__build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
diff --git a/target/linux/generic/hack-4.19/210-darwin_scripts_include.patch b/target/linux/generic/hack-4.19/210-darwin_scripts_include.patch
index 95c7ea4232..be6adc0d11 100644
--- a/target/linux/generic/hack-4.19/210-darwin_scripts_include.patch
+++ b/target/linux/generic/hack-4.19/210-darwin_scripts_include.patch
@@ -13,18 +13,6 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
4 files changed, 3018 insertions(+)
create mode 100644 scripts/mod/elf.h
---- a/scripts/kconfig/Makefile
-+++ b/scripts/kconfig/Makefile
-@@ -164,6 +164,9 @@ check-lxdialog := $(srctree)/$(src)/lxd
- # we really need to do so. (Do not call gcc as part of make mrproper)
- HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
- -DLOCALE
-+ifeq ($(shell uname -s),Darwin)
-+HOST_LOADLIBES += -lncurses
-+endif
-
- # ===========================================================================
- # Shared Makefile for the various kconfig executables:
--- /dev/null
+++ b/scripts/mod/elf.h
@@ -0,0 +1,3007 @@
diff --git a/target/linux/generic/hack-4.19/211-host_tools_portability.patch b/target/linux/generic/hack-4.19/211-host_tools_portability.patch
index d806df8a5f..f3c285879c 100644
--- a/target/linux/generic/hack-4.19/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.19/211-host_tools_portability.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
###
## HOSTCC C flags
--host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
+-host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(KBUILD_HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
+host_c_flags = -MD -MF $(depfile) -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
diff --git a/target/linux/generic/hack-4.19/220-gc_sections.patch b/target/linux/generic/hack-4.19/220-gc_sections.patch
index d257232403..17fcc5cbd2 100644
--- a/target/linux/generic/hack-4.19/220-gc_sections.patch
+++ b/target/linux/generic/hack-4.19/220-gc_sections.patch
@@ -21,43 +21,43 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/Makefile
+++ b/Makefile
-@@ -272,6 +272,11 @@ else
+@@ -294,6 +294,11 @@ else
scripts/Kbuild.include: ;
include scripts/Kbuild.include
+ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
-+KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,)
-+KBUILD_CFLAGS_KERNEL += $(call cc-option,-fdata-sections,)
++KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
++LDFLAGS_vmlinux += --gc-sections
+endif
+
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -788,11 +793,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -785,11 +790,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
-ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
--KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,)
--KBUILD_CFLAGS += $(call cc-option,-fdata-sections,)
+-KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
+-LDFLAGS_vmlinux += --gc-sections
-endif
-
# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
- CHECKFLAGS += $(NOSTDINC_FLAGS)
+
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -91,6 +91,7 @@ config ARM
+@@ -98,6 +98,7 @@ config ARM
select HAVE_UID16
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select IRQ_FORCED_THREADING
-+ select LD_DEAD_CODE_DATA_ELIMINATION
++ select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
select MODULES_USE_ELF_REL
+ select NEED_DMA_MAP_STATE
select NO_BOOTMEM
- select OF_EARLY_FLATTREE if OF
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
-@@ -103,6 +103,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
+@@ -106,6 +106,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
ORIG_CFLAGS := $(KBUILD_CFLAGS)
KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
endif
@@ -67,80 +67,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
# but it is being used too early to link to meaningful stack_chk logic.
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
-@@ -18,7 +18,7 @@
- #define PROC_INFO \
- . = ALIGN(4); \
- VMLINUX_SYMBOL(__proc_info_begin) = .; \
-- *(.proc.info.init) \
-+ KEEP(*(.proc.info.init)) \
- VMLINUX_SYMBOL(__proc_info_end) = .;
-
- #define HYPERVISOR_TEXT \
-@@ -29,11 +29,11 @@
- #define IDMAP_TEXT \
- ALIGN_FUNCTION(); \
- VMLINUX_SYMBOL(__idmap_text_start) = .; \
-- *(.idmap.text) \
-+ KEEP(*(.idmap.text)) \
- VMLINUX_SYMBOL(__idmap_text_end) = .; \
- . = ALIGN(PAGE_SIZE); \
- VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \
-- *(.hyp.idmap.text) \
-+ KEEP(*(.hyp.idmap.text)) \
- VMLINUX_SYMBOL(__hyp_idmap_text_end) = .;
-
- #ifdef CONFIG_HOTPLUG_CPU
-@@ -106,7 +106,7 @@ SECTIONS
- _stext = .; /* Text and read-only data */
- IDMAP_TEXT
- __exception_text_start = .;
-- *(.exception.text)
-+ KEEP(*(.exception.text))
- __exception_text_end = .;
- IRQENTRY_TEXT
- SOFTIRQENTRY_TEXT
-@@ -135,7 +135,7 @@ SECTIONS
- __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
- __start___ex_table = .;
- #ifdef CONFIG_MMU
-- *(__ex_table)
-+ KEEP(*(__ex_table))
- #endif
- __stop___ex_table = .;
- }
-@@ -147,12 +147,12 @@ SECTIONS
- . = ALIGN(8);
- .ARM.unwind_idx : {
- __start_unwind_idx = .;
-- *(.ARM.exidx*)
-+ KEEP(*(.ARM.exidx*))
- __stop_unwind_idx = .;
- }
- .ARM.unwind_tab : {
- __start_unwind_tab = .;
-- *(.ARM.extab*)
-+ KEEP(*(.ARM.extab*))
- __stop_unwind_tab = .;
- }
- #endif
-@@ -172,14 +172,14 @@ SECTIONS
- */
- __vectors_start = .;
- .vectors 0xffff0000 : AT(__vectors_start) {
-- *(.vectors)
-+ KEEP(*(.vectors))
- }
- . = __vectors_start + SIZEOF(.vectors);
- __vectors_end = .;
-
- __stubs_start = .;
- .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) {
-- *(.stubs)
-+ KEEP(*(.stubs))
- }
- . = __stubs_start + SIZEOF(.stubs);
- __stubs_end = .;
-@@ -195,24 +195,24 @@ SECTIONS
+@@ -100,24 +100,24 @@ SECTIONS
}
.init.arch.info : {
__arch_info_begin = .;
@@ -168,14 +95,78 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+ KEEP(*(.pv_table))
__pv_table_end = .;
}
- .init.data : {
+
+--- a/arch/arm/kernel/vmlinux.lds.h
++++ b/arch/arm/kernel/vmlinux.lds.h
+@@ -22,13 +22,13 @@
+ #define ARM_MMU_DISCARD(x)
+ #else
+ #define ARM_MMU_KEEP(x)
+-#define ARM_MMU_DISCARD(x) x
++#define ARM_MMU_DISCARD(x) KEEP(x)
+ #endif
+
+ #define PROC_INFO \
+ . = ALIGN(4); \
+ __proc_info_begin = .; \
+- *(.proc.info.init) \
++ KEEP(*(.proc.info.init)) \
+ __proc_info_end = .;
+
+ #define HYPERVISOR_TEXT \
+@@ -39,11 +39,11 @@
+ #define IDMAP_TEXT \
+ ALIGN_FUNCTION(); \
+ __idmap_text_start = .; \
+- *(.idmap.text) \
++ KEEP(*(.idmap.text)) \
+ __idmap_text_end = .; \
+ . = ALIGN(PAGE_SIZE); \
+ __hyp_idmap_text_start = .; \
+- *(.hyp.idmap.text) \
++ KEEP(*(.hyp.idmap.text)) \
+ __hyp_idmap_text_end = .;
+
+ #define ARM_DISCARD \
+@@ -86,12 +86,12 @@
+ . = ALIGN(8); \
+ .ARM.unwind_idx : { \
+ __start_unwind_idx = .; \
+- *(.ARM.exidx*) \
++ KEEP(*(.ARM.exidx*)) \
+ __stop_unwind_idx = .; \
+ } \
+ .ARM.unwind_tab : { \
+ __start_unwind_tab = .; \
+- *(.ARM.extab*) \
++ KEEP(*(.ARM.extab*)) \
+ __stop_unwind_tab = .; \
+ }
+
+@@ -102,14 +102,14 @@
+ #define ARM_VECTORS \
+ __vectors_start = .; \
+ .vectors 0xffff0000 : AT(__vectors_start) { \
+- *(.vectors) \
++ KEEP(*(.vectors)) \
+ } \
+ . = __vectors_start + SIZEOF(.vectors); \
+ __vectors_end = .; \
+ \
+ __stubs_start = .; \
+ .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
+- *(.stubs) \
++ KEEP(*(.stubs)) \
+ } \
+ . = __stubs_start + SIZEOF(.stubs); \
+ __stubs_end = .; \
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -40,6 +40,7 @@ config MIPS
+@@ -43,6 +43,7 @@ config MIPS
+ select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
select HAVE_CBPF_JIT if (!64BIT && !CPU_MICROMIPS)
select HAVE_EBPF_JIT if (64BIT && !CPU_MICROMIPS)
- select HAVE_CC_STACKPROTECTOR
-+ select LD_DEAD_CODE_DATA_ELIMINATION
++ select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
select HAVE_CONTEXT_TRACKING
select HAVE_COPY_THREAD_TLS
select HAVE_C_RECORDMCOUNT
@@ -199,60 +190,3 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
__mips_machines_end = .;
}
---- a/include/asm-generic/vmlinux.lds.h
-+++ b/include/asm-generic/vmlinux.lds.h
-@@ -105,7 +105,7 @@
- #ifdef CONFIG_FTRACE_MCOUNT_RECORD
- #define MCOUNT_REC() . = ALIGN(8); \
- VMLINUX_SYMBOL(__start_mcount_loc) = .; \
-- *(__mcount_loc) \
-+ KEEP(*(__mcount_loc)) \
- VMLINUX_SYMBOL(__stop_mcount_loc) = .;
- #else
- #define MCOUNT_REC()
-@@ -113,7 +113,7 @@
-
- #ifdef CONFIG_TRACE_BRANCH_PROFILING
- #define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
-- *(_ftrace_annotated_branch) \
-+ KEEP(*(_ftrace_annotated_branch)) \
- VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
- #else
- #define LIKELY_PROFILE()
-@@ -121,7 +121,7 @@
-
- #ifdef CONFIG_PROFILE_ALL_BRANCHES
- #define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \
-- *(_ftrace_branch) \
-+ KEEP(*(_ftrace_branch)) \
- VMLINUX_SYMBOL(__stop_branch_profile) = .;
- #else
- #define BRANCH_PROFILE()
-@@ -237,7 +237,8 @@
- LIKELY_PROFILE() \
- BRANCH_PROFILE() \
- TRACE_PRINTKS() \
-- TRACEPOINT_STR()
-+ TRACEPOINT_STR() \
-+ *(.data.[a-zA-Z_]*)
-
- /*
- * Data section helpers
-@@ -496,7 +497,7 @@
- #define ENTRY_TEXT \
- ALIGN_FUNCTION(); \
- VMLINUX_SYMBOL(__entry_text_start) = .; \
-- *(.entry.text) \
-+ KEEP(*(.entry.text)) \
- VMLINUX_SYMBOL(__entry_text_end) = .;
-
- #define IRQENTRY_TEXT \
-@@ -603,7 +604,7 @@
- . = ALIGN(sbss_align); \
- .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \
- *(.dynsbss) \
-- *(.sbss) \
-+ *(.sbss .sbss.*) \
- *(.scommon) \
- }
-
diff --git a/target/linux/generic/hack-4.19/221-module_exports.patch b/target/linux/generic/hack-4.19/221-module_exports.patch
index 250bf1180f..cd5ae5830c 100644
--- a/target/linux/generic/hack-4.19/221-module_exports.patch
+++ b/target/linux/generic/hack-4.19/221-module_exports.patch
@@ -27,27 +27,27 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#define SYMTAB_DISCARD_GPL
+#endif
+
- #include <linux/export.h>
-
/* Align . to a 8 byte boundary equals to maximum function alignment. */
-@@ -341,14 +351,14 @@
+ #define ALIGN_FUNCTION() . = ALIGN(8)
+
+@@ -372,14 +382,14 @@
/* Kernel symbol table: Normal symbols */ \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
- VMLINUX_SYMBOL(__start___ksymtab) = .; \
+ __start___ksymtab = .; \
- KEEP(*(SORT(___ksymtab+*))) \
+ SYMTAB_KEEP \
- VMLINUX_SYMBOL(__stop___ksymtab) = .; \
+ __stop___ksymtab = .; \
} \
\
/* Kernel symbol table: GPL-only symbols */ \
__ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
- VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
+ __start___ksymtab_gpl = .; \
- KEEP(*(SORT(___ksymtab_gpl+*))) \
+ SYMTAB_KEEP_GPL \
- VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
+ __stop___ksymtab_gpl = .; \
} \
\
-@@ -410,7 +420,7 @@
+@@ -441,7 +451,7 @@
\
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} \
\
/* __*init sections */ \
-@@ -793,6 +803,8 @@
+@@ -841,6 +851,8 @@
EXIT_TEXT \
EXIT_DATA \
EXIT_CALL \
@@ -67,8 +67,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
--- a/include/linux/export.h
+++ b/include/linux/export.h
-@@ -60,12 +60,19 @@ extern struct module __this_module;
- #define __CRC_SYMBOL(sym, sec)
+@@ -74,12 +74,19 @@ struct kernel_symbol {
+ };
#endif
+#ifdef MODULE
@@ -82,15 +82,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
extern typeof(sym) sym; \
__CRC_SYMBOL(sym, sec) \
static const char __kstrtab_##sym[] \
-- __attribute__((section("__ksymtab_strings"), aligned(1))) \
+- __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
+ __attribute__((section("__ksymtab_strings" \
-+ __EXPORT_SUFFIX(sym)), aligned(1))) \
- = VMLINUX_SYMBOL_STR(sym); \
- static const struct kernel_symbol __ksymtab_##sym \
- __used \
++ __EXPORT_SUFFIX(sym)), used, aligned(1))) \
+ = #sym; \
+ __KSYMTAB_ENTRY(sym, sec)
+
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
-@@ -432,7 +432,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+@@ -408,7 +408,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
# Linker scripts preprocessor (.lds.S -> .lds)
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds_S = LDS $@
diff --git a/target/linux/generic/hack-4.19/230-openwrt_lzma_options.patch b/target/linux/generic/hack-4.19/230-openwrt_lzma_options.patch
index 3ae578c271..b45ed1184f 100644
--- a/target/linux/generic/hack-4.19/230-openwrt_lzma_options.patch
+++ b/target/linux/generic/hack-4.19/230-openwrt_lzma_options.patch
@@ -8,7 +8,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
lib/decompress.c | 1 +
scripts/Makefile.lib | 2 +-
- scripts/gen_initramfs_list.sh | 10 +++++-----
+ usr/gen_initramfs_list.sh | 10 +++++-----
3 files changed, 7 insertions(+), 6 deletions(-)
--- a/lib/decompress.c
@@ -23,7 +23,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{ {0x02, 0x21}, "lz4", unlz4 },
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
-@@ -348,7 +348,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
+@@ -324,7 +324,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
quiet_cmd_lzma = LZMA $@
cmd_lzma = (cat $(filter-out FORCE,$^) | \
@@ -32,8 +32,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
(rm -f $@ ; false)
quiet_cmd_lzo = LZO $@
---- a/scripts/gen_initramfs_list.sh
-+++ b/scripts/gen_initramfs_list.sh
+--- a/usr/gen_initramfs_list.sh
++++ b/usr/gen_initramfs_list.sh
@@ -229,7 +229,7 @@ cpio_list=
output="/dev/stdout"
output_file=""
diff --git a/target/linux/generic/hack-4.19/250-netfilter_depends.patch b/target/linux/generic/hack-4.19/250-netfilter_depends.patch
index a8fe5d4175..b29ca5190e 100644
--- a/target/linux/generic/hack-4.19/250-netfilter_depends.patch
+++ b/target/linux/generic/hack-4.19/250-netfilter_depends.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
-@@ -229,7 +229,6 @@ config NF_CONNTRACK_FTP
+@@ -241,7 +241,6 @@ config NF_CONNTRACK_FTP
config NF_CONNTRACK_H323
tristate "H.323 protocol support"
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on NETFILTER_ADVANCED
help
H.323 is a VoIP signalling protocol from ITU-T. As one of the most
-@@ -1052,7 +1051,6 @@ config NETFILTER_XT_TARGET_SECMARK
+@@ -1076,7 +1075,6 @@ config NETFILTER_XT_TARGET_SECMARK
config NETFILTER_XT_TARGET_TCPMSS
tristate '"TCPMSS" target support'
diff --git a/target/linux/generic/hack-4.19/251-sound_kconfig.patch b/target/linux/generic/hack-4.19/251-sound_kconfig.patch
index 5bf5c01ad3..2cfc2fab3a 100644
--- a/target/linux/generic/hack-4.19/251-sound_kconfig.patch
+++ b/target/linux/generic/hack-4.19/251-sound_kconfig.patch
@@ -63,17 +63,17 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
-@@ -15,6 +15,7 @@ menuconfig BCMA
+@@ -16,6 +16,7 @@ if BCMA
+ # Support for Block-I/O. SELECT this from the driver that needs it.
config BCMA_BLOCKIO
bool
- depends on BCMA
+ default y
config BCMA_HOST_PCI_POSSIBLE
bool
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
-@@ -29,6 +29,7 @@ config SSB_SPROM
+@@ -28,6 +28,7 @@ config SSB_SPROM
config SSB_BLOCKIO
bool
depends on SSB
@@ -81,7 +81,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
config SSB_PCIHOST_POSSIBLE
bool
-@@ -49,7 +50,7 @@ config SSB_PCIHOST
+@@ -48,7 +49,7 @@ config SSB_PCIHOST
config SSB_B43_PCI_BRIDGE
bool
depends on SSB_PCIHOST
@@ -92,12 +92,12 @@ Signed-off-by: John Crispin <john@phrozen.org>
bool
--- a/lib/Kconfig
+++ b/lib/Kconfig
-@@ -358,16 +358,16 @@ config BCH_CONST_T
+@@ -377,16 +377,16 @@ config BCH_CONST_T
# Textsearch support is select'ed if needed
#
config TEXTSEARCH
- bool
-+ boolean "Textsearch support"
++ bool "Textsearch support"
config TEXTSEARCH_KMP
- tristate
@@ -146,8 +146,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
config CFG80211
tristate "cfg80211 - wireless configuration API"
-@@ -188,7 +188,7 @@ config CFG80211_WEXT_EXPORT
- wext compatibility symbols to be exported.
+@@ -202,7 +202,7 @@ config CFG80211_WEXT_EXPORT
+ endif # CFG80211
config LIB80211
- tristate
@@ -155,7 +155,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
default n
help
This options enables a library of common routines used
-@@ -197,13 +197,16 @@ config LIB80211
+@@ -211,13 +211,16 @@ config LIB80211
Drivers should select this themselves if needed.
config LIB80211_CRYPT_WEP
diff --git a/target/linux/generic/hack-4.19/259-regmap_dynamic.patch b/target/linux/generic/hack-4.19/259-regmap_dynamic.patch
index 458b7c35a1..1c5e1164e2 100644
--- a/target/linux/generic/hack-4.19/259-regmap_dynamic.patch
+++ b/target/linux/generic/hack-4.19/259-regmap_dynamic.patch
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config REGCACHE_COMPRESSED
select LZO_COMPRESS
-@@ -17,23 +16,30 @@ config REGMAP_AC97
+@@ -17,7 +16,8 @@ config REGMAP_AC97
tristate
config REGMAP_I2C
@@ -34,6 +34,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ select REGMAP
depends on I2C
+ config REGMAP_SLIMBUS
+@@ -25,21 +25,27 @@ config REGMAP_SLIMBUS
+ depends on SLIMBUS
+
config REGMAP_SPI
- tristate
+ tristate "Regmap SPI"
@@ -59,6 +63,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config REGMAP_IRQ
+ select REGMAP
bool
+
+ config REGMAP_SOUNDWIRE
--- a/drivers/base/regmap/Makefile
+++ b/drivers/base/regmap/Makefile
@@ -2,10 +2,14 @@
@@ -79,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+obj-$(CONFIG_REGMAP) += regmap-core.o
obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
- obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
+ obj-$(CONFIG_REGMAP_SLIMBUS) += regmap-slimbus.o
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -13,6 +13,7 @@
@@ -90,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/of.h>
-@@ -2926,3 +2927,5 @@ static int __init regmap_initcall(void)
+@@ -3037,3 +3038,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);
@@ -98,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+MODULE_LICENSE("GPL");
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
-@@ -139,7 +139,7 @@ struct reg_sequence {
+@@ -187,7 +187,7 @@ struct reg_sequence {
pollret ?: ((cond) ? 0 : -ETIMEDOUT); \
})
diff --git a/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch b/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch
index 8523fc5374..f11f45437f 100644
--- a/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch
+++ b/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
-@@ -143,13 +143,13 @@ config CRYPTO_MANAGER
+@@ -144,13 +144,13 @@ config CRYPTO_MANAGER
cbc(aes).
config CRYPTO_MANAGER2
@@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config CRYPTO_USER
tristate "Userspace cryptographic algorithm configuration"
-@@ -162,7 +162,6 @@ config CRYPTO_USER
+@@ -163,7 +163,6 @@ config CRYPTO_USER
config CRYPTO_MANAGER_DISABLE_TESTS
bool "Disable run-time self tests"
default y
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
algorithm registration.
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
-@@ -248,8 +248,12 @@ static int cryptomgr_schedule_test(struc
+@@ -247,8 +247,12 @@ static int cryptomgr_schedule_test(struc
type = alg->cra_flags;
/* Do not test internal algorithms. */
diff --git a/target/linux/generic/hack-4.19/280-rfkill-stubs.patch b/target/linux/generic/hack-4.19/280-rfkill-stubs.patch
index 85d01a6d10..7bb7d26b90 100644
--- a/target/linux/generic/hack-4.19/280-rfkill-stubs.patch
+++ b/target/linux/generic/hack-4.19/280-rfkill-stubs.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
-#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
+#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
/**
- * rfkill_alloc - allocate rfkill structure
+ * rfkill_alloc - Allocate rfkill structure
* @name: name of the struct -- the string is not copied internally
--- a/net/Makefile
+++ b/net/Makefile
diff --git a/target/linux/generic/hack-4.19/301-mips_image_cmdline_hack.patch b/target/linux/generic/hack-4.19/301-mips_image_cmdline_hack.patch
index eb6011e813..e7593f78e9 100644
--- a/target/linux/generic/hack-4.19/301-mips_image_cmdline_hack.patch
+++ b/target/linux/generic/hack-4.19/301-mips_image_cmdline_hack.patch
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -1158,6 +1158,10 @@ config SYNC_R4K
+@@ -1140,6 +1140,10 @@ config SYNC_R4K
config MIPS_MACHINE
def_bool n
diff --git a/target/linux/generic/hack-4.19/321-powerpc_crtsavres_prereq.patch b/target/linux/generic/hack-4.19/321-powerpc_crtsavres_prereq.patch
index 3f81b2e05f..26c385f011 100644
--- a/target/linux/generic/hack-4.19/321-powerpc_crtsavres_prereq.patch
+++ b/target/linux/generic/hack-4.19/321-powerpc_crtsavres_prereq.patch
@@ -16,7 +16,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
-@@ -59,19 +59,6 @@ machine-$(CONFIG_PPC64) += 64
+@@ -60,20 +60,6 @@ machine-$(CONFIG_PPC64) += 64
machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le
UTS_MACHINE := $(subst $(space),,$(machine-y))
@@ -24,6 +24,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
-ifdef CONFIG_PPC32
-KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
-else
+-KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/powerpc/kernel/module.lds
-ifeq ($(call ld-ifversion, -ge, 225000000, y),y)
-# Have the linker provide sfpr if possible.
-# There is a corresponding test in arch/powerpc/lib/Makefile
@@ -33,6 +34,6 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
-endif
-endif
-
- ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
- override LD += -EL
- LDEMULATION := lppc
+ ifdef CONFIG_CPU_LITTLE_ENDIAN
+ KBUILD_CFLAGS += -mlittle-endian
+ KBUILD_LDFLAGS += -EL
diff --git a/target/linux/generic/hack-4.19/640-bridge-only-accept-EAP-locally.patch b/target/linux/generic/hack-4.19/640-bridge-only-accept-EAP-locally.patch
index 0dbb8ee3c0..981d49b9c0 100644
--- a/target/linux/generic/hack-4.19/640-bridge-only-accept-EAP-locally.patch
+++ b/target/linux/generic/hack-4.19/640-bridge-only-accept-EAP-locally.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
-@@ -166,10 +166,14 @@ int br_handle_frame_finish(struct net *n
+@@ -110,10 +110,14 @@ int br_handle_frame_finish(struct net *n
}
}
@@ -28,4 +28,4 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- BR_INPUT_SKB_CB(skb)->brdev = br->dev;
BR_INPUT_SKB_CB(skb)->src_port_isolated = !!(p->flags & BR_ISOLATED);
- if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
+ if (IS_ENABLED(CONFIG_INET) &&
diff --git a/target/linux/generic/hack-4.19/647-netfilter-flow-acct.patch b/target/linux/generic/hack-4.19/647-netfilter-flow-acct.patch
index 290570fe9f..8b13a43fd5 100644
--- a/target/linux/generic/hack-4.19/647-netfilter-flow-acct.patch
+++ b/target/linux/generic/hack-4.19/647-netfilter-flow-acct.patch
@@ -19,7 +19,7 @@
struct flow_offload_entry {
struct flow_offload flow;
-@@ -151,6 +152,22 @@ void flow_offload_free(struct flow_offlo
+@@ -148,6 +149,22 @@ void flow_offload_free(struct flow_offlo
}
EXPORT_SYMBOL_GPL(flow_offload_free);
diff --git a/target/linux/generic/hack-4.19/650-netfilter-add-xt_OFFLOAD-target.patch b/target/linux/generic/hack-4.19/650-netfilter-add-xt_OFFLOAD-target.patch
index 2044bfaeb8..ab1bb6aa81 100644
--- a/target/linux/generic/hack-4.19/650-netfilter-add-xt_OFFLOAD-target.patch
+++ b/target/linux/generic/hack-4.19/650-netfilter-add-xt_OFFLOAD-target.patch
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
-@@ -76,8 +76,6 @@ config NF_TABLES_ARP
+@@ -63,8 +63,6 @@ config NF_TABLES_ARP
help
This option enables the ARP support for nf_tables.
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config NF_FLOW_TABLE_IPV4
tristate "Netfilter flow table IPv4 module"
depends on NF_FLOW_TABLE
-@@ -86,6 +84,8 @@ config NF_FLOW_TABLE_IPV4
+@@ -73,6 +71,8 @@ config NF_FLOW_TABLE_IPV4
To compile it as a module, choose M here.
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on !NF_CONNTRACK || NF_CONNTRACK
--- a/net/ipv6/netfilter/Kconfig
+++ b/net/ipv6/netfilter/Kconfig
-@@ -97,7 +97,6 @@ config NFT_FIB_IPV6
+@@ -80,7 +80,6 @@ config NFT_FIB_IPV6
multicast or blackhole.
endif # NF_TABLES_IPV6
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config NF_FLOW_TABLE_IPV6
tristate "Netfilter flow table IPv6 module"
-@@ -107,6 +106,8 @@ config NF_FLOW_TABLE_IPV6
+@@ -90,6 +89,8 @@ config NF_FLOW_TABLE_IPV6
To compile it as a module, choose M here.
@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on !NF_CONNTRACK || NF_CONNTRACK
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
-@@ -671,8 +671,6 @@ config NFT_FIB_NETDEV
+@@ -693,8 +693,6 @@ config NFT_FIB_NETDEV
endif # NF_TABLES_NETDEV
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config NF_FLOW_TABLE_INET
tristate "Netfilter flow table mixed IPv4/IPv6 module"
depends on NF_FLOW_TABLE
-@@ -681,11 +679,12 @@ config NF_FLOW_TABLE_INET
+@@ -703,11 +701,12 @@ config NF_FLOW_TABLE_INET
To compile it as a module, choose M here.
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
This option adds the flow table core infrastructure.
-@@ -974,6 +973,15 @@ config NETFILTER_XT_TARGET_NOTRACK
+@@ -996,6 +995,15 @@ config NETFILTER_XT_TARGET_NOTRACK
depends on NETFILTER_ADVANCED
select NETFILTER_XT_TARGET_CT
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on NETFILTER_ADVANCED
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
-@@ -134,6 +134,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
+@@ -144,6 +144,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
diff --git a/target/linux/generic/hack-4.19/651-wireless_mesh_header.patch b/target/linux/generic/hack-4.19/651-wireless_mesh_header.patch
index f545d8ebbc..965b431d01 100644
--- a/target/linux/generic/hack-4.19/651-wireless_mesh_header.patch
+++ b/target/linux/generic/hack-4.19/651-wireless_mesh_header.patch
@@ -11,7 +11,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -138,8 +138,8 @@ static inline bool dev_xmit_complete(int
+@@ -140,8 +140,8 @@ static inline bool dev_xmit_complete(int
#if defined(CONFIG_HYPERV_NET)
# define LL_MAX_HEADER 128
diff --git a/target/linux/generic/hack-4.19/660-fq_codel_defaults.patch b/target/linux/generic/hack-4.19/660-fq_codel_defaults.patch
index b923a2d206..42698c6451 100644
--- a/target/linux/generic/hack-4.19/660-fq_codel_defaults.patch
+++ b/target/linux/generic/hack-4.19/660-fq_codel_defaults.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
-@@ -471,7 +471,11 @@ static int fq_codel_init(struct Qdisc *s
+@@ -474,7 +474,11 @@ static int fq_codel_init(struct Qdisc *s
sch->limit = 10*1024;
q->flows_cnt = 1024;
diff --git a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch
index d1e92ae40a..ce9d4b14f0 100644
--- a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch
+++ b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
-@@ -368,12 +368,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -486,12 +486,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
extern struct Qdisc_ops pfifo_fast_ops;
extern struct Qdisc_ops mq_qdisc_ops;
extern struct Qdisc_ops noqueue_qdisc_ops;
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -3,8 +3,9 @@
- #
+ #
menuconfig NET_SCHED
- bool "QoS and/or fair queueing"
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
device, it has to decide which ones to send first, which ones to
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
-@@ -2028,7 +2028,7 @@ static int __init pktsched_init(void)
+@@ -2157,7 +2157,7 @@ static int __init pktsched_init(void)
return err;
}
@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
register_qdisc(&pfifo_head_drop_qdisc_ops);
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
-@@ -700,7 +700,7 @@ static const struct Qdisc_class_ops fq_c
+@@ -716,7 +716,7 @@ static const struct Qdisc_class_ops fq_c
.walk = fq_codel_walk,
};
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
.cl_ops = &fq_codel_class_ops,
.id = "fq_codel",
.priv_size = sizeof(struct fq_codel_sched_data),
-@@ -715,6 +715,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
+@@ -731,6 +731,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
.dump_stats = fq_codel_dump_stats,
.owner = THIS_MODULE,
};
@@ -74,8 +74,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
{
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
-@@ -32,7 +32,7 @@
- #include <trace/events/qdisc.h>
+@@ -35,7 +35,7 @@
+ #include <net/xfrm.h>
/* Qdisc to use by default */
-const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops;
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
EXPORT_SYMBOL(default_qdisc_ops);
/* Main transmission queue. */
-@@ -760,7 +760,7 @@ static void attach_one_default_qdisc(str
+@@ -1005,7 +1005,7 @@ static void attach_one_default_qdisc(str
void *_unused)
{
struct Qdisc *qdisc;
diff --git a/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch b/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch
index 7b6e38da29..8f54c516f9 100644
--- a/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch
+++ b/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
-@@ -453,146 +453,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
+@@ -595,208 +595,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
.owner = THIS_MODULE,
};
@@ -26,93 +26,103 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
-/*
- * Private data for a pfifo_fast scheduler containing:
-- * - queues for the three band
-- * - bitmap indicating which of the bands contain skbs
+- * - rings for priority bands
- */
-struct pfifo_fast_priv {
-- u32 bitmap;
-- struct qdisc_skb_head q[PFIFO_FAST_BANDS];
+- struct skb_array q[PFIFO_FAST_BANDS];
-};
-
--/*
-- * Convert a bitmap to the first band number where an skb is queued, where:
-- * bitmap=0 means there are no skbs on any band.
-- * bitmap=1 means there is an skb on band 0.
-- * bitmap=7 means there are skbs on all 3 bands, etc.
-- */
--static const int bitmap2band[] = {-1, 0, 1, 0, 2, 0, 1, 0};
--
--static inline struct qdisc_skb_head *band2list(struct pfifo_fast_priv *priv,
-- int band)
+-static inline struct skb_array *band2list(struct pfifo_fast_priv *priv,
+- int band)
-{
-- return priv->q + band;
+- return &priv->q[band];
-}
-
-static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc,
- struct sk_buff **to_free)
-{
-- if (qdisc->q.qlen < qdisc_dev(qdisc)->tx_queue_len) {
-- int band = prio2band[skb->priority & TC_PRIO_MAX];
-- struct pfifo_fast_priv *priv = qdisc_priv(qdisc);
-- struct qdisc_skb_head *list = band2list(priv, band);
--
-- priv->bitmap |= (1 << band);
-- qdisc->q.qlen++;
-- return __qdisc_enqueue_tail(skb, qdisc, list);
-- }
+- int band = prio2band[skb->priority & TC_PRIO_MAX];
+- struct pfifo_fast_priv *priv = qdisc_priv(qdisc);
+- struct skb_array *q = band2list(priv, band);
+- unsigned int pkt_len = qdisc_pkt_len(skb);
+- int err;
-
-- return qdisc_drop(skb, qdisc, to_free);
+- err = skb_array_produce(q, skb);
+-
+- if (unlikely(err))
+- return qdisc_drop_cpu(skb, qdisc, to_free);
+-
+- qdisc_qstats_cpu_qlen_inc(qdisc);
+- /* Note: skb can not be used after skb_array_produce(),
+- * so we better not use qdisc_qstats_cpu_backlog_inc()
+- */
+- this_cpu_add(qdisc->cpu_qstats->backlog, pkt_len);
+- return NET_XMIT_SUCCESS;
-}
-
-static struct sk_buff *pfifo_fast_dequeue(struct Qdisc *qdisc)
-{
- struct pfifo_fast_priv *priv = qdisc_priv(qdisc);
-- int band = bitmap2band[priv->bitmap];
+- struct sk_buff *skb = NULL;
+- int band;
-
-- if (likely(band >= 0)) {
-- struct qdisc_skb_head *qh = band2list(priv, band);
-- struct sk_buff *skb = __qdisc_dequeue_head(qh);
+- for (band = 0; band < PFIFO_FAST_BANDS && !skb; band++) {
+- struct skb_array *q = band2list(priv, band);
-
-- if (likely(skb != NULL)) {
-- qdisc_qstats_backlog_dec(qdisc, skb);
-- qdisc_bstats_update(qdisc, skb);
-- }
+- if (__skb_array_empty(q))
+- continue;
-
-- qdisc->q.qlen--;
-- if (qh->qlen == 0)
-- priv->bitmap &= ~(1 << band);
--
-- return skb;
+- skb = __skb_array_consume(q);
+- }
+- if (likely(skb)) {
+- qdisc_qstats_cpu_backlog_dec(qdisc, skb);
+- qdisc_bstats_cpu_update(qdisc, skb);
+- qdisc_qstats_cpu_qlen_dec(qdisc);
- }
-
-- return NULL;
+- return skb;
-}
-
-static struct sk_buff *pfifo_fast_peek(struct Qdisc *qdisc)
-{
- struct pfifo_fast_priv *priv = qdisc_priv(qdisc);
-- int band = bitmap2band[priv->bitmap];
+- struct sk_buff *skb = NULL;
+- int band;
-
-- if (band >= 0) {
-- struct qdisc_skb_head *qh = band2list(priv, band);
+- for (band = 0; band < PFIFO_FAST_BANDS && !skb; band++) {
+- struct skb_array *q = band2list(priv, band);
-
-- return qh->head;
+- skb = __skb_array_peek(q);
- }
-
-- return NULL;
+- return skb;
-}
-
-static void pfifo_fast_reset(struct Qdisc *qdisc)
-{
-- int prio;
+- int i, band;
- struct pfifo_fast_priv *priv = qdisc_priv(qdisc);
-
-- for (prio = 0; prio < PFIFO_FAST_BANDS; prio++)
-- __qdisc_reset_queue(band2list(priv, prio));
+- for (band = 0; band < PFIFO_FAST_BANDS; band++) {
+- struct skb_array *q = band2list(priv, band);
+- struct sk_buff *skb;
+-
+- /* NULL ring is possible if destroy path is due to a failed
+- * skb_array_init() in pfifo_fast_init() case.
+- */
+- if (!q->ring.queue)
+- continue;
+-
+- while ((skb = __skb_array_consume(q)) != NULL)
+- kfree_skb(skb);
+- }
+-
+- for_each_possible_cpu(i) {
+- struct gnet_stats_queue *q = per_cpu_ptr(qdisc->cpu_qstats, i);
-
-- priv->bitmap = 0;
-- qdisc->qstats.backlog = 0;
-- qdisc->q.qlen = 0;
+- q->backlog = 0;
+- q->qlen = 0;
+- }
-}
-
-static int pfifo_fast_dump(struct Qdisc *qdisc, struct sk_buff *skb)
@@ -128,19 +138,68 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- return -1;
-}
-
--static int pfifo_fast_init(struct Qdisc *qdisc, struct nlattr *opt)
+-static int pfifo_fast_init(struct Qdisc *qdisc, struct nlattr *opt,
+- struct netlink_ext_ack *extack)
-{
-- int prio;
+- unsigned int qlen = qdisc_dev(qdisc)->tx_queue_len;
- struct pfifo_fast_priv *priv = qdisc_priv(qdisc);
+- int prio;
-
-- for (prio = 0; prio < PFIFO_FAST_BANDS; prio++)
-- qdisc_skb_head_init(band2list(priv, prio));
+- /* guard against zero length rings */
+- if (!qlen)
+- return -EINVAL;
+-
+- for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) {
+- struct skb_array *q = band2list(priv, prio);
+- int err;
+-
+- err = skb_array_init(q, qlen, GFP_KERNEL);
+- if (err)
+- return -ENOMEM;
+- }
-
- /* Can by-pass the queue discipline */
- qdisc->flags |= TCQ_F_CAN_BYPASS;
- return 0;
-}
-
+-static void pfifo_fast_destroy(struct Qdisc *sch)
+-{
+- struct pfifo_fast_priv *priv = qdisc_priv(sch);
+- int prio;
+-
+- for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) {
+- struct skb_array *q = band2list(priv, prio);
+-
+- /* NULL ring is possible if destroy path is due to a failed
+- * skb_array_init() in pfifo_fast_init() case.
+- */
+- if (!q->ring.queue)
+- continue;
+- /* Destroy ring but no need to kfree_skb because a call to
+- * pfifo_fast_reset() has already done that work.
+- */
+- ptr_ring_cleanup(&q->ring, NULL);
+- }
+-}
+-
+-static int pfifo_fast_change_tx_queue_len(struct Qdisc *sch,
+- unsigned int new_len)
+-{
+- struct pfifo_fast_priv *priv = qdisc_priv(sch);
+- struct skb_array *bands[PFIFO_FAST_BANDS];
+- int prio;
+-
+- for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) {
+- struct skb_array *q = band2list(priv, prio);
+-
+- bands[prio] = q;
+- }
+-
+- return skb_array_resize_multiple(bands, PFIFO_FAST_BANDS, new_len,
+- GFP_KERNEL);
+-}
+-
-struct Qdisc_ops pfifo_fast_ops __read_mostly = {
- .id = "pfifo_fast",
- .priv_size = sizeof(struct pfifo_fast_priv),
@@ -148,9 +207,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- .dequeue = pfifo_fast_dequeue,
- .peek = pfifo_fast_peek,
- .init = pfifo_fast_init,
+- .destroy = pfifo_fast_destroy,
- .reset = pfifo_fast_reset,
- .dump = pfifo_fast_dump,
+- .change_tx_queue_len = pfifo_fast_change_tx_queue_len,
- .owner = THIS_MODULE,
+- .static_flags = TCQ_F_NOLOCK | TCQ_F_CPUSTATS,
-};
-EXPORT_SYMBOL(pfifo_fast_ops);
-
diff --git a/target/linux/generic/hack-4.19/700-swconfig_switch_drivers.patch b/target/linux/generic/hack-4.19/700-swconfig_switch_drivers.patch
index f9df475500..ebfcfe81c7 100644
--- a/target/linux/generic/hack-4.19/700-swconfig_switch_drivers.patch
+++ b/target/linux/generic/hack-4.19/700-swconfig_switch_drivers.patch
@@ -12,8 +12,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
-@@ -198,6 +198,89 @@ config LED_TRIGGER_PHY
- <Speed in megabits>Mbps or <Speed in gigabits>Gbps
+@@ -209,6 +209,89 @@ config LED_TRIGGER_PHY
+ for any speed known to the PHY.
+comment "Switch configuration API + drivers"
@@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
--- a/include/linux/platform_data/b53.h
+++ b/include/linux/platform_data/b53.h
-@@ -25,6 +25,9 @@ struct b53_platform_data {
+@@ -29,6 +29,9 @@ struct b53_platform_data {
u32 chip_id;
u16 enabled_ports;
diff --git a/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch
index 0453112a1f..31efb35a97 100644
--- a/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch
+++ b/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch
@@ -1,6 +1,6 @@
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -547,6 +547,12 @@ struct phy_driver {
+@@ -548,6 +548,12 @@ struct phy_driver {
/* Determines the negotiated speed and duplex */
int (*read_status)(struct phy_device *phydev);
@@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1458,6 +1458,9 @@ int genphy_update_link(struct phy_device
+@@ -1509,6 +1509,9 @@ int genphy_update_link(struct phy_device
{
int status;
diff --git a/target/linux/generic/hack-4.19/721-phy_packets.patch b/target/linux/generic/hack-4.19/721-phy_packets.patch
index d27d94e046..77a573446d 100644
--- a/target/linux/generic/hack-4.19/721-phy_packets.patch
+++ b/target/linux/generic/hack-4.19/721-phy_packets.patch
@@ -15,24 +15,24 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1410,6 +1410,7 @@ enum netdev_priv_flags {
- IFF_RXFH_CONFIGURED = 1<<25,
- IFF_PHONY_HEADROOM = 1<<26,
- IFF_MACSEC = 1<<27,
-+ IFF_NO_IP_ALIGN = 1<<28,
+@@ -1510,6 +1510,7 @@ enum netdev_priv_flags {
+ IFF_NO_RX_HANDLER = 1<<26,
+ IFF_FAILOVER = 1<<27,
+ IFF_FAILOVER_SLAVE = 1<<28,
++ IFF_NO_IP_ALIGN = 1<<29,
};
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
-@@ -1439,6 +1440,7 @@ enum netdev_priv_flags {
- #define IFF_TEAM IFF_TEAM
- #define IFF_RXFH_CONFIGURED IFF_RXFH_CONFIGURED
- #define IFF_MACSEC IFF_MACSEC
+@@ -1540,6 +1541,7 @@ enum netdev_priv_flags {
+ #define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER
+ #define IFF_FAILOVER IFF_FAILOVER
+ #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
+#define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN
/**
* struct net_device - The DEVICE structure.
-@@ -1725,6 +1727,11 @@ struct net_device {
- const struct xfrmdev_ops *xfrmdev_ops;
+@@ -1838,6 +1840,11 @@ struct net_device {
+ const struct tlsdev_ops *tlsdev_ops;
#endif
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
@@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
const struct header_ops *header_ops;
unsigned int flags;
-@@ -1794,6 +1801,10 @@ struct net_device {
+@@ -1913,6 +1920,10 @@ struct net_device {
struct mpls_dev __rcu *mpls_ptr;
#endif
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2512,6 +2512,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -2516,6 +2516,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
-@@ -2642,16 +2646,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -2646,16 +2650,6 @@ static inline struct sk_buff *dev_alloc_
}
@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -3004,10 +3004,20 @@ static int xmit_one(struct sk_buff *skb,
+@@ -3233,10 +3233,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);
diff --git a/target/linux/generic/hack-4.19/773-bgmac-add-srab-switch.patch b/target/linux/generic/hack-4.19/773-bgmac-add-srab-switch.patch
index 33a18a8352..3b4781657e 100644
--- a/target/linux/generic/hack-4.19/773-bgmac-add-srab-switch.patch
+++ b/target/linux/generic/hack-4.19/773-bgmac-add-srab-switch.patch
@@ -32,7 +32,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <linux/bcm47xx_nvram.h>
#include <linux/phy.h>
#include <linux/phy_fixed.h>
-@@ -1410,6 +1411,17 @@ static const struct ethtool_ops bgmac_et
+@@ -1409,6 +1410,17 @@ static const struct ethtool_ops bgmac_et
.set_link_ksettings = phy_ethtool_set_link_ksettings,
};
@@ -50,7 +50,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/**************************************************
* MII
**************************************************/
-@@ -1539,6 +1551,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
+@@ -1540,6 +1552,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
net_dev->hw_features = net_dev->features;
net_dev->vlan_features = net_dev->features;
@@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
err = register_netdev(bgmac->net_dev);
if (err) {
dev_err(bgmac->dev, "Cannot register net device\n");
-@@ -1561,6 +1581,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
+@@ -1562,6 +1582,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
void bgmac_enet_remove(struct bgmac *bgmac)
{
diff --git a/target/linux/generic/hack-4.19/835-misc-owl_loader.patch b/target/linux/generic/hack-4.19/835-misc-owl_loader.patch
index bf7f7d5cba..bf0fa596ac 100644
--- a/target/linux/generic/hack-4.19/835-misc-owl_loader.patch
+++ b/target/linux/generic/hack-4.19/835-misc-owl_loader.patch
@@ -21,7 +21,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
-@@ -151,6 +151,18 @@ config SGI_IOC4
+@@ -164,6 +164,18 @@ config SGI_IOC4
If you have an SGI Altix with an IOC4-based card say Y.
Otherwise say N.
@@ -42,10 +42,10 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
depends on PCI
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
-@@ -13,6 +13,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib
+@@ -14,6 +14,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib
obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o
obj-$(CONFIG_ICS932S401) += ics932s401.o
- obj-$(CONFIG_LKDTM) += lkdtm.o
+ obj-$(CONFIG_LKDTM) += lkdtm/
+obj-$(CONFIG_OWL_LOADER) += owl-loader.o
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
diff --git a/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch
index d250843a6a..e949964cbf 100644
--- a/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch
+++ b/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/Kconfig
+++ b/net/Kconfig
-@@ -97,6 +97,9 @@ source "net/netlabel/Kconfig"
+@@ -98,6 +98,9 @@ source "net/netlabel/Kconfig"
endif # if INET
@@ -34,15 +34,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
- sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
+ dev_ioctl.o tso.o sock_reuseport.o \
- fib_notifier.o
+ fib_notifier.o xdp.o
-+obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
++obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
obj-y += net-sysfs.o
+ obj-$(CONFIG_PAGE_POOL) += page_pool.o
obj-$(CONFIG_PROC_FS) += net-procfs.o
- obj-$(CONFIG_NET_PKTGEN) += pktgen.o
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -528,6 +528,18 @@ discard_and_relse:
+@@ -490,6 +490,18 @@ discard_and_relse:
}
EXPORT_SYMBOL(__sk_receive_skb);
@@ -61,10 +61,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
-@@ -1595,9 +1607,11 @@ void sk_destruct(struct sock *sk)
+@@ -1600,9 +1612,11 @@ static void __sk_free(struct sock *sk)
+ if (likely(sk->sk_net_refcnt))
+ sock_inuse_add(sock_net(sk), -1);
- static void __sk_free(struct sock *sk)
- {
+#ifdef CONFIG_SOCK_DIAG
if (unlikely(sk->sk_net_refcnt && sock_diag_has_destroy_listeners(sk)))
sock_diag_broadcast_destroy(sk);
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock_diag.c
+++ b/net/core/sock_diag.c
-@@ -19,18 +19,6 @@ static int (*inet_rcv_compat)(struct sk_
+@@ -20,18 +20,6 @@ static int (*inet_rcv_compat)(struct sk_
static DEFINE_MUTEX(sock_diag_table_mutex);
static struct workqueue_struct *broadcast_wq;
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u64 res;
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
-@@ -420,6 +420,7 @@ config INET_XFRM_MODE_BEET
+@@ -425,6 +425,7 @@ config INET_XFRM_MODE_BEET
config INET_DIAG
tristate "INET: socket monitoring interface"
diff --git a/target/linux/generic/hack-4.19/902-debloat_proc.patch b/target/linux/generic/hack-4.19/902-debloat_proc.patch
index cae6d66e7d..6f4d264f35 100644
--- a/target/linux/generic/hack-4.19/902-debloat_proc.patch
+++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch
@@ -29,18 +29,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/fs/locks.c
+++ b/fs/locks.c
-@@ -2812,6 +2812,8 @@ static const struct file_operations proc
+@@ -2786,6 +2786,8 @@ static const struct seq_operations locks
static int __init proc_locks_init(void)
{
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
+ return 0;
- proc_create("locks", 0, NULL, &proc_locks_operations);
+ proc_create_seq_private("locks", 0, NULL, &locks_seq_operations,
+ sizeof(struct locks_iterator), NULL);
return 0;
- }
--- a/fs/proc/Kconfig
+++ b/fs/proc/Kconfig
-@@ -81,3 +81,8 @@ config PROC_CHILDREN
+@@ -97,3 +97,8 @@ config PROC_CHILDREN
Say Y if you are running any user-space software which takes benefit from
this interface. For example, rkt is such a piece of software.
@@ -51,19 +51,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ bool "Strip non-essential /proc functionality to reduce code size"
--- a/fs/proc/consoles.c
+++ b/fs/proc/consoles.c
-@@ -106,6 +106,9 @@ static const struct file_operations proc
+@@ -93,6 +93,9 @@ static const struct seq_operations conso
static int __init proc_consoles_init(void)
{
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
+ return 0;
+
- proc_create("consoles", 0, NULL, &proc_consoles_operations);
+ proc_create_seq("consoles", 0, NULL, &consoles_op);
return 0;
}
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
-@@ -145,7 +145,10 @@ static const struct file_operations proc
+@@ -133,7 +133,10 @@ static const struct seq_operations tty_d
void proc_tty_register_driver(struct tty_driver *driver)
{
struct proc_dir_entry *ent;
@@ -73,9 +73,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ return;
+
if (!driver->driver_name || driver->proc_entry ||
- !driver->ops->proc_fops)
+ !driver->ops->proc_show)
return;
-@@ -162,6 +165,9 @@ void proc_tty_unregister_driver(struct t
+@@ -150,6 +153,9 @@ void proc_tty_unregister_driver(struct t
{
struct proc_dir_entry *ent;
@@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ent = driver->proc_entry;
if (!ent)
return;
-@@ -176,6 +182,9 @@ void proc_tty_unregister_driver(struct t
+@@ -164,6 +170,9 @@ void proc_tty_unregister_driver(struct t
*/
void __init proc_tty_init(void)
{
@@ -132,30 +132,30 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
do { \
--- a/ipc/msg.c
+++ b/ipc/msg.c
-@@ -1208,6 +1208,9 @@ int __init msg_init(void)
+@@ -1291,6 +1291,9 @@ void __init msg_init(void)
{
- const int err = msg_init_ns(&init_ipc_ns);
+ msg_init_ns(&init_ipc_ns);
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
-+ return err;
++ return;
+
ipc_init_proc_interface("sysvipc/msg",
" key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n",
IPC_MSG_IDS, sysvipc_msg_proc_show);
--- a/ipc/sem.c
+++ b/ipc/sem.c
-@@ -207,6 +207,8 @@ int __init sem_init(void)
+@@ -243,6 +243,8 @@ void sem_exit_ns(struct ipc_namespace *n
+ void __init sem_init(void)
{
- const int err = sem_init_ns(&init_ipc_ns);
-
+ sem_init_ns(&init_ipc_ns);
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
-+ return err;
++ return;
ipc_init_proc_interface("sysvipc/sem",
" key semid perms nsems uid gid cuid cgid otime ctime\n",
IPC_SEM_IDS, sysvipc_sem_proc_show);
--- a/ipc/shm.c
+++ b/ipc/shm.c
-@@ -122,6 +122,8 @@ pure_initcall(ipc_ns_init);
+@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init);
void __init shm_init(void)
{
@@ -166,7 +166,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
" key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n",
--- a/ipc/util.c
+++ b/ipc/util.c
-@@ -141,6 +141,9 @@ void __init ipc_init_proc_interface(cons
+@@ -140,6 +140,9 @@ void __init ipc_init_proc_interface(cons
struct proc_dir_entry *pde;
struct ipc_proc_iface *iface;
@@ -178,18 +178,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return;
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
-@@ -42,6 +42,8 @@ static const struct file_operations exec
+@@ -29,6 +29,8 @@ static int execdomains_proc_show(struct
static int __init proc_execdomains_init(void)
{
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
+ return 0;
- proc_create("execdomains", 0, NULL, &execdomains_proc_fops);
+ proc_create_single("execdomains", 0, NULL, execdomains_proc_show);
return 0;
}
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
-@@ -396,6 +396,9 @@ void register_irq_proc(unsigned int irq,
+@@ -333,6 +333,9 @@ void register_irq_proc(unsigned int irq,
void __maybe_unused *irqp = (void *)(unsigned long) irq;
char name [MAX_NAMELEN];
@@ -199,7 +199,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip))
return;
-@@ -449,6 +452,9 @@ void unregister_irq_proc(unsigned int ir
+@@ -386,6 +389,9 @@ void unregister_irq_proc(unsigned int ir
{
char name [MAX_NAMELEN];
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!root_irq_dir || !desc->dir)
return;
#ifdef CONFIG_SMP
-@@ -487,6 +493,9 @@ void init_irq_proc(void)
+@@ -424,6 +430,9 @@ void init_irq_proc(void)
unsigned int irq;
struct irq_desc *desc;
@@ -221,47 +221,47 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!root_irq_dir)
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
-@@ -389,6 +389,8 @@ static int __init init_timer_list_procfs
+@@ -374,6 +374,8 @@ static int __init init_timer_list_procfs
{
struct proc_dir_entry *pe;
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
+ return 0;
- pe = proc_create("timer_list", 0444, NULL, &timer_list_fops);
+ pe = proc_create_seq_private("timer_list", 0400, NULL, &timer_list_sops,
+ sizeof(struct timer_list_iter), NULL);
if (!pe)
- return -ENOMEM;
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
-@@ -2770,6 +2770,8 @@ static const struct file_operations proc
+@@ -2736,6 +2736,8 @@ static const struct seq_operations vmall
static int __init proc_vmalloc_init(void)
{
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED))
+ return 0;
- proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations);
- return 0;
- }
+ if (IS_ENABLED(CONFIG_NUMA))
+ proc_create_seq_private("vmallocinfo", 0400, NULL,
+ &vmalloc_op,
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
-@@ -1955,10 +1955,12 @@ void __init init_mm_internals(void)
+@@ -1972,10 +1972,12 @@ void __init init_mm_internals(void)
start_shepherd_timer();
#endif
#ifdef CONFIG_PROC_FS
-- proc_create("buddyinfo", 0444, NULL, &buddyinfo_file_operations);
-- proc_create("pagetypeinfo", 0444, NULL, &pagetypeinfo_file_operations);
+- proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
+- proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op);
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED)) {
-+ proc_create("buddyinfo", 0444, NULL, &buddyinfo_file_operations);
-+ proc_create("pagetypeinfo", 0444, NULL, &pagetypeinfo_file_operations);
-+ proc_create("zoneinfo", 0444, NULL, &zoneinfo_file_operations);
++ proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
++ proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op);
++ proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op);
+ }
- proc_create("vmstat", 0444, NULL, &vmstat_file_operations);
-- proc_create("zoneinfo", 0444, NULL, &zoneinfo_file_operations);
+ proc_create_seq("vmstat", 0444, NULL, &vmstat_op);
+- proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op);
#endif
}
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
-@@ -127,6 +127,9 @@ void vlan_proc_cleanup(struct net *net)
+@@ -96,6 +96,9 @@ void vlan_proc_cleanup(struct net *net)
{
struct vlan_net *vn = net_generic(net, vlan_net_id);
@@ -271,7 +271,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (vn->proc_vlan_conf)
remove_proc_entry(name_conf, vn->proc_vlan_dir);
-@@ -146,6 +149,9 @@ int __net_init vlan_proc_init(struct net
+@@ -115,6 +118,9 @@ int __net_init vlan_proc_init(struct net
{
struct vlan_net *vn = net_generic(net, vlan_net_id);
@@ -283,22 +283,22 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
goto err;
--- a/net/core/net-procfs.c
+++ b/net/core/net-procfs.c
-@@ -320,10 +320,12 @@ static int __net_init dev_proc_net_init(
-
- if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops))
+@@ -279,10 +279,12 @@ static int __net_init dev_proc_net_init(
+ if (!proc_create_net("dev", 0444, net->proc_net, &dev_seq_ops,
+ sizeof(struct seq_net_private)))
goto out;
-- if (!proc_create("softnet_stat", S_IRUGO, net->proc_net,
+- if (!proc_create_seq("softnet_stat", 0444, net->proc_net,
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED) &&
-+ !proc_create("softnet_stat", S_IRUGO, net->proc_net,
- &softnet_seq_fops))
++ !proc_create_seq("softnet_stat", 0444, net->proc_net,
+ &softnet_seq_ops))
goto out_dev;
-- if (!proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops))
+- if (!proc_create_net("ptype", 0444, net->proc_net, &ptype_seq_ops,
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED) &&
-+ !proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops))
++ !proc_create_net("ptype", 0444, net->proc_net, &ptype_seq_ops,
+ sizeof(struct seq_net_private)))
goto out_softnet;
- if (wext_proc_init(net))
-@@ -332,9 +334,11 @@ static int __net_init dev_proc_net_init(
+@@ -292,9 +294,11 @@ static int __net_init dev_proc_net_init(
out:
return rc;
out_ptype:
@@ -312,7 +312,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
out_dev:
remove_proc_entry("dev", net->proc_net);
goto out;
-@@ -344,8 +348,10 @@ static void __net_exit dev_proc_net_exit
+@@ -304,8 +308,10 @@ static void __net_exit dev_proc_net_exit
{
wext_proc_exit(net);
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -3378,6 +3378,8 @@ static __net_initdata struct pernet_oper
+@@ -3477,6 +3477,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
@@ -338,22 +338,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
-@@ -2731,10 +2731,12 @@ static const struct file_operations fib_
+@@ -2708,11 +2708,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net)
{
-- if (!proc_create("fib_trie", S_IRUGO, net->proc_net, &fib_trie_fops))
+- if (!proc_create_net("fib_trie", 0444, net->proc_net, &fib_trie_seq_ops,
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED) &&
-+ !proc_create("fib_trie", S_IRUGO, net->proc_net, &fib_trie_fops))
++ !proc_create_net("fib_trie", 0444, net->proc_net, &fib_trie_seq_ops,
+ sizeof(struct fib_trie_iter)))
goto out1;
-- if (!proc_create("fib_triestat", S_IRUGO, net->proc_net,
+- if (!proc_create_net_single("fib_triestat", 0444, net->proc_net,
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED) &&
-+ !proc_create("fib_triestat", S_IRUGO, net->proc_net,
- &fib_triestat_fops))
++ !proc_create_net_single("fib_triestat", 0444, net->proc_net,
+ fib_triestat_seq_show, NULL))
goto out2;
-@@ -2744,17 +2746,21 @@ int __net_init fib_proc_init(struct net
+@@ -2723,17 +2725,21 @@ int __net_init fib_proc_init(struct net
return 0;
out3:
@@ -381,7 +382,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
-@@ -558,6 +558,9 @@ static __net_initdata struct pernet_oper
+@@ -523,5 +523,8 @@ static __net_initdata struct pernet_oper
int __init ip_misc_proc_init(void)
{
@@ -390,10 +391,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
return register_pernet_subsys(&ip_proc_ops);
}
-
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
-@@ -427,6 +427,9 @@ static struct pernet_operations ip_rt_pr
+@@ -410,6 +410,9 @@ static struct pernet_operations ip_rt_pr
static int __init ip_rt_proc_init(void)
{
diff --git a/target/linux/generic/hack-4.19/904-debloat_dma_buf.patch b/target/linux/generic/hack-4.19/904-debloat_dma_buf.patch
index 4d9f947edc..20e1c9f7b5 100644
--- a/target/linux/generic/hack-4.19/904-debloat_dma_buf.patch
+++ b/target/linux/generic/hack-4.19/904-debloat_dma_buf.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
-@@ -246,7 +246,7 @@ config SOC_BUS
+@@ -172,7 +172,7 @@ config SOC_BUS
source "drivers/base/regmap/Kconfig"
config DMA_SHARED_BUFFER
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <uapi/linux/dma-buf.h>
-@@ -1205,4 +1206,5 @@ static void __exit dma_buf_deinit(void)
+@@ -1158,4 +1159,5 @@ static void __exit dma_buf_deinit(void)
{
dma_buf_uninit_debugfs();
}
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+MODULE_LICENSE("GPL");
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -2164,6 +2164,7 @@ int wake_up_state(struct task_struct *p,
+@@ -2128,6 +2128,7 @@ int wake_up_state(struct task_struct *p,
{
return try_to_wake_up(p, state, 0);
}
diff --git a/target/linux/generic/hack-4.19/910-kobject_uevent.patch b/target/linux/generic/hack-4.19/910-kobject_uevent.patch
index 113fbb54b3..c4c41ca400 100644
--- a/target/linux/generic/hack-4.19/910-kobject_uevent.patch
+++ b/target/linux/generic/hack-4.19/910-kobject_uevent.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
-@@ -176,6 +176,18 @@ out:
+@@ -179,6 +179,18 @@ out:
return r;
}
diff --git a/target/linux/generic/hack-4.19/911-kobject_add_broadcast_uevent.patch b/target/linux/generic/hack-4.19/911-kobject_add_broadcast_uevent.patch
index abacfc390a..888f3fc1e7 100644
--- a/target/linux/generic/hack-4.19/911-kobject_add_broadcast_uevent.patch
+++ b/target/linux/generic/hack-4.19/911-kobject_add_broadcast_uevent.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#ifdef CONFIG_UEVENT_HELPER
/* path to the userspace helper executed on an event */
extern char uevent_helper[];
-@@ -224,4 +226,7 @@ int kobject_synth_uevent(struct kobject
+@@ -244,4 +246,7 @@ int kobject_synth_uevent(struct kobject
__printf(2, 3)
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...);
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#endif /* _KOBJECT_H_ */
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
-@@ -599,6 +599,43 @@ int add_uevent_var(struct kobj_uevent_en
+@@ -685,6 +685,43 @@ int add_uevent_var(struct kobj_uevent_en
EXPORT_SYMBOL_GPL(add_uevent_var);
#if defined(CONFIG_NET)
@@ -71,6 +71,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+EXPORT_SYMBOL_GPL(broadcast_uevent);
+
+#if defined(CONFIG_NET)
- static int uevent_net_init(struct net *net)
+ static int uevent_net_broadcast(struct sock *usk, struct sk_buff *skb,
+ struct netlink_ext_ack *extack)
{
- struct uevent_sock *ue_sk;
diff --git a/target/linux/generic/hack-4.19/921-always-create-console-node-in-initramfs.patch b/target/linux/generic/hack-4.19/921-always-create-console-node-in-initramfs.patch
index 6eeddcc3c6..e437579050 100644
--- a/target/linux/generic/hack-4.19/921-always-create-console-node-in-initramfs.patch
+++ b/target/linux/generic/hack-4.19/921-always-create-console-node-in-initramfs.patch
@@ -5,11 +5,11 @@ Subject: initramfs: always create console node
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
- scripts/gen_initramfs_list.sh | 14 ++++++++++++++
+ usr/gen_initramfs_list.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---- a/scripts/gen_initramfs_list.sh
-+++ b/scripts/gen_initramfs_list.sh
+--- a/usr/gen_initramfs_list.sh
++++ b/usr/gen_initramfs_list.sh
@@ -59,6 +59,18 @@ default_initramfs() {
EOF
}
diff --git a/target/linux/generic/hack-4.19/930-crashlog.patch b/target/linux/generic/hack-4.19/930-crashlog.patch
index 17ba187925..3bb3e77778 100644
--- a/target/linux/generic/hack-4.19/930-crashlog.patch
+++ b/target/linux/generic/hack-4.19/930-crashlog.patch
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1009,6 +1009,10 @@ config RELAY
+@@ -1041,6 +1041,10 @@ config RELAY
If unsure, say N.
@@ -51,13 +51,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
config BLK_DEV_INITRD
bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
- depends on BROKEN || !FRV
+ help
--- a/kernel/Makefile
+++ b/kernel/Makefile
-@@ -112,6 +112,7 @@ obj-$(CONFIG_CONTEXT_TRACKING) += contex
- obj-$(CONFIG_TORTURE_TEST) += torture.o
-
- obj-$(CONFIG_HAS_IOMEM) += memremap.o
+@@ -116,6 +116,7 @@ obj-$(CONFIG_TORTURE_TEST) += torture.o
+ obj-$(CONFIG_HAS_IOMEM) += iomem.o
+ obj-$(CONFIG_ZONE_DEVICE) += memremap.o
+ obj-$(CONFIG_RSEQ) += rseq.o
+obj-$(CONFIG_CRASHLOG) += crashlog.o
$(obj)/configs.o: $(obj)/config_data.h
@@ -300,7 +300,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/bug.h>
#include <linux/io.h>
#include <linux/bootmem.h>
-@@ -175,6 +176,7 @@ static unsigned long __init free_all_boo
+@@ -215,6 +216,7 @@ static unsigned long __init free_all_boo
if (!bdata->node_bootmem_map)
return 0;
@@ -310,15 +310,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
end = bdata->node_low_pfn;
--- a/mm/memblock.c
+++ b/mm/memblock.c
-@@ -19,6 +19,7 @@
- #include <linux/debugfs.h>
+@@ -21,6 +21,7 @@
#include <linux/seq_file.h>
#include <linux/memblock.h>
+ #include <linux/bootmem.h>
+#include <linux/crashlog.h>
#include <asm/sections.h>
#include <linux/io.h>
-@@ -483,6 +484,8 @@ static void __init_memblock memblock_ins
+@@ -547,6 +548,8 @@ static void __init_memblock memblock_ins
memblock_set_region_node(rgn, nid);
type->cnt++;
type->total_size += size;
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
/**
-@@ -522,6 +525,8 @@ int __init_memblock memblock_add_range(s
+@@ -586,6 +589,8 @@ int __init_memblock memblock_add_range(s
type->regions[0].flags = flags;
memblock_set_region_node(&type->regions[0], nid);
type->total_size = size;