Use 'make target/linux/refresh' to refresh pending patches.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
-@@ -211,6 +211,8 @@ void ftrace_likely_update(struct ftrace_
- __v; \
- })
+@@ -220,6 +220,8 @@ void ftrace_likely_update(struct ftrace_
+ #define function_nocfi(x) (x)
+ #endif
+#include <asm/rwonce.h>
+
#endif /* __KERNEL__ */
/*
-@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const
+@@ -252,6 +254,4 @@ static inline void *offset_to_ptr(const
*/
#define prevent_tail_call_optimization() mb()
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
-@@ -380,6 +380,8 @@ static inline int is_sp_move_ins(union m
+@@ -393,6 +393,8 @@ static inline int is_sp_move_ins(union m
if (ip->i_format.opcode == addiu_op ||
ip->i_format.opcode == daddiu_op) {
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
-@@ -7055,7 +7055,7 @@ static void __ref alloc_node_mem_map(str
+@@ -7552,7 +7552,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/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
-@@ -682,6 +682,7 @@ static const struct of_device_id spidev_
+@@ -696,6 +696,7 @@ static const struct of_device_id spidev_
{ .compatible = "menlo,m53cpld" },
{ .compatible = "cisco,spi-petra" },
{ .compatible = "micron,spi-authenta" },
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
-@@ -609,8 +609,8 @@ static int jffs2_rmdir (struct inode *di
+@@ -614,8 +614,8 @@ static int jffs2_rmdir (struct inode *di
return ret;
}
{
struct jffs2_inode_info *f, *dir_f;
struct jffs2_sb_info *c;
-@@ -748,7 +749,11 @@ static int jffs2_mknod (struct inode *di
+@@ -754,7 +754,11 @@ static int jffs2_mknod (struct user_name
mutex_unlock(&dir_f->sem);
jffs2_complete_reservation(c);
return 0;
fail:
-@@ -756,6 +761,19 @@ static int jffs2_mknod (struct inode *di
+@@ -762,6 +766,19 @@ static int jffs2_mknod (struct user_name
return ret;
}
static int jffs2_rename (struct user_namespace *mnt_userns,
struct inode *old_dir_i, struct dentry *old_dentry,
struct inode *new_dir_i, struct dentry *new_dentry,
-@@ -766,7 +782,7 @@ static int jffs2_rename (struct inode *o
+@@ -773,7 +790,7 @@ static int jffs2_rename (struct user_nam
uint8_t type;
uint32_t now;
return -EINVAL;
/* The VFS will check for us and prevent trying to rename a
-@@ -832,9 +848,14 @@ static int jffs2_rename (struct inode *o
+@@ -839,9 +856,14 @@ static int jffs2_rename (struct user_nam
if (d_is_dir(old_dentry) && !victim_f)
inc_nlink(new_dir_i);
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
-@@ -779,18 +779,31 @@ static int jffs2_rename (struct inode *o
+@@ -787,18 +787,31 @@ static int jffs2_rename (struct user_nam
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;
-@@ -825,7 +838,7 @@ static int jffs2_rename (struct inode *o
+@@ -833,7 +846,7 @@ static int jffs2_rename (struct user_nam
if (ret)
return ret;
/* There was a victim. Kill it off nicely */
if (d_is_dir(new_dentry))
clear_nlink(d_inode(new_dentry));
-@@ -851,6 +864,12 @@ static int jffs2_rename (struct inode *o
+@@ -859,6 +872,12 @@ static int jffs2_rename (struct user_nam
if (flags & RENAME_WHITEOUT)
/* Replace with whiteout */
ret = jffs2_whiteout(mnt_userns, old_dir_i, old_dentry);
else
/* Unlink the original */
ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
-@@ -882,7 +901,7 @@ static int jffs2_rename (struct inode *o
+@@ -890,7 +909,7 @@ static int jffs2_rename (struct user_nam
return ret;
}
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
-@@ -195,6 +195,9 @@ static void __br_handle_local_finish(str
+@@ -197,6 +197,9 @@ static void __br_handle_local_finish(str
/* note: already called with rcu_read_lock */
static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
{
__br_handle_local_finish(skb);
/* return 1 to signal the okfn() was called so it's ok to use the skb */
-@@ -348,6 +351,17 @@ static rx_handler_result_t br_handle_fra
+@@ -362,6 +365,17 @@ static rx_handler_result_t br_handle_fra
forward:
switch (p->state) {
--- a/Makefile
+++ b/Makefile
-@@ -735,11 +735,11 @@ KBUILD_CFLAGS += $(call cc-disable-warni
+@@ -752,11 +752,11 @@ KBUILD_CFLAGS += $(call cc-disable-warni
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1384,6 +1384,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1438,6 +1438,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
-@@ -77,6 +77,11 @@ static unsigned int kallsyms_expand_symb
+@@ -80,6 +80,11 @@ static unsigned int kallsyms_expand_symb
* For every byte on the compressed symbol data, copy the table
* entry for that byte.
*/
while (len) {
tptr = &kallsyms_token_table[kallsyms_token_index[*data]];
data++;
-@@ -109,6 +114,9 @@ tail:
+@@ -112,6 +117,9 @@ tail:
*/
static char kallsyms_get_symbol_type(unsigned int off)
{
}
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
-@@ -186,6 +186,10 @@ kallsyms()
+@@ -260,6 +260,10 @@ kallsyms()
kallsymopt="${kallsymopt} --base-relative"
fi
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
-@@ -983,8 +983,10 @@ char *symbol_string(char *buf, char *end
+@@ -984,8 +984,10 @@ char *symbol_string(char *buf, char *end
struct printf_spec spec, const char *fmt)
{
unsigned long value;
#endif
if (fmt[1] == 'R')
-@@ -1001,8 +1003,14 @@ char *symbol_string(char *buf, char *end
+@@ -1006,8 +1008,14 @@ char *symbol_string(char *buf, char *end
return string_nocheck(buf, end, sym, spec);
#else
--- a/drivers/platform/Kconfig
+++ b/drivers/platform/Kconfig
-@@ -13,3 +13,5 @@ source "drivers/platform/chrome/Kconfig"
+@@ -15,3 +15,5 @@ source "drivers/platform/mellanox/Kconfi
source "drivers/platform/olpc/Kconfig"
source "drivers/platform/surface/Kconfig"
+source "drivers/platform/mikrotik/Kconfig"
--- a/drivers/platform/Makefile
+++ b/drivers/platform/Makefile
-@@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS) += mips/
+@@ -10,3 +10,4 @@ obj-$(CONFIG_OLPC_EC) += olpc/
obj-$(CONFIG_GOLDFISH) += goldfish/
obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/
---
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -1085,9 +1085,6 @@ config FW_ARC
+@@ -1100,9 +1100,6 @@ config FW_ARC
config ARCH_MAY_HAVE_PC_FDC
bool
typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
-@@ -31,14 +31,221 @@ struct mips_hi16 {
+@@ -31,23 +31,261 @@ struct mips_hi16 {
static LIST_HEAD(dbe_list);
static DEFINE_SPINLOCK(dbe_lock);
+ return 0;
+}
- static int apply_r_mips_none(struct module *me, u32 *location,
- u32 base, Elf_Addr v, bool rela)
-@@ -54,9 +261,40 @@ static int apply_r_mips_32(struct module
+ static void apply_r_mips_32(u32 *location, u32 base, Elf_Addr v)
+ {
*location = base + v;
}
if (v % 4) {
pr_err("module %s: dangerous R_MIPS_26 relocation\n",
me->name);
-@@ -64,13 +302,17 @@ static int apply_r_mips_26(struct module
+@@ -55,13 +293,17 @@ static int apply_r_mips_26(struct module
}
if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
return 0;
}
-@@ -446,9 +688,36 @@ int module_finalize(const Elf_Ehdr *hdr,
+@@ -441,9 +683,36 @@ int module_finalize(const Elf_Ehdr *hdr,
list_add(&me->arch.dbe_list, &dbe_list);
spin_unlock_irq(&dbe_lock);
}
--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
-@@ -54,7 +54,7 @@
+@@ -46,7 +46,7 @@
* Memory above this physical address will be considered highmem.
*/
#ifndef HIGHMEM_START
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
-@@ -174,7 +174,7 @@ cflags-$(CONFIG_CPU_VR41XX) += -march=r4
+@@ -175,7 +175,7 @@ cflags-$(CONFIG_CPU_VR41XX) += -march=r4
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
cflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,--trap
PTR_L a0, arg0
PTR_L a1, arg1
PTR_L a2, arg2
-@@ -96,7 +97,7 @@ done:
+@@ -98,7 +99,7 @@ done:
#endif
/* jump to kexec_start_address */
j s1
#ifdef CONFIG_SMP
/*
-@@ -182,9 +183,15 @@ kexec_indirection_page:
+@@ -181,9 +182,15 @@ kexec_indirection_page:
PTR_WD 0
.size kexec_indirection_page, PTRSIZE
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
-@@ -214,7 +214,7 @@ config PPC
+@@ -222,7 +222,7 @@ config PPC
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
/*
* MTD methods which simply translate the effective address and pass through
-@@ -236,6 +238,146 @@ static int mtd_add_partition_attrs(struc
+@@ -235,6 +237,146 @@ static int mtd_add_partition_attrs(struc
return ret;
}
int mtd_add_partition(struct mtd_info *parent, const char *name,
long long offset, long long length)
{
-@@ -274,6 +416,7 @@ int mtd_add_partition(struct mtd_info *p
+@@ -273,6 +415,7 @@ int mtd_add_partition(struct mtd_info *p
if (ret)
goto err_remove_part;
mtd_add_partition_attrs(child);
return 0;
-@@ -422,6 +565,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -421,6 +564,7 @@ int add_mtd_partitions(struct mtd_info *
goto err_del_partitions;
}
mtd_add_partition_attrs(child);
/* Look for subpartitions */
-@@ -438,31 +582,6 @@ err_del_partitions:
+@@ -437,31 +581,6 @@ err_del_partitions:
return ret;
}
obj-$(CONFIG_MTD_BLOCK) += mtdblock.o
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
-@@ -608,6 +608,24 @@ static inline void mtd_align_erase_req(s
+@@ -615,6 +615,24 @@ static inline void mtd_align_erase_req(s
req->len += mtd->erasesize - mod;
}
static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
{
if (mtd->writesize_shift)
-@@ -680,6 +698,13 @@ extern void __put_mtd_device(struct mtd_
+@@ -687,6 +705,13 @@ extern void __put_mtd_device(struct mtd_
extern struct mtd_info *get_mtd_device_nm(const char *name);
extern void put_mtd_device(struct mtd_info *mtd);
default y
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
-@@ -1075,6 +1075,8 @@ static u8 spi_nor_convert_3to4_erase(u8
+@@ -1262,6 +1262,8 @@ static u8 spi_nor_convert_3to4_erase(u8
static bool spi_nor_has_uniform_erase(const struct spi_nor *nor)
{
return !!nor->params->erase_map.uniform_erase_type;
}
-@@ -2560,6 +2562,7 @@ static int spi_nor_select_erase(struct s
+@@ -2379,6 +2381,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;
struct mtd_info *mtd = &nor->mtd;
u32 wanted_size = nor->info->sector_size;
int i;
-@@ -2592,8 +2595,9 @@ static int spi_nor_select_erase(struct s
+@@ -2411,8 +2414,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) {
}
}
-@@ -2601,6 +2605,8 @@ static int spi_nor_select_erase(struct s
+@@ -2420,6 +2424,8 @@ static int spi_nor_select_erase(struct s
return -EINVAL;
mtd->erasesize = erase->size;
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
-@@ -242,6 +242,8 @@ struct mtd_info {
+@@ -243,6 +243,8 @@ struct mtd_info {
* information below if they desire
*/
uint32_t erasesize;
--- a/drivers/mtd/parsers/redboot.c
+++ b/drivers/mtd/parsers/redboot.c
-@@ -305,6 +305,7 @@ static int parse_redboot_partitions(stru
+@@ -304,6 +304,7 @@ nogood:
static const struct of_device_id mtd_parser_redboot_of_match_table[] = {
{ .compatible = "redboot-fis" },
--- a/drivers/mtd/parsers/redboot.c
+++ b/drivers/mtd/parsers/redboot.c
-@@ -279,14 +279,21 @@ static int parse_redboot_partitions(stru
+@@ -277,14 +277,21 @@ nogood:
#endif
- names += strlen(names)+1;
+ names += strlen(names) + 1;
-#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
if (fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
--- a/drivers/mtd/parsers/Kconfig
+++ b/drivers/mtd/parsers/Kconfig
-@@ -195,3 +195,12 @@ config MTD_REDBOOT_PARTS_READONLY
+@@ -202,3 +202,12 @@ config MTD_QCOMSMEM_PARTS
help
This provides support for parsing partitions from Shared Memory (SMEM)
for NAND and SPI flash on Qualcomm platforms.
+ formatted DTS.
--- a/drivers/mtd/parsers/Makefile
+++ b/drivers/mtd/parsers/Makefile
-@@ -13,3 +13,4 @@ obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
+@@ -14,3 +14,4 @@ obj-$(CONFIG_MTD_PARSER_TRX) += parser_
obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
obj-$(CONFIG_MTD_QCOMSMEM_PARTS) += qcomsmempart.o
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -913,7 +913,7 @@ static int get_chip(struct map_info *map
+@@ -914,7 +914,7 @@ static int get_chip(struct map_info *map
return 0;
case FL_ERASING:
1 file changed, 1 insertion(+)
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -2057,6 +2057,7 @@ static int __xipram do_write_buffer(stru
+@@ -2058,6 +2058,7 @@ static int __xipram do_write_buffer(stru
/* Write Buffer Load */
map_write(map, CMD(0x25), cmd_adr);
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
-@@ -34,6 +34,17 @@ config MTD_SPI_NOR_USE_4K_SECTORS
- Please note that some tools/drivers/filesystems may not work with
- 4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
+@@ -78,6 +78,17 @@ config MTD_SPI_NOR_SWP_KEEP
+
+ endchoice
+config MTD_SPI_NOR_USE_4K_SECTORS_LIMIT
+ int "Maximum flash chip size to use 4K sectors on (in KiB)"
endif # MTD_SPI_NOR
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
-@@ -2792,6 +2792,21 @@ static void spi_nor_info_init_params(str
+@@ -2631,6 +2631,21 @@ static void spi_nor_info_init_params(str
*/
erase_mask = 0;
i = 0;
if (info->flags & SECT_4K_PMC) {
erase_mask |= BIT(i);
spi_nor_set_erase_type(&map->erase_type[i], 4096u,
-@@ -2803,6 +2818,7 @@ static void spi_nor_info_init_params(str
+@@ -2642,6 +2657,7 @@ static void spi_nor_info_init_params(str
SPINOR_OP_BE_4K);
i++;
}
+};
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
-@@ -2028,6 +2028,7 @@ static const struct spi_nor_manufacturer
+@@ -1848,6 +1848,7 @@ static const struct spi_nor_manufacturer
&spi_nor_winbond,
&spi_nor_xilinx,
&spi_nor_xmc,
static const struct flash_info *
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
-@@ -398,6 +398,7 @@ extern const struct spi_nor_manufacturer
+@@ -489,6 +489,7 @@ extern const struct spi_nor_manufacturer
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;
- int spi_nor_write_enable(struct spi_nor *nor);
- int spi_nor_write_disable(struct spi_nor *nor);
+ extern const struct attribute_group *spi_nor_sysfs_groups[];
+
obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
-@@ -760,6 +760,7 @@ static const struct spinand_manufacturer
+@@ -902,6 +902,7 @@ static const struct spinand_manufacturer
¶gon_spinand_manufacturer,
&toshiba_spinand_manufacturer,
&winbond_spinand_manufacturer,
+};
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
-@@ -244,6 +244,7 @@ extern const struct spinand_manufacturer
+@@ -266,6 +266,7 @@ extern const struct spinand_manufacturer
extern const struct spinand_manufacturer paragon_spinand_manufacturer;
extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
extern const struct spinand_manufacturer winbond_spinand_manufacturer;
+ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32,
+ SECT_4K | SPI_NOR_HAS_LOCK) },
{ "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64,
- SECT_4K | SPI_NOR_HAS_LOCK) },
+ SECT_4K | SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) },
{ "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64,
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
-@@ -1192,6 +1192,73 @@ static struct mtd_info * __init open_mtd
+@@ -1191,6 +1191,73 @@ static struct mtd_info * __init open_mtd
return mtd;
}
static int __init ubi_init(void)
{
int err, i, k;
-@@ -1275,6 +1342,12 @@ static int __init ubi_init(void)
+@@ -1274,6 +1341,12 @@ static int __init ubi_init(void)
}
}
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
-@@ -652,6 +652,47 @@ static void __init ubiblock_create_from_
+@@ -642,6 +642,47 @@ static void __init ubiblock_create_from_
}
}
static void ubiblock_remove_all(void)
{
struct ubiblock *next;
-@@ -684,6 +725,10 @@ int __init ubiblock_init(void)
+@@ -674,6 +715,10 @@ int __init ubiblock_init(void)
*/
ubiblock_create_from_param();
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
-@@ -474,7 +474,30 @@ retry:
+@@ -447,7 +447,30 @@ retry:
out:
put_page(page);
}
#ifdef CONFIG_ROOT_NFS
#define NFSROOT_TIMEOUT_MIN 5
-@@ -567,6 +590,10 @@ void __init mount_root(void)
+@@ -580,6 +603,10 @@ void __init mount_root(void)
return;
}
#endif
#include "ubi-media.h"
#include "ubi.h"
-@@ -458,6 +459,15 @@ int ubiblock_create(struct ubi_volume_in
+@@ -451,6 +452,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);
+
return 0;
- out_free_queue:
+ out_remove_minor:
break;
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
-@@ -782,6 +782,7 @@ struct ubi_attach_info {
+@@ -780,6 +780,7 @@ struct ubi_attach_info {
int mean_ec;
uint64_t ec_sum;
int ec_count;
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -1046,6 +1046,44 @@ out_unlock:
+@@ -1203,6 +1203,44 @@ out_unlock:
}
EXPORT_SYMBOL_GPL(get_mtd_device_nm);
mutex_lock(&mtd_table_mutex);
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
-@@ -698,6 +698,8 @@ extern struct mtd_info *get_mtd_device(s
+@@ -705,6 +705,8 @@ extern struct mtd_info *get_mtd_device(s
extern int __get_mtd_device(struct mtd_info *mtd);
extern void __put_mtd_device(struct mtd_info *mtd);
extern struct mtd_info *get_mtd_device_nm(const char *name);
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
-@@ -238,4 +238,6 @@ source "drivers/mtd/ubi/Kconfig"
+@@ -241,4 +241,6 @@ source "drivers/mtd/ubi/Kconfig"
source "drivers/mtd/hyperbus/Kconfig"
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
-@@ -42,7 +42,8 @@ static const struct flash_info macronix_
+@@ -41,7 +41,8 @@ static const struct flash_info macronix_
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
#define JFFS2_NODE_ACCURATE 0x2000
--- a/lib/Kconfig
+++ b/lib/Kconfig
-@@ -315,6 +315,12 @@ config ZSTD_DECOMPRESS
+@@ -335,6 +335,12 @@ config ZSTD_DECOMPRESS
source "lib/xz/Kconfig"
# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
--- a/lib/Makefile
+++ b/lib/Makefile
-@@ -136,6 +136,16 @@ CFLAGS_kobject.o += -DDEBUG
+@@ -135,6 +135,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)
-@@ -191,6 +201,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
+@@ -192,6 +202,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/
obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd/
obj-$(CONFIG_XZ_DEC) += xz/
obj-$(CONFIG_RAID6_PQ) += raid6/
#include <net/net_namespace.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
-@@ -457,6 +458,56 @@ static int ct_cpu_seq_show(struct seq_fi
+@@ -462,6 +463,56 @@ static int ct_cpu_seq_show(struct seq_fi
return 0;
}
static const struct seq_operations ct_cpu_seq_ops = {
.start = ct_cpu_seq_start,
.next = ct_cpu_seq_next,
-@@ -470,8 +521,9 @@ static int nf_conntrack_standalone_init_
+@@ -475,8 +526,9 @@ static int nf_conntrack_standalone_init_
kuid_t root_uid;
kgid_t root_gid;
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
-@@ -476,6 +479,9 @@ static bool tcp_in_window(const struct n
+@@ -465,6 +465,9 @@ static bool tcp_in_window(struct nf_conn
s32 receiver_offset;
bool res, in_recv_win;
/*
* Get the required data from the packet.
*/
-@@ -1130,7 +1136,7 @@ int nf_conntrack_tcp_packet(struct nf_co
+@@ -1151,7 +1154,7 @@ int nf_conntrack_tcp_packet(struct nf_co
IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED &&
timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK])
timeout = timeouts[TCP_CONNTRACK_UNACK];
else
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
-@@ -660,6 +663,7 @@ enum nf_ct_sysctl_index {
- NF_SYSCTL_CT_PROTO_TIMEOUT_GRE_STREAM,
+@@ -671,6 +671,7 @@ enum nf_ct_sysctl_index {
+ NF_SYSCTL_CT_LWTUNNEL,
#endif
+ NF_SYSCTL_CT_PROTO_TCP_NO_WINDOW_CHECK,
__NF_SYSCTL_CT_LAST_SYSCTL,
};
-@@ -1014,6 +1018,13 @@ static struct ctl_table nf_ct_sysctl_tab
- .proc_handler = proc_dointvec_jiffies,
+@@ -1026,6 +1027,13 @@ static struct ctl_table nf_ct_sysctl_tab
+ .proc_handler = nf_hooks_lwtunnel_sysctl_handler,
},
#endif
+ [NF_SYSCTL_CT_PROTO_TCP_NO_WINDOW_CHECK] = {
{}
};
-@@ -1164,6 +1164,7 @@ static int nf_conntrack_standalone_init_sysctl(struct net *net)
+@@ -1153,6 +1161,7 @@ static int nf_conntrack_standalone_init_
#ifdef CONFIG_NF_CONNTRACK_EVENTS
table[NF_SYSCTL_CT_EVENTS].data = &net->ct.sysctl_events;
#endif
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
table[NF_SYSCTL_CT_TIMESTAMP].data = &net->ct.sysctl_tstamp;
#endif
-@@ -1220,6 +1220,7 @@
+@@ -1222,6 +1231,7 @@ static int nf_conntrack_pernet_init(stru
int ret;
net->ct.sysctl_checksum = 1;
#define PACKET_FANOUT_LB 1
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
-@@ -1822,6 +1822,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1825,6 +1825,7 @@ static int packet_rcv_spkt(struct sk_buf
{
struct sock *sk;
struct sockaddr_pkt *spkt;
/*
* When we registered the protocol we saved the socket in the data
-@@ -1829,6 +1830,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1832,6 +1833,7 @@ static int packet_rcv_spkt(struct sk_buf
*/
sk = pt->af_packet_priv;
/*
* Yank back the headers [hope the device set this
-@@ -1841,7 +1843,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1844,7 +1846,7 @@ static int packet_rcv_spkt(struct sk_buf
* so that this procedure is noop.
*/
goto out;
if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2079,12 +2081,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2082,12 +2084,12 @@ static int packet_rcv(struct sk_buff *sk
unsigned int snaplen, res;
bool is_drop_n_account = false;
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -2210,12 +2212,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2213,12 +2215,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 (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
-@@ -3969,6 +3972,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3966,6 +3969,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
default:
return -ENOPROTOOPT;
}
-@@ -4025,6 +4038,13 @@ static int packet_getsockopt(struct sock
+@@ -4022,6 +4035,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;
+ unsigned int pkt_type;
};
- static struct packet_sock *pkt_sk(struct sock *sk)
+ static inline struct packet_sock *pkt_sk(struct sock *sk)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2676,7 +2676,7 @@ static inline int pskb_network_may_pull(
+@@ -2727,7 +2727,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
return hash_32(hash, IP6_TUNNEL_HASH_SIZE_SHIFT);
}
-@@ -144,17 +147,33 @@ static struct ip6_tnl *
+@@ -114,17 +117,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
-@@ -162,7 +181,7 @@ ip6_tnl_lookup(struct net *net, int link
+@@ -132,7 +151,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) ||
-@@ -175,7 +194,7 @@ ip6_tnl_lookup(struct net *net, int link
+@@ -145,7 +164,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) ||
-@@ -223,7 +242,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n,
+@@ -194,7 +213,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n,
if (!ipv6_addr_any(remote) || !ipv6_addr_any(local)) {
prio = 1;
}
return &ip6n->tnls[prio][h];
}
-@@ -405,6 +424,12 @@ ip6_tnl_dev_uninit(struct net_device *de
+@@ -378,6 +397,12 @@ ip6_tnl_dev_uninit(struct net_device *de
struct net *net = t->net;
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
if (dev == ip6n->fb_tnl_dev)
RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);
else
-@@ -821,6 +846,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);
static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb,
const struct tnl_ptk_info *tpi,
struct metadata_dst *tun_dst,
-@@ -873,6 +999,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl
+@@ -843,6 +969,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl
skb_reset_network_header(skb);
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
-@@ -1024,6 +1171,7 @@ static void init_tel_txopt(struct ipv6_t
+@@ -994,6 +1141,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
-@@ -1304,6 +1452,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1274,6 +1422,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;
-@@ -1403,6 +1552,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1373,6 +1522,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;
-@@ -1555,6 +1716,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
+@@ -1525,6 +1686,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);
return 0;
-@@ -1593,6 +1762,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
+@@ -1563,6 +1732,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));
}
-@@ -1978,6 +2148,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1949,6 +2119,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
-@@ -2015,6 +2194,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -1986,6 +2165,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_FWMARK])
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
}
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
-@@ -2130,6 +2349,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2101,6 +2320,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) +
-@@ -2159,6 +2384,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2130,6 +2355,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
0;
}
-@@ -2166,6 +2409,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2137,6 +2380,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) ||
-@@ -2175,9 +2421,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2146,9 +2392,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) ||
-@@ -2217,6 +2481,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2188,6 +2452,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 },
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
-@@ -88,6 +88,7 @@ struct netns_ipv6 {
+@@ -85,6 +85,7 @@ struct netns_ipv6 {
unsigned int fib6_routes_require_src;
#endif
struct rt6_info *ip6_prohibit_entry;
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
-@@ -249,6 +249,7 @@ enum {
+@@ -256,6 +256,7 @@ enum {
RTN_THROW, /* Not in this table */
RTN_NAT, /* Translate this address */
RTN_XRESOLVE, /* Use external resolver */
static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
-@@ -2734,6 +2734,7 @@ static const char *const rtn_type_names[
+@@ -2767,6 +2767,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW",
[RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE",
return -EINVAL;
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
-@@ -94,6 +94,8 @@ static int ip6_pkt_discard(struct sk_bu
+@@ -97,6 +97,8 @@ static int ip6_pkt_discard(struct sk_bu
static int ip6_pkt_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb);
static int ip6_pkt_prohibit(struct sk_buff *skb);
static int ip6_pkt_prohibit_out(struct net *net, struct sock *sk, struct sk_buff *skb);
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,
-@@ -309,6 +311,18 @@ static const struct rt6_info ip6_prohibi
+@@ -312,6 +314,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 = {
.__refcnt = ATOMIC_INIT(1),
-@@ -1030,6 +1044,7 @@ static const int fib6_prop[RTN_MAX + 1]
+@@ -1033,6 +1047,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,
-@@ -1065,6 +1080,10 @@ static void ip6_rt_init_dst_reject(struc
+@@ -1068,6 +1083,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:
-@@ -4448,6 +4467,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -4559,6 +4578,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.
*/
-@@ -4928,7 +4958,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -5039,7 +5069,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)
-@@ -6127,6 +6158,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6292,6 +6323,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
-@@ -6138,6 +6171,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6303,6 +6336,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
}
-@@ -6329,6 +6363,8 @@ static int __net_init ip6_route_net_init
+@@ -6494,6 +6528,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);
-@@ -6339,11 +6375,21 @@ static int __net_init ip6_route_net_init
+@@ -6504,11 +6540,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_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);
-@@ -6370,6 +6416,8 @@ out:
+@@ -6535,6 +6581,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -6389,6 +6437,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6554,6 +6602,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);
-@@ -6466,6 +6515,9 @@ void __init ip6_route_init_special_entri
+@@ -6631,6 +6680,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/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
-@@ -253,6 +253,8 @@ enum {
+@@ -260,6 +260,8 @@ enum {
__RTN_MAX
};
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -2036,6 +2036,8 @@ struct net_device {
+@@ -2068,6 +2068,8 @@ struct net_device {
struct netdev_hw_addr_list mc;
struct netdev_hw_addr_list dev_addrs;
#endif
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -858,6 +858,7 @@ struct sk_buff {
- #ifdef CONFIG_TLS_DEVICE
- __u8 decrypted:1;
+@@ -855,6 +855,7 @@ struct sk_buff {
+ #ifdef CONFIG_IPV6_NDISC_NODETYPE
+ __u8 ndisc_nodetype:2;
#endif
+ __u8 gro_skip:1;
- #ifdef CONFIG_NET_SCHED
- __u16 tc_index; /* traffic control index */
+ __u8 ipvs_property:1;
+ __u8 inner_protocol_type:1;
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -6062,6 +6062,9 @@ static enum gro_result dev_gro_receive(s
+@@ -6051,6 +6051,9 @@ static enum gro_result dev_gro_receive(s
int same_flow;
int grow;
if (netif_elide_gro(skb->dev))
goto normal;
-@@ -8039,6 +8042,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -8065,6 +8068,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
-@@ -8090,6 +8135,7 @@ static int __netdev_upper_dev_link(struc
+@@ -8116,6 +8161,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
-@@ -8186,6 +8232,7 @@ static void __netdev_upper_dev_unlink(st
+@@ -8212,6 +8258,7 @@ static void __netdev_upper_dev_unlink(st
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
-@@ -8972,6 +9019,7 @@ int dev_set_mac_address(struct net_devic
+@@ -9031,6 +9078,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
return 0;
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
-@@ -143,6 +143,18 @@ u32 eth_get_headlen(const struct net_dev
+@@ -142,6 +142,18 @@ u32 eth_get_headlen(const struct net_dev
}
EXPORT_SYMBOL(eth_get_headlen);
/**
* eth_type_trans - determine the packet's protocol ID.
* @skb: received socket data
-@@ -174,6 +186,10 @@ __be16 eth_type_trans(struct sk_buff *sk
+@@ -173,6 +185,10 @@ __be16 eth_type_trans(struct sk_buff *sk
} else {
skb->pkt_type = PACKET_OTHERHOST;
}
--- a/net/core/of_net.c
+++ b/net/core/of_net.c
-@@ -115,27 +115,62 @@ static int of_get_mac_addr_nvmem(struct
+@@ -119,27 +119,62 @@ static int of_get_mac_addr_nvmem(struct
* this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
* but is all zeros.
*
+}
+
/**
- * Search the device tree for the best MAC address to use. 'mac-address' is
- * checked first, because that is supposed to contain to "most recent" MAC
-@@ -171,6 +192,7 @@ found:
+ * of_get_mac_address()
+ * @np: Caller's Device Node
+@@ -175,6 +196,7 @@ found:
addr[5] = (mac_val >> 0) & 0xff;
}
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -187,6 +187,9 @@ mtk_flow_offload_replace(struct mtk_eth
- int hash;
- int i;
+@@ -189,6 +189,9 @@ mtk_flow_offload_replace(struct mtk_eth
+ if (rhashtable_lookup(ð->flow_table, &f->cookie, mtk_flow_ht_params))
+ return -EEXIST;
+ if (rhashtable_lookup(ð->flow_table, &f->cookie, mtk_flow_ht_params))
+ return -EEXIST;
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -7,6 +7,7 @@
- #include <linux/rhashtable.h>
+@@ -6,6 +6,7 @@
#include <linux/if_ether.h>
+ #include <linux/rhashtable.h>
#include <linux/ip.h>
+#include <linux/ipv6.h>
#include <net/flow_offload.h>
#include <net/pkt_cls.h>
#include <net/dsa.h>
-@@ -20,6 +21,11 @@ struct mtk_flow_data {
+@@ -19,6 +20,11 @@ struct mtk_flow_data {
__be32 src_addr;
__be32 dst_addr;
} v4;
};
__be16 src_port;
-@@ -64,6 +70,14 @@ mtk_flow_set_ipv4_addr(struct mtk_foe_en
+@@ -63,6 +69,14 @@ mtk_flow_set_ipv4_addr(struct mtk_foe_en
data->v4.dst_addr, data->dst_port);
}
static void
mtk_flow_offload_mangle_eth(const struct flow_action_entry *act, void *eth)
{
-@@ -254,6 +268,9 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -256,6 +270,9 @@ mtk_flow_offload_replace(struct mtk_eth
case FLOW_DISSECTOR_KEY_IPV4_ADDRS:
offload_type = MTK_PPE_PKT_TYPE_IPV4_HNAPT;
break;
default:
return -EOPNOTSUPP;
}
-@@ -289,6 +306,17 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -291,6 +308,17 @@ mtk_flow_offload_replace(struct mtk_eth
mtk_flow_set_ipv4_addr(&foe, &data, false);
}
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2171,8 +2171,8 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -2178,8 +2178,8 @@ static irqreturn_t mtk_handle_irq_rx(int
eth->rx_events++;
if (likely(napi_schedule_prep(ð->rx_napi))) {
}
return IRQ_HANDLED;
-@@ -2184,8 +2184,8 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -2191,8 +2191,8 @@ static irqreturn_t mtk_handle_irq_tx(int
eth->tx_events++;
if (likely(napi_schedule_prep(ð->tx_napi))) {
}
return IRQ_HANDLED;
-@@ -3229,6 +3229,8 @@ static int mtk_probe(struct platform_dev
+@@ -3242,6 +3242,8 @@ static int mtk_probe(struct platform_dev
* for NAPI to work
*/
init_dummy_netdev(ð->dummy_dev);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1651,6 +1651,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1715,6 +1715,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = NULL;
struct mii_bus *bus;
sysfs_remove_link(&dev->dev.kobj, "phydev");
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -761,6 +761,12 @@ struct phy_driver {
+@@ -783,6 +783,12 @@ struct phy_driver {
/** @handle_interrupt: Override default interrupt handling */
irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
-@@ -56,6 +56,7 @@ struct br_ip_list {
+@@ -58,6 +58,7 @@ struct br_ip_list {
#define BR_MRP_LOST_CONT BIT(18)
#define BR_MRP_LOST_IN_CONT BIT(19)
#define BR_TX_FWD_OFFLOAD BIT(20)
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
-@@ -191,6 +191,7 @@ out:
+@@ -199,6 +199,7 @@ out:
void br_flood(struct net_bridge *br, struct sk_buff *skb,
enum br_pkt_type pkt_type, bool local_rcv, bool local_orig)
{
struct net_bridge_port *prev = NULL;
struct net_bridge_port *p;
-@@ -206,6 +207,10 @@ void br_flood(struct net_bridge *br, str
+@@ -214,6 +215,10 @@ void br_flood(struct net_bridge *br, str
case BR_PKT_MULTICAST:
if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev)
continue;
if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
-@@ -305,6 +305,8 @@ static rx_handler_result_t br_handle_fra
+@@ -319,6 +319,8 @@ static rx_handler_result_t br_handle_fra
fwd_mask |= p->group_fwd_mask;
switch (dest[5]) {
case 0x00: /* Bridge Group Address */
if (p->br->stp_enabled == BR_NO_STP ||
--- a/net/bridge/br_sysfs_if.c
+++ b/net/bridge/br_sysfs_if.c
-@@ -233,6 +233,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA
+@@ -240,6 +240,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA
BRPORT_ATTR_FLAG(broadcast_flood, BR_BCAST_FLOOD);
BRPORT_ATTR_FLAG(neigh_suppress, BR_NEIGH_SUPPRESS);
BRPORT_ATTR_FLAG(isolated, BR_ISOLATED);
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf)
-@@ -285,6 +286,7 @@ static const struct brport_attribute *br
+@@ -292,6 +293,7 @@ static const struct brport_attribute *br
&brport_attr_group_fwd_mask,
&brport_attr_neigh_suppress,
&brport_attr_isolated,
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
-@@ -524,6 +524,7 @@ enum {
+@@ -536,6 +536,7 @@ enum {
IFLA_BRPORT_MRP_IN_OPEN,
IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
-@@ -137,6 +137,7 @@ static inline size_t br_port_info_size(v
+@@ -184,6 +184,7 @@ static inline size_t br_port_info_size(v
+ nla_total_size(1) /* IFLA_BRPORT_VLAN_TUNNEL */
+ nla_total_size(1) /* IFLA_BRPORT_NEIGH_SUPPRESS */
+ nla_total_size(1) /* IFLA_BRPORT_ISOLATED */
+ nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_ROOT_ID */
+ nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_BRIDGE_ID */
+ nla_total_size(sizeof(u16)) /* IFLA_BRPORT_DESIGNATED_PORT */
-@@ -220,7 +221,8 @@ static int br_port_fill_attrs(struct sk_
+@@ -269,7 +270,8 @@ static int br_port_fill_attrs(struct sk_
BR_MRP_LOST_CONT)) ||
nla_put_u8(skb, IFLA_BRPORT_MRP_IN_OPEN,
!!(p->flags & BR_MRP_LOST_IN_CONT)) ||
return -EMSGSIZE;
timerval = br_timer_value(&p->message_age_timer);
-@@ -728,6 +730,7 @@ static const struct nla_policy br_port_p
+@@ -829,6 +831,7 @@ static const struct nla_policy br_port_p
[IFLA_BRPORT_ISOLATED] = { .type = NLA_U8 },
[IFLA_BRPORT_BACKUP_PORT] = { .type = NLA_U32 },
[IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT] = { .type = NLA_U32 },
};
/* Change the state of the port and notify spanning tree */
-@@ -826,6 +829,7 @@ static int br_setport(struct net_bridge_
+@@ -893,6 +896,7 @@ static int br_setport(struct net_bridge_
br_set_port_flag(p, tb, IFLA_BRPORT_VLAN_TUNNEL, BR_VLAN_TUNNEL);
br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_SUPPRESS, BR_NEIGH_SUPPRESS);
br_set_port_flag(p, tb, IFLA_BRPORT_ISOLATED, BR_ISOLATED);
struct rtnl_link {
rtnl_doit_func doit;
-@@ -4684,7 +4684,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
+@@ -4689,7 +4689,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/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -2869,6 +2869,7 @@ static int mv88e6xxx_setup(struct dsa_sw
+@@ -3193,6 +3193,7 @@ static int mv88e6xxx_setup(struct dsa_sw
chip->ds = ds;
ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
+ ds->configure_vlan_while_not_filtering = true;
- mv88e6xxx_reg_lock(chip);
-
+ /* Since virtual bridges are mapped in the PVT, the number we support
+ * depends on the physical switch topology. We need to let DSA figure
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -5436,6 +5436,7 @@ static int mv88e6xxx_register_switch(str
+@@ -6319,6 +6319,7 @@ static int mv88e6xxx_register_switch(str
ds->ops = &mv88e6xxx_switch_ops;
ds->ageing_time_min = chip->info->age_time_coeff;
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
+ ds->assisted_learning_on_cpu_port = true;
- dev_set_drvdata(dev, ds);
-
+ /* Some chips support up to 32, but that requires enabling the
+ * 5-bit port mode, which we do not support. 640k^W16 ought to
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
-@@ -1617,4 +1617,19 @@ config GPIO_MOCKUP
- tools/testing/selftests/gpio/gpio-mockup.sh. Reference the usage in
- it.
+@@ -1683,4 +1683,19 @@ config GPIO_VIRTIO
+
+ endmenu
+comment "Other GPIO expanders"
+
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
+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
/*
- * The Mellanox Tavor device gives false positive parity errors. Mark this
- * device with a broken_parity_status to allow PCI scanning code to "skip"
-@@ -3322,6 +3323,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+ * The Mellanox Tavor device gives false positive parity errors. Disable
+ * parity error reporting.
+@@ -3351,6 +3352,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
-@@ -3347,6 +3350,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3376,6 +3379,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
-@@ -3385,6 +3390,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3414,6 +3419,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);
#endif /* __LINUX_USB_PCI_QUIRKS_H */
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
-@@ -484,7 +484,14 @@ extern int usb_hcd_pci_probe(struct pci_
+@@ -495,7 +495,14 @@ extern int usb_hcd_pci_probe(struct pci_
extern void usb_hcd_pci_remove(struct pci_dev *dev);
extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
depends on ACPI
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
-@@ -650,6 +650,19 @@ u64 ata_tf_read_block(const struct ata_t
+@@ -656,6 +656,19 @@ u64 ata_tf_read_block(const struct ata_t
return block;
}
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
-@@ -4548,6 +4561,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4573,6 +4586,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0)
return NULL;
}
qc = __ata_qc_from_tag(ap, tag);
qc->tag = qc->hw_tag = tag;
-@@ -5326,6 +5342,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5351,6 +5367,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;
-@@ -5361,6 +5380,12 @@ static void ata_host_release(struct kref
+@@ -5386,6 +5405,12 @@ static void ata_host_release(struct kref
kfree(ap->pmp_link);
kfree(ap->slave_link);
kfree(ap);
host->ports[i] = NULL;
}
-@@ -5767,7 +5792,23 @@ int ata_host_register(struct ata_host *h
+@@ -5792,7 +5817,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;
}
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
-@@ -882,6 +885,12 @@ struct ata_port {
+@@ -888,6 +891,12 @@ struct ata_port {
#ifdef CONFIG_ATA_ACPI
struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
#endif
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
-@@ -163,6 +163,7 @@ static int bcm2835_rng_probe(struct plat
+@@ -170,6 +170,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/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
-@@ -1252,6 +1252,7 @@ static const struct usb_device_id produc
+@@ -1313,6 +1313,7 @@ static const struct usb_device_id produc
{QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */
{QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
{QMI_FIXED_INTF(0x19d2, 0x1432, 3)}, /* ZTE ME3620 */
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -37,10 +37,6 @@
+@@ -38,10 +38,6 @@
#define PCIE_CORE_ERR_CAPCTL_ECRC_CHK_TX_EN BIT(6)
#define PCIE_CORE_ERR_CAPCTL_ECRC_CHCK BIT(7)
#define PCIE_CORE_ERR_CAPCTL_ECRC_CHCK_RCV BIT(8)
/* PIO registers base address and register offsets */
#define PIO_BASE_ADDR 0x4000
#define PIO_CTRL (PIO_BASE_ADDR + 0x0)
-@@ -966,7 +962,7 @@ static int advk_sw_pci_bridge_init(struc
+@@ -959,7 +955,7 @@ static int advk_sw_pci_bridge_init(struc
bridge->conf.pref_mem_limit = cpu_to_le16(PCI_PREF_RANGE_TYPE_64);
/* Support interrupt A for MSI feature */
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1393,7 +1393,7 @@ static void advk_pcie_remove_irq_domain(
+@@ -1386,7 +1386,7 @@ static void advk_pcie_remove_irq_domain(
static void advk_pcie_handle_msi(struct advk_pcie *pcie)
{
u32 msi_val, msi_mask, msi_status, msi_idx;
msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG);
msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG);
-@@ -1403,13 +1403,12 @@ static void advk_pcie_handle_msi(struct
+@@ -1396,13 +1396,12 @@ static void advk_pcie_handle_msi(struct
if (!(BIT(msi_idx) & msi_status))
continue;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1189,7 +1189,7 @@ static void advk_msi_irq_compose_msi_msg
+@@ -1182,7 +1182,7 @@ static void advk_msi_irq_compose_msi_msg
msg->address_lo = lower_32_bits(msi_msg);
msg->address_hi = upper_32_bits(msi_msg);
}
static int advk_msi_set_affinity(struct irq_data *irq_data,
-@@ -1206,15 +1206,11 @@ static int advk_msi_irq_domain_alloc(str
+@@ -1199,15 +1199,11 @@ static int advk_msi_irq_domain_alloc(str
int hwirq, i;
mutex_lock(&pcie->msi_used_lock);
for (i = 0; i < nr_irqs; i++)
irq_domain_set_info(domain, virq + i, hwirq + i,
-@@ -1232,7 +1228,7 @@ static void advk_msi_irq_domain_free(str
+@@ -1225,7 +1221,7 @@ static void advk_msi_irq_domain_free(str
struct advk_pcie *pcie = domain->host_data;
mutex_lock(&pcie->msi_used_lock);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -275,6 +275,7 @@ struct advk_pcie {
+@@ -268,6 +268,7 @@ struct advk_pcie {
u32 actions;
} wins[OB_WIN_COUNT];
u8 wins_count;
struct irq_domain *irq_domain;
struct irq_chip irq_chip;
raw_spinlock_t irq_lock;
-@@ -1442,21 +1443,26 @@ static void advk_pcie_handle_int(struct
+@@ -1434,21 +1435,26 @@ static void advk_pcie_handle_int(struct
}
}
}
static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie)
-@@ -1523,7 +1529,7 @@ static int advk_pcie_probe(struct platfo
+@@ -1515,7 +1521,7 @@ static int advk_pcie_probe(struct platfo
struct advk_pcie *pcie;
struct pci_host_bridge *bridge;
struct resource_entry *entry;
bridge = devm_pci_alloc_host_bridge(dev, sizeof(struct advk_pcie));
if (!bridge)
-@@ -1611,17 +1617,9 @@ static int advk_pcie_probe(struct platfo
+@@ -1601,17 +1607,9 @@ static int advk_pcie_probe(struct platfo
if (IS_ERR(pcie->base))
return PTR_ERR(pcie->base);
pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node,
"reset-gpios", 0,
-@@ -1670,11 +1668,14 @@ static int advk_pcie_probe(struct platfo
+@@ -1660,11 +1658,14 @@ static int advk_pcie_probe(struct platfo
return ret;
}
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
return ret;
-@@ -1722,6 +1723,9 @@ static int advk_pcie_remove(struct platf
+@@ -1712,6 +1713,9 @@ static int advk_pcie_remove(struct platf
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1439,7 +1439,9 @@ static void advk_pcie_handle_int(struct
+@@ -1431,7 +1431,9 @@ static void advk_pcie_handle_int(struct
advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i),
PCIE_ISR1_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -281,8 +281,6 @@ struct advk_pcie {
+@@ -274,8 +274,6 @@ struct advk_pcie {
raw_spinlock_t irq_lock;
struct irq_domain *msi_domain;
struct irq_domain *msi_inner_domain;
struct msi_domain_info msi_domain_info;
DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
struct mutex msi_used_lock;
-@@ -1199,6 +1197,12 @@ static int advk_msi_set_affinity(struct
+@@ -1192,6 +1190,12 @@ static int advk_msi_set_affinity(struct
return -EINVAL;
}
static int advk_msi_irq_domain_alloc(struct irq_domain *domain,
unsigned int virq,
unsigned int nr_irqs, void *args)
-@@ -1215,7 +1219,7 @@ static int advk_msi_irq_domain_alloc(str
+@@ -1208,7 +1212,7 @@ static int advk_msi_irq_domain_alloc(str
for (i = 0; i < nr_irqs; i++)
irq_domain_set_info(domain, virq + i, hwirq + i,
domain->host_data, handle_simple_irq,
NULL, NULL);
-@@ -1285,29 +1289,23 @@ static const struct irq_domain_ops advk_
+@@ -1278,29 +1282,23 @@ static const struct irq_domain_ops advk_
.xlate = irq_domain_xlate_onecell,
};
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -281,7 +281,6 @@ struct advk_pcie {
+@@ -274,7 +274,6 @@ struct advk_pcie {
raw_spinlock_t irq_lock;
struct irq_domain *msi_domain;
struct irq_domain *msi_inner_domain;
DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
struct mutex msi_used_lock;
u16 msi_msg;
-@@ -1293,20 +1292,20 @@ static struct irq_chip advk_msi_irq_chip
+@@ -1286,20 +1285,20 @@ static struct irq_chip advk_msi_irq_chip
.name = "advk-MSI",
};
msi_msg_phys = virt_to_phys(&pcie->msi_msg);
advk_writel(pcie, lower_32_bits(msi_msg_phys),
-@@ -1322,7 +1321,8 @@ static int advk_pcie_init_msi_irq_domain
+@@ -1315,7 +1314,8 @@ static int advk_pcie_init_msi_irq_domain
pcie->msi_domain =
pci_msi_create_irq_domain(of_node_to_fwnode(node),
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1301,7 +1301,6 @@ static struct msi_domain_info advk_msi_d
+@@ -1294,7 +1294,6 @@ static struct msi_domain_info advk_msi_d
static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
phys_addr_t msi_msg_phys;
mutex_init(&pcie->msi_used_lock);
-@@ -1320,7 +1319,7 @@ static int advk_pcie_init_msi_irq_domain
+@@ -1313,7 +1312,7 @@ static int advk_pcie_init_msi_irq_domain
return -ENOMEM;
pcie->msi_domain =
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -578,15 +578,17 @@ static void advk_pcie_setup_hw(struct ad
+@@ -571,15 +571,17 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
/* Disable All ISR0/1 Sources */
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -281,6 +281,7 @@ struct advk_pcie {
+@@ -274,6 +274,7 @@ struct advk_pcie {
raw_spinlock_t irq_lock;
struct irq_domain *msi_domain;
struct irq_domain *msi_inner_domain;
DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
struct mutex msi_used_lock;
u16 msi_msg;
-@@ -577,12 +578,10 @@ static void advk_pcie_setup_hw(struct ad
+@@ -570,12 +571,10 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
/* Unmask summary MSI interrupt */
reg = advk_readl(pcie, PCIE_ISR0_MASK_REG);
-@@ -1198,10 +1197,52 @@ static int advk_msi_set_affinity(struct
+@@ -1191,10 +1190,52 @@ static int advk_msi_set_affinity(struct
return -EINVAL;
}
};
static int advk_msi_irq_domain_alloc(struct irq_domain *domain,
-@@ -1291,7 +1332,9 @@ static const struct irq_domain_ops advk_
+@@ -1284,7 +1325,9 @@ static const struct irq_domain_ops advk_
};
static struct irq_chip advk_msi_irq_chip = {
};
static struct msi_domain_info advk_msi_domain_info = {
-@@ -1305,6 +1348,7 @@ static int advk_pcie_init_msi_irq_domain
+@@ -1298,6 +1341,7 @@ static int advk_pcie_init_msi_irq_domain
struct device *dev = &pcie->pdev->dev;
phys_addr_t msi_msg_phys;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -284,7 +284,6 @@ struct advk_pcie {
+@@ -277,7 +277,6 @@ struct advk_pcie {
raw_spinlock_t msi_irq_lock;
DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
struct mutex msi_used_lock;
int link_gen;
struct pci_bridge_emul bridge;
struct gpio_desc *reset_gpio;
-@@ -479,6 +478,7 @@ static void advk_pcie_disable_ob_win(str
+@@ -472,6 +471,7 @@ static void advk_pcie_disable_ob_win(str
static void advk_pcie_setup_hw(struct advk_pcie *pcie)
{
u32 reg;
int i;
-@@ -567,6 +567,11 @@ static void advk_pcie_setup_hw(struct ad
+@@ -560,6 +560,11 @@ static void advk_pcie_setup_hw(struct ad
reg |= LANE_COUNT_1;
advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
/* Enable MSI */
reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG);
reg |= PCIE_CORE_CTRL2_MSI_ENABLE;
-@@ -1184,10 +1189,10 @@ static void advk_msi_irq_compose_msi_msg
+@@ -1177,10 +1182,10 @@ static void advk_msi_irq_compose_msi_msg
struct msi_msg *msg)
{
struct advk_pcie *pcie = irq_data_get_irq_chip_data(data);
msg->data = data->hwirq;
}
-@@ -1346,18 +1351,10 @@ static struct msi_domain_info advk_msi_d
+@@ -1339,18 +1344,10 @@ static struct msi_domain_info advk_msi_d
static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1344,7 +1344,7 @@ static struct irq_chip advk_msi_irq_chip
+@@ -1337,7 +1337,7 @@ static struct irq_chip advk_msi_irq_chip
static struct msi_domain_info advk_msi_domain_info = {
.flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -97,6 +97,10 @@
+@@ -98,6 +98,10 @@
#define PCIE_MSG_PM_PME_MASK BIT(7)
#define PCIE_ISR0_MASK_REG (CONTROL_BASE_ADDR + 0x44)
#define PCIE_ISR0_MSI_INT_PENDING BIT(24)
#define PCIE_ISR0_INTX_ASSERT(val) BIT(16 + (val))
#define PCIE_ISR0_INTX_DEASSERT(val) BIT(20 + (val))
#define PCIE_ISR0_ALL_MASK GENMASK(31, 0)
-@@ -785,11 +789,15 @@ advk_pci_bridge_emul_base_conf_read(stru
+@@ -778,11 +782,15 @@ advk_pci_bridge_emul_base_conf_read(stru
case PCI_INTERRUPT_LINE: {
/*
* From the whole 32bit register we support reading from HW only
if (advk_readl(pcie, PCIE_CORE_CTRL1_REG) & HOT_RESET_GEN)
val |= PCI_BRIDGE_CTL_BUS_RESET << 16;
else
-@@ -815,6 +823,19 @@ advk_pci_bridge_emul_base_conf_write(str
+@@ -808,6 +816,19 @@ advk_pci_bridge_emul_base_conf_write(str
break;
case PCI_INTERRUPT_LINE:
if (mask & (PCI_BRIDGE_CTL_BUS_RESET << 16)) {
u32 val = advk_readl(pcie, PCIE_CORE_CTRL1_REG);
if (new & (PCI_BRIDGE_CTL_BUS_RESET << 16))
-@@ -1466,6 +1487,19 @@ static void advk_pcie_handle_int(struct
+@@ -1459,6 +1480,19 @@ static void advk_pcie_handle_int(struct
isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -874,7 +874,9 @@ advk_pci_bridge_emul_pcie_conf_read(stru
+@@ -867,7 +867,9 @@ advk_pci_bridge_emul_pcie_conf_read(stru
case PCI_EXP_RTSTA: {
u32 isr0 = advk_readl(pcie, PCIE_ISR0_REG);
u32 msglog = advk_readl(pcie, PCIE_MSG_LOG_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -932,19 +932,21 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -925,19 +925,21 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_pcie_wait_for_retrain(pcie);
break;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1491,6 +1491,19 @@ static void advk_pcie_handle_int(struct
+@@ -1484,6 +1484,19 @@ static void advk_pcie_handle_int(struct
isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -597,6 +597,11 @@ static void advk_pcie_setup_hw(struct ad
+@@ -590,6 +590,11 @@ static void advk_pcie_setup_hw(struct ad
reg &= ~PCIE_ISR0_MSI_INT_PENDING;
advk_writel(pcie, reg, PCIE_ISR0_MASK_REG);
/* Enable summary interrupt for GIC SPI source */
reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
advk_writel(pcie, reg, HOST_CTRL_INT_MASK_REG);
-@@ -863,22 +868,11 @@ advk_pci_bridge_emul_pcie_conf_read(stru
+@@ -856,22 +861,11 @@ advk_pci_bridge_emul_pcie_conf_read(stru
*value = PCI_EXP_SLTSTA_PDS << 16;
return PCI_BRIDGE_EMUL_HANDLED;
case PCI_EXP_LNKCAP: {
u32 val = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + reg);
-@@ -932,22 +926,19 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -925,22 +919,19 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_pcie_wait_for_retrain(pcie);
break;
case PCI_EXP_DEVCTL:
case PCI_EXP_DEVCTL2:
-@@ -1452,6 +1443,34 @@ static void advk_pcie_remove_irq_domain(
+@@ -1445,6 +1436,34 @@ static void advk_pcie_remove_irq_domain(
irq_domain_remove(pcie->irq_domain);
}
static void advk_pcie_handle_msi(struct advk_pcie *pcie)
{
u32 msi_val, msi_mask, msi_status, msi_idx;
-@@ -1491,18 +1510,9 @@ static void advk_pcie_handle_int(struct
+@@ -1484,18 +1503,9 @@ static void advk_pcie_handle_int(struct
isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -280,6 +280,7 @@ struct advk_pcie {
+@@ -273,6 +273,7 @@ struct advk_pcie {
} wins[OB_WIN_COUNT];
u8 wins_count;
int irq;
struct irq_domain *irq_domain;
struct irq_chip irq_chip;
raw_spinlock_t irq_lock;
-@@ -1443,6 +1444,44 @@ static void advk_pcie_remove_irq_domain(
+@@ -1436,6 +1437,44 @@ static void advk_pcie_remove_irq_domain(
irq_domain_remove(pcie->irq_domain);
}
static void advk_pcie_handle_pme(struct advk_pcie *pcie)
{
u32 requester = advk_readl(pcie, PCIE_MSG_LOG_REG) >> 16;
-@@ -1465,7 +1504,7 @@ static void advk_pcie_handle_pme(struct
+@@ -1458,7 +1497,7 @@ static void advk_pcie_handle_pme(struct
if (!(le16_to_cpu(pcie->bridge.pcie_conf.rootctl) & PCI_EXP_RTCTL_PMEIE))
return;
if (generic_handle_irq(virq) == -EINVAL)
dev_err_ratelimited(&pcie->pdev->dev, "unhandled PME IRQ\n");
}
-@@ -1522,7 +1561,7 @@ static void advk_pcie_handle_int(struct
+@@ -1515,7 +1554,7 @@ static void advk_pcie_handle_int(struct
* Aardvark HW returns zero for PCI_ERR_ROOT_AER_IRQ, so use
* PCIe interrupt 0
*/
if (generic_handle_irq(virq) == -EINVAL)
dev_err_ratelimited(&pcie->pdev->dev, "unhandled ERR IRQ\n");
}
-@@ -1568,6 +1607,21 @@ static void advk_pcie_irq_handler(struct
+@@ -1560,6 +1599,21 @@ static void advk_pcie_irq_handler(struct
chained_irq_exit(chip, desc);
}
static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie)
{
phy_power_off(pcie->phy);
-@@ -1771,14 +1825,24 @@ static int advk_pcie_probe(struct platfo
+@@ -1761,14 +1815,24 @@ static int advk_pcie_probe(struct platfo
return ret;
}
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
return ret;
-@@ -1830,6 +1894,7 @@ static int advk_pcie_remove(struct platf
+@@ -1820,6 +1884,7 @@ static int advk_pcie_remove(struct platf
irq_set_chained_handler_and_data(pcie->irq, NULL, NULL);
/* Remove IRQ domains */
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1422,7 +1422,6 @@ static int advk_pcie_init_irq_domain(str
+@@ -1415,7 +1415,6 @@ static int advk_pcie_init_irq_domain(str
}
irq_chip->irq_mask = advk_pcie_irq_mask;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1339,7 +1339,6 @@ static int advk_pcie_irq_map(struct irq_
+@@ -1332,7 +1332,6 @@ static int advk_pcie_irq_map(struct irq_
{
struct advk_pcie *pcie = h->host_data;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1620,7 +1620,7 @@ static int advk_pcie_map_irq(const struc
+@@ -1612,7 +1612,7 @@ static int advk_pcie_map_irq(const struc
return of_irq_parse_and_map_pci(dev, slot, pin);
}
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1005,8 +1005,12 @@ static bool advk_pcie_valid_device(struc
+@@ -998,8 +998,12 @@ static bool advk_pcie_valid_device(struc
return false;
/*
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -282,7 +282,6 @@ struct advk_pcie {
+@@ -275,7 +275,6 @@ struct advk_pcie {
int irq;
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;
-@@ -1338,14 +1337,19 @@ static void advk_pcie_irq_unmask(struct
+@@ -1331,14 +1330,19 @@ static void advk_pcie_irq_unmask(struct
raw_spin_unlock_irqrestore(&pcie->irq_lock, flags);
}
irq_set_chip_data(virq, pcie);
return 0;
-@@ -1404,7 +1408,6 @@ static int advk_pcie_init_irq_domain(str
+@@ -1397,7 +1401,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);
-@@ -1415,28 +1418,14 @@ static int advk_pcie_init_irq_domain(str
+@@ -1408,28 +1411,14 @@ static int advk_pcie_init_irq_domain(str
return -ENODEV;
}
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1637,9 +1637,7 @@ static int advk_pcie_enable_phy(struct a
+@@ -1629,9 +1629,7 @@ static int advk_pcie_enable_phy(struct a
}
ret = phy_power_on(pcie->phy);
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1800,6 +1800,15 @@ config EMBEDDED
+@@ -1805,6 +1805,15 @@ config EMBEDDED
an embedded system so certain expert options are available
for configuration.
help
--- a/init/main.c
+++ b/init/main.c
-@@ -608,6 +608,29 @@ static inline void setup_nr_cpu_ids(void
+@@ -614,6 +614,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
-@@ -869,6 +892,7 @@ asmlinkage __visible void __init __no_sa
+@@ -954,6 +977,7 @@ asmlinkage __visible void __init __no_sa
pr_notice("%s", linux_banner);
early_security_init();
setup_arch(&command_line);