mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-05-05 09:56:12 +02:00
generic: 6.18: manually rebuild hack patches
Manually rebuild hack patches: - 200-tools_portability.patch - 204-module_strip.patch - 230-openwrt_lzma_options.patch - 251-kconfig.patch - 259-regmap_dynamic.patch - 301-01-mm-permit-to-declare-custom-execmem-alloc-free-funct.patch - 301-02-mips-replace-mlong-calls-with-mno-long-calls-if-poss.patch - 430-mtk-bmt-support.patch - 721-net-add-packet-mangeling.patch - 722-net-phy-aquantia-enable-AQR112-and-AQR412.patch - 725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch - 750-net-pcs-mtk-lynxi-workaround-2500BaseX-no-an.patch - 800-GPIO-add-named-gpio-exports.patch - 902-debloat_proc.patch - 904-debloat_dma_buf.patch Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/21078 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
168710bbd5
commit
31f7baacf5
@ -26,8 +26,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
# Some tools require Clang, LLC and/or LLVM utils
|
||||
CLANG ?= clang
|
||||
LLC ?= llc
|
||||
@@ -92,8 +93,9 @@ LLVM_OBJCOPY ?= llvm-objcopy
|
||||
LLVM_STRIP ?= llvm-strip
|
||||
@@ -95,8 +96,9 @@ LLVM_STRIP ?= llvm-strip
|
||||
SYSTEM_BPFTOOL ?= bpftool
|
||||
|
||||
ifeq ($(CC_NO_CLANG), 1)
|
||||
-EXTRA_WARNINGS += -Wstrict-aliasing=3
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
# sysroots and flags or to avoid the GCC call in pure Clang builds.
|
||||
--- a/tools/include/linux/types.h
|
||||
+++ b/tools/include/linux/types.h
|
||||
@@ -56,6 +56,7 @@ typedef __s8 s8;
|
||||
@@ -58,6 +58,7 @@ typedef unsigned long long ullong;
|
||||
#define __user
|
||||
#endif
|
||||
#define __must_check
|
||||
@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
*/
|
||||
|
||||
+#define generic_fls __linux_fls
|
||||
static __always_inline int generic_fls(unsigned int x)
|
||||
static __always_inline __attribute_const__ int generic_fls(unsigned int x)
|
||||
{
|
||||
int r = 32;
|
||||
--- a/tools/lib/string.c
|
||||
@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
@@ -46,7 +46,17 @@
|
||||
#define ORC_TYPE_REGS_PARTIAL 4
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
+#ifdef __APPLE__
|
||||
+#include <endian.h>
|
||||
+
|
||||
@ -151,8 +151,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const char *argv0_path;
|
||||
--- a/tools/objtool/Makefile
|
||||
+++ b/tools/objtool/Makefile
|
||||
@@ -41,6 +41,8 @@ OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBS
|
||||
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - | grep elf_getshdr)
|
||||
@@ -42,6 +42,8 @@ OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBS
|
||||
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - 2>/dev/null | grep elf_getshdr)
|
||||
OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
|
||||
|
||||
+OBJTOOL_CFLAGS += $(HOST_EXTRACFLAGS)
|
||||
|
||||
@ -14,15 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -166,6 +166,7 @@ struct module_kobject *lookup_or_create_
|
||||
|
||||
/* Generic info of form tag = "info" */
|
||||
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
|
||||
+#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
|
||||
|
||||
/* For userspace: you can also call me... */
|
||||
#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
|
||||
@@ -241,12 +242,12 @@ struct module_kobject *lookup_or_create_
|
||||
@@ -239,10 +239,10 @@ struct module_kobject *lookup_or_create_
|
||||
* Author(s), use "Name <email>" or just "Name", for multiple
|
||||
* authors use multiple MODULE_AUTHOR() statements/lines.
|
||||
*/
|
||||
@ -33,12 +25,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
-#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
||||
+#define MODULE_DESCRIPTION(_description) MODULE_INFO_STRIP(description, _description)
|
||||
|
||||
-#ifdef MODULE
|
||||
+#if defined(MODULE) && !defined(CONFIG_MODULE_STRIPPED)
|
||||
/* Creates an alias so file2alias.c can find device table. */
|
||||
#define MODULE_DEVICE_TABLE(type, name) \
|
||||
extern typeof(name) __mod_##type##__##name##_device_table \
|
||||
@@ -273,7 +274,9 @@ extern typeof(name) __mod_##type##__##na
|
||||
/*
|
||||
* Format: __mod_device_table__kmod_<modname>__<type>__<name>
|
||||
@@ -279,7 +279,9 @@ static typeof(name) __mod_device_table(t
|
||||
*/
|
||||
|
||||
#if defined(MODULE) || !defined(CONFIG_SYSFS)
|
||||
@ -49,48 +38,48 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#else
|
||||
#define MODULE_VERSION(_version) \
|
||||
MODULE_INFO(version, _version); \
|
||||
@@ -296,7 +299,7 @@ extern typeof(name) __mod_##type##__##na
|
||||
@@ -302,7 +304,7 @@ static typeof(name) __mod_device_table(t
|
||||
/* 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)
|
||||
|
||||
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, __stringify(ns))
|
||||
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, ns)
|
||||
|
||||
--- a/include/linux/moduleparam.h
|
||||
+++ b/include/linux/moduleparam.h
|
||||
@@ -20,6 +20,16 @@
|
||||
/* Chosen so that structs with an unsigned long line up. */
|
||||
#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
|
||||
@@ -24,6 +24,16 @@
|
||||
#define __MODULE_INFO_PREFIX KBUILD_MODNAME "."
|
||||
#endif
|
||||
|
||||
+/* This struct is here for syntactic coherency, it is not used */
|
||||
+#define __MODULE_INFO_DISABLED(name) \
|
||||
+ struct __UNIQUE_ID(name) {}
|
||||
+
|
||||
+#ifdef CONFIG_MODULE_STRIPPED
|
||||
+#define __MODULE_INFO_STRIP(tag, name, info) __MODULE_INFO_DISABLED(name)
|
||||
+#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_DISABLED(tag)
|
||||
+#else
|
||||
+#define __MODULE_INFO_STRIP(tag, name, info) __MODULE_INFO(tag, name, info)
|
||||
+#define MODULE_INFO_STRIP(tag, info) MODULE_INFO(tag, info)
|
||||
+#endif
|
||||
+
|
||||
#define __MODULE_INFO(tag, name, info) \
|
||||
static const char __UNIQUE_ID(name)[] \
|
||||
__used __section(".modinfo") __aligned(1) \
|
||||
@@ -31,7 +41,7 @@
|
||||
/* Generic info of form tag = "info" */
|
||||
#define MODULE_INFO(tag, info) \
|
||||
static const char __UNIQUE_ID(modinfo)[] \
|
||||
@@ -36,7 +46,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) \
|
||||
- __MODULE_INFO(parm, _parm, #_parm ":" desc)
|
||||
+ __MODULE_INFO_STRIP(parm, _parm, #_parm ":" desc)
|
||||
- MODULE_INFO(parm, #_parm ":" desc)
|
||||
+ MODULE_INFO_STRIP(parm, #_parm ":" desc)
|
||||
|
||||
struct kernel_param;
|
||||
|
||||
--- a/kernel/module/Kconfig
|
||||
+++ b/kernel/module/Kconfig
|
||||
@@ -402,4 +402,11 @@ config MODULES_TREE_LOOKUP
|
||||
@@ -462,4 +462,11 @@ config MODULES_TREE_LOOKUP
|
||||
def_bool y
|
||||
depends on PERF_EVENTS || TRACING || CFI_CLANG
|
||||
depends on PERF_EVENTS || TRACING || CFI
|
||||
|
||||
+config MODULE_STRIPPED
|
||||
+ bool "Reduce module size"
|
||||
@ -102,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
endif # MODULES
|
||||
--- a/kernel/module/main.c
|
||||
+++ b/kernel/module/main.c
|
||||
@@ -1001,6 +1001,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
|
||||
@@ -1075,6 +1075,7 @@ const size_t modinfo_attrs_count = ARRAY
|
||||
|
||||
static const char vermagic[] = VERMAGIC_STRING;
|
||||
|
||||
@ -110,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int try_to_force_load(struct module *mod, const char *reason)
|
||||
{
|
||||
#ifdef CONFIG_MODULE_FORCE_LOAD
|
||||
@@ -1012,6 +1013,7 @@ int try_to_force_load(struct module *mod
|
||||
@@ -1086,6 +1087,7 @@ int try_to_force_load(struct module *mod
|
||||
return -ENOEXEC;
|
||||
#endif
|
||||
}
|
||||
@ -118,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* Parse tag=value strings from .modinfo section */
|
||||
char *module_next_tag_pair(char *string, unsigned long *secsize)
|
||||
@@ -2095,9 +2097,11 @@ static void module_augment_kernel_taints
|
||||
@@ -2572,9 +2574,11 @@ static void module_augment_kernel_taints
|
||||
|
||||
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
|
||||
{
|
||||
@ -131,7 +120,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
|
||||
modmagic = NULL;
|
||||
|
||||
@@ -2111,6 +2115,7 @@ static int check_modinfo(struct module *
|
||||
@@ -2588,6 +2592,7 @@ static int check_modinfo(struct module *
|
||||
info->name, modmagic, vermagic);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
@ -141,7 +130,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (err)
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -1605,7 +1605,9 @@ static void read_symbols(const char *mod
|
||||
@@ -1619,7 +1619,9 @@ static void read_symbols(const char *mod
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_symbol(mod, &info, sym, symname);
|
||||
@ -151,7 +140,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
check_sec_ref(mod, &info);
|
||||
@@ -1762,7 +1764,9 @@ static void add_header(struct buffer *b,
|
||||
@@ -1832,7 +1834,9 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "#include <linux/export-internal.h>\n");
|
||||
buf_printf(b, "#include <linux/compiler.h>\n");
|
||||
buf_printf(b, "\n");
|
||||
@ -161,7 +150,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");
|
||||
@@ -1776,11 +1780,13 @@ static void add_header(struct buffer *b,
|
||||
@@ -1846,11 +1850,13 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
|
||||
buf_printf(b, "};\n");
|
||||
|
||||
@ -175,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (strstarts(mod->name, "tools/testing"))
|
||||
buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n");
|
||||
@@ -1890,11 +1896,13 @@ static void add_depends(struct buffer *b
|
||||
@@ -2004,11 +2010,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
@ -189,13 +178,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void write_buf(struct buffer *b, const char *fname)
|
||||
@@ -1977,7 +1985,9 @@ static void write_mod_c_file(struct modu
|
||||
add_exported_symbols(&buf, mod);
|
||||
add_versions(&buf, mod);
|
||||
@@ -2109,12 +2117,14 @@ static void write_mod_c_file(struct modu
|
||||
add_extended_versions(&buf, mod);
|
||||
add_depends(&buf, mod);
|
||||
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
add_moddevtable(&buf, mod);
|
||||
buf_printf(&buf, "\n");
|
||||
list_for_each_entry_safe(alias, next, &mod->aliases, node) {
|
||||
buf_printf(&buf, "MODULE_ALIAS(\"%s\");\n", alias->str);
|
||||
list_del(&alias->node);
|
||||
free(alias);
|
||||
}
|
||||
+#endif
|
||||
|
||||
add_srcversion(&buf, mod);
|
||||
|
||||
ret = snprintf(fname, sizeof(fname), "%s.mod.c", mod->name);
|
||||
|
||||
@ -14,16 +14,16 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
--- a/lib/decompress.c
|
||||
+++ b/lib/decompress.c
|
||||
@@ -53,6 +53,7 @@ static const struct compress_format comp
|
||||
{ {0x1f, 0x9e}, "gzip", gunzip },
|
||||
{ {0x42, 0x5a}, "bzip2", bunzip2 },
|
||||
{ {0x5d, 0x00}, "lzma", unlzma },
|
||||
+ { {0x6d, 0x00}, "lzma-openwrt", unlzma },
|
||||
{ {0xfd, 0x37}, "xz", unxz },
|
||||
{ {0x89, 0x4c}, "lzo", unlzo },
|
||||
{ {0x02, 0x21}, "lz4", unlz4 },
|
||||
{ .magic = {0x1f, 0x9e}, .name = "gzip", .decompressor = gunzip },
|
||||
{ .magic = {0x42, 0x5a}, .name = "bzip2", .decompressor = bunzip2 },
|
||||
{ .magic = {0x5d, 0x00}, .name = "lzma", .decompressor = unlzma },
|
||||
+ { .magic = {0x6d, 0x00}, .name = "lzma-openwrt", .decompressor = unlzma },
|
||||
{ .magic = {0xfd, 0x37}, .name = "xz", .decompressor = unxz },
|
||||
{ .magic = {0x89, 0x4c}, .name = "lzo", .decompressor = unlzo },
|
||||
{ .magic = {0x02, 0x21}, .name = "lz4", .decompressor = unlz4 },
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -359,10 +359,10 @@ quiet_cmd_bzip2_with_size = BZIP2 $@
|
||||
@@ -348,10 +348,10 @@ quiet_cmd_bzip2_with_size = BZIP2 $@
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
quiet_cmd_lzma = LZMA $@
|
||||
|
||||
@ -9,10 +9,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
drivers/bcma/Kconfig | 1 +
|
||||
drivers/ssb/Kconfig | 3 ++-
|
||||
lib/Kconfig | 8 ++++----
|
||||
lib/crc/Kconfig | 18 +++++++++---------
|
||||
net/Kconfig | 2 +-
|
||||
net/netfilter/Kconfig | 2 +-
|
||||
net/wireless/Kconfig | 17 ++++++++++-------
|
||||
sound/core/Kconfig | 4 ++--
|
||||
7 files changed, 25 insertions(+), 20 deletions(-)
|
||||
8 files changed, 25 insertions(+), 23 deletions(-)
|
||||
|
||||
--- a/crypto/Kconfig
|
||||
+++ b/crypto/Kconfig
|
||||
@ -92,7 +93,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
bool
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -457,16 +457,16 @@ config BCH_CONST_T
|
||||
@@ -320,16 +320,16 @@ config BCH_CONST_T
|
||||
# Textsearch support is select'ed if needed
|
||||
#
|
||||
config TEXTSEARCH
|
||||
@ -142,11 +143,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
- tristate
|
||||
+ tristate "Compression offloading support"
|
||||
|
||||
config SND_JACK
|
||||
config SND_COMPRESS_ACCEL
|
||||
bool
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -484,7 +484,7 @@ config NET_DEVLINK
|
||||
@@ -492,7 +492,7 @@ config NET_DEVLINK
|
||||
default n
|
||||
|
||||
config PAGE_POOL
|
||||
@ -155,3 +156,74 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
config PAGE_POOL_STATS
|
||||
default n
|
||||
--- a/lib/crc/Kconfig
|
||||
+++ b/lib/crc/Kconfig
|
||||
@@ -3,43 +3,43 @@
|
||||
# Kconfig for the kernel's cyclic redundancy check (CRC) library code
|
||||
|
||||
config CRC4
|
||||
- tristate
|
||||
+ tristate "CRC4 functions"
|
||||
help
|
||||
The CRC4 library functions. Select this if your module uses any of
|
||||
the functions from <linux/crc4.h>.
|
||||
|
||||
config CRC7
|
||||
- tristate
|
||||
+ tristate "CRC7 functions"
|
||||
help
|
||||
The CRC7 library functions. Select this if your module uses any of
|
||||
the functions from <linux/crc7.h>.
|
||||
|
||||
config CRC8
|
||||
- tristate
|
||||
+ tristate "CRC8 functions"
|
||||
help
|
||||
The CRC8 library functions. Select this if your module uses any of
|
||||
the functions from <linux/crc8.h>.
|
||||
|
||||
config CRC16
|
||||
- tristate
|
||||
+ tristate "CRC16 functions"
|
||||
help
|
||||
The CRC16 library functions. Select this if your module uses any of
|
||||
the functions from <linux/crc16.h>.
|
||||
|
||||
config CRC_CCITT
|
||||
- tristate
|
||||
+ tristate "CRC-CCITT functions"
|
||||
help
|
||||
The CRC-CCITT library functions. Select this if your module uses any
|
||||
of the functions from <linux/crc-ccitt.h>.
|
||||
|
||||
config CRC_ITU_T
|
||||
- tristate
|
||||
+ tristate "CRC ITU-T V.41 functions"
|
||||
help
|
||||
The CRC-ITU-T library functions. Select this if your module uses
|
||||
any of the functions from <linux/crc-itu-t.h>.
|
||||
|
||||
config CRC_T10DIF
|
||||
- tristate
|
||||
+ tristate "CRC calculation for the T10 Data Integrity Field"
|
||||
help
|
||||
The CRC-T10DIF library functions. Select this if your module uses
|
||||
any of the functions from <linux/crc-t10dif.h>.
|
||||
@@ -54,7 +54,7 @@ config CRC_T10DIF_ARCH
|
||||
default y if X86
|
||||
|
||||
config CRC32
|
||||
- tristate
|
||||
+ tristate "CRC32/CRC32c functions"
|
||||
select BITREVERSE
|
||||
help
|
||||
The CRC32 library functions. Select this if your module uses any of
|
||||
@@ -74,7 +74,7 @@ config CRC32_ARCH
|
||||
default y if X86
|
||||
|
||||
config CRC64
|
||||
- tristate
|
||||
+ tristate "CRC64 functions"
|
||||
help
|
||||
The CRC64 library functions. Select this if your module uses any of
|
||||
the functions from <linux/crc64.h>.
|
||||
|
||||
@ -21,10 +21,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
- bool
|
||||
- default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO || REGMAP_FSI)
|
||||
+ tristate
|
||||
select IRQ_DOMAIN if REGMAP_IRQ
|
||||
select MDIO_BUS if REGMAP_MDIO
|
||||
help
|
||||
@@ -19,7 +18,7 @@ config REGMAP
|
||||
Enable support for the Register Map (regmap) access API.
|
||||
|
||||
@@ -17,7 +16,7 @@ config REGMAP
|
||||
|
||||
config REGMAP_KUNIT
|
||||
tristate "KUnit tests for regmap"
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
default KUNIT_ALL_TESTS
|
||||
select REGMAP_RAM
|
||||
|
||||
@@ -34,60 +33,76 @@ config REGMAP_BUILD
|
||||
@@ -32,62 +31,78 @@ config REGMAP_BUILD
|
||||
normally enabled.
|
||||
|
||||
config REGMAP_AC97
|
||||
@ -68,6 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
config REGMAP_MDIO
|
||||
+ select REGMAP
|
||||
tristate
|
||||
select MDIO_BUS
|
||||
|
||||
config REGMAP_MMIO
|
||||
+ select REGMAP
|
||||
@ -76,6 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
config REGMAP_IRQ
|
||||
+ select REGMAP
|
||||
bool
|
||||
select IRQ_DOMAIN
|
||||
|
||||
config REGMAP_RAM
|
||||
+ select REGMAP
|
||||
@ -137,7 +139,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/property.h>
|
||||
@@ -3523,3 +3524,5 @@ static int __init regmap_initcall(void)
|
||||
@@ -3525,3 +3526,5 @@ static int __init regmap_initcall(void)
|
||||
return 0;
|
||||
}
|
||||
postcore_initcall(regmap_initcall);
|
||||
@ -145,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- a/include/linux/regmap.h
|
||||
+++ b/include/linux/regmap.h
|
||||
@@ -197,7 +197,7 @@ struct reg_sequence {
|
||||
@@ -204,7 +204,7 @@ struct reg_sequence {
|
||||
__ret ?: __tmp; \
|
||||
})
|
||||
|
||||
|
||||
@ -26,16 +26,17 @@ Co-authored-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
#endif
|
||||
--- a/mm/execmem.c
|
||||
+++ b/mm/execmem.c
|
||||
@@ -52,14 +52,19 @@ static void *__execmem_alloc(struct exec
|
||||
return kasan_reset_tag(p);
|
||||
@@ -458,7 +458,7 @@ static bool execmem_cache_free(void *ptr
|
||||
}
|
||||
#endif /* CONFIG_ARCH_HAS_EXECMEM_ROX */
|
||||
|
||||
-void *execmem_alloc(enum execmem_type type, size_t size)
|
||||
+void *__weak arch_execmem_alloc(enum execmem_type type, size_t size)
|
||||
{
|
||||
struct execmem_range *range = &execmem_info->ranges[type];
|
||||
|
||||
return __execmem_alloc(range, size);
|
||||
bool use_cache = range->flags & EXECMEM_ROX_CACHE;
|
||||
@@ -491,7 +491,12 @@ void *execmem_alloc_rw(enum execmem_type
|
||||
return no_free_ptr(p);
|
||||
}
|
||||
|
||||
-void execmem_free(void *ptr)
|
||||
@ -48,8 +49,8 @@ Co-authored-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
{
|
||||
/*
|
||||
* This memory may be RO, and freeing RO memory in an interrupt is not
|
||||
@@ -69,6 +74,11 @@ void execmem_free(void *ptr)
|
||||
vfree(ptr);
|
||||
@@ -508,6 +513,11 @@ bool execmem_is_rox(enum execmem_type ty
|
||||
return !!(execmem_info->ranges[type].flags & EXECMEM_ROX_CACHE);
|
||||
}
|
||||
|
||||
+void execmem_free(void *ptr)
|
||||
|
||||
@ -46,8 +46,8 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
+ endif
|
||||
+endif
|
||||
|
||||
ifeq ($(CONFIG_RELOCATABLE),y)
|
||||
LDFLAGS_vmlinux += --emit-relocs
|
||||
cflags-y += -ffreestanding
|
||||
|
||||
--- a/arch/mips/include/asm/module.h
|
||||
+++ b/arch/mips/include/asm/module.h
|
||||
@@ -12,6 +12,11 @@ struct mod_arch_specific {
|
||||
@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
+
|
||||
+ /* mark all pages except for the last one */
|
||||
+ for (p = page; p + 1 < page + (size >> PAGE_SHIFT); ++p)
|
||||
+ set_bit(PG_owner_priv_1, &p->flags);
|
||||
+ set_bit(PG_owner_priv_1, &p->flags.f);
|
||||
+
|
||||
+ for (p = page + (size >> PAGE_SHIFT); p < page + (1 << order); ++p)
|
||||
+ __free_page(p);
|
||||
@ -192,7 +192,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
+
|
||||
+ page = virt_to_page(ptr);
|
||||
+ do {
|
||||
+ free = test_and_clear_bit(PG_owner_priv_1, &page->flags);
|
||||
+ free = test_and_clear_bit(PG_owner_priv_1, &page->flags.f);
|
||||
+ __free_page(page);
|
||||
+ page++;
|
||||
+ } while (free);
|
||||
|
||||
@ -28,6 +28,6 @@ Subject: [PATCH] mtd/nand: add MediaTek NAND bad block managment table
|
||||
obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
|
||||
obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
|
||||
+obj-$(CONFIG_MTD_NAND_MTK_BMT) += mtk_bmt.o mtk_bmt_v2.o mtk_bmt_bbt.o mtk_bmt_nmbm.o
|
||||
obj-$(CONFIG_MTD_NAND_ECC_REALTEK) += ecc-realtek.o
|
||||
obj-$(CONFIG_SPI_QPIC_SNAND) += qpic_common.o
|
||||
obj-$(CONFIG_MTD_NAND_QCOM) += qpic_common.o
|
||||
obj-y += onenand/
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1687,6 +1687,7 @@ enum netdev_priv_flags {
|
||||
@@ -1745,6 +1745,7 @@ enum netdev_priv_flags {
|
||||
IFF_L3MDEV_RX_HANDLER = 1<<29,
|
||||
IFF_NO_ADDRCONF = BIT_ULL(30),
|
||||
IFF_TX_SKB_NO_LINEAR = BIT_ULL(31),
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
|
||||
/* Specifies the type of the struct net_device::ml_priv pointer */
|
||||
@@ -2168,6 +2169,11 @@ struct net_device {
|
||||
@@ -2241,6 +2242,11 @@ struct net_device {
|
||||
const struct tlsdev_ops *tlsdev_ops;
|
||||
#endif
|
||||
|
||||
@ -39,8 +39,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
unsigned int operstate;
|
||||
unsigned char link_mode;
|
||||
|
||||
@@ -2237,6 +2243,10 @@ struct net_device {
|
||||
struct mctp_dev __rcu *mctp_ptr;
|
||||
@@ -2317,6 +2323,10 @@ struct net_device {
|
||||
struct psp_dev __rcu *psp_dev;
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
*/
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -3274,6 +3274,10 @@ static inline int pskb_trim(struct sk_bu
|
||||
@@ -3333,6 +3333,10 @@ static inline int pskb_trim(struct sk_bu
|
||||
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
|
||||
}
|
||||
|
||||
@ -63,7 +63,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
|
||||
@@ -3439,16 +3443,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
@@ -3498,16 +3502,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
}
|
||||
|
||||
|
||||
@ -97,8 +97,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
help
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -3671,6 +3671,11 @@ static int xmit_one(struct sk_buff *skb,
|
||||
if (dev_nit_active(dev))
|
||||
@@ -3853,6 +3853,11 @@ static int xmit_one(struct sk_buff *skb,
|
||||
if (dev_nit_active_rcu(dev))
|
||||
dev_queue_xmit_nit(skb, dev);
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
@ -111,15 +111,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
rc = netdev_start_xmit(skb, dev, txq, more);
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <linux/mpls.h>
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <linux/kcov.h>
|
||||
#include <linux/iov_iter.h>
|
||||
#include <linux/crc32.h>
|
||||
+#include <linux/if.h>
|
||||
|
||||
#include <net/protocol.h>
|
||||
#include <net/dst.h>
|
||||
@@ -326,6 +327,22 @@ void *__napi_alloc_frag_align(unsigned i
|
||||
@@ -254,6 +255,22 @@ void *__napi_alloc_frag_align(unsigned i
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_alloc_frag_align);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
|
||||
--- a/drivers/net/phy/aquantia/aquantia_main.c
|
||||
+++ b/drivers/net/phy/aquantia/aquantia_main.c
|
||||
@@ -97,6 +97,29 @@
|
||||
@@ -116,6 +116,29 @@
|
||||
#define AQR107_OP_IN_PROG_SLEEP 1000
|
||||
#define AQR107_OP_IN_PROG_TIMEOUT 100000
|
||||
|
||||
@ -45,7 +45,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
static int aqr107_get_sset_count(struct phy_device *phydev)
|
||||
{
|
||||
return AQR107_SGMII_STAT_SZ;
|
||||
@@ -203,6 +226,51 @@ static int aqr_config_aneg(struct phy_de
|
||||
@@ -250,6 +273,51 @@ static int aqr_config_aneg(struct phy_de
|
||||
return genphy_c45_check_and_restart_aneg(phydev, changed);
|
||||
}
|
||||
|
||||
@ -97,19 +97,19 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
static int aqr_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED;
|
||||
@@ -972,7 +1040,7 @@ static struct phy_driver aqr_driver[] =
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR112),
|
||||
@@ -1338,7 +1406,7 @@ static struct phy_driver aqr_driver[] =
|
||||
.name = "Aquantia AQR112",
|
||||
.probe = aqr107_probe,
|
||||
.config_init = aqr_gen3_config_init,
|
||||
- .config_aneg = aqr_config_aneg,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
.config_intr = aqr_config_intr,
|
||||
.handle_interrupt = aqr_handle_interrupt,
|
||||
.get_tunable = aqr107_get_tunable,
|
||||
@@ -995,7 +1063,7 @@ static struct phy_driver aqr_driver[] =
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
|
||||
@@ -1364,7 +1432,7 @@ static struct phy_driver aqr_driver[] =
|
||||
.name = "Aquantia AQR412",
|
||||
.probe = aqr107_probe,
|
||||
.config_init = aqr_gen3_config_init,
|
||||
- .config_aneg = aqr_config_aneg,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
.config_intr = aqr_config_intr,
|
||||
|
||||
@ -12,27 +12,27 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/phy/aquantia/aquantia_main.c
|
||||
+++ b/drivers/net/phy/aquantia/aquantia_main.c
|
||||
@@ -32,6 +32,8 @@
|
||||
#define PHY_ID_AQR114C 0x31c31c22
|
||||
@@ -34,6 +34,8 @@
|
||||
#define PHY_ID_AQR115 0x31c31c63
|
||||
#define PHY_ID_AQR115C 0x31c31c33
|
||||
#define PHY_ID_AQR813 0x31c31cb2
|
||||
+#define PHY_ID_AQR112C 0x03a1b790
|
||||
+#define PHY_ID_AQR112R 0x31c31d12
|
||||
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
|
||||
@@ -1205,6 +1207,30 @@ static struct phy_driver aqr_driver[] =
|
||||
.led_hw_control_get = aqr_phy_led_hw_control_get,
|
||||
.led_polarity_set = aqr_phy_led_polarity_set,
|
||||
#define MDIO_PHYXS_VEND_PROV2 0xc441
|
||||
#define MDIO_PHYXS_VEND_PROV2_USX_AN BIT(3)
|
||||
@@ -1634,6 +1636,30 @@ static struct phy_driver aqr_driver[] =
|
||||
.inband_caps = aqr_gen2_inband_caps,
|
||||
.config_inband = aqr_gen2_config_inband,
|
||||
},
|
||||
+{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR112C),
|
||||
+ .name = "Aquantia AQR112C",
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .config_aneg = aqr_config_aneg,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .handle_interrupt = aqr_handle_interrupt,
|
||||
+ .read_status = aqr107_read_status,
|
||||
+ .read_status = aqr_read_status,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
@ -44,7 +44,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .handle_interrupt = aqr_handle_interrupt,
|
||||
+ .read_status = aqr107_read_status,
|
||||
+ .read_status = aqr_read_status,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
@ -52,8 +52,8 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
};
|
||||
|
||||
module_phy_driver(aqr_driver);
|
||||
@@ -1226,6 +1252,8 @@ static const struct mdio_device_id __may
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
|
||||
@@ -1657,6 +1683,8 @@ static const struct mdio_device_id __may
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR115) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR115C) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
|
||||
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR112C) },
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
|
||||
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
|
||||
@@ -129,14 +129,23 @@ static void mtk_pcs_lynxi_get_state(stru
|
||||
@@ -129,15 +129,23 @@ static void mtk_pcs_lynxi_get_state(stru
|
||||
struct phylink_link_state *state)
|
||||
{
|
||||
struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs);
|
||||
@ -34,14 +34,15 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- phylink_mii_c22_pcs_decode_state(state, FIELD_GET(SGMII_BMSR, bm),
|
||||
- phylink_mii_c22_pcs_decode_state(state, neg_mode,
|
||||
- FIELD_GET(SGMII_BMSR, bm),
|
||||
- FIELD_GET(SGMII_LPA, adv));
|
||||
+ regmap_read(mpcs->regmap, SGMSYS_PCS_ADVERTISE, &adv);
|
||||
+ phylink_mii_c22_pcs_decode_state(state, bmsr, FIELD_GET(SGMII_LPA, adv));
|
||||
+ phylink_mii_c22_pcs_decode_state(state, neg_mode, bmsr, FIELD_GET(SGMII_LPA, adv));
|
||||
}
|
||||
|
||||
static void mtk_sgmii_reset(struct mtk_pcs_lynxi *mpcs)
|
||||
@@ -157,7 +166,7 @@ static int mtk_pcs_lynxi_config(struct p
|
||||
@@ -158,7 +166,7 @@ static int mtk_pcs_lynxi_config(struct p
|
||||
{
|
||||
struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs);
|
||||
bool mode_changed = false, changed;
|
||||
@ -50,7 +51,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
int advertise, link_timer;
|
||||
|
||||
advertise = phylink_mii_c22_pcs_encode_advertisement(interface,
|
||||
@@ -180,9 +189,8 @@ static int mtk_pcs_lynxi_config(struct p
|
||||
@@ -181,9 +189,8 @@ static int mtk_pcs_lynxi_config(struct p
|
||||
if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) {
|
||||
if (interface == PHY_INTERFACE_MODE_SGMII)
|
||||
sgm_mode |= SGMII_SPEED_DUPLEX_AN;
|
||||
|
||||
@ -15,9 +15,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
#include "gpiolib.h"
|
||||
#include "gpiolib-of.h"
|
||||
@@ -1198,3 +1200,73 @@ void of_gpiochip_remove(struct gpio_chip
|
||||
{
|
||||
of_node_put(dev_of_node(&chip->gpiodev->dev));
|
||||
@@ -1295,3 +1297,73 @@ bool of_gpiochip_instance_match(struct g
|
||||
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+#ifdef CONFIG_GPIO_SYSFS
|
||||
@ -56,9 +56,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ return PTR_ERR(desc);
|
||||
+ gpio = desc_to_gpio(desc);
|
||||
+
|
||||
+ if (of_flags & OF_GPIO_ACTIVE_LOW)
|
||||
+ flags |= GPIOF_ACTIVE_LOW;
|
||||
+
|
||||
+ if (!of_property_read_u32(cnp, "gpio-export,output", &val))
|
||||
+ flags |= val ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
|
||||
+ else
|
||||
@ -67,6 +64,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ if (devm_gpio_request_one(&pdev->dev, gpio, flags, name ? name : of_node_full_name(np)))
|
||||
+ continue;
|
||||
+
|
||||
+ if (of_flags & OF_GPIO_ACTIVE_LOW)
|
||||
+ gpiod_toggle_active_low(gpio_to_desc(gpio));
|
||||
+
|
||||
+ dmc = of_property_read_bool(cnp, "gpio-export,direction_may_change");
|
||||
+ gpio_export_with_name(gpio_to_desc(gpio), dmc, name);
|
||||
+ nb++;
|
||||
@ -91,7 +91,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+#endif
|
||||
--- a/include/linux/gpio/consumer.h
|
||||
+++ b/include/linux/gpio/consumer.h
|
||||
@@ -628,7 +628,10 @@ static inline int devm_acpi_dev_add_driv
|
||||
@@ -651,18 +651,35 @@ static inline int devm_acpi_dev_add_driv
|
||||
|
||||
#if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
|
||||
|
||||
@ -102,9 +102,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
int gpiod_export_link(struct device *dev, const char *name,
|
||||
struct gpio_desc *desc);
|
||||
void gpiod_unexport(struct gpio_desc *desc);
|
||||
@@ -637,11 +640,25 @@ void gpiod_unexport(struct gpio_desc *de
|
||||
|
||||
#include <asm/errno.h>
|
||||
#else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
|
||||
|
||||
+static inline int __gpiod_export(struct gpio_desc *desc,
|
||||
+ bool direction_may_change,
|
||||
@ -130,25 +129,25 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
struct gpio_desc *desc)
|
||||
--- a/drivers/gpio/gpiolib-sysfs.c
|
||||
+++ b/drivers/gpio/gpiolib-sysfs.c
|
||||
@@ -571,7 +571,7 @@ static struct class gpio_class = {
|
||||
@@ -724,7 +724,7 @@ static void gpiod_attr_init(struct devic
|
||||
* Returns:
|
||||
* 0 on success, or negative errno on failure.
|
||||
*/
|
||||
-int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
|
||||
+int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name)
|
||||
{
|
||||
const char *ioname = NULL;
|
||||
struct gpio_device *gdev;
|
||||
@@ -629,6 +629,8 @@ int gpiod_export(struct gpio_desc *desc,
|
||||
offset = gpio_chip_hwgpio(desc);
|
||||
if (guard.gc->names && guard.gc->names[offset])
|
||||
ioname = guard.gc->names[offset];
|
||||
+ if (name)
|
||||
+ ioname = name;
|
||||
|
||||
dev = device_create_with_groups(&gpio_class, &gdev->dev,
|
||||
MKDEV(0, 0), data, gpio_groups,
|
||||
@@ -650,8 +652,21 @@ err_unlock:
|
||||
char *path __free(kfree) = NULL;
|
||||
struct gpiodev_data *gdev_data;
|
||||
@@ -801,7 +801,7 @@ int gpiod_export(struct gpio_desc *desc,
|
||||
desc_data->dev = device_create_with_groups(&gpio_class, &gdev->dev,
|
||||
MKDEV(0, 0), desc_data,
|
||||
desc_data->class_attr_groups,
|
||||
- "gpio%u",
|
||||
+ name ? name : "gpio%u",
|
||||
desc_to_gpio(desc));
|
||||
if (IS_ERR(desc_data->dev)) {
|
||||
status = PTR_ERR(desc_data->dev);
|
||||
@@ -870,8 +870,21 @@ err_clear_bit:
|
||||
gpiod_dbg(desc, "%s: status %d\n", __func__, status);
|
||||
return status;
|
||||
}
|
||||
@ -167,6 +166,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(gpio_export_with_name);
|
||||
+
|
||||
#if IS_ENABLED(CONFIG_GPIO_SYSFS_LEGACY)
|
||||
static int match_export(struct device *dev, const void *desc)
|
||||
{
|
||||
struct gpiod_data *data = dev_get_drvdata(dev);
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/fs/locks.c
|
||||
+++ b/fs/locks.c
|
||||
@@ -2979,6 +2979,8 @@ static const struct seq_operations locks
|
||||
@@ -2974,6 +2974,8 @@ static const struct seq_operations locks
|
||||
|
||||
static int __init proc_locks_init(void)
|
||||
{
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return 0;
|
||||
--- a/fs/proc/Kconfig
|
||||
+++ b/fs/proc/Kconfig
|
||||
@@ -101,6 +101,11 @@ config PROC_CHILDREN
|
||||
@@ -120,6 +120,11 @@ 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.
|
||||
|
||||
@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
proc_mkdir("tty/ldisc", NULL); /* Preserved: it's userspace visible */
|
||||
--- a/include/net/snmp.h
|
||||
+++ b/include/net/snmp.h
|
||||
@@ -124,6 +124,21 @@ struct linux_tls_mib {
|
||||
@@ -119,6 +119,21 @@ struct linux_tls_mib {
|
||||
#define DECLARE_SNMP_STAT(type, name) \
|
||||
extern __typeof__(type) __percpu *name
|
||||
|
||||
@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#define __SNMP_INC_STATS(mib, field) \
|
||||
__this_cpu_inc(mib->mibs[field])
|
||||
|
||||
@@ -154,8 +169,9 @@ struct linux_tls_mib {
|
||||
@@ -149,8 +164,9 @@ struct linux_tls_mib {
|
||||
__this_cpu_add(ptr[basefield##OCTETS], addend); \
|
||||
} while (0)
|
||||
|
||||
@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
IPC_SEM_IDS, sysvipc_sem_proc_show);
|
||||
--- a/ipc/shm.c
|
||||
+++ b/ipc/shm.c
|
||||
@@ -155,6 +155,8 @@ pure_initcall(ipc_ns_init);
|
||||
@@ -157,6 +157,8 @@ pure_initcall(ipc_ns_init);
|
||||
|
||||
void __init shm_init(void)
|
||||
{
|
||||
@ -192,7 +192,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
--- a/kernel/irq/proc.c
|
||||
+++ b/kernel/irq/proc.c
|
||||
@@ -339,6 +339,9 @@ void register_irq_proc(unsigned int irq,
|
||||
@@ -331,6 +331,9 @@ void register_irq_proc(unsigned int irq,
|
||||
void __maybe_unused *irqp = (void *)(unsigned long) irq;
|
||||
char name [MAX_NAMELEN];
|
||||
|
||||
@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip))
|
||||
return;
|
||||
|
||||
@@ -397,6 +400,9 @@ void unregister_irq_proc(unsigned int ir
|
||||
@@ -384,6 +387,9 @@ void unregister_irq_proc(unsigned int ir
|
||||
{
|
||||
char name [MAX_NAMELEN];
|
||||
|
||||
@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!root_irq_dir || !desc->dir)
|
||||
return;
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -435,6 +441,9 @@ void init_irq_proc(void)
|
||||
@@ -422,6 +428,9 @@ void init_irq_proc(void)
|
||||
unsigned int irq;
|
||||
struct irq_desc *desc;
|
||||
|
||||
@ -224,7 +224,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!root_irq_dir)
|
||||
--- a/kernel/time/timer_list.c
|
||||
+++ b/kernel/time/timer_list.c
|
||||
@@ -354,6 +354,8 @@ static int __init init_timer_list_procfs
|
||||
@@ -352,6 +352,8 @@ static int __init init_timer_list_procfs
|
||||
{
|
||||
struct proc_dir_entry *pe;
|
||||
|
||||
@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!pe)
|
||||
--- a/mm/vmalloc.c
|
||||
+++ b/mm/vmalloc.c
|
||||
@@ -5079,6 +5079,9 @@ static int vmalloc_info_show(struct seq_
|
||||
@@ -5133,6 +5133,9 @@ static int vmalloc_info_show(struct seq_
|
||||
|
||||
static int __init proc_vmalloc_init(void)
|
||||
{
|
||||
@ -247,7 +247,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
--- a/mm/vmstat.c
|
||||
+++ b/mm/vmstat.c
|
||||
@@ -2197,10 +2197,12 @@ void __init init_mm_internals(void)
|
||||
@@ -2288,10 +2288,12 @@ void __init init_mm_internals(void)
|
||||
start_shepherd_timer();
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@ -260,9 +260,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+ }
|
||||
proc_create_seq("vmstat", 0444, NULL, &vmstat_op);
|
||||
- proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op);
|
||||
register_sysctl_init("vm", vmstat_table);
|
||||
#endif
|
||||
}
|
||||
|
||||
--- a/net/8021q/vlanproc.c
|
||||
+++ b/net/8021q/vlanproc.c
|
||||
@@ -93,6 +93,9 @@ void vlan_proc_cleanup(struct net *net)
|
||||
@ -287,7 +287,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
goto err;
|
||||
--- a/net/core/net-procfs.c
|
||||
+++ b/net/core/net-procfs.c
|
||||
@@ -295,10 +295,12 @@ static int __net_init dev_proc_net_init(
|
||||
@@ -329,10 +329,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;
|
||||
@ -299,10 +299,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
- if (!proc_create_net("ptype", 0444, net->proc_net, &ptype_seq_ops,
|
||||
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED) &&
|
||||
+ !proc_create_net("ptype", 0444, net->proc_net, &ptype_seq_ops,
|
||||
sizeof(struct seq_net_private)))
|
||||
sizeof(struct ptype_iter_state)))
|
||||
goto out_softnet;
|
||||
|
||||
@@ -308,9 +310,11 @@ static int __net_init dev_proc_net_init(
|
||||
@@ -342,9 +344,11 @@ static int __net_init dev_proc_net_init(
|
||||
out:
|
||||
return rc;
|
||||
out_ptype:
|
||||
@ -316,7 +316,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
out_dev:
|
||||
remove_proc_entry("dev", net->proc_net);
|
||||
goto out;
|
||||
@@ -320,8 +324,10 @@ static void __net_exit dev_proc_net_exit
|
||||
@@ -354,8 +358,10 @@ static void __net_exit dev_proc_net_exit
|
||||
{
|
||||
wext_proc_exit(net);
|
||||
|
||||
@ -331,7 +331,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -4285,6 +4285,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -4349,6 +4349,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
@ -342,7 +342,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/ipv4/fib_trie.c
|
||||
+++ b/net/ipv4/fib_trie.c
|
||||
@@ -3016,11 +3016,13 @@ static const struct seq_operations fib_r
|
||||
@@ -3010,11 +3010,13 @@ static const struct seq_operations fib_r
|
||||
|
||||
int __net_init fib_proc_init(struct net *net)
|
||||
{
|
||||
@ -358,7 +358,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
fib_triestat_seq_show, NULL))
|
||||
goto out2;
|
||||
|
||||
@@ -3031,17 +3033,21 @@ int __net_init fib_proc_init(struct net
|
||||
@@ -3025,17 +3027,21 @@ int __net_init fib_proc_init(struct net
|
||||
return 0;
|
||||
|
||||
out3:
|
||||
@ -386,7 +386,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/ipv4/proc.c
|
||||
+++ b/net/ipv4/proc.c
|
||||
@@ -563,5 +563,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -568,5 +568,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
int __init ip_misc_proc_init(void)
|
||||
{
|
||||
@ -397,7 +397,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -382,6 +382,9 @@ static struct pernet_operations ip_rt_pr
|
||||
@@ -383,6 +383,9 @@ static struct pernet_operations ip_rt_pr
|
||||
|
||||
static int __init ip_rt_proc_init(void)
|
||||
{
|
||||
@ -409,7 +409,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/ipv4/inet_timewait_sock.c
|
||||
+++ b/net/ipv4/inet_timewait_sock.c
|
||||
@@ -285,7 +285,7 @@ void __inet_twsk_schedule(struct inet_ti
|
||||
@@ -301,7 +301,7 @@ void __inet_twsk_schedule(struct inet_ti
|
||||
*/
|
||||
|
||||
if (!rearm) {
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/base/Kconfig
|
||||
+++ b/drivers/base/Kconfig
|
||||
@@ -198,7 +198,7 @@ config SOC_BUS
|
||||
@@ -204,7 +204,7 @@ config SOC_BUS
|
||||
source "drivers/base/regmap/Kconfig"
|
||||
|
||||
config DMA_SHARED_BUFFER
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+dma-shared-buffer-objs := $(dma-buf-objs-y)
|
||||
--- a/drivers/dma-buf/dma-buf.c
|
||||
+++ b/drivers/dma-buf/dma-buf.c
|
||||
@@ -1743,4 +1743,5 @@ static void __exit dma_buf_deinit(void)
|
||||
@@ -1739,4 +1739,5 @@ static void __exit dma_buf_deinit(void)
|
||||
kern_unmount(dma_buf_mnt);
|
||||
dma_buf_uninit_sysfs_statistics();
|
||||
}
|
||||
@ -94,12 +94,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
{
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -74,7 +74,7 @@ config SKB_EXTENSIONS
|
||||
|
||||
@@ -75,7 +75,7 @@ config SKB_EXTENSIONS
|
||||
config NET_DEVMEM
|
||||
def_bool y
|
||||
select GENERIC_ALLOCATOR
|
||||
- depends on DMA_SHARED_BUFFER
|
||||
+ depends on DMA_SHARED_BUFFER=y
|
||||
depends on GENERIC_ALLOCATOR
|
||||
depends on PAGE_POOL
|
||||
|
||||
config NET_SHAPER
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user