--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
-@@ -202,6 +202,8 @@ void ftrace_likely_update(struct ftrace_
+@@ -214,6 +214,8 @@ void ftrace_likely_update(struct ftrace_
__v; \
})
#endif /* __KERNEL__ */
/*
-@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const
+@@ -314,6 +316,4 @@ static inline void *offset_to_ptr(const
*/
#define prevent_tail_call_optimization() mb()
--- a/Makefile
+++ b/Makefile
-@@ -599,7 +599,7 @@ endif
+@@ -583,7 +583,7 @@ endif
# Allows the usage of unstable features in stable compilers.
export RUSTC_BOOTSTRAP := 1
-export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
+export ARCH SRCARCH SUBARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
- export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN CARGO
+ export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN
export HOSTRUSTC KBUILD_HOSTRUSTFLAGS
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
-@@ -1673,7 +1673,7 @@ static void __init alloc_node_mem_map(st
+@@ -1632,7 +1632,7 @@ static void __init alloc_node_mem_map(st
if (pgdat == NODE_DATA(0)) {
mem_map = NODE_DATA(0)->node_mem_map;
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
-@@ -617,8 +617,8 @@ static int jffs2_rmdir (struct inode *di
+@@ -620,8 +620,8 @@ static int jffs2_rmdir (struct inode *di
return ret;
}
{
struct jffs2_inode_info *f, *dir_f;
struct jffs2_sb_info *c;
-@@ -758,7 +758,11 @@ static int jffs2_mknod (struct mnt_idmap
+@@ -761,7 +761,11 @@ static int jffs2_mknod (struct mnt_idmap
mutex_unlock(&dir_f->sem);
jffs2_complete_reservation(c);
return 0;
fail:
-@@ -766,6 +770,19 @@ static int jffs2_mknod (struct mnt_idmap
+@@ -769,6 +773,19 @@ static int jffs2_mknod (struct mnt_idmap
return ret;
}
static int jffs2_rename (struct mnt_idmap *idmap,
struct inode *old_dir_i, struct dentry *old_dentry,
struct inode *new_dir_i, struct dentry *new_dentry,
-@@ -777,7 +794,7 @@ static int jffs2_rename (struct mnt_idma
+@@ -780,7 +797,7 @@ static int jffs2_rename (struct mnt_idma
uint8_t type;
uint32_t now;
return -EINVAL;
/* The VFS will check for us and prevent trying to rename a
-@@ -843,9 +860,14 @@ static int jffs2_rename (struct mnt_idma
+@@ -846,9 +863,14 @@ static int jffs2_rename (struct mnt_idma
if (d_is_dir(old_dentry) && !victim_f)
inc_nlink(new_dir_i);
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
-@@ -791,18 +791,31 @@ static int jffs2_rename (struct mnt_idma
+@@ -794,18 +794,31 @@ static int jffs2_rename (struct mnt_idma
int ret;
struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb);
struct jffs2_inode_info *victim_f = NULL;
victim_f = JFFS2_INODE_INFO(d_inode(new_dentry));
if (d_is_dir(new_dentry)) {
struct jffs2_full_dirent *fd;
-@@ -837,7 +850,7 @@ static int jffs2_rename (struct mnt_idma
+@@ -840,7 +853,7 @@ static int jffs2_rename (struct mnt_idma
if (ret)
return ret;
/* There was a victim. Kill it off nicely */
if (d_is_dir(new_dentry))
clear_nlink(d_inode(new_dentry));
-@@ -863,6 +876,12 @@ static int jffs2_rename (struct mnt_idma
+@@ -866,6 +879,12 @@ static int jffs2_rename (struct mnt_idma
if (flags & RENAME_WHITEOUT)
/* Replace with whiteout */
ret = jffs2_whiteout(idmap, old_dir_i, old_dentry);
else
/* Unlink the original */
ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
-@@ -895,7 +914,7 @@ static int jffs2_rename (struct mnt_idma
+@@ -898,7 +917,7 @@ static int jffs2_rename (struct mnt_idma
return ret;
}
+ if (d_is_dir(old_dentry) && !(flags & RENAME_EXCHANGE))
drop_nlink(old_dir_i);
- old_dir_i->i_mtime = inode_set_ctime_to_ts(old_dir_i, ITIME(now));
+ inode_set_mtime_to_ts(old_dir_i,
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1460,6 +1460,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1525,6 +1525,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference
static int all_symbols;
+static int uncompressed;
static int absolute_percpu;
- static int base_relative;
- static int lto_clang;
-@@ -453,13 +454,15 @@ static void write_src(void)
- }
- printf("\n");
-- /*
-- * Now that we wrote out the compressed symbol names, restore the
-- * original names, which are needed in some of the later steps.
-- */
-- for (i = 0; i < table_cnt; i++) {
+ static int token_profit[0x10000];
+@@ -412,12 +413,14 @@ static void write_src(void)
+ for (k = 0; k < table[i]->len; k++)
+ printf(", 0x%02x", table[i]->sym[k]);
+
+- /*
+- * Now that we wrote out the compressed symbol name, restore the
+- * original name and print it in the comment.
+- */
- expand_symbol(table[i]->sym, table[i]->len, buf);
- strcpy((char *)table[i]->sym, buf);
-+ if (!uncompressed) {
-+ /*
-+ * Now that we wrote out the compressed symbol names, restore the
-+ * original names, which are needed in some of the later steps.
-+ */
-+ for (i = 0; i < table_cnt; i++) {
++ if (!uncompressed) {
++ /*
++ * Now that we wrote out the compressed symbol name, restore the
++ * original name and print it in the comment.
++ */
+ expand_symbol(table[i]->sym, table[i]->len, buf);
+ strcpy((char *)table[i]->sym, buf);
+ }
+ printf("\t/* %s */\n", table[i]->sym);
}
-
- output_label("kallsyms_markers");
-@@ -469,20 +472,22 @@ static void write_src(void)
+ printf("\n");
+@@ -429,20 +432,22 @@ static void write_src(void)
free(markers);
- expand_symbol(best_table[i], best_table_len[i], buf);
- printf("\t.asciz\t\"%s\"\n", buf);
- off += strlen(buf) + 1;
-- }
-- printf("\n");
+ if (!uncompressed) {
+ output_label("kallsyms_token_table");
+ off = 0;
+ off += strlen(buf) + 1;
+ }
+ printf("\n");
-
-- output_label("kallsyms_token_index");
-- for (i = 0; i < 256; i++)
-- printf("\t.short\t%d\n", best_idx[i]);
-- printf("\n");
++
+ output_label("kallsyms_token_index");
+ for (i = 0; i < 256; i++)
+ printf("\t.short\t%d\n", best_idx[i]);
+ printf("\n");
-+ }
+ }
+- printf("\n");
+-
+- output_label("kallsyms_token_index");
+- for (i = 0; i < 256; i++)
+- printf("\t.short\t%d\n", best_idx[i]);
+- printf("\n");
- if (!base_relative)
- output_label("kallsyms_addresses");
-@@ -582,6 +587,9 @@ static unsigned char *find_token(unsigne
+ output_label("kallsyms_offsets");
+
+@@ -532,6 +537,9 @@ static unsigned char *find_token(unsigne
{
int i;
for (i = 0; i < len - 1; i++) {
if (str[i] == token[0] && str[i+1] == token[1])
return &str[i];
-@@ -654,6 +662,9 @@ static void optimize_result(void)
+@@ -604,6 +612,9 @@ static void optimize_result(void)
{
int i, best;
/* using the '\0' symbol last allows compress_symbols to use standard
* fast string functions */
for (i = 255; i >= 0; i--) {
-@@ -815,6 +826,7 @@ int main(int argc, char **argv)
+@@ -763,6 +774,7 @@ int main(int argc, char **argv)
+ static const struct option long_options[] = {
+ {"all-symbols", no_argument, &all_symbols, 1},
{"absolute-percpu", no_argument, &absolute_percpu, 1},
- {"base-relative", no_argument, &base_relative, 1},
- {"lto-clang", no_argument, <o_clang, 1},
+ {"uncompressed", no_argument, &uncompressed, 1},
{},
};
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
-@@ -165,6 +165,10 @@ kallsyms()
- kallsymopt="${kallsymopt} --lto-clang"
+@@ -144,6 +144,10 @@ kallsyms()
+ kallsymopt="${kallsymopt} --absolute-percpu"
fi
+ if is_enabled CONFIG_KALLSYMS_UNCOMPRESSED; then
+ kallsymopt="${kallsymopt} --uncompressed"
+ fi
+
- info KSYMS ${2}
- scripts/kallsyms ${kallsymopt} ${1} > ${2}
- }
+ info KSYMS "${2}.S"
+ scripts/kallsyms ${kallsymopt} "${1}" > "${2}.S"
+
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
-@@ -982,8 +982,10 @@ char *symbol_string(char *buf, char *end
+@@ -983,8 +983,10 @@ char *symbol_string(char *buf, char *end
struct printf_spec spec, const char *fmt)
{
unsigned long value;
#endif
if (fmt[1] == 'R')
-@@ -1004,8 +1006,14 @@ char *symbol_string(char *buf, char *end
+@@ -1005,8 +1007,14 @@ char *symbol_string(char *buf, char *end
return string_nocheck(buf, end, sym, spec);
#else
--- a/drivers/platform/Kconfig
+++ b/drivers/platform/Kconfig
-@@ -14,3 +14,5 @@ source "drivers/platform/olpc/Kconfig"
- source "drivers/platform/surface/Kconfig"
-
+@@ -18,3 +18,5 @@ source "drivers/platform/surface/Kconfig
source "drivers/platform/x86/Kconfig"
+
+ source "drivers/platform/arm64/Kconfig"
+
+source "drivers/platform/mikrotik/Kconfig"
--- a/drivers/platform/Makefile
+++ b/drivers/platform/Makefile
-@@ -11,3 +11,4 @@ obj-$(CONFIG_OLPC_EC) += olpc/
- obj-$(CONFIG_GOLDFISH) += goldfish/
- obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
+@@ -13,3 +13,4 @@ obj-$(CONFIG_CHROME_PLATFORMS) += chrome
+ obj-$(CONFIG_CZNIC_PLATFORMS) += cznic/
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/
+ obj-$(CONFIG_ARM64_PLATFORM_DEVICES) += arm64/
+obj-$(CONFIG_MIKROTIK) += mikrotik/
---
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -1013,9 +1013,6 @@ config FW_ARC
+@@ -1055,9 +1055,6 @@ config FW_ARC
config ARCH_MAY_HAVE_PC_FDC
bool
config CEVT_BCM1480
bool
-@@ -2996,6 +2993,18 @@ choice
+@@ -2991,6 +2988,18 @@ choice
bool "Extend builtin kernel arguments with bootloader arguments"
endchoice
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
-@@ -163,7 +163,7 @@ cflags-$(CONFIG_CPU_R4300) += -march=r43
- cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
- cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
+@@ -153,7 +153,7 @@ cflags-$(CONFIG_CPU_R4300) += $(call cc-
+ cflags-$(CONFIG_CPU_R4X00) += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap
+ cflags-$(CONFIG_CPU_TX49XX) += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap
cflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,--trap
-cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -mtune=34kc -Wa,--trap
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
-@@ -146,6 +146,10 @@ apply_relocate(Elf32_Shdr *sechdrs, cons
+@@ -112,6 +112,10 @@ apply_relocate(Elf32_Shdr *sechdrs, cons
return -ENOEXEC;
}
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
-@@ -9,14 +9,11 @@
- #include <linux/delay.h>
+@@ -10,14 +10,11 @@
#include <linux/libfdt.h>
+ #include <linux/reboot.h>
+#include <asm/bootinfo.h>
#include <asm/cacheflush.h>
static unsigned long reboot_code_buffer;
-@@ -30,6 +27,101 @@ void (*_crash_smp_send_stop)(void) = NUL
+@@ -31,6 +28,101 @@ void (*_crash_smp_send_stop)(void) = NUL
void (*_machine_kexec_shutdown)(void) = NULL;
void (*_machine_crash_shutdown)(struct pt_regs *regs) = NULL;
static void kexec_image_info(const struct kimage *kimage)
{
unsigned long i;
-@@ -99,6 +191,18 @@ machine_kexec_prepare(struct kimage *kim
+@@ -100,6 +192,18 @@ machine_kexec_prepare(struct kimage *kim
#endif
kexec_image_info(kimage);
if (_machine_kexec_prepare)
return _machine_kexec_prepare(kimage);
-@@ -161,7 +265,7 @@ machine_crash_shutdown(struct pt_regs *r
+@@ -162,7 +266,7 @@ machine_crash_shutdown(struct pt_regs *r
void kexec_nonboot_cpu_jump(void)
{
local_flush_icache_range((unsigned long)relocated_kexec_smp_wait,
relocated_kexec_smp_wait(NULL);
}
-@@ -199,7 +303,7 @@ void kexec_reboot(void)
+@@ -200,7 +304,7 @@ void kexec_reboot(void)
* machine_kexec() CPU.
*/
local_flush_icache_range(reboot_code_buffer,
do_kexec = (void *)reboot_code_buffer;
do_kexec();
-@@ -212,10 +316,12 @@ machine_kexec(struct kimage *image)
+@@ -213,10 +317,12 @@ machine_kexec(struct kimage *image)
unsigned long *ptr;
reboot_code_buffer =
if (image->type == KEXEC_TYPE_DEFAULT) {
kexec_indirection_page =
-@@ -223,9 +329,19 @@ machine_kexec(struct kimage *image)
+@@ -224,9 +330,19 @@ machine_kexec(struct kimage *image)
} else {
kexec_indirection_page = (unsigned long)&image->head;
}
/*
* The generic kexec code builds a page list with physical
-@@ -256,7 +372,7 @@ machine_kexec(struct kimage *image)
+@@ -257,7 +373,7 @@ machine_kexec(struct kimage *image)
#ifdef CONFIG_SMP
/* All secondary cpus now may jump to kexec_wait cycle */
relocated_kexec_smp_wait = reboot_code_buffer +
PTR_L a0, arg0
PTR_L a1, arg1
PTR_L a2, arg2
-@@ -98,7 +99,7 @@ done:
+@@ -97,7 +98,7 @@ done:
#endif
/* jump to kexec_start_address */
j s1
#ifdef CONFIG_SMP
/*
-@@ -177,8 +178,15 @@ EXPORT(kexec_indirection_page)
+@@ -176,8 +177,15 @@ EXPORT(kexec_indirection_page)
PTR_WD 0
.size kexec_indirection_page, PTRSIZE
--- a/arch/arc/kernel/unaligned.c
+++ b/arch/arc/kernel/unaligned.c
-@@ -202,7 +202,7 @@ int misaligned_fixup(unsigned long addre
+@@ -203,7 +203,7 @@ int misaligned_fixup(unsigned long addre
char buf[TASK_COMM_LEN];
/* handle user mode only and only if enabled by sysadmin */
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
-@@ -251,7 +251,7 @@ config PPC
+@@ -254,7 +254,7 @@ config PPC
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
extern void prom_free_prom_memory(void);
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
-@@ -90,21 +90,27 @@ static struct resource bss_resource = {
+@@ -86,21 +86,27 @@ static struct resource bss_resource = {
unsigned long __kaslr_offset __ro_after_init;
EXPORT_SYMBOL(__kaslr_offset);
}
pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n",
-@@ -115,6 +121,7 @@ void __init detect_memory_region(phys_ad
+@@ -111,6 +117,7 @@ void __init detect_memory_region(phys_ad
memblock_add(start, size);
}
mtd_add_partition_attrs(child);
/* Look for subpartitions */
-@@ -439,31 +584,6 @@ err_del_partitions:
+@@ -443,31 +588,6 @@ err_del_partitions:
return ret;
}
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -548,6 +548,29 @@ static int mtd_nvmem_add(struct mtd_info
+@@ -549,6 +549,29 @@ static int mtd_nvmem_add(struct mtd_info
struct device_node *node = mtd_get_of_node(mtd);
struct nvmem_config config = {};
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -198,6 +198,15 @@ static ssize_t mtd_erasesize_show(struct
+@@ -199,6 +199,15 @@ static ssize_t mtd_erasesize_show(struct
}
MTD_DEVICE_ATTR_RO(erasesize);
static ssize_t mtd_writesize_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
-@@ -343,6 +352,7 @@ static struct attribute *mtd_attrs[] = {
+@@ -344,6 +353,7 @@ static struct attribute *mtd_attrs[] = {
&dev_attr_flags.attr,
&dev_attr_size.attr,
&dev_attr_erasesize.attr,
default y
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
-@@ -1150,6 +1150,8 @@ static u8 spi_nor_convert_3to4_erase(u8
+@@ -1158,6 +1158,8 @@ static u8 spi_nor_convert_3to4_erase(u8
static bool spi_nor_has_uniform_erase(const struct spi_nor *nor)
{
+ if (IS_ENABLED(CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE))
+ return false;
- return !!nor->params->erase_map.uniform_erase_type;
+ return !!nor->params->erase_map.uniform_region.erase_mask;
}
-@@ -2582,6 +2584,7 @@ static int spi_nor_select_erase(struct s
+@@ -2516,6 +2518,7 @@ static int spi_nor_select_erase(struct s
{
struct spi_nor_erase_map *map = &nor->params->erase_map;
const struct spi_nor_erase_type *erase = NULL;
+ const struct spi_nor_erase_type *erase_minor = NULL;
struct mtd_info *mtd = &nor->mtd;
- u32 wanted_size = nor->info->sector_size;
int i;
-@@ -2614,8 +2617,9 @@ static int spi_nor_select_erase(struct s
+
+@@ -2542,8 +2545,9 @@ static int spi_nor_select_erase(struct s
*/
for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
if (map->erase_type[i].size) {
}
}
-@@ -2623,6 +2627,9 @@ static int spi_nor_select_erase(struct s
+@@ -2551,6 +2555,9 @@ static int spi_nor_select_erase(struct s
return -EINVAL;
mtd->erasesize = erase->size;
--- a/drivers/mtd/parsers/Kconfig
+++ b/drivers/mtd/parsers/Kconfig
-@@ -67,6 +67,22 @@ config MTD_CMDLINE_PARTS
+@@ -62,6 +62,22 @@ config MTD_CMDLINE_PARTS
If unsure, say 'N'.
default y
--- a/drivers/mtd/parsers/Makefile
+++ b/drivers/mtd/parsers/Makefile
-@@ -4,6 +4,7 @@ obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm4
+@@ -3,6 +3,7 @@ obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm4
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
obj-$(CONFIG_MTD_BRCM_U_BOOT) += brcm_u-boot.o
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
--- a/drivers/mtd/parsers/Kconfig
+++ b/drivers/mtd/parsers/Kconfig
-@@ -236,3 +236,12 @@ config MTD_SERCOMM_PARTS
+@@ -231,3 +231,12 @@ config MTD_SERCOMM_PARTS
partition map. This partition table contains real partition
offsets, which may differ from device to device depending on the
number and location of bad blocks on NAND.
+ formatted DTS.
--- a/drivers/mtd/parsers/Makefile
+++ b/drivers/mtd/parsers/Makefile
-@@ -17,3 +17,4 @@ obj-$(CONFIG_MTD_SERCOMM_PARTS) += scpa
+@@ -16,3 +16,4 @@ obj-$(CONFIG_MTD_SERCOMM_PARTS) += scpa
obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
obj-$(CONFIG_MTD_QCOMSMEM_PARTS) += qcomsmempart.o
#include "check.h"
static int (*const check_part[])(struct parsed_partitions *) = {
-@@ -295,6 +297,74 @@ static ssize_t whole_disk_show(struct de
+@@ -284,6 +286,74 @@ static ssize_t whole_disk_show(struct de
}
static const DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
+ * the specified partno needs to match.
+ */
+ got_partno = !fwnode_property_read_u32(fw_part, "partno", &partno);
-+ if (got_partno && bdev->bd_partno != partno)
++ if (got_partno && (atomic_read(&bdev->__bd_flags) & BD_PARTNO) != partno)
+ continue;
+
+ /* Skip if no matching criteria is present in firmware node */
/*
* Must be called either with open_mutex held, before a disk can be opened or
* after all disk users are gone.
-@@ -377,6 +447,8 @@ static struct block_device *add_partitio
+@@ -358,6 +428,8 @@ static struct block_device *add_partitio
goto out_put;
}
--- a/block/Kconfig
+++ b/block/Kconfig
-@@ -208,6 +208,12 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
+@@ -209,6 +209,12 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
by falling back to the kernel crypto API when inline
encryption hardware is not present.
config BLK_MQ_PCI
--- a/block/Makefile
+++ b/block/Makefile
-@@ -40,3 +40,4 @@ obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += b
+@@ -38,3 +38,4 @@ obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += b
blk-crypto-sysfs.o
obj-$(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) += blk-crypto-fallback.o
obj-$(CONFIG_BLOCK_HOLDER_DEPRECATED) += holder.o
+device_initcall(blk_notifications_init);
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
-@@ -1567,4 +1567,15 @@ struct io_comp_batch {
+@@ -1689,4 +1689,15 @@ static inline bool bdev_can_atomic_write
#define DEFINE_IO_COMP_BATCH(name) struct io_comp_batch name = { }
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
-@@ -80,11 +80,13 @@ struct partition_meta_info {
+@@ -82,11 +82,13 @@ struct partition_meta_info {
* ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not
* scan for partitions from add_disk, and users can't add partitions manually.
*
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
-@@ -364,6 +364,8 @@ int mmc_add_card(struct mmc_card *card)
+@@ -368,6 +368,8 @@ int mmc_add_card(struct mmc_card *card)
mmc_add_card_debugfs(card);
card->dev.of_node = mmc_of_find_child_device(card->host, 0);
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
-@@ -2620,6 +2620,10 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2678,6 +2678,10 @@ static struct mmc_blk_data *mmc_blk_allo
if (area_type == MMC_BLK_DATA_AREA_MAIN)
dev_set_drvdata(&card->dev, md);
disk_fwnode = mmc_blk_get_partitions_node(parent, subname);
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
-@@ -2566,6 +2566,7 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2644,6 +2644,7 @@ static struct mmc_blk_data *mmc_blk_allo
md->disk->major = MMC_BLOCK_MAJOR;
md->disk->minors = perdev_minors;
md->disk->first_minor = devidx * perdev_minors;
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
-@@ -114,6 +114,7 @@ static int macronix_nor_late_init(struct
+@@ -194,6 +194,7 @@ static int macronix_nor_late_init(struct
{
if (!nor->params->set_4byte_addr_mode)
nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_en4b_ex4b;
--- a/drivers/mtd/spi-nor/eon.c
+++ b/drivers/mtd/spi-nor/eon.c
-@@ -17,6 +17,8 @@ static const struct flash_info eon_nor_p
- { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128) },
- { "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128)
- NO_SFDP_FLAGS(SECT_4K) },
-+ { "en25q128", INFO(0x1c3018, 0, 64 * 1024, 256)
-+ NO_SFDP_FLAGS(SECT_4K) },
- { "en25q80a", INFO(0x1c3014, 0, 64 * 1024, 16)
- NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
- { "en25qh16", INFO(0x1c7015, 0, 64 * 1024, 32)
+@@ -18,6 +18,11 @@ static const struct flash_info eon_nor_p
+ .name = "en25p64",
+ .size = SZ_8M,
+ }, {
++ .id = SNOR_ID(0x1c, 0x30, 0x18),
++ .name = "en25q128",
++ .size = SZ_16M,
++ .no_sfdp_flags = SECT_4K,
++ }, {
+ .id = SNOR_ID(0x1c, 0x30, 0x14),
+ .name = "en25q80a",
+ .size = SZ_1M,
--- a/drivers/mtd/spi-nor/eon.c
+++ b/drivers/mtd/spi-nor/eon.c
-@@ -19,6 +19,7 @@ static const struct flash_info eon_nor_p
- NO_SFDP_FLAGS(SECT_4K) },
- { "en25q128", INFO(0x1c3018, 0, 64 * 1024, 256)
- NO_SFDP_FLAGS(SECT_4K) },
-+ { "en25qx128a", INFO(0x1c7118, 0, 64 * 1024, 256) },
- { "en25q80a", INFO(0x1c3014, 0, 64 * 1024, 16)
- NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
- { "en25qh16", INFO(0x1c7015, 0, 64 * 1024, 32)
+@@ -23,6 +23,10 @@ static const struct flash_info eon_nor_p
+ .size = SZ_16M,
+ .no_sfdp_flags = SECT_4K,
+ }, {
++ .id = SNOR_ID(0x1c, 0x71, 0x18),
++ .name = "en25qx128a",
++ .size = SZ_16M,
++ }, {
+ .id = SNOR_ID(0x1c, 0x30, 0x14),
+ .name = "en25q80a",
+ .size = SZ_1M,
--- a/drivers/mtd/spi-nor/Makefile
+++ b/drivers/mtd/spi-nor/Makefile
-@@ -17,6 +17,7 @@ spi-nor-objs += sst.o
+@@ -14,6 +14,7 @@ spi-nor-objs += spansion.o
+ spi-nor-objs += sst.o
spi-nor-objs += winbond.o
- spi-nor-objs += xilinx.o
spi-nor-objs += xmc.o
+spi-nor-objs += xtx.o
spi-nor-$(CONFIG_DEBUG_FS) += debugfs.o
--- /dev/null
+++ b/drivers/mtd/spi-nor/xtx.c
-@@ -0,0 +1,17 @@
+@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/mtd/spi-nor.h>
+
+
+static const struct flash_info xtx_parts[] = {
+ /* XTX Technology (Shenzhen) Limited */
-+ { "xt25f128b", INFO(0x0B4018, 0, 64 * 1024, 256)
-+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+ SPI_NOR_QUAD_READ) },
++ {
++ .id = SNOR_ID(0x0B, 0x40, 0x18),
++ .name = "xt25f128b",
++ .size = SZ_16M,
++ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++ },
+};
+
+const struct spi_nor_manufacturer spi_nor_xtx = {
+};
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
-@@ -2017,6 +2017,7 @@ static const struct spi_nor_manufacturer
+@@ -1979,6 +1979,7 @@ static const struct spi_nor_manufacturer
+ &spi_nor_sst,
&spi_nor_winbond,
- &spi_nor_xilinx,
&spi_nor_xmc,
+ &spi_nor_xtx,
};
static const struct flash_info spi_nor_generic_flash = {
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
-@@ -647,6 +647,7 @@ extern const struct spi_nor_manufacturer
+@@ -593,6 +593,7 @@ extern const struct spi_nor_manufacturer
+ extern const struct spi_nor_manufacturer spi_nor_sst;
extern const struct spi_nor_manufacturer spi_nor_winbond;
- extern const struct spi_nor_manufacturer spi_nor_xilinx;
extern const struct spi_nor_manufacturer spi_nor_xmc;
+extern const struct spi_nor_manufacturer spi_nor_xtx;
--- a/drivers/mtd/spi-nor/gigadevice.c
+++ b/drivers/mtd/spi-nor/gigadevice.c
-@@ -34,6 +34,10 @@ static const struct spi_nor_fixups gd25q
- };
+@@ -35,6 +35,12 @@ static const struct spi_nor_fixups gd25q
static const struct flash_info gigadevice_nor_parts[] = {
-+ { "gd25q05", INFO(0xc84010, 0, 64 * 1024, 1)
-+ FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+ SPI_NOR_QUAD_READ) },
- { "gd25q16", INFO(0xc84015, 0, 64 * 1024, 32)
- FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
- NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+ {
++ .id = SNOR_ID(0xc8, 0x40, 0x10),
++ .name = "gd25q05",
++ .size = SZ_64K,
++ .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
++ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++ }, {
+ .id = SNOR_ID(0xc8, 0x40, 0x15),
+ .name = "gd25q16",
+ .size = SZ_2M,
--- a/drivers/mtd/spi-nor/gigadevice.c
+++ b/drivers/mtd/spi-nor/gigadevice.c
-@@ -71,6 +71,11 @@ static const struct flash_info gigadevic
- FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)
- FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
- .fixups = &gd25q256_fixups },
-+ { "gd25q512", INFO(0xc84020, 0, 64 * 1024, 1024)
-+ FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-+ FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
-+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+ SPI_NOR_QUAD_READ) },
- };
-
- const struct spi_nor_manufacturer spi_nor_gigadevice = {
+@@ -71,6 +71,13 @@ static const struct flash_info gigadevic
+ .fixups = &gd25q256_fixups,
+ .fixup_flags = SPI_NOR_4B_OPCODES,
+ }, {
++ .id = SNOR_ID(0xc8, 0x40, 0x20),
++ .name = "gd25q512",
++ .size = SZ_64M,
++ .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
++ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++ .fixup_flags = SPI_NOR_4B_OPCODES,
++ }, {
+ .id = SNOR_ID(0xc8, 0x60, 0x16),
+ .name = "gd25lq32",
+ .size = SZ_4M,
--- a/drivers/mtd/spi-nor/esmt.c
+++ b/drivers/mtd/spi-nor/esmt.c
-@@ -10,6 +10,9 @@
+@@ -10,6 +10,12 @@
static const struct flash_info esmt_nor_parts[] = {
- /* ESMT */
-+ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32)
-+ FLAGS(SPI_NOR_HAS_LOCK)
-+ NO_SFDP_FLAGS(SECT_4K) },
- { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64)
- FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE)
- NO_SFDP_FLAGS(SECT_4K) },
+ {
++ .id = SNOR_ID(0x8c, 0x21, 0x15),
++ .name = "f25l16pa-2s",
++ .size = SZ_2M,
++ .flags = SPI_NOR_HAS_LOCK,
++ .no_sfdp_flags = SECT_4K,
++ }, {
+ .id = SNOR_ID(0x8c, 0x20, 0x16),
+ .name = "f25l32pa",
+ .size = SZ_4M,
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
-@@ -16,6 +16,9 @@ static const struct flash_info xmc_nor_p
- { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
- NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
- SPI_NOR_QUAD_READ) },
-+ { "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
-+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+ SPI_NOR_QUAD_READ) },
+@@ -19,6 +19,11 @@ static const struct flash_info xmc_nor_p
+ .name = "XM25QH128A",
+ .size = SZ_16M,
+ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++ }, {
++ .id = SNOR_ID(0x20, 0x40, 0x18),
++ .name = "XM25QH128C",
++ .size = SZ_16M,
++ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+ },
};
- const struct spi_nor_manufacturer spi_nor_xmc = {
obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
-@@ -940,6 +940,7 @@ static const struct spinand_manufacturer
+@@ -1112,6 +1112,7 @@ static const struct spinand_manufacturer
&alliancememory_spinand_manufacturer,
&ato_spinand_manufacturer,
&esmt_c8_spinand_manufacturer,
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
-@@ -13,6 +13,9 @@ static const struct flash_info xmc_nor_p
- { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
- NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
- SPI_NOR_QUAD_READ) },
-+ { "XM25QH64C", INFO(0x204017, 0, 64 * 1024, 128)
-+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-+ SPI_NOR_QUAD_READ) },
- { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
- NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
- SPI_NOR_QUAD_READ) },
+@@ -15,6 +15,11 @@ static const struct flash_info xmc_nor_p
+ .size = SZ_8M,
+ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+ }, {
++ .id = SNOR_ID(0x20, 0x40, 0x17),
++ .name = "XM25QH64C",
++ .size = SZ_8M,
++ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++ }, {
+ .id = SNOR_ID(0x20, 0x70, 0x18),
+ .name = "XM25QH128A",
+ .size = SZ_16M,
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
-@@ -1258,6 +1258,80 @@ static struct mtd_notifier ubi_mtd_notif
+@@ -1263,6 +1263,80 @@ static struct mtd_notifier ubi_mtd_notif
.remove = ubi_notify_remove,
};
+
+ mutex_lock(&ubi_devices_mutex);
+ pr_notice("UBI: auto-attach mtd%d\n", mtd->index);
-+ err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0, false);
++ err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0, false, false);
+ mutex_unlock(&ubi_devices_mutex);
+ if (err < 0) {
+ pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
static int __init ubi_init_attach(void)
{
int err, i, k;
-@@ -1308,6 +1382,12 @@ static int __init ubi_init_attach(void)
+@@ -1314,6 +1388,12 @@ static int __init ubi_init_attach(void)
}
}
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
-@@ -570,10 +570,47 @@ match_volume_desc(struct ubi_volume_info
+@@ -575,10 +575,47 @@ match_volume_desc(struct ubi_volume_info
return true;
}
struct ubiblock_param *p;
/*
-@@ -586,6 +623,7 @@ ubiblock_create_from_param(struct ubi_vo
+@@ -591,6 +628,7 @@ ubiblock_create_from_param(struct ubi_vo
if (!match_volume_desc(vi, p->name, p->ubi_num, p->vol_id))
continue;
ret = ubiblock_create(vi);
if (ret) {
pr_err(
-@@ -594,6 +632,10 @@ ubiblock_create_from_param(struct ubi_vo
+@@ -599,6 +637,10 @@ ubiblock_create_from_param(struct ubi_vo
}
break;
}
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
-@@ -248,7 +248,30 @@ retry:
+@@ -250,7 +250,30 @@ retry:
out:
put_page(page);
}
#ifdef CONFIG_ROOT_NFS
#define NFSROOT_TIMEOUT_MIN 5
-@@ -385,6 +408,11 @@ static inline void mount_block_root(char
+@@ -387,6 +410,11 @@ static inline void mount_block_root(char
void __init mount_root(char *root_device_name)
{
#include "ubi-media.h"
#include "ubi.h"
-@@ -428,6 +429,15 @@ int ubiblock_create(struct ubi_volume_in
+@@ -431,6 +432,15 @@ int ubiblock_create(struct ubi_volume_in
dev_info(disk_to_dev(dev->gd), "created from ubi%d:%d(%s)",
dev->ubi_num, dev->vol_id, vi->name);
mutex_unlock(&devices_mutex);
break;
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
-@@ -780,6 +780,7 @@ struct ubi_attach_info {
+@@ -778,6 +778,7 @@ struct ubi_attach_info {
int mean_ec;
uint64_t ec_sum;
int ec_count;
+obj-$(CONFIG_MTD_VIRT_CONCAT) += virt_concat.o
--- /dev/null
+++ b/drivers/mtd/composite/virt_concat.c
-@@ -0,0 +1,128 @@
+@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Virtual concat MTD device driver
+ * Author: Bernhard Frauendienst, kernel@nospam.obeliks.de
+ */
+
++#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/mtd/concat.h>
+ struct mtd_info **devices;
+};
+
-+static int virt_concat_remove(struct platform_device *pdev)
++static void virt_concat_remove(struct platform_device *pdev)
+{
+ struct of_virt_concat *info;
+ int i;
+
+ info = platform_get_drvdata(pdev);
+ if (!info)
-+ return 0;
++ return;
+
+ // unset data for when this is called after a probe error
+ platform_set_drvdata(pdev, NULL);
+ for (i = 0; i < info->num_devices; i++)
+ put_mtd_device(info->devices[i]);
+ }
-+
-+ return 0;
+}
+
+static int virt_concat_probe(struct platform_device *pdev)
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
-@@ -48,6 +48,7 @@ static const struct flash_info macronix_
- { "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64)
- NO_SFDP_FLAGS(SECT_4K) },
- { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128)
-+ FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP)
- NO_SFDP_FLAGS(SECT_4K) },
- { "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4)
- NO_SFDP_FLAGS(SECT_4K) },
+@@ -66,6 +66,7 @@ static const struct flash_info macronix_
+ .id = SNOR_ID(0xc2, 0x20, 0x17),
+ .name = "mx25l6405d",
+ .size = SZ_8M,
++ .flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP,
+ .no_sfdp_flags = SECT_4K,
+ }, {
+ .id = SNOR_ID(0xc2, 0x20, 0x18),
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
-@@ -115,6 +115,7 @@ static int macronix_nor_late_init(struct
+@@ -195,6 +195,7 @@ static int macronix_nor_late_init(struct
{
if (!nor->params->set_4byte_addr_mode)
nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_en4b_ex4b;
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -22015,6 +22015,12 @@ F: Documentation/filesystems/ubifs-authe
+@@ -23658,6 +23658,12 @@ F: Documentation/filesystems/ubifs-authe
F: Documentation/filesystems/ubifs.rst
F: fs/ubifs/
L: linux-block@vger.kernel.org
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
-@@ -354,6 +354,18 @@ config VIRTIO_BLK
- This is the virtual block driver for virtio. It can be used with
- QEMU based VMMs (like KVM or Xen). Say Y or M.
+@@ -363,6 +363,18 @@ config BLK_DEV_RUST_NULL
+
+ If unsure, say N.
+config UIMAGE_FIT_BLK
+ bool "uImage.FIT block driver"
depends on INET && BLOCK
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
-@@ -39,4 +39,6 @@ obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_b
+@@ -42,4 +42,6 @@ obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_b
obj-$(CONFIG_BLK_DEV_UBLK) += ublk_drv.o
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
-@@ -463,7 +463,8 @@ static dev_t __init parse_root_device(ch
+@@ -465,7 +465,8 @@ static dev_t __init parse_root_device(ch
int error;
dev_t dev;
+}
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
-@@ -375,14 +375,41 @@ static int __init init_jffs2_fs(void)
+@@ -376,14 +376,41 @@ static int __init init_jffs2_fs(void)
BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68);
BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32);
#define JFFS2_NODE_ACCURATE 0x2000
--- a/lib/Kconfig
+++ b/lib/Kconfig
-@@ -356,6 +356,12 @@ config ZSTD_DECOMPRESS
+@@ -353,6 +353,12 @@ config ZSTD_DECOMPRESS
source "lib/xz/Kconfig"
# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
--- a/lib/Makefile
+++ b/lib/Makefile
-@@ -145,6 +145,16 @@ CFLAGS_kobject.o += -DDEBUG
+@@ -126,6 +126,16 @@ CFLAGS_kobject.o += -DDEBUG
CFLAGS_kobject_uevent.o += -DDEBUG
endif
obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o
CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any)
-@@ -205,6 +215,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
+@@ -185,6 +195,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd/
obj-$(CONFIG_XZ_DEC) += xz/
obj-$(CONFIG_RAID6_PQ) += raid6/
+}
+
+Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
-+Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
++static Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
+
-+UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
++static UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
+
+void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
+{
+ p->needFlush = 0;
+}
+
-+void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
++static void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
+{
+ p->needFlush = 1;
+ p->remainLen = 0;
+#define kNumLogBits (9 + (int)sizeof(size_t) / 2)
+#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
+
-+void LzmaEnc_FastPosInit(Byte *g_FastPos)
++static void LzmaEnc_FastPosInit(Byte *g_FastPos)
+{
+ int c = 2, slotFast;
+ g_FastPos[0] = 0;
+ CSaveState saveState;
+} CLzmaEnc;
+
-+void LzmaEnc_SaveState(CLzmaEncHandle pp)
++/*void LzmaEnc_SaveState(CLzmaEncHandle pp)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ CSaveState *dest = &p->saveState;
+ memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
+ memcpy(dest->reps, p->reps, sizeof(p->reps));
+ memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb));
-+}
++}*/
+
-+void LzmaEnc_RestoreState(CLzmaEncHandle pp)
++/*void LzmaEnc_RestoreState(CLzmaEncHandle pp)
+{
+ CLzmaEnc *dest = (CLzmaEnc *)pp;
+ const CSaveState *p = &dest->saveState;
+ memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
+ memcpy(dest->reps, p->reps, sizeof(p->reps));
+ memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb));
-+}
++}*/
+
+SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
+{
+ while (symbol < 0x10000);
+}
+
-+void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
++static void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
+{
+ UInt32 i;
+ for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
+ p->matchPriceCount = 0;
+}
+
-+void LzmaEnc_Construct(CLzmaEnc *p)
++static void LzmaEnc_Construct(CLzmaEnc *p)
+{
+ RangeEnc_Construct(&p->rc);
+ MatchFinder_Construct(&p->matchFinderBase);
+ return p;
+}
+
-+void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
++static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->litProbs);
+ alloc->Free(alloc, p->saveState.litProbs);
+ p->saveState.litProbs = 0;
+}
+
-+void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
++static void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ #ifndef _7ZIP_ST
+ MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
+ return SZ_OK;
+}
+
-+void LzmaEnc_Init(CLzmaEnc *p)
++static void LzmaEnc_Init(CLzmaEnc *p)
+{
+ UInt32 i;
+ p->state = 0;
+ p->lpMask = (1 << p->lp) - 1;
+}
+
-+void LzmaEnc_InitPrices(CLzmaEnc *p)
++static void LzmaEnc_InitPrices(CLzmaEnc *p)
+{
+ if (!p->fastMode)
+ {
+ return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig);
+}
+
-+SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
++/*SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
+ ISeqInStream *inStream, UInt32 keepWindowSize,
+ ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ p->matchFinderBase.stream = inStream;
+ p->needInit = 1;
+ return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
-+}
++}*/
+
+static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
+{
+ p->matchFinderBase.directInputRem = srcLen;
+}
+
-+SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
++static SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
+ UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
+}
+
-+void LzmaEnc_Finish(CLzmaEncHandle pp)
++static void LzmaEnc_Finish(CLzmaEncHandle pp)
+{
+ #ifndef _7ZIP_ST
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+}
+
+
-+UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
++/*UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
+{
+ const CLzmaEnc *p = (CLzmaEnc *)pp;
+ return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
-+}
++}*/
+
-+const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
++/*const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
+{
+ const CLzmaEnc *p = (CLzmaEnc *)pp;
+ return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
-+}
++}*/
+
-+SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
++/* SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
+ Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ return SZ_ERROR_OUTPUT_EOF;
+
+ return res;
-+}
++}*/
+
+static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
+{
--- a/net/sched/sch_codel.c
+++ b/net/sched/sch_codel.c
-@@ -95,11 +95,17 @@ static struct sk_buff *codel_qdisc_deque
+@@ -65,11 +65,17 @@ static struct sk_buff *codel_qdisc_deque
&q->stats, qdisc_pkt_len, codel_get_enqueue_time,
drop_func, dequeue_func);
goto out;
if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2190,12 +2192,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2189,12 +2191,12 @@ static int packet_rcv(struct sk_buff *sk
+ int skb_len = skb->len;
unsigned int snaplen, res;
- bool is_drop_n_account = false;
- if (skb->pkt_type == PACKET_LOOPBACK)
- goto drop;
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -2322,12 +2324,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2318,12 +2320,12 @@ static int tpacket_rcv(struct sk_buff *s
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -3451,6 +3453,7 @@ static int packet_create(struct net *net
+@@ -3444,6 +3446,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
-@@ -4118,6 +4121,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -4111,6 +4114,16 @@ packet_setsockopt(struct socket *sock, i
packet_sock_flag_set(po, PACKET_SOCK_QDISC_BYPASS, val);
return 0;
}
default:
return -ENOPROTOOPT;
}
-@@ -4177,6 +4190,13 @@ static int packet_getsockopt(struct sock
- case PACKET_VNET_HDR_SZ:
- val = READ_ONCE(po->vnet_hdr_sz);
+@@ -4173,6 +4186,13 @@ static int packet_getsockopt(struct sock
+ case PACKET_COPY_THRESH:
+ val = READ_ONCE(pkt_sk(sk)->copy_thresh);
break;
+ case PACKET_RECV_TYPE:
+ if (len > sizeof(unsigned int))
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -3062,7 +3062,7 @@ static inline int pskb_network_may_pull(
+@@ -3180,7 +3180,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD
struct in6_addr raddr; /* remote tunnel end-point address */
+ struct __ip6_tnl_fmr *fmrs; /* FMRs */
- __be16 i_flags;
- __be16 o_flags;
+ IP_TUNNEL_DECLARE_FLAGS(i_flags);
+ IP_TUNNEL_DECLARE_FLAGS(o_flags);
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -77,10 +77,23 @@ enum {
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-@@ -67,9 +70,9 @@ static bool log_ecn_error = true;
+@@ -68,9 +71,9 @@ static bool log_ecn_error = true;
module_param(log_ecn_error, bool, 0644);
MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
return hash_32(hash, IP6_TUNNEL_HASH_SIZE_SHIFT);
}
-@@ -114,17 +117,33 @@ static struct ip6_tnl *
+@@ -115,17 +118,33 @@ static struct ip6_tnl *
ip6_tnl_lookup(struct net *net, int link,
const struct in6_addr *remote, const struct in6_addr *local)
{
if (link == t->parms.link)
return t;
else
-@@ -132,7 +151,7 @@ ip6_tnl_lookup(struct net *net, int link
+@@ -133,7 +152,7 @@ ip6_tnl_lookup(struct net *net, int link
}
memset(&any, 0, sizeof(any));
for_each_ip6_tunnel_rcu(ip6n->tnls_r_l[hash]) {
if (!ipv6_addr_equal(local, &t->parms.laddr) ||
!ipv6_addr_any(&t->parms.raddr) ||
-@@ -145,7 +164,7 @@ ip6_tnl_lookup(struct net *net, int link
+@@ -146,7 +165,7 @@ ip6_tnl_lookup(struct net *net, int link
cand = t;
}
for_each_ip6_tunnel_rcu(ip6n->tnls_r_l[hash]) {
if (!ipv6_addr_equal(remote, &t->parms.raddr) ||
!ipv6_addr_any(&t->parms.laddr) ||
-@@ -194,7 +213,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n,
+@@ -195,7 +214,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n,
if (!ipv6_addr_any(remote) || !ipv6_addr_any(local)) {
prio = 1;
if (dev == ip6n->fb_tnl_dev)
RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);
else
-@@ -788,6 +813,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
+@@ -790,6 +815,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
}
EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl);
__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
-@@ -1002,6 +1149,7 @@ static void init_tel_txopt(struct ipv6_t
+@@ -1004,6 +1151,7 @@ static void init_tel_txopt(struct ipv6_t
opt->ops.opt_nflen = 8;
}
/**
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
* @t: the outgoing tunnel device
-@@ -1292,6 +1440,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1294,6 +1442,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
u8 protocol)
{
struct ip6_tnl *t = netdev_priv(dev);
struct ipv6hdr *ipv6h;
const struct iphdr *iph;
int encap_limit = -1;
-@@ -1391,6 +1540,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1393,6 +1542,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
-@@ -1544,6 +1705,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
+@@ -1546,6 +1707,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.link = p->link;
t->parms.proto = p->proto;
t->parms.fwmark = p->fwmark;
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
}
-@@ -1578,6 +1747,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
+@@ -1580,6 +1749,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
memcpy(p->name, u->name, sizeof(u->name));
}
-@@ -1966,6 +2136,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1963,6 +2133,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
-@@ -2003,6 +2182,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -2000,6 +2179,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_FWMARK])
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
}
static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
-@@ -2086,6 +2305,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
-@@ -2115,6 +2340,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
0;
}
-@@ -2122,6 +2365,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
-@@ -2131,9 +2377,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
-@@ -2173,6 +2437,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 },
struct fib_rules_ops *fib6_rules_ops;
--- a/include/uapi/linux/fib_rules.h
+++ b/include/uapi/linux/fib_rules.h
-@@ -82,6 +82,10 @@ enum {
+@@ -83,6 +83,10 @@ enum {
FR_ACT_BLACKHOLE, /* Drop without notification */
FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */
FR_ACT_PROHIBIT, /* Drop with EACCES */
static inline const char *rtn_type(char *buf, size_t len, unsigned int t)
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
-@@ -190,6 +190,7 @@ static int ipmr_rule_action(struct fib_r
+@@ -191,6 +191,7 @@ static int ipmr_rule_action(struct fib_r
case FR_ACT_UNREACHABLE:
return -ENETUNREACH;
case FR_ACT_PROHIBIT:
default:
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
-@@ -221,6 +221,10 @@ static int __fib6_rule_action(struct fib
+@@ -222,6 +222,10 @@ static int __fib6_rule_action(struct fib
err = -EACCES;
rt = net->ipv6.ip6_prohibit_entry;
goto discard_pkt;
static void ip6_link_failure(struct sk_buff *skb);
static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
struct sk_buff *skb, u32 mtu,
-@@ -318,6 +320,18 @@ static const struct rt6_info ip6_prohibi
+@@ -316,6 +318,18 @@ static const struct rt6_info ip6_prohibi
.rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP),
};
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__rcuref = RCUREF_INIT(1),
-@@ -1043,6 +1057,7 @@ static const int fib6_prop[RTN_MAX + 1]
+@@ -1051,6 +1065,7 @@ static const int fib6_prop[RTN_MAX + 1]
[RTN_BLACKHOLE] = -EINVAL,
[RTN_UNREACHABLE] = -EHOSTUNREACH,
[RTN_PROHIBIT] = -EACCES,
[RTN_THROW] = -EAGAIN,
[RTN_NAT] = -EINVAL,
[RTN_XRESOLVE] = -EINVAL,
-@@ -1078,6 +1093,10 @@ static void ip6_rt_init_dst_reject(struc
+@@ -1086,6 +1101,10 @@ static void ip6_rt_init_dst_reject(struc
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -4546,6 +4565,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -4555,6 +4574,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -5037,7 +5067,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -5046,7 +5076,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -6284,6 +6315,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6306,6 +6337,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -6295,6 +6328,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6317,6 +6350,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
-@@ -6495,6 +6529,8 @@ static int __net_init ip6_route_net_init
+@@ -6512,6 +6546,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
-@@ -6505,11 +6541,21 @@ static int __net_init ip6_route_net_init
+@@ -6522,11 +6558,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
-@@ -6536,6 +6582,8 @@ out:
+@@ -6553,6 +6599,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -6555,6 +6603,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6572,6 +6620,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6638,6 +6687,9 @@ void __init ip6_route_init_special_entri
+@@ -6655,6 +6704,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
--- a/include/uapi/linux/fib_rules.h
+++ b/include/uapi/linux/fib_rules.h
-@@ -89,6 +89,8 @@ enum {
+@@ -90,6 +90,8 @@ enum {
__FR_ACT_MAX,
};
#endif
--- a/include/uapi/linux/icmpv6.h
+++ b/include/uapi/linux/icmpv6.h
-@@ -126,6 +126,8 @@ struct icmp6hdr {
+@@ -127,6 +127,8 @@ struct icmp6hdr {
#define ICMPV6_POLICY_FAIL 5
#define ICMPV6_REJECT_ROUTE 6
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
-@@ -118,7 +118,7 @@ static void dummy_setup(struct net_devic
- dev->flags &= ~IFF_MULTICAST;
+@@ -111,7 +111,7 @@ static void dummy_setup(struct net_devic
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+ dev->lltx = true;
dev->features |= NETIF_F_SG | NETIF_F_FRAGLIST;
- dev->features |= NETIF_F_GSO_SOFTWARE;
+ dev->features |= NETIF_F_GSO_SOFTWARE_ALL;
- dev->features |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX;
+ dev->features |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
dev->features |= NETIF_F_GSO_ENCAP_ALL;
dev->hw_features |= dev->features;
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
-@@ -176,7 +176,7 @@ static void gen_lo_setup(struct net_devi
- dev->flags = IFF_LOOPBACK;
- dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+@@ -174,7 +174,7 @@ static void gen_lo_setup(struct net_devi
+ dev->lltx = true;
+ dev->netns_local = true;
netif_keep_dst(dev);
- dev->hw_features = NETIF_F_GSO_SOFTWARE;
+ dev->hw_features = NETIF_F_GSO_SOFTWARE_ALL;
| NETIF_F_HW_CSUM
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
-@@ -896,7 +896,7 @@ static int macvlan_hwtstamp_set(struct n
+@@ -897,7 +897,7 @@ static int macvlan_hwtstamp_set(struct n
static struct lock_class_key macvlan_netdev_addr_lock_key;
#define ALWAYS_ON_OFFLOADS \
+ (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE_ALL | \
NETIF_F_GSO_ROBUST | NETIF_F_GSO_ENCAP_ALL)
- #define ALWAYS_ON_FEATURES (ALWAYS_ON_OFFLOADS | NETIF_F_LLTX)
+ #define ALWAYS_ON_FEATURES ALWAYS_ON_OFFLOADS
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
-@@ -219,13 +219,14 @@ static inline int find_next_netdev_featu
+@@ -211,13 +211,14 @@ static inline int find_next_netdev_featu
/* List of features with software fallbacks. */
#define NETIF_F_GSO_SOFTWARE (NETIF_F_ALL_TSO | NETIF_F_GSO_SCTP | \
if ((ret & NETIF_F_GSO_ENCAP_ALL) && (ret & NETIF_F_CSUM_MASK))
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
-@@ -583,7 +583,7 @@ static int vlan_dev_init(struct net_devi
+@@ -561,7 +561,7 @@ static int vlan_dev_init(struct net_devi
dev->state |= (1 << __LINK_STATE_NOCARRIER);
dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG |
+ NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE_ALL |
NETIF_F_GSO_ENCAP_ALL |
NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
- NETIF_F_ALL_FCOE;
-@@ -676,7 +676,7 @@ static netdev_features_t vlan_dev_fix_fe
+ NETIF_F_FCOE_CRC | NETIF_F_FSO;
+@@ -657,7 +657,7 @@ static netdev_features_t vlan_dev_fix_fe
if (lower_features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
lower_features |= NETIF_F_HW_CSUM;
features = netdev_intersect_features(features, lower_features);
- features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE);
+ features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE_ALL);
- features |= NETIF_F_LLTX;
return features;
+ }
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -2441,7 +2441,7 @@ void sk_setup_caps(struct sock *sk, stru
+@@ -2525,7 +2525,7 @@ void sk_setup_caps(struct sock *sk, stru
if (sk_is_tcp(sk))
sk->sk_route_caps |= NETIF_F_GSO;
if (sk->sk_route_caps & NETIF_F_GSO)
if (sk_can_gso(sk)) {
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1996,7 +1996,7 @@ void ieee80211_color_collision_detection
+@@ -2012,7 +2012,7 @@ void ieee80211_color_collision_detection
/* interface handling */
#define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
NETIF_F_HW_CSUM | NETIF_F_SG | \
#define MAC80211_SUPPORTED_FEATURES (MAC80211_SUPPORTED_FEATURES_TX | \
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
-@@ -110,7 +110,7 @@ static void do_setup(struct net_device *
+@@ -109,7 +109,7 @@ static void do_setup(struct net_device *
+ netdev->rtnl_link_ops = &internal_dev_link_ops;
- netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
- NETIF_F_HIGHDMA | NETIF_F_HW_CSUM |
-- NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL;
-+ NETIF_F_GSO_SOFTWARE_ALL | NETIF_F_GSO_ENCAP_ALL;
+ netdev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
+- NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
++ NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE_ALL |
+ NETIF_F_GSO_ENCAP_ALL;
netdev->vlan_features = netdev->features;
- netdev->hw_enc_features = netdev->features;
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
-@@ -662,6 +662,23 @@ static struct pernet_operations nf_flow_
+@@ -658,6 +658,23 @@ static struct pernet_operations nf_flow_
.exit_batch = nf_flow_table_pernet_exit,
};
static int __init nf_flow_table_module_init(void)
{
int ret;
-@@ -674,8 +691,14 @@ static int __init nf_flow_table_module_i
+@@ -674,9 +691,14 @@ static int __init nf_flow_table_module_i
if (ret)
- goto out_offload;
+ goto out_bpf;
+ ret = register_netdevice_notifier(&flow_offload_netdev_notifier);
+ if (ret)
+
return 0;
+ out_bpf:
+out_offload_init:
-+ nf_flow_table_offload_exit();
+ nf_flow_table_offload_exit();
out_offload:
unregister_pernet_subsys(&nf_flow_table_net_ops);
- return ret;
-@@ -683,6 +706,7 @@ out_offload:
+@@ -685,6 +707,7 @@ out_offload:
static void __exit nf_flow_table_module_exit(void)
{
}
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
-@@ -480,47 +480,14 @@ static struct nft_expr_type nft_flow_off
+@@ -481,47 +481,14 @@ static struct nft_expr_type nft_flow_off
.owner = THIS_MODULE,
};
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
-@@ -8417,7 +8417,7 @@ static int nft_register_flowtable_net_ho
+@@ -8607,7 +8607,7 @@ static int nft_register_flowtable_net_ho
err = flowtable->data.type->setup(&flowtable->data,
hook->ops.dev,
FLOW_BLOCK_BIND);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5036,6 +5036,8 @@ static int mtk_probe(struct platform_dev
- * for NAPI to work
- */
- init_dummy_netdev(ð->dummy_dev);
-+ eth->dummy_dev.threaded = 1;
-+ strcpy(eth->dummy_dev.name, "mtk_eth");
- netif_napi_add(ð->dummy_dev, ð->tx_napi, mtk_napi_tx);
- netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx);
+@@ -5041,6 +5041,8 @@ static int mtk_probe(struct platform_dev
+ dev_err(eth->dev, "failed to allocated dummy device\n");
+ goto err_unreg_netdev;
+ }
++ eth->dummy_dev->threaded = 1;
++ strcpy(eth->dummy_dev->name, "mtk_eth");
+ netif_napi_add(eth->dummy_dev, ð->tx_napi, mtk_napi_tx);
+ netif_napi_add(eth->dummy_dev, ð->rx_napi, mtk_napi_rx);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1910,6 +1910,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1986,6 +1986,9 @@ void phy_detach(struct phy_device *phyde
if (phydev->devlink)
device_link_del(phydev->devlink);
sysfs_remove_link(&dev->dev.kobj, "phydev");
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -980,6 +980,12 @@ struct phy_driver {
+@@ -999,6 +999,12 @@ struct phy_driver {
/** @handle_interrupt: Override default interrupt handling */
irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
-@@ -2017,7 +2017,7 @@ int phylink_fwnode_phy_connect(struct ph
+@@ -2086,7 +2086,7 @@ int phylink_fwnode_phy_connect(struct ph
{
struct fwnode_handle *phy_fwnode;
struct phy_device *phy_dev;
/* Fixed links and 802.3z are handled without needing a PHY */
if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
-@@ -2044,6 +2044,25 @@ int phylink_fwnode_phy_connect(struct ph
- pl->link_config.interface = pl->link_interface;
- }
+@@ -2116,6 +2116,25 @@ int phylink_fwnode_phy_connect(struct ph
+ if (pl->config->mac_requires_rxc)
+ flags |= PHY_F_RXC_ALWAYS_ON;
+ /* Assume single-lane SerDes interface modes share the same
+ * lanes and allow the PHY to switch to slower also supported modes
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
-@@ -571,6 +571,7 @@ enum {
+@@ -1094,6 +1094,7 @@ enum {
IFLA_BRPORT_MCAST_MAX_GROUPS,
IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
IFLA_BRPORT_BACKUP_NHID,
(!(p->flags & BR_PORT_LOCKED) || !(p->flags & BR_LEARNING))) {
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
-@@ -61,7 +61,7 @@
+@@ -62,7 +62,7 @@
#include "dev.h"
#define RTNL_MAX_TYPE 50
struct rtnl_link {
rtnl_doit_func doit;
-@@ -4978,7 +4978,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
+@@ -5009,7 +5009,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
brport_nla_put_flag(skb, flags, mask,
IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) ||
brport_nla_put_flag(skb, flags, mask,
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
-@@ -2012,6 +2012,8 @@ static const struct dsa_switch_ops qca8k
+@@ -2031,6 +2031,8 @@ static const struct dsa_switch_ops qca8k
.port_fdb_add = qca8k_port_fdb_add,
.port_fdb_del = qca8k_port_fdb_del,
.port_fdb_dump = qca8k_port_fdb_dump,
.port_mirror_add = qca8k_port_mirror_add,
--- a/drivers/net/dsa/qca/qca8k-common.c
+++ b/drivers/net/dsa/qca/qca8k-common.c
-@@ -1215,6 +1215,42 @@ int qca8k_port_lag_leave(struct dsa_swit
+@@ -1234,6 +1234,42 @@ int qca8k_port_lag_leave(struct dsa_swit
return qca8k_lag_refresh_portmap(ds, port, lag, true);
}
u32 val;
--- a/drivers/net/dsa/qca/qca8k.h
+++ b/drivers/net/dsa/qca/qca8k.h
-@@ -590,5 +590,11 @@ int qca8k_port_lag_join(struct dsa_switc
+@@ -592,5 +592,11 @@ int qca8k_port_lag_join(struct dsa_switc
struct netlink_ext_ack *extack);
int qca8k_port_lag_leave(struct dsa_switch *ds, int port,
struct dsa_lag lag);
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
-@@ -1901,15 +1901,12 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -1913,15 +1913,12 @@ qca8k_setup(struct dsa_switch *ds)
}
}
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
-@@ -1738,6 +1738,117 @@ qca8k_get_tag_protocol(struct dsa_switch
+@@ -1750,6 +1750,117 @@ qca8k_get_tag_protocol(struct dsa_switch
return DSA_TAG_PROTO_QCA;
}
+}
+
static void
- qca8k_master_change(struct dsa_switch *ds, const struct net_device *master,
- bool operational)
-@@ -2024,8 +2135,9 @@ static const struct dsa_switch_ops qca8k
- .phylink_mac_link_down = qca8k_phylink_mac_link_down,
- .phylink_mac_link_up = qca8k_phylink_mac_link_up,
+ qca8k_conduit_change(struct dsa_switch *ds, const struct net_device *conduit,
+ bool operational)
+@@ -2039,8 +2150,9 @@ static const struct dsa_switch_ops qca8k
+ .port_vlan_del = qca8k_port_vlan_del,
+ .phylink_get_caps = qca8k_phylink_get_caps,
.get_phy_flags = qca8k_get_phy_flags,
- .port_lag_join = qca8k_port_lag_join,
- .port_lag_leave = qca8k_port_lag_leave,
+ .port_lag_join = qca8xxx_port_lag_join,
+ .port_lag_leave = qca8xxx_port_lag_leave,
-+ .port_change_master = qca8k_port_change_master,
- .master_state_change = qca8k_master_change,
++ .port_change_master = qca8xxx_port_change_master,
+ .conduit_state_change = qca8k_conduit_change,
.connect_tag_protocol = qca8k_connect_tag_protocol,
};
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
-@@ -2010,6 +2010,12 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -2022,6 +2022,12 @@ qca8k_setup(struct dsa_switch *ds)
dev_err(priv->dev, "failed enabling QCA header mode on port %d", dp->index);
return ret;
}
}
/* Forward all unknown frames to CPU port for Linux processing */
-@@ -2039,11 +2045,6 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -2051,11 +2057,6 @@ qca8k_setup(struct dsa_switch *ds)
if (ret)
return ret;
/* For port based vlans to work we need to set the
* default egress vid
*/
-@@ -2095,6 +2096,9 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -2107,6 +2108,9 @@ qca8k_setup(struct dsa_switch *ds)
/* Set max number of LAGs supported */
ds->num_lag_ids = QCA8K_NUM_LAGS;
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -2243,7 +2243,7 @@ struct net_device {
+@@ -2224,7 +2224,7 @@ struct net_device {
#if IS_ENABLED(CONFIG_AX25)
void *ax25_ptr;
#endif
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -1336,6 +1336,22 @@ struct mtk_mac {
+@@ -1322,6 +1322,22 @@ struct mtk_mac {
/* the struct describing the SoC. these are declared in the soc_xyz.c files */
extern const struct of_device_id of_mtk_match[];
static inline bool mtk_is_netsys_v1(struct mtk_eth *eth)
{
return eth->soc->version == 1;
-@@ -1350,6 +1366,7 @@ static inline bool mtk_is_netsys_v3_or_g
+@@ -1336,6 +1352,7 @@ static inline bool mtk_is_netsys_v3_or_g
{
return eth->soc->version > 2;
}
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
err = devm_request_irq(eth->dev, eth->irq[0],
mtk_handle_irq, 0,
-@@ -5120,6 +5345,11 @@ static int mtk_remove(struct platform_de
+@@ -5127,6 +5352,11 @@ static void mtk_remove(struct platform_d
mtk_stop(eth->netdev[i]);
mac = netdev_priv(eth->netdev[i]);
phylink_disconnect_phy(mac->phylink);
#define MTK_MAC_FSM(x) (0x1010C + ((x) * 0x100))
-@@ -724,12 +753,8 @@ enum mtk_clks_map {
- MTK_CLK_ETHWARP_WOCPU2,
- MTK_CLK_ETHWARP_WOCPU1,
- MTK_CLK_ETHWARP_WOCPU0,
-- MTK_CLK_TOP_USXGMII_SBUS_0_SEL,
-- MTK_CLK_TOP_USXGMII_SBUS_1_SEL,
- MTK_CLK_TOP_SGM_0_SEL,
- MTK_CLK_TOP_SGM_1_SEL,
-- MTK_CLK_TOP_XFI_PHY_0_XTAL_SEL,
-- MTK_CLK_TOP_XFI_PHY_1_XTAL_SEL,
- MTK_CLK_TOP_ETH_GMII_SEL,
- MTK_CLK_TOP_ETH_REFCK_50M_SEL,
- MTK_CLK_TOP_ETH_SYS_200M_SEL,
-@@ -800,19 +825,9 @@ enum mtk_clks_map {
- BIT_ULL(MTK_CLK_GP3) | BIT_ULL(MTK_CLK_XGP1) | \
- BIT_ULL(MTK_CLK_XGP2) | BIT_ULL(MTK_CLK_XGP3) | \
- BIT_ULL(MTK_CLK_CRYPTO) | \
-- BIT_ULL(MTK_CLK_SGMII_TX_250M) | \
-- BIT_ULL(MTK_CLK_SGMII_RX_250M) | \
-- BIT_ULL(MTK_CLK_SGMII2_TX_250M) | \
-- BIT_ULL(MTK_CLK_SGMII2_RX_250M) | \
- BIT_ULL(MTK_CLK_ETHWARP_WOCPU2) | \
- BIT_ULL(MTK_CLK_ETHWARP_WOCPU1) | \
- BIT_ULL(MTK_CLK_ETHWARP_WOCPU0) | \
-- BIT_ULL(MTK_CLK_TOP_USXGMII_SBUS_0_SEL) | \
-- BIT_ULL(MTK_CLK_TOP_USXGMII_SBUS_1_SEL) | \
-- BIT_ULL(MTK_CLK_TOP_SGM_0_SEL) | \
-- BIT_ULL(MTK_CLK_TOP_SGM_1_SEL) | \
-- BIT_ULL(MTK_CLK_TOP_XFI_PHY_0_XTAL_SEL) | \
-- BIT_ULL(MTK_CLK_TOP_XFI_PHY_1_XTAL_SEL) | \
- BIT_ULL(MTK_CLK_TOP_ETH_GMII_SEL) | \
- BIT_ULL(MTK_CLK_TOP_ETH_REFCK_50M_SEL) | \
- BIT_ULL(MTK_CLK_TOP_ETH_SYS_200M_SEL) | \
-@@ -946,6 +961,8 @@ enum mkt_eth_capabilities {
+@@ -932,6 +961,8 @@ enum mkt_eth_capabilities {
MTK_RGMII_BIT = 0,
MTK_TRGMII_BIT,
MTK_SGMII_BIT,
MTK_ESW_BIT,
MTK_GEPHY_BIT,
MTK_MUX_BIT,
-@@ -966,8 +983,11 @@ enum mkt_eth_capabilities {
+@@ -952,8 +983,11 @@ enum mkt_eth_capabilities {
MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT,
MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY_BIT,
MTK_ETH_MUX_U3_GMAC2_TO_QPHY_BIT,
/* PATH BITS */
MTK_ETH_PATH_GMAC1_RGMII_BIT,
-@@ -975,14 +995,21 @@ enum mkt_eth_capabilities {
+@@ -961,14 +995,21 @@ enum mkt_eth_capabilities {
MTK_ETH_PATH_GMAC1_SGMII_BIT,
MTK_ETH_PATH_GMAC2_RGMII_BIT,
MTK_ETH_PATH_GMAC2_SGMII_BIT,
#define MTK_ESW BIT_ULL(MTK_ESW_BIT)
#define MTK_GEPHY BIT_ULL(MTK_GEPHY_BIT)
#define MTK_MUX BIT_ULL(MTK_MUX_BIT)
-@@ -1005,10 +1032,16 @@ enum mkt_eth_capabilities {
+@@ -991,10 +1032,16 @@ enum mkt_eth_capabilities {
BIT_ULL(MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY_BIT)
#define MTK_ETH_MUX_U3_GMAC2_TO_QPHY \
BIT_ULL(MTK_ETH_MUX_U3_GMAC2_TO_QPHY_BIT)
/* Supported path present on SoCs */
#define MTK_ETH_PATH_GMAC1_RGMII BIT_ULL(MTK_ETH_PATH_GMAC1_RGMII_BIT)
-@@ -1016,8 +1049,13 @@ enum mkt_eth_capabilities {
+@@ -1002,8 +1049,13 @@ enum mkt_eth_capabilities {
#define MTK_ETH_PATH_GMAC1_SGMII BIT_ULL(MTK_ETH_PATH_GMAC1_SGMII_BIT)
#define MTK_ETH_PATH_GMAC2_RGMII BIT_ULL(MTK_ETH_PATH_GMAC2_RGMII_BIT)
#define MTK_ETH_PATH_GMAC2_SGMII BIT_ULL(MTK_ETH_PATH_GMAC2_SGMII_BIT)
#define MTK_GMAC1_RGMII (MTK_ETH_PATH_GMAC1_RGMII | MTK_RGMII)
#define MTK_GMAC1_TRGMII (MTK_ETH_PATH_GMAC1_TRGMII | MTK_TRGMII)
-@@ -1025,7 +1063,12 @@ enum mkt_eth_capabilities {
+@@ -1011,7 +1063,12 @@ enum mkt_eth_capabilities {
#define MTK_GMAC2_RGMII (MTK_ETH_PATH_GMAC2_RGMII | MTK_RGMII)
#define MTK_GMAC2_SGMII (MTK_ETH_PATH_GMAC2_SGMII | MTK_SGMII)
#define MTK_GMAC2_GEPHY (MTK_ETH_PATH_GMAC2_GEPHY | MTK_GEPHY)
/* MUXes present on SoCs */
/* 0: GDM1 -> GMAC1, 1: GDM1 -> ESW */
-@@ -1044,10 +1087,20 @@ enum mkt_eth_capabilities {
+@@ -1030,10 +1087,20 @@ enum mkt_eth_capabilities {
(MTK_ETH_MUX_GMAC1_GMAC2_TO_SGMII_RGMII | MTK_MUX | \
MTK_SHARED_SGMII)
#define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x))
#define MT7621_CAPS (MTK_GMAC1_RGMII | MTK_GMAC1_TRGMII | \
-@@ -1079,8 +1132,12 @@ enum mkt_eth_capabilities {
+@@ -1065,8 +1132,12 @@ enum mkt_eth_capabilities {
MTK_MUX_GMAC12_TO_GEPHY_SGMII | MTK_QDMA | \
MTK_RSTCTRL_PPE1 | MTK_SRAM)
struct mtk_tx_dma_desc_info {
dma_addr_t addr;
-@@ -1325,6 +1382,9 @@ struct mtk_mac {
+@@ -1311,6 +1382,9 @@ struct mtk_mac {
struct device_node *of_node;
struct phylink *phylink;
struct phylink_config phylink_config;
struct mtk_eth *hw;
struct mtk_hw_stats *hw_stats;
__be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
-@@ -1448,6 +1508,19 @@ static inline u32 mtk_get_ib2_multicast_
+@@ -1434,6 +1508,19 @@ static inline u32 mtk_get_ib2_multicast_
return MTK_FOE_IB2_MULTICAST;
}
/* read the hardware status register */
void mtk_stats_update_mac(struct mtk_mac *mac);
-@@ -1456,8 +1529,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
+@@ -1442,8 +1529,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg);
int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);
}
EXPORT_SYMBOL(mtk_pcs_lynxi_create);
-@@ -303,4 +368,144 @@ void mtk_pcs_lynxi_destroy(struct phylin
+@@ -303,5 +368,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
}
EXPORT_SYMBOL(mtk_pcs_lynxi_destroy);
+ return 0;
+}
+
-+static int mtk_pcs_lynxi_remove(struct platform_device *pdev)
++static void mtk_pcs_lynxi_remove(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct mtk_pcs_lynxi *cur, *tmp;
+ break;
+ }
+ mutex_unlock(&instance_mutex);
-+
-+ return 0;
+}
+
+static const struct of_device_id mtk_pcs_lynxi_of_match[] = {
+module_platform_driver(mtk_pcs_lynxi_driver);
+
+MODULE_AUTHOR("Daniel Golle <daniel@makrotopia.org>");
-+MODULE_DESCRIPTION("MediaTek LynxI HSGMII PCS");
+ MODULE_DESCRIPTION("MediaTek SGMII library for LynxI");
MODULE_LICENSE("GPL");
--- a/include/linux/pcs/pcs-mtk-lynxi.h
+++ b/include/linux/pcs/pcs-mtk-lynxi.h
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -13356,7 +13356,9 @@ M: Daniel Golle <daniel@makrotopia.org>
+@@ -14419,7 +14419,9 @@ M: Daniel Golle <daniel@makrotopia.org>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/pcs/pcs-mtk-lynxi.c
depends on OF && (ARCH_RZN1 || COMPILE_TEST)
--- a/drivers/net/pcs/Makefile
+++ b/drivers/net/pcs/Makefile
-@@ -7,3 +7,4 @@ obj-$(CONFIG_PCS_XPCS) += pcs_xpcs.o
+@@ -8,3 +8,4 @@ obj-$(CONFIG_PCS_XPCS) += pcs_xpcs.o
obj-$(CONFIG_PCS_LYNX) += pcs-lynx.o
obj-$(CONFIG_PCS_MTK_LYNXI) += pcs-mtk-lynxi.o
obj-$(CONFIG_PCS_RZN1_MIIC) += pcs-rzn1-miic.o
+obj-$(CONFIG_PCS_MTK_USXGMII) += pcs-mtk-usxgmii.o
--- /dev/null
+++ b/drivers/net/pcs/pcs-mtk-usxgmii.c
-@@ -0,0 +1,456 @@
+@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023 MediaTek Inc.
+ return 0;
+}
+
-+static int mtk_usxgmii_remove(struct platform_device *pdev)
++static void mtk_usxgmii_remove(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct mtk_usxgmii_pcs *cur, *tmp;
+ break;
+ }
+ mutex_unlock(&instance_mutex);
-+
-+ return 0;
+}
+
+static const struct of_device_id mtk_usxgmii_of_mtable[] = {
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
-@@ -113,7 +113,7 @@ config BROADCOM_PHY
+@@ -139,7 +139,7 @@ config BROADCOM_PHY
tristate "Broadcom 54XX PHYs"
select BCM_NET_PHYLIB
select BCM_NET_PHYPTP if NETWORK_PHY_TIMESTAMPING
--- a/drivers/net/phy/air_en8811h.c
+++ b/drivers/net/phy/air_en8811h.c
-@@ -544,6 +544,10 @@ static int air_hw_led_on_set(struct phy_
-
- changed |= (priv->led[index].rules != 0);
+@@ -548,6 +548,10 @@ static int air_hw_led_on_set(struct phy_
+ if (!on)
+ priv->led[index].rules = 0;
+ /* clear netdev trigger rules in case LED_OFF has been set */
+ if (!on)
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
-@@ -17731,8 +17731,10 @@ static int tg3_init_one(struct pci_dev *
+@@ -17801,8 +17801,10 @@ static int tg3_init_one(struct pci_dev *
} else
persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
-@@ -1820,4 +1820,19 @@ config GPIO_SIM
+@@ -1929,4 +1929,19 @@ config GPIO_VIRTUSER
endmenu
endif
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
-@@ -44,6 +44,7 @@ obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd
+@@ -45,6 +45,7 @@ obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd
obj-$(CONFIG_GPIO_BRCMSTB) += gpio-brcmstb.o
obj-$(CONFIG_GPIO_BT8XX) += gpio-bt8xx.o
obj-$(CONFIG_GPIO_CADENCE) += gpio-cadence.o
+obj-$(CONFIG_GPIO_CASCADE) += gpio-cascade.o
obj-$(CONFIG_GPIO_CLPS711X) += gpio-clps711x.o
obj-$(CONFIG_GPIO_SNPS_CREG) += gpio-creg-snps.o
- obj-$(CONFIG_GPIO_CRYSTAL_COVE) += gpio-crystalcove.o
+ obj-$(CONFIG_GPIO_CROS_EC) += gpio-cros-ec.o
--- /dev/null
+++ b/drivers/gpio/gpio-cascade.c
@@ -0,0 +1,112 @@
return 0;
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
-@@ -902,7 +902,8 @@ static int _set_opp_voltage(struct devic
+@@ -942,7 +942,8 @@ static int _set_opp_voltage(struct devic
static int
_opp_config_clk_single(struct device *dev, struct opp_table *opp_table,
{
unsigned long *target = data;
unsigned long freq;
-@@ -934,8 +935,8 @@ _opp_config_clk_single(struct device *de
+@@ -974,8 +975,8 @@ _opp_config_clk_single(struct device *de
* the order in which they are present in the array while scaling up.
*/
int dev_pm_opp_config_clks_simple(struct device *dev,
{
int ret, i;
-@@ -1217,7 +1218,7 @@ static int _set_opp(struct device *dev,
+@@ -1242,7 +1243,7 @@ static int _set_opp(struct device *dev,
}
if (opp_table->config_clks) {
if (ret)
return ret;
}
-@@ -1292,7 +1293,7 @@ int dev_pm_opp_set_rate(struct device *d
+@@ -1321,7 +1322,7 @@ int dev_pm_opp_set_rate(struct device *d
* equivalent to a clk_set_rate()
*/
if (!_get_opp_count(opp_table)) {
}
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
-@@ -61,7 +61,8 @@ typedef int (*config_regulators_t)(struc
+@@ -50,7 +50,8 @@ typedef int (*config_regulators_t)(struc
struct dev_pm_opp *old_opp, struct dev_pm_opp *new_opp,
struct regulator **regulators, unsigned int count);
struct dev_pm_opp *opp, void *data, bool scaling_down);
/**
-@@ -172,8 +173,8 @@ int dev_pm_opp_set_config(struct device
+@@ -184,8 +185,8 @@ int dev_pm_opp_set_config(struct device
int devm_pm_opp_set_config(struct device *dev, struct dev_pm_opp_config *config);
void dev_pm_opp_clear_config(int token);
int dev_pm_opp_config_clks_simple(struct device *dev,
struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table, struct opp_table *dst_table, struct dev_pm_opp *src_opp);
int dev_pm_opp_xlate_performance_state(struct opp_table *src_table, struct opp_table *dst_table, unsigned int pstate);
-@@ -377,8 +378,8 @@ static inline int devm_pm_opp_set_config
+@@ -395,8 +396,8 @@ static inline int devm_pm_opp_set_config
static inline void dev_pm_opp_clear_config(int token) {}
static inline int dev_pm_opp_config_clks_simple(struct device *dev,
#include <linux/init.h>
#include <linux/kref.h>
#include <linux/module.h>
-@@ -796,6 +799,62 @@ static int nvmem_validate_keepouts(struc
+@@ -797,6 +800,62 @@ static int nvmem_validate_keepouts(struc
return 0;
}
static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
{
struct device *dev = &nvmem->dev;
-@@ -835,6 +894,25 @@ static int nvmem_add_cells_from_dt(struc
+@@ -836,6 +895,25 @@ static int nvmem_add_cells_from_dt(struc
if (nvmem->fixup_dt_cell_info)
nvmem->fixup_dt_cell_info(nvmem, &info);
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
-@@ -113,6 +113,13 @@ config XEN_PCIDEV_FRONTEND
+@@ -118,6 +118,13 @@ config XEN_PCIDEV_FRONTEND
The PCI device frontend driver allows the kernel to import arbitrary
PCI devices from a PCI backend to support PCI driver domains.
/*
* The Mellanox Tavor device gives false positive parity errors. Disable
* parity error reporting.
-@@ -3501,6 +3502,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3508,6 +3509,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
/*
* Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.
* To work around this, query the size it should be configured to by the
-@@ -3526,6 +3529,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3533,6 +3536,8 @@ static void quirk_intel_ntb(struct pci_d
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
/*
* Some BIOS implementations leave the Intel GPU interrupts enabled, even
* though no one is handling them (e.g., if the i915 driver is never
-@@ -3564,6 +3569,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3571,6 +3576,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
depends on ACPI
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
-@@ -685,6 +685,17 @@ static inline void ata_set_tf_cdl(struct
+@@ -672,6 +672,17 @@ static inline void ata_set_tf_cdl(struct
qc->flags |= ATA_QCFLAG_HAS_CDL | ATA_QCFLAG_RESULT_TF;
}
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @qc: Metadata associated with the taskfile to build
-@@ -4771,6 +4782,9 @@ void __ata_qc_complete(struct ata_queued
+@@ -4728,6 +4739,9 @@ void __ata_qc_complete(struct ata_queued
link->active_tag = ATA_TAG_POISON;
ap->nr_active_links--;
}
/* clear exclusive status */
if (unlikely(qc->flags & ATA_QCFLAG_CLEAR_EXCL &&
-@@ -5494,6 +5508,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5450,6 +5464,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
ata_sff_port_init(ap);
return ap;
-@@ -5507,6 +5524,12 @@ void ata_port_free(struct ata_port *ap)
+@@ -5464,6 +5481,12 @@ void ata_port_free(struct ata_port *ap)
kfree(ap->pmp_link);
kfree(ap->slave_link);
- kfree(ap->ncq_sense_buf);
+ ida_free(&ata_ida, ap->print_id);
+#ifdef CONFIG_ATA_LEDS
+ if (ap->ledtrig) {
+ led_trigger_unregister(ap->ledtrig);
kfree(ap);
}
EXPORT_SYMBOL_GPL(ata_port_free);
-@@ -5929,7 +5952,23 @@ int ata_host_register(struct ata_host *h
- host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
- host->ports[i]->local_port_no = i + 1;
+@@ -5868,7 +5891,23 @@ int ata_host_register(struct ata_host *h
+ WARN_ON(1);
+ return -EINVAL;
}
+#ifdef CONFIG_ATA_LEDS
+ for (i = 0; i < host->n_ports; i++) {
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
-@@ -875,6 +878,12 @@ struct ata_port {
- #ifdef CONFIG_ATA_ACPI
- struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
+@@ -726,6 +729,10 @@ struct ata_device {
+ union acpi_object *gtf_cache;
+ unsigned int gtf_filter;
#endif
-+
+#ifdef CONFIG_ATA_LEDS
+ struct led_trigger *ledtrig;
+ char ledtrig_name[8];
+#endif
-+
- /* owned by EH */
- u8 *ncq_sense_buf;
- u8 sector_buf[ATA_SECT_SIZE] ____cacheline_aligned;
+ #ifdef CONFIG_SATA_ZPODD
+ void *zpodd;
+ #endif
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
-@@ -171,6 +171,7 @@ static int bcm2835_rng_probe(struct plat
+@@ -169,6 +169,7 @@ static int bcm2835_rng_probe(struct plat
priv->rng.init = bcm2835_rng_init;
priv->rng.read = bcm2835_rng_read;
priv->rng.cleanup = bcm2835_rng_cleanup;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -277,7 +277,6 @@ struct advk_pcie {
+@@ -276,7 +276,6 @@ struct advk_pcie {
u8 wins_count;
struct irq_domain *rp_irq_domain;
struct irq_domain *irq_domain;
raw_spinlock_t irq_lock;
struct irq_domain *msi_domain;
struct irq_domain *msi_inner_domain;
-@@ -1426,14 +1425,19 @@ static void advk_pcie_irq_unmask(struct
+@@ -1418,14 +1417,19 @@ static void advk_pcie_irq_unmask(struct
raw_spin_unlock_irqrestore(&pcie->irq_lock, flags);
}
irq_set_chip_data(virq, pcie);
return 0;
-@@ -1492,7 +1496,6 @@ static int advk_pcie_init_irq_domain(str
+@@ -1485,7 +1489,6 @@ static int advk_pcie_init_irq_domain(str
struct device *dev = &pcie->pdev->dev;
struct device_node *node = dev->of_node;
struct device_node *pcie_intc_node;
int ret = 0;
raw_spin_lock_init(&pcie->irq_lock);
-@@ -1503,28 +1506,14 @@ static int advk_pcie_init_irq_domain(str
+@@ -1496,28 +1499,14 @@ static int advk_pcie_init_irq_domain(str
return -ENODEV;
}
--- a/arch/arm/boot/dts/nxp/imx/imx7d-pico.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx7d-pico.dtsi
-@@ -108,6 +108,14 @@
- assigned-clock-rates = <0>, <32768>;
+@@ -116,6 +116,14 @@
+ cpu-supply = <&sw1a_reg>;
};
+&cpu0 {
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
-@@ -638,7 +638,8 @@ static int ag71xx_mdio_get_divider(struc
+@@ -641,7 +641,8 @@ static int ag71xx_mdio_get_divider(struc
if (!ref_clock)
return -EINVAL;
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1820,6 +1820,15 @@ config DEBUG_RSEQ
-
- If unsure, say N.
+@@ -1879,6 +1879,15 @@ config ARCH_HAS_MEMBARRIER_CALLBACKS
+ config ARCH_HAS_MEMBARRIER_SYNC_CORE
+ bool
+config MANGLE_BOOTARGS
+ bool "Rename offending bootargs"
help
--- a/init/main.c
+++ b/init/main.c
-@@ -608,6 +608,29 @@ static inline void setup_nr_cpu_ids(void
+@@ -621,6 +621,29 @@ static inline void setup_nr_cpu_ids(void
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#endif
/*
* We need to store the untouched command line for future reference.
* We also need to store the touched command line since the parameter
-@@ -897,6 +920,7 @@ void start_kernel(void)
- pr_notice("%s", linux_banner);
+@@ -927,6 +950,7 @@ void start_kernel(void)
+ jump_label_init();
+ static_call_init();
early_security_init();
- setup_arch(&command_line);
+ mangle_bootargs(command_line);
setup_boot_config();
setup_command_line(command_line);