reverted: --- linux-oem-5.10-5.10.0/Documentation/asm-annotations.rst +++ linux-oem-5.10-5.10.0.orig/Documentation/asm-annotations.rst @@ -100,11 +100,6 @@ ~~~~~~~~~~~~~~~~~~ This section covers ``SYM_FUNC_*`` and ``SYM_CODE_*`` enumerated above. -``objtool`` requires that all code must be contained in an ELF symbol. Symbol -names that have a ``.L`` prefix do not emit symbol table entries. ``.L`` -prefixed symbols can be used within a code region, but should be avoided for -denoting a range of code via ``SYM_*_START/END`` annotations. - * ``SYM_FUNC_START`` and ``SYM_FUNC_START_LOCAL`` are supposed to be **the most frequent markings**. They are used for functions with standard calling conventions -- global and local. Like in C, they both align the functions to reverted: --- linux-oem-5.10-5.10.0/Documentation/filesystems/overlayfs.rst +++ linux-oem-5.10-5.10.0.orig/Documentation/filesystems/overlayfs.rst @@ -575,14 +575,6 @@ The advantage of mounting with the "volatile" option is that all forms of sync calls to the upper filesystem are omitted. -In order to avoid a giving a false sense of safety, the syncfs (and fsync) -semantics of volatile mounts are slightly different than that of the rest of -VFS. If any writeback error occurs on the upperdir's filesystem after a -volatile mount takes place, all sync functions will return an error. Once this -condition is reached, the filesystem will not recover, and every subsequent sync -call will return an error, even if the upperdir has not experience a new error -since the last sync call. - When overlay is mounted with "volatile" option, the directory "$workdir/work/incompat/volatile" is created. During next mount, overlay checks for this directory and refuses to mount if present. This is a strong reverted: --- linux-oem-5.10-5.10.0/Documentation/virt/kvm/api.rst +++ linux-oem-5.10-5.10.0.orig/Documentation/virt/kvm/api.rst @@ -1264,9 +1264,6 @@ the entire memory slot size. Any object may back this memory, including anonymous memory, ordinary files, and hugetlbfs. -On architectures that support a form of address tagging, userspace_addr must -be an untagged address. - It is recommended that the lower 21 bits of guest_phys_addr and userspace_addr be identical. This allows large pages in the guest to be backed by large pages in the host. @@ -1319,7 +1316,7 @@ :Capability: KVM_CAP_ENABLE_CAP_VM :Architectures: all +:Type: vcpu ioctl -:Type: vm ioctl :Parameters: struct kvm_enable_cap (in) :Returns: 0 on success; -1 on error diff -u linux-oem-5.10-5.10.0/Makefile linux-oem-5.10-5.10.0/Makefile --- linux-oem-5.10-5.10.0/Makefile +++ linux-oem-5.10-5.10.0/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 18 +SUBLEVEL = 11 EXTRAVERSION = NAME = Kleptomaniac Octopus @@ -839,12 +839,10 @@ KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang endif -DEBUG_CFLAGS := - # Workaround for GCC versions < 5.0 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801 ifdef CONFIG_CC_IS_GCC -DEBUG_CFLAGS += $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments)) +DEBUG_CFLAGS := $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments)) endif ifdef CONFIG_DEBUG_INFO @@ -977,6 +975,12 @@ # change __FILE__ to the relative path from the srctree KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) +# ensure -fcf-protection is disabled when using retpoline as it is +# incompatible with -mindirect-branch=thunk-extern +ifdef CONFIG_RETPOLINE +KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) +endif + # include additional Makefiles when needed include-y := scripts/Makefile.extrawarn include-$(CONFIG_KASAN) += scripts/Makefile.kasan reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/compressed/atags_to_fdt.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/compressed/atags_to_fdt.c @@ -15,8 +15,7 @@ { int offset = fdt_path_offset(fdt, node_path); if (offset == -FDT_ERR_NOTFOUND) + offset = fdt_add_subnode(fdt, 0, node_path); - /* Add the node to root if not found, dropping the leading '/' */ - offset = fdt_add_subnode(fdt, 0, node_path + 1); return offset; } reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/imx6q-tbs2910.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/imx6q-tbs2910.dts @@ -16,13 +16,6 @@ stdout-path = &uart1; }; - aliases { - mmc0 = &usdhc2; - mmc1 = &usdhc3; - mmc2 = &usdhc4; - /delete-property/ mmc3; - }; - memory@10000000 { device_type = "memory"; reg = <0x10000000 0x80000000>; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi @@ -418,7 +418,7 @@ /* VDD_AUD_1P8: Audio codec */ reg_aud_1p8v: ldo3 { + regulator-name = "vdd1p8"; - regulator-name = "vdd1p8a"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-boot-on; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi @@ -137,7 +137,7 @@ lcd_backlight: lcd-backlight { compatible = "pwm-backlight"; + pwms = <&pwm4 0 5000000>; - pwms = <&pwm4 0 5000000 0>; pwm-names = "LCD_BKLT_PWM"; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; @@ -167,7 +167,7 @@ i2c-gpio,delay-us = <2>; /* ~100 kHz */ #address-cells = <1>; #size-cells = <0>; + status = "disabld"; - status = "disabled"; }; i2c_cam: i2c-gpio-cam { @@ -179,7 +179,7 @@ i2c-gpio,delay-us = <2>; /* ~100 kHz */ #address-cells = <1>; #size-cells = <0>; + status = "disabld"; - status = "disabled"; }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/imx6qdl-sr-som.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/imx6qdl-sr-som.dtsi @@ -53,6 +53,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_microsom_enet_ar8035>; + phy-handle = <&phy>; phy-mode = "rgmii-id"; phy-reset-duration = <2>; phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; @@ -62,19 +63,10 @@ #address-cells = <1>; #size-cells = <0>; + phy: ethernet-phy@0 { - /* - * The PHY can appear at either address 0 or 4 due to the - * configuration (LED) pin not being pulled sufficiently. - */ - ethernet-phy@0 { reg = <0>; qca,clk-out-frequency = <125000000>; }; - - ethernet-phy@4 { - reg = <4>; - qca,clk-out-frequency = <125000000>; - }; }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/lpc32xx.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/lpc32xx.dtsi @@ -329,6 +329,9 @@ clocks = <&xtal_32k>, <&xtal>; clock-names = "xtal_32k", "xtal"; + + assigned-clocks = <&clk LPC32XX_CLK_HCLK_PLL>; + assigned-clock-rates = <208000000>; }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/omap3-gta04.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/omap3-gta04.dtsi @@ -114,7 +114,7 @@ gpio-sck = <&gpio1 12 GPIO_ACTIVE_HIGH>; gpio-miso = <&gpio1 18 GPIO_ACTIVE_HIGH>; gpio-mosi = <&gpio1 20 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; - cs-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>; num-chipselects = <1>; /* lcd panel */ @@ -124,6 +124,7 @@ spi-max-frequency = <100000>; spi-cpol; spi-cpha; + spi-cs-high; backlight= <&backlight>; label = "lcd"; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/ste-db8500.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/ste-db8500.dtsi @@ -12,42 +12,4 @@ 200000 0>; }; }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - /* Modem trace memory */ - ram@06000000 { - reg = <0x06000000 0x00f00000>; - no-map; - }; - - /* Modem shared memory */ - ram@06f00000 { - reg = <0x06f00000 0x00100000>; - no-map; - }; - - /* Modem private memory */ - ram@07000000 { - reg = <0x07000000 0x01000000>; - no-map; - }; - - /* - * Initial Secure Software ISSW memory - * - * This is probably only used if the kernel tries - * to actually call into trustzone to run secure - * applications, which the mainline kernel probably - * will not do on this old chipset. But you can never - * be too careful, so reserve this memory anyway. - */ - ram@17f00000 { - reg = <0x17f00000 0x00100000>; - no-map; - }; - }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/ste-db8520.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/ste-db8520.dtsi @@ -12,42 +12,4 @@ 200000 0>; }; }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - /* Modem trace memory */ - ram@06000000 { - reg = <0x06000000 0x00f00000>; - no-map; - }; - - /* Modem shared memory */ - ram@06f00000 { - reg = <0x06f00000 0x00100000>; - no-map; - }; - - /* Modem private memory */ - ram@07000000 { - reg = <0x07000000 0x01000000>; - no-map; - }; - - /* - * Initial Secure Software ISSW memory - * - * This is probably only used if the kernel tries - * to actually call into trustzone to run secure - * applications, which the mainline kernel probably - * will not do on this old chipset. But you can never - * be too careful, so reserve this memory anyway. - */ - ram@17f00000 { - reg = <0x17f00000 0x00100000>; - no-map; - }; - }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/ste-db9500.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/ste-db9500.dtsi @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "ste-dbx5x0.dtsi" - -/ { - cpus { - cpu@300 { - /* cpufreq controls */ - operating-points = <1152000 0 - 800000 0 - 400000 0 - 200000 0>; - }; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - /* - * Initial Secure Software ISSW memory - * - * This is probably only used if the kernel tries - * to actually call into trustzone to run secure - * applications, which the mainline kernel probably - * will not do on this old chipset. But you can never - * be too careful, so reserve this memory anyway. - */ - ram@17f00000 { - reg = <0x17f00000 0x00100000>; - no-map; - }; - }; -}; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/ste-snowball.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/ste-snowball.dts @@ -4,7 +4,7 @@ */ /dts-v1/; +#include "ste-db8500.dtsi" -#include "ste-db9500.dtsi" #include "ste-href-ab8500.dtsi" #include "ste-href-family-pinctrl.dtsi" reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi @@ -35,7 +35,7 @@ */ rs485-rx-en { gpio-hog; + gpios = <8 GPIO_ACTIVE_HIGH>; - gpios = <8 0>; output-low; line-name = "rs485-rx-en"; }; @@ -63,7 +63,7 @@ */ usb-hub { gpio-hog; + gpios = <2 GPIO_ACTIVE_HIGH>; - gpios = <2 0>; output-high; line-name = "usb-hub-reset"; }; @@ -87,12 +87,6 @@ }; }; -&i2c4 { - touchscreen@49 { - status = "disabled"; - }; -}; - &i2c5 { /* TP7/TP8 */ pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins_a>; @@ -110,7 +104,7 @@ * are used for on-board microSD slot instead. */ /delete-property/broken-cd; + cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>; disable-wp; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi @@ -353,8 +353,7 @@ pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>; pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>; + broken-cd; - cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - disable-wp; st,sig-dir; st,neg-edge; st,use-ckin; reverted: --- linux-oem-5.10-5.10.0/arch/arm/boot/dts/sun7i-a20-bananapro.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm/boot/dts/sun7i-a20-bananapro.dts @@ -110,7 +110,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; + phy-mode = "rgmii"; - phy-mode = "rgmii-id"; phy-supply = <®_gmac_3v3>; status = "okay"; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm/include/asm/kexec-internal.h +++ linux-oem-5.10-5.10.0.orig/arch/arm/include/asm/kexec-internal.h @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ARM_KEXEC_INTERNAL_H -#define _ARM_KEXEC_INTERNAL_H - -struct kexec_relocate_data { - unsigned long kexec_start_address; - unsigned long kexec_indirection_page; - unsigned long kexec_mach_type; - unsigned long kexec_r2; -}; - -#endif reverted: --- linux-oem-5.10-5.10.0/arch/arm/include/debug/tegra.S +++ linux-oem-5.10-5.10.0.orig/arch/arm/include/debug/tegra.S @@ -149,34 +149,7 @@ .align 99: .word . -#if defined(ZIMAGE) - .word . + 4 -/* - * Storage for the state maintained by the macro. - * - * In the kernel proper, this data is located in arch/arm/mach-tegra/tegra.c. - * That's because this header is included from multiple files, and we only - * want a single copy of the data. In particular, the UART probing code above - * assumes it's running using physical addresses. This is true when this file - * is included from head.o, but not when included from debug.o. So we need - * to share the probe results between the two copies, rather than having - * to re-run the probing again later. - * - * In the decompressor, we put the storage right here, since common.c - * isn't included in the decompressor build. This storage data gets put in - * .text even though it's really data, since .data is discarded from the - * decompressor. Luckily, .text is writeable in the decompressor, unless - * CONFIG_ZBOOT_ROM. That dependency is handled in arch/arm/Kconfig.debug. - */ - /* Debug UART initialization required */ - .word 1 - /* Debug UART physical address */ - .word 0 - /* Debug UART virtual address */ - .word 0 -#else .word tegra_uart_config -#endif .ltorg /* Load previously selected UART address */ @@ -216,3 +189,30 @@ .macro waituarttxrdy,rd,rx .endm + +/* + * Storage for the state maintained by the macros above. + * + * In the kernel proper, this data is located in arch/arm/mach-tegra/tegra.c. + * That's because this header is included from multiple files, and we only + * want a single copy of the data. In particular, the UART probing code above + * assumes it's running using physical addresses. This is true when this file + * is included from head.o, but not when included from debug.o. So we need + * to share the probe results between the two copies, rather than having + * to re-run the probing again later. + * + * In the decompressor, we put the symbol/storage right here, since common.c + * isn't included in the decompressor build. This symbol gets put in .text + * even though it's really data, since .data is discarded from the + * decompressor. Luckily, .text is writeable in the decompressor, unless + * CONFIG_ZBOOT_ROM. That dependency is handled in arch/arm/Kconfig.debug. + */ +#if defined(ZIMAGE) +tegra_uart_config: + /* Debug UART initialization required */ + .word 1 + /* Debug UART physical address */ + .word 0 + /* Debug UART virtual address */ + .word 0 +#endif reverted: --- linux-oem-5.10-5.10.0/arch/arm/kernel/asm-offsets.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/kernel/asm-offsets.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -171,9 +170,5 @@ DEFINE(MPU_RGN_PRBAR, offsetof(struct mpu_rgn, prbar)); DEFINE(MPU_RGN_PRLAR, offsetof(struct mpu_rgn, prlar)); #endif - DEFINE(KEXEC_START_ADDR, offsetof(struct kexec_relocate_data, kexec_start_address)); - DEFINE(KEXEC_INDIR_PAGE, offsetof(struct kexec_relocate_data, kexec_indirection_page)); - DEFINE(KEXEC_MACH_TYPE, offsetof(struct kexec_relocate_data, kexec_mach_type)); - DEFINE(KEXEC_R2, offsetof(struct kexec_relocate_data, kexec_r2)); return 0; } reverted: --- linux-oem-5.10-5.10.0/arch/arm/kernel/machine_kexec.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/kernel/machine_kexec.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -23,6 +22,11 @@ extern void relocate_new_kernel(void); extern const unsigned int relocate_new_kernel_size; +extern unsigned long kexec_start_address; +extern unsigned long kexec_indirection_page; +extern unsigned long kexec_mach_type; +extern unsigned long kexec_boot_atags; + static atomic_t waiting_for_crash_ipi; /* @@ -155,7 +159,6 @@ void machine_kexec(struct kimage *image) { unsigned long page_list, reboot_entry_phys; - struct kexec_relocate_data *data; void (*reboot_entry)(void); void *reboot_code_buffer; @@ -171,17 +174,18 @@ reboot_code_buffer = page_address(image->control_code_page); + /* Prepare parameters for reboot_code_buffer*/ + set_kernel_text_rw(); + kexec_start_address = image->start; + kexec_indirection_page = page_list; + kexec_mach_type = machine_arch_type; + kexec_boot_atags = image->arch.kernel_r2; + /* copy our kernel relocation code to the control code page */ reboot_entry = fncpy(reboot_code_buffer, &relocate_new_kernel, relocate_new_kernel_size); - data = reboot_code_buffer + relocate_new_kernel_size; - data->kexec_start_address = image->start; - data->kexec_indirection_page = page_list; - data->kexec_mach_type = machine_arch_type; - data->kexec_r2 = image->arch.kernel_r2; - /* get the identity mapping physical address for the reboot code */ reboot_entry_phys = virt_to_idmap(reboot_entry); reverted: --- linux-oem-5.10-5.10.0/arch/arm/kernel/relocate_kernel.S +++ linux-oem-5.10-5.10.0.orig/arch/arm/kernel/relocate_kernel.S @@ -5,16 +5,14 @@ #include #include -#include #include .align 3 /* not needed for this code, but keeps fncpy() happy */ ENTRY(relocate_new_kernel) + ldr r0,kexec_indirection_page + ldr r1,kexec_start_address - adr r7, relocate_new_kernel_end - ldr r0, [r7, #KEXEC_INDIR_PAGE] - ldr r1, [r7, #KEXEC_START_ADDR] /* * If there is no indirection page (we are doing crashdumps) @@ -59,16 +57,34 @@ 2: /* Jump to relocated kernel */ + mov lr,r1 + mov r0,#0 + ldr r1,kexec_mach_type + ldr r2,kexec_boot_atags + ARM( ret lr ) + THUMB( bx lr ) + + .align + + .globl kexec_start_address +kexec_start_address: + .long 0x0 + + .globl kexec_indirection_page +kexec_indirection_page: + .long 0x0 + + .globl kexec_mach_type +kexec_mach_type: + .long 0x0 + + /* phy addr of the atags for the new kernel */ + .globl kexec_boot_atags +kexec_boot_atags: + .long 0x0 - mov lr, r1 - mov r0, #0 - ldr r1, [r7, #KEXEC_MACH_TYPE] - ldr r2, [r7, #KEXEC_R2] - ARM( ret lr ) - THUMB( bx lr ) ENDPROC(relocate_new_kernel) - .align 3 relocate_new_kernel_end: .globl relocate_new_kernel_size reverted: --- linux-oem-5.10-5.10.0/arch/arm/kernel/signal.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/kernel/signal.c @@ -693,20 +693,18 @@ addr = page_address(page); - /* Poison the entire page */ - memset32(addr, __opcode_to_mem_arm(0xe7fddef1), - PAGE_SIZE / sizeof(u32)); - /* Give the signal return code some randomness */ offset = 0x200 + (get_random_int() & 0x7fc); signal_return_offset = offset; + /* + * Copy signal return handlers into the vector page, and + * set sigreturn to be a pointer to these. + */ - /* Copy signal return handlers into the page */ memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes)); + ptr = (unsigned long)addr + offset; + flush_icache_range(ptr, ptr + sizeof(sigreturn_codes)); - /* Flush out all instructions in this page */ - ptr = (unsigned long)addr; - flush_icache_range(ptr, ptr + PAGE_SIZE); return page; } reverted: --- linux-oem-5.10-5.10.0/arch/arm/mach-footbridge/dc21285.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/mach-footbridge/dc21285.c @@ -65,15 +65,15 @@ if (addr) switch (size) { case 1: + asm("ldrb %0, [%1, %2]" - asm volatile("ldrb %0, [%1, %2]" : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; case 2: + asm("ldrh %0, [%1, %2]" - asm volatile("ldrh %0, [%1, %2]" : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; case 4: + asm("ldr %0, [%1, %2]" - asm volatile("ldr %0, [%1, %2]" : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; } @@ -99,17 +99,17 @@ if (addr) switch (size) { case 1: + asm("strb %0, [%1, %2]" - asm volatile("strb %0, [%1, %2]" : : "r" (value), "r" (addr), "r" (where) : "cc"); break; case 2: + asm("strh %0, [%1, %2]" - asm volatile("strh %0, [%1, %2]" : : "r" (value), "r" (addr), "r" (where) : "cc"); break; case 4: + asm("str %0, [%1, %2]" - asm volatile("str %0, [%1, %2]" : : "r" (value), "r" (addr), "r" (where) : "cc"); break; reverted: --- linux-oem-5.10-5.10.0/arch/arm/mach-imx/suspend-imx6.S +++ linux-oem-5.10-5.10.0.orig/arch/arm/mach-imx/suspend-imx6.S @@ -67,7 +67,6 @@ #define MX6Q_CCM_CCR 0x0 .align 3 - .arm .macro sync_l2_cache reverted: --- linux-oem-5.10-5.10.0/arch/arm/mach-omap1/board-osk.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/mach-omap1/board-osk.c @@ -203,8 +203,6 @@ */ gpio_request(OSK_TPS_GPIO_USB_PWR_EN, "n_vbus_en"); gpio_direction_output(OSK_TPS_GPIO_USB_PWR_EN, 1); - /* Free the GPIO again as the driver will request it */ - gpio_free(OSK_TPS_GPIO_USB_PWR_EN); /* Set GPIO 2 high so LED D3 is off by default */ tps65010_set_gpio_out_value(GPIO2, HIGH); reverted: --- linux-oem-5.10-5.10.0/arch/arm/mach-omap2/cpuidle44xx.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/mach-omap2/cpuidle44xx.c @@ -151,10 +151,10 @@ (cx->mpu_logic_state == PWRDM_POWER_OFF); /* Enter broadcast mode for periodic timers */ + tick_broadcast_enable(); - RCU_NONIDLE(tick_broadcast_enable()); /* Enter broadcast mode for one-shot timers */ + tick_broadcast_enter(); - RCU_NONIDLE(tick_broadcast_enter()); /* * Call idle CPU PM enter notifier chain so that @@ -166,7 +166,7 @@ if (dev->cpu == 0) { pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state); + omap_set_pwrdm_state(mpu_pd, cx->mpu_state); - RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state)); /* * Call idle CPU cluster PM enter notifier chain @@ -178,7 +178,7 @@ index = 0; cx = state_ptr + index; pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state); + omap_set_pwrdm_state(mpu_pd, cx->mpu_state); - RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state)); mpuss_can_lose_context = 0; } } @@ -194,9 +194,9 @@ mpuss_can_lose_context) gic_dist_disable(); + clkdm_deny_idle(cpu_clkdm[1]); + omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON); + clkdm_allow_idle(cpu_clkdm[1]); - RCU_NONIDLE(clkdm_deny_idle(cpu_clkdm[1])); - RCU_NONIDLE(omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON)); - RCU_NONIDLE(clkdm_allow_idle(cpu_clkdm[1])); if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) && mpuss_can_lose_context) { @@ -222,7 +222,7 @@ cpu_pm_exit(); cpu_pm_out: + tick_broadcast_exit(); - RCU_NONIDLE(tick_broadcast_exit()); fail: cpuidle_coupled_parallel_barrier(dev, &abort_barrier); reverted: --- linux-oem-5.10-5.10.0/arch/arm/mm/Kconfig +++ linux-oem-5.10-5.10.0.orig/arch/arm/mm/Kconfig @@ -743,7 +743,6 @@ config CPU_BIG_ENDIAN bool "Build big-endian kernel" depends on ARCH_SUPPORTS_BIG_ENDIAN - depends on !LD_IS_LLD help Say Y if you plan on running a kernel in big-endian mode. Note that your board must be properly built and your board diff -u linux-oem-5.10-5.10.0/arch/arm/xen/enlighten.c linux-oem-5.10-5.10.0/arch/arm/xen/enlighten.c --- linux-oem-5.10-5.10.0/arch/arm/xen/enlighten.c +++ linux-oem-5.10-5.10.0/arch/arm/xen/enlighten.c @@ -370,6 +370,8 @@ return -ENOMEM; } gnttab_init(); + if (!xen_initial_domain()) + xenbus_probe(); /* * Making sure board specific code will not set up ops for reverted: --- linux-oem-5.10-5.10.0/arch/arm/xen/p2m.c +++ linux-oem-5.10-5.10.0.orig/arch/arm/xen/p2m.c @@ -95,10 +95,8 @@ for (i = 0; i < count; i++) { if (map_ops[i].status) continue; + set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT, + map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT); - if (unlikely(!set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT, - map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT))) { - return -ENOMEM; - } } return 0; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -2384,7 +2384,7 @@ interrupts = ; dr_mode = "host"; snps,dis_u2_susphy_quirk; + snps,quirk-frame-length-adjustment; - snps,quirk-frame-length-adjustment = <0x20>; snps,parkmode-disable-ss-quirk; }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi @@ -135,7 +135,3 @@ }; }; }; - -&mali { - dma-coherent; -}; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts @@ -52,7 +52,7 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; - gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; enable-active-high; regulator-always-on; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi @@ -4,16 +4,11 @@ */ usb { compatible = "simple-bus"; + dma-ranges; #address-cells = <2>; #size-cells = <2>; ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>; - /* - * Internally, USB bus to the interconnect can only address up - * to 40-bit - */ - dma-ranges = <0 0 0 0 0x100 0x0>; - usbphy0: usb-phy@0 { compatible = "brcm,sr-usb-combo-phy"; reg = <0x0 0x00000000 0x0 0x100>; diff -u linux-oem-5.10-5.10.0/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi linux-oem-5.10-5.10.0/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ linux-oem-5.10-5.10.0/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi @@ -93,7 +93,7 @@ reboot { compatible ="syscon-reboot"; regmap = <&rst>; - offset = <0>; + offset = <0xb0>; mask = <0x02>; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -385,7 +385,7 @@ dcfg: dcfg@1ee0000 { compatible = "fsl,ls1046a-dcfg", "syscon"; + reg = <0x0 0x1ee0000 0x0 0x10000>; - reg = <0x0 0x1ee0000 0x0 0x1000>; big-endian; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -259,7 +259,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&iomuxc 0 56 26>, <&iomuxc 0 144 4>; - gpio-ranges = <&iomuxc 0 56 26>, <&iomuxc 26 144 4>; }; gpio4: gpio@30230000 { reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -415,9 +415,7 @@ &gcc { protected-clocks = , , + ; - , - , - ; }; &gpu { diff -u linux-oem-5.10-5.10.0/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts linux-oem-5.10-5.10.0/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ linux-oem-5.10-5.10.0/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -245,9 +245,7 @@ &gcc { protected-clocks = , , - , - , - ; + ; }; &gpu { @@ -265,8 +263,6 @@ &i2c3 { status = "okay"; clock-frequency = <400000>; - /* Overwrite pinctrl-0 from sdm845.dtsi */ - pinctrl-0 = <&qup_i2c3_default &i2c3_hid_active>; tsel: hid@15 { compatible = "hid-over-i2c"; @@ -274,6 +270,9 @@ hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_hid_active>; }; tsc2: hid@2c { @@ -282,6 +281,11 @@ hid-descr-addr = <0x20>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_hid_active>; + + status = "disabled"; }; }; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/rockchip/px30.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -1097,7 +1097,7 @@ vopl_mmu: iommu@ff470f00 { compatible = "rockchip,iommu"; reg = <0x0 0xff470f00 0x0 0x100>; + interrupts = ; - interrupts = ; interrupt-names = "vopl_mmu"; clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>; clock-names = "aclk", "iface"; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts @@ -114,10 +114,6 @@ cpu-supply = <&vdd_arm>; }; -&display_subsystem { - status = "disabled"; -}; - &gmac2io { assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; assigned-clock-parents = <&gmac_clk>, <&gmac_clk>; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts @@ -790,6 +790,7 @@ &pcie0 { bus-scan-delay-ms = <1000>; ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; + max-link-speed = <2>; num-lanes = <4>; pinctrl-names = "default"; pinctrl-0 = <&pcie_clkreqn_cpm>; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ linux-oem-5.10-5.10.0.orig/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -234,7 +234,6 @@ reg = <0x0 0xf8000000 0x0 0x2000000>, <0x0 0xfd000000 0x0 0x1000000>; reg-names = "axi-base", "apb-base"; - device_type = "pci"; #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; @@ -253,6 +252,7 @@ <0 0 0 2 &pcie0_intc 1>, <0 0 0 3 &pcie0_intc 2>, <0 0 0 4 &pcie0_intc 3>; + linux,pci-domain = <0>; max-link-speed = <1>; msi-map = <0x0 &its 0x0 0x1000>; phys = <&pcie_phy 0>, <&pcie_phy 1>, @@ -1278,6 +1278,7 @@ compatible = "rockchip,rk3399-vdec"; reg = <0x0 0xff660000 0x0 0x400>; interrupts = ; + interrupt-names = "vdpu"; clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>, <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>; clock-names = "axi", "ahb", "cabac", "core"; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/include/asm/memory.h +++ linux-oem-5.10-5.10.0.orig/arch/arm64/include/asm/memory.h @@ -238,11 +238,11 @@ /* + * The linear kernel range starts at the bottom of the virtual address + * space. Testing the top bit for the start of the region is a + * sufficient check and avoids having to worry about the tag. - * Check whether an arbitrary address is within the linear map, which - * lives in the [PAGE_OFFSET, PAGE_END) interval at the bottom of the - * kernel's TTBR1 address range. */ +#define __is_lm_address(addr) (!(((u64)addr) & BIT(vabits_actual - 1))) -#define __is_lm_address(addr) (((u64)(addr) ^ PAGE_OFFSET) < (PAGE_END - PAGE_OFFSET)) #define __lm_to_phys(addr) (((addr) & ~PAGE_OFFSET) + PHYS_OFFSET) #define __kimg_to_phys(addr) ((addr) - kimage_voffset) @@ -323,7 +323,7 @@ #endif /* !CONFIG_SPARSEMEM_VMEMMAP || CONFIG_DEBUG_VIRTUAL */ #define virt_addr_valid(addr) ({ \ + __typeof__(addr) __addr = addr; \ - __typeof__(addr) __addr = __tag_reset(addr); \ __is_lm_address(__addr) && pfn_valid(virt_to_pfn(__addr)); \ }) diff -u linux-oem-5.10-5.10.0/arch/arm64/kernel/cpufeature.c linux-oem-5.10-5.10.0/arch/arm64/kernel/cpufeature.c --- linux-oem-5.10-5.10.0/arch/arm64/kernel/cpufeature.c +++ linux-oem-5.10-5.10.0/arch/arm64/kernel/cpufeature.c @@ -1696,12 +1696,16 @@ #ifdef CONFIG_ARM64_MTE static void cpu_enable_mte(struct arm64_cpu_capabilities const *cap) { + static bool cleared_zero_page = false; + /* * Clear the tags in the zero page. This needs to be done via the * linear map which has the Tagged attribute. */ - if (!test_and_set_bit(PG_mte_tagged, &ZERO_PAGE(0)->flags)) + if (!cleared_zero_page) { + cleared_zero_page = true; mte_clear_page_tags(lm_alias(empty_zero_page)); + } } #endif /* CONFIG_ARM64_MTE */ diff -u linux-oem-5.10-5.10.0/arch/arm64/kernel/mte.c linux-oem-5.10-5.10.0/arch/arm64/kernel/mte.c --- linux-oem-5.10-5.10.0/arch/arm64/kernel/mte.c +++ linux-oem-5.10-5.10.0/arch/arm64/kernel/mte.c @@ -239,12 +239,11 @@ * would cause the existing tags to be cleared if the page * was never mapped with PROT_MTE. */ - if (!(vma->vm_flags & VM_MTE)) { + if (!test_bit(PG_mte_tagged, &page->flags)) { ret = -EOPNOTSUPP; put_page(page); break; } - WARN_ON_ONCE(!test_bit(PG_mte_tagged, &page->flags)); /* limit access to the end of the page */ offset = offset_in_page(addr); reverted: --- linux-oem-5.10-5.10.0/arch/arm64/kvm/pmu-emul.c +++ linux-oem-5.10-5.10.0.orig/arch/arm64/kvm/pmu-emul.c @@ -788,7 +788,7 @@ { unsigned long *bmap = vcpu->kvm->arch.pmu_filter; u64 val, mask = 0; + int base, i; - int base, i, nr_events; if (!pmceid1) { val = read_sysreg(pmceid0_el0); @@ -801,17 +801,13 @@ if (!bmap) return val; - nr_events = kvm_pmu_event_mask(vcpu->kvm) + 1; - for (i = 0; i < 32; i += 8) { u64 byte; byte = bitmap_get_value8(bmap, base + i); mask |= byte << i; + byte = bitmap_get_value8(bmap, 0x4000 + base + i); + mask |= byte << (32 + i); - if (nr_events >= (0x4000 + base + 32)) { - byte = bitmap_get_value8(bmap, 0x4000 + base + i); - mask |= byte << (32 + i); - } } return val & mask; reverted: --- linux-oem-5.10-5.10.0/arch/arm64/mm/physaddr.c +++ linux-oem-5.10-5.10.0.orig/arch/arm64/mm/physaddr.c @@ -9,7 +9,7 @@ phys_addr_t __virt_to_phys(unsigned long x) { + WARN(!__is_lm_address(x), - WARN(!__is_lm_address(__tag_reset(x)), "virt_to_phys used for non-linear address: %pK (%pS)\n", (void *)x, (void *)x); reverted: --- linux-oem-5.10-5.10.0/arch/h8300/kernel/asm-offsets.c +++ linux-oem-5.10-5.10.0.orig/arch/h8300/kernel/asm-offsets.c @@ -63,9 +63,6 @@ OFFSET(TI_FLAGS, thread_info, flags); OFFSET(TI_CPU, thread_info, cpu); OFFSET(TI_PRE, thread_info, preempt_count); -#ifdef CONFIG_PREEMPTION - DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); -#endif return 0; } reverted: --- linux-oem-5.10-5.10.0/arch/parisc/Kconfig +++ linux-oem-5.10-5.10.0.orig/arch/parisc/Kconfig @@ -202,8 +202,9 @@ depends on PA8X00 || PA7200 config MLONGCALLS + bool "Enable the -mlong-calls compiler option for big kernels" + default y if !MODULES || UBSAN || FTRACE + default n - def_bool y if !MODULES || UBSAN || FTRACE - bool "Enable the -mlong-calls compiler option for big kernels" if MODULES && !UBSAN && !FTRACE depends on PA8X00 help If you configure the kernel to include many drivers built-in instead reverted: --- linux-oem-5.10-5.10.0/arch/parisc/kernel/entry.S +++ linux-oem-5.10-5.10.0.orig/arch/parisc/kernel/entry.S @@ -997,17 +997,10 @@ bb,<,n %r20, 31 - PSW_SM_I, intr_restore nop - /* ssm PSW_SM_I done later in intr_restore */ -#ifdef CONFIG_MLONGCALLS - ldil L%intr_restore, %r2 - load32 preempt_schedule_irq, %r1 - bv %r0(%r1) - ldo R%intr_restore(%r2), %r2 -#else - ldil L%intr_restore, %r1 BL preempt_schedule_irq, %r2 + nop + + b,n intr_restore /* ssm PSW_SM_I done by intr_restore */ - ldo R%intr_restore(%r1), %r2 -#endif #endif /* CONFIG_PREEMPTION */ /* diff -u linux-oem-5.10-5.10.0/arch/powerpc/kernel/irq.c linux-oem-5.10-5.10.0/arch/powerpc/kernel/irq.c --- linux-oem-5.10-5.10.0/arch/powerpc/kernel/irq.c +++ linux-oem-5.10-5.10.0/arch/powerpc/kernel/irq.c @@ -180,18 +180,13 @@ void replay_soft_interrupts(void) { - struct pt_regs regs; - /* - * Be careful here, calling these interrupt handlers can cause - * softirqs to be raised, which they may run when calling irq_exit, - * which will cause local_irq_enable() to be run, which can then - * recurse into this function. Don't keep any state across - * interrupt handler calls which may change underneath us. - * - * We use local_paca rather than get_paca() to avoid all the - * debug_smp_processor_id() business in this low level function. + * We use local_paca rather than get_paca() to avoid all + * the debug_smp_processor_id() business in this low level + * function */ + unsigned char happened = local_paca->irq_happened; + struct pt_regs regs; ppc_save_regs(®s); regs.softe = IRQS_ENABLED; @@ -214,7 +209,7 @@ * This is a higher priority interrupt than the others, so * replay it first. */ - if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (local_paca->irq_happened & PACA_IRQ_HMI)) { + if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (happened & PACA_IRQ_HMI)) { local_paca->irq_happened &= ~PACA_IRQ_HMI; regs.trap = 0xe60; handle_hmi_exception(®s); @@ -222,7 +217,7 @@ hard_irq_disable(); } - if (local_paca->irq_happened & PACA_IRQ_DEC) { + if (happened & PACA_IRQ_DEC) { local_paca->irq_happened &= ~PACA_IRQ_DEC; regs.trap = 0x900; timer_interrupt(®s); @@ -230,7 +225,7 @@ hard_irq_disable(); } - if (local_paca->irq_happened & PACA_IRQ_EE) { + if (happened & PACA_IRQ_EE) { local_paca->irq_happened &= ~PACA_IRQ_EE; regs.trap = 0x500; do_IRQ(®s); @@ -238,7 +233,7 @@ hard_irq_disable(); } - if (IS_ENABLED(CONFIG_PPC_DOORBELL) && (local_paca->irq_happened & PACA_IRQ_DBELL)) { + if (IS_ENABLED(CONFIG_PPC_DOORBELL) && (happened & PACA_IRQ_DBELL)) { local_paca->irq_happened &= ~PACA_IRQ_DBELL; if (IS_ENABLED(CONFIG_PPC_BOOK3E)) regs.trap = 0x280; @@ -250,7 +245,7 @@ } /* Book3E does not support soft-masking PMI interrupts */ - if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (local_paca->irq_happened & PACA_IRQ_PMI)) { + if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (happened & PACA_IRQ_PMI)) { local_paca->irq_happened &= ~PACA_IRQ_PMI; regs.trap = 0xf00; performance_monitor_exception(®s); @@ -258,7 +253,8 @@ hard_irq_disable(); } - if (local_paca->irq_happened & ~PACA_IRQ_HARD_DIS) { + happened = local_paca->irq_happened; + if (happened & ~PACA_IRQ_HARD_DIS) { /* * We are responding to the next interrupt, so interrupt-off * latencies should be reset here. reverted: --- linux-oem-5.10-5.10.0/arch/powerpc/kernel/vdso.c +++ linux-oem-5.10-5.10.0.orig/arch/powerpc/kernel/vdso.c @@ -475,7 +475,7 @@ */ #ifdef CONFIG_PPC64 + vdso64_rt_sigtramp = find_function64(v64, "__kernel_sigtramp_rt64"); - vdso64_rt_sigtramp = find_function64(v64, "__kernel_start_sigtramp_rt64"); #endif vdso32_sigtramp = find_function32(v32, "__kernel_sigtramp32"); vdso32_rt_sigtramp = find_function32(v32, "__kernel_sigtramp_rt32"); reverted: --- linux-oem-5.10-5.10.0/arch/powerpc/kernel/vdso64/sigtramp.S +++ linux-oem-5.10-5.10.0.orig/arch/powerpc/kernel/vdso64/sigtramp.S @@ -15,20 +15,11 @@ .text -/* - * __kernel_start_sigtramp_rt64 and __kernel_sigtramp_rt64 together - * are one function split in two parts. The kernel jumps to the former - * and the signal handler indirectly (by blr) returns to the latter. - * __kernel_sigtramp_rt64 needs to point to the return address so - * glibc can correctly identify the trampoline stack frame. - */ .balign 8 .balign IFETCH_ALIGN_BYTES +V_FUNCTION_BEGIN(__kernel_sigtramp_rt64) -V_FUNCTION_BEGIN(__kernel_start_sigtramp_rt64) .Lsigrt_start: bctrl /* call the handler */ -V_FUNCTION_END(__kernel_start_sigtramp_rt64) -V_FUNCTION_BEGIN(__kernel_sigtramp_rt64) addi r1, r1, __SIGNAL_FRAMESIZE li r0,__NR_rt_sigreturn sc reverted: --- linux-oem-5.10-5.10.0/arch/powerpc/kernel/vdso64/vdso64.lds.S +++ linux-oem-5.10-5.10.0.orig/arch/powerpc/kernel/vdso64/vdso64.lds.S @@ -150,7 +150,6 @@ __kernel_get_tbfreq; __kernel_sync_dicache; __kernel_sync_dicache_p5; - __kernel_start_sigtramp_rt64; __kernel_sigtramp_rt64; __kernel_getcpu; __kernel_time; diff -u linux-oem-5.10-5.10.0/arch/riscv/Kconfig linux-oem-5.10-5.10.0/arch/riscv/Kconfig --- linux-oem-5.10-5.10.0/arch/riscv/Kconfig +++ linux-oem-5.10-5.10.0/arch/riscv/Kconfig @@ -252,10 +252,8 @@ default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY config MAXPHYSMEM_1GB - depends on 32BIT bool "1GiB" config MAXPHYSMEM_2GB - depends on 64BIT && CMODEL_MEDLOW bool "2GiB" config MAXPHYSMEM_128GB depends on 64BIT && CMODEL_MEDANY diff -u linux-oem-5.10-5.10.0/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts linux-oem-5.10-5.10.0/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts --- linux-oem-5.10-5.10.0/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts +++ linux-oem-5.10-5.10.0/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts @@ -90,6 +90,7 @@ phy0: ethernet-phy@0 { compatible = "ethernet-phy-id0007.0771"; reg = <0>; + reset-gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; reverted: --- linux-oem-5.10-5.10.0/arch/riscv/include/asm/page.h +++ linux-oem-5.10-5.10.0.orig/arch/riscv/include/asm/page.h @@ -135,10 +135,7 @@ #endif /* __ASSEMBLY__ */ +#define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr))) -#define virt_addr_valid(vaddr) ({ \ - unsigned long _addr = (unsigned long)vaddr; \ - (unsigned long)(_addr) >= PAGE_OFFSET && pfn_valid(virt_to_pfn(_addr)); \ -}) #define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC reverted: --- linux-oem-5.10-5.10.0/arch/s390/boot/uv.c +++ linux-oem-5.10-5.10.0.orig/arch/s390/boot/uv.c @@ -35,7 +35,7 @@ uv_info.guest_cpu_stor_len = uvcb.cpu_stor_len; uv_info.max_sec_stor_addr = ALIGN(uvcb.max_guest_stor_addr, PAGE_SIZE); uv_info.max_num_sec_conf = uvcb.max_num_sec_conf; + uv_info.max_guest_cpus = uvcb.max_guest_cpus; - uv_info.max_guest_cpu_id = uvcb.max_guest_cpu_id; } #ifdef CONFIG_PROTECTED_VIRTUALIZATION_GUEST reverted: --- linux-oem-5.10-5.10.0/arch/s390/include/asm/uv.h +++ linux-oem-5.10-5.10.0.orig/arch/s390/include/asm/uv.h @@ -96,7 +96,7 @@ u32 max_num_sec_conf; u64 max_guest_stor_addr; u8 reserved88[158 - 136]; + u16 max_guest_cpus; - u16 max_guest_cpu_id; u8 reserveda0[200 - 160]; } __packed __aligned(8); @@ -273,7 +273,7 @@ unsigned long guest_cpu_stor_len; unsigned long max_sec_stor_addr; unsigned int max_num_sec_conf; + unsigned short max_guest_cpus; - unsigned short max_guest_cpu_id; }; extern struct uv_info uv_info; reverted: --- linux-oem-5.10-5.10.0/arch/s390/kernel/uv.c +++ linux-oem-5.10-5.10.0.orig/arch/s390/kernel/uv.c @@ -368,7 +368,7 @@ struct kobj_attribute *attr, char *page) { return scnprintf(page, PAGE_SIZE, "%d\n", + uv_info.max_guest_cpus); - uv_info.max_guest_cpu_id + 1); } static struct kobj_attribute uv_query_max_guest_cpus_attr = reverted: --- linux-oem-5.10-5.10.0/arch/um/drivers/virtio_uml.c +++ linux-oem-5.10-5.10.0.orig/arch/um/drivers/virtio_uml.c @@ -1083,7 +1083,6 @@ } os_close_file(vu_dev->sock); - kfree(vu_dev); } /* Platform device */ @@ -1097,7 +1096,7 @@ if (!pdata) return -EINVAL; + vu_dev = devm_kzalloc(&pdev->dev, sizeof(*vu_dev), GFP_KERNEL); - vu_dev = kzalloc(sizeof(*vu_dev), GFP_KERNEL); if (!vu_dev) return -ENOMEM; reverted: --- linux-oem-5.10-5.10.0/arch/x86/Makefile +++ linux-oem-5.10-5.10.0.orig/arch/x86/Makefile @@ -57,9 +57,6 @@ KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow KBUILD_CFLAGS += $(call cc-option,-mno-avx,) -# Intel CET isn't enabled in the kernel -KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) - ifeq ($(CONFIG_X86_32),y) BITS := 32 UTS_MACHINE := i386 diff -u linux-oem-5.10-5.10.0/arch/x86/entry/thunk_64.S linux-oem-5.10-5.10.0/arch/x86/entry/thunk_64.S --- linux-oem-5.10-5.10.0/arch/x86/entry/thunk_64.S +++ linux-oem-5.10-5.10.0/arch/x86/entry/thunk_64.S @@ -31,7 +31,7 @@ .endif call \func - jmp __thunk_restore + jmp .L_restore SYM_FUNC_END(\name) _ASM_NOKPROBE(\name) .endm @@ -41,7 +41,7 @@ EXPORT_SYMBOL(preempt_schedule_thunk) EXPORT_SYMBOL(preempt_schedule_notrace_thunk) -SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) +SYM_CODE_START_LOCAL_NOALIGN(.L_restore) popq %r11 popq %r10 popq %r9 @@ -56,2 +56,2 @@ - _ASM_NOKPROBE(__thunk_restore) -SYM_CODE_END(__thunk_restore) + _ASM_NOKPROBE(.L_restore) +SYM_CODE_END(.L_restore) diff -u linux-oem-5.10-5.10.0/arch/x86/include/asm/apic.h linux-oem-5.10-5.10.0/arch/x86/include/asm/apic.h --- linux-oem-5.10-5.10.0/arch/x86/include/asm/apic.h +++ linux-oem-5.10-5.10.0/arch/x86/include/asm/apic.h @@ -197,6 +197,16 @@ #endif /* !CONFIG_X86_LOCAL_APIC */ #ifdef CONFIG_X86_X2APIC +/* + * Make previous memory operations globally visible before + * sending the IPI through x2apic wrmsr. We need a serializing instruction or + * mfence for this. + */ +static inline void x2apic_wrmsr_fence(void) +{ + asm volatile("mfence" : : : "memory"); +} + static inline void native_apic_msr_write(u32 reg, u32 v) { if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || reverted: --- linux-oem-5.10-5.10.0/arch/x86/include/asm/barrier.h +++ linux-oem-5.10-5.10.0.orig/arch/x86/include/asm/barrier.h @@ -84,22 +84,4 @@ #include -/* - * Make previous memory operations globally visible before - * a WRMSR. - * - * MFENCE makes writes visible, but only affects load/store - * instructions. WRMSR is unfortunately not a load/store - * instruction and is unaffected by MFENCE. The LFENCE ensures - * that the WRMSR is not reordered. - * - * Most WRMSRs are full serializing instructions themselves and - * do not require this barrier. This is only required for the - * IA32_TSC_DEADLINE and X2APIC MSRs. - */ -static inline void weak_wrmsr_fence(void) -{ - asm volatile("mfence; lfence" : : : "memory"); -} - #endif /* _ASM_X86_BARRIER_H */ reverted: --- linux-oem-5.10-5.10.0/arch/x86/include/asm/idtentry.h +++ linux-oem-5.10-5.10.0.orig/arch/x86/include/asm/idtentry.h @@ -616,7 +616,6 @@ #ifdef CONFIG_XEN_PV DECLARE_IDTENTRY_XENCB(X86_TRAP_OTHER, exc_xen_hypervisor_callback); -DECLARE_IDTENTRY_RAW(X86_TRAP_OTHER, exc_xen_unknown_trap); #endif /* Device interrupts common/spurious */ reverted: --- linux-oem-5.10-5.10.0/arch/x86/include/asm/intel-family.h +++ linux-oem-5.10-5.10.0.orig/arch/x86/include/asm/intel-family.h @@ -97,7 +97,6 @@ #define INTEL_FAM6_LAKEFIELD 0x8A #define INTEL_FAM6_ALDERLAKE 0x97 -#define INTEL_FAM6_ALDERLAKE_L 0x9A /* "Small Core" Processors (Atom) */ reverted: --- linux-oem-5.10-5.10.0/arch/x86/include/asm/msr.h +++ linux-oem-5.10-5.10.0.orig/arch/x86/include/asm/msr.h @@ -86,7 +86,7 @@ * think of extending them - you will be slapped with a stinking trout or a frozen * shark will reach you, wherever you are! You've been warned. */ +static inline unsigned long long notrace __rdmsr(unsigned int msr) -static __always_inline unsigned long long __rdmsr(unsigned int msr) { DECLARE_ARGS(val, low, high); @@ -98,7 +98,7 @@ return EAX_EDX_VAL(val, low, high); } +static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high) -static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) { asm volatile("1: wrmsr\n" "2:\n" diff -u linux-oem-5.10-5.10.0/arch/x86/kernel/apic/apic.c linux-oem-5.10-5.10.0/arch/x86/kernel/apic/apic.c --- linux-oem-5.10-5.10.0/arch/x86/kernel/apic/apic.c +++ linux-oem-5.10-5.10.0/arch/x86/kernel/apic/apic.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -473,9 +472,6 @@ { u64 tsc; - /* This MSR is special and need a special fence: */ - weak_wrmsr_fence(); - tsc = rdtsc(); wrmsrl(MSR_IA32_TSC_DEADLINE, tsc + (((u64) delta) * TSC_DIVISOR)); return 0; reverted: --- linux-oem-5.10-5.10.0/arch/x86/kernel/apic/x2apic_cluster.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kernel/apic/x2apic_cluster.c @@ -29,8 +29,7 @@ { u32 dest = per_cpu(x86_cpu_to_logical_apicid, cpu); + x2apic_wrmsr_fence(); - /* x2apic MSRs are special and need a special fence: */ - weak_wrmsr_fence(); __x2apic_send_IPI_dest(dest, vector, APIC_DEST_LOGICAL); } @@ -42,8 +41,7 @@ unsigned long flags; u32 dest; + x2apic_wrmsr_fence(); - /* x2apic MSRs are special and need a special fence: */ - weak_wrmsr_fence(); local_irq_save(flags); tmpmsk = this_cpu_cpumask_var_ptr(ipi_mask); diff -u linux-oem-5.10-5.10.0/arch/x86/kernel/apic/x2apic_phys.c linux-oem-5.10-5.10.0/arch/x86/kernel/apic/x2apic_phys.c --- linux-oem-5.10-5.10.0/arch/x86/kernel/apic/x2apic_phys.c +++ linux-oem-5.10-5.10.0/arch/x86/kernel/apic/x2apic_phys.c @@ -43,8 +43,7 @@ { u32 dest = per_cpu(x86_cpu_to_apicid, cpu); - /* x2apic MSRs are special and need a special fence: */ - weak_wrmsr_fence(); + x2apic_wrmsr_fence(); __x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL); } @@ -55,8 +54,7 @@ unsigned long this_cpu; unsigned long flags; - /* x2apic MSRs are special and need a special fence: */ - weak_wrmsr_fence(); + x2apic_wrmsr_fence(); local_irq_save(flags); @@ -127,8 +125,7 @@ { unsigned long cfg = __prepare_ICR(which, vector, 0); - /* x2apic MSRs are special and need a special fence: */ - weak_wrmsr_fence(); + x2apic_wrmsr_fence(); native_x2apic_icr_write(cfg, 0); } reverted: --- linux-oem-5.10-5.10.0/arch/x86/kernel/cpu/intel.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kernel/cpu/intel.c @@ -1159,7 +1159,6 @@ X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, 1), X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, 1), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, 1), - X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, 1), {} }; reverted: --- linux-oem-5.10-5.10.0/arch/x86/kernel/hw_breakpoint.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kernel/hw_breakpoint.c @@ -269,20 +269,6 @@ CPU_ENTRY_AREA_TOTAL_SIZE)) return true; - /* - * When FSGSBASE is enabled, paranoid_entry() fetches the per-CPU - * GSBASE value via __per_cpu_offset or pcpu_unit_offsets. - */ -#ifdef CONFIG_SMP - if (within_area(addr, end, (unsigned long)__per_cpu_offset, - sizeof(unsigned long) * nr_cpu_ids)) - return true; -#else - if (within_area(addr, end, (unsigned long)&pcpu_unit_offsets, - sizeof(pcpu_unit_offsets))) - return true; -#endif - for_each_possible_cpu(cpu) { /* The original rw GDT is being used after load_direct_gdt() */ if (within_area(addr, end, (unsigned long)get_cpu_gdt_rw(cpu), @@ -307,14 +293,6 @@ (unsigned long)&per_cpu(cpu_tlbstate, cpu), sizeof(struct tlb_state))) return true; - - /* - * When in guest (X86_FEATURE_HYPERVISOR), local_db_save() - * will read per-cpu cpu_dr7 before clear dr7 register. - */ - if (within_area(addr, end, (unsigned long)&per_cpu(cpu_dr7, cpu), - sizeof(cpu_dr7))) - return true; } return false; @@ -513,12 +491,15 @@ struct perf_event *bp; unsigned long *dr6_p; unsigned long dr6; - bool bpx; /* The DR6 value is pointed by args->err */ dr6_p = (unsigned long *)ERR_PTR(args->err); dr6 = *dr6_p; + /* If it's a single step, TRAP bits are random */ + if (dr6 & DR_STEP) + return NOTIFY_DONE; + /* Do an early return if no trap bits are set in DR6 */ if ((dr6 & DR_TRAP_BITS) == 0) return NOTIFY_DONE; @@ -528,29 +509,28 @@ if (likely(!(dr6 & (DR_TRAP0 << i)))) continue; - bp = this_cpu_read(bp_per_reg[i]); - if (!bp) - continue; - - bpx = bp->hw.info.type == X86_BREAKPOINT_EXECUTE; - /* + * The counter may be concurrently released but that can only + * occur from a call_rcu() path. We can then safely fetch + * the breakpoint, use its callback, touch its counter + * while we are in an rcu_read_lock() path. - * TF and data breakpoints are traps and can be merged, however - * instruction breakpoints are faults and will be raised - * separately. - * - * However DR6 can indicate both TF and instruction - * breakpoints. In that case take TF as that has precedence and - * delay the instruction breakpoint for the next exception. */ + rcu_read_lock(); - if (bpx && (dr6 & DR_STEP)) - continue; + bp = this_cpu_read(bp_per_reg[i]); /* * Reset the 'i'th TRAP bit in dr6 to denote completion of * exception handling */ (*dr6_p) &= ~(DR_TRAP0 << i); + /* + * bp can be NULL due to lazy debug register switching + * or due to concurrent perf counter removing. + */ + if (!bp) { + rcu_read_unlock(); + break; + } perf_bp_event(bp, args->regs); @@ -558,10 +538,11 @@ * Set up resume flag to avoid breakpoint recursion when * returning back to origin. */ + if (bp->hw.info.type == X86_BREAKPOINT_EXECUTE) - if (bpx) args->regs->flags |= X86_EFLAGS_RF; + + rcu_read_unlock(); } - /* * Further processing in do_debug() is needed for a) user-space * breakpoints (to generate signals) and b) when the system has diff -u linux-oem-5.10-5.10.0/arch/x86/kernel/setup.c linux-oem-5.10-5.10.0/arch/x86/kernel/setup.c --- linux-oem-5.10-5.10.0/arch/x86/kernel/setup.c +++ linux-oem-5.10-5.10.0/arch/x86/kernel/setup.c @@ -667,17 +667,6 @@ static void __init trim_bios_range(void) { /* - * A special case is the first 4Kb of memory; - * This is a BIOS owned area, not kernel ram, but generally - * not listed as such in the E820 table. - * - * This typically reserves additional memory (64KiB by default) - * since some BIOSes are known to corrupt low memory. See the - * Kconfig help text for X86_RESERVE_LOW. - */ - e820__range_update(0, PAGE_SIZE, E820_TYPE_RAM, E820_TYPE_RESERVED); - - /* * special case: Some BIOSes report the PC BIOS * area (640Kb -> 1Mb) as RAM even though it is not. * take them out. @@ -734,6 +723,15 @@ static void __init trim_low_memory_range(void) { + /* + * A special case is the first 4Kb of memory; + * This is a BIOS owned area, not kernel ram, but generally + * not listed as such in the E820 table. + * + * This typically reserves additional memory (64KiB by default) + * since some BIOSes are known to corrupt low memory. See the + * Kconfig help text for X86_RESERVE_LOW. + */ memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE)); } reverted: --- linux-oem-5.10-5.10.0/arch/x86/kernel/smpboot.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kernel/smpboot.c @@ -1829,7 +1829,6 @@ arch_max_freq_ratio = turbo_disabled ? SCHED_CAPACITY_SCALE : arch_turbo_freq_ratio; } -EXPORT_SYMBOL_GPL(arch_set_max_freq_ratio); static bool turbo_disabled(void) { reverted: --- linux-oem-5.10-5.10.0/arch/x86/kvm/cpuid.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kvm/cpuid.c @@ -320,7 +320,7 @@ if (cpuid->nent < vcpu->arch.cpuid_nent) goto out; r = -EFAULT; + if (copy_to_user(entries, &vcpu->arch.cpuid_entries, - if (copy_to_user(entries, vcpu->arch.cpuid_entries, vcpu->arch.cpuid_nent * sizeof(struct kvm_cpuid_entry2))) goto out; return 0; reverted: --- linux-oem-5.10-5.10.0/arch/x86/kvm/emulate.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kvm/emulate.c @@ -2879,8 +2879,6 @@ ops->get_msr(ctxt, MSR_IA32_SYSENTER_ESP, &msr_data); *reg_write(ctxt, VCPU_REGS_RSP) = (efer & EFER_LMA) ? msr_data : (u32)msr_data; - if (efer & EFER_LMA) - ctxt->mode = X86EMUL_MODE_PROT64; return X86EMUL_CONTINUE; } diff -u linux-oem-5.10-5.10.0/arch/x86/kvm/mmu/tdp_mmu.c linux-oem-5.10-5.10.0/arch/x86/kvm/mmu/tdp_mmu.c --- linux-oem-5.10-5.10.0/arch/x86/kvm/mmu/tdp_mmu.c +++ linux-oem-5.10-5.10.0/arch/x86/kvm/mmu/tdp_mmu.c @@ -1037,8 +1037,8 @@ } /* - * Clear leaf entries which could be replaced by large mappings, for - * GFNs within the slot. + * Clear non-leaf entries (and free associated page tables) which could + * be replaced by large mappings, for GFNs within the slot. */ static void zap_collapsible_spte_range(struct kvm *kvm, struct kvm_mmu_page *root, @@ -1050,7 +1050,7 @@ tdp_root_for_each_pte(iter, root, start, end) { if (!is_shadow_present_pte(iter.old_spte) || - !is_last_spte(iter.old_spte, iter.level)) + is_last_spte(iter.old_spte, iter.level)) continue; pfn = spte_to_pfn(iter.old_spte); reverted: --- linux-oem-5.10-5.10.0/arch/x86/kvm/svm/nested.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kvm/svm/nested.c @@ -199,10 +199,6 @@ static bool svm_get_nested_state_pages(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); - - if (WARN_ON(!is_guest_mode(vcpu))) - return true; - if (!nested_svm_vmrun_msrpm(svm)) { vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR; vcpu->run->internal.suberror = @@ -231,7 +227,6 @@ static bool nested_vmcb_checks(struct vcpu_svm *svm, struct vmcb *vmcb12) { - struct kvm_vcpu *vcpu = &svm->vcpu; bool vmcb12_lma; if ((vmcb12->save.efer & EFER_SVME) == 0) @@ -245,10 +240,18 @@ vmcb12_lma = (vmcb12->save.efer & EFER_LME) && (vmcb12->save.cr0 & X86_CR0_PG); + if (!vmcb12_lma) { + if (vmcb12->save.cr4 & X86_CR4_PAE) { + if (vmcb12->save.cr3 & MSR_CR3_LEGACY_PAE_RESERVED_MASK) + return false; + } else { + if (vmcb12->save.cr3 & MSR_CR3_LEGACY_RESERVED_MASK) + return false; + } + } else { - if (vmcb12_lma) { if (!(vmcb12->save.cr4 & X86_CR4_PAE) || !(vmcb12->save.cr0 & X86_CR0_PE) || + (vmcb12->save.cr3 & MSR_CR3_LONG_MBZ_MASK)) - (vmcb12->save.cr3 & vcpu->arch.cr3_lm_rsvd_bits)) return false; } if (kvm_valid_cr4(&svm->vcpu, vmcb12->save.cr4)) @@ -592,8 +595,6 @@ svm->nested.vmcb12_gpa = 0; WARN_ON_ONCE(svm->nested.nested_run_pending); - kvm_clear_request(KVM_REQ_GET_NESTED_STATE_PAGES, &svm->vcpu); - /* in case we halted in L2 */ svm->vcpu.arch.mp_state = KVM_MP_STATE_RUNNABLE; diff -u linux-oem-5.10-5.10.0/arch/x86/kvm/svm/sev.c linux-oem-5.10-5.10.0/arch/x86/kvm/svm/sev.c --- linux-oem-5.10-5.10.0/arch/x86/kvm/svm/sev.c +++ linux-oem-5.10-5.10.0/arch/x86/kvm/svm/sev.c @@ -320,8 +320,6 @@ unsigned long first, last; int ret; - lockdep_assert_held(&kvm->lock); - if (ulen == 0 || uaddr + ulen < uaddr) return ERR_PTR(-EINVAL); @@ -1003,20 +1001,12 @@ if (!region) return -ENOMEM; - mutex_lock(&kvm->lock); region->pages = sev_pin_memory(kvm, range->addr, range->size, ®ion->npages, 1); if (IS_ERR(region->pages)) { ret = PTR_ERR(region->pages); - mutex_unlock(&kvm->lock); goto e_free; } - region->uaddr = range->addr; - region->size = range->size; - - list_add_tail(®ion->list, &sev->regions_list); - mutex_unlock(&kvm->lock); - /* * The guest may change the memory encryption attribute from C=0 -> C=1 * or vice versa for this memory range. Lets make sure caches are @@ -1025,6 +1015,13 @@ */ sev_clflush_pages(region->pages, region->npages); + region->uaddr = range->addr; + region->size = range->size; + + mutex_lock(&kvm->lock); + list_add_tail(®ion->list, &sev->regions_list); + mutex_unlock(&kvm->lock); + return ret; e_free: diff -u linux-oem-5.10-5.10.0/arch/x86/kvm/svm/svm.c linux-oem-5.10-5.10.0/arch/x86/kvm/svm/svm.c --- linux-oem-5.10-5.10.0/arch/x86/kvm/svm/svm.c +++ linux-oem-5.10-5.10.0/arch/x86/kvm/svm/svm.c @@ -438,11 +438,6 @@ return 0; } - if (sev_active()) { - pr_info("KVM is unsupported when running as an SEV guest\n"); - return 0; - } - return 1; } reverted: --- linux-oem-5.10-5.10.0/arch/x86/kvm/svm/svm.h +++ linux-oem-5.10-5.10.0.orig/arch/x86/kvm/svm/svm.h @@ -346,6 +346,9 @@ } /* svm.c */ +#define MSR_CR3_LEGACY_RESERVED_MASK 0xfe7U +#define MSR_CR3_LEGACY_PAE_RESERVED_MASK 0x7U +#define MSR_CR3_LONG_MBZ_MASK 0xfff0000000000000U #define MSR_INVALID 0xffffffffU u32 svm_msrpm_offset(u32 msr); reverted: --- linux-oem-5.10-5.10.0/arch/x86/kvm/vmx/nested.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kvm/vmx/nested.c @@ -3123,9 +3123,13 @@ return 0; } +static bool nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) -static bool nested_get_evmcs_page(struct kvm_vcpu *vcpu) { + struct vmcs12 *vmcs12 = get_vmcs12(vcpu); struct vcpu_vmx *vmx = to_vmx(vcpu); + struct kvm_host_map *map; + struct page *page; + u64 hpa; /* * hv_evmcs may end up being not mapped after migration (when @@ -3148,17 +3152,6 @@ } } - return true; -} - -static bool nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) -{ - struct vmcs12 *vmcs12 = get_vmcs12(vcpu); - struct vcpu_vmx *vmx = to_vmx(vcpu); - struct kvm_host_map *map; - struct page *page; - u64 hpa; - if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) { /* * Translate L1 physical address to host physical @@ -3227,18 +3220,6 @@ exec_controls_setbit(vmx, CPU_BASED_USE_MSR_BITMAPS); else exec_controls_clearbit(vmx, CPU_BASED_USE_MSR_BITMAPS); - - return true; -} - -static bool vmx_get_nested_state_pages(struct kvm_vcpu *vcpu) -{ - if (!nested_get_evmcs_page(vcpu)) - return false; - - if (is_guest_mode(vcpu) && !nested_get_vmcs12_pages(vcpu)) - return false; - return true; } @@ -4435,8 +4416,6 @@ /* trying to cancel vmlaunch/vmresume is a bug */ WARN_ON_ONCE(vmx->nested.nested_run_pending); - kvm_clear_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu); - /* Service the TLB flush request for L2 before switching to L1. */ if (kvm_check_request(KVM_REQ_TLB_FLUSH_CURRENT, vcpu)) kvm_vcpu_flush_tlb_current(vcpu); @@ -6070,14 +6049,11 @@ if (is_guest_mode(vcpu)) { sync_vmcs02_to_vmcs12(vcpu, vmcs12); sync_vmcs02_to_vmcs12_rare(vcpu, vmcs12); + } else if (!vmx->nested.need_vmcs12_to_shadow_sync) { + if (vmx->nested.hv_evmcs) + copy_enlightened_to_vmcs12(vmx); + else if (enable_shadow_vmcs) + copy_shadow_to_vmcs12(vmx); - } else { - copy_vmcs02_to_vmcs12_rare(vcpu, get_vmcs12(vcpu)); - if (!vmx->nested.need_vmcs12_to_shadow_sync) { - if (vmx->nested.hv_evmcs) - copy_enlightened_to_vmcs12(vmx); - else if (enable_shadow_vmcs) - copy_shadow_to_vmcs12(vmx); - } } BUILD_BUG_ON(sizeof(user_vmx_nested_state->vmcs12) < VMCS12_SIZE); @@ -6597,7 +6573,7 @@ .hv_timer_pending = nested_vmx_preemption_timer_pending, .get_state = vmx_get_nested_state, .set_state = vmx_set_nested_state, + .get_nested_state_pages = nested_get_vmcs12_pages, - .get_nested_state_pages = vmx_get_nested_state_pages, .write_log_dirty = nested_vmx_write_pml_buffer, .enable_evmcs = nested_enable_evmcs, .get_evmcs_version = nested_get_evmcs_version, reverted: --- linux-oem-5.10-5.10.0/arch/x86/kvm/vmx/pmu_intel.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/kvm/vmx/pmu_intel.c @@ -29,7 +29,7 @@ [4] = { 0x2e, 0x41, PERF_COUNT_HW_CACHE_MISSES }, [5] = { 0xc4, 0x00, PERF_COUNT_HW_BRANCH_INSTRUCTIONS }, [6] = { 0xc5, 0x00, PERF_COUNT_HW_BRANCH_MISSES }, + [7] = { 0x00, 0x30, PERF_COUNT_HW_REF_CPU_CYCLES }, - [7] = { 0x00, 0x03, PERF_COUNT_HW_REF_CPU_CYCLES }, }; /* mapping between fixed pmc index and intel_arch_events array */ @@ -345,9 +345,7 @@ pmu->nr_arch_gp_counters = min_t(int, eax.split.num_counters, x86_pmu.num_counters_gp); - eax.split.bit_width = min_t(int, eax.split.bit_width, x86_pmu.bit_width_gp); pmu->counter_bitmask[KVM_PMC_GP] = ((u64)1 << eax.split.bit_width) - 1; - eax.split.mask_length = min_t(int, eax.split.mask_length, x86_pmu.events_mask_len); pmu->available_event_types = ~entry->ebx & ((1ull << eax.split.mask_length) - 1); @@ -357,8 +355,6 @@ pmu->nr_arch_fixed_counters = min_t(int, edx.split.num_counters_fixed, x86_pmu.num_counters_fixed); - edx.split.bit_width_fixed = min_t(int, - edx.split.bit_width_fixed, x86_pmu.bit_width_fixed); pmu->counter_bitmask[KVM_PMC_FIXED] = ((u64)1 << edx.split.bit_width_fixed) - 1; } diff -u linux-oem-5.10-5.10.0/arch/x86/kvm/vmx/vmx.c linux-oem-5.10-5.10.0/arch/x86/kvm/vmx/vmx.c --- linux-oem-5.10-5.10.0/arch/x86/kvm/vmx/vmx.c +++ linux-oem-5.10-5.10.0/arch/x86/kvm/vmx/vmx.c @@ -6874,20 +6874,11 @@ switch (index) { case MSR_IA32_TSX_CTRL: /* - * TSX_CTRL_CPUID_CLEAR is handled in the CPUID - * interception. Keep the host value unchanged to avoid - * changing CPUID bits under the host kernel's feet. - * - * hle=0, rtm=0, tsx_ctrl=1 can be found with some - * combinations of new kernel and old userspace. If - * those guests run on a tsx=off host, do allow guests - * to use TSX_CTRL, but do not change the value on the - * host so that TSX remains always disabled. + * No need to pass TSX_CTRL_CPUID_CLEAR through, so + * let's avoid changing CPUID bits under the host + * kernel's feet. */ - if (boot_cpu_has(X86_FEATURE_RTM)) - vmx->guest_uret_msrs[j].mask = ~(u64)TSX_CTRL_CPUID_CLEAR; - else - vmx->guest_uret_msrs[j].mask = 0; + vmx->guest_uret_msrs[j].mask = ~(u64)TSX_CTRL_CPUID_CLEAR; break; default: vmx->guest_uret_msrs[j].mask = -1ull; diff -u linux-oem-5.10-5.10.0/arch/x86/kvm/x86.c linux-oem-5.10-5.10.0/arch/x86/kvm/x86.c --- linux-oem-5.10-5.10.0/arch/x86/kvm/x86.c +++ linux-oem-5.10-5.10.0/arch/x86/kvm/x86.c @@ -105,7 +105,6 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu); static void process_nmi(struct kvm_vcpu *vcpu); -static void process_smi(struct kvm_vcpu *vcpu); static void enter_smm(struct kvm_vcpu *vcpu); static void __kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags); static void store_regs(struct kvm_vcpu *vcpu); @@ -1376,24 +1375,16 @@ if (!boot_cpu_has_bug(X86_BUG_MDS)) data |= ARCH_CAP_MDS_NO; - if (!boot_cpu_has(X86_FEATURE_RTM)) { - /* - * If RTM=0 because the kernel has disabled TSX, the host might - * have TAA_NO or TSX_CTRL. Clear TAA_NO (the guest sees RTM=0 - * and therefore knows that there cannot be TAA) but keep - * TSX_CTRL: some buggy userspaces leave it set on tsx=on hosts, - * and we want to allow migrating those guests to tsx=off hosts. - */ - data &= ~ARCH_CAP_TAA_NO; - } else if (!boot_cpu_has_bug(X86_BUG_TAA)) { + /* + * On TAA affected systems: + * - nothing to do if TSX is disabled on the host. + * - we emulate TSX_CTRL if present on the host. + * This lets the guest use VERW to clear CPU buffers. + */ + if (!boot_cpu_has(X86_FEATURE_RTM)) + data &= ~(ARCH_CAP_TAA_NO | ARCH_CAP_TSX_CTRL_MSR); + else if (!boot_cpu_has_bug(X86_BUG_TAA)) data |= ARCH_CAP_TAA_NO; - } else { - /* - * Nothing to do here; we emulate TSX_CTRL if present on the - * host so the guest can choose between disabling TSX or - * using VERW to clear CPU buffers. - */ - } return data; } @@ -4208,9 +4199,6 @@ { process_nmi(vcpu); - if (kvm_check_request(KVM_REQ_SMI, vcpu)) - process_smi(vcpu); - /* * In guest mode, payload delivery should be deferred, * so that the L1 hypervisor can intercept #PF before @@ -9558,8 +9546,6 @@ if (!(sregs->cr4 & X86_CR4_PAE) || !(sregs->efer & EFER_LMA)) return -EINVAL; - if (sregs->cr3 & vcpu->arch.cr3_lm_rsvd_bits) - return -EINVAL; } else { /* * Not in 64-bit mode: EFER.LMA is clear and the code @@ -9917,7 +9903,6 @@ fx_init(vcpu); vcpu->arch.maxphyaddr = cpuid_query_maxphyaddr(vcpu); - vcpu->arch.cr3_lm_rsvd_bits = rsvd_bits(cpuid_maxphyaddr(vcpu), 63); vcpu->arch.pat = MSR_IA32_CR_PAT_DEFAULT; reverted: --- linux-oem-5.10-5.10.0/arch/x86/mm/mem_encrypt.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/mm/mem_encrypt.c @@ -351,7 +351,6 @@ { return sev_status & MSR_AMD64_SEV_ENABLED; } -EXPORT_SYMBOL_GPL(sev_active); /* Needs to be called from non-instrumentable code */ bool noinstr sev_es_active(void) reverted: --- linux-oem-5.10-5.10.0/arch/x86/pci/init.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/pci/init.c @@ -9,23 +9,16 @@ in the right sequence from here. */ static __init int pci_arch_init(void) { + int type; + + x86_create_pci_msi_domain(); - int type, pcbios = 1; type = pci_direct_probe(); if (!(pci_probe & PCI_PROBE_NOEARLY)) pci_mmcfg_early_init(); + if (x86_init.pci.arch_init && !x86_init.pci.arch_init()) - if (x86_init.pci.arch_init) - pcbios = x86_init.pci.arch_init(); - - /* - * Must happen after x86_init.pci.arch_init(). Xen sets up the - * x86_init.irqs.create_pci_msi_domain there. - */ - x86_create_pci_msi_domain(); - - if (!pcbios) return 0; pci_pcbios_init(); reverted: --- linux-oem-5.10-5.10.0/arch/x86/platform/efi/efi_64.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/platform/efi/efi_64.c @@ -115,12 +115,31 @@ pud_t *pud_k, *pud_efi; pgd_t *efi_pgd = efi_mm.pgd; + /* + * We can share all PGD entries apart from the one entry that + * covers the EFI runtime mapping space. + * + * Make sure the EFI runtime region mappings are guaranteed to + * only span a single PGD entry and that the entry also maps + * other important kernel regions. + */ + MAYBE_BUILD_BUG_ON(pgd_index(EFI_VA_END) != pgd_index(MODULES_END)); + MAYBE_BUILD_BUG_ON((EFI_VA_START & PGDIR_MASK) != + (EFI_VA_END & PGDIR_MASK)); + pgd_efi = efi_pgd + pgd_index(PAGE_OFFSET); pgd_k = pgd_offset_k(PAGE_OFFSET); num_entries = pgd_index(EFI_VA_END) - pgd_index(PAGE_OFFSET); memcpy(pgd_efi, pgd_k, sizeof(pgd_t) * num_entries); + /* + * As with PGDs, we share all P4D entries apart from the one entry + * that covers the EFI runtime mapping space. + */ + BUILD_BUG_ON(p4d_index(EFI_VA_END) != p4d_index(MODULES_END)); + BUILD_BUG_ON((EFI_VA_START & P4D_MASK) != (EFI_VA_END & P4D_MASK)); + pgd_efi = efi_pgd + pgd_index(EFI_VA_END); pgd_k = pgd_offset_k(EFI_VA_END); p4d_efi = p4d_offset(pgd_efi, 0); reverted: --- linux-oem-5.10-5.10.0/arch/x86/xen/enlighten_pv.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/xen/enlighten_pv.c @@ -583,13 +583,6 @@ exc_debug(regs); } -DEFINE_IDTENTRY_RAW(exc_xen_unknown_trap) -{ - /* This should never happen and there is no way to handle it. */ - pr_err("Unknown trap in Xen PV mode."); - BUG(); -} - struct trap_array_entry { void (*orig)(void); void (*xen)(void); @@ -638,7 +631,6 @@ { unsigned int nr; bool ist_okay = false; - bool found = false; /* * Replace trap handler addresses by Xen specific ones. @@ -653,7 +645,6 @@ if (*addr == entry->orig) { *addr = entry->xen; ist_okay = entry->ist_okay; - found = true; break; } } @@ -664,13 +655,9 @@ nr = (*addr - (void *)early_idt_handler_array[0]) / EARLY_IDT_HANDLER_SIZE; *addr = (void *)xen_early_idt_handler_array[nr]; - found = true; } + if (WARN_ON(ist != 0 && !ist_okay)) - if (!found) - *addr = (void *)xen_asm_exc_xen_unknown_trap; - - if (WARN_ON(found && ist != 0 && !ist_okay)) return false; return true; reverted: --- linux-oem-5.10-5.10.0/arch/x86/xen/p2m.c +++ linux-oem-5.10-5.10.0.orig/arch/x86/xen/p2m.c @@ -712,8 +712,7 @@ unsigned long mfn, pfn; /* Do not add to override if the map failed. */ + if (map_ops[i].status) - if (map_ops[i].status != GNTST_okay || - (kmap_ops && kmap_ops[i].status != GNTST_okay)) continue; if (map_ops[i].flags & GNTMAP_contains_pte) { @@ -751,15 +750,17 @@ unsigned long mfn = __pfn_to_mfn(page_to_pfn(pages[i])); unsigned long pfn = page_to_pfn(pages[i]); + if (mfn == INVALID_P2M_ENTRY || !(mfn & FOREIGN_FRAME_BIT)) { - if (mfn != INVALID_P2M_ENTRY && (mfn & FOREIGN_FRAME_BIT)) - set_phys_to_machine(pfn, INVALID_P2M_ENTRY); - else ret = -EINVAL; + goto out; + } + + set_phys_to_machine(pfn, INVALID_P2M_ENTRY); } if (kunmap_ops) ret = HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, + kunmap_ops, count); +out: - kunmap_ops, count) ?: ret; - return ret; } EXPORT_SYMBOL_GPL(clear_foreign_p2m_mapping); reverted: --- linux-oem-5.10-5.10.0/arch/x86/xen/xen-asm.S +++ linux-oem-5.10-5.10.0.orig/arch/x86/xen/xen-asm.S @@ -178,7 +178,6 @@ #ifdef CONFIG_IA32_EMULATION xen_pv_trap entry_INT80_compat #endif -xen_pv_trap asm_exc_xen_unknown_trap xen_pv_trap asm_exc_xen_hypervisor_callback __INIT reverted: --- linux-oem-5.10-5.10.0/block/blk-cgroup.c +++ linux-oem-5.10-5.10.0.orig/block/blk-cgroup.c @@ -1017,8 +1017,6 @@ */ void blkcg_destroy_blkgs(struct blkcg *blkcg) { - might_sleep(); - spin_lock_irq(&blkcg->lock); while (!hlist_empty(&blkcg->blkg_list)) { @@ -1026,20 +1024,14 @@ struct blkcg_gq, blkcg_node); struct request_queue *q = blkg->q; + if (spin_trylock(&q->queue_lock)) { + blkg_destroy(blkg); + spin_unlock(&q->queue_lock); + } else { - if (need_resched() || !spin_trylock(&q->queue_lock)) { - /* - * Given that the system can accumulate a huge number - * of blkgs in pathological cases, check to see if we - * need to rescheduling to avoid softlockup. - */ spin_unlock_irq(&blkcg->lock); + cpu_relax(); - cond_resched(); spin_lock_irq(&blkcg->lock); - continue; } - - blkg_destroy(blkg); - spin_unlock(&q->queue_lock); } spin_unlock_irq(&blkcg->lock); reverted: --- linux-oem-5.10-5.10.0/block/blk-mq.h +++ linux-oem-5.10-5.10.0.orig/block/blk-mq.h @@ -303,7 +303,7 @@ struct request_queue *q = hctx->queue; struct blk_mq_tag_set *set = q->tag_set; + if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &q->queue_flags)) - if (!test_bit(QUEUE_FLAG_HCTX_ACTIVE, &q->queue_flags)) return true; users = atomic_read(&set->active_queues_shared_sbitmap); } else { diff -u linux-oem-5.10-5.10.0/debian.master/config/annotations linux-oem-5.10-5.10.0/debian.master/config/annotations --- linux-oem-5.10-5.10.0/debian.master/config/annotations +++ linux-oem-5.10-5.10.0/debian.master/config/annotations @@ -358,7 +358,7 @@ # Menu: Cryptographic API >> Certificates for signature checking >> Provide system-wide ring of trusted keys CONFIG_SYSTEM_TRUSTED_KEYRING policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> -CONFIG_SYSTEM_TRUSTED_KEYS policy<{'amd64': '"debian/canonical-certs.pem"', 'arm64': '"debian/canonical-certs.pem"', 'armhf': '"debian/canonical-certs.pem"', 'ppc64el': '"debian/canonical-certs.pem"', 's390x': '"debian/canonical-certs.pem"'}> +CONFIG_SYSTEM_TRUSTED_KEYS policy<{'amd64': '""', 'arm64': '""', 'armhf': '""', 'ppc64el': '""', 's390x': '""'}> CONFIG_SYSTEM_EXTRA_CERTIFICATE policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE policy<{'amd64': '4096', 'arm64': '4096', 'armhf': '4096', 'ppc64el': '4096', 's390x': '4096'}> CONFIG_SECONDARY_TRUSTED_KEYRING policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> @@ -10143,13 +10143,11 @@ CONFIG_MODULE_FORCE_LOAD policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_MODULE_UNLOAD policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_MODULE_FORCE_UNLOAD policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> -CONFIG_MODVERSIONS policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> +CONFIG_MODVERSIONS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_MODULE_SRCVERSION_ALL policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_MODULE_COMPRESS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_UNUSED_SYMBOLS policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> -# -CONFIG_MODVERSIONS mark note # Menu: Enable loadable module support >> Compression algorithm diff -u linux-oem-5.10-5.10.0/debian.master/config/config.common.ubuntu linux-oem-5.10-5.10.0/debian.master/config/config.common.ubuntu --- linux-oem-5.10-5.10.0/debian.master/config/config.common.ubuntu +++ linux-oem-5.10-5.10.0/debian.master/config/config.common.ubuntu @@ -6112,7 +6112,7 @@ CONFIG_MODULE_SIG_SHA512=y CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y +# CONFIG_MODVERSIONS is not set CONFIG_MONREADER=m CONFIG_MONWRITER=m CONFIG_MOST_CDEV=m @@ -10403,7 +10403,7 @@ CONFIG_SYSTEM_EXTRA_CERTIFICATE=y CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096 CONFIG_SYSTEM_TRUSTED_KEYRING=y -CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem" +CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SYSVIPC=y CONFIG_SYSVIPC_COMPAT=y CONFIG_SYSVIPC_SYSCTL=y diff -u linux-oem-5.10-5.10.0/debian.oem/changelog linux-oem-5.10-5.10.0/debian.oem/changelog --- linux-oem-5.10-5.10.0/debian.oem/changelog +++ linux-oem-5.10-5.10.0/debian.oem/changelog @@ -1,601 +1,11 @@ -linux-oem-5.10 (5.10.0-1015.16) focal; urgency=medium +linux-oem-5.10 (5.10.0-1016.17) focal; urgency=medium - * focal/linux-oem-5.10: 5.10.0-1015.16 -proposed tracker (LP: #1916170) + * focal/linux-oem-5.10: 5.10.0-1016.17 -proposed tracker (LP: #1917307) - * Please trust Canonical Livepatch Service kmod signing key (LP: #1898716) - - [Config] enable CONFIG_MODVERSIONS=y - - [Packaging] build canonical-certs.pem from branch/arch certs - - [Config] add Canonical Livepatch Service key to SYSTEM_TRUSTED_KEYS - - [Config] add ubuntu-drivers key to SYSTEM_TRUSTED_KEYS + * CVE-2021-26708 + - vsock: fix the race conditions in multi-transport support - * Packaging resync (LP: #1786013) - - [Packaging] update update.conf - - * Missing device id for Intel TGL-H ISH [8086:43fc] in intel-ish-hid driver - (LP: #1914543) - - SAUCE: HID: intel-ish-hid: ipc: Add Tiger Lake H PCI device ID - - * Fix broken efifb on graphics device without driver (LP: #1914411) - - SAUCE: efifb: Ensure graphics device for efifb stays at PCI D0 - - * Focal update: v5.10.18 upstream stable release (LP: #1917004) - - vdpa_sim: remove hard-coded virtq count - - vdpa_sim: add struct vdpasim_dev_attr for device attributes - - vdpa_sim: store parsed MAC address in a buffer - - vdpa_sim: make 'config' generic and usable for any device type - - vdpa_sim: add get_config callback in vdpasim_dev_attr - - IB/isert: add module param to set sg_tablesize for IO cmd - - net: qrtr: Fix port ID for control messages - - mptcp: skip to next candidate if subflow has unacked data - - net/sched: fix miss init the mru in qdisc_skb_cb - - mt76: mt7915: fix endian issues - - mt76: mt7615: fix rdd mcu cmd endianness - - net: sched: incorrect Kconfig dependencies on Netfilter modules - - net: openvswitch: fix TTL decrement exception action execution - - net: bridge: Fix a warning when del bridge sysfs - - net: fix proc_fs init handling in af_packet and tls - - Xen/x86: don't bail early from clear_foreign_p2m_mapping() - - Xen/x86: also check kernel mapping in set_foreign_p2m_mapping() - - Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages() - - Xen/gntdev: correct error checking in gntdev_map_grant_pages() - - xen/arm: don't ignore return errors from set_phys_to_machine - - xen-blkback: don't "handle" error by BUG() - - xen-netback: don't "handle" error by BUG() - - xen-scsiback: don't "handle" error by BUG() - - xen-blkback: fix error handling in xen_blkbk_map() - - tty: protect tty_write from odd low-level tty disciplines - - Bluetooth: btusb: Always fallback to alt 1 for WBS - - btrfs: fix backport of 2175bf57dc952 in 5.10.13 - - btrfs: fix crash after non-aligned direct IO write with O_DSYNC - - media: pwc: Use correct device for DMA - - Linux 5.10.18 - - * Focal update: v5.10.17 upstream stable release (LP: #1916479) - - objtool: Fix seg fault with Clang non-section symbols - - Revert "dts: phy: add GPIO number and active state used for phy reset" - - gpio: mxs: GPIO_MXS should not default to y unconditionally - - gpio: ep93xx: fix BUG_ON port F usage - - gpio: ep93xx: Fix single irqchip with multi gpiochips - - tracing: Do not count ftrace events in top level enable output - - tracing: Check length before giving out the filter buffer - - drm/i915: Fix overlay frontbuffer tracking - - arm/xen: Don't probe xenbus as part of an early initcall - - cgroup: fix psi monitor for root cgroup - - Revert "drm/amd/display: Update NV1x SR latency values" - - drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it - - drm/dp_mst: Don't report ports connected if nothing is attached to them - - dmaengine: move channel device_node deletion to driver - - tmpfs: disallow CONFIG_TMPFS_INODE64 on s390 - - tmpfs: disallow CONFIG_TMPFS_INODE64 on alpha - - soc: ti: omap-prm: Fix boot time errors for rst_map_012 bits 0 and 1 - - arm64: dts: rockchip: Fix PCIe DT properties on rk3399 - - arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc - - ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled - - arm64: dts: rockchip: remove interrupt-names property from rk3399 vdec node - - platform/x86: hp-wmi: Disable tablet-mode reporting by default - - arm64: dts: rockchip: Disable display for NanoPi R2S - - ovl: perform vfs_getxattr() with mounter creds - - cap: fix conversions on getxattr - - ovl: skip getxattr of security labels - - scsi: lpfc: Fix EEH encountering oops with NVMe traffic - - x86/split_lock: Enable the split lock feature on another Alder Lake CPU - - nvme-pci: ignore the subsysem NQN on Phison E16 - - drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL - - drm/amd/display: Add more Clock Sources to DCN2.1 - - drm/amd/display: Release DSC before acquiring - - drm/amd/display: Fix dc_sink kref count in emulated_link_detect - - drm/amd/display: Free atomic state after drm_atomic_commit - - drm/amd/display: Decrement refcount of dc_sink before reassignment - - riscv: virt_addr_valid must check the address belongs to linear mapping - - bfq-iosched: Revert "bfq: Fix computation of shallow depth" - - ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL - - kallsyms: fix nonconverging kallsyms table with lld - - ARM: ensure the signal page contains defined contents - - ARM: kexec: fix oops after TLB are invalidated - - ubsan: implement __ubsan_handle_alignment_assumption - - Revert "lib: Restrict cpumask_local_spread to houskeeping CPUs" - - x86/efi: Remove EFI PGD build time checks - - lkdtm: don't move ctors to .rodata - - KVM: x86: cleanup CR3 reserved bits checks - - cgroup-v1: add disabled controller check in cgroup1_parse_param() - - dmaengine: idxd: fix misc interrupt completion - - ath9k: fix build error with LEDS_CLASS=m - - mt76: dma: fix a possible memory leak in mt76_add_fragment() - - drm/vc4: hvs: Fix buffer overflow with the dlist handling - - dmaengine: idxd: check device state before issue command - - bpf: Unbreak BPF_PROG_TYPE_KPROBE when kprobe is called via do_int3 - - bpf: Check for integer overflow when using roundup_pow_of_two() - - netfilter: xt_recent: Fix attempt to update deleted entry - - selftests: netfilter: fix current year - - netfilter: nftables: fix possible UAF over chains from packet path in netns - - netfilter: flowtable: fix tcp and udp header checksum update - - xen/netback: avoid race in xenvif_rx_ring_slots_available() - - net: hdlc_x25: Return meaningful error code in x25_open - - net: ipa: set error code in gsi_channel_setup() - - hv_netvsc: Reset the RSC count if NVSP_STAT_FAIL in netvsc_receive() - - net: enetc: initialize the RFS and RSS memories - - selftests: txtimestamp: fix compilation issue - - net: stmmac: set TxQ mode back to DCB after disabling CBS - - ibmvnic: Clear failover_pending if unable to schedule - - netfilter: conntrack: skip identical origin tuple in same zone only - - scsi: scsi_debug: Fix a memory leak - - x86/build: Disable CET instrumentation in the kernel for 32-bit too - - net: dsa: felix: implement port flushing on .phylink_mac_link_down - - net: hns3: add a check for queue_id in hclge_reset_vf_queue() - - net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx() - - net: hns3: add a check for index in hclge_get_rss_key() - - firmware_loader: align .builtin_fw to 8 - - drm/sun4i: tcon: set sync polarity for tcon1 channel - - drm/sun4i: dw-hdmi: always set clock rate - - drm/sun4i: Fix H6 HDMI PHY configuration - - drm/sun4i: dw-hdmi: Fix max. frequency for H6 - - clk: sunxi-ng: mp: fix parent rate change flag check - - i2c: stm32f7: fix configuration of the digital filter - - h8300: fix PREEMPTION build, TI_PRE_COUNT undefined - - scripts: set proper OpenSSL include dir also for sign-file - - x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() - - arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page - - rxrpc: Fix clearance of Tx/Rx ring when releasing a call - - udp: fix skb_copy_and_csum_datagram with odd segment sizes - - net: dsa: call teardown method on probe failure - - cpufreq: ACPI: Extend frequency tables to cover boost frequencies - - cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not - there - - net: gro: do not keep too many GRO packets in napi->rx_list - - net: fix iteration for sctp transport seq_files - - net/vmw_vsock: fix NULL pointer dereference - - net/vmw_vsock: improve locking in vsock_connect_timeout() - - net: watchdog: hold device global xmit lock during tx disable - - bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state - - switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT - - vsock/virtio: update credit only if socket is not closed - - vsock: fix locking in vsock_shutdown() - - net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS - - net/qrtr: restrict user-controlled length in qrtr_tun_write_iter() - - ovl: expand warning in ovl_d_real() - - kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq - - Linux 5.10.17 - - * Focal update: v5.10.16 upstream stable release (LP: #1916478) - - io_uring: simplify io_task_match() - - io_uring: add a {task,files} pair matching helper - - io_uring: don't iterate io_uring_cancel_files() - - io_uring: pass files into kill timeouts/poll - - io_uring: always batch cancel in *cancel_files() - - io_uring: fix files cancellation - - io_uring: account io_uring internal files as REQ_F_INFLIGHT - - io_uring: if we see flush on exit, cancel related tasks - - io_uring: fix __io_uring_files_cancel() with TASK_UNINTERRUPTIBLE - - io_uring: replace inflight_wait with tctx->wait - - io_uring: fix cancellation taking mutex while TASK_UNINTERRUPTIBLE - - io_uring: fix flush cqring overflow list while TASK_INTERRUPTIBLE - - io_uring: fix list corruption for splice file_get - - io_uring: fix sqo ownership false positive warning - - io_uring: reinforce cancel on flush during exit - - io_uring: drop mm/files between task_work_submit - - gpiolib: cdev: clear debounce period if line set to output - - powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics - - af_key: relax availability checks for skb size calculation - - regulator: core: avoid regulator_resolve_supply() race condition - - ASoC: wm_adsp: Fix control name parsing for multi-fw - - drm/nouveau/nvif: fix method count when pushing an array - - mac80211: 160MHz with extended NSS BW in CSA - - ASoC: Intel: Skylake: Zero snd_ctl_elem_value - - chtls: Fix potential resource leak - - pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process() - - pNFS/NFSv4: Improve rejection of out-of-order layouts - - ALSA: hda: intel-dsp-config: add PCI id for TGL-H - - ASoC: ak4458: correct reset polarity - - ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E - - iwlwifi: mvm: skip power command when unbinding vif during CSA - - iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time() - - iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap - - iwlwifi: pcie: fix context info memory leak - - iwlwifi: mvm: invalidate IDs of internal stations at mvm start - - iwlwifi: pcie: add rules to match Qu with Hr2 - - iwlwifi: mvm: guard against device removal in reprobe - - iwlwifi: queue: bail out on invalid freeing - - SUNRPC: Move simple_get_bytes and simple_get_netobj into private header - - SUNRPC: Handle 0 length opaque XDR object data properly - - i2c: mediatek: Move suspend and resume handling to NOIRQ phase - - blk-cgroup: Use cond_resched() when destroy blkgs - - regulator: Fix lockdep warning resolving supplies - - bpf: Fix verifier jmp32 pruning decision logic - - bpf: Fix 32 bit src register truncation on div/mod - - bpf: Fix verifier jsgt branch analysis on max bound - - drm/i915: Fix ICL MG PHY vswing handling - - drm/i915: Skip vswing programming for TBT - - nilfs2: make splice write available again - - Revert "mm: memcontrol: avoid workload stalls when lowering memory.high" - - squashfs: avoid out of bounds writes in decompressors - - squashfs: add more sanity checks in id lookup - - squashfs: add more sanity checks in inode lookup - - squashfs: add more sanity checks in xattr id lookup - - Linux 5.10.16 - - * Hirsute update: v5.10.15 upstream stable release (LP: #1915290) - - USB: serial: cp210x: add pid/vid for WSDA-200-USB - - USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000 - - USB: serial: option: Adding support for Cinterion MV31 - - usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 - - USB: gadget: legacy: fix an error code in eth_bind() - - usb: gadget: aspeed: add missing of_node_put - - USB: usblp: don't call usb_set_interface if there's a single alt - - usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() - - usb: dwc2: Fix endpoint direction check in ep_from_windex - - usb: dwc3: fix clock issue during resume in OTG mode - - usb: xhci-mtk: fix unreleased bandwidth data - - usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints - - usb: xhci-mtk: break loop when find the endpoint to drop - - ARM: OMAP1: OSK: fix ohci-omap breakage - - arm64: dts: qcom: c630: keep both touchpad devices enabled - - arm64: dts: amlogic: meson-g12: Set FL-adj property value - - arm64: dts: rockchip: fix vopl iommu irq on px30 - - arm64: dts: rockchip: Use only supported PCIe link speed on Pinebook Pro - - ARM: dts: stm32: Fix polarity of the DH DRC02 uSD card detect - - ARM: dts: stm32: Connect card-detect signal on DHCOM - - ARM: dts: stm32: Disable WP on DHCOM uSD slot - - ARM: dts: stm32: Disable optional TSC2004 on DRC02 board - - ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02 - - vdpa/mlx5: Fix memory key MTT population - - bpf, cgroup: Fix optlen WARN_ON_ONCE toctou - - bpf, cgroup: Fix problematic bounds check - - bpf, inode_storage: Put file handler if no storage was found - - um: virtio: free vu_dev only with the contained struct device - - bpf, preload: Fix build when $(O) points to a relative path - - arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4 - - r8169: work around RTL8125 UDP hw bug - - rxrpc: Fix deadlock around release of dst cached on udp tunnel - - arm64: dts: ls1046a: fix dcfg address range - - SUNRPC: Fix NFS READs that start at non-page-aligned offsets - - igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr - - igc: check return value of ret_val in igc_config_fc_after_link_up - - i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" - - ibmvnic: device remove has higher precedence over reset - - net/mlx5: Fix function calculation for page trees - - net/mlx5: Fix leak upon failure of rule creation - - net/mlx5e: Update max_opened_tc also when channels are closed - - net/mlx5e: Release skb in case of failure in tc update skb - - net: lapb: Copy the skb before sending a packet - - net: mvpp2: TCAM entry enable should be written after SRAM data - - r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set - - net: ipa: pass correct dma_handle to dma_free_coherent() - - ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode - - nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs - - vdpa/mlx5: Restore the hardware used index after change map - - memblock: do not start bottom-up allocations with kernel_end - - kbuild: fix duplicated flags in DEBUG_CFLAGS - - thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() - - ovl: fix dentry leak in ovl_get_redirect - - ovl: avoid deadlock on directory ioctl - - ovl: implement volatile-specific fsync error behaviour - - mac80211: fix station rate table updates on assoc - - gpiolib: free device name on error path to fix kmemleak - - fgraph: Initialize tracing_graph_pause at task creation - - tracing/kprobe: Fix to support kretprobe events on unloaded modules - - kretprobe: Avoid re-registration of the same kretprobe earlier - - tracing: Use pause-on-trace with the latency tracers - - tracepoint: Fix race between tracing and removing tracepoint - - libnvdimm/namespace: Fix visibility of namespace resource attribute - - libnvdimm/dimm: Avoid race between probe and available_slots_show() - - genirq: Prevent [devm_]irq_alloc_desc from returning irq 0 - - genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set - - scripts: use pkg-config to locate libcrypto - - xhci: fix bounce buffer usage for non-sg list case - - RISC-V: Define MAXPHYSMEM_1GB only for RV32 - - cifs: report error instead of invalid when revalidating a dentry fails - - iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it - - smb3: Fix out-of-bounds bug in SMB2_negotiate() - - smb3: fix crediting for compounding when only one request in flight - - mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb - - mmc: core: Limit retries when analyse of SDIO tuples fails - - Fix unsynchronized access to sev members through svm_register_enc_region - - drm/i915/gem: Drop lru bumping on display unpinning - - drm/i915/gt: Close race between enable_breadcrumbs and cancel_breadcrumbs - - drm/i915/display: Prevent double YUV range correction on HDR planes - - drm/i915: Extract intel_ddi_power_up_lanes() - - drm/i915: Power up combo PHY lanes for for HDMI as well - - drm/amd/display: Revert "Fix EDID parsing after resume from suspend" - - io_uring: don't modify identity's files uncess identity is cowed - - nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs - - KVM: SVM: Treat SVM as unsupported when running as an SEV guest - - KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs - - KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off - - KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl - - KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode - - KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset - - DTS: ARM: gta04: remove legacy spi-cs-high to make display work again - - ARM: dts; gta04: SPI panel chip select is active low - - ARM: footbridge: fix dc21285 PCI configuration accessors - - ARM: 9043/1: tegra: Fix misplaced tegra_uart_config in decompressor - - mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page - - mm: hugetlb: fix a race between freeing and dissolving the page - - mm: hugetlb: fix a race between isolating and freeing page - - mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active - - mm, compaction: move high_pfn to the for loop scope - - mm/vmalloc: separate put pages and flush VM flags - - mm: thp: fix MADV_REMOVE deadlock on shmem THP - - mm/filemap: add missing mem_cgroup_uncharge() to - __add_to_page_cache_locked() - - x86/build: Disable CET instrumentation in the kernel - - x86/debug: Fix DR6 handling - - x86/debug: Prevent data breakpoints on __per_cpu_offset - - x86/debug: Prevent data breakpoints on cpu_dr7 - - x86/apic: Add extra serialization for non-serializing MSRs - - Input: goodix - add support for Goodix GT9286 chip - - Input: xpad - sync supported devices with fork on GitHub - - Input: ili210x - implement pressure reporting for ILI251x - - md: Set prev_flush_start and flush_bio in an atomic way - - neighbour: Prevent a dead entry from updating gc_list - - net: ip_tunnel: fix mtu calculation - - udp: ipv4: manipulate network header of NATed UDP GRO fraglist - - net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add - - net: sched: replaced invalid qdisc tree flush helper in qdisc_replace - - Linux 5.10.15 - - * Hirsute update: v5.10.14 upstream stable release (LP: #1915289) - - net: dsa: microchip: Adjust reset release timing to match reference reset - circuit - - net: stmmac: dwmac-intel-plat: remove config data on error - - net: fec: put child node on error path - - net: octeontx2: Make sure the buffer is 128 byte aligned - - stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing - - mlxsw: spectrum_span: Do not overwrite policer configuration - - net: dsa: bcm_sf2: put device node before return - - net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP - - ibmvnic: Ensure that CRQ entry read are correctly ordered - - iommu/io-pgtable-arm: Support coherency for Mali LPAE - - drm/panfrost: Support cache-coherent integrations - - arm64: dts: meson: Describe G12b GPU as coherent - - arm64: Fix kernel address detection of __is_lm_address() - - arm64: Do not pass tagged addresses to __is_lm_address() - - Revert "x86/setup: don't remove E820_TYPE_RAM for pfn 0" - - ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD - - iommu/vt-d: Do not use flush-queue when caching-mode is on - - phy: cpcap-usb: Fix warning for missing regulator_disable - - tools/power/x86/intel-speed-select: Set scaling_max_freq to base_frequency - - tools/power/x86/intel-speed-select: Set higher of cpuinfo_max_freq or - base_frequency - - platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on - Estar Beauty HD tablet - - platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352 - - habanalabs: fix dma_addr passed to dma_mmap_coherent - - locking/lockdep: Avoid noinstr warning for DEBUG_LOCKDEP - - x86: __always_inline __{rd,wr}msr() - - scsi: scsi_transport_srp: Don't block target in failfast state - - scsi: libfc: Avoid invoking response handler twice if ep is already - completed - - scsi: fnic: Fix memleak in vnic_dev_init_devcmd2 - - ALSA: hda: Add AlderLake-P PCI ID and HDMI codec vid - - objtool: Don't add empty symbols to the rbtree - - mac80211: fix incorrect strlen of .write in debugfs - - mac80211: fix fast-rx encryption check - - mac80211: fix encryption key selection for 802.3 xmit - - scsi: ibmvfc: Set default timeout to avoid crash during migration - - i2c: tegra: Create i2c_writesl_vi() to use with VI I2C for filling TX FIFO - - udf: fix the problem that the disc content is not displayed - - nvme: check the PRINFO bit before deciding the host buffer length - - nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout - - nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout - - nvme-pci: allow use of cmb on v1.4 controllers - - nvmet: set right status on error in id-ns handler - - platform/x86: thinkpad_acpi: Add P53/73 firmware to fan_quirk_table for dual - fan control - - drm/amd/display: Update dram_clock_change_latency for DCN2.1 - - drm/amd/display: Allow PSTATE chnage when no displays are enabled - - drm/amd/display: Change function decide_dp_link_settings to avoid infinite - looping - - drm/amd/display: Use hardware sequencer functions for PG control - - drm/amd/display: Fixed corruptions on HPDRX link loss restore - - habanalabs: zero pci counters packet before submit to FW - - habanalabs: fix backward compatibility of idle check - - habanalabs: disable FW events on device removal - - objtool: Don't fail the kernel build on fatal errors - - x86/cpu: Add another Alder Lake CPU to the Intel family - - kthread: Extract KTHREAD_IS_PER_CPU - - workqueue: Restrict affinity change to rescuer - - Linux 5.10.14 - - * Add support for new Realtek ethernet NIC (LP: #1914604) - - r8169: Add support for another RTL8168FP - - * Hirsute update: v5.10.13 upstream stable release (LP: #1914750) - - iwlwifi: provide gso_type to GSO packets - - nbd: freeze the queue while we're adding connections - - tty: avoid using vfs_iocb_iter_write() for redirected console writes - - ACPI: sysfs: Prefer "compatible" modalias - - ACPI: thermal: Do not call acpi_thermal_check() directly - - kernel: kexec: remove the lock operation of system_transition_mutex - - ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256 - - ALSA: hda/via: Apply the workaround generically for Clevo machines - - parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES - - media: cec: add stm32 driver - - media: cedrus: Fix H264 decoding - - media: hantro: Fix reset_raw_fmt initialization - - media: rc: fix timeout handling after switch to microsecond durations - - media: rc: ite-cir: fix min_timeout calculation - - media: rc: ensure that uevent can be read directly after rc device register - - ARM: dts: tbs2910: rename MMC node aliases - - ARM: dts: ux500: Reserve memory carveouts - - ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming - - wext: fix NULL-ptr-dereference with cfg80211's lack of commit() - - x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled - - ASoC: AMD Renoir - refine DMI entries for some Lenovo products - - Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)" - - drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors - - drm/i915: Always flush the active worker before returning from the wait - - drm/i915/gt: Always try to reserve GGTT address 0x0 - - drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes - - bcache: only check feature sets when sb->version >= - BCACHE_SB_VERSION_CDEV_WITH_FEATURES - - net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family - - s390: uv: Fix sysfs max number of VCPUs reporting - - s390/vfio-ap: No need to disable IRQ after queue reset - - PM: hibernate: flush swap writer after marking - - x86/entry: Emit a symbol for register restoring thunk - - efi/apple-properties: Reinstate support for boolean properties - - crypto: marvel/cesa - Fix tdma descriptor on 64-bit - - drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs - - drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] - - btrfs: fix lockdep warning due to seqcount_mutex on 32bit arch - - btrfs: fix possible free space tree corruption with online conversion - - KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in - intel_arch_events[] - - KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh() - - KVM: arm64: Filter out v8.1+ events on v8.0 HW - - KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit - - KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside guest mode for VMX - - KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration - - KVM: x86: get smi pending status correctly - - KVM: Forbid the use of tagged userspace addresses for memslots - - io_uring: fix wqe->lock/completion_lock deadlock - - xen: Fix XenStore initialisation for XS_LOCAL - - leds: trigger: fix potential deadlock with libata - - arm64: dts: broadcom: Fix USB DMA address translation for Stingray - - mt7601u: fix kernel crash unplugging the device - - mt76: mt7663s: fix rx buffer refcounting - - mt7601u: fix rx buffer refcounting - - iwlwifi: Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit. - - drm/i915/gt: Clear CACHE_MODE prior to clearing residuals - - drm/i915/pmu: Don't grab wakeref when enabling events - - net/mlx5e: Fix IPSEC stats - - ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight - - drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices - - drm/vc4: Correct lbm size and calculation - - drm/vc4: Correct POS1_SCL for hvs5 - - drm/nouveau/dispnv50: Restore pushing of all data. - - drm/i915: Check for all subplatform bits - - drm/i915/selftest: Fix potential memory leak - - uapi: fix big endian definition of ipv6_rpl_sr_hdr - - KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM - - tee: optee: replace might_sleep with cond_resched - - xen-blkfront: allow discard-* nodes to be optional - - blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue - - clk: imx: fix Kconfig warning for i.MX SCU clk - - clk: mmp2: fix build without CONFIG_PM - - clk: qcom: gcc-sm250: Use floor ops for sdcc clks - - ARM: imx: build suspend-imx6.S with arm instruction set - - ARM: zImage: atags_to_fdt: Fix node names on added root nodes - - netfilter: nft_dynset: add timeout extension to template - - Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion" - - Revert "block: simplify set_init_blocksize" to regain lost performance - - xfrm: Fix oops in xfrm_replay_advance_bmp - - xfrm: fix disable_xfrm sysctl when used on xfrm interfaces - - selftests: xfrm: fix test return value override issue in xfrm_policy.sh - - xfrm: Fix wraparound in xfrm_policy_addr_delta() - - arm64: dts: ls1028a: fix the offset of the reset register - - ARM: imx: fix imx8m dependencies - - ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status - - ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms - - arm64: dts: imx8mp: Correct the gpio ranges of gpio3 - - firmware: imx: select SOC_BUS to fix firmware build - - RDMA/cxgb4: Fix the reported max_recv_sge value - - ASoC: dt-bindings: lpass: Fix and common up lpass dai ids - - ASoC: qcom: Fix incorrect volatile registers - - ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY - - ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field - - spi: altera: Fix memory leak on error path - - ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete - - powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous - interrupt - - pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process() - - pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn - - ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies - - ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup - - iwlwifi: pcie: avoid potential PNVM leaks - - iwlwifi: pnvm: don't skip everything when not reloading - - iwlwifi: pnvm: don't try to load after failures - - iwlwifi: pcie: set LTR on more devices - - iwlwifi: pcie: use jiffies for memory read spin time limit - - iwlwifi: pcie: reschedule in long-running memory reads - - mac80211: pause TX while changing interface type - - ice: fix FDir IPv6 flexbyte - - ice: Implement flow for IPv6 next header (extension header) - - ice: update dev_addr in ice_set_mac_address even if HW filter exists - - ice: Don't allow more channels than LAN MSI-X available - - ice: Fix MSI-X vector fallback logic - - i40e: acquire VSI pointer only after VF is initialized - - igc: fix link speed advertising - - net/mlx5: Fix memory leak on flow table creation error flow - - net/mlx5e: E-switch, Fix rate calculation for overflow - - net/mlx5e: free page before return - - net/mlx5e: Reduce tc unsupported key print level - - net/mlx5: Maintain separate page trees for ECPF and PF functions - - net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled - - net/mlx5e: Fix CT rule + encap slow path offload and deletion - - net/mlx5e: Correctly handle changing the number of queues when the interface - is down - - net/mlx5e: Revert parameters on errors when changing trust state without - reset - - net/mlx5e: Revert parameters on errors when changing MTU and LRO state - without reset - - net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable - - can: dev: prevent potential information leak in can_fill_info() - - ACPI/IORT: Do not blindly trust DMA masks from firmware - - of/device: Update dma_range_map only when dev has valid dma-ranges - - iommu/amd: Use IVHD EFR for early initialization of IOMMU features - - iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid() - - nvme-multipath: Early exit if no path is available - - selftests: forwarding: Specify interface when invoking mausezahn - - rxrpc: Fix memory leak in rxrpc_lookup_local - - NFC: fix resource leak when target index is invalid - - NFC: fix possible resource leak - - ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default - - ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default - - ASoC: topology: Properly unregister DAI on removal - - ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values() - - scsi: qla2xxx: Fix description for parameter ql2xenforce_iocb_limit - - team: protect features update by RCU to avoid deadlock - - tcp: make TCP_USER_TIMEOUT accurate for zero window probes - - tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN - - Linux 5.10.13 - - * Hirsute update: v5.10.12 upstream stable release (LP: #1914749) - - gpio: mvebu: fix pwm .get_state period calculation - - Revert "mm/slub: fix a memory leak in sysfs_slab_add()" - - futex: Ensure the correct return value from futex_lock_pi() - - futex: Replace pointless printk in fixup_owner() - - futex: Provide and use pi_state_update_owner() - - rtmutex: Remove unused argument from rt_mutex_proxy_unlock() - - futex: Use pi_state_update_owner() in put_pi_state() - - futex: Simplify fixup_pi_state_owner() - - futex: Handle faults correctly for PI futexes - - HID: wacom: Correct NULL dereference on AES pen proximity - - media: Revert "media: videobuf2: Fix length check for single plane dmabuf - queueing" - - media: v4l2-subdev.h: BIT() is not available in userspace - - RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC - - iwlwifi: dbg: Don't touch the tlv data - - kernel/io_uring: cancel io_uring before task works - - io_uring: inline io_uring_attempt_task_drop() - - io_uring: add warn_once for io_uring_flush() - - io_uring: stop SQPOLL submit on creator's death - - io_uring: fix null-deref in io_disable_sqo_submit - - io_uring: do sqo disable on install_fd error - - io_uring: fix false positive sqo warning on flush - - io_uring: fix uring_flush in exit_files() warning - - io_uring: fix skipping disabling sqo on exec - - io_uring: dont kill fasync under completion_lock - - io_uring: fix sleeping under spin in __io_clean_op - - objtool: Don't fail on missing symbol table - - mm/page_alloc: add a missing mm_page_alloc_zone_locked() tracepoint - - mm: fix a race on nr_swap_pages - - tools: Factor HOSTCC, HOSTLD, HOSTAR definitions - - printk: fix buffer overflow potential for print_text() - - printk: fix string termination for record_print_text() - - Linux 5.10.12 - - * Miscellaneous Ubuntu changes - - [Debian] update-aufs.sh -- Don't apply tmpfs-idr.patch - - SAUCE: aufs -- Revert tmpfs-idr.patch - - SAUCE: tmpfs: Don't use 64-bit inodes by defulat with 32-bit ino_t - - * Miscellaneous upstream changes - - Revert "UBUNTU: SAUCE: fixup! ALSA: hda: intel-dsp-config: add PCI id for - TGL-H" - - Revert "UBUNTU: SAUCE: ALSA: hda: intel-dsp-config: add PCI id for TGL-H" - - -- Timo Aaltonen Fri, 26 Feb 2021 15:16:15 +0200 + -- Thadeu Lima de Souza Cascardo Mon, 01 Mar 2021 14:02:08 -0300 linux-oem-5.10 (5.10.0-1014.15) focal; urgency=medium diff -u linux-oem-5.10-5.10.0/debian.oem/config/annotations linux-oem-5.10-5.10.0/debian.oem/config/annotations --- linux-oem-5.10-5.10.0/debian.oem/config/annotations +++ linux-oem-5.10-5.10.0/debian.oem/config/annotations @@ -357,7 +357,7 @@ # Menu: Cryptographic API >> Certificates for signature checking >> Provide system-wide ring of trusted keys CONFIG_SYSTEM_TRUSTED_KEYRING policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> -CONFIG_SYSTEM_TRUSTED_KEYS policy<{'amd64': '"debian/canonical-certs.pem"', 'arm64': '"debian/canonical-certs.pem"', 'armhf': '"debian/canonical-certs.pem"', 'ppc64el': '"debian/canonical-certs.pem"', 's390x': '"debian/canonical-certs.pem"'}> +CONFIG_SYSTEM_TRUSTED_KEYS policy<{'amd64': '""', 'arm64': '""', 'armhf': '""', 'ppc64el': '""', 's390x': '""'}> CONFIG_SYSTEM_EXTRA_CERTIFICATE policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE policy<{'amd64': '4096', 'arm64': '4096', 'armhf': '4096', 'ppc64el': '4096', 's390x': '4096'}> CONFIG_SECONDARY_TRUSTED_KEYRING policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> @@ -10152,13 +10152,11 @@ CONFIG_MODULE_FORCE_LOAD policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_MODULE_UNLOAD policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_MODULE_FORCE_UNLOAD policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> -CONFIG_MODVERSIONS policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> +CONFIG_MODVERSIONS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_MODULE_SRCVERSION_ALL policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_MODULE_COMPRESS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 's390x': 'n'}> CONFIG_UNUSED_SYMBOLS policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> -# -CONFIG_MODVERSIONS mark note # Menu: Enable loadable module support >> Compression algorithm diff -u linux-oem-5.10-5.10.0/debian.oem/config/config.common.ubuntu linux-oem-5.10-5.10.0/debian.oem/config/config.common.ubuntu --- linux-oem-5.10-5.10.0/debian.oem/config/config.common.ubuntu +++ linux-oem-5.10-5.10.0/debian.oem/config/config.common.ubuntu @@ -379,7 +379,6 @@ CONFIG_AS3935=m CONFIG_AS73211=m CONFIG_ASHMEM=m -CONFIG_ASM_MODVERSIONS=y CONFIG_ASN1=y CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_ASUS_LAPTOP=m @@ -4574,7 +4573,7 @@ CONFIG_MODULE_SIG_SHA512=y CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y +# CONFIG_MODVERSIONS is not set CONFIG_MOST=m CONFIG_MOST_CDEV=m CONFIG_MOST_COMPONENTS=m @@ -7699,7 +7698,7 @@ CONFIG_SYSTEM_EXTRA_CERTIFICATE=y CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096 CONFIG_SYSTEM_TRUSTED_KEYRING=y -CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem" +CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SYSV68_PARTITION=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_COMPAT=y diff -u linux-oem-5.10-5.10.0/debian.oem/tracking-bug linux-oem-5.10-5.10.0/debian.oem/tracking-bug --- linux-oem-5.10-5.10.0/debian.oem/tracking-bug +++ linux-oem-5.10-5.10.0/debian.oem/tracking-bug @@ -1 +1 @@ -1916170 +1917307 reverted: --- linux-oem-5.10-5.10.0/debian/canonical-certs.pem +++ linux-oem-5.10-5.10.0.orig/debian/canonical-certs.pem @@ -1,246 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - c7:7e:51:6a:1c:25:cd:40 - Signature Algorithm: sha512WithRSAEncryption - Issuer: CN = Canonical Ltd. Live Patch Signing - Validity - Not Before: Jul 18 23:41:27 2016 GMT - Not After : Jul 16 23:41:27 2026 GMT - Subject: CN = Canonical Ltd. Live Patch Signing - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public-Key: (4096 bit) - Modulus: - 00:bd:74:ee:72:b3:4a:ab:e6:31:e8:29:24:c2:bd: - 46:98:32:c0:39:ee:a3:fb:8a:ad:fe:ab:1a:5b:a3: - 2e:a1:80:db:79:61:9e:47:79:2c:75:57:a2:21:f0: - 93:f6:87:f2:9b:4b:9d:2f:b3:58:61:28:3c:41:70: - 13:16:a1:72:90:c9:d5:16:71:7c:e0:30:f9:28:5e: - 48:20:36:00:69:b7:59:9f:a3:ec:a8:eb:55:41:9f: - 38:1e:22:4a:57:20:f4:83:59:49:c5:00:93:d3:33: - 02:92:d1:fc:f0:84:3b:4a:5b:8f:b6:73:9a:89:fa: - 30:1e:e6:2a:68:f2:91:ef:59:57:3d:dc:1c:52:6f: - 5e:e6:9b:b5:b8:7c:98:c9:13:d1:39:68:01:67:91: - e0:d3:67:72:16:0a:5e:16:83:45:31:4f:b5:2b:b3: - f6:40:86:89:3a:84:6e:6f:16:61:bc:70:84:be:5a: - 13:36:7b:82:ea:07:19:fc:18:c1:16:c6:32:0b:7d: - 2c:6b:c4:21:b9:38:6b:31:dc:d9:0c:ad:56:40:68: - 7c:e3:c6:64:8e:bf:1c:e0:72:3e:6c:db:d2:73:79: - da:d7:c5:2f:5d:04:7d:b0:07:1e:95:dd:2a:47:5e: - bf:3e:3a:c8:66:f6:67:0f:d4:2a:f1:e2:71:59:d2: - 6c:7b:a0:37:ac:e6:97:80:30:13:97:48:d5:74:fc: - 38:68:e4:57:cb:99:69:5a:84:27:ac:98:51:e4:64: - bd:91:62:e8:58:27:06:2a:b9:0b:b8:08:e5:e5:b4: - 51:a7:a2:10:df:4e:07:6c:a0:3b:96:f2:6e:df:75: - 8c:97:1e:64:a0:9a:86:9b:98:26:f9:d8:b7:de:5b: - 21:b7:af:89:01:a3:f7:98:6b:da:19:ba:86:ef:ef: - f1:ce:bb:2f:89:ed:c0:b6:1b:e5:5b:f8:90:11:9a: - 52:93:e9:be:f7:35:b9:08:cb:ba:c3:ed:2f:73:af: - cc:96:07:55:b5:de:f6:03:f6:f1:89:f9:21:40:76: - c1:69:f2:61:cc:9a:94:df:9c:ec:6a:65:38:be:d1: - 4e:2a:87:c7:2f:3e:53:ae:8b:9f:54:a1:09:59:64: - 25:aa:a9:d8:44:a9:a8:a0:71:e1:32:aa:4c:32:fd: - 44:28:cc:9c:6f:8e:db:81:7e:6f:fa:00:56:c5:e5: - 03:46:63:fb:8e:71:8d:e3:13:91:9f:ac:60:3e:64: - f3:df:25:34:09:fa:2d:96:9f:16:05:ea:93:f5:e6: - 00:08:27:32:7b:3c:bd:ee:70:24:6c:3b:55:e9:db: - f4:10:2d:20:06:b4:ca:e9:29:65:55:ad:f6:52:54: - 5f:e5:a3 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: critical - CA:FALSE - X509v3 Key Usage: - Digital Signature - X509v3 Subject Key Identifier: - 14:DF:34:D1:A8:7C:F3:76:25:AB:EC:03:9E:F2:BF:52:12:49:B9:69 - X509v3 Authority Key Identifier: - keyid:14:DF:34:D1:A8:7C:F3:76:25:AB:EC:03:9E:F2:BF:52:12:49:B9:69 - - Signature Algorithm: sha512WithRSAEncryption - 30:e7:48:02:37:e9:28:cf:04:a2:4d:5c:fa:d8:4e:c9:76:c7: - 14:3f:bd:2c:51:3d:33:f0:1a:bc:49:f1:47:95:8f:69:d8:a9: - 54:14:44:6c:4d:9f:55:82:08:1e:c6:5b:d5:91:d9:bc:2e:b0: - af:d6:25:65:74:96:aa:36:de:ae:31:a8:11:f2:a4:2c:5a:e1: - 4f:73:f8:4a:c3:35:b0:76:96:71:f2:b5:7d:4b:75:ee:5d:bf: - 86:a5:ba:0b:a9:52:cb:ec:ab:e5:23:4b:f2:74:55:28:17:1e: - b3:ac:27:ad:45:13:6e:69:b3:5a:be:42:36:29:48:db:e7:5c: - 22:58:a0:90:82:2c:2a:21:2b:db:f4:64:b7:91:5d:1f:2c:48: - a4:1a:85:e3:86:a5:aa:19:cd:19:e8:a5:fb:a3:7b:94:77:48: - 25:a4:cf:a0:cf:71:82:5c:6f:71:22:7c:d6:97:a0:53:bb:ec: - 30:f6:cb:16:fb:7b:fd:16:94:7a:53:6e:bd:04:64:a2:01:10: - 9f:f0:5b:b5:a6:73:41:9d:5f:6f:45:73:0d:05:f7:30:6d:39: - 90:b6:7d:55:7d:4c:2f:ae:5f:38:56:2f:8b:df:f4:bf:12:06: - 93:6e:0d:02:23:bf:71:91:57:88:e8:bd:62:72:99:00:40:29: - 1e:c9:13:11:da:7e:8e:e1:d2:a5:0d:bf:f7:d6:ec:01:0d:89: - 41:cd:d5:dc:d2:f7:5f:33:0d:4c:2f:85:b7:85:b7:81:e4:17: - 29:f0:74:cf:0e:15:8c:1a:50:0b:08:63:1a:91:4f:e7:76:97: - f1:d4:3b:7e:72:d4:c5:45:58:0c:6a:e9:0d:f2:85:d8:91:1e: - 37:bd:78:e3:39:4d:2e:fd:85:31:c1:a6:3b:6a:cc:2c:53:72: - 1d:8e:7b:f0:e6:76:86:09:6f:1a:f3:e4:a1:e2:dd:76:5f:b0: - 8c:e2:2a:54:5d:c1:88:49:90:10:15:42:7d:05:24:53:8c:54: - ff:48:18:1a:36:e3:31:d3:54:32:78:0d:fe:f2:3d:aa:0d:37: - 15:84:b4:36:47:31:e8:85:6e:0b:58:38:ff:21:91:09:c9:a8: - 43:a3:ea:60:cb:7e:ed:f7:41:6f:4e:91:c1:fd:77:46:e7:d4: - e7:86:c0:1b:fd:50:6c:aa:be:00:b3:63:02:ff:4e:c7:a5:57: - 6e:29:64:e9:54:d5:30:63:38:5f:2d:5a:db:49:5f:14:14:22: - d2:81:1f:61:9e:ee:ee:16:66:d6:bc:bd:ac:1b:5c:fb:38:31: - 95:33:2e:84:6e:7a:de:ee:b9:fc:97:17:06:13:bf:70:1c:6e: - 76:ed:66:38:e2:70:08:00 ------BEGIN CERTIFICATE----- -MIIFODCCAyCgAwIBAgIJAMd+UWocJc1AMA0GCSqGSIb3DQEBDQUAMCwxKjAoBgNV -BAMMIUNhbm9uaWNhbCBMdGQuIExpdmUgUGF0Y2ggU2lnbmluZzAeFw0xNjA3MTgy -MzQxMjdaFw0yNjA3MTYyMzQxMjdaMCwxKjAoBgNVBAMMIUNhbm9uaWNhbCBMdGQu -IExpdmUgUGF0Y2ggU2lnbmluZzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBAL107nKzSqvmMegpJMK9RpgywDnuo/uKrf6rGlujLqGA23lhnkd5LHVXoiHw -k/aH8ptLnS+zWGEoPEFwExahcpDJ1RZxfOAw+SheSCA2AGm3WZ+j7KjrVUGfOB4i -Slcg9INZScUAk9MzApLR/PCEO0pbj7Zzmon6MB7mKmjyke9ZVz3cHFJvXuabtbh8 -mMkT0TloAWeR4NNnchYKXhaDRTFPtSuz9kCGiTqEbm8WYbxwhL5aEzZ7guoHGfwY -wRbGMgt9LGvEIbk4azHc2QytVkBofOPGZI6/HOByPmzb0nN52tfFL10EfbAHHpXd -Kkdevz46yGb2Zw/UKvHicVnSbHugN6zml4AwE5dI1XT8OGjkV8uZaVqEJ6yYUeRk -vZFi6FgnBiq5C7gI5eW0UaeiEN9OB2ygO5bybt91jJceZKCahpuYJvnYt95bIbev -iQGj95hr2hm6hu/v8c67L4ntwLYb5Vv4kBGaUpPpvvc1uQjLusPtL3OvzJYHVbXe -9gP28Yn5IUB2wWnyYcyalN+c7GplOL7RTiqHxy8+U66Ln1ShCVlkJaqp2ESpqKBx -4TKqTDL9RCjMnG+O24F+b/oAVsXlA0Zj+45xjeMTkZ+sYD5k898lNAn6LZafFgXq -k/XmAAgnMns8ve5wJGw7Venb9BAtIAa0yukpZVWt9lJUX+WjAgMBAAGjXTBbMAwG -A1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMB0GA1UdDgQWBBQU3zTRqHzzdiWr7AOe -8r9SEkm5aTAfBgNVHSMEGDAWgBQU3zTRqHzzdiWr7AOe8r9SEkm5aTANBgkqhkiG -9w0BAQ0FAAOCAgEAMOdIAjfpKM8Eok1c+thOyXbHFD+9LFE9M/AavEnxR5WPadip -VBREbE2fVYIIHsZb1ZHZvC6wr9YlZXSWqjberjGoEfKkLFrhT3P4SsM1sHaWcfK1 -fUt17l2/hqW6C6lSy+yr5SNL8nRVKBces6wnrUUTbmmzWr5CNilI2+dcIligkIIs -KiEr2/Rkt5FdHyxIpBqF44alqhnNGeil+6N7lHdIJaTPoM9xglxvcSJ81pegU7vs -MPbLFvt7/RaUelNuvQRkogEQn/BbtaZzQZ1fb0VzDQX3MG05kLZ9VX1ML65fOFYv -i9/0vxIGk24NAiO/cZFXiOi9YnKZAEApHskTEdp+juHSpQ2/99bsAQ2JQc3V3NL3 -XzMNTC+Ft4W3geQXKfB0zw4VjBpQCwhjGpFP53aX8dQ7fnLUxUVYDGrpDfKF2JEe -N7144zlNLv2FMcGmO2rMLFNyHY578OZ2hglvGvPkoeLddl+wjOIqVF3BiEmQEBVC -fQUkU4xU/0gYGjbjMdNUMngN/vI9qg03FYS0Nkcx6IVuC1g4/yGRCcmoQ6PqYMt+ -7fdBb06Rwf13RufU54bAG/1QbKq+ALNjAv9Ox6VXbilk6VTVMGM4Xy1a20lfFBQi -0oEfYZ7u7hZm1ry9rBtc+zgxlTMuhG563u65/JcXBhO/cBxudu1mOOJwCAA= ------END CERTIFICATE----- -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - e9:df:13:0f:92:92:a9:b7 - Signature Algorithm: sha512WithRSAEncryption - Issuer: C = GB, ST = Isle of Man, L = Douglas, O = Canonical Ltd., CN = Canonical Ltd. Kernel Module Signing - Validity - Not Before: May 31 16:06:09 2016 GMT - Not After : May 29 16:06:09 2026 GMT - Subject: C = GB, ST = Isle of Man, L = Douglas, O = Canonical Ltd., CN = Canonical Ltd. Kernel Module Signing - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public-Key: (4096 bit) - Modulus: - 00:b3:b0:4f:c6:0a:77:8b:f9:d1:53:33:34:d2:80: - b5:63:6f:e1:f6:a2:83:99:d5:b6:b1:e4:99:91:fa: - 6c:19:c6:d0:91:2a:b9:7d:b5:98:a6:0d:28:01:b8: - 7c:8e:aa:38:ec:51:37:33:96:f0:b0:9b:8d:86:5f: - 67:23:69:2f:d7:c2:f3:fb:c5:d7:f9:04:ff:f2:e5: - 61:68:b7:29:b9:c6:8e:4b:4d:2d:8f:92:0c:00:b3: - a3:d2:5a:08:64:cd:f2:09:0b:a5:0e:e6:64:75:d5: - 41:f4:4d:49:3a:0d:dc:b9:27:8e:c4:d6:b1:df:8f: - 6c:f0:e4:f7:31:cb:a9:04:a1:f9:a7:aa:15:da:59: - 03:4d:46:14:d0:dd:bf:e0:f5:9e:f0:71:0c:70:78: - 2b:08:fb:e0:b6:68:a4:74:12:9d:f7:f2:64:88:17: - 2a:8a:ed:1a:91:b5:6c:13:bd:4c:10:0a:0b:72:0b: - 90:db:7d:f3:78:44:4c:d2:a5:41:f7:1c:77:7d:5a: - 8a:54:bc:8f:fe:b7:ee:e1:bc:59:37:c4:d4:e8:14: - d0:5b:42:9b:04:00:8e:6d:83:8a:25:21:5b:08:c4: - 7b:b2:d9:99:52:c9:5e:59:6d:c4:aa:52:59:e2:e4: - 2f:7e:7e:ac:05:01:99:bf:13:72:b7:45:c5:17:da: - 8a:d5:3e:71:73:2e:d8:aa:e6:eb:5a:d0:9a:c4:93: - f3:be:eb:d2:47:25:34:16:29:fa:dd:9a:2f:b1:20: - e5:41:4e:ed:ea:51:7c:23:80:ba:3d:b5:3a:0b:8c: - 9c:85:48:6c:3c:8b:29:2f:2f:12:c7:52:34:02:ea: - 0f:ac:53:23:3c:f8:3e:40:1b:30:63:e9:2d:e6:f6: - 58:cc:51:f9:eb:08:4a:b4:c7:16:80:d1:8b:c2:64: - 6a:71:a9:70:31:a4:a7:3a:c0:93:99:1b:0e:42:c1: - 00:6d:43:27:99:6c:e5:fd:23:16:c1:8e:b5:66:17: - 2b:4c:53:5a:6d:1e:96:16:13:6a:c6:d4:85:5b:74: - 2e:ce:7c:45:2f:ad:cb:75:9e:5e:91:bd:9a:6a:86: - 1a:06:bd:39:be:a3:50:56:ea:e1:f6:e3:95:69:d7: - 31:e4:66:f7:36:b5:51:c2:22:b4:9c:74:9c:44:0b: - 0e:16:5f:53:f0:23:c6:b9:40:bd:d6:b8:7d:1b:f6: - 73:f6:27:e7:c0:e3:65:a0:58:ab:5c:59:b7:80:8c: - 8c:04:b4:a9:ae:a0:51:40:10:3b:63:59:49:87:d1: - 9b:df:a3:8c:c4:2e:eb:70:c1:0a:18:1f:cb:22:c2: - f2:4a:65:0d:e5:81:74:d8:ce:72:c6:35:be:ba:63: - 72:c4:f9 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: critical - CA:FALSE - X509v3 Key Usage: - Digital Signature - X509v3 Subject Key Identifier: - 88:F7:52:E5:60:A1:E0:73:7E:31:16:3A:46:6A:D7:B7:0A:85:0C:19 - X509v3 Authority Key Identifier: - keyid:88:F7:52:E5:60:A1:E0:73:7E:31:16:3A:46:6A:D7:B7:0A:85:0C:19 - - Signature Algorithm: sha512WithRSAEncryption - 04:85:16:27:58:ba:71:28:57:86:7b:c2:83:db:e5:72:6f:1e: - b2:1c:63:b0:db:ad:c0:42:96:c0:4f:65:f6:35:4d:c0:07:0d: - 46:be:d3:1e:ec:f1:22:18:2a:18:5d:bb:69:a6:a6:d4:0d:c3: - 57:03:b9:e7:45:49:28:ca:6d:98:17:68:97:cb:7b:36:81:0a: - 37:9e:34:79:f3:e1:0e:5b:77:43:bb:5a:a5:45:b7:16:50:86: - fd:12:a4:96:0f:15:19:09:1c:e1:fa:80:a5:80:09:be:bb:c8: - 26:0b:3e:de:03:d2:c2:18:a4:8d:0d:de:c5:32:82:0b:fb:75: - 55:66:1a:2a:bb:e4:bd:25:91:20:15:d4:be:b8:3f:53:e3:fb: - a8:c3:55:e3:d5:e7:82:18:95:df:39:09:a7:fc:89:6e:b4:1c: - aa:2d:e8:67:c2:0d:34:34:3e:f9:fa:0b:ce:81:92:11:ae:12: - 0a:fe:35:63:ce:46:29:c4:2b:4f:cb:4e:05:0a:a1:11:e2:35: - f6:5a:5d:b5:e8:d2:6f:4c:fc:3d:24:a6:03:4b:dd:98:6b:f2: - 71:58:16:1d:a5:25:ef:d9:06:7c:e8:db:7b:88:6a:89:5c:59: - 01:92:64:db:44:08:63:6c:7c:32:d6:55:98:63:09:26:61:67: - 0a:fe:5d:ee:fd:23:59:b3:4d:91:c1:4d:41:8b:cd:20:58:fa: - 2d:45:e5:bd:1d:69:5c:03:a0:49:a6:97:54:13:b6:c9:e0:f8: - 56:83:a1:2a:c3:f4:6c:fd:ab:20:ca:3d:9c:95:c0:cf:04:bb: - 46:39:cf:34:81:65:45:27:64:01:7d:62:b3:b8:72:ea:10:d5: - 0f:53:7d:39:88:25:09:6f:8c:bc:e0:49:bb:39:e2:0e:8d:cf: - 56:4d:c1:82:6d:87:d2:e7:fc:c0:9f:a7:65:60:d2:6c:65:18: - 59:38:6e:d0:9c:d7:c3:81:9a:9a:29:8f:83:84:c3:b5:44:ff: - 28:ac:13:17:64:f2:26:13:d9:55:06:b7:69:68:7c:bf:ec:d1: - 8c:ef:b7:da:76:e1:07:73:c6:31:62:31:cb:b6:e1:e7:7f:0c: - c3:f7:4c:52:be:25:36:8e:a1:bb:60:02:c3:cb:3e:6f:29:fc: - 7f:6a:fa:f8:ec:0a:df:49:e2:57:0e:bc:bd:93:c3:1b:d5:36: - 8a:ff:d8:1b:17:c7:1f:cb:69:00:d2:54:9e:ad:61:89:92:95: - 11:f8:ea:17:83:9f:9b:09:7d:b8:94:a4:ea:f5:ae:ea:dc:dd: - 62:b9:9e:68:9c:18:ec:19:c4:13:08:c8:b1:62:ab:8e:84:69: - 11:3c:da:ea:0d:b7:22:bd ------BEGIN CERTIFICATE----- -MIIF2jCCA8KgAwIBAgIJAOnfEw+Skqm3MA0GCSqGSIb3DQEBDQUAMH0xCzAJBgNV -BAYTAkdCMRQwEgYDVQQIDAtJc2xlIG9mIE1hbjEQMA4GA1UEBwwHRG91Z2xhczEX -MBUGA1UECgwOQ2Fub25pY2FsIEx0ZC4xLTArBgNVBAMMJENhbm9uaWNhbCBMdGQu -IEtlcm5lbCBNb2R1bGUgU2lnbmluZzAeFw0xNjA1MzExNjA2MDlaFw0yNjA1Mjkx -NjA2MDlaMH0xCzAJBgNVBAYTAkdCMRQwEgYDVQQIDAtJc2xlIG9mIE1hbjEQMA4G -A1UEBwwHRG91Z2xhczEXMBUGA1UECgwOQ2Fub25pY2FsIEx0ZC4xLTArBgNVBAMM -JENhbm9uaWNhbCBMdGQuIEtlcm5lbCBNb2R1bGUgU2lnbmluZzCCAiIwDQYJKoZI -hvcNAQEBBQADggIPADCCAgoCggIBALOwT8YKd4v50VMzNNKAtWNv4faig5nVtrHk -mZH6bBnG0JEquX21mKYNKAG4fI6qOOxRNzOW8LCbjYZfZyNpL9fC8/vF1/kE//Ll -YWi3KbnGjktNLY+SDACzo9JaCGTN8gkLpQ7mZHXVQfRNSToN3LknjsTWsd+PbPDk -9zHLqQSh+aeqFdpZA01GFNDdv+D1nvBxDHB4Kwj74LZopHQSnffyZIgXKortGpG1 -bBO9TBAKC3ILkNt983hETNKlQfccd31ailS8j/637uG8WTfE1OgU0FtCmwQAjm2D -iiUhWwjEe7LZmVLJXlltxKpSWeLkL35+rAUBmb8TcrdFxRfaitU+cXMu2Krm61rQ -msST877r0kclNBYp+t2aL7Eg5UFO7epRfCOAuj21OguMnIVIbDyLKS8vEsdSNALq -D6xTIzz4PkAbMGPpLeb2WMxR+esISrTHFoDRi8JkanGpcDGkpzrAk5kbDkLBAG1D -J5ls5f0jFsGOtWYXK0xTWm0elhYTasbUhVt0Ls58RS+ty3WeXpG9mmqGGga9Ob6j -UFbq4fbjlWnXMeRm9za1UcIitJx0nEQLDhZfU/AjxrlAvda4fRv2c/Yn58DjZaBY -q1xZt4CMjAS0qa6gUUAQO2NZSYfRm9+jjMQu63DBChgfyyLC8kplDeWBdNjOcsY1 -vrpjcsT5AgMBAAGjXTBbMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMB0GA1Ud -DgQWBBSI91LlYKHgc34xFjpGate3CoUMGTAfBgNVHSMEGDAWgBSI91LlYKHgc34x -FjpGate3CoUMGTANBgkqhkiG9w0BAQ0FAAOCAgEABIUWJ1i6cShXhnvCg9vlcm8e -shxjsNutwEKWwE9l9jVNwAcNRr7THuzxIhgqGF27aaam1A3DVwO550VJKMptmBdo -l8t7NoEKN540efPhDlt3Q7tapUW3FlCG/RKklg8VGQkc4fqApYAJvrvIJgs+3gPS -whikjQ3exTKCC/t1VWYaKrvkvSWRIBXUvrg/U+P7qMNV49XnghiV3zkJp/yJbrQc -qi3oZ8INNDQ++foLzoGSEa4SCv41Y85GKcQrT8tOBQqhEeI19lpdtejSb0z8PSSm -A0vdmGvycVgWHaUl79kGfOjbe4hqiVxZAZJk20QIY2x8MtZVmGMJJmFnCv5d7v0j -WbNNkcFNQYvNIFj6LUXlvR1pXAOgSaaXVBO2yeD4VoOhKsP0bP2rIMo9nJXAzwS7 -RjnPNIFlRSdkAX1is7hy6hDVD1N9OYglCW+MvOBJuzniDo3PVk3Bgm2H0uf8wJ+n -ZWDSbGUYWThu0JzXw4GamimPg4TDtUT/KKwTF2TyJhPZVQa3aWh8v+zRjO+32nbh -B3PGMWIxy7bh538Mw/dMUr4lNo6hu2ACw8s+byn8f2r6+OwK30niVw68vZPDG9U2 -iv/YGxfHH8tpANJUnq1hiZKVEfjqF4Ofmwl9uJSk6vWu6tzdYrmeaJwY7BnEEwjI -sWKrjoRpETza6g23Ir0= ------END CERTIFICATE----- reverted: --- linux-oem-5.10-5.10.0/debian/certs/canonical-livepatch-all.pem +++ linux-oem-5.10-5.10.0.orig/debian/certs/canonical-livepatch-all.pem @@ -1,121 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - c7:7e:51:6a:1c:25:cd:40 - Signature Algorithm: sha512WithRSAEncryption - Issuer: CN = Canonical Ltd. Live Patch Signing - Validity - Not Before: Jul 18 23:41:27 2016 GMT - Not After : Jul 16 23:41:27 2026 GMT - Subject: CN = Canonical Ltd. Live Patch Signing - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public-Key: (4096 bit) - Modulus: - 00:bd:74:ee:72:b3:4a:ab:e6:31:e8:29:24:c2:bd: - 46:98:32:c0:39:ee:a3:fb:8a:ad:fe:ab:1a:5b:a3: - 2e:a1:80:db:79:61:9e:47:79:2c:75:57:a2:21:f0: - 93:f6:87:f2:9b:4b:9d:2f:b3:58:61:28:3c:41:70: - 13:16:a1:72:90:c9:d5:16:71:7c:e0:30:f9:28:5e: - 48:20:36:00:69:b7:59:9f:a3:ec:a8:eb:55:41:9f: - 38:1e:22:4a:57:20:f4:83:59:49:c5:00:93:d3:33: - 02:92:d1:fc:f0:84:3b:4a:5b:8f:b6:73:9a:89:fa: - 30:1e:e6:2a:68:f2:91:ef:59:57:3d:dc:1c:52:6f: - 5e:e6:9b:b5:b8:7c:98:c9:13:d1:39:68:01:67:91: - e0:d3:67:72:16:0a:5e:16:83:45:31:4f:b5:2b:b3: - f6:40:86:89:3a:84:6e:6f:16:61:bc:70:84:be:5a: - 13:36:7b:82:ea:07:19:fc:18:c1:16:c6:32:0b:7d: - 2c:6b:c4:21:b9:38:6b:31:dc:d9:0c:ad:56:40:68: - 7c:e3:c6:64:8e:bf:1c:e0:72:3e:6c:db:d2:73:79: - da:d7:c5:2f:5d:04:7d:b0:07:1e:95:dd:2a:47:5e: - bf:3e:3a:c8:66:f6:67:0f:d4:2a:f1:e2:71:59:d2: - 6c:7b:a0:37:ac:e6:97:80:30:13:97:48:d5:74:fc: - 38:68:e4:57:cb:99:69:5a:84:27:ac:98:51:e4:64: - bd:91:62:e8:58:27:06:2a:b9:0b:b8:08:e5:e5:b4: - 51:a7:a2:10:df:4e:07:6c:a0:3b:96:f2:6e:df:75: - 8c:97:1e:64:a0:9a:86:9b:98:26:f9:d8:b7:de:5b: - 21:b7:af:89:01:a3:f7:98:6b:da:19:ba:86:ef:ef: - f1:ce:bb:2f:89:ed:c0:b6:1b:e5:5b:f8:90:11:9a: - 52:93:e9:be:f7:35:b9:08:cb:ba:c3:ed:2f:73:af: - cc:96:07:55:b5:de:f6:03:f6:f1:89:f9:21:40:76: - c1:69:f2:61:cc:9a:94:df:9c:ec:6a:65:38:be:d1: - 4e:2a:87:c7:2f:3e:53:ae:8b:9f:54:a1:09:59:64: - 25:aa:a9:d8:44:a9:a8:a0:71:e1:32:aa:4c:32:fd: - 44:28:cc:9c:6f:8e:db:81:7e:6f:fa:00:56:c5:e5: - 03:46:63:fb:8e:71:8d:e3:13:91:9f:ac:60:3e:64: - f3:df:25:34:09:fa:2d:96:9f:16:05:ea:93:f5:e6: - 00:08:27:32:7b:3c:bd:ee:70:24:6c:3b:55:e9:db: - f4:10:2d:20:06:b4:ca:e9:29:65:55:ad:f6:52:54: - 5f:e5:a3 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: critical - CA:FALSE - X509v3 Key Usage: - Digital Signature - X509v3 Subject Key Identifier: - 14:DF:34:D1:A8:7C:F3:76:25:AB:EC:03:9E:F2:BF:52:12:49:B9:69 - X509v3 Authority Key Identifier: - keyid:14:DF:34:D1:A8:7C:F3:76:25:AB:EC:03:9E:F2:BF:52:12:49:B9:69 - - Signature Algorithm: sha512WithRSAEncryption - 30:e7:48:02:37:e9:28:cf:04:a2:4d:5c:fa:d8:4e:c9:76:c7: - 14:3f:bd:2c:51:3d:33:f0:1a:bc:49:f1:47:95:8f:69:d8:a9: - 54:14:44:6c:4d:9f:55:82:08:1e:c6:5b:d5:91:d9:bc:2e:b0: - af:d6:25:65:74:96:aa:36:de:ae:31:a8:11:f2:a4:2c:5a:e1: - 4f:73:f8:4a:c3:35:b0:76:96:71:f2:b5:7d:4b:75:ee:5d:bf: - 86:a5:ba:0b:a9:52:cb:ec:ab:e5:23:4b:f2:74:55:28:17:1e: - b3:ac:27:ad:45:13:6e:69:b3:5a:be:42:36:29:48:db:e7:5c: - 22:58:a0:90:82:2c:2a:21:2b:db:f4:64:b7:91:5d:1f:2c:48: - a4:1a:85:e3:86:a5:aa:19:cd:19:e8:a5:fb:a3:7b:94:77:48: - 25:a4:cf:a0:cf:71:82:5c:6f:71:22:7c:d6:97:a0:53:bb:ec: - 30:f6:cb:16:fb:7b:fd:16:94:7a:53:6e:bd:04:64:a2:01:10: - 9f:f0:5b:b5:a6:73:41:9d:5f:6f:45:73:0d:05:f7:30:6d:39: - 90:b6:7d:55:7d:4c:2f:ae:5f:38:56:2f:8b:df:f4:bf:12:06: - 93:6e:0d:02:23:bf:71:91:57:88:e8:bd:62:72:99:00:40:29: - 1e:c9:13:11:da:7e:8e:e1:d2:a5:0d:bf:f7:d6:ec:01:0d:89: - 41:cd:d5:dc:d2:f7:5f:33:0d:4c:2f:85:b7:85:b7:81:e4:17: - 29:f0:74:cf:0e:15:8c:1a:50:0b:08:63:1a:91:4f:e7:76:97: - f1:d4:3b:7e:72:d4:c5:45:58:0c:6a:e9:0d:f2:85:d8:91:1e: - 37:bd:78:e3:39:4d:2e:fd:85:31:c1:a6:3b:6a:cc:2c:53:72: - 1d:8e:7b:f0:e6:76:86:09:6f:1a:f3:e4:a1:e2:dd:76:5f:b0: - 8c:e2:2a:54:5d:c1:88:49:90:10:15:42:7d:05:24:53:8c:54: - ff:48:18:1a:36:e3:31:d3:54:32:78:0d:fe:f2:3d:aa:0d:37: - 15:84:b4:36:47:31:e8:85:6e:0b:58:38:ff:21:91:09:c9:a8: - 43:a3:ea:60:cb:7e:ed:f7:41:6f:4e:91:c1:fd:77:46:e7:d4: - e7:86:c0:1b:fd:50:6c:aa:be:00:b3:63:02:ff:4e:c7:a5:57: - 6e:29:64:e9:54:d5:30:63:38:5f:2d:5a:db:49:5f:14:14:22: - d2:81:1f:61:9e:ee:ee:16:66:d6:bc:bd:ac:1b:5c:fb:38:31: - 95:33:2e:84:6e:7a:de:ee:b9:fc:97:17:06:13:bf:70:1c:6e: - 76:ed:66:38:e2:70:08:00 ------BEGIN CERTIFICATE----- -MIIFODCCAyCgAwIBAgIJAMd+UWocJc1AMA0GCSqGSIb3DQEBDQUAMCwxKjAoBgNV -BAMMIUNhbm9uaWNhbCBMdGQuIExpdmUgUGF0Y2ggU2lnbmluZzAeFw0xNjA3MTgy -MzQxMjdaFw0yNjA3MTYyMzQxMjdaMCwxKjAoBgNVBAMMIUNhbm9uaWNhbCBMdGQu -IExpdmUgUGF0Y2ggU2lnbmluZzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBAL107nKzSqvmMegpJMK9RpgywDnuo/uKrf6rGlujLqGA23lhnkd5LHVXoiHw -k/aH8ptLnS+zWGEoPEFwExahcpDJ1RZxfOAw+SheSCA2AGm3WZ+j7KjrVUGfOB4i -Slcg9INZScUAk9MzApLR/PCEO0pbj7Zzmon6MB7mKmjyke9ZVz3cHFJvXuabtbh8 -mMkT0TloAWeR4NNnchYKXhaDRTFPtSuz9kCGiTqEbm8WYbxwhL5aEzZ7guoHGfwY -wRbGMgt9LGvEIbk4azHc2QytVkBofOPGZI6/HOByPmzb0nN52tfFL10EfbAHHpXd -Kkdevz46yGb2Zw/UKvHicVnSbHugN6zml4AwE5dI1XT8OGjkV8uZaVqEJ6yYUeRk -vZFi6FgnBiq5C7gI5eW0UaeiEN9OB2ygO5bybt91jJceZKCahpuYJvnYt95bIbev -iQGj95hr2hm6hu/v8c67L4ntwLYb5Vv4kBGaUpPpvvc1uQjLusPtL3OvzJYHVbXe -9gP28Yn5IUB2wWnyYcyalN+c7GplOL7RTiqHxy8+U66Ln1ShCVlkJaqp2ESpqKBx -4TKqTDL9RCjMnG+O24F+b/oAVsXlA0Zj+45xjeMTkZ+sYD5k898lNAn6LZafFgXq -k/XmAAgnMns8ve5wJGw7Venb9BAtIAa0yukpZVWt9lJUX+WjAgMBAAGjXTBbMAwG -A1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMB0GA1UdDgQWBBQU3zTRqHzzdiWr7AOe -8r9SEkm5aTAfBgNVHSMEGDAWgBQU3zTRqHzzdiWr7AOe8r9SEkm5aTANBgkqhkiG -9w0BAQ0FAAOCAgEAMOdIAjfpKM8Eok1c+thOyXbHFD+9LFE9M/AavEnxR5WPadip -VBREbE2fVYIIHsZb1ZHZvC6wr9YlZXSWqjberjGoEfKkLFrhT3P4SsM1sHaWcfK1 -fUt17l2/hqW6C6lSy+yr5SNL8nRVKBces6wnrUUTbmmzWr5CNilI2+dcIligkIIs -KiEr2/Rkt5FdHyxIpBqF44alqhnNGeil+6N7lHdIJaTPoM9xglxvcSJ81pegU7vs -MPbLFvt7/RaUelNuvQRkogEQn/BbtaZzQZ1fb0VzDQX3MG05kLZ9VX1ML65fOFYv -i9/0vxIGk24NAiO/cZFXiOi9YnKZAEApHskTEdp+juHSpQ2/99bsAQ2JQc3V3NL3 -XzMNTC+Ft4W3geQXKfB0zw4VjBpQCwhjGpFP53aX8dQ7fnLUxUVYDGrpDfKF2JEe -N7144zlNLv2FMcGmO2rMLFNyHY578OZ2hglvGvPkoeLddl+wjOIqVF3BiEmQEBVC -fQUkU4xU/0gYGjbjMdNUMngN/vI9qg03FYS0Nkcx6IVuC1g4/yGRCcmoQ6PqYMt+ -7fdBb06Rwf13RufU54bAG/1QbKq+ALNjAv9Ox6VXbilk6VTVMGM4Xy1a20lfFBQi -0oEfYZ7u7hZm1ry9rBtc+zgxlTMuhG563u65/JcXBhO/cBxudu1mOOJwCAA= ------END CERTIFICATE----- reverted: --- linux-oem-5.10-5.10.0/debian/certs/ubuntu-drivers-all.pem +++ linux-oem-5.10-5.10.0.orig/debian/certs/ubuntu-drivers-all.pem @@ -1,125 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - e9:df:13:0f:92:92:a9:b7 - Signature Algorithm: sha512WithRSAEncryption - Issuer: C = GB, ST = Isle of Man, L = Douglas, O = Canonical Ltd., CN = Canonical Ltd. Kernel Module Signing - Validity - Not Before: May 31 16:06:09 2016 GMT - Not After : May 29 16:06:09 2026 GMT - Subject: C = GB, ST = Isle of Man, L = Douglas, O = Canonical Ltd., CN = Canonical Ltd. Kernel Module Signing - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public-Key: (4096 bit) - Modulus: - 00:b3:b0:4f:c6:0a:77:8b:f9:d1:53:33:34:d2:80: - b5:63:6f:e1:f6:a2:83:99:d5:b6:b1:e4:99:91:fa: - 6c:19:c6:d0:91:2a:b9:7d:b5:98:a6:0d:28:01:b8: - 7c:8e:aa:38:ec:51:37:33:96:f0:b0:9b:8d:86:5f: - 67:23:69:2f:d7:c2:f3:fb:c5:d7:f9:04:ff:f2:e5: - 61:68:b7:29:b9:c6:8e:4b:4d:2d:8f:92:0c:00:b3: - a3:d2:5a:08:64:cd:f2:09:0b:a5:0e:e6:64:75:d5: - 41:f4:4d:49:3a:0d:dc:b9:27:8e:c4:d6:b1:df:8f: - 6c:f0:e4:f7:31:cb:a9:04:a1:f9:a7:aa:15:da:59: - 03:4d:46:14:d0:dd:bf:e0:f5:9e:f0:71:0c:70:78: - 2b:08:fb:e0:b6:68:a4:74:12:9d:f7:f2:64:88:17: - 2a:8a:ed:1a:91:b5:6c:13:bd:4c:10:0a:0b:72:0b: - 90:db:7d:f3:78:44:4c:d2:a5:41:f7:1c:77:7d:5a: - 8a:54:bc:8f:fe:b7:ee:e1:bc:59:37:c4:d4:e8:14: - d0:5b:42:9b:04:00:8e:6d:83:8a:25:21:5b:08:c4: - 7b:b2:d9:99:52:c9:5e:59:6d:c4:aa:52:59:e2:e4: - 2f:7e:7e:ac:05:01:99:bf:13:72:b7:45:c5:17:da: - 8a:d5:3e:71:73:2e:d8:aa:e6:eb:5a:d0:9a:c4:93: - f3:be:eb:d2:47:25:34:16:29:fa:dd:9a:2f:b1:20: - e5:41:4e:ed:ea:51:7c:23:80:ba:3d:b5:3a:0b:8c: - 9c:85:48:6c:3c:8b:29:2f:2f:12:c7:52:34:02:ea: - 0f:ac:53:23:3c:f8:3e:40:1b:30:63:e9:2d:e6:f6: - 58:cc:51:f9:eb:08:4a:b4:c7:16:80:d1:8b:c2:64: - 6a:71:a9:70:31:a4:a7:3a:c0:93:99:1b:0e:42:c1: - 00:6d:43:27:99:6c:e5:fd:23:16:c1:8e:b5:66:17: - 2b:4c:53:5a:6d:1e:96:16:13:6a:c6:d4:85:5b:74: - 2e:ce:7c:45:2f:ad:cb:75:9e:5e:91:bd:9a:6a:86: - 1a:06:bd:39:be:a3:50:56:ea:e1:f6:e3:95:69:d7: - 31:e4:66:f7:36:b5:51:c2:22:b4:9c:74:9c:44:0b: - 0e:16:5f:53:f0:23:c6:b9:40:bd:d6:b8:7d:1b:f6: - 73:f6:27:e7:c0:e3:65:a0:58:ab:5c:59:b7:80:8c: - 8c:04:b4:a9:ae:a0:51:40:10:3b:63:59:49:87:d1: - 9b:df:a3:8c:c4:2e:eb:70:c1:0a:18:1f:cb:22:c2: - f2:4a:65:0d:e5:81:74:d8:ce:72:c6:35:be:ba:63: - 72:c4:f9 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: critical - CA:FALSE - X509v3 Key Usage: - Digital Signature - X509v3 Subject Key Identifier: - 88:F7:52:E5:60:A1:E0:73:7E:31:16:3A:46:6A:D7:B7:0A:85:0C:19 - X509v3 Authority Key Identifier: - keyid:88:F7:52:E5:60:A1:E0:73:7E:31:16:3A:46:6A:D7:B7:0A:85:0C:19 - - Signature Algorithm: sha512WithRSAEncryption - 04:85:16:27:58:ba:71:28:57:86:7b:c2:83:db:e5:72:6f:1e: - b2:1c:63:b0:db:ad:c0:42:96:c0:4f:65:f6:35:4d:c0:07:0d: - 46:be:d3:1e:ec:f1:22:18:2a:18:5d:bb:69:a6:a6:d4:0d:c3: - 57:03:b9:e7:45:49:28:ca:6d:98:17:68:97:cb:7b:36:81:0a: - 37:9e:34:79:f3:e1:0e:5b:77:43:bb:5a:a5:45:b7:16:50:86: - fd:12:a4:96:0f:15:19:09:1c:e1:fa:80:a5:80:09:be:bb:c8: - 26:0b:3e:de:03:d2:c2:18:a4:8d:0d:de:c5:32:82:0b:fb:75: - 55:66:1a:2a:bb:e4:bd:25:91:20:15:d4:be:b8:3f:53:e3:fb: - a8:c3:55:e3:d5:e7:82:18:95:df:39:09:a7:fc:89:6e:b4:1c: - aa:2d:e8:67:c2:0d:34:34:3e:f9:fa:0b:ce:81:92:11:ae:12: - 0a:fe:35:63:ce:46:29:c4:2b:4f:cb:4e:05:0a:a1:11:e2:35: - f6:5a:5d:b5:e8:d2:6f:4c:fc:3d:24:a6:03:4b:dd:98:6b:f2: - 71:58:16:1d:a5:25:ef:d9:06:7c:e8:db:7b:88:6a:89:5c:59: - 01:92:64:db:44:08:63:6c:7c:32:d6:55:98:63:09:26:61:67: - 0a:fe:5d:ee:fd:23:59:b3:4d:91:c1:4d:41:8b:cd:20:58:fa: - 2d:45:e5:bd:1d:69:5c:03:a0:49:a6:97:54:13:b6:c9:e0:f8: - 56:83:a1:2a:c3:f4:6c:fd:ab:20:ca:3d:9c:95:c0:cf:04:bb: - 46:39:cf:34:81:65:45:27:64:01:7d:62:b3:b8:72:ea:10:d5: - 0f:53:7d:39:88:25:09:6f:8c:bc:e0:49:bb:39:e2:0e:8d:cf: - 56:4d:c1:82:6d:87:d2:e7:fc:c0:9f:a7:65:60:d2:6c:65:18: - 59:38:6e:d0:9c:d7:c3:81:9a:9a:29:8f:83:84:c3:b5:44:ff: - 28:ac:13:17:64:f2:26:13:d9:55:06:b7:69:68:7c:bf:ec:d1: - 8c:ef:b7:da:76:e1:07:73:c6:31:62:31:cb:b6:e1:e7:7f:0c: - c3:f7:4c:52:be:25:36:8e:a1:bb:60:02:c3:cb:3e:6f:29:fc: - 7f:6a:fa:f8:ec:0a:df:49:e2:57:0e:bc:bd:93:c3:1b:d5:36: - 8a:ff:d8:1b:17:c7:1f:cb:69:00:d2:54:9e:ad:61:89:92:95: - 11:f8:ea:17:83:9f:9b:09:7d:b8:94:a4:ea:f5:ae:ea:dc:dd: - 62:b9:9e:68:9c:18:ec:19:c4:13:08:c8:b1:62:ab:8e:84:69: - 11:3c:da:ea:0d:b7:22:bd ------BEGIN CERTIFICATE----- -MIIF2jCCA8KgAwIBAgIJAOnfEw+Skqm3MA0GCSqGSIb3DQEBDQUAMH0xCzAJBgNV -BAYTAkdCMRQwEgYDVQQIDAtJc2xlIG9mIE1hbjEQMA4GA1UEBwwHRG91Z2xhczEX -MBUGA1UECgwOQ2Fub25pY2FsIEx0ZC4xLTArBgNVBAMMJENhbm9uaWNhbCBMdGQu -IEtlcm5lbCBNb2R1bGUgU2lnbmluZzAeFw0xNjA1MzExNjA2MDlaFw0yNjA1Mjkx -NjA2MDlaMH0xCzAJBgNVBAYTAkdCMRQwEgYDVQQIDAtJc2xlIG9mIE1hbjEQMA4G -A1UEBwwHRG91Z2xhczEXMBUGA1UECgwOQ2Fub25pY2FsIEx0ZC4xLTArBgNVBAMM -JENhbm9uaWNhbCBMdGQuIEtlcm5lbCBNb2R1bGUgU2lnbmluZzCCAiIwDQYJKoZI -hvcNAQEBBQADggIPADCCAgoCggIBALOwT8YKd4v50VMzNNKAtWNv4faig5nVtrHk -mZH6bBnG0JEquX21mKYNKAG4fI6qOOxRNzOW8LCbjYZfZyNpL9fC8/vF1/kE//Ll -YWi3KbnGjktNLY+SDACzo9JaCGTN8gkLpQ7mZHXVQfRNSToN3LknjsTWsd+PbPDk -9zHLqQSh+aeqFdpZA01GFNDdv+D1nvBxDHB4Kwj74LZopHQSnffyZIgXKortGpG1 -bBO9TBAKC3ILkNt983hETNKlQfccd31ailS8j/637uG8WTfE1OgU0FtCmwQAjm2D -iiUhWwjEe7LZmVLJXlltxKpSWeLkL35+rAUBmb8TcrdFxRfaitU+cXMu2Krm61rQ -msST877r0kclNBYp+t2aL7Eg5UFO7epRfCOAuj21OguMnIVIbDyLKS8vEsdSNALq -D6xTIzz4PkAbMGPpLeb2WMxR+esISrTHFoDRi8JkanGpcDGkpzrAk5kbDkLBAG1D -J5ls5f0jFsGOtWYXK0xTWm0elhYTasbUhVt0Ls58RS+ty3WeXpG9mmqGGga9Ob6j -UFbq4fbjlWnXMeRm9za1UcIitJx0nEQLDhZfU/AjxrlAvda4fRv2c/Yn58DjZaBY -q1xZt4CMjAS0qa6gUUAQO2NZSYfRm9+jjMQu63DBChgfyyLC8kplDeWBdNjOcsY1 -vrpjcsT5AgMBAAGjXTBbMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMB0GA1Ud -DgQWBBSI91LlYKHgc34xFjpGate3CoUMGTAfBgNVHSMEGDAWgBSI91LlYKHgc34x -FjpGate3CoUMGTANBgkqhkiG9w0BAQ0FAAOCAgEABIUWJ1i6cShXhnvCg9vlcm8e -shxjsNutwEKWwE9l9jVNwAcNRr7THuzxIhgqGF27aaam1A3DVwO550VJKMptmBdo -l8t7NoEKN540efPhDlt3Q7tapUW3FlCG/RKklg8VGQkc4fqApYAJvrvIJgs+3gPS -whikjQ3exTKCC/t1VWYaKrvkvSWRIBXUvrg/U+P7qMNV49XnghiV3zkJp/yJbrQc -qi3oZ8INNDQ++foLzoGSEa4SCv41Y85GKcQrT8tOBQqhEeI19lpdtejSb0z8PSSm -A0vdmGvycVgWHaUl79kGfOjbe4hqiVxZAZJk20QIY2x8MtZVmGMJJmFnCv5d7v0j -WbNNkcFNQYvNIFj6LUXlvR1pXAOgSaaXVBO2yeD4VoOhKsP0bP2rIMo9nJXAzwS7 -RjnPNIFlRSdkAX1is7hy6hDVD1N9OYglCW+MvOBJuzniDo3PVk3Bgm2H0uf8wJ+n -ZWDSbGUYWThu0JzXw4GamimPg4TDtUT/KKwTF2TyJhPZVQa3aWh8v+zRjO+32nbh -B3PGMWIxy7bh538Mw/dMUr4lNo6hu2ACw8s+byn8f2r6+OwK30niVw68vZPDG9U2 -iv/YGxfHH8tpANJUnq1hiZKVEfjqF4Ofmwl9uJSk6vWu6tzdYrmeaJwY7BnEEwjI -sWKrjoRpETza6g23Ir0= ------END CERTIFICATE----- diff -u linux-oem-5.10-5.10.0/debian/changelog linux-oem-5.10-5.10.0/debian/changelog --- linux-oem-5.10-5.10.0/debian/changelog +++ linux-oem-5.10-5.10.0/debian/changelog @@ -1,601 +1,11 @@ -linux-oem-5.10 (5.10.0-1015.16) focal; urgency=medium +linux-oem-5.10 (5.10.0-1016.17) focal; urgency=medium - * focal/linux-oem-5.10: 5.10.0-1015.16 -proposed tracker (LP: #1916170) + * focal/linux-oem-5.10: 5.10.0-1016.17 -proposed tracker (LP: #1917307) - * Please trust Canonical Livepatch Service kmod signing key (LP: #1898716) - - [Config] enable CONFIG_MODVERSIONS=y - - [Packaging] build canonical-certs.pem from branch/arch certs - - [Config] add Canonical Livepatch Service key to SYSTEM_TRUSTED_KEYS - - [Config] add ubuntu-drivers key to SYSTEM_TRUSTED_KEYS + * CVE-2021-26708 + - vsock: fix the race conditions in multi-transport support - * Packaging resync (LP: #1786013) - - [Packaging] update update.conf - - * Missing device id for Intel TGL-H ISH [8086:43fc] in intel-ish-hid driver - (LP: #1914543) - - SAUCE: HID: intel-ish-hid: ipc: Add Tiger Lake H PCI device ID - - * Fix broken efifb on graphics device without driver (LP: #1914411) - - SAUCE: efifb: Ensure graphics device for efifb stays at PCI D0 - - * Focal update: v5.10.18 upstream stable release (LP: #1917004) - - vdpa_sim: remove hard-coded virtq count - - vdpa_sim: add struct vdpasim_dev_attr for device attributes - - vdpa_sim: store parsed MAC address in a buffer - - vdpa_sim: make 'config' generic and usable for any device type - - vdpa_sim: add get_config callback in vdpasim_dev_attr - - IB/isert: add module param to set sg_tablesize for IO cmd - - net: qrtr: Fix port ID for control messages - - mptcp: skip to next candidate if subflow has unacked data - - net/sched: fix miss init the mru in qdisc_skb_cb - - mt76: mt7915: fix endian issues - - mt76: mt7615: fix rdd mcu cmd endianness - - net: sched: incorrect Kconfig dependencies on Netfilter modules - - net: openvswitch: fix TTL decrement exception action execution - - net: bridge: Fix a warning when del bridge sysfs - - net: fix proc_fs init handling in af_packet and tls - - Xen/x86: don't bail early from clear_foreign_p2m_mapping() - - Xen/x86: also check kernel mapping in set_foreign_p2m_mapping() - - Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages() - - Xen/gntdev: correct error checking in gntdev_map_grant_pages() - - xen/arm: don't ignore return errors from set_phys_to_machine - - xen-blkback: don't "handle" error by BUG() - - xen-netback: don't "handle" error by BUG() - - xen-scsiback: don't "handle" error by BUG() - - xen-blkback: fix error handling in xen_blkbk_map() - - tty: protect tty_write from odd low-level tty disciplines - - Bluetooth: btusb: Always fallback to alt 1 for WBS - - btrfs: fix backport of 2175bf57dc952 in 5.10.13 - - btrfs: fix crash after non-aligned direct IO write with O_DSYNC - - media: pwc: Use correct device for DMA - - Linux 5.10.18 - - * Focal update: v5.10.17 upstream stable release (LP: #1916479) - - objtool: Fix seg fault with Clang non-section symbols - - Revert "dts: phy: add GPIO number and active state used for phy reset" - - gpio: mxs: GPIO_MXS should not default to y unconditionally - - gpio: ep93xx: fix BUG_ON port F usage - - gpio: ep93xx: Fix single irqchip with multi gpiochips - - tracing: Do not count ftrace events in top level enable output - - tracing: Check length before giving out the filter buffer - - drm/i915: Fix overlay frontbuffer tracking - - arm/xen: Don't probe xenbus as part of an early initcall - - cgroup: fix psi monitor for root cgroup - - Revert "drm/amd/display: Update NV1x SR latency values" - - drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it - - drm/dp_mst: Don't report ports connected if nothing is attached to them - - dmaengine: move channel device_node deletion to driver - - tmpfs: disallow CONFIG_TMPFS_INODE64 on s390 - - tmpfs: disallow CONFIG_TMPFS_INODE64 on alpha - - soc: ti: omap-prm: Fix boot time errors for rst_map_012 bits 0 and 1 - - arm64: dts: rockchip: Fix PCIe DT properties on rk3399 - - arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc - - ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled - - arm64: dts: rockchip: remove interrupt-names property from rk3399 vdec node - - platform/x86: hp-wmi: Disable tablet-mode reporting by default - - arm64: dts: rockchip: Disable display for NanoPi R2S - - ovl: perform vfs_getxattr() with mounter creds - - cap: fix conversions on getxattr - - ovl: skip getxattr of security labels - - scsi: lpfc: Fix EEH encountering oops with NVMe traffic - - x86/split_lock: Enable the split lock feature on another Alder Lake CPU - - nvme-pci: ignore the subsysem NQN on Phison E16 - - drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL - - drm/amd/display: Add more Clock Sources to DCN2.1 - - drm/amd/display: Release DSC before acquiring - - drm/amd/display: Fix dc_sink kref count in emulated_link_detect - - drm/amd/display: Free atomic state after drm_atomic_commit - - drm/amd/display: Decrement refcount of dc_sink before reassignment - - riscv: virt_addr_valid must check the address belongs to linear mapping - - bfq-iosched: Revert "bfq: Fix computation of shallow depth" - - ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL - - kallsyms: fix nonconverging kallsyms table with lld - - ARM: ensure the signal page contains defined contents - - ARM: kexec: fix oops after TLB are invalidated - - ubsan: implement __ubsan_handle_alignment_assumption - - Revert "lib: Restrict cpumask_local_spread to houskeeping CPUs" - - x86/efi: Remove EFI PGD build time checks - - lkdtm: don't move ctors to .rodata - - KVM: x86: cleanup CR3 reserved bits checks - - cgroup-v1: add disabled controller check in cgroup1_parse_param() - - dmaengine: idxd: fix misc interrupt completion - - ath9k: fix build error with LEDS_CLASS=m - - mt76: dma: fix a possible memory leak in mt76_add_fragment() - - drm/vc4: hvs: Fix buffer overflow with the dlist handling - - dmaengine: idxd: check device state before issue command - - bpf: Unbreak BPF_PROG_TYPE_KPROBE when kprobe is called via do_int3 - - bpf: Check for integer overflow when using roundup_pow_of_two() - - netfilter: xt_recent: Fix attempt to update deleted entry - - selftests: netfilter: fix current year - - netfilter: nftables: fix possible UAF over chains from packet path in netns - - netfilter: flowtable: fix tcp and udp header checksum update - - xen/netback: avoid race in xenvif_rx_ring_slots_available() - - net: hdlc_x25: Return meaningful error code in x25_open - - net: ipa: set error code in gsi_channel_setup() - - hv_netvsc: Reset the RSC count if NVSP_STAT_FAIL in netvsc_receive() - - net: enetc: initialize the RFS and RSS memories - - selftests: txtimestamp: fix compilation issue - - net: stmmac: set TxQ mode back to DCB after disabling CBS - - ibmvnic: Clear failover_pending if unable to schedule - - netfilter: conntrack: skip identical origin tuple in same zone only - - scsi: scsi_debug: Fix a memory leak - - x86/build: Disable CET instrumentation in the kernel for 32-bit too - - net: dsa: felix: implement port flushing on .phylink_mac_link_down - - net: hns3: add a check for queue_id in hclge_reset_vf_queue() - - net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx() - - net: hns3: add a check for index in hclge_get_rss_key() - - firmware_loader: align .builtin_fw to 8 - - drm/sun4i: tcon: set sync polarity for tcon1 channel - - drm/sun4i: dw-hdmi: always set clock rate - - drm/sun4i: Fix H6 HDMI PHY configuration - - drm/sun4i: dw-hdmi: Fix max. frequency for H6 - - clk: sunxi-ng: mp: fix parent rate change flag check - - i2c: stm32f7: fix configuration of the digital filter - - h8300: fix PREEMPTION build, TI_PRE_COUNT undefined - - scripts: set proper OpenSSL include dir also for sign-file - - x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() - - arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page - - rxrpc: Fix clearance of Tx/Rx ring when releasing a call - - udp: fix skb_copy_and_csum_datagram with odd segment sizes - - net: dsa: call teardown method on probe failure - - cpufreq: ACPI: Extend frequency tables to cover boost frequencies - - cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not - there - - net: gro: do not keep too many GRO packets in napi->rx_list - - net: fix iteration for sctp transport seq_files - - net/vmw_vsock: fix NULL pointer dereference - - net/vmw_vsock: improve locking in vsock_connect_timeout() - - net: watchdog: hold device global xmit lock during tx disable - - bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state - - switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT - - vsock/virtio: update credit only if socket is not closed - - vsock: fix locking in vsock_shutdown() - - net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS - - net/qrtr: restrict user-controlled length in qrtr_tun_write_iter() - - ovl: expand warning in ovl_d_real() - - kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq - - Linux 5.10.17 - - * Focal update: v5.10.16 upstream stable release (LP: #1916478) - - io_uring: simplify io_task_match() - - io_uring: add a {task,files} pair matching helper - - io_uring: don't iterate io_uring_cancel_files() - - io_uring: pass files into kill timeouts/poll - - io_uring: always batch cancel in *cancel_files() - - io_uring: fix files cancellation - - io_uring: account io_uring internal files as REQ_F_INFLIGHT - - io_uring: if we see flush on exit, cancel related tasks - - io_uring: fix __io_uring_files_cancel() with TASK_UNINTERRUPTIBLE - - io_uring: replace inflight_wait with tctx->wait - - io_uring: fix cancellation taking mutex while TASK_UNINTERRUPTIBLE - - io_uring: fix flush cqring overflow list while TASK_INTERRUPTIBLE - - io_uring: fix list corruption for splice file_get - - io_uring: fix sqo ownership false positive warning - - io_uring: reinforce cancel on flush during exit - - io_uring: drop mm/files between task_work_submit - - gpiolib: cdev: clear debounce period if line set to output - - powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics - - af_key: relax availability checks for skb size calculation - - regulator: core: avoid regulator_resolve_supply() race condition - - ASoC: wm_adsp: Fix control name parsing for multi-fw - - drm/nouveau/nvif: fix method count when pushing an array - - mac80211: 160MHz with extended NSS BW in CSA - - ASoC: Intel: Skylake: Zero snd_ctl_elem_value - - chtls: Fix potential resource leak - - pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process() - - pNFS/NFSv4: Improve rejection of out-of-order layouts - - ALSA: hda: intel-dsp-config: add PCI id for TGL-H - - ASoC: ak4458: correct reset polarity - - ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E - - iwlwifi: mvm: skip power command when unbinding vif during CSA - - iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time() - - iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap - - iwlwifi: pcie: fix context info memory leak - - iwlwifi: mvm: invalidate IDs of internal stations at mvm start - - iwlwifi: pcie: add rules to match Qu with Hr2 - - iwlwifi: mvm: guard against device removal in reprobe - - iwlwifi: queue: bail out on invalid freeing - - SUNRPC: Move simple_get_bytes and simple_get_netobj into private header - - SUNRPC: Handle 0 length opaque XDR object data properly - - i2c: mediatek: Move suspend and resume handling to NOIRQ phase - - blk-cgroup: Use cond_resched() when destroy blkgs - - regulator: Fix lockdep warning resolving supplies - - bpf: Fix verifier jmp32 pruning decision logic - - bpf: Fix 32 bit src register truncation on div/mod - - bpf: Fix verifier jsgt branch analysis on max bound - - drm/i915: Fix ICL MG PHY vswing handling - - drm/i915: Skip vswing programming for TBT - - nilfs2: make splice write available again - - Revert "mm: memcontrol: avoid workload stalls when lowering memory.high" - - squashfs: avoid out of bounds writes in decompressors - - squashfs: add more sanity checks in id lookup - - squashfs: add more sanity checks in inode lookup - - squashfs: add more sanity checks in xattr id lookup - - Linux 5.10.16 - - * Hirsute update: v5.10.15 upstream stable release (LP: #1915290) - - USB: serial: cp210x: add pid/vid for WSDA-200-USB - - USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000 - - USB: serial: option: Adding support for Cinterion MV31 - - usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 - - USB: gadget: legacy: fix an error code in eth_bind() - - usb: gadget: aspeed: add missing of_node_put - - USB: usblp: don't call usb_set_interface if there's a single alt - - usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() - - usb: dwc2: Fix endpoint direction check in ep_from_windex - - usb: dwc3: fix clock issue during resume in OTG mode - - usb: xhci-mtk: fix unreleased bandwidth data - - usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints - - usb: xhci-mtk: break loop when find the endpoint to drop - - ARM: OMAP1: OSK: fix ohci-omap breakage - - arm64: dts: qcom: c630: keep both touchpad devices enabled - - arm64: dts: amlogic: meson-g12: Set FL-adj property value - - arm64: dts: rockchip: fix vopl iommu irq on px30 - - arm64: dts: rockchip: Use only supported PCIe link speed on Pinebook Pro - - ARM: dts: stm32: Fix polarity of the DH DRC02 uSD card detect - - ARM: dts: stm32: Connect card-detect signal on DHCOM - - ARM: dts: stm32: Disable WP on DHCOM uSD slot - - ARM: dts: stm32: Disable optional TSC2004 on DRC02 board - - ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02 - - vdpa/mlx5: Fix memory key MTT population - - bpf, cgroup: Fix optlen WARN_ON_ONCE toctou - - bpf, cgroup: Fix problematic bounds check - - bpf, inode_storage: Put file handler if no storage was found - - um: virtio: free vu_dev only with the contained struct device - - bpf, preload: Fix build when $(O) points to a relative path - - arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4 - - r8169: work around RTL8125 UDP hw bug - - rxrpc: Fix deadlock around release of dst cached on udp tunnel - - arm64: dts: ls1046a: fix dcfg address range - - SUNRPC: Fix NFS READs that start at non-page-aligned offsets - - igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr - - igc: check return value of ret_val in igc_config_fc_after_link_up - - i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" - - ibmvnic: device remove has higher precedence over reset - - net/mlx5: Fix function calculation for page trees - - net/mlx5: Fix leak upon failure of rule creation - - net/mlx5e: Update max_opened_tc also when channels are closed - - net/mlx5e: Release skb in case of failure in tc update skb - - net: lapb: Copy the skb before sending a packet - - net: mvpp2: TCAM entry enable should be written after SRAM data - - r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set - - net: ipa: pass correct dma_handle to dma_free_coherent() - - ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode - - nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs - - vdpa/mlx5: Restore the hardware used index after change map - - memblock: do not start bottom-up allocations with kernel_end - - kbuild: fix duplicated flags in DEBUG_CFLAGS - - thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() - - ovl: fix dentry leak in ovl_get_redirect - - ovl: avoid deadlock on directory ioctl - - ovl: implement volatile-specific fsync error behaviour - - mac80211: fix station rate table updates on assoc - - gpiolib: free device name on error path to fix kmemleak - - fgraph: Initialize tracing_graph_pause at task creation - - tracing/kprobe: Fix to support kretprobe events on unloaded modules - - kretprobe: Avoid re-registration of the same kretprobe earlier - - tracing: Use pause-on-trace with the latency tracers - - tracepoint: Fix race between tracing and removing tracepoint - - libnvdimm/namespace: Fix visibility of namespace resource attribute - - libnvdimm/dimm: Avoid race between probe and available_slots_show() - - genirq: Prevent [devm_]irq_alloc_desc from returning irq 0 - - genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set - - scripts: use pkg-config to locate libcrypto - - xhci: fix bounce buffer usage for non-sg list case - - RISC-V: Define MAXPHYSMEM_1GB only for RV32 - - cifs: report error instead of invalid when revalidating a dentry fails - - iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it - - smb3: Fix out-of-bounds bug in SMB2_negotiate() - - smb3: fix crediting for compounding when only one request in flight - - mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb - - mmc: core: Limit retries when analyse of SDIO tuples fails - - Fix unsynchronized access to sev members through svm_register_enc_region - - drm/i915/gem: Drop lru bumping on display unpinning - - drm/i915/gt: Close race between enable_breadcrumbs and cancel_breadcrumbs - - drm/i915/display: Prevent double YUV range correction on HDR planes - - drm/i915: Extract intel_ddi_power_up_lanes() - - drm/i915: Power up combo PHY lanes for for HDMI as well - - drm/amd/display: Revert "Fix EDID parsing after resume from suspend" - - io_uring: don't modify identity's files uncess identity is cowed - - nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs - - KVM: SVM: Treat SVM as unsupported when running as an SEV guest - - KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs - - KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off - - KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl - - KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode - - KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset - - DTS: ARM: gta04: remove legacy spi-cs-high to make display work again - - ARM: dts; gta04: SPI panel chip select is active low - - ARM: footbridge: fix dc21285 PCI configuration accessors - - ARM: 9043/1: tegra: Fix misplaced tegra_uart_config in decompressor - - mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page - - mm: hugetlb: fix a race between freeing and dissolving the page - - mm: hugetlb: fix a race between isolating and freeing page - - mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active - - mm, compaction: move high_pfn to the for loop scope - - mm/vmalloc: separate put pages and flush VM flags - - mm: thp: fix MADV_REMOVE deadlock on shmem THP - - mm/filemap: add missing mem_cgroup_uncharge() to - __add_to_page_cache_locked() - - x86/build: Disable CET instrumentation in the kernel - - x86/debug: Fix DR6 handling - - x86/debug: Prevent data breakpoints on __per_cpu_offset - - x86/debug: Prevent data breakpoints on cpu_dr7 - - x86/apic: Add extra serialization for non-serializing MSRs - - Input: goodix - add support for Goodix GT9286 chip - - Input: xpad - sync supported devices with fork on GitHub - - Input: ili210x - implement pressure reporting for ILI251x - - md: Set prev_flush_start and flush_bio in an atomic way - - neighbour: Prevent a dead entry from updating gc_list - - net: ip_tunnel: fix mtu calculation - - udp: ipv4: manipulate network header of NATed UDP GRO fraglist - - net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add - - net: sched: replaced invalid qdisc tree flush helper in qdisc_replace - - Linux 5.10.15 - - * Hirsute update: v5.10.14 upstream stable release (LP: #1915289) - - net: dsa: microchip: Adjust reset release timing to match reference reset - circuit - - net: stmmac: dwmac-intel-plat: remove config data on error - - net: fec: put child node on error path - - net: octeontx2: Make sure the buffer is 128 byte aligned - - stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing - - mlxsw: spectrum_span: Do not overwrite policer configuration - - net: dsa: bcm_sf2: put device node before return - - net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP - - ibmvnic: Ensure that CRQ entry read are correctly ordered - - iommu/io-pgtable-arm: Support coherency for Mali LPAE - - drm/panfrost: Support cache-coherent integrations - - arm64: dts: meson: Describe G12b GPU as coherent - - arm64: Fix kernel address detection of __is_lm_address() - - arm64: Do not pass tagged addresses to __is_lm_address() - - Revert "x86/setup: don't remove E820_TYPE_RAM for pfn 0" - - ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD - - iommu/vt-d: Do not use flush-queue when caching-mode is on - - phy: cpcap-usb: Fix warning for missing regulator_disable - - tools/power/x86/intel-speed-select: Set scaling_max_freq to base_frequency - - tools/power/x86/intel-speed-select: Set higher of cpuinfo_max_freq or - base_frequency - - platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on - Estar Beauty HD tablet - - platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352 - - habanalabs: fix dma_addr passed to dma_mmap_coherent - - locking/lockdep: Avoid noinstr warning for DEBUG_LOCKDEP - - x86: __always_inline __{rd,wr}msr() - - scsi: scsi_transport_srp: Don't block target in failfast state - - scsi: libfc: Avoid invoking response handler twice if ep is already - completed - - scsi: fnic: Fix memleak in vnic_dev_init_devcmd2 - - ALSA: hda: Add AlderLake-P PCI ID and HDMI codec vid - - objtool: Don't add empty symbols to the rbtree - - mac80211: fix incorrect strlen of .write in debugfs - - mac80211: fix fast-rx encryption check - - mac80211: fix encryption key selection for 802.3 xmit - - scsi: ibmvfc: Set default timeout to avoid crash during migration - - i2c: tegra: Create i2c_writesl_vi() to use with VI I2C for filling TX FIFO - - udf: fix the problem that the disc content is not displayed - - nvme: check the PRINFO bit before deciding the host buffer length - - nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout - - nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout - - nvme-pci: allow use of cmb on v1.4 controllers - - nvmet: set right status on error in id-ns handler - - platform/x86: thinkpad_acpi: Add P53/73 firmware to fan_quirk_table for dual - fan control - - drm/amd/display: Update dram_clock_change_latency for DCN2.1 - - drm/amd/display: Allow PSTATE chnage when no displays are enabled - - drm/amd/display: Change function decide_dp_link_settings to avoid infinite - looping - - drm/amd/display: Use hardware sequencer functions for PG control - - drm/amd/display: Fixed corruptions on HPDRX link loss restore - - habanalabs: zero pci counters packet before submit to FW - - habanalabs: fix backward compatibility of idle check - - habanalabs: disable FW events on device removal - - objtool: Don't fail the kernel build on fatal errors - - x86/cpu: Add another Alder Lake CPU to the Intel family - - kthread: Extract KTHREAD_IS_PER_CPU - - workqueue: Restrict affinity change to rescuer - - Linux 5.10.14 - - * Add support for new Realtek ethernet NIC (LP: #1914604) - - r8169: Add support for another RTL8168FP - - * Hirsute update: v5.10.13 upstream stable release (LP: #1914750) - - iwlwifi: provide gso_type to GSO packets - - nbd: freeze the queue while we're adding connections - - tty: avoid using vfs_iocb_iter_write() for redirected console writes - - ACPI: sysfs: Prefer "compatible" modalias - - ACPI: thermal: Do not call acpi_thermal_check() directly - - kernel: kexec: remove the lock operation of system_transition_mutex - - ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256 - - ALSA: hda/via: Apply the workaround generically for Clevo machines - - parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES - - media: cec: add stm32 driver - - media: cedrus: Fix H264 decoding - - media: hantro: Fix reset_raw_fmt initialization - - media: rc: fix timeout handling after switch to microsecond durations - - media: rc: ite-cir: fix min_timeout calculation - - media: rc: ensure that uevent can be read directly after rc device register - - ARM: dts: tbs2910: rename MMC node aliases - - ARM: dts: ux500: Reserve memory carveouts - - ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming - - wext: fix NULL-ptr-dereference with cfg80211's lack of commit() - - x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled - - ASoC: AMD Renoir - refine DMI entries for some Lenovo products - - Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)" - - drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors - - drm/i915: Always flush the active worker before returning from the wait - - drm/i915/gt: Always try to reserve GGTT address 0x0 - - drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes - - bcache: only check feature sets when sb->version >= - BCACHE_SB_VERSION_CDEV_WITH_FEATURES - - net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family - - s390: uv: Fix sysfs max number of VCPUs reporting - - s390/vfio-ap: No need to disable IRQ after queue reset - - PM: hibernate: flush swap writer after marking - - x86/entry: Emit a symbol for register restoring thunk - - efi/apple-properties: Reinstate support for boolean properties - - crypto: marvel/cesa - Fix tdma descriptor on 64-bit - - drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs - - drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] - - btrfs: fix lockdep warning due to seqcount_mutex on 32bit arch - - btrfs: fix possible free space tree corruption with online conversion - - KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in - intel_arch_events[] - - KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh() - - KVM: arm64: Filter out v8.1+ events on v8.0 HW - - KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit - - KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside guest mode for VMX - - KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration - - KVM: x86: get smi pending status correctly - - KVM: Forbid the use of tagged userspace addresses for memslots - - io_uring: fix wqe->lock/completion_lock deadlock - - xen: Fix XenStore initialisation for XS_LOCAL - - leds: trigger: fix potential deadlock with libata - - arm64: dts: broadcom: Fix USB DMA address translation for Stingray - - mt7601u: fix kernel crash unplugging the device - - mt76: mt7663s: fix rx buffer refcounting - - mt7601u: fix rx buffer refcounting - - iwlwifi: Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit. - - drm/i915/gt: Clear CACHE_MODE prior to clearing residuals - - drm/i915/pmu: Don't grab wakeref when enabling events - - net/mlx5e: Fix IPSEC stats - - ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight - - drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices - - drm/vc4: Correct lbm size and calculation - - drm/vc4: Correct POS1_SCL for hvs5 - - drm/nouveau/dispnv50: Restore pushing of all data. - - drm/i915: Check for all subplatform bits - - drm/i915/selftest: Fix potential memory leak - - uapi: fix big endian definition of ipv6_rpl_sr_hdr - - KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM - - tee: optee: replace might_sleep with cond_resched - - xen-blkfront: allow discard-* nodes to be optional - - blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue - - clk: imx: fix Kconfig warning for i.MX SCU clk - - clk: mmp2: fix build without CONFIG_PM - - clk: qcom: gcc-sm250: Use floor ops for sdcc clks - - ARM: imx: build suspend-imx6.S with arm instruction set - - ARM: zImage: atags_to_fdt: Fix node names on added root nodes - - netfilter: nft_dynset: add timeout extension to template - - Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion" - - Revert "block: simplify set_init_blocksize" to regain lost performance - - xfrm: Fix oops in xfrm_replay_advance_bmp - - xfrm: fix disable_xfrm sysctl when used on xfrm interfaces - - selftests: xfrm: fix test return value override issue in xfrm_policy.sh - - xfrm: Fix wraparound in xfrm_policy_addr_delta() - - arm64: dts: ls1028a: fix the offset of the reset register - - ARM: imx: fix imx8m dependencies - - ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status - - ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms - - arm64: dts: imx8mp: Correct the gpio ranges of gpio3 - - firmware: imx: select SOC_BUS to fix firmware build - - RDMA/cxgb4: Fix the reported max_recv_sge value - - ASoC: dt-bindings: lpass: Fix and common up lpass dai ids - - ASoC: qcom: Fix incorrect volatile registers - - ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY - - ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field - - spi: altera: Fix memory leak on error path - - ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete - - powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous - interrupt - - pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process() - - pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn - - ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies - - ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup - - iwlwifi: pcie: avoid potential PNVM leaks - - iwlwifi: pnvm: don't skip everything when not reloading - - iwlwifi: pnvm: don't try to load after failures - - iwlwifi: pcie: set LTR on more devices - - iwlwifi: pcie: use jiffies for memory read spin time limit - - iwlwifi: pcie: reschedule in long-running memory reads - - mac80211: pause TX while changing interface type - - ice: fix FDir IPv6 flexbyte - - ice: Implement flow for IPv6 next header (extension header) - - ice: update dev_addr in ice_set_mac_address even if HW filter exists - - ice: Don't allow more channels than LAN MSI-X available - - ice: Fix MSI-X vector fallback logic - - i40e: acquire VSI pointer only after VF is initialized - - igc: fix link speed advertising - - net/mlx5: Fix memory leak on flow table creation error flow - - net/mlx5e: E-switch, Fix rate calculation for overflow - - net/mlx5e: free page before return - - net/mlx5e: Reduce tc unsupported key print level - - net/mlx5: Maintain separate page trees for ECPF and PF functions - - net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled - - net/mlx5e: Fix CT rule + encap slow path offload and deletion - - net/mlx5e: Correctly handle changing the number of queues when the interface - is down - - net/mlx5e: Revert parameters on errors when changing trust state without - reset - - net/mlx5e: Revert parameters on errors when changing MTU and LRO state - without reset - - net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable - - can: dev: prevent potential information leak in can_fill_info() - - ACPI/IORT: Do not blindly trust DMA masks from firmware - - of/device: Update dma_range_map only when dev has valid dma-ranges - - iommu/amd: Use IVHD EFR for early initialization of IOMMU features - - iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid() - - nvme-multipath: Early exit if no path is available - - selftests: forwarding: Specify interface when invoking mausezahn - - rxrpc: Fix memory leak in rxrpc_lookup_local - - NFC: fix resource leak when target index is invalid - - NFC: fix possible resource leak - - ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default - - ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default - - ASoC: topology: Properly unregister DAI on removal - - ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values() - - scsi: qla2xxx: Fix description for parameter ql2xenforce_iocb_limit - - team: protect features update by RCU to avoid deadlock - - tcp: make TCP_USER_TIMEOUT accurate for zero window probes - - tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN - - Linux 5.10.13 - - * Hirsute update: v5.10.12 upstream stable release (LP: #1914749) - - gpio: mvebu: fix pwm .get_state period calculation - - Revert "mm/slub: fix a memory leak in sysfs_slab_add()" - - futex: Ensure the correct return value from futex_lock_pi() - - futex: Replace pointless printk in fixup_owner() - - futex: Provide and use pi_state_update_owner() - - rtmutex: Remove unused argument from rt_mutex_proxy_unlock() - - futex: Use pi_state_update_owner() in put_pi_state() - - futex: Simplify fixup_pi_state_owner() - - futex: Handle faults correctly for PI futexes - - HID: wacom: Correct NULL dereference on AES pen proximity - - media: Revert "media: videobuf2: Fix length check for single plane dmabuf - queueing" - - media: v4l2-subdev.h: BIT() is not available in userspace - - RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC - - iwlwifi: dbg: Don't touch the tlv data - - kernel/io_uring: cancel io_uring before task works - - io_uring: inline io_uring_attempt_task_drop() - - io_uring: add warn_once for io_uring_flush() - - io_uring: stop SQPOLL submit on creator's death - - io_uring: fix null-deref in io_disable_sqo_submit - - io_uring: do sqo disable on install_fd error - - io_uring: fix false positive sqo warning on flush - - io_uring: fix uring_flush in exit_files() warning - - io_uring: fix skipping disabling sqo on exec - - io_uring: dont kill fasync under completion_lock - - io_uring: fix sleeping under spin in __io_clean_op - - objtool: Don't fail on missing symbol table - - mm/page_alloc: add a missing mm_page_alloc_zone_locked() tracepoint - - mm: fix a race on nr_swap_pages - - tools: Factor HOSTCC, HOSTLD, HOSTAR definitions - - printk: fix buffer overflow potential for print_text() - - printk: fix string termination for record_print_text() - - Linux 5.10.12 - - * Miscellaneous Ubuntu changes - - [Debian] update-aufs.sh -- Don't apply tmpfs-idr.patch - - SAUCE: aufs -- Revert tmpfs-idr.patch - - SAUCE: tmpfs: Don't use 64-bit inodes by defulat with 32-bit ino_t - - * Miscellaneous upstream changes - - Revert "UBUNTU: SAUCE: fixup! ALSA: hda: intel-dsp-config: add PCI id for - TGL-H" - - Revert "UBUNTU: SAUCE: ALSA: hda: intel-dsp-config: add PCI id for TGL-H" - - -- Timo Aaltonen Fri, 26 Feb 2021 15:16:15 +0200 + -- Thadeu Lima de Souza Cascardo Mon, 01 Mar 2021 14:02:08 -0300 linux-oem-5.10 (5.10.0-1014.15) focal; urgency=medium diff -u linux-oem-5.10-5.10.0/debian/control linux-oem-5.10-5.10.0/debian/control --- linux-oem-5.10-5.10.0/debian/control +++ linux-oem-5.10-5.10.0/debian/control @@ -61,7 +61,7 @@ XS-Testsuite: autopkgtest #XS-Testsuite-Depends: gcc-4.7 binutils -Package: linux-oem-5.10-headers-5.10.0-1015 +Package: linux-oem-5.10-headers-5.10.0-1016 Build-Profiles: Architecture: all Multi-Arch: foreign @@ -71,20 +71,20 @@ Description: Header files related to Linux kernel version 5.10.0 This package provides kernel header files for version 5.10.0, for sites that want the latest kernel headers. Please read - /usr/share/doc/linux-oem-5.10-headers-5.10.0-1015/debian.README.gz for details + /usr/share/doc/linux-oem-5.10-headers-5.10.0-1016/debian.README.gz for details -Package: linux-oem-5.10-tools-5.10.0-1015 +Package: linux-oem-5.10-tools-5.10.0-1016 Build-Profiles: Architecture: amd64 Section: devel Priority: optional Depends: ${misc:Depends}, ${shlibs:Depends}, linux-tools-common -Description: Linux kernel version specific tools for version 5.10.0-1015 +Description: Linux kernel version specific tools for version 5.10.0-1016 This package provides the architecture dependant parts for kernel version locked tools (such as perf and x86_energy_perf_policy) for - version 5.10.0-1015 on + version 5.10.0-1016 on 64 bit x86. - You probably want to install linux-tools-5.10.0-1015-. + You probably want to install linux-tools-5.10.0-1016-. Package: linux-oem-5.10-tools-host Build-Profiles: @@ -98,17 +98,17 @@ -Package: linux-image-unsigned-5.10.0-1015-oem +Package: linux-image-unsigned-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: kernel Priority: optional Provides: linux-image, fuse-module, aufs-dkms, kvm-api-4, redhat-cluster-modules, ivtv-modules, virtualbox-guest-modules [amd64], ${linux:rprovides} -Depends: ${misc:Depends}, ${shlibs:Depends}, kmod, linux-base (>= 4.5ubuntu1~16.04.1), linux-modules-5.10.0-1015-oem +Depends: ${misc:Depends}, ${shlibs:Depends}, kmod, linux-base (>= 4.5ubuntu1~16.04.1), linux-modules-5.10.0-1016-oem Recommends: grub-pc [amd64] | grub-efi-amd64 [amd64] | grub-efi-ia32 [amd64] | grub [amd64] | lilo [amd64] | flash-kernel [armhf arm64] | grub-ieee1275 [ppc64el], initramfs-tools | linux-initramfs-tool Breaks: flash-kernel (<< 3.90ubuntu2) [arm64 armhf], s390-tools (<< 2.3.0-0ubuntu3) [s390x] -Conflicts: linux-image-5.10.0-1015-oem -Suggests: fdutils, linux-oem-5.10-tools, linux-headers-5.10.0-1015-oem +Conflicts: linux-image-5.10.0-1016-oem +Suggests: fdutils, linux-oem-5.10-tools, linux-headers-5.10.0-1016-oem Description: Linux kernel image for version 5.10.0 on 64 bit x86 SMP This package contains the unsigned Linux kernel image for version 5.10.0 on 64 bit x86 SMP. @@ -121,7 +121,7 @@ the linux-oem meta-package, which will ensure that upgrades work correctly, and that supporting packages are also installed. -Package: linux-modules-5.10.0-1015-oem +Package: linux-modules-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: kernel @@ -141,12 +141,12 @@ the linux-oem meta-package, which will ensure that upgrades work correctly, and that supporting packages are also installed. -Package: linux-modules-extra-5.10.0-1015-oem +Package: linux-modules-extra-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: kernel Priority: optional -Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-5.10.0-1015-oem | linux-image-unsigned-5.10.0-1015-oem, crda | wireless-crda +Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-5.10.0-1016-oem | linux-image-unsigned-5.10.0-1016-oem, crda | wireless-crda Description: Linux kernel extra modules for version 5.10.0 on 64 bit x86 SMP This package contains the Linux kernel extra modules for version 5.10.0 on 64 bit x86 SMP. @@ -163,21 +163,21 @@ the linux-oem meta-package, which will ensure that upgrades work correctly, and that supporting packages are also installed. -Package: linux-headers-5.10.0-1015-oem +Package: linux-headers-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: devel Priority: optional -Depends: ${misc:Depends}, linux-oem-5.10-headers-5.10.0-1015, ${shlibs:Depends} +Depends: ${misc:Depends}, linux-oem-5.10-headers-5.10.0-1016, ${shlibs:Depends} Provides: linux-headers, linux-headers-3.0 Description: Linux kernel headers for version 5.10.0 on 64 bit x86 SMP This package provides kernel header files for version 5.10.0 on 64 bit x86 SMP. . This is for sites that want the latest kernel headers. Please read - /usr/share/doc/linux-headers-5.10.0-1015/debian.README.gz for details. + /usr/share/doc/linux-headers-5.10.0-1016/debian.README.gz for details. -Package: linux-image-unsigned-5.10.0-1015-oem-dbgsym +Package: linux-image-unsigned-5.10.0-1016-oem-dbgsym Build-Profiles: Architecture: amd64 Section: devel @@ -194,27 +194,27 @@ is uncompressed, and unstripped. This package also includes the unstripped modules. -Package: linux-tools-5.10.0-1015-oem +Package: linux-tools-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: devel Priority: optional -Depends: ${misc:Depends}, linux-oem-5.10-tools-5.10.0-1015 -Description: Linux kernel version specific tools for version 5.10.0-1015 +Depends: ${misc:Depends}, linux-oem-5.10-tools-5.10.0-1016 +Description: Linux kernel version specific tools for version 5.10.0-1016 This package provides the architecture dependant parts for kernel version locked tools (such as perf and x86_energy_perf_policy) for - version 5.10.0-1015 on + version 5.10.0-1016 on 64 bit x86. -Package: linux-cloud-tools-5.10.0-1015-oem +Package: linux-cloud-tools-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: devel Priority: optional -Depends: ${misc:Depends}, linux-oem-5.10-cloud-tools-5.10.0-1015 -Description: Linux kernel version specific cloud tools for version 5.10.0-1015 +Depends: ${misc:Depends}, linux-oem-5.10-cloud-tools-5.10.0-1016 +Description: Linux kernel version specific cloud tools for version 5.10.0-1016 This package provides the architecture dependant parts for kernel - version locked tools for cloud for version 5.10.0-1015 on + version locked tools for cloud for version 5.10.0-1016 on 64 bit x86. Package: linux-oem-5.10-udebs-oem @@ -228,7 +228,7 @@ for easier version and migration tracking. -Package: linux-buildinfo-5.10.0-1015-oem +Package: linux-buildinfo-5.10.0-1016-oem Build-Profiles: Architecture: amd64 Section: kernel diff -u linux-oem-5.10-5.10.0/debian/rules linux-oem-5.10-5.10.0/debian/rules --- linux-oem-5.10-5.10.0/debian/rules +++ linux-oem-5.10-5.10.0/debian/rules @@ -129,7 +129,7 @@ build: build-arch build-indep -clean: debian/control debian/canonical-certs.pem +clean: debian/control dh_testdir dh_testroot dh_clean @@ -230,12 +229,0 @@ - -debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem) - for cert in $(sort $(notdir $^)); \ - do \ - for dir in $(DEBIAN) $(DROOT); \ - do \ - if [ -f "$$dir/certs/$$cert" ]; then \ - cat "$$dir/certs/$$cert"; \ - break; \ - fi; \ - done; \ - done >"$@" diff -u linux-oem-5.10-5.10.0/debian/scripts/misc/update-aufs.sh linux-oem-5.10-5.10.0/debian/scripts/misc/update-aufs.sh --- linux-oem-5.10-5.10.0/debian/scripts/misc/update-aufs.sh +++ linux-oem-5.10-5.10.0/debian/scripts/misc/update-aufs.sh @@ -35,7 +35,7 @@ PATCHES="${PATCHES} aufs5-standalone.patch" PATCHES="${PATCHES} aufs5-loopback.patch" #PATCHES="${PATCHES} vfs-ino.patch" -#PATCHES="${PATCHES} tmpfs-idr.patch" +PATCHES="${PATCHES} tmpfs-idr.patch" for i in ${PATCHES} do reverted: --- linux-oem-5.10-5.10.0/drivers/acpi/arm64/iort.c +++ linux-oem-5.10-5.10.0.orig/drivers/acpi/arm64/iort.c @@ -1107,11 +1107,6 @@ ncomp = (struct acpi_iort_named_component *)node->node_data; - if (!ncomp->memory_address_limit) { - pr_warn(FW_BUG "Named component missing memory address limit\n"); - return -EINVAL; - } - *size = ncomp->memory_address_limit >= 64 ? U64_MAX : 1ULL<memory_address_limit; @@ -1131,11 +1126,6 @@ rc = (struct acpi_iort_root_complex *)node->node_data; - if (!rc->memory_address_limit) { - pr_warn(FW_BUG "Root complex missing memory address limit\n"); - return -EINVAL; - } - *size = rc->memory_address_limit >= 64 ? U64_MAX : 1ULL<memory_address_limit; @@ -1183,8 +1173,8 @@ end = dmaaddr + size - 1; mask = DMA_BIT_MASK(ilog2(end) + 1); dev->bus_dma_limit = end; + dev->coherent_dma_mask = mask; + *dev->dma_mask = mask; - dev->coherent_dma_mask = min(dev->coherent_dma_mask, mask); - *dev->dma_mask = min(*dev->dma_mask, mask); } *dma_addr = dmaaddr; reverted: --- linux-oem-5.10-5.10.0/drivers/acpi/device_sysfs.c +++ linux-oem-5.10-5.10.0.orig/drivers/acpi/device_sysfs.c @@ -251,12 +251,20 @@ if (add_uevent_var(env, "MODALIAS=")) return -ENOMEM; + len = create_pnp_modalias(adev, &env->buf[env->buflen - 1], + sizeof(env->buf) - env->buflen); + if (len < 0) + return len; + + env->buflen += len; + if (!adev->data.of_compatible) + return 0; + + if (len > 0 && add_uevent_var(env, "MODALIAS=")) + return -ENOMEM; + + len = create_of_modalias(adev, &env->buf[env->buflen - 1], + sizeof(env->buf) - env->buflen); - if (adev->data.of_compatible) - len = create_of_modalias(adev, &env->buf[env->buflen - 1], - sizeof(env->buf) - env->buflen); - else - len = create_pnp_modalias(adev, &env->buf[env->buflen - 1], - sizeof(env->buf) - env->buflen); if (len < 0) return len; diff -u linux-oem-5.10-5.10.0/drivers/acpi/thermal.c linux-oem-5.10-5.10.0/drivers/acpi/thermal.c --- linux-oem-5.10-5.10.0/drivers/acpi/thermal.c +++ linux-oem-5.10-5.10.0/drivers/acpi/thermal.c @@ -174,8 +174,6 @@ struct thermal_zone_device *thermal_zone; int kelvin_offset; /* in millidegrees */ struct work_struct thermal_check_work; - struct mutex thermal_check_lock; - refcount_t thermal_check_count; }; /* -------------------------------------------------------------------------- @@ -497,6 +495,14 @@ return 0; } +static void acpi_thermal_check(void *data) +{ + struct acpi_thermal *tz = data; + + thermal_zone_device_update(tz->thermal_zone, + THERMAL_EVENT_UNSPECIFIED); +} + /* sys I/F for generic thermal sysfs support */ static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp) @@ -892,12 +898,6 @@ Driver Interface -------------------------------------------------------------------------- */ -static void acpi_queue_thermal_check(struct acpi_thermal *tz) -{ - if (!work_pending(&tz->thermal_check_work)) - queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work); -} - static void acpi_thermal_notify(struct acpi_device *device, u32 event) { struct acpi_thermal *tz = acpi_driver_data(device); @@ -908,17 +908,17 @@ switch (event) { case ACPI_THERMAL_NOTIFY_TEMPERATURE: - acpi_queue_thermal_check(tz); + acpi_thermal_check(tz); break; case ACPI_THERMAL_NOTIFY_THRESHOLDS: acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS); - acpi_queue_thermal_check(tz); + acpi_thermal_check(tz); acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, 0); break; case ACPI_THERMAL_NOTIFY_DEVICES: acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES); - acpi_queue_thermal_check(tz); + acpi_thermal_check(tz); acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, 0); break; @@ -1018,25 +1018,7 @@ { struct acpi_thermal *tz = container_of(work, struct acpi_thermal, thermal_check_work); - - /* - * In general, it is not sufficient to check the pending bit, because - * subsequent instances of this function may be queued after one of them - * has started running (e.g. if _TMP sleeps). Avoid bailing out if just - * one of them is running, though, because it may have done the actual - * check some time ago, so allow at least one of them to block on the - * mutex while another one is running the update. - */ - if (!refcount_dec_not_one(&tz->thermal_check_count)) - return; - - mutex_lock(&tz->thermal_check_lock); - - thermal_zone_device_update(tz->thermal_zone, THERMAL_EVENT_UNSPECIFIED); - - refcount_inc(&tz->thermal_check_count); - - mutex_unlock(&tz->thermal_check_lock); + acpi_thermal_check(tz); } static int acpi_thermal_add(struct acpi_device *device) @@ -1068,8 +1050,6 @@ if (result) goto free_memory; - refcount_set(&tz->thermal_check_count, 3); - mutex_init(&tz->thermal_check_lock); INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn); pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device), @@ -1135,7 +1115,7 @@ tz->state.active |= tz->trips.active[i].flags.enabled; } - acpi_queue_thermal_check(tz); + queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work); return AE_OK; } diff -u linux-oem-5.10-5.10.0/drivers/block/nbd.c linux-oem-5.10-5.10.0/drivers/block/nbd.c --- linux-oem-5.10-5.10.0/drivers/block/nbd.c +++ linux-oem-5.10-5.10.0/drivers/block/nbd.c @@ -1029,12 +1029,6 @@ if (!sock) return err; - /* - * We need to make sure we don't get any errant requests while we're - * reallocating the ->socks array. - */ - blk_mq_freeze_queue(nbd->disk->queue); - if (!netlink && !nbd->task_setup && !test_bit(NBD_RT_BOUND, &config->runtime_flags)) nbd->task_setup = current; @@ -1073,12 +1067,10 @@ nsock->cookie = 0; socks[config->num_connections++] = nsock; atomic_inc(&config->live_connections); - blk_mq_unfreeze_queue(nbd->disk->queue); return 0; put_socket: - blk_mq_unfreeze_queue(nbd->disk->queue); sockfd_put(sock); return err; } reverted: --- linux-oem-5.10-5.10.0/drivers/block/xen-blkback/blkback.c +++ linux-oem-5.10-5.10.0.orig/drivers/block/xen-blkback/blkback.c @@ -794,13 +794,8 @@ pages[i]->persistent_gnt = persistent_gnt; } else { if (gnttab_page_cache_get(&ring->free_pages, + &pages[i]->page)) + goto out_of_memory; - &pages[i]->page)) { - gnttab_page_cache_put(&ring->free_pages, - pages_to_gnt, - segs_to_map); - ret = -ENOMEM; - goto out; - } addr = vaddr(pages[i]->page); pages_to_gnt[segs_to_map] = pages[i]->page; pages[i]->persistent_gnt = NULL; @@ -816,8 +811,10 @@ break; } + if (segs_to_map) { - if (segs_to_map) ret = gnttab_map_refs(map, NULL, pages_to_gnt, segs_to_map); + BUG_ON(ret); + } /* * Now swizzle the MFN in our domain with the MFN from the other domain @@ -833,7 +830,7 @@ gnttab_page_cache_put(&ring->free_pages, &pages[seg_idx]->page, 1); pages[seg_idx]->handle = BLKBACK_INVALID_HANDLE; + ret |= 1; - ret |= !ret; goto next; } pages[seg_idx]->handle = map[new_map_idx].handle; @@ -885,18 +882,17 @@ } segs_to_map = 0; last_map = map_until; + if (map_until != num) - if (!ret && map_until != num) goto again; + return ret; + +out_of_memory: + pr_alert("%s: out of memory\n", __func__); + gnttab_page_cache_put(&ring->free_pages, pages_to_gnt, segs_to_map); + for (i = last_map; i < num; i++) -out: - for (i = last_map; i < num; i++) { - /* Don't zap current batch's valid persistent grants. */ - if(i >= last_map + segs_to_map) - pages[i]->persistent_gnt = NULL; pages[i]->handle = BLKBACK_INVALID_HANDLE; + return -ENOMEM; - } - - return ret; } static int xen_blkbk_map_seg(struct pending_req *pending_req) reverted: --- linux-oem-5.10-5.10.0/drivers/block/xen-blkfront.c +++ linux-oem-5.10-5.10.0.orig/drivers/block/xen-blkfront.c @@ -945,8 +945,7 @@ if (info->feature_discard) { blk_queue_flag_set(QUEUE_FLAG_DISCARD, rq); blk_queue_max_discard_sectors(rq, get_capacity(gd)); + rq->limits.discard_granularity = info->discard_granularity; - rq->limits.discard_granularity = info->discard_granularity ?: - info->physical_sector_size; rq->limits.discard_alignment = info->discard_alignment; if (info->feature_secdiscard) blk_queue_flag_set(QUEUE_FLAG_SECERASE, rq); @@ -2180,12 +2179,19 @@ static void blkfront_setup_discard(struct blkfront_info *info) { + int err; + unsigned int discard_granularity; + unsigned int discard_alignment; + info->feature_discard = 1; + err = xenbus_gather(XBT_NIL, info->xbdev->otherend, + "discard-granularity", "%u", &discard_granularity, + "discard-alignment", "%u", &discard_alignment, + NULL); + if (!err) { + info->discard_granularity = discard_granularity; + info->discard_alignment = discard_alignment; + } - info->discard_granularity = xenbus_read_unsigned(info->xbdev->otherend, - "discard-granularity", - 0); - info->discard_alignment = xenbus_read_unsigned(info->xbdev->otherend, - "discard-alignment", 0); info->feature_secdiscard = !!xenbus_read_unsigned(info->xbdev->otherend, "discard-secure", 0); diff -u linux-oem-5.10-5.10.0/drivers/bluetooth/btusb.c linux-oem-5.10-5.10.0/drivers/bluetooth/btusb.c --- linux-oem-5.10-5.10.0/drivers/bluetooth/btusb.c +++ linux-oem-5.10-5.10.0/drivers/bluetooth/btusb.c @@ -482,6 +482,7 @@ #define BTUSB_HW_RESET_ACTIVE 12 #define BTUSB_TX_WAIT_VND_EVT 13 #define BTUSB_WAKEUP_DISABLE 14 +#define BTUSB_USE_ALT1_FOR_WBS 15 struct btusb_data { struct hci_dev *hdev; @@ -1711,12 +1712,15 @@ new_alts = data->sco_num; } } else if (data->air_mode == HCI_NOTIFY_ENABLE_SCO_TRANSP) { - /* Bluetooth USB spec recommends alt 6 (63 bytes), but - * many adapters do not support it. Alt 1 appears to - * work for all adapters that do not have alt 6, and - * which work with WBS at all. - */ - new_alts = btusb_find_altsetting(data, 6) ? 6 : 1; + /* Check if Alt 6 is supported for Transparent audio */ + if (btusb_find_altsetting(data, 6)) { + data->usb_alt6_packet_flow = true; + new_alts = 6; + } else if (test_bit(BTUSB_USE_ALT1_FOR_WBS, &data->flags)) { + new_alts = 1; + } else { + bt_dev_err(hdev, "Device does not support ALT setting 6"); + } } if (btusb_switch_alt_setting(hdev, new_alts) < 0) @@ -4508,6 +4512,10 @@ * (DEVICE_REMOTE_WAKEUP) */ set_bit(BTUSB_WAKEUP_DISABLE, &data->flags); + if (btusb_find_altsetting(data, 1)) + set_bit(BTUSB_USE_ALT1_FOR_WBS, &data->flags); + else + bt_dev_err(hdev, "Device does not support ALT setting 1"); } if (!reset) reverted: --- linux-oem-5.10-5.10.0/drivers/clk/imx/Kconfig +++ linux-oem-5.10-5.10.0.orig/drivers/clk/imx/Kconfig @@ -6,6 +6,8 @@ config MXC_CLK_SCU tristate + depends on ARCH_MXC + depends on IMX_SCU && HAVE_ARM_SMCCC config CLK_IMX1 def_bool SOC_IMX1 reverted: --- linux-oem-5.10-5.10.0/drivers/clk/mmp/clk-audio.c +++ linux-oem-5.10-5.10.0.orig/drivers/clk/mmp/clk-audio.c @@ -392,8 +392,7 @@ return 0; } +static int __maybe_unused mmp2_audio_clk_suspend(struct device *dev) -#ifdef CONFIG_PM -static int mmp2_audio_clk_suspend(struct device *dev) { struct mmp2_audio_clk *priv = dev_get_drvdata(dev); @@ -405,7 +404,7 @@ return 0; } +static int __maybe_unused mmp2_audio_clk_resume(struct device *dev) -static int mmp2_audio_clk_resume(struct device *dev) { struct mmp2_audio_clk *priv = dev_get_drvdata(dev); @@ -416,7 +415,6 @@ return 0; } -#endif static const struct dev_pm_ops mmp2_audio_clk_pm_ops = { SET_RUNTIME_PM_OPS(mmp2_audio_clk_suspend, mmp2_audio_clk_resume, NULL) reverted: --- linux-oem-5.10-5.10.0/drivers/clk/qcom/gcc-sm8250.c +++ linux-oem-5.10-5.10.0.orig/drivers/clk/qcom/gcc-sm8250.c @@ -722,7 +722,7 @@ .name = "gcc_sdcc2_apps_clk_src", .parent_data = gcc_parent_data_4, .num_parents = 5, + .ops = &clk_rcg2_ops, - .ops = &clk_rcg2_floor_ops, }, }; @@ -745,7 +745,7 @@ .name = "gcc_sdcc4_apps_clk_src", .parent_data = gcc_parent_data_0, .num_parents = 3, + .ops = &clk_rcg2_ops, - .ops = &clk_rcg2_floor_ops, }, }; reverted: --- linux-oem-5.10-5.10.0/drivers/clk/sunxi-ng/ccu_mp.c +++ linux-oem-5.10-5.10.0.orig/drivers/clk/sunxi-ng/ccu_mp.c @@ -108,7 +108,7 @@ max_m = cmp->m.max ?: 1 << cmp->m.width; max_p = cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1); + if (!(clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT)) { - if (!clk_hw_can_set_rate_parent(&cmp->common.hw)) { ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p); rate = *parent_rate / p / m; } else { reverted: --- linux-oem-5.10-5.10.0/drivers/cpufreq/acpi-cpufreq.c +++ linux-oem-5.10-5.10.0.orig/drivers/cpufreq/acpi-cpufreq.c @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -54,7 +53,6 @@ unsigned int resume; unsigned int cpu_feature; unsigned int acpi_perf_cpu; - unsigned int first_perf_state; cpumask_var_t freqdomain_cpus; void (*cpu_freq_write)(struct acpi_pct_register *reg, u32 val); u32 (*cpu_freq_read)(struct acpi_pct_register *reg); @@ -223,10 +221,10 @@ perf = to_perf_data(data); + cpufreq_for_each_entry(pos, policy->freq_table) - cpufreq_for_each_entry(pos, policy->freq_table + data->first_perf_state) if (msr == perf->states[pos->driver_data].status) return pos->frequency; + return policy->freq_table[0].frequency; - return policy->freq_table[data->first_perf_state].frequency; } static unsigned extract_freq(struct cpufreq_policy *policy, u32 val) @@ -365,7 +363,6 @@ struct cpufreq_policy *policy; unsigned int freq; unsigned int cached_freq; - unsigned int state; pr_debug("%s (%d)\n", __func__, cpu); @@ -377,11 +374,7 @@ if (unlikely(!data || !policy->freq_table)) return 0; + cached_freq = policy->freq_table[to_perf_data(data)->state].frequency; - state = to_perf_data(data)->state; - if (state < data->first_perf_state) - state = data->first_perf_state; - - cached_freq = policy->freq_table[state].frequency; freq = extract_freq(policy, get_cur_val(cpumask_of(cpu), data)); if (freq != cached_freq) { /* @@ -635,54 +628,16 @@ } #endif -#ifdef CONFIG_ACPI_CPPC_LIB -static u64 get_max_boost_ratio(unsigned int cpu) -{ - struct cppc_perf_caps perf_caps; - u64 highest_perf, nominal_perf; - int ret; - - if (acpi_pstate_strict) - return 0; - - ret = cppc_get_perf_caps(cpu, &perf_caps); - if (ret) { - pr_debug("CPU%d: Unable to get performance capabilities (%d)\n", - cpu, ret); - return 0; - } - - highest_perf = perf_caps.highest_perf; - nominal_perf = perf_caps.nominal_perf; - - if (!highest_perf || !nominal_perf) { - pr_debug("CPU%d: highest or nominal performance missing\n", cpu); - return 0; - } - - if (highest_perf < nominal_perf) { - pr_debug("CPU%d: nominal performance above highest\n", cpu); - return 0; - } - - return div_u64(highest_perf << SCHED_CAPACITY_SHIFT, nominal_perf); -} -#else -static inline u64 get_max_boost_ratio(unsigned int cpu) { return 0; } -#endif - static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) { + unsigned int i; + unsigned int valid_states = 0; + unsigned int cpu = policy->cpu; - struct cpufreq_frequency_table *freq_table; - struct acpi_processor_performance *perf; struct acpi_cpufreq_data *data; - unsigned int cpu = policy->cpu; - struct cpuinfo_x86 *c = &cpu_data(cpu); - unsigned int valid_states = 0; unsigned int result = 0; + struct cpuinfo_x86 *c = &cpu_data(policy->cpu); + struct acpi_processor_performance *perf; + struct cpufreq_frequency_table *freq_table; - unsigned int state_count; - u64 max_boost_ratio; - unsigned int i; #ifdef CONFIG_SMP static int blacklisted; #endif @@ -795,28 +750,8 @@ goto err_unreg; } + freq_table = kcalloc(perf->state_count + 1, sizeof(*freq_table), + GFP_KERNEL); - state_count = perf->state_count + 1; - - max_boost_ratio = get_max_boost_ratio(cpu); - if (max_boost_ratio) { - /* - * Make a room for one more entry to represent the highest - * available "boost" frequency. - */ - state_count++; - valid_states++; - data->first_perf_state = valid_states; - } else { - /* - * If the maximum "boost" frequency is unknown, ask the arch - * scale-invariance code to use the "nominal" performance for - * CPU utilization scaling so as to prevent the schedutil - * governor from selecting inadequate CPU frequencies. - */ - arch_set_max_freq_ratio(true); - } - - freq_table = kcalloc(state_count, sizeof(*freq_table), GFP_KERNEL); if (!freq_table) { result = -ENOMEM; goto err_unreg; @@ -850,30 +785,6 @@ valid_states++; } freq_table[valid_states].frequency = CPUFREQ_TABLE_END; - - if (max_boost_ratio) { - unsigned int state = data->first_perf_state; - unsigned int freq = freq_table[state].frequency; - - /* - * Because the loop above sorts the freq_table entries in the - * descending order, freq is the maximum frequency in the table. - * Assume that it corresponds to the CPPC nominal frequency and - * use it to populate the frequency field of the extra "boost" - * frequency entry. - */ - freq_table[0].frequency = freq * max_boost_ratio >> SCHED_CAPACITY_SHIFT; - /* - * The purpose of the extra "boost" frequency entry is to make - * the rest of cpufreq aware of the real maximum frequency, but - * the way to request it is the same as for the first_perf_state - * entry that is expected to cover the entire range of "boost" - * frequencies of the CPU, so copy the driver_data value from - * that entry. - */ - freq_table[0].driver_data = freq_table[state].driver_data; - } - policy->freq_table = freq_table; perf->state = 0; @@ -947,10 +858,8 @@ { struct acpi_processor_performance *perf = per_cpu_ptr(acpi_perf_data, policy->cpu); - struct acpi_cpufreq_data *data = policy->driver_data; - unsigned int freq = policy->freq_table[data->first_perf_state].frequency; + if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) - if (perf->states[0].core_frequency * 1000 != freq) pr_warn(FW_WARN "P-state 0 is not max freq\n"); } reverted: --- linux-oem-5.10-5.10.0/drivers/crypto/marvell/cesa/cesa.h +++ linux-oem-5.10-5.10.0.orig/drivers/crypto/marvell/cesa/cesa.h @@ -300,11 +300,11 @@ __le32 byte_cnt; union { __le32 src; + dma_addr_t src_dma; - u32 src_dma; }; union { __le32 dst; + dma_addr_t dst_dma; - u32 dst_dma; }; __le32 next_dma; reverted: --- linux-oem-5.10-5.10.0/drivers/dma/dmaengine.c +++ linux-oem-5.10-5.10.0.orig/drivers/dma/dmaengine.c @@ -1110,6 +1110,7 @@ "%s called while %d clients hold a reference\n", __func__, chan->client_count); mutex_lock(&dma_list_mutex); + list_del(&chan->device_node); device->chancnt--; chan->dev->chan = NULL; mutex_unlock(&dma_list_mutex); reverted: --- linux-oem-5.10-5.10.0/drivers/dma/idxd/device.c +++ linux-oem-5.10-5.10.0.orig/drivers/dma/idxd/device.c @@ -325,31 +325,17 @@ return false; } -static inline bool idxd_device_is_halted(struct idxd_device *idxd) -{ - union gensts_reg gensts; - - gensts.bits = ioread32(idxd->reg_base + IDXD_GENSTATS_OFFSET); - - return (gensts.state == IDXD_DEVICE_STATE_HALT); -} - /* * This is function is only used for reset during probe and will * poll for completion. Once the device is setup with interrupts, * all commands will be done via interrupt completion. */ +void idxd_device_init_reset(struct idxd_device *idxd) -int idxd_device_init_reset(struct idxd_device *idxd) { struct device *dev = &idxd->pdev->dev; union idxd_command_reg cmd; unsigned long flags; - if (idxd_device_is_halted(idxd)) { - dev_warn(&idxd->pdev->dev, "Device is HALTED!\n"); - return -ENXIO; - } - memset(&cmd, 0, sizeof(cmd)); cmd.cmd = IDXD_CMD_RESET_DEVICE; dev_dbg(dev, "%s: sending reset for init.\n", __func__); @@ -360,7 +346,6 @@ IDXD_CMDSTS_ACTIVE) cpu_relax(); spin_unlock_irqrestore(&idxd->dev_lock, flags); - return 0; } static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand, @@ -370,12 +355,6 @@ DECLARE_COMPLETION_ONSTACK(done); unsigned long flags; - if (idxd_device_is_halted(idxd)) { - dev_warn(&idxd->pdev->dev, "Device is HALTED!\n"); - *status = IDXD_CMDSTS_HW_ERR; - return; - } - memset(&cmd, 0, sizeof(cmd)); cmd.cmd = cmd_code; cmd.operand = operand; reverted: --- linux-oem-5.10-5.10.0/drivers/dma/idxd/dma.c +++ linux-oem-5.10-5.10.0.orig/drivers/dma/idxd/dma.c @@ -214,8 +214,5 @@ void idxd_unregister_dma_channel(struct idxd_wq *wq) { + dma_async_device_channel_unregister(&wq->idxd->dma_dev, &wq->dma_chan); - struct dma_chan *chan = &wq->dma_chan; - - dma_async_device_channel_unregister(&wq->idxd->dma_dev, chan); - list_del(&chan->device_node); } reverted: --- linux-oem-5.10-5.10.0/drivers/dma/idxd/idxd.h +++ linux-oem-5.10-5.10.0.orig/drivers/dma/idxd/idxd.h @@ -281,7 +281,7 @@ void idxd_unmask_msix_vector(struct idxd_device *idxd, int vec_id); /* device control */ +void idxd_device_init_reset(struct idxd_device *idxd); -int idxd_device_init_reset(struct idxd_device *idxd); int idxd_device_enable(struct idxd_device *idxd); int idxd_device_disable(struct idxd_device *idxd); void idxd_device_reset(struct idxd_device *idxd); reverted: --- linux-oem-5.10-5.10.0/drivers/dma/idxd/init.c +++ linux-oem-5.10-5.10.0.orig/drivers/dma/idxd/init.c @@ -289,10 +289,7 @@ int rc; dev_dbg(dev, "%s entered and resetting device\n", __func__); + idxd_device_init_reset(idxd); - rc = idxd_device_init_reset(idxd); - if (rc < 0) - return rc; - dev_dbg(dev, "IDXD reset complete\n"); idxd_read_caps(idxd); reverted: --- linux-oem-5.10-5.10.0/drivers/dma/idxd/irq.c +++ linux-oem-5.10-5.10.0.orig/drivers/dma/idxd/irq.c @@ -53,14 +53,19 @@ return IRQ_WAKE_THREAD; } +irqreturn_t idxd_misc_thread(int vec, void *data) -static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { + struct idxd_irq_entry *irq_entry = data; + struct idxd_device *idxd = irq_entry->idxd; struct device *dev = &idxd->pdev->dev; union gensts_reg gensts; + u32 cause, val = 0; - u32 val = 0; int i; bool err = false; + cause = ioread32(idxd->reg_base + IDXD_INTCAUSE_OFFSET); + iowrite32(cause, idxd->reg_base + IDXD_INTCAUSE_OFFSET); + if (cause & IDXD_INTC_ERR) { spin_lock_bh(&idxd->dev_lock); for (i = 0; i < 4; i++) @@ -118,7 +123,7 @@ val); if (!err) + goto out; - return 0; gensts.bits = ioread32(idxd->reg_base + IDXD_GENSTATS_OFFSET); if (gensts.state == IDXD_DEVICE_STATE_HALT) { @@ -139,33 +144,10 @@ gensts.reset_type == IDXD_DEVICE_RESET_FLR ? "FLR" : "system reset"); spin_unlock_bh(&idxd->dev_lock); - return -ENXIO; } } + out: - return 0; -} - -irqreturn_t idxd_misc_thread(int vec, void *data) -{ - struct idxd_irq_entry *irq_entry = data; - struct idxd_device *idxd = irq_entry->idxd; - int rc; - u32 cause; - - cause = ioread32(idxd->reg_base + IDXD_INTCAUSE_OFFSET); - if (cause) - iowrite32(cause, idxd->reg_base + IDXD_INTCAUSE_OFFSET); - - while (cause) { - rc = process_misc_interrupts(idxd, cause); - if (rc < 0) - break; - cause = ioread32(idxd->reg_base + IDXD_INTCAUSE_OFFSET); - if (cause) - iowrite32(cause, idxd->reg_base + IDXD_INTCAUSE_OFFSET); - } - idxd_unmask_msix_vector(idxd, irq_entry->id); return IRQ_HANDLED; } reverted: --- linux-oem-5.10-5.10.0/drivers/firmware/efi/apple-properties.c +++ linux-oem-5.10-5.10.0.orig/drivers/firmware/efi/apple-properties.c @@ -3,9 +3,8 @@ * apple-properties.c - EFI device properties on Macs * Copyright (C) 2016 Lukas Wunner * + * Note, all properties are considered as u8 arrays. + * To get a value of any of them the caller must use device_property_read_u8_array(). - * Properties are stored either as: - * u8 arrays which can be retrieved with device_property_read_u8_array() or - * booleans which can be queried with device_property_present(). */ #define pr_fmt(fmt) "apple-properties: " fmt @@ -89,12 +88,8 @@ entry_data = ptr + key_len + sizeof(val_len); entry_len = val_len - sizeof(val_len); + entry[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(key, entry_data, + entry_len); - if (entry_len) - entry[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(key, entry_data, - entry_len); - else - entry[i] = PROPERTY_ENTRY_BOOL(key); - if (dump_properties) { dev_info(dev, "property: %s\n", key); print_hex_dump(KERN_INFO, pr_fmt(), DUMP_PREFIX_OFFSET, reverted: --- linux-oem-5.10-5.10.0/drivers/firmware/imx/Kconfig +++ linux-oem-5.10-5.10.0.orig/drivers/firmware/imx/Kconfig @@ -13,7 +13,6 @@ config IMX_SCU bool "IMX SCU Protocol driver" depends on IMX_MBOX - select SOC_BUS help The System Controller Firmware (SCFW) is a low-level system function which runs on a dedicated Cortex-M core to provide power, clock, and diff -u linux-oem-5.10-5.10.0/drivers/gpio/Kconfig linux-oem-5.10-5.10.0/drivers/gpio/Kconfig --- linux-oem-5.10-5.10.0/drivers/gpio/Kconfig +++ linux-oem-5.10-5.10.0/drivers/gpio/Kconfig @@ -428,9 +428,8 @@ select GENERIC_IRQ_CHIP config GPIO_MXS - bool "Freescale MXS GPIO support" if COMPILE_TEST + def_bool y depends on ARCH_MXS || COMPILE_TEST - default y if ARCH_MXS select GPIO_GENERIC select GENERIC_IRQ_CHIP reverted: --- linux-oem-5.10-5.10.0/drivers/gpio/gpio-ep93xx.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpio/gpio-ep93xx.c @@ -25,9 +25,6 @@ /* Maximum value for gpio line identifiers */ #define EP93XX_GPIO_LINE_MAX 63 -/* Number of GPIO chips in EP93XX */ -#define EP93XX_GPIO_CHIP_NUM 8 - /* Maximum value for irq capable line identifiers */ #define EP93XX_GPIO_LINE_MAX_IRQ 23 @@ -37,75 +34,74 @@ */ #define EP93XX_GPIO_F_IRQ_BASE 80 -struct ep93xx_gpio_irq_chip { - struct irq_chip ic; - u8 irq_offset; - u8 int_unmasked; - u8 int_enabled; - u8 int_type1; - u8 int_type2; - u8 int_debounce; -}; - -struct ep93xx_gpio_chip { - struct gpio_chip gc; - struct ep93xx_gpio_irq_chip *eic; -}; - struct ep93xx_gpio { void __iomem *base; + struct gpio_chip gc[8]; - struct ep93xx_gpio_chip gc[EP93XX_GPIO_CHIP_NUM]; }; +/************************************************************************* + * Interrupt handling for EP93xx on-chip GPIOs + *************************************************************************/ +static unsigned char gpio_int_unmasked[3]; +static unsigned char gpio_int_enabled[3]; +static unsigned char gpio_int_type1[3]; +static unsigned char gpio_int_type2[3]; +static unsigned char gpio_int_debounce[3]; + +/* Port ordering is: A B F */ +static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; +static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 }; +static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; +static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; +static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; -#define to_ep93xx_gpio_chip(x) container_of(x, struct ep93xx_gpio_chip, gc) +static void ep93xx_gpio_update_int_params(struct ep93xx_gpio *epg, unsigned port) -static struct ep93xx_gpio_irq_chip *to_ep93xx_gpio_irq_chip(struct gpio_chip *gc) { + BUG_ON(port > 2); + + writeb_relaxed(0, epg->base + int_en_register_offset[port]); - struct ep93xx_gpio_chip *egc = to_ep93xx_gpio_chip(gc); + writeb_relaxed(gpio_int_type2[port], + epg->base + int_type2_register_offset[port]); + + writeb_relaxed(gpio_int_type1[port], + epg->base + int_type1_register_offset[port]); + + writeb(gpio_int_unmasked[port] & gpio_int_enabled[port], + epg->base + int_en_register_offset[port]); - return egc->eic; } +static int ep93xx_gpio_port(struct gpio_chip *gc) +{ + struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = 0; -/************************************************************************* - * Interrupt handling for EP93xx on-chip GPIOs - *************************************************************************/ -#define EP93XX_INT_TYPE1_OFFSET 0x00 -#define EP93XX_INT_TYPE2_OFFSET 0x04 -#define EP93XX_INT_EOI_OFFSET 0x08 -#define EP93XX_INT_EN_OFFSET 0x0c -#define EP93XX_INT_STATUS_OFFSET 0x10 -#define EP93XX_INT_RAW_STATUS_OFFSET 0x14 -#define EP93XX_INT_DEBOUNCE_OFFSET 0x18 - -static void ep93xx_gpio_update_int_params(struct ep93xx_gpio *epg, - struct ep93xx_gpio_irq_chip *eic) -{ - writeb_relaxed(0, epg->base + eic->irq_offset + EP93XX_INT_EN_OFFSET); + while (port < ARRAY_SIZE(epg->gc) && gc != &epg->gc[port]) + port++; - writeb_relaxed(eic->int_type2, - epg->base + eic->irq_offset + EP93XX_INT_TYPE2_OFFSET); + /* This should not happen but is there as a last safeguard */ + if (port == ARRAY_SIZE(epg->gc)) { + pr_crit("can't find the GPIO port\n"); + return 0; + } - writeb_relaxed(eic->int_type1, - epg->base + eic->irq_offset + EP93XX_INT_TYPE1_OFFSET); + return port; - writeb_relaxed(eic->int_unmasked & eic->int_enabled, - epg->base + eic->irq_offset + EP93XX_INT_EN_OFFSET); } static void ep93xx_gpio_int_debounce(struct gpio_chip *gc, unsigned int offset, bool enable) { struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = ep93xx_gpio_port(gc); - struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); int port_mask = BIT(offset); if (enable) + gpio_int_debounce[port] |= port_mask; - eic->int_debounce |= port_mask; else + gpio_int_debounce[port] &= ~port_mask; - eic->int_debounce &= ~port_mask; + writeb(gpio_int_debounce[port], + epg->base + int_debounce_register_offset[port]); - writeb(eic->int_debounce, - epg->base + eic->irq_offset + EP93XX_INT_DEBOUNCE_OFFSET); } static void ep93xx_gpio_ab_irq_handler(struct irq_desc *desc) @@ -126,12 +122,12 @@ */ stat = readb(epg->base + EP93XX_GPIO_A_INT_STATUS); for_each_set_bit(offset, &stat, 8) + generic_handle_irq(irq_find_mapping(epg->gc[0].irq.domain, - generic_handle_irq(irq_find_mapping(epg->gc[0].gc.irq.domain, offset)); stat = readb(epg->base + EP93XX_GPIO_B_INT_STATUS); for_each_set_bit(offset, &stat, 8) + generic_handle_irq(irq_find_mapping(epg->gc[1].irq.domain, - generic_handle_irq(irq_find_mapping(epg->gc[1].gc.irq.domain, offset)); chained_irq_exit(irqchip, desc); @@ -157,52 +153,52 @@ static void ep93xx_gpio_irq_ack(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = ep93xx_gpio_port(gc); int port_mask = BIT(d->irq & 7); if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) { + gpio_int_type2[port] ^= port_mask; /* switch edge direction */ + ep93xx_gpio_update_int_params(epg, port); - eic->int_type2 ^= port_mask; /* switch edge direction */ - ep93xx_gpio_update_int_params(epg, eic); } + writeb(port_mask, epg->base + eoi_register_offset[port]); - writeb(port_mask, epg->base + eic->irq_offset + EP93XX_INT_EOI_OFFSET); } static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = ep93xx_gpio_port(gc); int port_mask = BIT(d->irq & 7); if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) + gpio_int_type2[port] ^= port_mask; /* switch edge direction */ - eic->int_type2 ^= port_mask; /* switch edge direction */ + gpio_int_unmasked[port] &= ~port_mask; + ep93xx_gpio_update_int_params(epg, port); - eic->int_unmasked &= ~port_mask; - ep93xx_gpio_update_int_params(epg, eic); + writeb(port_mask, epg->base + eoi_register_offset[port]); - writeb(port_mask, epg->base + eic->irq_offset + EP93XX_INT_EOI_OFFSET); } static void ep93xx_gpio_irq_mask(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = ep93xx_gpio_port(gc); + gpio_int_unmasked[port] &= ~BIT(d->irq & 7); + ep93xx_gpio_update_int_params(epg, port); - eic->int_unmasked &= ~BIT(d->irq & 7); - ep93xx_gpio_update_int_params(epg, eic); } static void ep93xx_gpio_irq_unmask(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = ep93xx_gpio_port(gc); + gpio_int_unmasked[port] |= BIT(d->irq & 7); + ep93xx_gpio_update_int_params(epg, port); - eic->int_unmasked |= BIT(d->irq & 7); - ep93xx_gpio_update_int_params(epg, eic); } /* @@ -213,8 +209,8 @@ static int ep93xx_gpio_irq_type(struct irq_data *d, unsigned int type) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); struct ep93xx_gpio *epg = gpiochip_get_data(gc); + int port = ep93xx_gpio_port(gc); int offset = d->irq & 7; int port_mask = BIT(offset); irq_flow_handler_t handler; @@ -223,32 +219,32 @@ switch (type) { case IRQ_TYPE_EDGE_RISING: + gpio_int_type1[port] |= port_mask; + gpio_int_type2[port] |= port_mask; - eic->int_type1 |= port_mask; - eic->int_type2 |= port_mask; handler = handle_edge_irq; break; case IRQ_TYPE_EDGE_FALLING: + gpio_int_type1[port] |= port_mask; + gpio_int_type2[port] &= ~port_mask; - eic->int_type1 |= port_mask; - eic->int_type2 &= ~port_mask; handler = handle_edge_irq; break; case IRQ_TYPE_LEVEL_HIGH: + gpio_int_type1[port] &= ~port_mask; + gpio_int_type2[port] |= port_mask; - eic->int_type1 &= ~port_mask; - eic->int_type2 |= port_mask; handler = handle_level_irq; break; case IRQ_TYPE_LEVEL_LOW: + gpio_int_type1[port] &= ~port_mask; + gpio_int_type2[port] &= ~port_mask; - eic->int_type1 &= ~port_mask; - eic->int_type2 &= ~port_mask; handler = handle_level_irq; break; case IRQ_TYPE_EDGE_BOTH: + gpio_int_type1[port] |= port_mask; - eic->int_type1 |= port_mask; /* set initial polarity based on current input level */ if (gc->get(gc, offset)) + gpio_int_type2[port] &= ~port_mask; /* falling */ - eic->int_type2 &= ~port_mask; /* falling */ else + gpio_int_type2[port] |= port_mask; /* rising */ - eic->int_type2 |= port_mask; /* rising */ handler = handle_edge_irq; break; default: @@ -257,13 +253,22 @@ irq_set_handler_locked(d, handler); + gpio_int_enabled[port] |= port_mask; - eic->int_enabled |= port_mask; + ep93xx_gpio_update_int_params(epg, port); - ep93xx_gpio_update_int_params(epg, eic); return 0; } +static struct irq_chip ep93xx_gpio_irq_chip = { + .name = "GPIO", + .irq_ack = ep93xx_gpio_irq_ack, + .irq_mask_ack = ep93xx_gpio_irq_mask_ack, + .irq_mask = ep93xx_gpio_irq_mask, + .irq_unmask = ep93xx_gpio_irq_unmask, + .irq_set_type = ep93xx_gpio_irq_type, +}; + /************************************************************************* * gpiolib interface for EP93xx on-chip GPIOs *************************************************************************/ @@ -271,19 +276,17 @@ const char *label; int data; int dir; - int irq; int base; bool has_irq; bool has_hierarchical_irq; unsigned int irq_base; }; +#define EP93XX_GPIO_BANK(_label, _data, _dir, _base, _has_irq, _has_hier, _irq_base) \ -#define EP93XX_GPIO_BANK(_label, _data, _dir, _irq, _base, _has_irq, _has_hier, _irq_base) \ { \ .label = _label, \ .data = _data, \ .dir = _dir, \ - .irq = _irq, \ .base = _base, \ .has_irq = _has_irq, \ .has_hierarchical_irq = _has_hier, \ @@ -292,16 +295,16 @@ static struct ep93xx_gpio_bank ep93xx_gpio_banks[] = { /* Bank A has 8 IRQs */ + EP93XX_GPIO_BANK("A", 0x00, 0x10, 0, true, false, 64), - EP93XX_GPIO_BANK("A", 0x00, 0x10, 0x90, 0, true, false, 64), /* Bank B has 8 IRQs */ + EP93XX_GPIO_BANK("B", 0x04, 0x14, 8, true, false, 72), + EP93XX_GPIO_BANK("C", 0x08, 0x18, 40, false, false, 0), + EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24, false, false, 0), + EP93XX_GPIO_BANK("E", 0x20, 0x24, 32, false, false, 0), - EP93XX_GPIO_BANK("B", 0x04, 0x14, 0xac, 8, true, false, 72), - EP93XX_GPIO_BANK("C", 0x08, 0x18, 0x00, 40, false, false, 0), - EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 0x00, 24, false, false, 0), - EP93XX_GPIO_BANK("E", 0x20, 0x24, 0x00, 32, false, false, 0), /* Bank F has 8 IRQs */ + EP93XX_GPIO_BANK("F", 0x30, 0x34, 16, false, true, 0), + EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48, false, false, 0), + EP93XX_GPIO_BANK("H", 0x40, 0x44, 56, false, false, 0), - EP93XX_GPIO_BANK("F", 0x30, 0x34, 0x4c, 16, false, true, 0), - EP93XX_GPIO_BANK("G", 0x38, 0x3c, 0x00, 48, false, false, 0), - EP93XX_GPIO_BANK("H", 0x40, 0x44, 0x00, 56, false, false, 0), }; static int ep93xx_gpio_set_config(struct gpio_chip *gc, unsigned offset, @@ -323,23 +326,13 @@ return EP93XX_GPIO_F_IRQ_BASE + offset; } +static int ep93xx_gpio_add_bank(struct gpio_chip *gc, -static void ep93xx_init_irq_chip(struct device *dev, struct irq_chip *ic) -{ - ic->irq_ack = ep93xx_gpio_irq_ack; - ic->irq_mask_ack = ep93xx_gpio_irq_mask_ack; - ic->irq_mask = ep93xx_gpio_irq_mask; - ic->irq_unmask = ep93xx_gpio_irq_unmask; - ic->irq_set_type = ep93xx_gpio_irq_type; -} - -static int ep93xx_gpio_add_bank(struct ep93xx_gpio_chip *egc, struct platform_device *pdev, struct ep93xx_gpio *epg, struct ep93xx_gpio_bank *bank) { void __iomem *data = epg->base + bank->data; void __iomem *dir = epg->base + bank->dir; - struct gpio_chip *gc = &egc->gc; struct device *dev = &pdev->dev; struct gpio_irq_chip *girq; int err; @@ -353,21 +346,8 @@ girq = &gc->irq; if (bank->has_irq || bank->has_hierarchical_irq) { - struct irq_chip *ic; - gc->set_config = ep93xx_gpio_set_config; + girq->chip = &ep93xx_gpio_irq_chip; - egc->eic = devm_kcalloc(dev, 1, - sizeof(*egc->eic), - GFP_KERNEL); - if (!egc->eic) - return -ENOMEM; - egc->eic->irq_offset = bank->irq; - ic = &egc->eic->ic; - ic->name = devm_kasprintf(dev, GFP_KERNEL, "gpio-irq-%s", bank->label); - if (!ic->name) - return -ENOMEM; - ep93xx_init_irq_chip(dev, ic); - girq->chip = ic; } if (bank->has_irq) { @@ -409,7 +389,7 @@ gpio_irq = EP93XX_GPIO_F_IRQ_BASE + i; irq_set_chip_data(gpio_irq, &epg->gc[5]); irq_set_chip_and_handler(gpio_irq, + &ep93xx_gpio_irq_chip, - girq->chip, handle_level_irq); irq_clear_status_flags(gpio_irq, IRQ_NOREQUEST); } @@ -435,7 +415,7 @@ return PTR_ERR(epg->base); for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) { + struct gpio_chip *gc = &epg->gc[i]; - struct ep93xx_gpio_chip *gc = &epg->gc[i]; struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i]; if (ep93xx_gpio_add_bank(gc, pdev, epg, bank)) reverted: --- linux-oem-5.10-5.10.0/drivers/gpio/gpio-mvebu.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpio/gpio-mvebu.c @@ -660,8 +660,9 @@ spin_lock_irqsave(&mvpwm->lock, flags); + val = (unsigned long long) + readl_relaxed(mvebu_pwmreg_blink_on_duration(mvpwm)); + val *= NSEC_PER_SEC; - u = readl_relaxed(mvebu_pwmreg_blink_on_duration(mvpwm)); - val = (unsigned long long) u * NSEC_PER_SEC; do_div(val, mvpwm->clk_rate); if (val > UINT_MAX) state->duty_cycle = UINT_MAX; @@ -670,17 +671,21 @@ else state->duty_cycle = 1; + val = (unsigned long long) + readl_relaxed(mvebu_pwmreg_blink_off_duration(mvpwm)); - val = (unsigned long long) u; /* on duration */ - /* period = on + off duration */ - val += readl_relaxed(mvebu_pwmreg_blink_off_duration(mvpwm)); val *= NSEC_PER_SEC; do_div(val, mvpwm->clk_rate); + if (val < state->duty_cycle) { - if (val > UINT_MAX) - state->period = UINT_MAX; - else if (val) - state->period = val; - else state->period = 1; + } else { + val -= state->duty_cycle; + if (val > UINT_MAX) + state->period = UINT_MAX; + else if (val) + state->period = val; + else + state->period = 1; + } regmap_read(mvchip->regs, GPIO_BLINK_EN_OFF + mvchip->offset, &u); if (u) diff -u linux-oem-5.10-5.10.0/drivers/gpio/gpiolib-cdev.c linux-oem-5.10-5.10.0/drivers/gpio/gpiolib-cdev.c --- linux-oem-5.10-5.10.0/drivers/gpio/gpiolib-cdev.c +++ linux-oem-5.10-5.10.0/drivers/gpio/gpiolib-cdev.c @@ -756,8 +756,6 @@ cancel_delayed_work_sync(&line->work); WRITE_ONCE(line->sw_debounced, 0); line->eflags = 0; - if (line->desc) - WRITE_ONCE(line->desc->debounce_period_us, 0); /* do not change line->level - see comment in debounced_value() */ } diff -u linux-oem-5.10-5.10.0/drivers/gpio/gpiolib.c linux-oem-5.10-5.10.0/drivers/gpio/gpiolib.c --- linux-oem-5.10-5.10.0/drivers/gpio/gpiolib.c +++ linux-oem-5.10-5.10.0/drivers/gpio/gpiolib.c @@ -602,11 +602,7 @@ ret = gdev->id; goto err_free_gdev; } - - ret = dev_set_name(&gdev->dev, GPIOCHIP_NAME "%d", gdev->id); - if (ret) - goto err_free_ida; - + dev_set_name(&gdev->dev, GPIOCHIP_NAME "%d", gdev->id); device_initialize(&gdev->dev); dev_set_drvdata(&gdev->dev, gdev); if (gc->parent && gc->parent->driver) @@ -620,7 +616,7 @@ gdev->descs = kcalloc(gc->ngpio, sizeof(gdev->descs[0]), GFP_KERNEL); if (!gdev->descs) { ret = -ENOMEM; - goto err_free_dev_name; + goto err_free_ida; } if (gc->ngpio == 0) { @@ -771,8 +767,6 @@ kfree_const(gdev->label); err_free_descs: kfree(gdev->descs); -err_free_dev_name: - kfree(dev_name(&gdev->dev)); err_free_ida: ida_free(&gpio_ida, gdev->id); err_free_gdev: reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1792,8 +1792,8 @@ link->type = dc_connection_none; prev_sink = link->local_sink; + if (prev_sink != NULL) + dc_sink_retain(prev_sink); - if (prev_sink) - dc_sink_release(prev_sink); switch (link->connector_signal) { case SIGNAL_TYPE_HDMI_TYPE_A: { @@ -2261,10 +2261,8 @@ * TODO: check if we still need the S3 mode update workaround. * If yes, put it here. */ + if (aconnector->dc_sink) - if (aconnector->dc_sink) { amdgpu_dm_update_freesync_caps(connector, NULL); - dc_sink_release(aconnector->dc_sink); - } aconnector->dc_sink = sink; dc_sink_retain(aconnector->dc_sink); @@ -2280,6 +2278,8 @@ drm_connector_update_edid_property(connector, aconnector->edid); + drm_add_edid_modes(connector, aconnector->edid); + if (aconnector->dc_link->aux_mode) drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux, aconnector->edid); @@ -7872,14 +7872,14 @@ ret = PTR_ERR_OR_ZERO(conn_state); if (ret) + goto err; - goto out; /* Attach crtc to drm_atomic_state*/ crtc_state = drm_atomic_get_crtc_state(state, &disconnected_acrtc->base); ret = PTR_ERR_OR_ZERO(crtc_state); if (ret) + goto err; - goto out; /* force a restore */ crtc_state->mode_changed = true; @@ -7889,15 +7889,17 @@ ret = PTR_ERR_OR_ZERO(plane_state); if (ret) + goto err; + - goto out; /* Call commit internally with the state we just constructed */ ret = drm_atomic_commit(state); + if (!ret) + return 0; +err: + DRM_ERROR("Restoring old state failed with %i\n", ret); -out: drm_atomic_state_put(state); - if (ret) - DRM_ERROR("Restoring old state failed with %i\n", ret); return ret; } reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -828,9 +828,6 @@ if (computed_streams[i]) continue; - if (dcn20_remove_stream_from_ctx(stream->ctx->dc, dc_state, stream) != DC_OK) - return false; - mutex_lock(&aconnector->mst_mgr.lock); if (!compute_mst_dsc_configs_for_link(state, dc_state, stream->link)) { mutex_unlock(&aconnector->mst_mgr.lock); @@ -848,8 +845,7 @@ stream = dc_state->streams[i]; if (stream->timing.flags.DSC == 1) + dc_stream_add_dsc_to_resource(stream->ctx->dc, dc_state, stream); - if (dc_stream_add_dsc_to_resource(stream->ctx->dc, dc_state, stream) != DC_OK) - return false; } return true; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c @@ -239,7 +239,6 @@ struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu; bool force_reset = false; bool update_uclk = false; - bool p_state_change_support; if (dc->work_arounds.skip_clock_update || !clk_mgr->smu_present) return; @@ -280,9 +279,8 @@ clk_mgr_base->clks.socclk_khz = new_clocks->socclk_khz; clk_mgr_base->clks.prev_p_state_change_support = clk_mgr_base->clks.p_state_change_support; + if (should_update_pstate_support(safe_to_lower, new_clocks->p_state_change_support, clk_mgr_base->clks.p_state_change_support)) { + clk_mgr_base->clks.p_state_change_support = new_clocks->p_state_change_support; - p_state_change_support = new_clocks->p_state_change_support || (display_count == 0); - if (should_update_pstate_support(safe_to_lower, p_state_change_support, clk_mgr_base->clks.p_state_change_support)) { - clk_mgr_base->clks.p_state_change_support = p_state_change_support; /* to disable P-State switching, set UCLK min = max */ if (!clk_mgr_base->clks.p_state_change_support) diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -877,13 +877,13 @@ switch (dpcd_aux_read_interval) { case 0x01: - aux_rd_interval_us = 4000; + aux_rd_interval_us = 400; break; case 0x02: - aux_rd_interval_us = 8000; + aux_rd_interval_us = 4000; break; case 0x03: - aux_rd_interval_us = 12000; + aux_rd_interval_us = 8000; break; case 0x04: aux_rd_interval_us = 16000; @@ -2375,9 +2375,6 @@ initial_link_setting; uint32_t link_bw; - if (req_bw > dc_link_bandwidth_kbps(link, &link->verified_link_cap)) - return false; - /* search for the minimum link setting that: * 1. is supported according to the link training result * 2. could support the b/w requested by the timing @@ -3023,14 +3020,14 @@ for (i = 0; i < MAX_PIPES; i++) { pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i]; if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off && - pipe_ctx->stream->link == link && !pipe_ctx->prev_odm_pipe) + pipe_ctx->stream->link == link) core_link_disable_stream(pipe_ctx); } for (i = 0; i < MAX_PIPES; i++) { pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i]; if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off && - pipe_ctx->stream->link == link && !pipe_ctx->prev_odm_pipe) + pipe_ctx->stream->link == link) core_link_enable_stream(link->dc->current_state, pipe_ctx); } reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -646,13 +646,8 @@ if (REG(DC_IP_REQUEST_CNTL)) { REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1); + hws->funcs.dpp_pg_control(hws, plane_id, true); + hws->funcs.hubp_pg_control(hws, plane_id, true); - - if (hws->funcs.dpp_pg_control) - hws->funcs.dpp_pg_control(hws, plane_id, true); - - if (hws->funcs.hubp_pg_control) - hws->funcs.hubp_pg_control(hws, plane_id, true); - REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 0); DC_LOG_DEBUG( @@ -1084,13 +1079,8 @@ if (REG(DC_IP_REQUEST_CNTL)) { REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1); + hws->funcs.dpp_pg_control(hws, dpp->inst, false); + hws->funcs.hubp_pg_control(hws, hubp->inst, false); - - if (hws->funcs.dpp_pg_control) - hws->funcs.dpp_pg_control(hws, dpp->inst, false); - - if (hws->funcs.hubp_pg_control) - hws->funcs.hubp_pg_control(hws, hubp->inst, false); - dpp->funcs->dpp_reset(dpp); REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 0); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c @@ -1069,13 +1069,8 @@ if (REG(DC_IP_REQUEST_CNTL)) { REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1); + dcn20_dpp_pg_control(hws, pipe_ctx->plane_res.dpp->inst, true); + dcn20_hubp_pg_control(hws, pipe_ctx->plane_res.hubp->inst, true); - - if (hws->funcs.dpp_pg_control) - hws->funcs.dpp_pg_control(hws, pipe_ctx->plane_res.dpp->inst, true); - - if (hws->funcs.hubp_pg_control) - hws->funcs.hubp_pg_control(hws, pipe_ctx->plane_res.hubp->inst, true); - REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 0); DC_LOG_DEBUG( diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -297,8 +297,8 @@ }, }, .num_states = 5, - .sr_exit_time_us = 8.6, - .sr_enter_plus_exit_time_us = 10.9, + .sr_exit_time_us = 11.6, + .sr_enter_plus_exit_time_us = 13.9, .urgent_latency_us = 4.0, .urgent_latency_pixel_data_only_us = 4.0, .urgent_latency_pixel_mixed_with_vm_data_us = 4.0, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c @@ -295,7 +295,7 @@ .num_banks = 8, .num_chans = 4, .vmm_page_size_bytes = 4096, + .dram_clock_change_latency_us = 23.84, - .dram_clock_change_latency_us = 11.72, .return_bus_width_bytes = 64, .dispclk_dppclk_vco_speed_mhz = 3600, .xfc_bus_transport_time_us = 4, @@ -902,8 +902,6 @@ DCN20_CLK_SRC_PLL0, DCN20_CLK_SRC_PLL1, DCN20_CLK_SRC_PLL2, - DCN20_CLK_SRC_PLL3, - DCN20_CLK_SRC_PLL4, DCN20_CLK_SRC_TOTAL_DCN21 }; @@ -1882,14 +1880,6 @@ dcn21_clock_source_create(ctx, ctx->dc_bios, CLOCK_SOURCE_COMBO_PHY_PLL2, &clk_src_regs[2], false); - pool->base.clock_sources[DCN20_CLK_SRC_PLL3] = - dcn21_clock_source_create(ctx, ctx->dc_bios, - CLOCK_SOURCE_COMBO_PHY_PLL3, - &clk_src_regs[3], false); - pool->base.clock_sources[DCN20_CLK_SRC_PLL4] = - dcn21_clock_source_create(ctx, ctx->dc_bios, - CLOCK_SOURCE_COMBO_PHY_PLL4, - &clk_src_regs[4], false); pool->base.clk_src_count = DCN20_CLK_SRC_TOTAL_DCN21; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h @@ -575,7 +575,6 @@ int (*conv_power_profile_to_pplib_workload)(int power_profile); uint32_t (*get_fan_control_mode)(struct smu_context *smu); int (*set_fan_control_mode)(struct smu_context *smu, uint32_t mode); - int (*set_fan_speed_percent)(struct smu_context *smu, uint32_t speed); int (*set_fan_speed_rpm)(struct smu_context *smu, uint32_t speed); int (*set_xgmi_pstate)(struct smu_context *smu, uint32_t pstate); int (*gfx_off_control)(struct smu_context *smu, bool enable); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h @@ -200,9 +200,6 @@ smu_v11_0_set_fan_control_mode(struct smu_context *smu, uint32_t mode); -int -smu_v11_0_set_fan_speed_percent(struct smu_context *smu, uint32_t speed); - int smu_v11_0_set_fan_speed_rpm(struct smu_context *smu, uint32_t speed); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -2255,14 +2255,19 @@ int smu_set_fan_speed_percent(struct smu_context *smu, uint32_t speed) { int ret = 0; + uint32_t rpm; if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled) return -EOPNOTSUPP; mutex_lock(&smu->mutex); + if (smu->ppt_funcs->set_fan_speed_rpm) { + if (speed > 100) + speed = 100; + rpm = speed * smu->fan_max_rpm / 100; + ret = smu->ppt_funcs->set_fan_speed_rpm(smu, rpm); + } - if (smu->ppt_funcs->set_fan_speed_percent) - ret = smu->ppt_funcs->set_fan_speed_percent(smu, speed); mutex_unlock(&smu->mutex); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c @@ -2366,7 +2366,6 @@ .display_clock_voltage_request = smu_v11_0_display_clock_voltage_request, .get_fan_control_mode = smu_v11_0_get_fan_control_mode, .set_fan_control_mode = smu_v11_0_set_fan_control_mode, - .set_fan_speed_percent = smu_v11_0_set_fan_speed_percent, .set_fan_speed_rpm = smu_v11_0_set_fan_speed_rpm, .set_xgmi_pstate = smu_v11_0_set_xgmi_pstate, .gfx_off_control = smu_v11_0_gfx_off_control, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2710,7 +2710,6 @@ .display_clock_voltage_request = smu_v11_0_display_clock_voltage_request, .get_fan_control_mode = smu_v11_0_get_fan_control_mode, .set_fan_control_mode = smu_v11_0_set_fan_control_mode, - .set_fan_speed_percent = smu_v11_0_set_fan_speed_percent, .set_fan_speed_rpm = smu_v11_0_set_fan_speed_rpm, .set_xgmi_pstate = smu_v11_0_set_xgmi_pstate, .gfx_off_control = smu_v11_0_gfx_off_control, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -2776,7 +2776,6 @@ .display_clock_voltage_request = smu_v11_0_display_clock_voltage_request, .get_fan_control_mode = smu_v11_0_get_fan_control_mode, .set_fan_control_mode = smu_v11_0_set_fan_control_mode, - .set_fan_speed_percent = smu_v11_0_set_fan_speed_percent, .set_fan_speed_rpm = smu_v11_0_set_fan_speed_rpm, .set_xgmi_pstate = smu_v11_0_set_xgmi_pstate, .gfx_off_control = smu_v11_0_gfx_off_control, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c @@ -1123,35 +1123,6 @@ } int -smu_v11_0_set_fan_speed_percent(struct smu_context *smu, uint32_t speed) -{ - struct amdgpu_device *adev = smu->adev; - uint32_t duty100, duty; - uint64_t tmp64; - - if (speed > 100) - speed = 100; - - if (smu_v11_0_auto_fan_control(smu, 0)) - return -EINVAL; - - duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), - CG_FDO_CTRL1, FMAX_DUTY100); - if (!duty100) - return -EINVAL; - - tmp64 = (uint64_t)speed * duty100; - do_div(tmp64, 100); - duty = (uint32_t)tmp64; - - WREG32_SOC15(THM, 0, mmCG_FDO_CTRL0, - REG_SET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL0), - CG_FDO_CTRL0, FDO_STATIC_DUTY, duty)); - - return smu_v11_0_set_fan_static_mode(smu, FDO_PWM_MODE_STATIC); -} - -int smu_v11_0_set_fan_control_mode(struct smu_context *smu, uint32_t mode) { @@ -1159,7 +1130,7 @@ switch (mode) { case AMD_FAN_CTRL_NONE: + ret = smu_v11_0_set_fan_speed_rpm(smu, smu->fan_max_rpm); - ret = smu_v11_0_set_fan_speed_percent(smu, 100); break; case AMD_FAN_CTRL_MANUAL: ret = smu_v11_0_auto_fan_control(smu, 0); diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/drm_dp_mst_topology.c linux-oem-5.10-5.10.0/drivers/gpu/drm/drm_dp_mst_topology.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/drm_dp_mst_topology.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/drm_dp_mst_topology.c @@ -4224,7 +4224,6 @@ switch (port->pdt) { case DP_PEER_DEVICE_NONE: - break; case DP_PEER_DEVICE_MST_BRANCHING: if (!port->mcs) ret = connector_status_connected; diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_ddi.c linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_ddi.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_ddi.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_ddi.c @@ -2676,15 +2676,13 @@ int n_entries, ln; u32 val; - if (enc_to_dig_port(encoder)->tc_mode == TC_PORT_TBT_ALT) - return; - ddi_translations = icl_get_mg_buf_trans(encoder, crtc_state, &n_entries); - if (level >= n_entries) { + /* The table does not have values for level 3 and level 9. */ + if (level >= n_entries || level == 3 || level == 9) { drm_dbg_kms(&dev_priv->drm, "DDI translation not found for level %d. Using %d instead.", - level, n_entries - 1); - level = n_entries - 1; + level, n_entries - 2); + level = n_entries - 2; } /* Set MG_TX_LINK_PARAMS cri_use_fs32 to 0. */ @@ -2815,9 +2813,6 @@ u32 val, dpcnt_mask, dpcnt_val; int n_entries, ln; - if (enc_to_dig_port(encoder)->tc_mode == TC_PORT_TBT_ALT) - return; - ddi_translations = tgl_get_dkl_buf_trans(encoder, crtc_state, &n_entries); if (level >= n_entries) @@ -3346,23 +3341,6 @@ intel_de_posting_read(dev_priv, intel_dp->regs.dp_tp_ctl); } -static void intel_ddi_power_up_lanes(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state) -{ - struct drm_i915_private *i915 = to_i915(encoder->base.dev); - struct intel_digital_port *dig_port = enc_to_dig_port(encoder); - enum phy phy = intel_port_to_phy(i915, encoder->port); - - if (intel_phy_is_combo(i915, phy)) { - bool lane_reversal = - dig_port->saved_port_bits & DDI_BUF_PORT_REVERSAL; - - intel_combo_phy_power_up_lanes(i915, phy, false, - crtc_state->lane_count, - lane_reversal); - } -} - static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state, struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, @@ -3456,7 +3434,14 @@ * 7.f Combo PHY: Configure PORT_CL_DW10 Static Power Down to power up * the used lanes of the DDI. */ - intel_ddi_power_up_lanes(encoder, crtc_state); + if (intel_phy_is_combo(dev_priv, phy)) { + bool lane_reversal = + dig_port->saved_port_bits & DDI_BUF_PORT_REVERSAL; + + intel_combo_phy_power_up_lanes(dev_priv, phy, false, + crtc_state->lane_count, + lane_reversal); + } /* * 7.g Configure and enable DDI_BUF_CTL @@ -3540,7 +3525,14 @@ else intel_prepare_dp_ddi_buffers(encoder, crtc_state); - intel_ddi_power_up_lanes(encoder, crtc_state); + if (intel_phy_is_combo(dev_priv, phy)) { + bool lane_reversal = + dig_port->saved_port_bits & DDI_BUF_PORT_REVERSAL; + + intel_combo_phy_power_up_lanes(dev_priv, phy, false, + crtc_state->lane_count, + lane_reversal); + } intel_ddi_init_dp_buf_reg(encoder, crtc_state); if (!is_mst) @@ -4008,8 +4000,6 @@ intel_de_write(dev_priv, reg, val); } - intel_ddi_power_up_lanes(encoder, crtc_state); - /* In HDMI/DVI mode, the port width, and swing/emphasis values * are ignored so nothing special needs to be done besides * enabling the port. diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_display.c linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_display.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_display.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_display.c @@ -2294,7 +2294,7 @@ */ ret = i915_vma_pin_fence(vma); if (ret != 0 && INTEL_GEN(dev_priv) < 4) { - i915_vma_unpin(vma); + i915_gem_object_unpin_from_display_plane(vma); vma = ERR_PTR(ret); goto err; } @@ -2312,9 +2312,12 @@ void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags) { + i915_gem_object_lock(vma->obj, NULL); if (flags & PLANE_HAS_FENCE) i915_vma_unpin_fence(vma); - i915_vma_unpin(vma); + i915_gem_object_unpin_from_display_plane(vma); + i915_gem_object_unlock(vma->obj); + i915_vma_put(vma); } @@ -4880,8 +4883,6 @@ plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE; } else if (fb->format->is_yuv) { plane_color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE; - if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE) - plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE; } return plane_color_ctl; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_overlay.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/display/intel_overlay.c @@ -182,7 +182,6 @@ struct intel_crtc *crtc; struct i915_vma *vma; struct i915_vma *old_vma; - struct intel_frontbuffer *frontbuffer; bool active; bool pfit_active; u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */ @@ -283,19 +282,21 @@ struct i915_vma *vma) { enum pipe pipe = overlay->crtc->pipe; + struct intel_frontbuffer *from = NULL, *to = NULL; - struct intel_frontbuffer *frontbuffer = NULL; drm_WARN_ON(&overlay->i915->drm, overlay->old_vma); + if (overlay->vma) + from = intel_frontbuffer_get(overlay->vma->obj); if (vma) + to = intel_frontbuffer_get(vma->obj); - frontbuffer = intel_frontbuffer_get(vma->obj); + intel_frontbuffer_track(from, to, INTEL_FRONTBUFFER_OVERLAY(pipe)); - intel_frontbuffer_track(overlay->frontbuffer, frontbuffer, - INTEL_FRONTBUFFER_OVERLAY(pipe)); + if (to) + intel_frontbuffer_put(to); + if (from) + intel_frontbuffer_put(from); - if (overlay->frontbuffer) - intel_frontbuffer_put(overlay->frontbuffer); - overlay->frontbuffer = frontbuffer; intel_frontbuffer_flip_prepare(overlay->i915, INTEL_FRONTBUFFER_OVERLAY(pipe)); @@ -358,7 +359,7 @@ intel_frontbuffer_flip_complete(overlay->i915, INTEL_FRONTBUFFER_OVERLAY(overlay->crtc->pipe)); + i915_gem_object_unpin_from_display_plane(vma); - i915_vma_unpin(vma); i915_vma_put(vma); } @@ -859,7 +860,7 @@ return 0; out_unpin: + i915_gem_object_unpin_from_display_plane(vma); - i915_vma_unpin(vma); out_pin_section: atomic_dec(&dev_priv->gpu_error.pending_fb_pin); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_sprite.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/display/intel_sprite.c @@ -469,19 +469,13 @@ /* Preoffset values for YUV to RGB Conversion */ #define PREOFF_YUV_TO_RGB_HI 0x1800 +#define PREOFF_YUV_TO_RGB_ME 0x1F00 -#define PREOFF_YUV_TO_RGB_ME 0x0000 #define PREOFF_YUV_TO_RGB_LO 0x1800 #define ROFF(x) (((x) & 0xffff) << 16) #define GOFF(x) (((x) & 0xffff) << 0) #define BOFF(x) (((x) & 0xffff) << 16) -/* - * Programs the input color space conversion stage for ICL HDR planes. - * Note that it is assumed that this stage always happens after YUV - * range correction. Thus, the input to this stage is assumed to be - * in full-range YCbCr. - */ static void icl_program_input_csc(struct intel_plane *plane, const struct intel_crtc_state *crtc_state, @@ -529,7 +523,52 @@ 0x0, 0x7800, 0x7F10, }, }; + + /* Matrix for Limited Range to Full Range Conversion */ + static const u16 input_csc_matrix_lr[][9] = { + /* + * BT.601 Limted range YCbCr -> full range RGB + * The matrix required is : + * [1.164384, 0.000, 1.596027, + * 1.164384, -0.39175, -0.812813, + * 1.164384, 2.017232, 0.0000] + */ + [DRM_COLOR_YCBCR_BT601] = { + 0x7CC8, 0x7950, 0x0, + 0x8D00, 0x7950, 0x9C88, + 0x0, 0x7950, 0x6810, + }, + /* + * BT.709 Limited range YCbCr -> full range RGB + * The matrix required is : + * [1.164384, 0.000, 1.792741, + * 1.164384, -0.213249, -0.532909, + * 1.164384, 2.112402, 0.0000] + */ + [DRM_COLOR_YCBCR_BT709] = { + 0x7E58, 0x7950, 0x0, + 0x8888, 0x7950, 0xADA8, + 0x0, 0x7950, 0x6870, + }, + /* + * BT.2020 Limited range YCbCr -> full range RGB + * The matrix required is : + * [1.164, 0.000, 1.678, + * 1.164, -0.1873, -0.6504, + * 1.164, 2.1417, 0.0000] + */ + [DRM_COLOR_YCBCR_BT2020] = { + 0x7D70, 0x7950, 0x0, + 0x8A68, 0x7950, 0xAC00, + 0x0, 0x7950, 0x6890, + }, + }; + const u16 *csc; + + if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE) + csc = input_csc_matrix[plane_state->hw.color_encoding]; + else + csc = input_csc_matrix_lr[plane_state->hw.color_encoding]; - const u16 *csc = input_csc_matrix[plane_state->hw.color_encoding]; intel_de_write_fw(dev_priv, PLANE_INPUT_CSC_COEFF(pipe, plane_id, 0), ROFF(csc[0]) | GOFF(csc[1])); @@ -546,8 +585,14 @@ intel_de_write_fw(dev_priv, PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 0), PREOFF_YUV_TO_RGB_HI); + if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE) + intel_de_write_fw(dev_priv, + PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1), + 0); + else + intel_de_write_fw(dev_priv, + PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1), + PREOFF_YUV_TO_RGB_ME); - intel_de_write_fw(dev_priv, PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1), - PREOFF_YUV_TO_RGB_ME); intel_de_write_fw(dev_priv, PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 2), PREOFF_YUV_TO_RGB_LO); intel_de_write_fw(dev_priv, diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_tc.c linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_tc.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_tc.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/display/intel_tc.c @@ -23,6 +23,36 @@ return names[mode]; } +static void +tc_port_load_fia_params(struct drm_i915_private *i915, + struct intel_digital_port *dig_port) +{ + enum port port = dig_port->base.port; + enum tc_port tc_port = intel_port_to_tc(i915, port); + u32 modular_fia; + + if (INTEL_INFO(i915)->display.has_modular_fia) { + modular_fia = intel_uncore_read(&i915->uncore, + PORT_TX_DFLEXDPSP(FIA1)); + drm_WARN_ON(&i915->drm, modular_fia == 0xffffffff); + modular_fia &= MODULAR_FIA_MASK; + } else { + modular_fia = 0; + } + + /* + * Each Modular FIA instance houses 2 TC ports. In SOC that has more + * than two TC ports, there are multiple instances of Modular FIA. + */ + if (modular_fia) { + dig_port->tc_phy_fia = tc_port / 2; + dig_port->tc_phy_fia_idx = tc_port % 2; + } else { + dig_port->tc_phy_fia = FIA1; + dig_port->tc_phy_fia_idx = tc_port; + } +} + static enum intel_display_power_domain tc_cold_get_power_domain(struct intel_digital_port *dig_port) { @@ -616,43 +646,6 @@ mutex_unlock(&dig_port->tc_lock); } -static bool -tc_has_modular_fia(struct drm_i915_private *i915, struct intel_digital_port *dig_port) -{ - intel_wakeref_t wakeref; - u32 val; - - if (!INTEL_INFO(i915)->display.has_modular_fia) - return false; - - wakeref = tc_cold_block(dig_port); - val = intel_uncore_read(&i915->uncore, PORT_TX_DFLEXDPSP(FIA1)); - tc_cold_unblock(dig_port, wakeref); - - drm_WARN_ON(&i915->drm, val == 0xffffffff); - - return val & MODULAR_FIA_MASK; -} - -static void -tc_port_load_fia_params(struct drm_i915_private *i915, struct intel_digital_port *dig_port) -{ - enum port port = dig_port->base.port; - enum tc_port tc_port = intel_port_to_tc(i915, port); - - /* - * Each Modular FIA instance houses 2 TC ports. In SOC that has more - * than two TC ports, there are multiple instances of Modular FIA. - */ - if (tc_has_modular_fia(i915, dig_port)) { - dig_port->tc_phy_fia = tc_port / 2; - dig_port->tc_phy_fia_idx = tc_port % 2; - } else { - dig_port->tc_phy_fia = FIA1; - dig_port->tc_phy_fia_idx = tc_port; - } -} - void intel_tc_port_init(struct intel_digital_port *dig_port, bool is_legacy) { struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gem/i915_gem_domain.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/gem/i915_gem_domain.c @@ -387,6 +387,48 @@ return vma; } +static void i915_gem_object_bump_inactive_ggtt(struct drm_i915_gem_object *obj) +{ + struct drm_i915_private *i915 = to_i915(obj->base.dev); + struct i915_vma *vma; + + if (list_empty(&obj->vma.list)) + return; + + mutex_lock(&i915->ggtt.vm.mutex); + spin_lock(&obj->vma.lock); + for_each_ggtt_vma(vma, obj) { + if (!drm_mm_node_allocated(&vma->node)) + continue; + + GEM_BUG_ON(vma->vm != &i915->ggtt.vm); + list_move_tail(&vma->vm_link, &vma->vm->bound_list); + } + spin_unlock(&obj->vma.lock); + mutex_unlock(&i915->ggtt.vm.mutex); + + if (i915_gem_object_is_shrinkable(obj)) { + unsigned long flags; + + spin_lock_irqsave(&i915->mm.obj_lock, flags); + + if (obj->mm.madv == I915_MADV_WILLNEED && + !atomic_read(&obj->mm.shrink_pin)) + list_move_tail(&obj->mm.link, &i915->mm.shrink_list); + + spin_unlock_irqrestore(&i915->mm.obj_lock, flags); + } +} + +void +i915_gem_object_unpin_from_display_plane(struct i915_vma *vma) +{ + /* Bump the LRU to try and avoid premature eviction whilst flipping */ + i915_gem_object_bump_inactive_ggtt(vma->obj); + + i915_vma_unpin(vma); +} + /** * Moves a single object to the CPU read, and possibly write domain. * @obj: object to act on @@ -527,6 +569,9 @@ else err = i915_gem_object_set_to_cpu_domain(obj, write_domain); + /* And bump the LRU for this access */ + i915_gem_object_bump_inactive_ggtt(obj); + i915_gem_object_unlock(obj); if (write_domain) reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gem/i915_gem_object.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/gem/i915_gem_object.h @@ -471,6 +471,7 @@ u32 alignment, const struct i915_ggtt_view *view, unsigned int flags); +void i915_gem_object_unpin_from_display_plane(struct i915_vma *vma); void i915_gem_object_make_unshrinkable(struct drm_i915_gem_object *obj); void i915_gem_object_make_shrinkable(struct drm_i915_gem_object *obj); diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/gen7_renderclear.c linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/gen7_renderclear.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/gen7_renderclear.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/gen7_renderclear.c @@ -390,16 +390,6 @@ &cb_kernel_ivb, desc_count); - /* Reset inherited context registers */ - gen7_emit_pipeline_invalidate(&cmds); - batch_add(&cmds, MI_LOAD_REGISTER_IMM(2)); - batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_0_GEN7)); - batch_add(&cmds, 0xffff0000); - batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_1)); - batch_add(&cmds, 0xffff0000 | PIXEL_SUBSPAN_COLLECT_OPT_DISABLE); - gen7_emit_pipeline_flush(&cmds); - - /* Switch to the media pipeline and our base address */ gen7_emit_pipeline_invalidate(&cmds); batch_add(&cmds, PIPELINE_SELECT | PIPELINE_SELECT_MEDIA); batch_add(&cmds, MI_NOOP); @@ -409,11 +399,9 @@ gen7_emit_state_base_address(&cmds, descriptors); gen7_emit_pipeline_invalidate(&cmds); - /* Set the clear-residual kernel state */ gen7_emit_vfe_state(&cmds, bv, urb_size - 1, 0, 0); gen7_emit_interface_descriptor_load(&cmds, descriptors, desc_count); - /* Execute the kernel on all HW threads */ for (i = 0; i < num_primitives(bv); i++) gen7_emit_media_object(&cmds, i); diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c @@ -451,12 +451,10 @@ struct intel_context *ce = rq->context; bool release; - spin_lock(&ce->signal_lock); - if (!test_and_clear_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags)) { - spin_unlock(&ce->signal_lock); + if (!test_and_clear_bit(I915_FENCE_FLAG_SIGNAL, &rq->fence.flags)) return; - } + spin_lock(&ce->signal_lock); list_del_rcu(&rq->signal_link); release = remove_signaling_context(rq->engine->breadcrumbs, ce); spin_unlock(&ce->signal_lock); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/gt/intel_ggtt.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/gt/intel_ggtt.c @@ -526,39 +526,16 @@ mutex_init(&ggtt->error_mutex); if (ggtt->mappable_end) { + /* Reserve a mappable slot for our lockless error capture */ + ret = drm_mm_insert_node_in_range(&ggtt->vm.mm, + &ggtt->error_capture, + PAGE_SIZE, 0, + I915_COLOR_UNEVICTABLE, + 0, ggtt->mappable_end, + DRM_MM_INSERT_LOW); + if (ret) + return ret; - /* - * Reserve a mappable slot for our lockless error capture. - * - * We strongly prefer taking address 0x0 in order to protect - * other critical buffers against accidental overwrites, - * as writing to address 0 is a very common mistake. - * - * Since 0 may already be in use by the system (e.g. the BIOS - * framebuffer), we let the reservation fail quietly and hope - * 0 remains reserved always. - * - * If we fail to reserve 0, and then fail to find any space - * for an error-capture, remain silent. We can afford not - * to reserve an error_capture node as we have fallback - * paths, and we trust that 0 will remain reserved. However, - * the only likely reason for failure to insert is a driver - * bug, which we expect to cause other failures... - */ - ggtt->error_capture.size = I915_GTT_PAGE_SIZE; - ggtt->error_capture.color = I915_COLOR_UNEVICTABLE; - if (drm_mm_reserve_node(&ggtt->vm.mm, &ggtt->error_capture)) - drm_mm_insert_node_in_range(&ggtt->vm.mm, - &ggtt->error_capture, - ggtt->error_capture.size, 0, - ggtt->error_capture.color, - 0, ggtt->mappable_end, - DRM_MM_INSERT_LOW); } - if (drm_mm_node_allocated(&ggtt->error_capture)) - drm_dbg(&ggtt->vm.i915->drm, - "Reserved GGTT:[%llx, %llx] for use by error capture\n", - ggtt->error_capture.start, - ggtt->error_capture.start + ggtt->error_capture.size); /* * The upper portion of the GuC address space has a sizeable hole @@ -571,9 +548,9 @@ /* Clear any non-preallocated blocks */ drm_mm_for_each_hole(entry, &ggtt->vm.mm, hole_start, hole_end) { + drm_dbg_kms(&ggtt->vm.i915->drm, + "clearing unused GTT space: [%lx, %lx]\n", + hole_start, hole_end); - drm_dbg(&ggtt->vm.i915->drm, - "clearing unused GTT space: [%lx, %lx]\n", - hole_start, hole_end); ggtt->vm.clear_range(&ggtt->vm, hole_start, hole_end - hole_start); } reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/i915_active.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/i915_active.c @@ -631,26 +631,24 @@ int __i915_active_wait(struct i915_active *ref, int state) { + int err; + might_sleep(); + if (!i915_active_acquire_if_busy(ref)) + return 0; + /* Any fence added after the wait begins will not be auto-signaled */ + err = flush_lazy_signals(ref); + i915_active_release(ref); + if (err) + return err; + + if (!i915_active_is_idle(ref) && + ___wait_var_event(ref, i915_active_is_idle(ref), + state, 0, 0, schedule())) + return -EINTR; - if (i915_active_acquire_if_busy(ref)) { - int err; - err = flush_lazy_signals(ref); - i915_active_release(ref); - if (err) - return err; - - if (___wait_var_event(ref, i915_active_is_idle(ref), - state, 0, 0, schedule())) - return -EINTR; - } - - /* - * After the wait is complete, the caller may free the active. - * We have to flush any concurrent retirement before returning. - */ flush_work(&ref->work); return 0; } diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/i915_drv.h linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/i915_drv.h --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/i915_drv.h +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/i915_drv.h @@ -1350,7 +1350,7 @@ { const unsigned int pi = __platform_mask_index(info, p); - return info->platform_mask[pi] & ((1 << INTEL_SUBPLATFORM_BITS) - 1); + return info->platform_mask[pi] & INTEL_SUBPLATFORM_BITS; } static __always_inline bool reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/i915_pmu.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/i915_pmu.c @@ -184,24 +184,13 @@ return val; } +static void park_rc6(struct drm_i915_private *i915) -static void init_rc6(struct i915_pmu *pmu) { + struct i915_pmu *pmu = &i915->pmu; - struct drm_i915_private *i915 = container_of(pmu, typeof(*i915), pmu); - intel_wakeref_t wakeref; + if (pmu->enable & config_enabled_mask(I915_PMU_RC6_RESIDENCY)) - with_intel_runtime_pm(i915->gt.uncore->rpm, wakeref) { pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(&i915->gt); - pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = - pmu->sample[__I915_SAMPLE_RC6].cur; - pmu->sleep_last = ktime_get(); - } -} -static void park_rc6(struct drm_i915_private *i915) -{ - struct i915_pmu *pmu = &i915->pmu; - - pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(&i915->gt); pmu->sleep_last = ktime_get(); } @@ -212,7 +201,6 @@ return __get_rc6(gt); } -static void init_rc6(struct i915_pmu *pmu) { } static void park_rc6(struct drm_i915_private *i915) {} #endif @@ -625,8 +613,10 @@ container_of(event->pmu, typeof(*i915), pmu.base); unsigned int bit = event_enabled_bit(event); struct i915_pmu *pmu = &i915->pmu; + intel_wakeref_t wakeref; unsigned long flags; + wakeref = intel_runtime_pm_get(&i915->runtime_pm); spin_lock_irqsave(&pmu->lock, flags); /* @@ -637,6 +627,13 @@ GEM_BUG_ON(bit >= ARRAY_SIZE(pmu->enable_count)); GEM_BUG_ON(pmu->enable_count[bit] == ~0); + if (pmu->enable_count[bit] == 0 && + config_enabled_mask(I915_PMU_RC6_RESIDENCY) & BIT_ULL(bit)) { + pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = 0; + pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(&i915->gt); + pmu->sleep_last = ktime_get(); + } + pmu->enable |= BIT_ULL(bit); pmu->enable_count[bit]++; @@ -677,6 +674,8 @@ * an existing non-zero value. */ local64_set(&event->hw.prev_count, __i915_pmu_event_read(event)); + + intel_runtime_pm_put(&i915->runtime_pm, wakeref); } static void i915_pmu_disable(struct perf_event *event) @@ -1102,7 +1101,6 @@ hrtimer_init(&pmu->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); pmu->timer.function = i915_sample; pmu->cpuhp.slot = CPUHP_INVALID; - init_rc6(pmu); if (!is_igp(i915)) { pmu->name = kasprintf(GFP_KERNEL, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c @@ -1880,7 +1880,7 @@ vma = i915_vma_instance(out, vm, NULL); if (IS_ERR(vma)) { err = PTR_ERR(vma); + goto out_put_batch; - goto out_put_out; } err = i915_vma_pin(vma, 0, 0, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/dispnv50/base507c.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/dispnv50/base507c.c @@ -88,11 +88,7 @@ NVVAL(NV507C, SET_CONVERSION, OFS, 0x64)); } else { PUSH_MTHD(push, NV507C, SET_PROCESSING, + NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); - NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE), - - SET_CONVERSION, - NVVAL(NV507C, SET_CONVERSION, GAIN, 0) | - NVVAL(NV507C, SET_CONVERSION, OFS, 0)); } PUSH_MTHD(push, NV507C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8); reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/dispnv50/base827c.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/dispnv50/base827c.c @@ -49,11 +49,7 @@ NVVAL(NV827C, SET_CONVERSION, OFS, 0x64)); } else { PUSH_MTHD(push, NV827C, SET_PROCESSING, + NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); - NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE), - - SET_CONVERSION, - NVVAL(NV827C, SET_CONVERSION, GAIN, 0) | - NVVAL(NV827C, SET_CONVERSION, OFS, 0)); } PUSH_MTHD(push, NV827C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/dispnv50/head917d.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/dispnv50/head917d.c @@ -22,7 +22,6 @@ #include "head.h" #include "core.h" -#include "nvif/push.h" #include #include @@ -74,31 +73,6 @@ return 0; } -static int -head917d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh) -{ - struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; - const int i = head->base.index; - int ret; - - ret = PUSH_WAIT(push, 5); - if (ret) - return ret; - - PUSH_MTHD(push, NV917D, HEAD_SET_CONTROL_CURSOR(i), - NVDEF(NV917D, HEAD_SET_CONTROL_CURSOR, ENABLE, ENABLE) | - NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, FORMAT, asyh->curs.format) | - NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, SIZE, asyh->curs.layout) | - NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_X, 0) | - NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_Y, 0) | - NVDEF(NV917D, HEAD_SET_CONTROL_CURSOR, COMPOSITION, ALPHA_BLEND), - - HEAD_SET_OFFSET_CURSOR(i), asyh->curs.offset >> 8); - - PUSH_MTHD(push, NV917D, HEAD_SET_CONTEXT_DMA_CURSOR(i), asyh->curs.handle); - return 0; -} - int head917d_curs_layout(struct nv50_head *head, struct nv50_wndw_atom *asyw, struct nv50_head_atom *asyh) @@ -127,7 +101,7 @@ .core_clr = head907d_core_clr, .curs_layout = head917d_curs_layout, .curs_format = head507d_curs_format, + .curs_set = head907d_curs_set, - .curs_set = head917d_curs_set, .curs_clr = head907d_curs_clr, .base = head917d_base, .ovly = head907d_ovly, reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/dispnv50/wndw.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/dispnv50/wndw.c @@ -702,11 +702,6 @@ nvif_notify_get(&wndw->notify); } -static const u64 nv50_cursor_format_modifiers[] = { - DRM_FORMAT_MOD_LINEAR, - DRM_FORMAT_MOD_INVALID, -}; - int nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev, enum drm_plane_type type, const char *name, int index, @@ -718,7 +713,6 @@ struct nvif_mmu *mmu = &drm->client.mmu; struct nv50_disp *disp = nv50_disp(dev); struct nv50_wndw *wndw; - const u64 *format_modifiers; int nformat; int ret; @@ -734,13 +728,10 @@ for (nformat = 0; format[nformat]; nformat++); + ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, + format, nformat, + nouveau_display(dev)->format_modifiers, + type, "%s-%d", name, index); - if (type == DRM_PLANE_TYPE_CURSOR) - format_modifiers = nv50_cursor_format_modifiers; - else - format_modifiers = nouveau_display(dev)->format_modifiers; - - ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, format, nformat, - format_modifiers, type, "%s-%d", name, index); if (ret) { kfree(*pwndw); *pwndw = NULL; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/include/nvhw/class/cl917d.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/include/nvhw/class/cl917d.h @@ -66,10 +66,6 @@ #define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_ALPHA_BLEND (0x00000000) #define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_PREMULT_ALPHA_BLEND (0x00000001) #define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_XOR (0x00000002) -#define NV917D_HEAD_SET_OFFSET_CURSOR(a) (0x00000484 + (a)*0x00000300) -#define NV917D_HEAD_SET_OFFSET_CURSOR_ORIGIN 31:0 -#define NV917D_HEAD_SET_CONTEXT_DMA_CURSOR(a) (0x0000048C + (a)*0x00000300) -#define NV917D_HEAD_SET_CONTEXT_DMA_CURSOR_HANDLE 31:0 #define NV917D_HEAD_SET_DITHER_CONTROL(a) (0x000004A0 + (a)*0x00000300) #define NV917D_HEAD_SET_DITHER_CONTROL_ENABLE 0:0 #define NV917D_HEAD_SET_DITHER_CONTROL_ENABLE_DISABLE (0x00000000) reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/include/nvif/push.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/include/nvif/push.h @@ -123,131 +123,131 @@ } while(0) #endif +#define PUSH_1(X,f,ds,n,c,o,p,s,mA,dA) do { \ + PUSH_##o##_HDR((p), s, mA, (c)+(n)); \ + PUSH_##f(X, (p), X##mA, 1, o, (dA), ds, ""); \ +} while(0) +#define PUSH_2(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (1?PUSH_##o##_INC), "mthd1"); \ + PUSH_1(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_3(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd2"); \ + PUSH_2(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_4(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd3"); \ + PUSH_3(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_5(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd4"); \ + PUSH_4(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_6(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd5"); \ + PUSH_5(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_7(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd6"); \ + PUSH_6(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_8(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd7"); \ + PUSH_7(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_9(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd8"); \ + PUSH_8(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ +} while(0) +#define PUSH_10(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \ + PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd9"); \ + PUSH_9(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \ + PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -#define PUSH_1(X,f,ds,n,o,p,s,mA,dA) do { \ - PUSH_##o##_HDR((p), s, mA, (ds)+(n)); \ - PUSH_##f(X, (p), X##mA, 1, o, (dA), ds, ""); \ -} while(0) -#define PUSH_2(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (1?PUSH_##o##_INC), "mthd1"); \ - PUSH_1(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_3(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd2"); \ - PUSH_2(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_4(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd3"); \ - PUSH_3(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_5(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd4"); \ - PUSH_4(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_6(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd5"); \ - PUSH_5(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_7(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd6"); \ - PUSH_6(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_8(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd7"); \ - PUSH_7(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_9(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd8"); \ - PUSH_8(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ -} while(0) -#define PUSH_10(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \ - PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd9"); \ - PUSH_9(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \ - PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \ } while(0) +#define PUSH_1D(X,o,p,s,mA,dA) \ + PUSH_1(X, DATA_, 1, 1, 0, o, (p), s, X##mA, (dA)) +#define PUSH_2D(X,o,p,s,mA,dA,mB,dB) \ + PUSH_2(X, DATA_, 1, 1, 0, o, (p), s, X##mB, (dB), \ + X##mA, (dA)) +#define PUSH_3D(X,o,p,s,mA,dA,mB,dB,mC,dC) \ + PUSH_3(X, DATA_, 1, 1, 0, o, (p), s, X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) +#define PUSH_4D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD) \ + PUSH_4(X, DATA_, 1, 1, 0, o, (p), s, X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) +#define PUSH_5D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE) \ + PUSH_5(X, DATA_, 1, 1, 0, o, (p), s, X##mE, (dE), \ + X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) -#define PUSH_1D(X,o,p,s,mA,dA) \ - PUSH_1(X, DATA_, 1, 0, o, (p), s, X##mA, (dA)) -#define PUSH_2D(X,o,p,s,mA,dA,mB,dB) \ - PUSH_2(X, DATA_, 1, 0, o, (p), s, X##mB, (dB), \ - X##mA, (dA)) -#define PUSH_3D(X,o,p,s,mA,dA,mB,dB,mC,dC) \ - PUSH_3(X, DATA_, 1, 0, o, (p), s, X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) -#define PUSH_4D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD) \ - PUSH_4(X, DATA_, 1, 0, o, (p), s, X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) -#define PUSH_5D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE) \ - PUSH_5(X, DATA_, 1, 0, o, (p), s, X##mE, (dE), \ - X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) #define PUSH_6D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF) \ + PUSH_6(X, DATA_, 1, 1, 0, o, (p), s, X##mF, (dF), \ + X##mE, (dE), \ + X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) - PUSH_6(X, DATA_, 1, 0, o, (p), s, X##mF, (dF), \ - X##mE, (dE), \ - X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) #define PUSH_7D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG) \ + PUSH_7(X, DATA_, 1, 1, 0, o, (p), s, X##mG, (dG), \ + X##mF, (dF), \ + X##mE, (dE), \ + X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) - PUSH_7(X, DATA_, 1, 0, o, (p), s, X##mG, (dG), \ - X##mF, (dF), \ - X##mE, (dE), \ - X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) #define PUSH_8D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG,mH,dH) \ + PUSH_8(X, DATA_, 1, 1, 0, o, (p), s, X##mH, (dH), \ + X##mG, (dG), \ + X##mF, (dF), \ + X##mE, (dE), \ + X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) - PUSH_8(X, DATA_, 1, 0, o, (p), s, X##mH, (dH), \ - X##mG, (dG), \ - X##mF, (dF), \ - X##mE, (dE), \ - X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) #define PUSH_9D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG,mH,dH,mI,dI) \ + PUSH_9(X, DATA_, 1, 1, 0, o, (p), s, X##mI, (dI), \ + X##mH, (dH), \ + X##mG, (dG), \ + X##mF, (dF), \ + X##mE, (dE), \ + X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) - PUSH_9(X, DATA_, 1, 0, o, (p), s, X##mI, (dI), \ - X##mH, (dH), \ - X##mG, (dG), \ - X##mF, (dF), \ - X##mE, (dE), \ - X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) #define PUSH_10D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG,mH,dH,mI,dI,mJ,dJ) \ + PUSH_10(X, DATA_, 1, 1, 0, o, (p), s, X##mJ, (dJ), \ + X##mI, (dI), \ + X##mH, (dH), \ + X##mG, (dG), \ + X##mF, (dF), \ + X##mE, (dE), \ + X##mD, (dD), \ + X##mC, (dC), \ + X##mB, (dB), \ + X##mA, (dA)) - PUSH_10(X, DATA_, 1, 0, o, (p), s, X##mJ, (dJ), \ - X##mI, (dI), \ - X##mH, (dH), \ - X##mG, (dG), \ - X##mF, (dF), \ - X##mE, (dE), \ - X##mD, (dD), \ - X##mC, (dC), \ - X##mB, (dB), \ - X##mA, (dA)) +#define PUSH_1P(X,o,p,s,mA,dp,ds) \ + PUSH_1(X, DATAp, ds, ds, 0, o, (p), s, X##mA, (dp)) +#define PUSH_2P(X,o,p,s,mA,dA,mB,dp,ds) \ + PUSH_2(X, DATAp, ds, ds, 0, o, (p), s, X##mB, (dp), \ + X##mA, (dA)) +#define PUSH_3P(X,o,p,s,mA,dA,mB,dB,mC,dp,ds) \ + PUSH_3(X, DATAp, ds, ds, 0, o, (p), s, X##mC, (dp), \ + X##mB, (dB), \ + X##mA, (dA)) -#define PUSH_1P(X,o,p,s,mA,dp,ds) \ - PUSH_1(X, DATAp, ds, 0, o, (p), s, X##mA, (dp)) -#define PUSH_2P(X,o,p,s,mA,dA,mB,dp,ds) \ - PUSH_2(X, DATAp, ds, 0, o, (p), s, X##mB, (dp), \ - X##mA, (dA)) -#define PUSH_3P(X,o,p,s,mA,dA,mB,dB,mC,dp,ds) \ - PUSH_3(X, DATAp, ds, 0, o, (p), s, X##mC, (dp), \ - X##mB, (dB), \ - X##mA, (dA)) #define PUSH_(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,IMPL,...) IMPL #define PUSH(A...) PUSH_(A, PUSH_10P, PUSH_10D, \ reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/nouveau/nouveau_svm.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/nouveau/nouveau_svm.c @@ -315,10 +315,6 @@ struct drm_nouveau_svm_init *args = data; int ret; - /* We need to fail if svm is disabled */ - if (!cli->drm->svm) - return -ENOSYS; - /* Allocate tracking for SVM-enabled VMM. */ if (!(svmm = kzalloc(sizeof(*svmm), GFP_KERNEL))) return -ENOMEM; diff -u linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_device.h linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_device.h --- linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_device.h +++ linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_device.h @@ -88,7 +88,6 @@ /* pm_domains for devices with more than one. */ struct device *pm_domain_devs[MAX_PM_DOMAINS]; struct device_link *pm_domain_links[MAX_PM_DOMAINS]; - bool coherent; struct panfrost_features features; const struct panfrost_compatible *comp; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_drv.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -587,8 +587,6 @@ if (!pfdev->comp) return -ENODEV; - pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT; - /* Allocate and initialze the DRM device. */ ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev); if (IS_ERR(ddev)) reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_gem.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/panfrost/panfrost_gem.c @@ -218,7 +218,6 @@ */ struct drm_gem_object *panfrost_gem_create_object(struct drm_device *dev, size_t size) { - struct panfrost_device *pfdev = dev->dev_private; struct panfrost_gem_object *obj; obj = kzalloc(sizeof(*obj), GFP_KERNEL); @@ -228,7 +227,6 @@ INIT_LIST_HEAD(&obj->mappings.list); mutex_init(&obj->mappings.lock); obj->base.base.funcs = &panfrost_gem_funcs; - obj->base.map_cached = pfdev->coherent; return &obj->base.base; } reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -371,7 +371,6 @@ .pgsize_bitmap = SZ_4K | SZ_2M, .ias = FIELD_GET(0xff, pfdev->features.mmu_features), .oas = FIELD_GET(0xff00, pfdev->features.mmu_features), - .coherent_walk = pfdev->coherent, .tlb = &mmu_tlb_ops, .iommu_dev = pfdev->dev, }; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -689,30 +689,6 @@ SUN4I_TCON1_BASIC5_V_SYNC(vsync) | SUN4I_TCON1_BASIC5_H_SYNC(hsync)); - /* Setup the polarity of multiple signals */ - if (tcon->quirks->polarity_in_ch0) { - val = 0; - - if (mode->flags & DRM_MODE_FLAG_PHSYNC) - val |= SUN4I_TCON0_IO_POL_HSYNC_POSITIVE; - - if (mode->flags & DRM_MODE_FLAG_PVSYNC) - val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE; - - regmap_write(tcon->regs, SUN4I_TCON0_IO_POL_REG, val); - } else { - /* according to vendor driver, this bit must be always set */ - val = SUN4I_TCON1_IO_POL_UNKNOWN; - - if (mode->flags & DRM_MODE_FLAG_PHSYNC) - val |= SUN4I_TCON1_IO_POL_HSYNC_POSITIVE; - - if (mode->flags & DRM_MODE_FLAG_PVSYNC) - val |= SUN4I_TCON1_IO_POL_VSYNC_POSITIVE; - - regmap_write(tcon->regs, SUN4I_TCON1_IO_POL_REG, val); - } - /* Map output pins to channel 1 */ regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG, SUN4I_TCON_GCTL_IOMAP_MASK, @@ -1541,7 +1517,6 @@ static const struct sun4i_tcon_quirks sun8i_r40_tv_quirks = { .has_channel_1 = true, - .polarity_in_ch0 = true, .set_mux = sun8i_r40_tcon_tv_set_mux, }; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -153,11 +153,6 @@ #define SUN4I_TCON1_BASIC5_V_SYNC(height) (((height) - 1) & 0x3ff) #define SUN4I_TCON1_IO_POL_REG 0xf0 -/* there is no documentation about this bit */ -#define SUN4I_TCON1_IO_POL_UNKNOWN BIT(26) -#define SUN4I_TCON1_IO_POL_HSYNC_POSITIVE BIT(25) -#define SUN4I_TCON1_IO_POL_VSYNC_POSITIVE BIT(24) - #define SUN4I_TCON1_IO_TRI_REG 0xf4 #define SUN4I_TCON_ECC_FIFO_REG 0xf8 @@ -240,7 +235,6 @@ bool needs_de_be_mux; /* sun6i needs mux to select backend */ bool needs_edp_reset; /* a80 edp reset needed for tcon0 access */ bool supports_lvds; /* Does the TCON support an LVDS output? */ - bool polarity_in_ch0; /* some tcon1 channels have polarity bits in tcon0 pol register */ u8 dclk_min_div; /* minimum divider for TCON0 DCLK */ /* callback to handle tcon muxing options */ reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c @@ -21,7 +21,8 @@ { struct sun8i_dw_hdmi *hdmi = encoder_to_sun8i_dw_hdmi(encoder); + if (hdmi->quirks->set_rate) + clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000); - clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000); } static const struct drm_encoder_helper_funcs @@ -47,9 +48,11 @@ { /* * Controller support maximum of 594 MHz, which correlates to + * 4K@60Hz 4:4:4 or RGB. However, for frequencies greater than + * 340 MHz scrambling has to be enabled. Because scrambling is + * not yet implemented, just limit to 340 MHz for now. - * 4K@60Hz 4:4:4 or RGB. */ + if (mode->clock > 340000) - if (mode->clock > 594000) return MODE_CLOCK_HIGH; return MODE_OK; @@ -292,6 +295,7 @@ static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks = { .mode_valid = sun8i_dw_hdmi_mode_valid_a83t, + .set_rate = true, }; static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = { reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h @@ -179,6 +179,7 @@ enum drm_mode_status (*mode_valid)(struct dw_hdmi *hdmi, void *data, const struct drm_display_info *info, const struct drm_display_mode *mode); + unsigned int set_rate : 1; unsigned int use_drm_infoframe : 1; }; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c @@ -104,21 +104,29 @@ static const struct dw_hdmi_curr_ctrl sun50i_h6_cur_ctr[] = { /* pixelclk bpp8 bpp10 bpp12 */ + { 25175000, { 0x0000, 0x0000, 0x0000 }, }, { 27000000, { 0x0012, 0x0000, 0x0000 }, }, + { 59400000, { 0x0008, 0x0008, 0x0008 }, }, + { 72000000, { 0x0008, 0x0008, 0x001b }, }, + { 74250000, { 0x0013, 0x0013, 0x0013 }, }, + { 90000000, { 0x0008, 0x001a, 0x001b }, }, + { 118800000, { 0x001b, 0x001a, 0x001b }, }, + { 144000000, { 0x001b, 0x001a, 0x0034 }, }, + { 180000000, { 0x001b, 0x0033, 0x0034 }, }, + { 216000000, { 0x0036, 0x0033, 0x0034 }, }, + { 237600000, { 0x0036, 0x0033, 0x001b }, }, + { 288000000, { 0x0036, 0x001b, 0x001b }, }, + { 297000000, { 0x0019, 0x001b, 0x0019 }, }, + { 330000000, { 0x0036, 0x001b, 0x001b }, }, + { 594000000, { 0x003f, 0x001b, 0x001b }, }, - { 74250000, { 0x0013, 0x001a, 0x001b }, }, - { 148500000, { 0x0019, 0x0033, 0x0034 }, }, - { 297000000, { 0x0019, 0x001b, 0x001b }, }, - { 594000000, { 0x0010, 0x001b, 0x001b }, }, { ~0UL, { 0x0000, 0x0000, 0x0000 }, } }; static const struct dw_hdmi_phy_config sun50i_h6_phy_config[] = { /*pixelclk symbol term vlev*/ + { 74250000, 0x8009, 0x0004, 0x0232}, + { 148500000, 0x8029, 0x0004, 0x0273}, + { 594000000, 0x8039, 0x0004, 0x014a}, - { 27000000, 0x8009, 0x0007, 0x02b0 }, - { 74250000, 0x8009, 0x0006, 0x022d }, - { 148500000, 0x8029, 0x0006, 0x0270 }, - { 297000000, 0x8039, 0x0005, 0x01ab }, - { 594000000, 0x8029, 0x0000, 0x008a }, { ~0UL, 0x0000, 0x0000, 0x0000} }; reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/vc4/vc4_hvs.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/vc4/vc4_hvs.c @@ -618,11 +618,11 @@ * for now we just allocate globally. */ if (!hvs->hvs5) + /* 96kB */ + drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024); - /* 48k words of 2x12-bit pixels */ - drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024); else + /* 70k words */ + drm_mm_init(&hvs->lbm_mm, 0, 70 * 2 * 1024); - /* 60k words of 4x12-bit pixels */ - drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024); /* Upload filter kernels. We only have the one for now, so we * keep it around for the lifetime of the driver. reverted: --- linux-oem-5.10-5.10.0/drivers/gpu/drm/vc4/vc4_plane.c +++ linux-oem-5.10-5.10.0.orig/drivers/gpu/drm/vc4/vc4_plane.c @@ -220,7 +220,7 @@ __drm_atomic_helper_plane_reset(plane, &vc4_state->base); } +static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) -static void vc4_dlist_counter_increment(struct vc4_plane_state *vc4_state) { if (vc4_state->dlist_count == vc4_state->dlist_size) { u32 new_size = max(4u, vc4_state->dlist_count * 2); @@ -235,15 +235,7 @@ vc4_state->dlist_size = new_size; } + vc4_state->dlist[vc4_state->dlist_count++] = val; - vc4_state->dlist_count++; -} - -static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) -{ - unsigned int idx = vc4_state->dlist_count; - - vc4_dlist_counter_increment(vc4_state); - vc4_state->dlist[idx] = val; } /* Returns the scl0/scl1 field based on whether the dimensions need to @@ -445,7 +437,6 @@ static u32 vc4_lbm_size(struct drm_plane_state *state) { struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); - struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev); u32 pix_per_line; u32 lbm; @@ -481,11 +472,7 @@ lbm = pix_per_line * 16; } + lbm = roundup(lbm, 32); - /* Align it to 64 or 128 (hvs5) bytes */ - lbm = roundup(lbm, vc4->hvs->hvs5 ? 128 : 64); - - /* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */ - lbm /= vc4->hvs->hvs5 ? 4 : 2; return lbm; } @@ -925,9 +912,9 @@ if (!vc4_state->is_unity) { vc4_dlist_write(vc4_state, VC4_SET_FIELD(vc4_state->crtc_w, + SCALER_POS1_SCL_WIDTH) | - SCALER5_POS1_SCL_WIDTH) | VC4_SET_FIELD(vc4_state->crtc_h, + SCALER_POS1_SCL_HEIGHT)); - SCALER5_POS1_SCL_HEIGHT)); } /* Position Word 2: Source Image Size */ @@ -986,10 +973,8 @@ * be set when calling vc4_plane_allocate_lbm(). */ if (vc4_state->y_scaling[0] != VC4_SCALING_NONE || + vc4_state->y_scaling[1] != VC4_SCALING_NONE) + vc4_state->lbm_offset = vc4_state->dlist_count++; - vc4_state->y_scaling[1] != VC4_SCALING_NONE) { - vc4_state->lbm_offset = vc4_state->dlist_count; - vc4_dlist_counter_increment(vc4_state); - } if (num_planes > 1) { /* Emit Cb/Cr as channel 0 and Y as channel reverted: --- linux-oem-5.10-5.10.0/drivers/hid/intel-ish-hid/ipc/hw-ish.h +++ linux-oem-5.10-5.10.0.orig/drivers/hid/intel-ish-hid/ipc/hw-ish.h @@ -27,7 +27,6 @@ #define CMP_H_DEVICE_ID 0x06FC #define EHL_Ax_DEVICE_ID 0x4BB3 #define TGL_LP_DEVICE_ID 0xA0FC -#define TGL_H_DEVICE_ID 0x43FC #define REVISION_ID_CHT_A0 0x6 #define REVISION_ID_CHT_Ax_SI 0x0 reverted: --- linux-oem-5.10-5.10.0/drivers/hid/intel-ish-hid/ipc/pci-ish.c +++ linux-oem-5.10-5.10.0.orig/drivers/hid/intel-ish-hid/ipc/pci-ish.c @@ -37,7 +37,6 @@ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CMP_H_DEVICE_ID)}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, EHL_Ax_DEVICE_ID)}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, TGL_LP_DEVICE_ID)}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, TGL_H_DEVICE_ID)}, {0, } }; MODULE_DEVICE_TABLE(pci, ish_pci_tbl); diff -u linux-oem-5.10-5.10.0/drivers/hid/wacom_sys.c linux-oem-5.10-5.10.0/drivers/hid/wacom_sys.c --- linux-oem-5.10-5.10.0/drivers/hid/wacom_sys.c +++ linux-oem-5.10-5.10.0/drivers/hid/wacom_sys.c @@ -147,9 +147,9 @@ } if (flush) - wacom_wac_queue_flush(hdev, wacom_wac->pen_fifo); + wacom_wac_queue_flush(hdev, &wacom_wac->pen_fifo); else if (insert) - wacom_wac_queue_insert(hdev, wacom_wac->pen_fifo, + wacom_wac_queue_insert(hdev, &wacom_wac->pen_fifo, raw_data, report_size); return insert && !flush; @@ -1280,7 +1280,7 @@ static int wacom_devm_kfifo_alloc(struct wacom *wacom) { struct wacom_wac *wacom_wac = &wacom->wacom_wac; - struct kfifo_rec_ptr_2 *pen_fifo; + struct kfifo_rec_ptr_2 *pen_fifo = &wacom_wac->pen_fifo; int error; pen_fifo = devres_alloc(wacom_devm_kfifo_release, @@ -1297,7 +1297,6 @@ } devres_add(&wacom->hdev->dev, pen_fifo); - wacom_wac->pen_fifo = pen_fifo; return 0; } reverted: --- linux-oem-5.10-5.10.0/drivers/hid/wacom_wac.h +++ linux-oem-5.10-5.10.0.orig/drivers/hid/wacom_wac.h @@ -342,7 +342,7 @@ struct input_dev *pen_input; struct input_dev *touch_input; struct input_dev *pad_input; + struct kfifo_rec_ptr_2 pen_fifo; - struct kfifo_rec_ptr_2 *pen_fifo; int pid; int num_contacts_left; u8 bt_features; diff -u linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-mt65xx.c linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-mt65xx.c --- linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-mt65xx.c +++ linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-mt65xx.c @@ -1275,8 +1275,7 @@ mtk_i2c_clock_disable(i2c); ret = devm_request_irq(&pdev->dev, irq, mtk_i2c_irq, - IRQF_NO_SUSPEND | IRQF_TRIGGER_NONE, - I2C_DRV_NAME, i2c); + IRQF_TRIGGER_NONE, I2C_DRV_NAME, i2c); if (ret < 0) { dev_err(&pdev->dev, "Request I2C IRQ %d fail\n", irq); @@ -1303,16 +1302,7 @@ } #ifdef CONFIG_PM_SLEEP -static int mtk_i2c_suspend_noirq(struct device *dev) -{ - struct mtk_i2c *i2c = dev_get_drvdata(dev); - - i2c_mark_adapter_suspended(&i2c->adap); - - return 0; -} - -static int mtk_i2c_resume_noirq(struct device *dev) +static int mtk_i2c_resume(struct device *dev) { int ret; struct mtk_i2c *i2c = dev_get_drvdata(dev); @@ -1327,15 +1317,12 @@ mtk_i2c_clock_disable(i2c); - i2c_mark_adapter_resumed(&i2c->adap); - return 0; } #endif static const struct dev_pm_ops mtk_i2c_pm = { - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_i2c_suspend_noirq, - mtk_i2c_resume_noirq) + SET_SYSTEM_SLEEP_PM_OPS(NULL, mtk_i2c_resume) }; static struct platform_driver mtk_i2c_driver = { reverted: --- linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-stm32f7.c +++ linux-oem-5.10-5.10.0.orig/drivers/i2c/busses/i2c-stm32f7.c @@ -57,8 +57,6 @@ #define STM32F7_I2C_CR1_RXDMAEN BIT(15) #define STM32F7_I2C_CR1_TXDMAEN BIT(14) #define STM32F7_I2C_CR1_ANFOFF BIT(12) -#define STM32F7_I2C_CR1_DNF_MASK GENMASK(11, 8) -#define STM32F7_I2C_CR1_DNF(n) (((n) & 0xf) << 8) #define STM32F7_I2C_CR1_ERRIE BIT(7) #define STM32F7_I2C_CR1_TCIE BIT(6) #define STM32F7_I2C_CR1_STOPIE BIT(5) @@ -162,7 +160,7 @@ }; #define STM32F7_I2C_DNF_DEFAULT 0 +#define STM32F7_I2C_DNF_MAX 16 -#define STM32F7_I2C_DNF_MAX 15 #define STM32F7_I2C_ANALOG_FILTER_ENABLE 1 #define STM32F7_I2C_ANALOG_FILTER_DELAY_MIN 50 /* ns */ @@ -727,13 +725,6 @@ else stm32f7_i2c_set_bits(i2c_dev->base + STM32F7_I2C_CR1, STM32F7_I2C_CR1_ANFOFF); - - /* Program the Digital Filter */ - stm32f7_i2c_clr_bits(i2c_dev->base + STM32F7_I2C_CR1, - STM32F7_I2C_CR1_DNF_MASK); - stm32f7_i2c_set_bits(i2c_dev->base + STM32F7_I2C_CR1, - STM32F7_I2C_CR1_DNF(i2c_dev->setup.dnf)); - stm32f7_i2c_set_bits(i2c_dev->base + STM32F7_I2C_CR1, STM32F7_I2C_CR1_PE); } diff -u linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-tegra.c linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-tegra.c --- linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-tegra.c +++ linux-oem-5.10-5.10.0/drivers/i2c/busses/i2c-tegra.c @@ -326,8 +326,6 @@ /* read back register to make sure that register writes completed */ if (reg != I2C_TX_FIFO) readl_relaxed(i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg)); - else if (i2c_dev->is_vi) - readl_relaxed(i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, I2C_INT_STATUS)); } static u32 i2c_readl(struct tegra_i2c_dev *i2c_dev, unsigned int reg) @@ -341,21 +339,6 @@ writesl(i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg), data, len); } -static void i2c_writesl_vi(struct tegra_i2c_dev *i2c_dev, void *data, - unsigned int reg, unsigned int len) -{ - u32 *data32 = data; - - /* - * VI I2C controller has known hardware bug where writes get stuck - * when immediate multiple writes happen to TX_FIFO register. - * Recommended software work around is to read I2C register after - * each write to TX_FIFO register to flush out the data. - */ - while (len--) - i2c_writel(i2c_dev, *data32++, reg); -} - static void i2c_readsl(struct tegra_i2c_dev *i2c_dev, void *data, unsigned int reg, unsigned int len) { @@ -828,10 +811,7 @@ i2c_dev->msg_buf_remaining = buf_remaining; i2c_dev->msg_buf = buf + words_to_transfer * BYTES_PER_FIFO_WORD; - if (i2c_dev->is_vi) - i2c_writesl_vi(i2c_dev, buf, I2C_TX_FIFO, words_to_transfer); - else - i2c_writesl(i2c_dev, buf, I2C_TX_FIFO, words_to_transfer); + i2c_writesl(i2c_dev, buf, I2C_TX_FIFO, words_to_transfer); buf += words_to_transfer * BYTES_PER_FIFO_WORD; } reverted: --- linux-oem-5.10-5.10.0/drivers/infiniband/hw/cxgb4/qp.c +++ linux-oem-5.10-5.10.0.orig/drivers/infiniband/hw/cxgb4/qp.c @@ -2471,7 +2471,7 @@ init_attr->cap.max_send_wr = qhp->attr.sq_num_entries; init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries; init_attr->cap.max_send_sge = qhp->attr.sq_max_sges; + init_attr->cap.max_recv_sge = qhp->attr.sq_max_sges; - init_attr->cap.max_recv_sge = qhp->attr.rq_max_sges; init_attr->cap.max_inline_data = T4_MAX_SEND_INLINE; init_attr->sq_sig_type = qhp->sq_sig_all ? IB_SIGNAL_ALL_WR : 0; return 0; diff -u linux-oem-5.10-5.10.0/drivers/infiniband/hw/mlx5/main.c linux-oem-5.10-5.10.0/drivers/infiniband/hw/mlx5/main.c --- linux-oem-5.10-5.10.0/drivers/infiniband/hw/mlx5/main.c +++ linux-oem-5.10-5.10.0/drivers/infiniband/hw/mlx5/main.c @@ -3305,7 +3305,8 @@ int err; dev->port[port_num].roce.nb.notifier_call = mlx5_netdev_event; - err = register_netdevice_notifier(&dev->port[port_num].roce.nb); + err = register_netdevice_notifier_net(mlx5_core_net(dev->mdev), + &dev->port[port_num].roce.nb); if (err) { dev->port[port_num].roce.nb.notifier_call = NULL; return err; @@ -3317,7 +3318,8 @@ static void mlx5_remove_netdev_notifier(struct mlx5_ib_dev *dev, u8 port_num) { if (dev->port[port_num].roce.nb.notifier_call) { - unregister_netdevice_notifier(&dev->port[port_num].roce.nb); + unregister_netdevice_notifier_net(mlx5_core_net(dev->mdev), + &dev->port[port_num].roce.nb); dev->port[port_num].roce.nb.notifier_call = NULL; } } reverted: --- linux-oem-5.10-5.10.0/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h +++ linux-oem-5.10-5.10.0.orig/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h @@ -509,20 +509,6 @@ return flags & PVRDMA_MASK(PVRDMA_SEND_FLAGS_MAX); } -static inline int pvrdma_network_type_to_ib(enum pvrdma_network_type type) -{ - switch (type) { - case PVRDMA_NETWORK_ROCE_V1: - return RDMA_NETWORK_ROCE_V1; - case PVRDMA_NETWORK_IPV4: - return RDMA_NETWORK_IPV4; - case PVRDMA_NETWORK_IPV6: - return RDMA_NETWORK_IPV6; - default: - return RDMA_NETWORK_IPV6; - } -} - void pvrdma_qp_cap_to_ib(struct ib_qp_cap *dst, const struct pvrdma_qp_cap *src); void ib_qp_cap_to_pvrdma(struct pvrdma_qp_cap *dst, reverted: --- linux-oem-5.10-5.10.0/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c +++ linux-oem-5.10-5.10.0.orig/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c @@ -364,7 +364,7 @@ wc->dlid_path_bits = cqe->dlid_path_bits; wc->port_num = cqe->port_num; wc->vendor_err = cqe->vendor_err; + wc->network_hdr_type = cqe->network_hdr_type; - wc->network_hdr_type = pvrdma_network_type_to_ib(cqe->network_hdr_type); /* Update shared ring state */ pvrdma_idx_ring_inc(&cq->ring_state->rx.cons_head, cq->ibcq.cqe); reverted: --- linux-oem-5.10-5.10.0/drivers/infiniband/ulp/isert/ib_isert.c +++ linux-oem-5.10-5.10.0.orig/drivers/infiniband/ulp/isert/ib_isert.c @@ -28,18 +28,6 @@ module_param_named(debug_level, isert_debug_level, int, 0644); MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0 (default:0)"); -static int isert_sg_tablesize_set(const char *val, - const struct kernel_param *kp); -static const struct kernel_param_ops sg_tablesize_ops = { - .set = isert_sg_tablesize_set, - .get = param_get_int, -}; - -static int isert_sg_tablesize = ISCSI_ISER_DEF_SG_TABLESIZE; -module_param_cb(sg_tablesize, &sg_tablesize_ops, &isert_sg_tablesize, 0644); -MODULE_PARM_DESC(sg_tablesize, - "Number of gather/scatter entries in a single scsi command, should >= 128 (default: 256, max: 4096)"); - static DEFINE_MUTEX(device_list_mutex); static LIST_HEAD(device_list); static struct workqueue_struct *isert_comp_wq; @@ -59,19 +47,6 @@ static void isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc); static void isert_login_send_done(struct ib_cq *cq, struct ib_wc *wc); -static int isert_sg_tablesize_set(const char *val, const struct kernel_param *kp) -{ - int n = 0, ret; - - ret = kstrtoint(val, 10, &n); - if (ret != 0 || n < ISCSI_ISER_MIN_SG_TABLESIZE || - n > ISCSI_ISER_MAX_SG_TABLESIZE) - return -EINVAL; - - return param_set_int(val, kp); -} - - static inline bool isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) { @@ -126,7 +101,7 @@ attr.cap.max_send_wr = ISERT_QP_MAX_REQ_DTOS + 1; attr.cap.max_recv_wr = ISERT_QP_MAX_RECV_DTOS + 1; factor = rdma_rw_mr_factor(device->ib_device, cma_id->port_num, + ISCSI_ISER_MAX_SG_TABLESIZE); - isert_sg_tablesize); attr.cap.max_rdma_ctxs = ISCSI_DEF_XMIT_CMDS_MAX * factor; attr.cap.max_send_sge = device->ib_device->attrs.max_send_sge; attr.cap.max_recv_sge = 1; reverted: --- linux-oem-5.10-5.10.0/drivers/infiniband/ulp/isert/ib_isert.h +++ linux-oem-5.10-5.10.0.orig/drivers/infiniband/ulp/isert/ib_isert.h @@ -65,12 +65,6 @@ */ #define ISER_RX_SIZE (ISCSI_DEF_MAX_RECV_SEG_LEN + 1024) -/* Default I/O size is 1MB */ -#define ISCSI_ISER_DEF_SG_TABLESIZE 256 - -/* Minimum I/O size is 512KB */ -#define ISCSI_ISER_MIN_SG_TABLESIZE 128 - /* Maximum support is 16MB I/O size */ #define ISCSI_ISER_MAX_SG_TABLESIZE 4096 reverted: --- linux-oem-5.10-5.10.0/drivers/input/joystick/xpad.c +++ linux-oem-5.10-5.10.0.orig/drivers/input/joystick/xpad.c @@ -215,17 +215,9 @@ { 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02a0, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02a1, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02a2, "PDP Wired Controller for Xbox One - Crimson Red", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02a7, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02a8, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02ad, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02b3, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE }, - { 0x0e6f, 0x02b8, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 }, @@ -304,9 +296,6 @@ { 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 }, { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 }, { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 }, - { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE }, - { 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 }, - { 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE }, { 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 }, @@ -440,12 +429,8 @@ XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */ XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */ - XPAD_XBOX360_VENDOR(0x20d6), /* PowerA Controllers */ - XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA Controllers */ XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */ XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */ - XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */ - XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */ { } }; reverted: --- linux-oem-5.10-5.10.0/drivers/input/touchscreen/goodix.c +++ linux-oem-5.10-5.10.0.orig/drivers/input/touchscreen/goodix.c @@ -157,7 +157,6 @@ { .id = "5663", .data = >1x_chip_data }, { .id = "5688", .data = >1x_chip_data }, { .id = "917S", .data = >1x_chip_data }, - { .id = "9286", .data = >1x_chip_data }, { .id = "911", .data = >911_chip_data }, { .id = "9271", .data = >911_chip_data }, @@ -1446,7 +1445,6 @@ { .compatible = "goodix,gt927" }, { .compatible = "goodix,gt9271" }, { .compatible = "goodix,gt928" }, - { .compatible = "goodix,gt9286" }, { .compatible = "goodix,gt967" }, { } }; reverted: --- linux-oem-5.10-5.10.0/drivers/input/touchscreen/ili210x.c +++ linux-oem-5.10-5.10.0.orig/drivers/input/touchscreen/ili210x.c @@ -29,13 +29,11 @@ void *buf, size_t len); int (*get_touch_data)(struct i2c_client *client, u8 *data); bool (*parse_touch_data)(const u8 *data, unsigned int finger, + unsigned int *x, unsigned int *y); - unsigned int *x, unsigned int *y, - unsigned int *z); bool (*continue_polling)(const u8 *data, bool touch); unsigned int max_touches; unsigned int resolution; bool has_calibrate_reg; - bool has_pressure_reg; }; struct ili210x { @@ -84,8 +82,7 @@ static bool ili210x_touchdata_to_coords(const u8 *touchdata, unsigned int finger, + unsigned int *x, unsigned int *y) - unsigned int *x, unsigned int *y, - unsigned int *z) { if (touchdata[0] & BIT(finger)) return false; @@ -140,8 +137,7 @@ static bool ili211x_touchdata_to_coords(const u8 *touchdata, unsigned int finger, + unsigned int *x, unsigned int *y) - unsigned int *x, unsigned int *y, - unsigned int *z) { u32 data; @@ -173,8 +169,7 @@ static bool ili212x_touchdata_to_coords(const u8 *touchdata, unsigned int finger, + unsigned int *x, unsigned int *y) - unsigned int *x, unsigned int *y, - unsigned int *z) { u16 val; @@ -240,8 +235,7 @@ static bool ili251x_touchdata_to_coords(const u8 *touchdata, unsigned int finger, + unsigned int *x, unsigned int *y) - unsigned int *x, unsigned int *y, - unsigned int *z) { u16 val; @@ -251,7 +245,6 @@ *x = val & 0x3fff; *y = get_unaligned_be16(touchdata + 1 + (finger * 5) + 2); - *z = touchdata[1 + (finger * 5) + 4]; return true; } @@ -268,7 +261,6 @@ .continue_polling = ili251x_check_continue_polling, .max_touches = 10, .has_calibrate_reg = true, - .has_pressure_reg = true, }; static bool ili210x_report_events(struct ili210x *priv, u8 *touchdata) @@ -276,16 +268,14 @@ struct input_dev *input = priv->input; int i; bool contact = false, touch; + unsigned int x = 0, y = 0; - unsigned int x = 0, y = 0, z = 0; for (i = 0; i < priv->chip->max_touches; i++) { + touch = priv->chip->parse_touch_data(touchdata, i, &x, &y); - touch = priv->chip->parse_touch_data(touchdata, i, &x, &y, &z); input_mt_slot(input, i); if (input_mt_report_slot_state(input, MT_TOOL_FINGER, touch)) { touchscreen_report_pos(input, &priv->prop, x, y, true); - if (priv->chip->has_pressure_reg) - input_report_abs(input, ABS_MT_PRESSURE, z); contact = true; } } @@ -447,8 +437,6 @@ max_xy = (chip->resolution ?: SZ_64K) - 1; input_set_abs_params(input, ABS_MT_POSITION_X, 0, max_xy, 0, 0); input_set_abs_params(input, ABS_MT_POSITION_Y, 0, max_xy, 0, 0); - if (priv->chip->has_pressure_reg) - input_set_abs_params(input, ABS_MT_PRESSURE, 0, 0xa, 0, 0); touchscreen_parse_properties(input, true, &priv->prop); error = input_mt_init_slots(input, priv->chip->max_touches, reverted: --- linux-oem-5.10-5.10.0/drivers/iommu/amd/amd_iommu.h +++ linux-oem-5.10-5.10.0.orig/drivers/iommu/amd/amd_iommu.h @@ -84,9 +84,12 @@ (pdev->device == PCI_DEVICE_ID_RD890_IOMMU); } +static inline bool iommu_feature(struct amd_iommu *iommu, u64 f) -static inline bool iommu_feature(struct amd_iommu *iommu, u64 mask) { + if (!(iommu->cap & (1 << IOMMU_CAP_EFR))) + return false; + + return !!(iommu->features & f); - return !!(iommu->features & mask); } static inline u64 iommu_virt_to_phys(void *vaddr) reverted: --- linux-oem-5.10-5.10.0/drivers/iommu/amd/amd_iommu_types.h +++ linux-oem-5.10-5.10.0.orig/drivers/iommu/amd/amd_iommu_types.h @@ -379,10 +379,6 @@ #define IOMMU_CAP_NPCACHE 26 #define IOMMU_CAP_EFR 27 -/* IOMMU IVINFO */ -#define IOMMU_IVINFO_OFFSET 36 -#define IOMMU_IVINFO_EFRSUP BIT(0) - /* IOMMU Feature Reporting Field (for IVHD type 10h */ #define IOMMU_FEAT_GASUP_SHIFT 6 reverted: --- linux-oem-5.10-5.10.0/drivers/iommu/amd/init.c +++ linux-oem-5.10-5.10.0.orig/drivers/iommu/amd/init.c @@ -257,8 +257,6 @@ static bool amd_iommu_pre_enabled = true; -static u32 amd_iommu_ivinfo __initdata; - bool translation_pre_enabled(struct amd_iommu *iommu) { return (iommu->flags & AMD_IOMMU_FLAG_TRANS_PRE_ENABLED); @@ -298,18 +296,6 @@ return amd_iommus_present; } -/* - * For IVHD type 0x11/0x40, EFR is also available via IVHD. - * Default to IVHD EFR since it is available sooner - * (i.e. before PCI init). - */ -static void __init early_iommu_features_init(struct amd_iommu *iommu, - struct ivhd_header *h) -{ - if (amd_iommu_ivinfo & IOMMU_IVINFO_EFRSUP) - iommu->features = h->efr_reg; -} - /* Access to l1 and l2 indexed register spaces */ static u32 iommu_read_l1(struct amd_iommu *iommu, u16 l1, u8 address) @@ -1598,9 +1584,6 @@ if ((h->efr_reg & BIT(IOMMU_EFR_XTSUP_SHIFT)) && (h->efr_reg & BIT(IOMMU_EFR_MSICAPMMIOSUP_SHIFT))) amd_iommu_xt_mode = IRQ_REMAP_X2APIC_MODE; - - early_iommu_features_init(iommu, h); - break; default: return -EINVAL; @@ -1792,35 +1775,6 @@ NULL, }; -/* - * Note: IVHD 0x11 and 0x40 also contains exact copy - * of the IOMMU Extended Feature Register [MMIO Offset 0030h]. - * Default to EFR in IVHD since it is available sooner (i.e. before PCI init). - */ -static void __init late_iommu_features_init(struct amd_iommu *iommu) -{ - u64 features; - - if (!(iommu->cap & (1 << IOMMU_CAP_EFR))) - return; - - /* read extended feature bits */ - features = readq(iommu->mmio_base + MMIO_EXT_FEATURES); - - if (!iommu->features) { - iommu->features = features; - return; - } - - /* - * Sanity check and warn if EFR values from - * IVHD and MMIO conflict. - */ - if (features != iommu->features) - pr_warn(FW_WARN "EFR mismatch. Use IVHD EFR (%#llx : %#llx\n).", - features, iommu->features); -} - static int __init iommu_init_pci(struct amd_iommu *iommu) { int cap_ptr = iommu->cap_ptr; @@ -1840,7 +1794,8 @@ if (!(iommu->cap & (1 << IOMMU_CAP_IOTLB))) amd_iommu_iotlb_sup = false; + /* read extended feature bits */ + iommu->features = readq(iommu->mmio_base + MMIO_EXT_FEATURES); - late_iommu_features_init(iommu); if (iommu_feature(iommu, FEATURE_GT)) { int glxval; @@ -2570,11 +2525,6 @@ free_unity_maps(); } -static void __init ivinfo_init(void *ivrs) -{ - amd_iommu_ivinfo = *((u32 *)(ivrs + IOMMU_IVINFO_OFFSET)); -} - /* * This is the hardware init function for AMD IOMMU in the system. * This function is called either from amd_iommu_init or from the interrupt @@ -2629,8 +2579,6 @@ if (ret) goto out; - ivinfo_init(ivrs_base); - amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base); DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type); diff -u linux-oem-5.10-5.10.0/drivers/iommu/intel/dmar.c linux-oem-5.10-5.10.0/drivers/iommu/intel/dmar.c --- linux-oem-5.10-5.10.0/drivers/iommu/intel/dmar.c +++ linux-oem-5.10-5.10.0/drivers/iommu/intel/dmar.c @@ -1496,7 +1496,7 @@ * Max Invs Pending (MIP) is set to 0 for now until we have DIT in * ECAP. */ - if (!IS_ALIGNED(addr, VTD_PAGE_SIZE << size_order)) + if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0)) pr_warn_ratelimited("Invalidate non-aligned address %llx, order %d\n", addr, size_order); diff -u linux-oem-5.10-5.10.0/drivers/iommu/intel/iommu.c linux-oem-5.10-5.10.0/drivers/iommu/intel/iommu.c --- linux-oem-5.10-5.10.0/drivers/iommu/intel/iommu.c +++ linux-oem-5.10-5.10.0/drivers/iommu/intel/iommu.c @@ -3350,11 +3350,6 @@ if (!ecap_pass_through(iommu->ecap)) hw_pass_through = 0; - - if (!intel_iommu_strict && cap_caching_mode(iommu->cap)) { - pr_warn("Disable batched IOTLB flush due to virtualization"); - intel_iommu_strict = 1; - } intel_svm_check(iommu); } reverted: --- linux-oem-5.10-5.10.0/drivers/iommu/io-pgtable-arm.c +++ linux-oem-5.10-5.10.0.orig/drivers/iommu/io-pgtable-arm.c @@ -417,13 +417,7 @@ << ARM_LPAE_PTE_ATTRINDX_SHIFT); } + if (prot & IOMMU_CACHE) - /* - * Also Mali has its own notions of shareability wherein its Inner - * domain covers the cores within the GPU, and its Outer domain is - * "outside the GPU" (i.e. either the Inner or System domain in CPU - * terms, depending on coherency). - */ - if (prot & IOMMU_CACHE && data->iop.fmt != ARM_MALI_LPAE) pte |= ARM_LPAE_PTE_SH_IS; else pte |= ARM_LPAE_PTE_SH_OS; @@ -1027,9 +1021,6 @@ cfg->arm_mali_lpae_cfg.transtab = virt_to_phys(data->pgd) | ARM_MALI_LPAE_TTBR_READ_INNER | ARM_MALI_LPAE_TTBR_ADRMODE_TABLE; - if (cfg->coherent_walk) - cfg->arm_mali_lpae_cfg.transtab |= ARM_MALI_LPAE_TTBR_SHARE_OUTER; - return &data->iop; out_free_data: reverted: --- linux-oem-5.10-5.10.0/drivers/leds/led-triggers.c +++ linux-oem-5.10-5.10.0.orig/drivers/leds/led-triggers.c @@ -378,15 +378,14 @@ enum led_brightness brightness) { struct led_classdev *led_cdev; - unsigned long flags; if (!trig) return; + read_lock(&trig->leddev_list_lock); - read_lock_irqsave(&trig->leddev_list_lock, flags); list_for_each_entry(led_cdev, &trig->led_cdevs, trig_list) led_set_brightness(led_cdev, brightness); + read_unlock(&trig->leddev_list_lock); - read_unlock_irqrestore(&trig->leddev_list_lock, flags); } EXPORT_SYMBOL_GPL(led_trigger_event); @@ -397,12 +396,11 @@ int invert) { struct led_classdev *led_cdev; - unsigned long flags; if (!trig) return; + read_lock(&trig->leddev_list_lock); - read_lock_irqsave(&trig->leddev_list_lock, flags); list_for_each_entry(led_cdev, &trig->led_cdevs, trig_list) { if (oneshot) led_blink_set_oneshot(led_cdev, delay_on, delay_off, @@ -410,7 +408,7 @@ else led_blink_set(led_cdev, delay_on, delay_off); } + read_unlock(&trig->leddev_list_lock); - read_unlock_irqrestore(&trig->leddev_list_lock, flags); } void led_trigger_blink(struct led_trigger *trig, diff -u linux-oem-5.10-5.10.0/drivers/md/bcache/features.h linux-oem-5.10-5.10.0/drivers/md/bcache/features.h --- linux-oem-5.10-5.10.0/drivers/md/bcache/features.h +++ linux-oem-5.10-5.10.0/drivers/md/bcache/features.h @@ -33,8 +33,6 @@ #define BCH_FEATURE_COMPAT_FUNCS(name, flagname) \ static inline int bch_has_feature_##name(struct cache_sb *sb) \ { \ - if (sb->version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES) \ - return 0; \ return (((sb)->feature_compat & \ BCH##_FEATURE_COMPAT_##flagname) != 0); \ } \ @@ -52,8 +50,6 @@ #define BCH_FEATURE_RO_COMPAT_FUNCS(name, flagname) \ static inline int bch_has_feature_##name(struct cache_sb *sb) \ { \ - if (sb->version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES) \ - return 0; \ return (((sb)->feature_ro_compat & \ BCH##_FEATURE_RO_COMPAT_##flagname) != 0); \ } \ @@ -71,8 +67,6 @@ #define BCH_FEATURE_INCOMPAT_FUNCS(name, flagname) \ static inline int bch_has_feature_##name(struct cache_sb *sb) \ { \ - if (sb->version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES) \ - return 0; \ return (((sb)->feature_incompat & \ BCH##_FEATURE_INCOMPAT_##flagname) != 0); \ } \ diff -u linux-oem-5.10-5.10.0/drivers/md/md.c linux-oem-5.10-5.10.0/drivers/md/md.c --- linux-oem-5.10-5.10.0/drivers/md/md.c +++ linux-oem-5.10-5.10.0/drivers/md/md.c @@ -639,10 +639,8 @@ * could wait for this and below md_handle_request could wait for those * bios because of suspend check */ - spin_lock_irq(&mddev->lock); mddev->last_flush = mddev->start_flush; mddev->flush_bio = NULL; - spin_unlock_irq(&mddev->lock); wake_up(&mddev->sb_wait); if (bio->bi_iter.bi_size == 0) { reverted: --- linux-oem-5.10-5.10.0/drivers/media/cec/platform/Makefile +++ linux-oem-5.10-5.10.0.orig/drivers/media/cec/platform/Makefile @@ -10,6 +10,5 @@ obj-$(CONFIG_CEC_SAMSUNG_S5P) += s5p/ obj-$(CONFIG_CEC_SECO) += seco/ obj-$(CONFIG_CEC_STI) += sti/ -obj-$(CONFIG_CEC_STM32) += stm32/ obj-$(CONFIG_CEC_TEGRA) += tegra/ reverted: --- linux-oem-5.10-5.10.0/drivers/media/common/videobuf2/videobuf2-v4l2.c +++ linux-oem-5.10-5.10.0.orig/drivers/media/common/videobuf2/videobuf2-v4l2.c @@ -118,7 +118,8 @@ return -EINVAL; } } else { + length = (b->memory == VB2_MEMORY_USERPTR || + b->memory == VB2_MEMORY_DMABUF) - length = (b->memory == VB2_MEMORY_USERPTR) ? b->length : vb->planes[0].length; if (b->bytesused > length) reverted: --- linux-oem-5.10-5.10.0/drivers/media/rc/ir-mce_kbd-decoder.c +++ linux-oem-5.10-5.10.0.orig/drivers/media/rc/ir-mce_kbd-decoder.c @@ -320,7 +320,7 @@ data->body); spin_lock(&data->keylock); if (scancode) { + delay = nsecs_to_jiffies(dev->timeout) + - delay = usecs_to_jiffies(dev->timeout) + msecs_to_jiffies(100); mod_timer(&data->rx_timeout, jiffies + delay); } else { reverted: --- linux-oem-5.10-5.10.0/drivers/media/rc/ite-cir.c +++ linux-oem-5.10-5.10.0.orig/drivers/media/rc/ite-cir.c @@ -1551,7 +1551,7 @@ rdev->s_rx_carrier_range = ite_set_rx_carrier_range; /* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */ rdev->min_timeout = 17 * 8 * ITE_BAUDRATE_DIVISOR * + itdev->params.sample_period; - itdev->params.sample_period / 1000; rdev->timeout = IR_DEFAULT_TIMEOUT; rdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT; rdev->rx_resolution = ITE_BAUDRATE_DIVISOR * reverted: --- linux-oem-5.10-5.10.0/drivers/media/rc/rc-main.c +++ linux-oem-5.10-5.10.0.orig/drivers/media/rc/rc-main.c @@ -737,7 +737,7 @@ void rc_repeat(struct rc_dev *dev) { unsigned long flags; + unsigned int timeout = nsecs_to_jiffies(dev->timeout) + - unsigned int timeout = usecs_to_jiffies(dev->timeout) + msecs_to_jiffies(repeat_period(dev->last_protocol)); struct lirc_scancode sc = { .scancode = dev->last_scancode, .rc_proto = dev->last_protocol, @@ -855,7 +855,7 @@ ir_do_keydown(dev, protocol, scancode, keycode, toggle); if (dev->keypressed) { + dev->keyup_jiffies = jiffies + nsecs_to_jiffies(dev->timeout) + - dev->keyup_jiffies = jiffies + usecs_to_jiffies(dev->timeout) + msecs_to_jiffies(repeat_period(protocol)); mod_timer(&dev->timer_keyup, dev->keyup_jiffies); } @@ -1928,8 +1928,6 @@ goto out_raw; } - dev->registered = true; - rc = device_add(&dev->dev); if (rc) goto out_rx_free; @@ -1939,6 +1937,8 @@ dev->device_name ?: "Unspecified device", path ?: "N/A"); kfree(path); + dev->registered = true; + /* * once the the input device is registered in rc_setup_rx_device, * userspace can open the input device and rc_open() will be called reverted: --- linux-oem-5.10-5.10.0/drivers/media/rc/serial_ir.c +++ linux-oem-5.10-5.10.0.orig/drivers/media/rc/serial_ir.c @@ -385,7 +385,7 @@ } while (!(sinp(UART_IIR) & UART_IIR_NO_INT)); /* still pending ? */ mod_timer(&serial_ir.timeout_timer, + jiffies + nsecs_to_jiffies(serial_ir.rcdev->timeout)); - jiffies + usecs_to_jiffies(serial_ir.rcdev->timeout)); ir_raw_event_handle(serial_ir.rcdev); reverted: --- linux-oem-5.10-5.10.0/drivers/media/usb/pwc/pwc-if.c +++ linux-oem-5.10-5.10.0.orig/drivers/media/usb/pwc/pwc-if.c @@ -155,17 +155,16 @@ /***************************************************************************/ /* Private functions */ +static void *pwc_alloc_urb_buffer(struct device *dev, -static void *pwc_alloc_urb_buffer(struct usb_device *dev, size_t size, dma_addr_t *dma_handle) { - struct device *dmadev = dev->bus->sysdev; void *buffer = kmalloc(size, GFP_KERNEL); if (!buffer) return NULL; + *dma_handle = dma_map_single(dev, buffer, size, DMA_FROM_DEVICE); + if (dma_mapping_error(dev, *dma_handle)) { - *dma_handle = dma_map_single(dmadev, buffer, size, DMA_FROM_DEVICE); - if (dma_mapping_error(dmadev, *dma_handle)) { kfree(buffer); return NULL; } @@ -173,14 +172,12 @@ return buffer; } +static void pwc_free_urb_buffer(struct device *dev, -static void pwc_free_urb_buffer(struct usb_device *dev, size_t size, void *buffer, dma_addr_t dma_handle) { + dma_unmap_single(dev, dma_handle, size, DMA_FROM_DEVICE); - struct device *dmadev = dev->bus->sysdev; - - dma_unmap_single(dmadev, dma_handle, size, DMA_FROM_DEVICE); kfree(buffer); } @@ -285,7 +282,6 @@ static void pwc_isoc_handler(struct urb *urb) { struct pwc_device *pdev = (struct pwc_device *)urb->context; - struct device *dmadev = urb->dev->bus->sysdev; int i, fst, flen; unsigned char *iso_buf = NULL; @@ -332,7 +328,7 @@ /* Reset ISOC error counter. We did get here, after all. */ pdev->visoc_errors = 0; + dma_sync_single_for_cpu(&urb->dev->dev, - dma_sync_single_for_cpu(dmadev, urb->transfer_dma, urb->transfer_buffer_length, DMA_FROM_DEVICE); @@ -383,7 +379,7 @@ pdev->vlast_packet_size = flen; } + dma_sync_single_for_device(&urb->dev->dev, - dma_sync_single_for_device(dmadev, urb->transfer_dma, urb->transfer_buffer_length, DMA_FROM_DEVICE); @@ -465,7 +461,7 @@ urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint); urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; urb->transfer_buffer_length = ISO_BUFFER_SIZE; + urb->transfer_buffer = pwc_alloc_urb_buffer(&udev->dev, - urb->transfer_buffer = pwc_alloc_urb_buffer(udev, urb->transfer_buffer_length, &urb->transfer_dma); if (urb->transfer_buffer == NULL) { @@ -528,7 +524,7 @@ if (urb) { PWC_DEBUG_MEMORY("Freeing URB\n"); if (urb->transfer_buffer) + pwc_free_urb_buffer(&urb->dev->dev, - pwc_free_urb_buffer(urb->dev, urb->transfer_buffer_length, urb->transfer_buffer, urb->transfer_dma); diff -u linux-oem-5.10-5.10.0/drivers/misc/habanalabs/common/device.c linux-oem-5.10-5.10.0/drivers/misc/habanalabs/common/device.c --- linux-oem-5.10-5.10.0/drivers/misc/habanalabs/common/device.c +++ linux-oem-5.10-5.10.0/drivers/misc/habanalabs/common/device.c @@ -1425,15 +1425,6 @@ } } - /* Disable PCI access from device F/W so it won't send us additional - * interrupts. We disable MSI/MSI-X at the halt_engines function and we - * can't have the F/W sending us interrupts after that. We need to - * disable the access here because if the device is marked disable, the - * message won't be send. Also, in case of heartbeat, the device CPU is - * marked as disable so this message won't be sent - */ - hl_fw_send_pci_access_msg(hdev, CPUCP_PACKET_DISABLE_PCI_ACCESS); - /* Mark device as disabled */ hdev->disabled = true; reverted: --- linux-oem-5.10-5.10.0/drivers/misc/habanalabs/common/firmware_if.c +++ linux-oem-5.10-5.10.0.orig/drivers/misc/habanalabs/common/firmware_if.c @@ -385,10 +385,6 @@ } counters->rx_throughput = result; - memset(&pkt, 0, sizeof(pkt)); - pkt.ctl = cpu_to_le32(CPUCP_PACKET_PCIE_THROUGHPUT_GET << - CPUCP_PKT_CTL_OPCODE_SHIFT); - /* Fetch PCI tx counter */ pkt.index = cpu_to_le32(cpucp_pcie_throughput_tx); rc = hdev->asic_funcs->send_cpu_message(hdev, (u32 *) &pkt, sizeof(pkt), @@ -401,7 +397,6 @@ counters->tx_throughput = result; /* Fetch PCI replay counter */ - memset(&pkt, 0, sizeof(pkt)); pkt.ctl = cpu_to_le32(CPUCP_PACKET_PCIE_REPLAY_CNT_GET << CPUCP_PKT_CTL_OPCODE_SHIFT); reverted: --- linux-oem-5.10-5.10.0/drivers/misc/habanalabs/common/habanalabs_ioctl.c +++ linux-oem-5.10-5.10.0.orig/drivers/misc/habanalabs/common/habanalabs_ioctl.c @@ -133,8 +133,6 @@ hw_idle.is_idle = hdev->asic_funcs->is_device_idle(hdev, &hw_idle.busy_engines_mask_ext, NULL); - hw_idle.busy_engines_mask = - lower_32_bits(hw_idle.busy_engines_mask_ext); return copy_to_user(out, &hw_idle, min((size_t) max_size, sizeof(hw_idle))) ? -EFAULT : 0; diff -u linux-oem-5.10-5.10.0/drivers/misc/habanalabs/gaudi/gaudi.c linux-oem-5.10-5.10.0/drivers/misc/habanalabs/gaudi/gaudi.c --- linux-oem-5.10-5.10.0/drivers/misc/habanalabs/gaudi/gaudi.c +++ linux-oem-5.10-5.10.0/drivers/misc/habanalabs/gaudi/gaudi.c @@ -3119,8 +3119,7 @@ vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_DONTCOPY | VM_NORESERVE; - rc = dma_mmap_coherent(hdev->dev, vma, cpu_addr, - (dma_addr - HOST_PHYS_BASE), size); + rc = dma_mmap_coherent(hdev->dev, vma, cpu_addr, dma_addr, size); if (rc) dev_err(hdev->dev, "dma_mmap_coherent error %d", rc); reverted: --- linux-oem-5.10-5.10.0/drivers/misc/habanalabs/goya/goya.c +++ linux-oem-5.10-5.10.0.orig/drivers/misc/habanalabs/goya/goya.c @@ -2675,8 +2675,7 @@ vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_DONTCOPY | VM_NORESERVE; + rc = dma_mmap_coherent(hdev->dev, vma, cpu_addr, dma_addr, size); - rc = dma_mmap_coherent(hdev->dev, vma, cpu_addr, - (dma_addr - HOST_PHYS_BASE), size); if (rc) dev_err(hdev->dev, "dma_mmap_coherent error %d", rc); reverted: --- linux-oem-5.10-5.10.0/drivers/misc/lkdtm/Makefile +++ linux-oem-5.10-5.10.0.orig/drivers/misc/lkdtm/Makefile @@ -16,7 +16,7 @@ OBJCOPYFLAGS := OBJCOPYFLAGS_rodata_objcopy.o := \ + --rename-section .text=.rodata,alloc,readonly,load - --rename-section .noinstr.text=.rodata,alloc,readonly,load targets += rodata.o rodata_objcopy.o $(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE $(call if_changed,objcopy) reverted: --- linux-oem-5.10-5.10.0/drivers/misc/lkdtm/rodata.c +++ linux-oem-5.10-5.10.0.orig/drivers/misc/lkdtm/rodata.c @@ -5,7 +5,7 @@ */ #include "lkdtm.h" +void notrace lkdtm_rodata_do_nothing(void) -void noinstr lkdtm_rodata_do_nothing(void) { /* Does nothing. We just want an architecture agnostic "return". */ } reverted: --- linux-oem-5.10-5.10.0/drivers/mmc/core/sdio_cis.c +++ linux-oem-5.10-5.10.0.orig/drivers/mmc/core/sdio_cis.c @@ -20,8 +20,6 @@ #include "sdio_cis.h" #include "sdio_ops.h" -#define SDIO_READ_CIS_TIMEOUT_MS (10 * 1000) /* 10s */ - static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func, const unsigned char *buf, unsigned size) { @@ -276,8 +274,6 @@ do { unsigned char tpl_code, tpl_link; - unsigned long timeout = jiffies + - msecs_to_jiffies(SDIO_READ_CIS_TIMEOUT_MS); ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code); if (ret) @@ -330,8 +326,6 @@ prev = &this->next; if (ret == -ENOENT) { - if (time_after(jiffies, timeout)) - break; /* warn about unknown tuples */ pr_warn_ratelimited("%s: queuing unknown" " CIS tuple 0x%02x (%u bytes)\n", reverted: --- linux-oem-5.10-5.10.0/drivers/mmc/host/sdhci-pltfm.h +++ linux-oem-5.10-5.10.0.orig/drivers/mmc/host/sdhci-pltfm.h @@ -111,13 +111,8 @@ return host->private; } -extern const struct dev_pm_ops sdhci_pltfm_pmops; -#ifdef CONFIG_PM_SLEEP int sdhci_pltfm_suspend(struct device *dev); int sdhci_pltfm_resume(struct device *dev); +extern const struct dev_pm_ops sdhci_pltfm_pmops; -#else -static inline int sdhci_pltfm_suspend(struct device *dev) { return 0; } -static inline int sdhci_pltfm_resume(struct device *dev) { return 0; } -#endif #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ diff -u linux-oem-5.10-5.10.0/drivers/net/can/dev.c linux-oem-5.10-5.10.0/drivers/net/can/dev.c --- linux-oem-5.10-5.10.0/drivers/net/can/dev.c +++ linux-oem-5.10-5.10.0/drivers/net/can/dev.c @@ -1163,7 +1163,7 @@ { struct can_priv *priv = netdev_priv(dev); struct can_ctrlmode cm = {.flags = priv->ctrlmode}; - struct can_berr_counter bec = { }; + struct can_berr_counter bec; enum can_state state = priv->state; if (priv->do_get_state) reverted: --- linux-oem-5.10-5.10.0/drivers/net/dsa/bcm_sf2.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/dsa/bcm_sf2.c @@ -509,19 +509,15 @@ /* Find our integrated MDIO bus node */ dn = of_find_compatible_node(NULL, NULL, "brcm,unimac-mdio"); priv->master_mii_bus = of_mdio_find_bus(dn); + if (!priv->master_mii_bus) - if (!priv->master_mii_bus) { - of_node_put(dn); return -EPROBE_DEFER; - } get_device(&priv->master_mii_bus->dev); priv->master_mii_dn = dn; priv->slave_mii_bus = devm_mdiobus_alloc(ds->dev); + if (!priv->slave_mii_bus) - if (!priv->slave_mii_bus) { - of_node_put(dn); return -ENOMEM; - } priv->slave_mii_bus->priv = priv; priv->slave_mii_bus->name = "sf2 slave mii"; reverted: --- linux-oem-5.10-5.10.0/drivers/net/dsa/microchip/ksz_common.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/dsa/microchip/ksz_common.c @@ -400,7 +400,7 @@ gpiod_set_value_cansleep(dev->reset_gpio, 1); usleep_range(10000, 12000); gpiod_set_value_cansleep(dev->reset_gpio, 0); + usleep_range(100, 1000); - msleep(100); } mutex_init(&dev->dev_mutex); reverted: --- linux-oem-5.10-5.10.0/drivers/net/dsa/mv88e6xxx/chip.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/dsa/mv88e6xxx/chip.c @@ -1669,11 +1669,7 @@ if (!entry.portvec) entry.state = 0; } else { + entry.portvec |= BIT(port); - if (state == MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC) - entry.portvec = BIT(port); - else - entry.portvec |= BIT(port); - entry.state = state; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/dsa/ocelot/felix.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/dsa/ocelot/felix.c @@ -214,24 +214,9 @@ { struct ocelot *ocelot = ds->priv; struct ocelot_port *ocelot_port = ocelot->ports[port]; - int err; - - ocelot_port_rmwl(ocelot_port, 0, DEV_MAC_ENA_CFG_RX_ENA, - DEV_MAC_ENA_CFG); + ocelot_port_writel(ocelot_port, 0, DEV_MAC_ENA_CFG); ocelot_fields_write(ocelot, port, QSYS_SWITCH_PORT_MODE_PORT_ENA, 0); - - err = ocelot_port_flush(ocelot, port); - if (err) - dev_err(ocelot->dev, "failed to flush port %d: %d\n", - port, err); - - /* Put the port in reset. */ - ocelot_port_writel(ocelot_port, - DEV_CLOCK_CFG_MAC_TX_RST | - DEV_CLOCK_CFG_MAC_RX_RST | - DEV_CLOCK_CFG_LINK_SPEED(OCELOT_SPEED_1000), - DEV_CLOCK_CFG); } static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port, diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c linux-oem-5.10-5.10.0/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c @@ -1158,9 +1158,11 @@ #endif } if (!n || !n->dev) - goto free_dst; + goto free_sk; ndev = n->dev; + if (!ndev) + goto free_dst; if (is_vlan_dev(ndev)) ndev = vlan_dev_real_dev(ndev); @@ -1247,8 +1249,7 @@ free_csk: chtls_sock_release(&csk->kref); free_dst: - if (n) - neigh_release(n); + neigh_release(n); dst_release(dst); free_sk: inet_csk_prepare_forced_close(newsk); reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/freescale/enetc/enetc_hw.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/freescale/enetc/enetc_hw.h @@ -196,8 +196,6 @@ #define ENETC_CBS_BW_MASK GENMASK(6, 0) #define ENETC_PTCCBSR1(n) (0x1114 + (n) * 8) /* n = 0 to 7*/ #define ENETC_RSSHASH_KEY_SIZE 40 -#define ENETC_PRSSCAPR 0x1404 -#define ENETC_PRSSCAPR_GET_NUM_RSS(val) (BIT((val) & 0xf) * 32) #define ENETC_PRSSK(n) (0x1410 + (n) * 4) /* n = [0..9] */ #define ENETC_PSIVLANFMR 0x1700 #define ENETC_PSIVLANFMR_VS BIT(0) reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -1004,51 +1004,6 @@ phylink_destroy(priv->phylink); } -/* Initialize the entire shared memory for the flow steering entries - * of this port (PF + VFs) - */ -static int enetc_init_port_rfs_memory(struct enetc_si *si) -{ - struct enetc_cmd_rfse rfse = {0}; - struct enetc_hw *hw = &si->hw; - int num_rfs, i, err = 0; - u32 val; - - val = enetc_port_rd(hw, ENETC_PRFSCAPR); - num_rfs = ENETC_PRFSCAPR_GET_NUM_RFS(val); - - for (i = 0; i < num_rfs; i++) { - err = enetc_set_fs_entry(si, &rfse, i); - if (err) - break; - } - - return err; -} - -static int enetc_init_port_rss_memory(struct enetc_si *si) -{ - struct enetc_hw *hw = &si->hw; - int num_rss, err; - int *rss_table; - u32 val; - - val = enetc_port_rd(hw, ENETC_PRSSCAPR); - num_rss = ENETC_PRSSCAPR_GET_NUM_RSS(val); - if (!num_rss) - return 0; - - rss_table = kcalloc(num_rss, sizeof(*rss_table), GFP_KERNEL); - if (!rss_table) - return -ENOMEM; - - err = enetc_set_rss_table(si, rss_table, num_rss); - - kfree(rss_table); - - return err; -} - static int enetc_pf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -1103,18 +1058,6 @@ goto err_alloc_si_res; } - err = enetc_init_port_rfs_memory(si); - if (err) { - dev_err(&pdev->dev, "Failed to initialize RFS memory\n"); - goto err_init_port_rfs; - } - - err = enetc_init_port_rss_memory(si); - if (err) { - dev_err(&pdev->dev, "Failed to initialize RSS memory\n"); - goto err_init_port_rss; - } - err = enetc_alloc_msix(priv); if (err) { dev_err(&pdev->dev, "MSIX alloc failed\n"); @@ -1143,8 +1086,6 @@ enetc_mdiobus_destroy(pf); err_mdiobus_create: enetc_free_msix(priv); -err_init_port_rss: -err_init_port_rfs: err_alloc_msix: enetc_free_si_resources(priv); err_alloc_si_res: reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/freescale/fec_main.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/freescale/fec_main.c @@ -2165,9 +2165,9 @@ fep->mii_bus->parent = &pdev->dev; err = of_mdiobus_register(fep->mii_bus, node); + of_node_put(node); if (err) goto err_out_free_mdiobus; - of_node_put(node); mii_cnt++; @@ -2180,7 +2180,6 @@ err_out_free_mdiobus: mdiobus_free(fep->mii_bus); err_out: - of_node_put(node); return err; } diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c linux-oem-5.10-5.10.0/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -9404,19 +9404,12 @@ void hclge_reset_vf_queue(struct hclge_vport *vport, u16 queue_id) { - struct hnae3_handle *handle = &vport->nic; struct hclge_dev *hdev = vport->back; int reset_try_times = 0; int reset_status; u16 queue_gid; int ret; - if (queue_id >= handle->kinfo.num_tqps) { - dev_warn(&hdev->pdev->dev, "Invalid vf queue id(%u)\n", - queue_id); - return; - } - queue_gid = hclge_covert_handle_qid_global(&vport->nic, queue_id); ret = hclge_send_reset_tqp_cmd(hdev, queue_gid, true); reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -158,31 +158,21 @@ struct hclge_vport *vport) { struct hnae3_ring_chain_node *cur_chain, *new_chain; - struct hclge_dev *hdev = vport->back; int ring_num; + int i = 0; - int i; ring_num = req->msg.ring_num; if (ring_num > HCLGE_MBX_MAX_RING_CHAIN_PARAM_NUM) return -ENOMEM; - for (i = 0; i < ring_num; i++) { - if (req->msg.param[i].tqp_index >= vport->nic.kinfo.rss_size) { - dev_err(&hdev->pdev->dev, "tqp index(%u) is out of range(0-%u)\n", - req->msg.param[i].tqp_index, - vport->nic.kinfo.rss_size - 1); - return -EINVAL; - } - } - hnae3_set_bit(ring_chain->flag, HNAE3_RING_TYPE_B, + req->msg.param[i].ring_type); - req->msg.param[0].ring_type); ring_chain->tqp_index = hclge_get_queue_id(vport->nic.kinfo.tqp + [req->msg.param[i].tqp_index]); - [req->msg.param[0].tqp_index]); hnae3_set_field(ring_chain->int_gl_idx, HNAE3_RING_GL_IDX_M, + HNAE3_RING_GL_IDX_S, req->msg.param[i].int_gl_index); - HNAE3_RING_GL_IDX_S, req->msg.param[0].int_gl_index); cur_chain = ring_chain; @@ -591,17 +581,6 @@ index = mbx_req->msg.data[0]; - /* Check the query index of rss_hash_key from VF, make sure no - * more than the size of rss_hash_key. - */ - if (((index + 1) * HCLGE_RSS_MBX_RESP_LEN) > - sizeof(vport[0].rss_hash_key)) { - dev_warn(&hdev->pdev->dev, - "failed to get the rss hash key, the index(%u) invalid !\n", - index); - return; - } - memcpy(resp_msg->data, &hdev->vport[0].rss_hash_key[index * HCLGE_RSS_MBX_RESP_LEN], HCLGE_RSS_MBX_RESP_LEN); diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/ibm/ibmvnic.c linux-oem-5.10-5.10.0/drivers/net/ethernet/ibm/ibmvnic.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/ibm/ibmvnic.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/ibm/ibmvnic.c @@ -4813,22 +4813,7 @@ complete(&adapter->init_done); adapter->init_done_rc = -EIO; } - rc = ibmvnic_reset(adapter, VNIC_RESET_FAILOVER); - if (rc && rc != -EBUSY) { - /* We were unable to schedule the failover - * reset either because the adapter was still - * probing (eg: during kexec) or we could not - * allocate memory. Clear the failover_pending - * flag since no one else will. We ignore - * EBUSY because it means either FAILOVER reset - * is already scheduled or the adapter is - * being removed. - */ - netdev_err(netdev, - "Error %ld scheduling failover reset\n", - rc); - adapter->failover_pending = false; - } + ibmvnic_reset(adapter, VNIC_RESET_FAILOVER); break; case IBMVNIC_CRQ_INIT_COMPLETE: dev_info(dev, "Partner initialization complete\n"); @@ -4994,12 +4979,6 @@ while (!done) { /* Pull all the valid messages off the CRQ */ while ((crq = ibmvnic_next_crq(adapter)) != NULL) { - /* This barrier makes sure ibmvnic_next_crq()'s - * crq->generic.first & IBMVNIC_CRQ_CMD_RSP is loaded - * before ibmvnic_handle_crq()'s - * switch(gen_crq->first) and switch(gen_crq->cmd). - */ - dma_rmb(); ibmvnic_handle_crq(crq, adapter); crq->generic.first = 0; } @@ -5354,6 +5333,11 @@ unsigned long flags; spin_lock_irqsave(&adapter->state_lock, flags); + if (test_bit(0, &adapter->resetting)) { + spin_unlock_irqrestore(&adapter->state_lock, flags); + return -EBUSY; + } + adapter->state = VNIC_REMOVING; spin_unlock_irqrestore(&adapter->state_lock, flags); diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -55,7 +55,12 @@ pfe.event = VIRTCHNL_EVENT_LINK_CHANGE; pfe.severity = PF_EVENT_SEVERITY_INFO; - if (vf->link_forced) { + + /* Always report link is down if the VF queues aren't enabled */ + if (!vf->queues_enabled) { + pfe.event_data.link_event.link_status = false; + pfe.event_data.link_event.link_speed = 0; + } else if (vf->link_forced) { pfe.event_data.link_event.link_status = vf->link_up; pfe.event_data.link_event.link_speed = (vf->link_up ? VIRTCHNL_LINK_SPEED_40GB : 0); @@ -65,6 +70,7 @@ pfe.event_data.link_event.link_speed = i40e_virtchnl_link_speed(ls->link_speed); } + i40e_aq_send_msg_to_vf(hw, abs_vf_id, VIRTCHNL_OP_EVENT, 0, (u8 *)&pfe, sizeof(pfe), NULL); } @@ -2437,6 +2443,8 @@ } } + vf->queues_enabled = true; + error_param: /* send the response to the VF */ return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES, @@ -2458,6 +2466,9 @@ struct i40e_pf *pf = vf->pf; i40e_status aq_ret = 0; + /* Immediately mark queues as disabled */ + vf->queues_enabled = false; + if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) { aq_ret = I40E_ERR_PARAM; goto error_param; @@ -4035,16 +4046,20 @@ goto error_param; vf = &pf->vf[vf_id]; + vsi = pf->vsi[vf->lan_vsi_idx]; /* When the VF is resetting wait until it is done. * It can take up to 200 milliseconds, * but wait for up to 300 milliseconds to be safe. - * Acquire the VSI pointer only after the VF has been - * properly initialized. + * If the VF is indeed in reset, the vsi pointer has + * to show on the newly loaded vsi under pf->vsi[id]. */ for (i = 0; i < 15; i++) { - if (test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) + if (test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { + if (i > 0) + vsi = pf->vsi[vf->lan_vsi_idx]; break; + } msleep(20); } if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { @@ -4053,7 +4068,6 @@ ret = -EAGAIN; goto error_param; } - vsi = pf->vsi[vf->lan_vsi_idx]; if (is_multicast_ether_addr(mac)) { dev_err(&pf->pdev->dev, reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h @@ -98,6 +98,7 @@ unsigned int tx_rate; /* Tx bandwidth limit in Mbps */ bool link_forced; bool link_up; /* only valid if VF link is forced */ + bool queues_enabled; /* true if the VF queues are enabled */ bool spoofchk; u16 num_vlan; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/ice/ice.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/ice/ice.h @@ -68,9 +68,7 @@ #define ICE_INT_NAME_STR_LEN (IFNAMSIZ + 16) #define ICE_AQ_LEN 64 #define ICE_MBXSQ_LEN 64 +#define ICE_MIN_MSIX 2 -#define ICE_MIN_LAN_TXRX_MSIX 1 -#define ICE_MIN_LAN_OICR_MSIX 1 -#define ICE_MIN_MSIX (ICE_MIN_LAN_TXRX_MSIX + ICE_MIN_LAN_OICR_MSIX) #define ICE_FDIR_MSIX 1 #define ICE_NO_VSI 0xffff #define ICE_VSI_MAP_CONTIG 0 reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -3258,8 +3258,8 @@ */ static int ice_get_max_txq(struct ice_pf *pf) { + return min_t(int, num_online_cpus(), + pf->hw.func_caps.common_cap.num_txq); - return min3(pf->num_lan_msix, (u16)num_online_cpus(), - (u16)pf->hw.func_caps.common_cap.num_txq); } /** @@ -3268,8 +3268,8 @@ */ static int ice_get_max_rxq(struct ice_pf *pf) { + return min_t(int, num_online_cpus(), + pf->hw.func_caps.common_cap.num_rxq); - return min3(pf->num_lan_msix, (u16)num_online_cpus(), - (u16)pf->hw.func_caps.common_cap.num_rxq); } /** reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c @@ -1576,13 +1576,7 @@ sizeof(struct in6_addr)); input->ip.v6.l4_header = fsp->h_u.usr_ip6_spec.l4_4_bytes; input->ip.v6.tc = fsp->h_u.usr_ip6_spec.tclass; + input->ip.v6.proto = fsp->h_u.usr_ip6_spec.l4_proto; - - /* if no protocol requested, use IPPROTO_NONE */ - if (!fsp->m_u.usr_ip6_spec.l4_proto) - input->ip.v6.proto = IPPROTO_NONE; - else - input->ip.v6.proto = fsp->h_u.usr_ip6_spec.l4_proto; - memcpy(input->mask.v6.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst, sizeof(struct in6_addr)); memcpy(input->mask.v6.src_ip, fsp->m_u.usr_ip6_spec.ip6src, reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/ice/ice_lib.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/ice/ice_lib.c @@ -161,9 +161,8 @@ switch (vsi->type) { case ICE_VSI_PF: + vsi->alloc_txq = min_t(int, ice_get_avail_txq_count(pf), + num_online_cpus()); - vsi->alloc_txq = min3(pf->num_lan_msix, - ice_get_avail_txq_count(pf), - (u16)num_online_cpus()); if (vsi->req_txq) { vsi->alloc_txq = vsi->req_txq; vsi->num_txq = vsi->req_txq; @@ -175,9 +174,8 @@ if (!test_bit(ICE_FLAG_RSS_ENA, pf->flags)) { vsi->alloc_rxq = 1; } else { + vsi->alloc_rxq = min_t(int, ice_get_avail_rxq_count(pf), + num_online_cpus()); - vsi->alloc_rxq = min3(pf->num_lan_msix, - ice_get_avail_rxq_count(pf), - (u16)num_online_cpus()); if (vsi->req_rxq) { vsi->alloc_rxq = vsi->req_rxq; vsi->num_rxq = vsi->req_rxq; @@ -186,9 +184,7 @@ pf->num_lan_rx = vsi->alloc_rxq; + vsi->num_q_vectors = max_t(int, vsi->alloc_rxq, vsi->alloc_txq); - vsi->num_q_vectors = min_t(int, pf->num_lan_msix, - max_t(int, vsi->alloc_rxq, - vsi->alloc_txq)); break; case ICE_VSI_VF: vf = &pf->vf[vsi->vf_id]; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/ice/ice_main.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/ice/ice_main.c @@ -3433,14 +3433,18 @@ if (v_actual < v_budget) { dev_warn(dev, "not enough OS MSI-X vectors. requested = %d, obtained = %d\n", v_budget, v_actual); +/* 2 vectors each for LAN and RDMA (traffic + OICR), one for flow director */ +#define ICE_MIN_LAN_VECS 2 +#define ICE_MIN_RDMA_VECS 2 +#define ICE_MIN_VECS (ICE_MIN_LAN_VECS + ICE_MIN_RDMA_VECS + 1) + if (v_actual < ICE_MIN_LAN_VECS) { - if (v_actual < ICE_MIN_MSIX) { /* error if we can't get minimum vectors */ pci_disable_msix(pf->pdev); err = -ERANGE; goto msix_err; } else { + pf->num_lan_msix = ICE_MIN_LAN_VECS; - pf->num_lan_msix = ICE_MIN_LAN_TXRX_MSIX; } } @@ -4883,15 +4887,9 @@ goto err_update_filters; } + /* Add filter for new MAC. If filter exists, just return success */ - /* Add filter for new MAC. If filter exists, return success */ status = ice_fltr_add_mac(vsi, mac, ICE_FWD_TO_VSI); if (status == ICE_ERR_ALREADY_EXISTS) { - /* Although this MAC filter is already present in hardware it's - * possible in some cases (e.g. bonding) that dev_addr was - * modified outside of the driver and needs to be restored back - * to this value. - */ - memcpy(netdev->dev_addr, mac, netdev->addr_len); netdev_dbg(netdev, "filter for MAC %pM already exists\n", mac); return 0; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/ice/ice_txrx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/ice/ice_txrx.c @@ -1923,15 +1923,12 @@ ICE_TX_CTX_EIPT_IPV4_NO_CSUM; l4_proto = ip.v4->protocol; } else if (first->tx_flags & ICE_TX_FLAGS_IPV6) { - int ret; - tunnel |= ICE_TX_CTX_EIPT_IPV6; exthdr = ip.hdr + sizeof(*ip.v6); l4_proto = ip.v6->nexthdr; + if (l4.hdr != exthdr) + ipv6_skip_exthdr(skb, exthdr - skb->data, + &l4_proto, &frag_off); - ret = ipv6_skip_exthdr(skb, exthdr - skb->data, - &l4_proto, &frag_off); - if (ret < 0) - return -1; } /* define outer transport */ diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/igc/igc_ethtool.c linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/igc/igc_ethtool.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1675,18 +1675,12 @@ cmd->base.phy_address = hw->phy.addr; /* advertising link modes */ - if (hw->phy.autoneg_advertised & ADVERTISE_10_HALF) - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Half); - if (hw->phy.autoneg_advertised & ADVERTISE_10_FULL) - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Full); - if (hw->phy.autoneg_advertised & ADVERTISE_100_HALF) - ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Half); - if (hw->phy.autoneg_advertised & ADVERTISE_100_FULL) - ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Full); - if (hw->phy.autoneg_advertised & ADVERTISE_1000_FULL) - ethtool_link_ksettings_add_link_mode(cmd, advertising, 1000baseT_Full); - if (hw->phy.autoneg_advertised & ADVERTISE_2500_FULL) - ethtool_link_ksettings_add_link_mode(cmd, advertising, 2500baseT_Full); + ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Half); + ethtool_link_ksettings_add_link_mode(cmd, advertising, 10baseT_Full); + ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Half); + ethtool_link_ksettings_add_link_mode(cmd, advertising, 100baseT_Full); + ethtool_link_ksettings_add_link_mode(cmd, advertising, 1000baseT_Full); + ethtool_link_ksettings_add_link_mode(cmd, advertising, 2500baseT_Full); /* set autoneg settings */ if (hw->mac.autoneg == 1) { @@ -1799,12 +1793,6 @@ ethtool_convert_link_mode_to_legacy_u32(&advertising, cmd->link_modes.advertising); - /* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT. - * We have to check this and convert it to ADVERTISE_2500_FULL - * (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly. - */ - if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full)) - advertising |= ADVERTISE_2500_FULL; if (cmd->base.autoneg == AUTONEG_ENABLE) { hw->mac.autoneg = 1; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/igc/igc_i225.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/igc/igc_i225.c @@ -219,9 +219,9 @@ u16 *data) { struct igc_nvm_info *nvm = &hw->nvm; - s32 ret_val = -IGC_ERR_NVM; u32 attempts = 100000; u32 i, k, eewr = 0; + s32 ret_val = 0; /* A check for invalid values: offset too large, too many words, * too many words for the offset, and not enough words. @@ -229,6 +229,7 @@ if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) || words == 0) { hw_dbg("nvm parameter(s) out of bounds\n"); + ret_val = -IGC_ERR_NVM; goto out; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/intel/igc/igc_mac.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/intel/igc/igc_mac.c @@ -638,7 +638,7 @@ } out: + return 0; - return ret_val; } /** diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c linux-oem-5.10-5.10.0/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c @@ -29,16 +29,16 @@ /* Clear entry invalidation bit */ pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK; - /* Write sram index - indirect access */ - mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index); - for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++) - mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]); - /* Write tcam index - indirect access */ mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index); for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++) mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]); + /* Write sram index - indirect access */ + mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index); + for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++) + mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]); + return 0; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -473,11 +473,10 @@ dma_addr_t iova; u8 *buf; + buf = napi_alloc_frag(pool->rbsize); - buf = napi_alloc_frag(pool->rbsize + OTX2_ALIGN); if (unlikely(!buf)) return -ENOMEM; - buf = PTR_ALIGN(buf, OTX2_ALIGN); iova = dma_map_single_attrs(pfvf->dev, buf, pool->rbsize, DMA_FROM_DEVICE, DMA_ATTR_SKIP_CPU_SYNC); if (unlikely(dma_mapping_error(pfvf->dev, iova))) { reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en/health.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en/health.c @@ -275,7 +275,7 @@ err = devlink_fmsg_binary_pair_nest_start(fmsg, "data"); if (err) + return err; - goto free_page; cmd = mlx5_rsc_dump_cmd_create(mdev, key); if (IS_ERR(cmd)) { diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -167,12 +167,6 @@ .min_size = 16 * 1024, }; -static bool -mlx5_tc_ct_entry_has_nat(struct mlx5_ct_entry *entry) -{ - return !!(entry->tuple_nat_node.next); -} - static int mlx5_tc_ct_rule_to_tuple(struct mlx5_ct_tuple *tuple, struct flow_rule *rule) { @@ -917,13 +911,13 @@ err_insert: mlx5_tc_ct_entry_del_rules(ct_priv, entry); err_rules: - if (mlx5_tc_ct_entry_has_nat(entry)) - rhashtable_remove_fast(&ct_priv->ct_tuples_nat_ht, - &entry->tuple_nat_node, tuples_nat_ht_params); + rhashtable_remove_fast(&ct_priv->ct_tuples_nat_ht, + &entry->tuple_nat_node, tuples_nat_ht_params); err_tuple_nat: - rhashtable_remove_fast(&ct_priv->ct_tuples_ht, - &entry->tuple_node, - tuples_ht_params); + if (entry->tuple_node.next) + rhashtable_remove_fast(&ct_priv->ct_tuples_ht, + &entry->tuple_node, + tuples_ht_params); err_tuple: err_set: kfree(entry); @@ -938,7 +932,7 @@ { mlx5_tc_ct_entry_del_rules(ct_priv, entry); mutex_lock(&ct_priv->shared_counter_lock); - if (mlx5_tc_ct_entry_has_nat(entry)) + if (entry->tuple_node.next) rhashtable_remove_fast(&ct_priv->ct_tuples_nat_ht, &entry->tuple_nat_node, tuples_nat_ht_params); reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_stats.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_stats.c @@ -76,7 +76,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS(ipsec_sw) { + return NUM_IPSEC_SW_COUNTERS; - return priv->ipsec ? NUM_IPSEC_SW_COUNTERS : 0; } static inline MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(ipsec_sw) {} @@ -105,7 +105,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS(ipsec_hw) { + return (mlx5_fpga_ipsec_device_caps(priv->mdev)) ? NUM_IPSEC_HW_COUNTERS : 0; - return (priv->ipsec && mlx5_fpga_ipsec_device_caps(priv->mdev)) ? NUM_IPSEC_HW_COUNTERS : 0; } static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(ipsec_hw) reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c @@ -1151,7 +1151,6 @@ { struct mlx5e_channels new_channels = {}; bool reset_channels = true; - bool opened; int err = 0; mutex_lock(&priv->state_lock); @@ -1160,24 +1159,22 @@ mlx5e_params_calc_trust_tx_min_inline_mode(priv->mdev, &new_channels.params, trust_state); + if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) { + priv->channels.params = new_channels.params; - opened = test_bit(MLX5E_STATE_OPENED, &priv->state); - if (!opened) reset_channels = false; + } /* Skip if tx_min_inline is the same */ if (new_channels.params.tx_min_inline_mode == priv->channels.params.tx_min_inline_mode) reset_channels = false; + if (reset_channels) - if (reset_channels) { err = mlx5e_safe_switch_channels(priv, &new_channels, mlx5e_update_trust_state_hw, &trust_state); + else - } else { err = mlx5e_update_trust_state_hw(priv, &trust_state); - if (!err && !opened) - priv->channels.params = new_channels.params; - } mutex_unlock(&priv->state_lock); diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -444,18 +444,12 @@ goto out; } - new_channels.params = *cur_params; + new_channels.params = priv->channels.params; new_channels.params.num_channels = count; if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) { - struct mlx5e_params old_params; - - old_params = *cur_params; *cur_params = new_channels.params; err = mlx5e_num_channels_changed(priv); - if (err) - *cur_params = old_params; - goto out; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3580,23 +3580,18 @@ new_channels.params.num_tc = tc ? tc : 1; if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) { - struct mlx5e_params old_params; - - old_params = priv->channels.params; priv->channels.params = new_channels.params; - err = mlx5e_num_channels_changed(priv); - if (err) - priv->channels.params = old_params; - goto out; } err = mlx5e_safe_switch_channels(priv, &new_channels, mlx5e_num_channels_changed_ctx, NULL); + if (err) + goto out; + priv->max_opened_tc = max_t(u8, priv->max_opened_tc, + new_channels.params.num_tc); out: - priv->max_opened_tc = max_t(u8, priv->max_opened_tc, - priv->channels.params.num_tc); mutex_unlock(&priv->state_lock); return err; } @@ -3728,7 +3723,7 @@ struct mlx5e_priv *priv = netdev_priv(netdev); struct mlx5_core_dev *mdev = priv->mdev; struct mlx5e_channels new_channels = {}; + struct mlx5e_params *old_params; - struct mlx5e_params *cur_params; int err = 0; bool reset; @@ -3741,8 +3736,8 @@ goto out; } + old_params = &priv->channels.params; + if (enable && !MLX5E_GET_PFLAG(old_params, MLX5E_PFLAG_RX_STRIDING_RQ)) { - cur_params = &priv->channels.params; - if (enable && !MLX5E_GET_PFLAG(cur_params, MLX5E_PFLAG_RX_STRIDING_RQ)) { netdev_warn(netdev, "can't set LRO with legacy RQ\n"); err = -EINVAL; goto out; @@ -3750,23 +3745,18 @@ reset = test_bit(MLX5E_STATE_OPENED, &priv->state); + new_channels.params = *old_params; - new_channels.params = *cur_params; new_channels.params.lro_en = enable; + if (old_params->rq_wq_type != MLX5_WQ_TYPE_CYCLIC) { + if (mlx5e_rx_mpwqe_is_linear_skb(mdev, old_params, NULL) == - if (cur_params->rq_wq_type != MLX5_WQ_TYPE_CYCLIC) { - if (mlx5e_rx_mpwqe_is_linear_skb(mdev, cur_params, NULL) == mlx5e_rx_mpwqe_is_linear_skb(mdev, &new_channels.params, NULL)) reset = false; } if (!reset) { + *old_params = new_channels.params; - struct mlx5e_params old_params; - - old_params = *cur_params; - *cur_params = new_channels.params; err = mlx5e_modify_tirs_lro(priv); - if (err) - *cur_params = old_params; goto out; } @@ -4040,16 +4030,9 @@ } if (!reset) { - unsigned int old_mtu = params->sw_mtu; - params->sw_mtu = new_mtu; + if (preactivate) + preactivate(priv, NULL); - if (preactivate) { - err = preactivate(priv, NULL); - if (err) { - params->sw_mtu = old_mtu; - goto out; - } - } netdev->mtu = params->sw_mtu; goto out; } @@ -5007,7 +4990,7 @@ FT_CAP(modify_root) && FT_CAP(identified_miss_table_mode) && FT_CAP(flow_table_modify)) { +#ifdef CONFIG_MLX5_ESWITCH -#if IS_ENABLED(CONFIG_MLX5_CLS_ACT) netdev->hw_features |= NETIF_F_HW_TC; #endif #ifdef CONFIG_MLX5_EN_ARFS reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -738,9 +738,7 @@ netdev->features |= NETIF_F_NETNS_LOCAL; -#if IS_ENABLED(CONFIG_MLX5_CLS_ACT) netdev->hw_features |= NETIF_F_HW_TC; -#endif netdev->hw_features |= NETIF_F_SG; netdev->hw_features |= NETIF_F_IP_CSUM; netdev->hw_features |= NETIF_F_IPV6_CSUM; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1262,10 +1262,8 @@ mlx5e_complete_rx_cqe(rq, cqe, cqe_bcnt, skb); if (mlx5e_cqe_regb_chain(cqe)) + if (!mlx5e_tc_update_skb(cqe, skb)) - if (!mlx5e_tc_update_skb(cqe, skb)) { - dev_kfree_skb_any(skb); goto free_wqe; - } napi_gro_receive(rq->cq.napi, skb); @@ -1318,10 +1316,8 @@ if (rep->vlan && skb_vlan_tag_present(skb)) skb_vlan_pop(skb); + if (!mlx5e_rep_tc_update_skb(cqe, skb, &tc_priv)) - if (!mlx5e_rep_tc_update_skb(cqe, skb, &tc_priv)) { - dev_kfree_skb_any(skb); goto free_wqe; - } napi_gro_receive(rq->cq.napi, skb); @@ -1375,10 +1371,8 @@ mlx5e_complete_rx_cqe(rq, cqe, cqe_bcnt, skb); + if (!mlx5e_rep_tc_update_skb(cqe, skb, &tc_priv)) - if (!mlx5e_rep_tc_update_skb(cqe, skb, &tc_priv)) { - dev_kfree_skb_any(skb); goto mpwrq_cqe_out; - } napi_gro_receive(rq->cq.napi, skb); @@ -1534,10 +1528,8 @@ mlx5e_complete_rx_cqe(rq, cqe, cqe_bcnt, skb); if (mlx5e_cqe_regb_chain(cqe)) + if (!mlx5e_tc_update_skb(cqe, skb)) - if (!mlx5e_tc_update_skb(cqe, skb)) { - dev_kfree_skb_any(skb); goto mpwrq_cqe_out; - } napi_gro_receive(rq->cq.napi, skb); reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -67,7 +67,6 @@ #include "lib/geneve.h" #include "lib/fs_chains.h" #include "diag/en_tc_tracepoint.h" -#include #define nic_chains(priv) ((priv)->fs.tc.chains) #define MLX5_MH_ACT_SZ MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto) @@ -1165,9 +1164,6 @@ struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts; struct mlx5_flow_handle *rule; - if (attr->flags & MLX5_ESW_ATTR_FLAG_SLOW_PATH) - return mlx5_eswitch_add_offloaded_rule(esw, spec, attr); - if (flow_flag_test(flow, CT)) { mod_hdr_acts = &attr->parse_attr->mod_hdr_acts; @@ -1198,9 +1194,6 @@ { flow_flag_clear(flow, OFFLOADED); - if (attr->flags & MLX5_ESW_ATTR_FLAG_SLOW_PATH) - goto offload_rule_0; - if (flow_flag_test(flow, CT)) { mlx5_tc_ct_delete_flow(get_ct_priv(flow->priv), flow, attr); return; @@ -1209,7 +1202,6 @@ if (attr->esw_attr->split_count) mlx5_eswitch_del_fwd_rule(esw, flow->rule[1], attr); -offload_rule_0: mlx5_eswitch_del_offloaded_rule(esw, flow->rule[0], attr); } @@ -2279,8 +2271,8 @@ BIT(FLOW_DISSECTOR_KEY_ENC_OPTS) | BIT(FLOW_DISSECTOR_KEY_MPLS))) { NL_SET_ERR_MSG_MOD(extack, "Unsupported key"); + netdev_warn(priv->netdev, "Unsupported key used: 0x%x\n", + dissector->used_keys); - netdev_dbg(priv->netdev, "Unsupported key used: 0x%x\n", - dissector->used_keys); return -EOPNOTSUPP; } @@ -5017,13 +5009,13 @@ return err; } +static int apply_police_params(struct mlx5e_priv *priv, u32 rate, -static int apply_police_params(struct mlx5e_priv *priv, u64 rate, struct netlink_ext_ack *extack) { struct mlx5e_rep_priv *rpriv = priv->ppriv; struct mlx5_eswitch *esw; - u32 rate_mbps = 0; u16 vport_num; + u32 rate_mbps; int err; vport_num = rpriv->rep->vport; @@ -5040,11 +5032,7 @@ * Moreover, if rate is non zero we choose to configure to a minimum of * 1 mbit/sec. */ + rate_mbps = rate ? max_t(u32, (rate * 8 + 500000) / 1000000, 1) : 0; - if (rate) { - rate = (rate * BITS_PER_BYTE) + 500000; - rate_mbps = max_t(u32, do_div(rate, 1000000), 1); - } - err = mlx5_esw_modify_vport_rate(esw, vport_num, rate_mbps); if (err) NL_SET_ERR_MSG_MOD(extack, "failed applying action to hardware"); reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1141,7 +1141,6 @@ destroy_ft: root->cmds->destroy_flow_table(root, ft); free_ft: - rhltable_destroy(&ft->fgs_hash); kfree(ft); unlock_root: mutex_unlock(&root->chain_lock); @@ -1764,7 +1763,6 @@ if (!fte_tmp) continue; rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte_tmp); - /* No error check needed here, because insert_fte() is not called */ up_write_ref_node(&fte_tmp->node, false); tree_put_node(&fte_tmp->node, false); kmem_cache_free(steering->ftes_cache, fte); @@ -1817,8 +1815,6 @@ up_write_ref_node(&g->node, false); rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte); up_write_ref_node(&fte->node, false); - if (IS_ERR(rule)) - tree_put_node(&fte->node, false); return rule; } rule = ERR_PTR(-ENOENT); @@ -1917,8 +1913,6 @@ up_write_ref_node(&g->node, false); rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte); up_write_ref_node(&fte->node, false); - if (IS_ERR(rule)) - tree_put_node(&fte->node, false); tree_put_node(&g->node, false); return rule; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h @@ -90,9 +90,4 @@ u32 key_type, u32 *p_key_id); void mlx5_destroy_encryption_key(struct mlx5_core_dev *mdev, u32 key_id); -static inline struct net *mlx5_core_net(struct mlx5_core_dev *dev) -{ - return devlink_net(priv_to_devlink(dev)); -} - #endif reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c @@ -58,7 +58,7 @@ struct rb_node rb_node; u64 addr; struct page *page; + u16 func_id; - u32 function; unsigned long bitmask; struct list_head list; unsigned free_count; @@ -74,17 +74,12 @@ MLX5_NUM_4K_IN_PAGE = PAGE_SIZE / MLX5_ADAPTER_PAGE_SIZE, }; +static struct rb_root *page_root_per_func_id(struct mlx5_core_dev *dev, u16 func_id) -static u32 get_function(u16 func_id, bool ec_function) -{ - return (u32)func_id | (ec_function << 16); -} - -static struct rb_root *page_root_per_function(struct mlx5_core_dev *dev, u32 function) { struct rb_root *root; int err; + root = xa_load(&dev->priv.page_root_xa, func_id); - root = xa_load(&dev->priv.page_root_xa, function); if (root) return root; @@ -92,7 +87,7 @@ if (!root) return ERR_PTR(-ENOMEM); + err = xa_insert(&dev->priv.page_root_xa, func_id, root, GFP_KERNEL); - err = xa_insert(&dev->priv.page_root_xa, function, root, GFP_KERNEL); if (err) { kfree(root); return ERR_PTR(err); @@ -103,7 +98,7 @@ return root; } +static int insert_page(struct mlx5_core_dev *dev, u64 addr, struct page *page, u16 func_id) -static int insert_page(struct mlx5_core_dev *dev, u64 addr, struct page *page, u32 function) { struct rb_node *parent = NULL; struct rb_root *root; @@ -112,7 +107,7 @@ struct fw_page *tfp; int i; + root = page_root_per_func_id(dev, func_id); - root = page_root_per_function(dev, function); if (IS_ERR(root)) return PTR_ERR(root); @@ -135,7 +130,7 @@ nfp->addr = addr; nfp->page = page; + nfp->func_id = func_id; - nfp->function = function; nfp->free_count = MLX5_NUM_4K_IN_PAGE; for (i = 0; i < MLX5_NUM_4K_IN_PAGE; i++) set_bit(i, &nfp->bitmask); @@ -148,14 +143,14 @@ } static struct fw_page *find_fw_page(struct mlx5_core_dev *dev, u64 addr, + u32 func_id) - u32 function) { struct fw_page *result = NULL; struct rb_root *root; struct rb_node *tmp; struct fw_page *tfp; + root = xa_load(&dev->priv.page_root_xa, func_id); - root = xa_load(&dev->priv.page_root_xa, function); if (WARN_ON_ONCE(!root)) return NULL; @@ -199,14 +194,14 @@ return err; } +static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr, u16 func_id) -static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr, u32 function) { struct fw_page *fp = NULL; struct fw_page *iter; unsigned n; list_for_each_entry(iter, &dev->priv.free_list, list) { + if (iter->func_id != func_id) - if (iter->function != function) continue; fp = iter; } @@ -236,7 +231,7 @@ { struct rb_root *root; + root = xa_load(&dev->priv.page_root_xa, fwp->func_id); - root = xa_load(&dev->priv.page_root_xa, fwp->function); if (WARN_ON_ONCE(!root)) return; @@ -249,12 +244,12 @@ kfree(fwp); } +static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 func_id) -static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 function) { struct fw_page *fwp; int n; + fwp = find_fw_page(dev, addr & MLX5_U64_4K_PAGE_MASK, func_id); - fwp = find_fw_page(dev, addr & MLX5_U64_4K_PAGE_MASK, function); if (!fwp) { mlx5_core_warn_rl(dev, "page not found\n"); return; @@ -268,7 +263,7 @@ list_add(&fwp->list, &dev->priv.free_list); } +static int alloc_system_page(struct mlx5_core_dev *dev, u16 func_id) -static int alloc_system_page(struct mlx5_core_dev *dev, u32 function) { struct device *device = mlx5_core_dma_dev(dev); int nid = dev_to_node(device); @@ -296,7 +291,7 @@ goto map; } + err = insert_page(dev, addr, page, func_id); - err = insert_page(dev, addr, page, function); if (err) { mlx5_core_err(dev, "failed to track allocated page\n"); dma_unmap_page(device, addr, PAGE_SIZE, DMA_BIDIRECTIONAL); @@ -333,7 +328,6 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, int notify_fail, bool ec_function) { - u32 function = get_function(func_id, ec_function); u32 out[MLX5_ST_SZ_DW(manage_pages_out)] = {0}; int inlen = MLX5_ST_SZ_BYTES(manage_pages_in); u64 addr; @@ -351,10 +345,10 @@ for (i = 0; i < npages; i++) { retry: + err = alloc_4k(dev, &addr, func_id); - err = alloc_4k(dev, &addr, function); if (err) { if (err == -ENOMEM) + err = alloc_system_page(dev, func_id); - err = alloc_system_page(dev, function); if (err) goto out_4k; @@ -390,7 +384,7 @@ out_4k: for (i--; i >= 0; i--) + free_4k(dev, MLX5_GET64(manage_pages_in, in, pas[i]), func_id); - free_4k(dev, MLX5_GET64(manage_pages_in, in, pas[i]), function); out_free: kvfree(in); if (notify_fail) @@ -398,15 +392,14 @@ return err; } +static void release_all_pages(struct mlx5_core_dev *dev, u32 func_id, -static void release_all_pages(struct mlx5_core_dev *dev, u16 func_id, bool ec_function) { - u32 function = get_function(func_id, ec_function); struct rb_root *root; struct rb_node *p; int npages = 0; + root = xa_load(&dev->priv.page_root_xa, func_id); - root = xa_load(&dev->priv.page_root_xa, function); if (WARN_ON_ONCE(!root)) return; @@ -453,7 +446,6 @@ struct rb_root *root; struct fw_page *fwp; struct rb_node *p; - bool ec_function; u32 func_id; u32 npages; u32 i = 0; @@ -464,9 +456,8 @@ /* No hard feelings, we want our pages back! */ npages = MLX5_GET(manage_pages_in, in, input_num_entries); func_id = MLX5_GET(manage_pages_in, in, function_id); - ec_function = MLX5_GET(manage_pages_in, in, embedded_cpu_function); + root = xa_load(&dev->priv.page_root_xa, func_id); - root = xa_load(&dev->priv.page_root_xa, get_function(func_id, ec_function)); if (WARN_ON_ONCE(!root)) return -EEXIST; @@ -482,10 +473,9 @@ return 0; } +static int reclaim_pages(struct mlx5_core_dev *dev, u32 func_id, int npages, -static int reclaim_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, int *nclaimed, bool ec_function) { - u32 function = get_function(func_id, ec_function); int outlen = MLX5_ST_SZ_BYTES(manage_pages_out); u32 in[MLX5_ST_SZ_DW(manage_pages_in)] = {}; int num_claimed; @@ -524,7 +514,7 @@ } for (i = 0; i < num_claimed; i++) + free_4k(dev, MLX5_GET64(manage_pages_out, out, pas[i]), func_id); - free_4k(dev, MLX5_GET64(manage_pages_out, out, pas[i]), function); if (nclaimed) *nclaimed = num_claimed; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c @@ -157,7 +157,6 @@ static const struct mlxsw_sp_span_entry_ops mlxsw_sp1_span_entry_ops_cpu = { - .is_static = true, .can_handle = mlxsw_sp1_span_cpu_can_handle, .parms_set = mlxsw_sp1_span_entry_cpu_parms, .configure = mlxsw_sp1_span_entry_cpu_configure, @@ -215,7 +214,6 @@ static const struct mlxsw_sp_span_entry_ops mlxsw_sp_span_entry_ops_phys = { - .is_static = true, .can_handle = mlxsw_sp_port_dev_check, .parms_set = mlxsw_sp_span_entry_phys_parms, .configure = mlxsw_sp_span_entry_phys_configure, @@ -723,7 +721,6 @@ static const struct mlxsw_sp_span_entry_ops mlxsw_sp2_span_entry_ops_cpu = { - .is_static = true, .can_handle = mlxsw_sp2_span_cpu_can_handle, .parms_set = mlxsw_sp2_span_entry_cpu_parms, .configure = mlxsw_sp2_span_entry_cpu_configure, @@ -1039,9 +1036,6 @@ if (!refcount_read(&curr->ref_count)) continue; - if (curr->ops->is_static) - continue; - err = curr->ops->parms_set(mlxsw_sp, curr->to_dev, &sparms); if (err) continue; reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h @@ -60,7 +60,6 @@ }; struct mlxsw_sp_span_entry_ops { - bool is_static; bool (*can_handle)(const struct net_device *to_dev); int (*parms_set)(struct mlxsw_sp *mlxsw_sp, const struct net_device *to_dev, diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/mscc/ocelot.c linux-oem-5.10-5.10.0/drivers/net/ethernet/mscc/ocelot.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mscc/ocelot.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/mscc/ocelot.c @@ -348,60 +348,6 @@ } } -static u32 ocelot_read_eq_avail(struct ocelot *ocelot, int port) -{ - return ocelot_read_rix(ocelot, QSYS_SW_STATUS, port); -} - -int ocelot_port_flush(struct ocelot *ocelot, int port) -{ - int err, val; - - /* Disable dequeuing from the egress queues */ - ocelot_rmw_rix(ocelot, QSYS_PORT_MODE_DEQUEUE_DIS, - QSYS_PORT_MODE_DEQUEUE_DIS, - QSYS_PORT_MODE, port); - - /* Disable flow control */ - ocelot_fields_write(ocelot, port, SYS_PAUSE_CFG_PAUSE_ENA, 0); - - /* Disable priority flow control */ - ocelot_fields_write(ocelot, port, - QSYS_SWITCH_PORT_MODE_TX_PFC_ENA, 0); - - /* Wait at least the time it takes to receive a frame of maximum length - * at the port. - * Worst-case delays for 10 kilobyte jumbo frames are: - * 8 ms on a 10M port - * 800 μs on a 100M port - * 80 μs on a 1G port - * 32 μs on a 2.5G port - */ - usleep_range(8000, 10000); - - /* Disable half duplex backpressure. */ - ocelot_rmw_rix(ocelot, 0, SYS_FRONT_PORT_MODE_HDX_MODE, - SYS_FRONT_PORT_MODE, port); - - /* Flush the queues associated with the port. */ - ocelot_rmw_gix(ocelot, REW_PORT_CFG_FLUSH_ENA, REW_PORT_CFG_FLUSH_ENA, - REW_PORT_CFG, port); - - /* Enable dequeuing from the egress queues. */ - ocelot_rmw_rix(ocelot, 0, QSYS_PORT_MODE_DEQUEUE_DIS, QSYS_PORT_MODE, - port); - - /* Wait until flushing is complete. */ - err = read_poll_timeout(ocelot_read_eq_avail, val, !val, - 100, 2000000, false, ocelot, port); - - /* Clear flushing again. */ - ocelot_rmw_gix(ocelot, 0, REW_PORT_CFG_FLUSH_ENA, REW_PORT_CFG, port); - - return err; -} -EXPORT_SYMBOL(ocelot_port_flush); - void ocelot_adjust_link(struct ocelot *ocelot, int port, struct phy_device *phydev) { reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/mscc/ocelot_io.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/mscc/ocelot_io.c @@ -71,14 +71,6 @@ } EXPORT_SYMBOL(ocelot_port_writel); -void ocelot_port_rmwl(struct ocelot_port *port, u32 val, u32 mask, u32 reg) -{ - u32 cur = ocelot_port_readl(port, reg); - - ocelot_port_writel(port, (cur & (~mask)) | val, reg); -} -EXPORT_SYMBOL(ocelot_port_rmwl); - u32 __ocelot_target_read_ix(struct ocelot *ocelot, enum ocelot_target target, u32 reg, u32 offset) { reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/realtek/r8169.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/realtek/r8169.h @@ -63,7 +63,6 @@ RTL_GIGA_MAC_VER_50, RTL_GIGA_MAC_VER_51, RTL_GIGA_MAC_VER_52, - RTL_GIGA_MAC_VER_53, RTL_GIGA_MAC_VER_60, RTL_GIGA_MAC_VER_61, RTL_GIGA_MAC_VER_63, diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/realtek/r8169_main.c linux-oem-5.10-5.10.0/drivers/net/ethernet/realtek/r8169_main.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/realtek/r8169_main.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/realtek/r8169_main.c @@ -145,7 +145,6 @@ [RTL_GIGA_MAC_VER_50] = {"RTL8168ep/8111ep" }, [RTL_GIGA_MAC_VER_51] = {"RTL8168ep/8111ep" }, [RTL_GIGA_MAC_VER_52] = {"RTL8168fp/RTL8117", FIRMWARE_8168FP_3}, - [RTL_GIGA_MAC_VER_53] = {"RTL8168fp/RTL8117", }, [RTL_GIGA_MAC_VER_60] = {"RTL8125A" }, [RTL_GIGA_MAC_VER_61] = {"RTL8125A", FIRMWARE_8125A_3}, /* reserve 62 for CFG_METHOD_4 in the vendor driver */ @@ -691,7 +690,7 @@ { return tp->mac_version >= RTL_GIGA_MAC_VER_34 && tp->mac_version != RTL_GIGA_MAC_VER_39 && - tp->mac_version <= RTL_GIGA_MAC_VER_53; + tp->mac_version <= RTL_GIGA_MAC_VER_52; } static bool rtl_supports_eee(struct rtl8169_private *tp) @@ -1042,9 +1041,7 @@ static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type) { /* based on RTL8168FP_OOBMAC_BASE in vendor driver */ - if (type == ERIAR_OOB && - (tp->mac_version == RTL_GIGA_MAC_VER_52 || - tp->mac_version == RTL_GIGA_MAC_VER_53)) + if (tp->mac_version == RTL_GIGA_MAC_VER_52 && type == ERIAR_OOB) *cmd |= 0x7f0 << 18; } @@ -1196,7 +1193,7 @@ case RTL_GIGA_MAC_VER_31: rtl8168dp_driver_start(tp); break; - case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_53: + case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_52: rtl8168ep_driver_start(tp); break; default: @@ -1227,7 +1224,7 @@ case RTL_GIGA_MAC_VER_31: rtl8168dp_driver_stop(tp); break; - case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_53: + case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_52: rtl8168ep_driver_stop(tp); break; default: @@ -1255,7 +1252,7 @@ case RTL_GIGA_MAC_VER_28: case RTL_GIGA_MAC_VER_31: return r8168dp_check_dash(tp); - case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_53: + case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_52: return r8168ep_check_dash(tp); default: return false; @@ -1969,7 +1966,6 @@ { 0x7c8, 0x608, RTL_GIGA_MAC_VER_61 }, /* RTL8117 */ - { 0x7cf, 0x54b, RTL_GIGA_MAC_VER_53 }, { 0x7cf, 0x54a, RTL_GIGA_MAC_VER_52 }, /* 8168EP family. */ @@ -2314,7 +2310,7 @@ case RTL_GIGA_MAC_VER_38: RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); break; - case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_53: + case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_52: RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF); break; case RTL_GIGA_MAC_VER_60 ... RTL_GIGA_MAC_VER_63: @@ -2489,7 +2485,7 @@ static void rtl_wait_txrx_fifo_empty(struct rtl8169_private *tp) { switch (tp->mac_version) { - case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_53: + case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_52: rtl_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 42); rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42); break; @@ -3748,7 +3744,6 @@ [RTL_GIGA_MAC_VER_50] = rtl_hw_start_8168ep_2, [RTL_GIGA_MAC_VER_51] = rtl_hw_start_8168ep_3, [RTL_GIGA_MAC_VER_52] = rtl_hw_start_8117, - [RTL_GIGA_MAC_VER_53] = rtl_hw_start_8117, [RTL_GIGA_MAC_VER_60] = rtl_hw_start_8125a_1, [RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2, [RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b, @@ -4087,72 +4082,17 @@ return -EIO; } -static bool rtl_skb_is_udp(struct sk_buff *skb) +static bool rtl_test_hw_pad_bug(struct rtl8169_private *tp) { - int no = skb_network_offset(skb); - struct ipv6hdr *i6h, _i6h; - struct iphdr *ih, _ih; - - switch (vlan_get_protocol(skb)) { - case htons(ETH_P_IP): - ih = skb_header_pointer(skb, no, sizeof(_ih), &_ih); - return ih && ih->protocol == IPPROTO_UDP; - case htons(ETH_P_IPV6): - i6h = skb_header_pointer(skb, no, sizeof(_i6h), &_i6h); - return i6h && i6h->nexthdr == IPPROTO_UDP; - default: - return false; - } -} - -#define RTL_MIN_PATCH_LEN 47 - -/* see rtl8125_get_patch_pad_len() in r8125 vendor driver */ -static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp, - struct sk_buff *skb) -{ - unsigned int padto = 0, len = skb->len; - - if (rtl_is_8125(tp) && len < 128 + RTL_MIN_PATCH_LEN && - rtl_skb_is_udp(skb) && skb_transport_header_was_set(skb)) { - unsigned int trans_data_len = skb_tail_pointer(skb) - - skb_transport_header(skb); - - if (trans_data_len >= offsetof(struct udphdr, len) && - trans_data_len < RTL_MIN_PATCH_LEN) { - u16 dest = ntohs(udp_hdr(skb)->dest); - - /* dest is a standard PTP port */ - if (dest == 319 || dest == 320) - padto = len + RTL_MIN_PATCH_LEN - trans_data_len; - } - - if (trans_data_len < sizeof(struct udphdr)) - padto = max_t(unsigned int, padto, - len + sizeof(struct udphdr) - trans_data_len); - } - - return padto; -} - -static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp, - struct sk_buff *skb) -{ - unsigned int padto; - - padto = rtl8125_quirk_udp_padto(tp, skb); - switch (tp->mac_version) { case RTL_GIGA_MAC_VER_34: case RTL_GIGA_MAC_VER_60: case RTL_GIGA_MAC_VER_61: case RTL_GIGA_MAC_VER_63: - padto = max_t(unsigned int, padto, ETH_ZLEN); + return true; default: - break; + return false; } - - return padto; } static void rtl8169_tso_csum_v1(struct sk_buff *skb, u32 *opts) @@ -4224,10 +4164,9 @@ opts[1] |= transport_offset << TCPHO_SHIFT; } else { - unsigned int padto = rtl_quirk_packet_padto(tp, skb); - - /* skb_padto would free the skb on error */ - return !__skb_put_padto(skb, padto, false); + if (unlikely(skb->len < ETH_ZLEN && rtl_test_hw_pad_bug(tp))) + /* eth_skb_pad would free the skb on error */ + return !__skb_put_padto(skb, ETH_ZLEN, false); } return true; @@ -4410,9 +4349,6 @@ if (skb->len < ETH_ZLEN) features &= ~NETIF_F_CSUM_MASK; - if (rtl_quirk_packet_padto(tp, skb)) - features &= ~NETIF_F_CSUM_MASK; - if (transport_offset > TCPHO_MAX && rtl_chip_supports_csum_v2(tp)) features &= ~NETIF_F_CSUM_MASK; @@ -4758,10 +4694,10 @@ cancel_work_sync(&tp->wk.work); - free_irq(pci_irq_vector(pdev, 0), tp); - phy_disconnect(tp->phydev); + free_irq(pci_irq_vector(pdev, 0), tp); + dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, tp->RxPhyAddr); dma_free_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp->TxDescArray, @@ -5216,7 +5152,7 @@ static void rtl_hw_initialize(struct rtl8169_private *tp) { switch (tp->mac_version) { - case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_53: + case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_52: rtl8168ep_stop_cmac(tp); fallthrough; case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48: reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/realtek/r8169_phy_config.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/realtek/r8169_phy_config.c @@ -1358,7 +1358,6 @@ [RTL_GIGA_MAC_VER_50] = rtl8168ep_2_hw_phy_config, [RTL_GIGA_MAC_VER_51] = rtl8168ep_2_hw_phy_config, [RTL_GIGA_MAC_VER_52] = rtl8117_hw_phy_config, - [RTL_GIGA_MAC_VER_53] = rtl8117_hw_phy_config, [RTL_GIGA_MAC_VER_60] = rtl8125a_1_hw_phy_config, [RTL_GIGA_MAC_VER_61] = rtl8125a_2_hw_phy_config, [RTL_GIGA_MAC_VER_63] = rtl8125b_hw_phy_config, reverted: --- linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c @@ -129,7 +129,7 @@ if (ret) { dev_err(&pdev->dev, "Failed to set tx_clk\n"); + return ret; - goto err_remove_config_dt; } } } @@ -143,7 +143,7 @@ if (ret) { dev_err(&pdev->dev, "Failed to set clk_ptp_ref\n"); + return ret; - goto err_remove_config_dt; } } } diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -375,7 +375,6 @@ struct plat_stmmacenet_data *plat) { plat->bus_id = 2; - plat->addr64 = 32; return ehl_common_data(pdev, plat); } @@ -407,7 +406,6 @@ struct plat_stmmacenet_data *plat) { plat->bus_id = 3; - plat->addr64 = 32; return ehl_common_data(pdev, plat); } diff -u linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c --- linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ linux-oem-5.10-5.10.0/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -330,12 +330,7 @@ priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB; } else if (!qopt->enable) { - ret = stmmac_dma_qmode(priv, priv->ioaddr, queue, - MTL_QUEUE_DCB); - if (ret) - return ret; - - priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; + return stmmac_dma_qmode(priv, priv->ioaddr, queue, MTL_QUEUE_DCB); } /* Port Transmit Rate and Speed Divider */ reverted: --- linux-oem-5.10-5.10.0/drivers/net/hyperv/netvsc.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/hyperv/netvsc.c @@ -1253,11 +1253,8 @@ ret = rndis_filter_receive(ndev, net_device, nvchan, data, buflen); + if (unlikely(ret != NVSP_STAT_SUCCESS)) - if (unlikely(ret != NVSP_STAT_SUCCESS)) { - /* Drop incomplete packet */ - nvchan->rsc.cnt = 0; status = NVSP_STAT_FAIL; - } } enq_receive_complete(ndev, net_device, q_idx, reverted: --- linux-oem-5.10-5.10.0/drivers/net/hyperv/rndis_filter.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/hyperv/rndis_filter.c @@ -508,6 +508,8 @@ return ret; drop: + /* Drop incomplete packet */ + nvchan->rsc.cnt = 0; return NVSP_STAT_FAIL; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/ipa/gsi.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/ipa/gsi.c @@ -1256,7 +1256,7 @@ /* Hardware requires a 2^n ring size, with alignment equal to size */ ring->virt = dma_alloc_coherent(dev, size, &addr, GFP_KERNEL); if (ring->virt && addr % size) { + dma_free_coherent(dev, size, ring->virt, ring->addr); - dma_free_coherent(dev, size, ring->virt, addr); dev_err(dev, "unable to alloc 0x%zx-aligned ring buffer\n", size); return -EINVAL; /* Not a good error value, but distinct */ @@ -1573,7 +1573,6 @@ if (!channel->gsi) continue; /* Ignore uninitialized channels */ - ret = -EINVAL; dev_err(gsi->dev, "channel %u not supported by hardware\n", channel_id - 1); channel_id = gsi->channel_count; reverted: --- linux-oem-5.10-5.10.0/drivers/net/team/team.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/team/team.c @@ -991,8 +991,7 @@ unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM; + list_for_each_entry(port, &team->port_list, list) { - rcu_read_lock(); - list_for_each_entry_rcu(port, &team->port_list, list) { vlan_features = netdev_increment_features(vlan_features, port->dev->vlan_features, TEAM_VLAN_FEATURES); @@ -1006,7 +1005,6 @@ if (port->dev->hard_header_len > max_hard_header_len) max_hard_header_len = port->dev->hard_header_len; } - rcu_read_unlock(); team->dev->vlan_features = vlan_features; team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL | @@ -1022,7 +1020,9 @@ static void team_compute_features(struct team *team) { + mutex_lock(&team->lock); __team_compute_features(team); + mutex_unlock(&team->lock); netdev_change_features(team->dev); } diff -u linux-oem-5.10-5.10.0/drivers/net/usb/qmi_wwan.c linux-oem-5.10-5.10.0/drivers/net/usb/qmi_wwan.c --- linux-oem-5.10-5.10.0/drivers/net/usb/qmi_wwan.c +++ linux-oem-5.10-5.10.0/drivers/net/usb/qmi_wwan.c @@ -1325,7 +1325,6 @@ {QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */ {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */ {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */ - {QMI_QUIRK_SET_DTR(0x1e2d, 0x006f, 8)}, /* Cinterion PLS83/PLS63 */ {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */ {QMI_FIXED_INTF(0x1e2d, 0x0063, 10)}, /* Cinterion ALASxx (1 RmNet) */ {QMI_FIXED_INTF(0x1e2d, 0x0082, 4)}, /* Cinterion PHxx,PXxx (2 RmNet) */ reverted: --- linux-oem-5.10-5.10.0/drivers/net/wan/hdlc_x25.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wan/hdlc_x25.c @@ -171,11 +171,11 @@ result = lapb_register(dev, &cb); if (result != LAPB_OK) + return result; - return -ENOMEM; result = lapb_getparms(dev, ¶ms); if (result != LAPB_OK) + return result; - return -EINVAL; if (state(hdlc)->settings.dce) params.mode = params.mode | LAPB_DCE; @@ -190,7 +190,7 @@ result = lapb_setparms(dev, ¶ms); if (result != LAPB_OK) + return result; - return -EINVAL; return 0; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/ath/ath9k/Kconfig +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/ath/ath9k/Kconfig @@ -21,9 +21,11 @@ config ATH9K tristate "Atheros 802.11n wireless cards support" depends on MAC80211 && HAS_DMA - select MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211 select ATH9K_HW select ATH9K_COMMON + imply NEW_LEDS + imply LEDS_CLASS + imply MAC80211_LEDS help This module adds support for wireless adapters based on Atheros IEEE 802.11n AR5008, AR9001 and AR9002 family @@ -174,9 +176,11 @@ config ATH9K_HTC tristate "Atheros HTC based wireless cards support" depends on USB && MAC80211 - select MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211 select ATH9K_HW select ATH9K_COMMON + imply NEW_LEDS + imply LEDS_CLASS + imply MAC80211_LEDS help Support for Atheros HTC based cards. Chipsets supported: AR9271 reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/cfg/22000.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/cfg/22000.c @@ -358,7 +358,6 @@ const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101"; const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz"; const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz"; -const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203"; const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6 AX211 160MHz"; const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6 AX411 160MHz"; const char iwl_ma_name[] = "Intel(R) Wi-Fi 6"; @@ -385,18 +384,6 @@ .num_rbds = IWL_NUM_RBDS_22000_HE, }; -const struct iwl_cfg iwl_qu_b0_hr_b0 = { - .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, - IWL_DEVICE_22500, - /* - * This device doesn't support receiving BlockAck with a large bitmap - * so we need to restrict the size of transmitted aggregation to the - * HT size; mac80211 would otherwise pick the HE max (256) by default. - */ - .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, - .num_rbds = IWL_NUM_RBDS_22000_HE, -}; - const struct iwl_cfg iwl_ax201_cfg_qu_hr = { .name = "Intel(R) Wi-Fi 6 AX201 160MHz", .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, @@ -423,18 +410,6 @@ .num_rbds = IWL_NUM_RBDS_22000_HE, }; -const struct iwl_cfg iwl_qu_c0_hr_b0 = { - .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, - IWL_DEVICE_22500, - /* - * This device doesn't support receiving BlockAck with a large bitmap - * so we need to restrict the size of transmitted aggregation to the - * HT size; mac80211 would otherwise pick the HE max (256) by default. - */ - .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, - .num_rbds = IWL_NUM_RBDS_22000_HE, -}; - const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = { .name = "Intel(R) Wi-Fi 6 AX201 160MHz", .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c @@ -224,46 +224,40 @@ int iwl_pnvm_load(struct iwl_trans *trans, struct iwl_notif_wait_data *notif_wait) { + const struct firmware *pnvm; struct iwl_notification_wait pnvm_wait; static const u16 ntf_cmds[] = { WIDE_ID(REGULATORY_AND_NVM_GROUP, PNVM_INIT_COMPLETE_NTFY) }; + char pnvm_name[64]; + int ret; /* if the SKU_ID is empty, there's nothing to do */ if (!trans->sku_id[0] && !trans->sku_id[1] && !trans->sku_id[2]) return 0; + /* if we already have it, nothing to do either */ + if (trans->pnvm_loaded) + return 0; + + /* + * The prefix unfortunately includes a hyphen at the end, so + * don't add the dot here... + */ + snprintf(pnvm_name, sizeof(pnvm_name), "%spnvm", + trans->cfg->fw_name_pre); + + /* ...but replace the hyphen with the dot here. */ + if (strlen(trans->cfg->fw_name_pre) < sizeof(pnvm_name)) + pnvm_name[strlen(trans->cfg->fw_name_pre) - 1] = '.'; + + ret = firmware_request_nowarn(&pnvm, pnvm_name, trans->dev); + if (ret) { + IWL_DEBUG_FW(trans, "PNVM file %s not found %d\n", + pnvm_name, ret); + } else { + iwl_pnvm_parse(trans, pnvm->data, pnvm->size); - /* load from disk only if we haven't done it (or tried) before */ - if (!trans->pnvm_loaded) { - const struct firmware *pnvm; - char pnvm_name[64]; - int ret; - - /* - * The prefix unfortunately includes a hyphen at the end, so - * don't add the dot here... - */ - snprintf(pnvm_name, sizeof(pnvm_name), "%spnvm", - trans->cfg->fw_name_pre); - - /* ...but replace the hyphen with the dot here. */ - if (strlen(trans->cfg->fw_name_pre) < sizeof(pnvm_name)) - pnvm_name[strlen(trans->cfg->fw_name_pre) - 1] = '.'; - - ret = firmware_request_nowarn(&pnvm, pnvm_name, trans->dev); - if (ret) { - IWL_DEBUG_FW(trans, "PNVM file %s not found %d\n", - pnvm_name, ret); - /* - * Pretend we've loaded it - at least we've tried and - * couldn't load it at all, so there's no point in - * trying again over and over. - */ - trans->pnvm_loaded = true; - } else { - iwl_pnvm_parse(trans, pnvm->data, pnvm->size); + release_firmware(pnvm); - release_firmware(pnvm); - } } iwl_init_notification_wait(notif_wait, &pnvm_wait, reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -498,7 +498,7 @@ #define IWL_CFG_CORES_BT_GNSS 0x5 #define IWL_SUBDEVICE_RF_ID(subdevice) ((u16)((subdevice) & 0x00F0) >> 4) +#define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0100) >> 9) -#define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0200) >> 9) #define IWL_SUBDEVICE_CORES(subdevice) ((u16)((subdevice) & 0x1C00) >> 10) struct iwl_dev_info { @@ -544,7 +544,6 @@ extern const char iwl9560_killer_1550i_name[]; extern const char iwl9560_killer_1550s_name[]; extern const char iwl_ax200_name[]; -extern const char iwl_ax203_name[]; extern const char iwl_ax201_name[]; extern const char iwl_ax101_name[]; extern const char iwl_ax200_killer_1650w_name[]; @@ -628,8 +627,6 @@ extern const struct iwl_cfg iwl_qu_b0_hr1_b0; extern const struct iwl_cfg iwl_qu_c0_hr1_b0; extern const struct iwl_cfg iwl_quz_a0_hr1_b0; -extern const struct iwl_cfg iwl_qu_b0_hr_b0; -extern const struct iwl_cfg iwl_qu_c0_hr_b0; extern const struct iwl_cfg iwl_ax200_cfg_cc; extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; diff -u linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +++ linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c @@ -237,6 +237,13 @@ if (le32_to_cpu(tlv->length) < sizeof(*reg)) return -EINVAL; + /* For safe using a string from FW make sure we have a + * null terminator + */ + reg->name[IWL_FW_INI_MAX_NAME - 1] = 0; + + IWL_DEBUG_FW(trans, "WRT: parsing region: %s\n", reg->name); + if (id >= IWL_FW_INI_MAX_REGION_ID) { IWL_ERR(trans, "WRT: Invalid region id %u\n", id); return -EINVAL; reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -355,12 +355,6 @@ #define RADIO_RSP_ADDR_POS (6) #define RADIO_RSP_RD_CMD (3) -/* LTR control (Qu only) */ -#define HPM_MAC_LTR_CSR 0xa0348c -#define HPM_MAC_LRT_ENABLE_ALL 0xf -/* also uses CSR_LTR_* for values */ -#define HPM_UMAC_LTR 0xa03480 - /* FW monitor */ #define MON_BUFF_SAMPLE_CTL (0xa03c00) #define MON_BUFF_BASE_ADDR (0xa03c1c) reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c @@ -514,10 +514,7 @@ const size_t bufsz = sizeof(buf); int pos = 0; - mutex_lock(&mvm->mutex); iwl_mvm_get_sync_time(mvm, &curr_gp2, &curr_os); - mutex_unlock(&mvm->mutex); - do_div(curr_os, NSEC_PER_USEC); diff = curr_os - curr_gp2; pos += scnprintf(buf + pos, bufsz - pos, "diff=%lld\n", diff); reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -4249,9 +4249,6 @@ iwl_mvm_binding_remove_vif(mvm, vif); out: - if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD) && - switching_chanctx) - return; mvmvif->phy_ctxt = NULL; iwl_mvm_power_update_mac(mvm); } diff -u linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/ops.c linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/ops.c --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -845,10 +845,6 @@ if (!mvm->scan_cmd) goto out_free; - /* invalidate ids to prevent accidental removal of sta_id 0 */ - mvm->aux_sta.sta_id = IWL_MVM_INVALID_STA; - mvm->snif_sta.sta_id = IWL_MVM_INVALID_STA; - /* Set EBS as successful as long as not stated otherwise by the FW. */ mvm->last_ebs_successful = true; @@ -1249,7 +1245,6 @@ reprobe = container_of(wk, struct iwl_mvm_reprobe, work); if (device_reprobe(reprobe->dev)) dev_err(reprobe->dev, "reprobe failed!\n"); - put_device(reprobe->dev); kfree(reprobe); module_put(THIS_MODULE); } @@ -1300,7 +1295,7 @@ module_put(THIS_MODULE); return; } - reprobe->dev = get_device(mvm->trans->dev); + reprobe->dev = mvm->trans->dev; INIT_WORK(&reprobe->work, iwl_mvm_reprobe_wk); schedule_work(&reprobe->work); } else if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -2103,9 +2103,6 @@ lockdep_assert_held(&mvm->mutex); - if (WARN_ON_ONCE(mvm->snif_sta.sta_id == IWL_MVM_INVALID_STA)) - return -EINVAL; - iwl_mvm_disable_txq(mvm, NULL, mvm->snif_queue, IWL_MAX_TID_COUNT, 0); ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); if (ret) @@ -2120,9 +2117,6 @@ lockdep_assert_held(&mvm->mutex); - if (WARN_ON_ONCE(mvm->aux_sta.sta_id == IWL_MVM_INVALID_STA)) - return -EINVAL; - iwl_mvm_disable_txq(mvm, NULL, mvm->aux_queue, IWL_MAX_TID_COUNT, 0); ret = iwl_mvm_rm_sta_common(mvm, mvm->aux_sta.sta_id); if (ret) reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -833,7 +833,6 @@ next = skb_gso_segment(skb, netdev_flags); skb_shinfo(skb)->gso_size = mss; - skb_shinfo(skb)->gso_type = ipv4 ? SKB_GSO_TCPV4 : SKB_GSO_TCPV6; if (WARN_ON_ONCE(IS_ERR(next))) return -EINVAL; else if (next) @@ -856,8 +855,6 @@ if (tcp_payload_len > mss) { skb_shinfo(tmp)->gso_size = mss; - skb_shinfo(tmp)->gso_type = ipv4 ? SKB_GSO_TCPV4 : - SKB_GSO_TCPV6; } else { if (qos) { u8 *qc; reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c @@ -122,15 +122,6 @@ const struct fw_img *fw) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); - u32 ltr_val = CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ | - u32_encode_bits(CSR_LTR_LONG_VAL_AD_SCALE_USEC, - CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE) | - u32_encode_bits(250, - CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL) | - CSR_LTR_LONG_VAL_AD_SNOOP_REQ | - u32_encode_bits(CSR_LTR_LONG_VAL_AD_SCALE_USEC, - CSR_LTR_LONG_VAL_AD_SNOOP_SCALE) | - u32_encode_bits(250, CSR_LTR_LONG_VAL_AD_SNOOP_VAL); struct iwl_context_info_gen3 *ctxt_info_gen3; struct iwl_prph_scratch *prph_scratch; struct iwl_prph_scratch_ctrl_cfg *prph_sc_ctrl; @@ -245,10 +236,8 @@ /* Allocate IML */ iml_img = dma_alloc_coherent(trans->dev, trans->iml_len, &trans_pcie->iml_dma_addr, GFP_KERNEL); + if (!iml_img) + return -ENOMEM; - if (!iml_img) { - ret = -ENOMEM; - goto err_free_ctxt_info; - } memcpy(iml_img, trans->iml, trans->iml_len); @@ -264,19 +253,23 @@ iwl_set_bit(trans, CSR_CTXT_INFO_BOOT_CTRL, CSR_AUTO_FUNC_BOOT_ENA); + if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) { + /* + * The firmware initializes this again later (to a smaller + * value), but for the boot process initialize the LTR to + * ~250 usec. + */ + u32 val = CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ | + u32_encode_bits(CSR_LTR_LONG_VAL_AD_SCALE_USEC, + CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE) | + u32_encode_bits(250, + CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL) | + CSR_LTR_LONG_VAL_AD_SNOOP_REQ | + u32_encode_bits(CSR_LTR_LONG_VAL_AD_SCALE_USEC, + CSR_LTR_LONG_VAL_AD_SNOOP_SCALE) | + u32_encode_bits(250, CSR_LTR_LONG_VAL_AD_SNOOP_VAL); + + iwl_write32(trans, CSR_LTR_LONG_VAL_AD, val); - /* - * To workaround hardware latency issues during the boot process, - * initialize the LTR to ~250 usec (see ltr_val above). - * The firmware initializes this again later (to a smaller value). - */ - if ((trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210 || - trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_22000) && - !trans->trans_cfg->integrated) { - iwl_write32(trans, CSR_LTR_LONG_VAL_AD, ltr_val); - } else if (trans->trans_cfg->integrated && - trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_22000) { - iwl_write_prph(trans, HPM_MAC_LTR_CSR, HPM_MAC_LRT_ENABLE_ALL); - iwl_write_prph(trans, HPM_UMAC_LTR, ltr_val); } if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) @@ -286,11 +279,6 @@ return 0; -err_free_ctxt_info: - dma_free_coherent(trans->dev, sizeof(*trans_pcie->ctxt_info_gen3), - trans_pcie->ctxt_info_gen3, - trans_pcie->ctxt_info_dma_addr); - trans_pcie->ctxt_info_gen3 = NULL; err_free_prph_info: dma_free_coherent(trans->dev, sizeof(*prph_info), @@ -353,9 +341,6 @@ return ret; } - if (WARN_ON(prph_sc_ctrl->pnvm_cfg.pnvm_size)) - return -EBUSY; - prph_sc_ctrl->pnvm_cfg.pnvm_base_addr = cpu_to_le64(trans_pcie->pnvm_dram.physical); prph_sc_ctrl->pnvm_cfg.pnvm_size = reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -966,11 +966,6 @@ IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, iwl_qu_b0_hr1_b0, iwl_ax101_name), - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, - IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, - IWL_CFG_ANY, IWL_CFG_ANY, - iwl_qu_b0_hr_b0, iwl_ax203_name), /* Qu C step */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, @@ -978,11 +973,6 @@ IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, iwl_qu_c0_hr1_b0, iwl_ax101_name), - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, - IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, - IWL_CFG_ANY, IWL_CFG_ANY, - iwl_qu_c0_hr_b0, iwl_ax203_name), /* QuZ */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -2161,8 +2161,7 @@ while (offs < dwords) { /* limit the time we spin here under lock to 1/2s */ + ktime_t timeout = ktime_add_us(ktime_get(), 500 * USEC_PER_MSEC); - unsigned long end = jiffies + HZ / 2; - bool resched = false; if (iwl_trans_grab_nic_access(trans, &flags)) { iwl_write32(trans, HBUS_TARG_MEM_RADDR, @@ -2173,15 +2172,14 @@ HBUS_TARG_MEM_RDAT); offs++; + /* calling ktime_get is expensive so + * do it once in 128 reads + */ + if (offs % 128 == 0 && ktime_after(ktime_get(), + timeout)) - if (time_after(jiffies, end)) { - resched = true; break; - } } iwl_trans_release_nic_access(trans, &flags); - - if (resched) - cond_resched(); } else { return -EBUSY; } reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/pcie/tx.c @@ -299,11 +299,6 @@ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); struct iwl_txq *txq = trans->txqs.txq[txq_id]; - if (!txq) { - IWL_ERR(trans, "Trying to free a queue that wasn't allocated?\n"); - return; - } - spin_lock_bh(&txq->lock); while (txq->write_ptr != txq->read_ptr) { IWL_DEBUG_TX_REPLY(trans, "Q %d Free %d\n", reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/intel/iwlwifi/queue/tx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/intel/iwlwifi/queue/tx.c @@ -887,8 +887,10 @@ int idx = iwl_txq_get_cmd_index(txq, txq->read_ptr); struct sk_buff *skb = txq->entries[idx].skb; + if (WARN_ON_ONCE(!skb)) + continue; + + iwl_txq_free_tso_page(trans, skb); - if (!WARN_ON_ONCE(!skb)) - iwl_txq_free_tso_page(trans, skb); } iwl_txq_gen2_free_tfd(trans, txq); txq->read_ptr = iwl_txq_inc_wrap(trans, txq->read_ptr); diff -u linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/dma.c linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/dma.c --- linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/dma.c +++ linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/dma.c @@ -519,17 +519,15 @@ mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) { + struct page *page = virt_to_head_page(data); + int offset = data - page_address(page); struct sk_buff *skb = q->rx_head; struct skb_shared_info *shinfo = skb_shinfo(skb); if (shinfo->nr_frags < ARRAY_SIZE(shinfo->frags)) { - struct page *page = virt_to_head_page(data); - int offset = data - page_address(page) + q->buf_offset; - + offset += q->buf_offset; skb_add_rx_frag(skb, shinfo->nr_frags, page, offset, len, q->buf_size); - } else { - skb_free_frag(data); } if (more) reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -2718,11 +2718,11 @@ int mt7615_mcu_set_fcc5_lpn(struct mt7615_dev *dev, int val) { struct { + u16 tag; + u16 min_lpn; - __le16 tag; - __le16 min_lpn; } req = { + .tag = 0x1, + .min_lpn = val, - .tag = cpu_to_le16(0x1), - .min_lpn = cpu_to_le16(val), }; return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, @@ -2733,27 +2733,14 @@ const struct mt7615_dfs_pulse *pulse) { struct { + u16 tag; + struct mt7615_dfs_pulse pulse; - __le16 tag; - __le32 max_width; /* us */ - __le32 max_pwr; /* dbm */ - __le32 min_pwr; /* dbm */ - __le32 min_stgr_pri; /* us */ - __le32 max_stgr_pri; /* us */ - __le32 min_cr_pri; /* us */ - __le32 max_cr_pri; /* us */ } req = { + .tag = 0x3, - .tag = cpu_to_le16(0x3), -#define __req_field(field) .field = cpu_to_le32(pulse->field) - __req_field(max_width), - __req_field(max_pwr), - __req_field(min_pwr), - __req_field(min_stgr_pri), - __req_field(max_stgr_pri), - __req_field(min_cr_pri), - __req_field(max_cr_pri), -#undef __req_field }; + memcpy(&req.pulse, pulse, sizeof(*pulse)); + return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req, sizeof(req), true); } @@ -2762,45 +2749,16 @@ const struct mt7615_dfs_pattern *pattern) { struct { + u16 tag; + u16 radar_type; + struct mt7615_dfs_pattern pattern; - __le16 tag; - __le16 radar_type; - u8 enb; - u8 stgr; - u8 min_crpn; - u8 max_crpn; - u8 min_crpr; - u8 min_pw; - u8 max_pw; - __le32 min_pri; - __le32 max_pri; - u8 min_crbn; - u8 max_crbn; - u8 min_stgpn; - u8 max_stgpn; - u8 min_stgpr; } req = { + .tag = 0x2, + .radar_type = index, - .tag = cpu_to_le16(0x2), - .radar_type = cpu_to_le16(index), -#define __req_field_u8(field) .field = pattern->field -#define __req_field_u32(field) .field = cpu_to_le32(pattern->field) - __req_field_u8(enb), - __req_field_u8(stgr), - __req_field_u8(min_crpn), - __req_field_u8(max_crpn), - __req_field_u8(min_crpr), - __req_field_u8(min_pw), - __req_field_u8(max_pw), - __req_field_u32(min_pri), - __req_field_u32(max_pri), - __req_field_u8(min_crbn), - __req_field_u8(max_crbn), - __req_field_u8(min_stgpn), - __req_field_u8(max_stgpn), - __req_field_u8(min_stgpr), -#undef __req_field_u8 -#undef __req_field_u32 }; + memcpy(&req.pattern, pattern, sizeof(*pattern)); + return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req, sizeof(req), true); } @@ -2811,9 +2769,9 @@ u8 pulse_num; u8 rsv[3]; struct { + u32 start_time; + u16 width; + s16 power; - __le32 start_time; - __le16 width; - __le16 power; } pattern[32]; } req = { .pulse_num = dev->radar_pattern.n_pulses, @@ -2826,11 +2784,10 @@ /* TODO: add some noise here */ for (i = 0; i < dev->radar_pattern.n_pulses; i++) { + req.pattern[i].width = dev->radar_pattern.width; + req.pattern[i].power = dev->radar_pattern.power; + req.pattern[i].start_time = start_time + + i * dev->radar_pattern.period; - u32 ts = start_time + i * dev->radar_pattern.period; - - req.pattern[i].width = cpu_to_le16(dev->radar_pattern.width); - req.pattern[i].power = cpu_to_le16(dev->radar_pattern.power); - req.pattern[i].start_time = cpu_to_le32(ts); } return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_PATTERN, diff -u linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c --- linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c +++ linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c @@ -85,7 +85,7 @@ { struct mt76_queue *q = &dev->q_rx[qid]; struct mt76_sdio *sdio = &dev->sdio; - int len = 0, err, i; + int len = 0, err, i, order; struct page *page; u8 *buf; @@ -98,7 +98,8 @@ if (len > sdio->func->cur_blksize) len = roundup(len, sdio->func->cur_blksize); - page = __dev_alloc_pages(GFP_KERNEL, get_order(len)); + order = get_order(len); + page = __dev_alloc_pages(GFP_KERNEL, order); if (!page) return -ENOMEM; @@ -110,7 +111,7 @@ if (err < 0) { dev_err(dev->dev, "sdio read data failed:%d\n", err); - put_page(page); + __free_pages(page, order); return err; } @@ -127,7 +128,7 @@ if (q->queued + i + 1 == q->ndesc) break; } - put_page(page); + __free_pages(page, order); spin_lock_bh(&q->lock); q->head = (q->head + i) % q->ndesc; reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -2835,7 +2835,7 @@ struct { u8 ver; u8 pad; + u16 len; - __le16 len; u8 level; u8 rsv[3]; __le32 module_idx; @@ -3070,12 +3070,12 @@ int mt7915_mcu_set_fcc5_lpn(struct mt7915_dev *dev, int val) { struct { + u32 tag; + u16 min_lpn; - __le32 tag; - __le16 min_lpn; u8 rsv[2]; } __packed req = { + .tag = 0x1, + .min_lpn = val, - .tag = cpu_to_le32(0x1), - .min_lpn = cpu_to_le16(val), }; return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, @@ -3086,28 +3086,13 @@ const struct mt7915_dfs_pulse *pulse) { struct { + u32 tag; + struct mt7915_dfs_pulse pulse; + } __packed req = { + .tag = 0x3, + }; - __le32 tag; + memcpy(&req.pulse, pulse, sizeof(*pulse)); - __le32 max_width; /* us */ - __le32 max_pwr; /* dbm */ - __le32 min_pwr; /* dbm */ - __le32 min_stgr_pri; /* us */ - __le32 max_stgr_pri; /* us */ - __le32 min_cr_pri; /* us */ - __le32 max_cr_pri; /* us */ - } __packed req = { - .tag = cpu_to_le32(0x3), - -#define __req_field(field) .field = cpu_to_le32(pulse->field) - __req_field(max_width), - __req_field(max_pwr), - __req_field(min_pwr), - __req_field(min_stgr_pri), - __req_field(max_stgr_pri), - __req_field(min_cr_pri), - __req_field(max_cr_pri), -#undef __req_field - }; return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req, sizeof(req), true); @@ -3117,49 +3102,15 @@ const struct mt7915_dfs_pattern *pattern) { struct { + u32 tag; + u16 radar_type; + struct mt7915_dfs_pattern pattern; - __le32 tag; - __le16 radar_type; - - u8 enb; - u8 stgr; - u8 min_crpn; - u8 max_crpn; - u8 min_crpr; - u8 min_pw; - u32 min_pri; - u32 max_pri; - u8 max_pw; - u8 min_crbn; - u8 max_crbn; - u8 min_stgpn; - u8 max_stgpn; - u8 min_stgpr; - u8 rsv[2]; - u32 min_stgpr_diff; } __packed req = { + .tag = 0x2, + .radar_type = index, + }; - .tag = cpu_to_le32(0x2), - .radar_type = cpu_to_le16(index), + memcpy(&req.pattern, pattern, sizeof(*pattern)); -#define __req_field_u8(field) .field = pattern->field -#define __req_field_u32(field) .field = cpu_to_le32(pattern->field) - __req_field_u8(enb), - __req_field_u8(stgr), - __req_field_u8(min_crpn), - __req_field_u8(max_crpn), - __req_field_u8(min_crpr), - __req_field_u8(min_pw), - __req_field_u32(min_pri), - __req_field_u32(max_pri), - __req_field_u8(max_pw), - __req_field_u8(min_crbn), - __req_field_u8(max_crbn), - __req_field_u8(min_stgpn), - __req_field_u8(max_stgpn), - __req_field_u8(min_stgpr), - __req_field_u32(min_stgpr_diff), -#undef __req_field_u8 -#undef __req_field_u32 - }; return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req, sizeof(req), true); @@ -3391,12 +3342,12 @@ u8 drop_tx_idx; u8 sta_idx; /* 256 sta */ u8 rsv[2]; + u32 val; - __le32 val; } __packed req = { .action = MT_SPR_ENABLE, .arg_num = 1, .band_idx = mvif->band_idx, + .val = enable, - .val = cpu_to_le32(enable), }; return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_SPR, reverted: --- linux-oem-5.10-5.10.0/drivers/net/wireless/mediatek/mt7601u/dma.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/wireless/mediatek/mt7601u/dma.c @@ -152,7 +152,8 @@ if (new_p) { /* we have one extra ref from the allocator */ + __free_pages(e->p, MT_RX_ORDER); + - put_page(e->p); e->p = new_p; } } @@ -309,6 +310,7 @@ } e = &q->e[q->end]; + e->skb = skb; usb_fill_bulk_urb(e->urb, usb_dev, snd_pipe, skb->data, skb->len, mt7601u_complete_tx, q); ret = usb_submit_urb(e->urb, GFP_ATOMIC); @@ -326,7 +328,6 @@ q->end = (q->end + 1) % q->entries; q->used++; - e->skb = skb; if (q->used >= q->entries) ieee80211_stop_queue(dev->hw, skb_get_queue_mapping(skb)); reverted: --- linux-oem-5.10-5.10.0/drivers/net/xen-netback/netback.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/xen-netback/netback.c @@ -1342,11 +1342,13 @@ return 0; gnttab_batch_copy(queue->tx_copy_ops, nr_cops); + if (nr_mops != 0) { - if (nr_mops != 0) ret = gnttab_map_refs(queue->tx_map_ops, NULL, queue->pages_to_map, nr_mops); + BUG_ON(ret); + } work_done = xenvif_tx_submit(queue); reverted: --- linux-oem-5.10-5.10.0/drivers/net/xen-netback/rx.c +++ linux-oem-5.10-5.10.0.orig/drivers/net/xen-netback/rx.c @@ -38,15 +38,10 @@ RING_IDX prod, cons; struct sk_buff *skb; int needed; - unsigned long flags; - - spin_lock_irqsave(&queue->rx_queue.lock, flags); skb = skb_peek(&queue->rx_queue); + if (!skb) - if (!skb) { - spin_unlock_irqrestore(&queue->rx_queue.lock, flags); return false; - } needed = DIV_ROUND_UP(skb->len, XEN_PAGE_SIZE); if (skb_is_gso(skb)) @@ -54,8 +49,6 @@ if (skb->sw_hash) needed++; - spin_unlock_irqrestore(&queue->rx_queue.lock, flags); - do { prod = queue->rx.sring->req_prod; cons = queue->rx.req_cons; reverted: --- linux-oem-5.10-5.10.0/drivers/nvdimm/dimm_devs.c +++ linux-oem-5.10-5.10.0.orig/drivers/nvdimm/dimm_devs.c @@ -335,16 +335,16 @@ } static DEVICE_ATTR_RO(state); +static ssize_t available_slots_show(struct device *dev, + struct device_attribute *attr, char *buf) -static ssize_t __available_slots_show(struct nvdimm_drvdata *ndd, char *buf) { + struct nvdimm_drvdata *ndd = dev_get_drvdata(dev); - struct device *dev; ssize_t rc; u32 nfree; if (!ndd) return -ENXIO; - dev = ndd->dev; nvdimm_bus_lock(dev); nfree = nd_label_nfree(ndd); if (nfree - 1 > nfree) { @@ -356,18 +356,6 @@ nvdimm_bus_unlock(dev); return rc; } - -static ssize_t available_slots_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - ssize_t rc; - - nd_device_lock(dev); - rc = __available_slots_show(dev_get_drvdata(dev), buf); - nd_device_unlock(dev); - - return rc; -} static DEVICE_ATTR_RO(available_slots); __weak ssize_t security_show(struct device *dev, reverted: --- linux-oem-5.10-5.10.0/drivers/nvdimm/namespace_devs.c +++ linux-oem-5.10-5.10.0.orig/drivers/nvdimm/namespace_devs.c @@ -1635,11 +1635,11 @@ return a->mode; } + if (a == &dev_attr_nstype.attr || a == &dev_attr_size.attr + || a == &dev_attr_holder.attr + || a == &dev_attr_holder_class.attr + || a == &dev_attr_force_raw.attr + || a == &dev_attr_mode.attr) - /* base is_namespace_io() attributes */ - if (a == &dev_attr_nstype.attr || a == &dev_attr_size.attr || - a == &dev_attr_holder.attr || a == &dev_attr_holder_class.attr || - a == &dev_attr_force_raw.attr || a == &dev_attr_mode.attr || - a == &dev_attr_resource.attr) return a->mode; return 0; diff -u linux-oem-5.10-5.10.0/drivers/nvme/host/core.c linux-oem-5.10-5.10.0/drivers/nvme/host/core.c --- linux-oem-5.10-5.10.0/drivers/nvme/host/core.c +++ linux-oem-5.10-5.10.0/drivers/nvme/host/core.c @@ -1489,21 +1489,8 @@ } length = (io.nblocks + 1) << ns->lba_shift; - - if ((io.control & NVME_RW_PRINFO_PRACT) && - ns->ms == sizeof(struct t10_pi_tuple)) { - /* - * Protection information is stripped/inserted by the - * controller. - */ - if (nvme_to_user_ptr(io.metadata)) - return -EINVAL; - meta_len = 0; - metadata = NULL; - } else { - meta_len = (io.nblocks + 1) * ns->ms; - metadata = nvme_to_user_ptr(io.metadata); - } + meta_len = (io.nblocks + 1) * ns->ms; + metadata = nvme_to_user_ptr(io.metadata); if (ns->features & NVME_NS_EXT_LBAS) { length += meta_len; reverted: --- linux-oem-5.10-5.10.0/drivers/nvme/host/multipath.c +++ linux-oem-5.10-5.10.0.orig/drivers/nvme/host/multipath.c @@ -221,7 +221,7 @@ } for (ns = nvme_next_ns(head, old); + ns != old; - ns && ns != old; ns = nvme_next_ns(head, ns)) { if (nvme_path_is_disabled(ns)) continue; diff -u linux-oem-5.10-5.10.0/drivers/nvme/host/pci.c linux-oem-5.10-5.10.0/drivers/nvme/host/pci.c --- linux-oem-5.10-5.10.0/drivers/nvme/host/pci.c +++ linux-oem-5.10-5.10.0/drivers/nvme/host/pci.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -1826,9 +1825,6 @@ if (dev->cmb_size) return; - if (NVME_CAP_CMBS(dev->ctrl.cap)) - writel(NVME_CMBMSC_CRE, dev->bar + NVME_REG_CMBMSC); - dev->cmbsz = readl(dev->bar + NVME_REG_CMBSZ); if (!dev->cmbsz) return; @@ -1843,16 +1839,6 @@ return; /* - * Tell the controller about the host side address mapping the CMB, - * and enable CMB decoding for the NVMe 1.4+ scheme: - */ - if (NVME_CAP_CMBS(dev->ctrl.cap)) { - hi_lo_writeq(NVME_CMBMSC_CRE | NVME_CMBMSC_CMSE | - (pci_bus_address(pdev, bar) + offset), - dev->bar + NVME_REG_CMBMSC); - } - - /* * Controllers may support a CMB size larger than their BAR, * for example, due to being behind a bridge. Reduce the CMB to * the reported size of the BAR @@ -3247,8 +3233,6 @@ { PCI_DEVICE(0x144d, 0xa822), /* Samsung PM1725a */ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY | NVME_QUIRK_IGNORE_DEV_SUBNQN, }, - { PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */ - .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE(0x1d1d, 0x1f1f), /* LighNVM qemu device */ .driver_data = NVME_QUIRK_LIGHTNVM, }, { PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */ @@ -3264,8 +3248,6 @@ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, { PCI_DEVICE(0x15b7, 0x2001), /* Sandisk Skyhawk */ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, - { PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */ - .driver_data = NVME_QUIRK_NO_DEEPEST_PS, }, { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001), .driver_data = NVME_QUIRK_SINGLE_VECTOR }, { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) }, reverted: --- linux-oem-5.10-5.10.0/drivers/nvme/host/rdma.c +++ linux-oem-5.10-5.10.0.orig/drivers/nvme/host/rdma.c @@ -97,7 +97,6 @@ struct completion cm_done; bool pi_support; int cq_size; - struct mutex queue_lock; }; struct nvme_rdma_ctrl { @@ -580,7 +579,6 @@ int ret; queue = &ctrl->queues[idx]; - mutex_init(&queue->queue_lock); queue->ctrl = ctrl; if (idx && ctrl->ctrl.max_integrity_segments) queue->pi_support = true; @@ -600,8 +598,7 @@ if (IS_ERR(queue->cm_id)) { dev_info(ctrl->ctrl.device, "failed to create CM ID: %ld\n", PTR_ERR(queue->cm_id)); + return PTR_ERR(queue->cm_id); - ret = PTR_ERR(queue->cm_id); - goto out_destroy_mutex; } if (ctrl->ctrl.opts->mask & NVMF_OPT_HOST_TRADDR) @@ -631,8 +628,6 @@ out_destroy_cm_id: rdma_destroy_id(queue->cm_id); nvme_rdma_destroy_queue_ib(queue); -out_destroy_mutex: - mutex_destroy(&queue->queue_lock); return ret; } @@ -644,10 +639,9 @@ static void nvme_rdma_stop_queue(struct nvme_rdma_queue *queue) { + if (!test_and_clear_bit(NVME_RDMA_Q_LIVE, &queue->flags)) + return; + __nvme_rdma_stop_queue(queue); - mutex_lock(&queue->queue_lock); - if (test_and_clear_bit(NVME_RDMA_Q_LIVE, &queue->flags)) - __nvme_rdma_stop_queue(queue); - mutex_unlock(&queue->queue_lock); } static void nvme_rdma_free_queue(struct nvme_rdma_queue *queue) @@ -657,7 +651,6 @@ nvme_rdma_destroy_queue_ib(queue); rdma_destroy_id(queue->cm_id); - mutex_destroy(&queue->queue_lock); } static void nvme_rdma_free_io_queues(struct nvme_rdma_ctrl *ctrl) diff -u linux-oem-5.10-5.10.0/drivers/nvme/host/tcp.c linux-oem-5.10-5.10.0/drivers/nvme/host/tcp.c --- linux-oem-5.10-5.10.0/drivers/nvme/host/tcp.c +++ linux-oem-5.10-5.10.0/drivers/nvme/host/tcp.c @@ -76,7 +76,6 @@ struct work_struct io_work; int io_cpu; - struct mutex queue_lock; struct mutex send_mutex; struct llist_head req_list; struct list_head send_list; @@ -1220,7 +1219,6 @@ sock_release(queue->sock); kfree(queue->pdu); - mutex_destroy(&queue->queue_lock); } static int nvme_tcp_init_connection(struct nvme_tcp_queue *queue) @@ -1382,7 +1380,6 @@ struct nvme_tcp_queue *queue = &ctrl->queues[qid]; int ret, rcv_pdu_size; - mutex_init(&queue->queue_lock); queue->ctrl = ctrl; init_llist_head(&queue->req_list); INIT_LIST_HEAD(&queue->send_list); @@ -1401,7 +1398,7 @@ if (ret) { dev_err(nctrl->device, "failed to create socket: %d\n", ret); - goto err_destroy_mutex; + return ret; } /* Single syn retry */ @@ -1510,8 +1507,6 @@ err_sock: sock_release(queue->sock); queue->sock = NULL; -err_destroy_mutex: - mutex_destroy(&queue->queue_lock); return ret; } @@ -1539,10 +1534,9 @@ struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl); struct nvme_tcp_queue *queue = &ctrl->queues[qid]; - mutex_lock(&queue->queue_lock); - if (test_and_clear_bit(NVME_TCP_Q_LIVE, &queue->flags)) - __nvme_tcp_stop_queue(queue); - mutex_unlock(&queue->queue_lock); + if (!test_and_clear_bit(NVME_TCP_Q_LIVE, &queue->flags)) + return; + __nvme_tcp_stop_queue(queue); } static int nvme_tcp_start_queue(struct nvme_ctrl *nctrl, int idx) reverted: --- linux-oem-5.10-5.10.0/drivers/nvme/target/admin-cmd.c +++ linux-oem-5.10-5.10.0.orig/drivers/nvme/target/admin-cmd.c @@ -487,10 +487,8 @@ /* return an all zeroed buffer if we can't find an active namespace */ ns = nvmet_find_namespace(ctrl, req->cmd->identify.nsid); + if (!ns) - if (!ns) { - status = NVME_SC_INVALID_NS; goto done; - } nvmet_ns_revalidate(ns); @@ -543,9 +541,7 @@ id->nsattr |= (1 << 0); nvmet_put_namespace(ns); done: + status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id)); - if (!status) - status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id)); - kfree(id); out: nvmet_req_complete(req, status); reverted: --- linux-oem-5.10-5.10.0/drivers/nvme/target/tcp.c +++ linux-oem-5.10-5.10.0.orig/drivers/nvme/target/tcp.c @@ -305,7 +305,7 @@ length = cmd->pdu_len; cmd->nr_mapped = DIV_ROUND_UP(length, PAGE_SIZE); offset = cmd->rbytes_done; + cmd->sg_idx = DIV_ROUND_UP(offset, PAGE_SIZE); - cmd->sg_idx = offset / PAGE_SIZE; sg_offset = offset % PAGE_SIZE; sg = &cmd->req.sg[cmd->sg_idx]; @@ -318,7 +318,6 @@ length -= iov_len; sg = sg_next(sg); iov++; - sg_offset = 0; } iov_iter_kvec(&cmd->recv_msg.msg_iter, READ, cmd->iov, reverted: --- linux-oem-5.10-5.10.0/drivers/of/device.c +++ linux-oem-5.10-5.10.0.orig/drivers/of/device.c @@ -162,11 +162,9 @@ mask = DMA_BIT_MASK(ilog2(end) + 1); dev->coherent_dma_mask &= mask; *dev->dma_mask &= mask; + /* ...but only set bus limit if we found valid dma-ranges earlier */ + if (!ret) - /* ...but only set bus limit and range map if we found valid dma-ranges earlier */ - if (!ret) { dev->bus_dma_limit = end; - dev->dma_range_map = map; - } coherent = of_dma_is_coherent(np); dev_dbg(dev, "device is%sdma coherent\n", @@ -174,9 +172,6 @@ iommu = of_iommu_configure(dev, np, id); if (PTR_ERR(iommu) == -EPROBE_DEFER) { - /* Don't touch range map if it wasn't set from a valid dma-ranges */ - if (!ret) - dev->dma_range_map = NULL; kfree(map); return -EPROBE_DEFER; } @@ -186,6 +181,7 @@ arch_setup_dma_ops(dev, dma_start, size, iommu, coherent); + dev->dma_range_map = map; return 0; } EXPORT_SYMBOL_GPL(of_dma_configure_id); reverted: --- linux-oem-5.10-5.10.0/drivers/phy/motorola/phy-cpcap-usb.c +++ linux-oem-5.10-5.10.0.orig/drivers/phy/motorola/phy-cpcap-usb.c @@ -662,42 +662,35 @@ generic_phy = devm_phy_create(ddata->dev, NULL, &ops); if (IS_ERR(generic_phy)) { error = PTR_ERR(generic_phy); + return PTR_ERR(generic_phy); - goto out_reg_disable; } phy_set_drvdata(generic_phy, ddata); phy_provider = devm_of_phy_provider_register(ddata->dev, of_phy_simple_xlate); + if (IS_ERR(phy_provider)) + return PTR_ERR(phy_provider); - if (IS_ERR(phy_provider)) { - error = PTR_ERR(phy_provider); - goto out_reg_disable; - } error = cpcap_usb_init_optional_pins(ddata); if (error) + return error; - goto out_reg_disable; cpcap_usb_init_optional_gpios(ddata); error = cpcap_usb_init_iio(ddata); if (error) + return error; - goto out_reg_disable; error = cpcap_usb_init_interrupts(pdev, ddata); if (error) + return error; - goto out_reg_disable; usb_add_phy_dev(&ddata->phy); atomic_set(&ddata->active, 1); schedule_delayed_work(&ddata->detect_work, msecs_to_jiffies(1)); return 0; - -out_reg_disable: - regulator_disable(ddata->vusb); - - return error; } static int cpcap_usb_phy_remove(struct platform_device *pdev) diff -u linux-oem-5.10-5.10.0/drivers/platform/x86/hp-wmi.c linux-oem-5.10-5.10.0/drivers/platform/x86/hp-wmi.c --- linux-oem-5.10-5.10.0/drivers/platform/x86/hp-wmi.c +++ linux-oem-5.10-5.10.0/drivers/platform/x86/hp-wmi.c @@ -32,10 +32,6 @@ MODULE_ALIAS("wmi:95F24279-4D7B-4334-9387-ACCDC67EF61C"); MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); -static int enable_tablet_mode_sw = -1; -module_param(enable_tablet_mode_sw, int, 0444); -MODULE_PARM_DESC(enable_tablet_mode_sw, "Enable SW_TABLET_MODE reporting (-1=auto, 0=no, 1=yes)"); - #define HPWMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" #define HPWMI_BIOS_GUID "5FB7F034-2C63-45e9-BE91-3D44E2C707E4" @@ -658,12 +654,10 @@ } /* Tablet mode */ - if (enable_tablet_mode_sw > 0) { - val = hp_wmi_hw_state(HPWMI_TABLET_MASK); - if (val >= 0) { - __set_bit(SW_TABLET_MODE, hp_wmi_input_dev->swbit); - input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE, val); - } + val = hp_wmi_hw_state(HPWMI_TABLET_MASK); + if (!(val < 0)) { + __set_bit(SW_TABLET_MODE, hp_wmi_input_dev->swbit); + input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE, val); } err = sparse_keymap_setup(hp_wmi_input_dev, hp_wmi_keymap, NULL); diff -u linux-oem-5.10-5.10.0/drivers/platform/x86/intel-vbtn.c linux-oem-5.10-5.10.0/drivers/platform/x86/intel-vbtn.c --- linux-oem-5.10-5.10.0/drivers/platform/x86/intel-vbtn.c +++ linux-oem-5.10-5.10.0/drivers/platform/x86/intel-vbtn.c @@ -218,8 +218,2 @@ }, - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7352"), - }, - }, {} /* Array terminator */ diff -u linux-oem-5.10-5.10.0/drivers/platform/x86/thinkpad_acpi.c linux-oem-5.10-5.10.0/drivers/platform/x86/thinkpad_acpi.c --- linux-oem-5.10-5.10.0/drivers/platform/x86/thinkpad_acpi.c +++ linux-oem-5.10-5.10.0/drivers/platform/x86/thinkpad_acpi.c @@ -8783,7 +8783,6 @@ TPACPI_Q_LNV3('N', '1', 'T', TPACPI_FAN_2CTL), /* P71 */ TPACPI_Q_LNV3('N', '1', 'U', TPACPI_FAN_2CTL), /* P51 */ TPACPI_Q_LNV3('N', '2', 'C', TPACPI_FAN_2CTL), /* P52 / P72 */ - TPACPI_Q_LNV3('N', '2', 'N', TPACPI_FAN_2CTL), /* P53 / P73 */ TPACPI_Q_LNV3('N', '2', 'E', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (1st gen) */ TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (2nd gen) */ TPACPI_Q_LNV3('N', '2', 'V', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (3nd gen) */ reverted: --- linux-oem-5.10-5.10.0/drivers/platform/x86/touchscreen_dmi.c +++ linux-oem-5.10-5.10.0.orig/drivers/platform/x86/touchscreen_dmi.c @@ -263,16 +263,6 @@ .properties = digma_citi_e200_props, }; -static const struct property_entry estar_beauty_hd_props[] = { - PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), - { } -}; - -static const struct ts_dmi_data estar_beauty_hd_data = { - .acpi_name = "GDIX1001:00", - .properties = estar_beauty_hd_props, -}; - static const struct property_entry gp_electronic_t701_props[] = { PROPERTY_ENTRY_U32("touchscreen-size-x", 960), PROPERTY_ENTRY_U32("touchscreen-size-y", 640), @@ -953,14 +943,6 @@ }, }, { - /* Estar Beauty HD (MID 7316R) */ - .driver_data = (void *)&estar_beauty_hd_data, - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Estar"), - DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"), - }, - }, - { /* GP-electronic T701 */ .driver_data = (void *)&gp_electronic_t701_data, .matches = { reverted: --- linux-oem-5.10-5.10.0/drivers/regulator/core.c +++ linux-oem-5.10-5.10.0.orig/drivers/regulator/core.c @@ -1813,13 +1813,13 @@ { struct regulator_dev *r; struct device *dev = rdev->dev.parent; + int ret; - int ret = 0; /* No supply to resolve? */ if (!rdev->supply_name) return 0; + /* Supply already resolved? */ - /* Supply already resolved? (fast-path without locking contention) */ if (rdev->supply) return 0; @@ -1829,7 +1829,7 @@ /* Did the lookup explicitly defer for us? */ if (ret == -EPROBE_DEFER) + return ret; - goto out; if (have_full_constraints()) { r = dummy_regulator_rdev; @@ -1837,18 +1837,15 @@ } else { dev_err(dev, "Failed to resolve %s-supply for %s\n", rdev->supply_name, rdev->desc->name); + return -EPROBE_DEFER; - ret = -EPROBE_DEFER; - goto out; } } if (r == rdev) { dev_err(dev, "Supply for %s (%s) resolved to itself\n", rdev->desc->name, rdev->supply_name); + if (!have_full_constraints()) + return -EINVAL; - if (!have_full_constraints()) { - ret = -EINVAL; - goto out; - } r = dummy_regulator_rdev; get_device(&r->dev); } @@ -1862,8 +1859,7 @@ if (r->dev.parent && r->dev.parent != rdev->dev.parent) { if (!device_is_bound(r->dev.parent)) { put_device(&r->dev); + return -EPROBE_DEFER; - ret = -EPROBE_DEFER; - goto out; } } @@ -1871,32 +1867,15 @@ ret = regulator_resolve_supply(r); if (ret < 0) { put_device(&r->dev); + return ret; - goto out; - } - - /* - * Recheck rdev->supply with rdev->mutex lock held to avoid a race - * between rdev->supply null check and setting rdev->supply in - * set_supply() from concurrent tasks. - */ - regulator_lock(rdev); - - /* Supply just resolved by a concurrent task? */ - if (rdev->supply) { - regulator_unlock(rdev); - put_device(&r->dev); - goto out; } ret = set_supply(rdev, r); if (ret < 0) { - regulator_unlock(rdev); put_device(&r->dev); + return ret; - goto out; } - regulator_unlock(rdev); - /* * In set_machine_constraints() we may have turned this regulator on * but we couldn't propagate to the supply if it hadn't been resolved @@ -1907,12 +1886,11 @@ if (ret < 0) { _regulator_put(rdev->supply); rdev->supply = NULL; + return ret; - goto out; } } + return 0; -out: - return ret; } /* Internal regulator request function */ reverted: --- linux-oem-5.10-5.10.0/drivers/s390/crypto/vfio_ap_drv.c +++ linux-oem-5.10-5.10.0.orig/drivers/s390/crypto/vfio_ap_drv.c @@ -71,11 +71,15 @@ static void vfio_ap_queue_dev_remove(struct ap_device *apdev) { struct vfio_ap_queue *q; + int apid, apqi; mutex_lock(&matrix_dev->lock); q = dev_get_drvdata(&apdev->device); - vfio_ap_mdev_reset_queue(q, 1); dev_set_drvdata(&apdev->device, NULL); + apid = AP_QID_CARD(q->apqn); + apqi = AP_QID_QUEUE(q->apqn); + vfio_ap_mdev_reset_queue(apid, apqi, 1); + vfio_ap_irq_disable(q); kfree(q); mutex_unlock(&matrix_dev->lock); } reverted: --- linux-oem-5.10-5.10.0/drivers/s390/crypto/vfio_ap_ops.c +++ linux-oem-5.10-5.10.0.orig/drivers/s390/crypto/vfio_ap_ops.c @@ -25,7 +25,6 @@ #define VFIO_AP_MDEV_NAME_HWVIRT "VFIO AP Passthrough Device" static int vfio_ap_mdev_reset_queues(struct mdev_device *mdev); -static struct vfio_ap_queue *vfio_ap_find_queue(int apqn); static int match_apqn(struct device *dev, const void *data) { @@ -50,15 +49,20 @@ int apqn) { struct vfio_ap_queue *q; + struct device *dev; if (!test_bit_inv(AP_QID_CARD(apqn), matrix_mdev->matrix.apm)) return NULL; if (!test_bit_inv(AP_QID_QUEUE(apqn), matrix_mdev->matrix.aqm)) return NULL; + dev = driver_find_device(&matrix_dev->vfio_ap_drv->driver, NULL, + &apqn, match_apqn); + if (!dev) + return NULL; + q = dev_get_drvdata(dev); + q->matrix_mdev = matrix_mdev; + put_device(dev); - q = vfio_ap_find_queue(apqn); - if (q) - q->matrix_mdev = matrix_mdev; return q; } @@ -115,18 +119,13 @@ */ static void vfio_ap_free_aqic_resources(struct vfio_ap_queue *q) { + if (q->saved_isc != VFIO_AP_ISC_INVALID && q->matrix_mdev) - if (!q) - return; - if (q->saved_isc != VFIO_AP_ISC_INVALID && - !WARN_ON(!(q->matrix_mdev && q->matrix_mdev->kvm))) { kvm_s390_gisc_unregister(q->matrix_mdev->kvm, q->saved_isc); + if (q->saved_pfn && q->matrix_mdev) - q->saved_isc = VFIO_AP_ISC_INVALID; - } - if (q->saved_pfn && !WARN_ON(!q->matrix_mdev)) { vfio_unpin_pages(mdev_dev(q->matrix_mdev->mdev), &q->saved_pfn, 1); + q->saved_pfn = 0; + q->saved_isc = VFIO_AP_ISC_INVALID; - q->saved_pfn = 0; - } } /** @@ -145,7 +144,7 @@ * Returns if ap_aqic function failed with invalid, deconfigured or * checkstopped AP. */ +struct ap_queue_status vfio_ap_irq_disable(struct vfio_ap_queue *q) -static struct ap_queue_status vfio_ap_irq_disable(struct vfio_ap_queue *q) { struct ap_qirq_ctrl aqic_gisa = {}; struct ap_queue_status status; @@ -1115,70 +1114,48 @@ return NOTIFY_OK; } +static void vfio_ap_irq_disable_apqn(int apqn) -static struct vfio_ap_queue *vfio_ap_find_queue(int apqn) { struct device *dev; + struct vfio_ap_queue *q; - struct vfio_ap_queue *q = NULL; dev = driver_find_device(&matrix_dev->vfio_ap_drv->driver, NULL, &apqn, match_apqn); if (dev) { q = dev_get_drvdata(dev); + vfio_ap_irq_disable(q); put_device(dev); } - - return q; } +int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi, -int vfio_ap_mdev_reset_queue(struct vfio_ap_queue *q, unsigned int retry) { struct ap_queue_status status; - int ret; int retry2 = 2; + int apqn = AP_MKQID(apid, apqi); + do { + status = ap_zapq(apqn); + switch (status.response_code) { + case AP_RESPONSE_NORMAL: + while (!status.queue_empty && retry2--) { + msleep(20); + status = ap_tapq(apqn, NULL); + } + WARN_ON_ONCE(retry2 <= 0); + return 0; + case AP_RESPONSE_RESET_IN_PROGRESS: + case AP_RESPONSE_BUSY: - if (!q) - return 0; - -retry_zapq: - status = ap_zapq(q->apqn); - switch (status.response_code) { - case AP_RESPONSE_NORMAL: - ret = 0; - break; - case AP_RESPONSE_RESET_IN_PROGRESS: - if (retry--) { msleep(20); + break; + default: + /* things are really broken, give up */ + return -EIO; - goto retry_zapq; } + } while (retry--); - ret = -EBUSY; - break; - case AP_RESPONSE_Q_NOT_AVAIL: - case AP_RESPONSE_DECONFIGURED: - case AP_RESPONSE_CHECKSTOPPED: - WARN_ON_ONCE(status.irq_enabled); - ret = -EBUSY; - goto free_resources; - default: - /* things are really broken, give up */ - WARN(true, "PQAP/ZAPQ completed with invalid rc (%x)\n", - status.response_code); - return -EIO; - } - - /* wait for the reset to take effect */ - while (retry2--) { - if (status.queue_empty && !status.irq_enabled) - break; - msleep(20); - status = ap_tapq(q->apqn, NULL); - } - WARN_ON_ONCE(retry2 <= 0); + return -EBUSY; -free_resources: - vfio_ap_free_aqic_resources(q); - - return ret; } static int vfio_ap_mdev_reset_queues(struct mdev_device *mdev) @@ -1186,15 +1163,13 @@ int ret; int rc = 0; unsigned long apid, apqi; - struct vfio_ap_queue *q; struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, matrix_mdev->matrix.apm_max + 1) { for_each_set_bit_inv(apqi, matrix_mdev->matrix.aqm, matrix_mdev->matrix.aqm_max + 1) { + ret = vfio_ap_mdev_reset_queue(apid, apqi, 1); - q = vfio_ap_find_queue(AP_MKQID(apid, apqi)); - ret = vfio_ap_mdev_reset_queue(q, 1); /* * Regardless whether a queue turns out to be busy, or * is not operational, we need to continue resetting @@ -1202,6 +1177,7 @@ */ if (ret) rc = ret; + vfio_ap_irq_disable_apqn(AP_MKQID(apid, apqi)); } } reverted: --- linux-oem-5.10-5.10.0/drivers/s390/crypto/vfio_ap_private.h +++ linux-oem-5.10-5.10.0.orig/drivers/s390/crypto/vfio_ap_private.h @@ -88,6 +88,11 @@ struct mdev_device *mdev; }; +extern int vfio_ap_mdev_register(void); +extern void vfio_ap_mdev_unregister(void); +int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi, + unsigned int retry); + struct vfio_ap_queue { struct ap_matrix_mdev *matrix_mdev; unsigned long saved_pfn; @@ -95,10 +100,5 @@ #define VFIO_AP_ISC_INVALID 0xff unsigned char saved_isc; }; +struct ap_queue_status vfio_ap_irq_disable(struct vfio_ap_queue *q); - -int vfio_ap_mdev_register(void); -void vfio_ap_mdev_unregister(void); -int vfio_ap_mdev_reset_queue(struct vfio_ap_queue *q, - unsigned int retry); - #endif /* _VFIO_AP_PRIVATE_H_ */ reverted: --- linux-oem-5.10-5.10.0/drivers/scsi/fnic/vnic_dev.c +++ linux-oem-5.10-5.10.0.orig/drivers/scsi/fnic/vnic_dev.c @@ -444,8 +444,7 @@ fetch_index = ioread32(&vdev->devcmd2->wq.ctrl->fetch_index); if (fetch_index == 0xFFFFFFFF) { /* check for hardware gone */ pr_err("error in devcmd2 init"); + return -ENODEV; - err = -ENODEV; - goto err_free_wq; } /* @@ -461,7 +460,7 @@ err = vnic_dev_alloc_desc_ring(vdev, &vdev->devcmd2->results_ring, DEVCMD2_RING_SIZE, DEVCMD2_DESC_SIZE); if (err) + goto err_free_wq; - goto err_disable_wq; vdev->devcmd2->result = (struct devcmd2_result *) vdev->devcmd2->results_ring.descs; @@ -482,9 +481,8 @@ err_free_desc_ring: vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); +err_free_wq: -err_disable_wq: vnic_wq_disable(&vdev->devcmd2->wq); -err_free_wq: vnic_wq_free(&vdev->devcmd2->wq); err_free_devcmd2: kfree(vdev->devcmd2); reverted: --- linux-oem-5.10-5.10.0/drivers/scsi/ibmvscsi/ibmvfc.c +++ linux-oem-5.10-5.10.0.orig/drivers/scsi/ibmvscsi/ibmvfc.c @@ -2957,10 +2957,8 @@ unsigned long flags = 0; spin_lock_irqsave(shost->host_lock, flags); + if (sdev->type == TYPE_DISK) - if (sdev->type == TYPE_DISK) { sdev->allow_restart = 1; - blk_queue_rq_timeout(sdev->request_queue, 120 * HZ); - } spin_unlock_irqrestore(shost->host_lock, flags); return 0; } reverted: --- linux-oem-5.10-5.10.0/drivers/scsi/libfc/fc_exch.c +++ linux-oem-5.10-5.10.0.orig/drivers/scsi/libfc/fc_exch.c @@ -1624,13 +1624,8 @@ rc = fc_exch_done_locked(ep); WARN_ON(fc_seq_exch(sp) != ep); spin_unlock_bh(&ep->ex_lock); + if (!rc) - if (!rc) { fc_exch_delete(ep); - } else { - FC_EXCH_DBG(ep, "ep is completed already," - "hence skip calling the resp\n"); - goto skip_resp; - } } /* @@ -1649,7 +1644,6 @@ if (!fc_invoke_resp(ep, sp, fp)) fc_frame_free(fp); -skip_resp: fc_exch_release(ep); return; rel: @@ -1906,16 +1900,10 @@ fc_exch_hold(ep); + if (!rc) - if (!rc) { fc_exch_delete(ep); - } else { - FC_EXCH_DBG(ep, "ep is completed already," - "hence skip calling the resp\n"); - goto skip_resp; - } fc_invoke_resp(ep, sp, ERR_PTR(-FC_EX_CLOSED)); -skip_resp: fc_seq_set_resp(sp, NULL, ep->arg); fc_exch_release(ep); } diff -u linux-oem-5.10-5.10.0/drivers/scsi/lpfc/lpfc_nvme.c linux-oem-5.10-5.10.0/drivers/scsi/lpfc/lpfc_nvme.c --- linux-oem-5.10-5.10.0/drivers/scsi/lpfc/lpfc_nvme.c +++ linux-oem-5.10-5.10.0/drivers/scsi/lpfc/lpfc_nvme.c @@ -714,9 +714,6 @@ return -ENODEV; } - if (!vport->phba->sli4_hba.nvmels_wq) - return -ENOMEM; - /* * there are two dma buf in the request, actually there is one and * the second one is just the start address + cmd size. reverted: --- linux-oem-5.10-5.10.0/drivers/scsi/qla2xxx/qla_os.c +++ linux-oem-5.10-5.10.0.orig/drivers/scsi/qla2xxx/qla_os.c @@ -42,7 +42,7 @@ int ql2xenforce_iocb_limit = 1; module_param(ql2xenforce_iocb_limit, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(ql2xenforce_iocb_limit, + "Enforce IOCB throttling, to avoid FW congestion. (default: 0)"); - "Enforce IOCB throttling, to avoid FW congestion. (default: 1)"); /* * CT6 CTX allocation cache diff -u linux-oem-5.10-5.10.0/drivers/scsi/scsi_debug.c linux-oem-5.10-5.10.0/drivers/scsi/scsi_debug.c --- linux-oem-5.10-5.10.0/drivers/scsi/scsi_debug.c +++ linux-oem-5.10-5.10.0/drivers/scsi/scsi_debug.c @@ -6881,7 +6881,6 @@ sdebug_erase_all_stores(false); xa_destroy(per_store_ap); - kfree(sdebug_q_arr); } device_initcall(scsi_debug_init); reverted: --- linux-oem-5.10-5.10.0/drivers/scsi/scsi_transport_srp.c +++ linux-oem-5.10-5.10.0.orig/drivers/scsi/scsi_transport_srp.c @@ -541,14 +541,7 @@ res = mutex_lock_interruptible(&rport->mutex); if (res) goto out; + scsi_target_block(&shost->shost_gendev); - if (rport->state != SRP_RPORT_FAIL_FAST) - /* - * sdev state must be SDEV_TRANSPORT_OFFLINE, transition - * to SDEV_BLOCK is illegal. Calling scsi_target_unblock() - * later is ok though, scsi_internal_device_unblock_nowait() - * treats SDEV_TRANSPORT_OFFLINE like SDEV_BLOCK. - */ - scsi_target_block(&shost->shost_gendev); res = rport->state != SRP_RPORT_LOST ? i->f->reconnect(rport) : -ENODEV; pr_debug("%s (state %d): transport.reconnect() returned %d\n", dev_name(&shost->shost_gendev), rport->state, res); reverted: --- linux-oem-5.10-5.10.0/drivers/soc/atmel/soc.c +++ linux-oem-5.10-5.10.0.orig/drivers/soc/atmel/soc.c @@ -265,21 +265,8 @@ return soc_dev; } -static const struct of_device_id at91_soc_allowed_list[] __initconst = { - { .compatible = "atmel,at91rm9200", }, - { .compatible = "atmel,at91sam9", }, - { .compatible = "atmel,sama5", }, - { .compatible = "atmel,samv7", }, - { } -}; - static int __init atmel_soc_device_init(void) { - struct device_node *np = of_find_node_by_path("/"); - - if (!of_match_node(at91_soc_allowed_list, np)) - return 0; - at91_soc_init(socs); return 0; reverted: --- linux-oem-5.10-5.10.0/drivers/soc/imx/Kconfig +++ linux-oem-5.10-5.10.0.orig/drivers/soc/imx/Kconfig @@ -13,7 +13,7 @@ depends on ARCH_MXC || COMPILE_TEST default ARCH_MXC && ARM64 select SOC_BUS + select ARM_GIC_V3 if ARCH_MXC - select ARM_GIC_V3 if ARCH_MXC && ARCH_MULTI_V7 help If you say yes here you get support for the NXP i.MX8M family support, it will provide the SoC info like SoC family, diff -u linux-oem-5.10-5.10.0/drivers/soc/ti/omap_prm.c linux-oem-5.10-5.10.0/drivers/soc/ti/omap_prm.c --- linux-oem-5.10-5.10.0/drivers/soc/ti/omap_prm.c +++ linux-oem-5.10-5.10.0/drivers/soc/ti/omap_prm.c @@ -552,7 +552,6 @@ const struct omap_rst_map *map; struct ti_prm_platform_data *pdata = dev_get_platdata(&pdev->dev); char buf[32]; - u32 v; /* * Check if we have controllable resets. If either rstctrl is non-zero @@ -600,16 +599,6 @@ map++; } - /* Quirk handling to assert rst_map_012 bits on reset and avoid errors */ - if (prm->data->rstmap == rst_map_012) { - v = readl_relaxed(reset->prm->base + reset->prm->data->rstctrl); - if ((v & reset->mask) != reset->mask) { - dev_dbg(&pdev->dev, "Asserting all resets: %08x\n", v); - writel_relaxed(reset->mask, reset->prm->base + - reset->prm->data->rstctrl); - } - } - return devm_reset_controller_register(&pdev->dev, &reset->rcdev); } diff -u linux-oem-5.10-5.10.0/drivers/spi/spi-altera.c linux-oem-5.10-5.10.0/drivers/spi/spi-altera.c --- linux-oem-5.10-5.10.0/drivers/spi/spi-altera.c +++ linux-oem-5.10-5.10.0/drivers/spi/spi-altera.c @@ -254,8 +254,7 @@ dev_err(&pdev->dev, "Invalid number of chipselect: %hu\n", pdata->num_chipselect); - err = -EINVAL; - goto exit; + return -EINVAL; } master->num_chipselect = pdata->num_chipselect; reverted: --- linux-oem-5.10-5.10.0/drivers/staging/media/hantro/hantro_v4l2.c +++ linux-oem-5.10-5.10.0.orig/drivers/staging/media/hantro/hantro_v4l2.c @@ -367,7 +367,7 @@ hantro_reset_fmt(raw_fmt, raw_vpu_fmt); raw_fmt->width = encoded_fmt->width; + raw_fmt->width = encoded_fmt->width; - raw_fmt->height = encoded_fmt->height; if (ctx->is_encoder) hantro_set_fmt_out(ctx, raw_fmt); else reverted: --- linux-oem-5.10-5.10.0/drivers/staging/media/sunxi/cedrus/cedrus_h264.c +++ linux-oem-5.10-5.10.0.orig/drivers/staging/media/sunxi/cedrus/cedrus_h264.c @@ -203,7 +203,7 @@ position = cedrus_buf->codec.h264.position; sram_array[i] |= position << 1; + if (ref_list[i].fields & V4L2_H264_BOTTOM_FIELD_REF) - if (ref_list[i].fields == V4L2_H264_BOTTOM_FIELD_REF) sram_array[i] |= BIT(0); } reverted: --- linux-oem-5.10-5.10.0/drivers/tee/optee/call.c +++ linux-oem-5.10-5.10.0.orig/drivers/tee/optee/call.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -149,8 +148,7 @@ */ optee_cq_wait_for_completion(&optee->call_queue, &w); } else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) { + might_sleep(); - if (need_resched()) - cond_resched(); param.a0 = res.a0; param.a1 = res.a1; param.a2 = res.a2; reverted: --- linux-oem-5.10-5.10.0/drivers/thunderbolt/acpi.c +++ linux-oem-5.10-5.10.0.orig/drivers/thunderbolt/acpi.c @@ -56,7 +56,7 @@ * managed with the xHCI and the SuperSpeed hub so we create the * link from xHCI instead. */ + while (!dev_is_pci(dev)) - while (dev && !dev_is_pci(dev)) dev = dev->parent; if (!dev) diff -u linux-oem-5.10-5.10.0/drivers/tty/tty_io.c linux-oem-5.10-5.10.0/drivers/tty/tty_io.c --- linux-oem-5.10-5.10.0/drivers/tty/tty_io.c +++ linux-oem-5.10-5.10.0/drivers/tty/tty_io.c @@ -963,14 +963,11 @@ if (ret <= 0) break; - written += ret; - if (ret > size) - break; - /* FIXME! Have Al check this! */ if (ret != size) iov_iter_revert(from, size-ret); + written += ret; count -= ret; if (!count) break; @@ -1030,8 +1027,9 @@ * write method will not be invoked in parallel for each device. */ -static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_iter *from) +static ssize_t tty_write(struct kiocb *iocb, struct iov_iter *from) { + struct file *file = iocb->ki_filp; struct tty_struct *tty = file_tty(file); struct tty_ldisc *ld; ssize_t ret; @@ -1054,11 +1052,6 @@ return ret; } -static ssize_t tty_write(struct kiocb *iocb, struct iov_iter *from) -{ - return file_tty_write(iocb->ki_filp, iocb, from); -} - ssize_t redirected_tty_write(struct kiocb *iocb, struct iov_iter *iter) { struct file *p = NULL; @@ -1068,13 +1061,9 @@ p = get_file(redirect); spin_unlock(&redirect_lock); - /* - * We know the redirected tty is just another tty, we can can - * call file_tty_write() directly with that file pointer. - */ if (p) { ssize_t res; - res = file_tty_write(p, iocb, iter); + res = vfs_iocb_iter_write(p, iocb, iter); fput(p); return res; } @@ -2317,12 +2306,6 @@ fput(f); return 0; } - if (file->f_op->write_iter != tty_write) - return -ENOTTY; - if (!(file->f_mode & FMODE_WRITE)) - return -EBADF; - if (!(file->f_mode & FMODE_CAN_WRITE)) - return -EINVAL; spin_lock(&redirect_lock); if (redirect) { spin_unlock(&redirect_lock); diff -u linux-oem-5.10-5.10.0/drivers/usb/class/usblp.c linux-oem-5.10-5.10.0/drivers/usb/class/usblp.c --- linux-oem-5.10-5.10.0/drivers/usb/class/usblp.c +++ linux-oem-5.10-5.10.0/drivers/usb/class/usblp.c @@ -1329,17 +1329,14 @@ if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL) return -EINVAL; - /* Don't unnecessarily set the interface if there's a single alt. */ - if (usblp->intf->num_altsetting > 1) { - alts = usblp->protocol[protocol].alt_setting; - if (alts < 0) - return -EINVAL; - r = usb_set_interface(usblp->dev, usblp->ifnum, alts); - if (r < 0) { - printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n", - alts, usblp->ifnum); - return r; - } + alts = usblp->protocol[protocol].alt_setting; + if (alts < 0) + return -EINVAL; + r = usb_set_interface(usblp->dev, usblp->ifnum, alts); + if (r < 0) { + printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n", + alts, usblp->ifnum); + return r; } usblp->bidir = (usblp->protocol[protocol].epread != NULL); reverted: --- linux-oem-5.10-5.10.0/drivers/usb/core/hcd.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/core/hcd.c @@ -1646,16 +1646,9 @@ /* pass ownership to the completion handler */ urb->status = status; + kcov_remote_start_usb((u64)urb->dev->bus->busnum); - /* - * This function can be called in task context inside another remote - * coverage collection section, but KCOV doesn't support that kind of - * recursion yet. Only collect coverage in softirq context for now. - */ - if (in_serving_softirq()) - kcov_remote_start_usb((u64)urb->dev->bus->busnum); urb->complete(urb); + kcov_remote_stop(); - if (in_serving_softirq()) - kcov_remote_stop(); usb_anchor_resume_wakeups(anchor); atomic_dec(&urb->use_count); reverted: --- linux-oem-5.10-5.10.0/drivers/usb/dwc2/gadget.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/dwc2/gadget.c @@ -1543,6 +1543,7 @@ static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg, u32 windex) { + struct dwc2_hsotg_ep *ep; int dir = (windex & USB_DIR_IN) ? 1 : 0; int idx = windex & 0x7F; @@ -1552,7 +1553,12 @@ if (idx > hsotg->num_of_eps) return NULL; + ep = index_to_ep(hsotg, idx, dir); + + if (idx && ep->dir_in != dir) + return NULL; + + return ep; - return index_to_ep(hsotg, idx, dir); } /** reverted: --- linux-oem-5.10-5.10.0/drivers/usb/dwc3/core.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/dwc3/core.c @@ -1758,7 +1758,7 @@ if (PMSG_IS_AUTO(msg)) break; + ret = dwc3_core_init(dwc); - ret = dwc3_core_init_for_resume(dwc); if (ret) return ret; reverted: --- linux-oem-5.10-5.10.0/drivers/usb/gadget/legacy/ether.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/gadget/legacy/ether.c @@ -403,10 +403,8 @@ struct usb_descriptor_header *usb_desc; usb_desc = usb_otg_descriptor_alloc(gadget); + if (!usb_desc) - if (!usb_desc) { - status = -ENOMEM; goto fail1; - } usb_otg_descriptor_init(gadget, usb_desc); otg_desc[0] = usb_desc; otg_desc[1] = NULL; reverted: --- linux-oem-5.10-5.10.0/drivers/usb/gadget/udc/aspeed-vhub/hub.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/gadget/udc/aspeed-vhub/hub.c @@ -999,10 +999,8 @@ str_array[offset].s = NULL; ret = ast_vhub_str_alloc_add(vhub, &lang_str); + if (ret) - if (ret) { - of_node_put(child); break; - } } return ret; reverted: --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-mtk-sch.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/host/xhci-mtk-sch.c @@ -200,8 +200,6 @@ sch_ep->sch_tt = tt; sch_ep->ep = ep; - INIT_LIST_HEAD(&sch_ep->endpoint); - INIT_LIST_HEAD(&sch_ep->tt_endpoint); return sch_ep; } @@ -375,7 +373,6 @@ sch_ep->bw_budget_table[j]; } } - sch_ep->allocated = used; } static int check_sch_tt(struct usb_device *udev, @@ -544,22 +541,6 @@ return 0; } -static void destroy_sch_ep(struct usb_device *udev, - struct mu3h_sch_bw_info *sch_bw, struct mu3h_sch_ep_info *sch_ep) -{ - /* only release ep bw check passed by check_sch_bw() */ - if (sch_ep->allocated) - update_bus_bw(sch_bw, sch_ep, 0); - - list_del(&sch_ep->endpoint); - - if (sch_ep->sch_tt) { - list_del(&sch_ep->tt_endpoint); - drop_tt(udev); - } - kfree(sch_ep); -} - static bool need_bw_sch(struct usb_host_endpoint *ep, enum usb_device_speed speed, int has_tt) { @@ -602,8 +583,6 @@ mtk->sch_array = sch_array; - INIT_LIST_HEAD(&mtk->bw_ep_chk_list); - return 0; } EXPORT_SYMBOL_GPL(xhci_mtk_sch_init); @@ -622,14 +601,19 @@ struct xhci_ep_ctx *ep_ctx; struct xhci_slot_ctx *slot_ctx; struct xhci_virt_device *virt_dev; + struct mu3h_sch_bw_info *sch_bw; struct mu3h_sch_ep_info *sch_ep; + struct mu3h_sch_bw_info *sch_array; unsigned int ep_index; + int bw_index; + int ret = 0; xhci = hcd_to_xhci(hcd); virt_dev = xhci->devs[udev->slot_id]; ep_index = xhci_get_endpoint_index(&ep->desc); slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); + sch_array = mtk->sch_array; xhci_dbg(xhci, "%s() type:%d, speed:%d, mpkt:%d, dir:%d, ep:%p\n", __func__, usb_endpoint_type(&ep->desc), udev->speed, @@ -648,13 +632,35 @@ return 0; } + bw_index = get_bw_index(xhci, udev, ep); + sch_bw = &sch_array[bw_index]; + sch_ep = create_sch_ep(udev, ep, ep_ctx); if (IS_ERR_OR_NULL(sch_ep)) return -ENOMEM; setup_sch_info(udev, ep_ctx, sch_ep); + ret = check_sch_bw(udev, sch_bw, sch_ep); + if (ret) { + xhci_err(xhci, "Not enough bandwidth!\n"); + if (is_fs_or_ls(udev->speed)) + drop_tt(udev); + + kfree(sch_ep); + return -ENOSPC; + } + + list_add_tail(&sch_ep->endpoint, &sch_bw->bw_ep_list); + + ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(sch_ep->pkts) + | EP_BCSCOUNT(sch_ep->cs_count) | EP_BBM(sch_ep->burst_mode)); + ep_ctx->reserved[1] |= cpu_to_le32(EP_BOFFSET(sch_ep->offset) + | EP_BREPEAT(sch_ep->repeat)); + + xhci_dbg(xhci, " PKTS:%x, CSCOUNT:%x, BM:%x, OFFSET:%x, REPEAT:%x\n", + sch_ep->pkts, sch_ep->cs_count, sch_ep->burst_mode, + sch_ep->offset, sch_ep->repeat); - list_add_tail(&sch_ep->endpoint, &mtk->bw_ep_chk_list); return 0; } @@ -669,7 +675,7 @@ struct xhci_virt_device *virt_dev; struct mu3h_sch_bw_info *sch_array; struct mu3h_sch_bw_info *sch_bw; + struct mu3h_sch_ep_info *sch_ep; - struct mu3h_sch_ep_info *sch_ep, *tmp; int bw_index; xhci = hcd_to_xhci(hcd); @@ -688,79 +694,17 @@ bw_index = get_bw_index(xhci, udev, ep); sch_bw = &sch_array[bw_index]; + list_for_each_entry(sch_ep, &sch_bw->bw_ep_list, endpoint) { - list_for_each_entry_safe(sch_ep, tmp, &sch_bw->bw_ep_list, endpoint) { if (sch_ep->ep == ep) { + update_bus_bw(sch_bw, sch_ep, 0); + list_del(&sch_ep->endpoint); + if (is_fs_or_ls(udev->speed)) { + list_del(&sch_ep->tt_endpoint); + drop_tt(udev); + } + kfree(sch_ep); - destroy_sch_ep(udev, sch_bw, sch_ep); break; } } } EXPORT_SYMBOL_GPL(xhci_mtk_drop_ep_quirk); - -int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) -{ - struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); - struct xhci_hcd *xhci = hcd_to_xhci(hcd); - struct xhci_virt_device *virt_dev = xhci->devs[udev->slot_id]; - struct mu3h_sch_bw_info *sch_bw; - struct mu3h_sch_ep_info *sch_ep, *tmp; - int bw_index, ret; - - xhci_dbg(xhci, "%s() udev %s\n", __func__, dev_name(&udev->dev)); - - list_for_each_entry(sch_ep, &mtk->bw_ep_chk_list, endpoint) { - bw_index = get_bw_index(xhci, udev, sch_ep->ep); - sch_bw = &mtk->sch_array[bw_index]; - - ret = check_sch_bw(udev, sch_bw, sch_ep); - if (ret) { - xhci_err(xhci, "Not enough bandwidth!\n"); - return -ENOSPC; - } - } - - list_for_each_entry_safe(sch_ep, tmp, &mtk->bw_ep_chk_list, endpoint) { - struct xhci_ep_ctx *ep_ctx; - struct usb_host_endpoint *ep = sch_ep->ep; - unsigned int ep_index = xhci_get_endpoint_index(&ep->desc); - - bw_index = get_bw_index(xhci, udev, ep); - sch_bw = &mtk->sch_array[bw_index]; - - list_move_tail(&sch_ep->endpoint, &sch_bw->bw_ep_list); - - ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); - ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(sch_ep->pkts) - | EP_BCSCOUNT(sch_ep->cs_count) - | EP_BBM(sch_ep->burst_mode)); - ep_ctx->reserved[1] |= cpu_to_le32(EP_BOFFSET(sch_ep->offset) - | EP_BREPEAT(sch_ep->repeat)); - - xhci_dbg(xhci, " PKTS:%x, CSCOUNT:%x, BM:%x, OFFSET:%x, REPEAT:%x\n", - sch_ep->pkts, sch_ep->cs_count, sch_ep->burst_mode, - sch_ep->offset, sch_ep->repeat); - } - - return xhci_check_bandwidth(hcd, udev); -} -EXPORT_SYMBOL_GPL(xhci_mtk_check_bandwidth); - -void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) -{ - struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); - struct xhci_hcd *xhci = hcd_to_xhci(hcd); - struct mu3h_sch_bw_info *sch_bw; - struct mu3h_sch_ep_info *sch_ep, *tmp; - int bw_index; - - xhci_dbg(xhci, "%s() udev %s\n", __func__, dev_name(&udev->dev)); - - list_for_each_entry_safe(sch_ep, tmp, &mtk->bw_ep_chk_list, endpoint) { - bw_index = get_bw_index(xhci, udev, sch_ep->ep); - sch_bw = &mtk->sch_array[bw_index]; - destroy_sch_ep(udev, sch_bw, sch_ep); - } - - xhci_reset_bandwidth(hcd, udev); -} -EXPORT_SYMBOL_GPL(xhci_mtk_reset_bandwidth); reverted: --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-mtk.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/host/xhci-mtk.c @@ -347,8 +347,6 @@ static int xhci_mtk_setup(struct usb_hcd *hcd); static const struct xhci_driver_overrides xhci_mtk_overrides __initconst = { .reset = xhci_mtk_setup, - .check_bandwidth = xhci_mtk_check_bandwidth, - .reset_bandwidth = xhci_mtk_reset_bandwidth, }; static struct hc_driver __read_mostly xhci_mtk_hc_driver; reverted: --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-mtk.h +++ linux-oem-5.10-5.10.0.orig/drivers/usb/host/xhci-mtk.h @@ -59,7 +59,6 @@ * @ep_type: endpoint type * @maxpkt: max packet size of endpoint * @ep: address of usb_host_endpoint struct - * @allocated: the bandwidth is aready allocated from bus_bw * @offset: which uframe of the interval that transfer should be * scheduled first time within the interval * @repeat: the time gap between two uframes that transfers are @@ -87,7 +86,6 @@ u32 ep_type; u32 maxpkt; void *ep; - bool allocated; /* * mtk xHCI scheduling information put into reserved DWs * in ep context @@ -133,7 +131,6 @@ struct device *dev; struct usb_hcd *hcd; struct mu3h_sch_bw_info *sch_array; - struct list_head bw_ep_chk_list; struct mu3c_ippc_regs __iomem *ippc_regs; bool has_ippc; int num_u2_ports; @@ -169,8 +166,6 @@ struct usb_host_endpoint *ep); void xhci_mtk_drop_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); -int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); -void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); #else static inline int xhci_mtk_add_ep_quirk(struct usb_hcd *hcd, @@ -184,16 +179,6 @@ { } -static inline int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, - struct usb_device *udev) -{ - return 0; -} - -static inline void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, - struct usb_device *udev) -{ -} #endif #endif /* _XHCI_MTK_H_ */ reverted: --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-mvebu.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/host/xhci-mvebu.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -74,47 +73,6 @@ return 0; } - -int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd) -{ - struct xhci_hcd *xhci = hcd_to_xhci(hcd); - struct device *dev = hcd->self.controller; - struct phy *phy; - int ret; - - /* Old bindings miss the PHY handle */ - phy = of_phy_get(dev->of_node, "usb3-phy"); - if (IS_ERR(phy) && PTR_ERR(phy) == -EPROBE_DEFER) - return -EPROBE_DEFER; - else if (IS_ERR(phy)) - goto phy_out; - - ret = phy_init(phy); - if (ret) - goto phy_put; - - ret = phy_set_mode(phy, PHY_MODE_USB_HOST_SS); - if (ret) - goto phy_exit; - - ret = phy_power_on(phy); - if (ret == -EOPNOTSUPP) { - /* Skip initializatin of XHCI PHY when it is unsupported by firmware */ - dev_warn(dev, "PHY unsupported by firmware\n"); - xhci->quirks |= XHCI_SKIP_PHY_INIT; - } - if (ret) - goto phy_exit; - - phy_power_off(phy); -phy_exit: - phy_exit(phy); -phy_put: - of_phy_put(phy); -phy_out: - - return 0; -} int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd) { reverted: --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-mvebu.h +++ linux-oem-5.10-5.10.0.orig/drivers/usb/host/xhci-mvebu.h @@ -12,18 +12,12 @@ #if IS_ENABLED(CONFIG_USB_XHCI_MVEBU) int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd); -int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd); int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd); #else static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd) { return 0; } - -static inline int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd) -{ - return 0; -} static inline int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd) { diff -u linux-oem-5.10-5.10.0/drivers/usb/host/xhci-plat.c linux-oem-5.10-5.10.0/drivers/usb/host/xhci-plat.c --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-plat.c +++ linux-oem-5.10-5.10.0/drivers/usb/host/xhci-plat.c @@ -44,16 +44,6 @@ priv->plat_start(hcd); } -static int xhci_priv_plat_setup(struct usb_hcd *hcd) -{ - struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); - - if (!priv->plat_setup) - return 0; - - return priv->plat_setup(hcd); -} - static int xhci_priv_init_quirk(struct usb_hcd *hcd) { struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); @@ -121,7 +111,6 @@ }; static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = { - .plat_setup = xhci_mvebu_a3700_plat_setup, .init_quirk = xhci_mvebu_a3700_init_quirk, }; @@ -341,14 +330,7 @@ hcd->tpl_support = of_usb_host_tpl_support(sysdev->of_node); xhci->shared_hcd->tpl_support = hcd->tpl_support; - - if (priv) { - ret = xhci_priv_plat_setup(hcd); - if (ret) - goto disable_usb_phy; - } - - if ((xhci->quirks & XHCI_SKIP_PHY_INIT) || (priv && (priv->quirks & XHCI_SKIP_PHY_INIT))) + if (priv && (priv->quirks & XHCI_SKIP_PHY_INIT)) hcd->skip_phy_initialization = 1; if (priv && (priv->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK)) reverted: --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-plat.h +++ linux-oem-5.10-5.10.0.orig/drivers/usb/host/xhci-plat.h @@ -13,7 +13,6 @@ struct xhci_plat_priv { const char *firmware_name; unsigned long long quirks; - int (*plat_setup)(struct usb_hcd *); void (*plat_start)(struct usb_hcd *); int (*init_quirk)(struct usb_hcd *); int (*suspend_quirk)(struct usb_hcd *); diff -u linux-oem-5.10-5.10.0/drivers/usb/host/xhci-ring.c linux-oem-5.10-5.10.0/drivers/usb/host/xhci-ring.c --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci-ring.c +++ linux-oem-5.10-5.10.0/drivers/usb/host/xhci-ring.c @@ -699,16 +699,11 @@ dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len, DMA_FROM_DEVICE); /* for in tranfers we need to copy the data from bounce to sg */ - if (urb->num_sgs) { - len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf, - seg->bounce_len, seg->bounce_offs); - if (len != seg->bounce_len) - xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n", - len, seg->bounce_len); - } else { - memcpy(urb->transfer_buffer + seg->bounce_offs, seg->bounce_buf, - seg->bounce_len); - } + len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf, + seg->bounce_len, seg->bounce_offs); + if (len != seg->bounce_len) + xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n", + len, seg->bounce_len); seg->bounce_len = 0; seg->bounce_offs = 0; } @@ -3280,16 +3275,12 @@ /* create a max max_pkt sized bounce buffer pointed to by last trb */ if (usb_urb_dir_out(urb)) { - if (urb->num_sgs) { - len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs, - seg->bounce_buf, new_buff_len, enqd_len); - if (len != new_buff_len) - xhci_warn(xhci, "WARN Wrong bounce buffer write length: %zu != %d\n", - len, new_buff_len); - } else { - memcpy(seg->bounce_buf, urb->transfer_buffer + enqd_len, new_buff_len); - } - + len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs, + seg->bounce_buf, new_buff_len, enqd_len); + if (len != new_buff_len) + xhci_warn(xhci, + "WARN Wrong bounce buffer write length: %zu != %d\n", + len, new_buff_len); seg->bounce_dma = dma_map_single(dev, seg->bounce_buf, max_pkt, DMA_TO_DEVICE); } else { diff -u linux-oem-5.10-5.10.0/drivers/usb/host/xhci.c linux-oem-5.10-5.10.0/drivers/usb/host/xhci.c --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci.c +++ linux-oem-5.10-5.10.0/drivers/usb/host/xhci.c @@ -2861,7 +2861,7 @@ * else should be touching the xhci->devs[slot_id] structure, so we * don't need to take the xhci->lock for manipulating that. */ -int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) +static int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) { int i; int ret = 0; @@ -2959,7 +2959,7 @@ return ret; } -void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) +static void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) { struct xhci_hcd *xhci; struct xhci_virt_device *virt_dev; @@ -5385,10 +5385,6 @@ drv->reset = over->reset; if (over->start) drv->start = over->start; - if (over->check_bandwidth) - drv->check_bandwidth = over->check_bandwidth; - if (over->reset_bandwidth) - drv->reset_bandwidth = over->reset_bandwidth; } } EXPORT_SYMBOL_GPL(xhci_init_driver); diff -u linux-oem-5.10-5.10.0/drivers/usb/host/xhci.h linux-oem-5.10-5.10.0/drivers/usb/host/xhci.h --- linux-oem-5.10-5.10.0/drivers/usb/host/xhci.h +++ linux-oem-5.10-5.10.0/drivers/usb/host/xhci.h @@ -1916,8 +1916,6 @@ size_t extra_priv_size; int (*reset)(struct usb_hcd *hcd); int (*start)(struct usb_hcd *hcd); - int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); - void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); }; #define XHCI_CFC_DELAY 10 @@ -2072,8 +2070,6 @@ void xhci_shutdown(struct usb_hcd *hcd); void xhci_init_driver(struct hc_driver *drv, const struct xhci_driver_overrides *over); -int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); -void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id); int xhci_ext_cap_init(struct xhci_hcd *xhci); reverted: --- linux-oem-5.10-5.10.0/drivers/usb/renesas_usbhs/fifo.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/renesas_usbhs/fifo.c @@ -126,7 +126,6 @@ } usbhs_pipe_clear_without_sequence(pipe, 0, 0); - usbhs_pipe_running(pipe, 0); __usbhsf_pkt_del(pkt); } reverted: --- linux-oem-5.10-5.10.0/drivers/usb/serial/cp210x.c +++ linux-oem-5.10-5.10.0.orig/drivers/usb/serial/cp210x.c @@ -64,7 +64,6 @@ { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ { USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */ - { USB_DEVICE(0x0988, 0x0578) }, /* Teraoka AD2000 */ { USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */ { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */ @@ -205,7 +204,6 @@ { USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */ { USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */ { USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */ - { USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */ { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ diff -u linux-oem-5.10-5.10.0/drivers/usb/serial/option.c linux-oem-5.10-5.10.0/drivers/usb/serial/option.c --- linux-oem-5.10-5.10.0/drivers/usb/serial/option.c +++ linux-oem-5.10-5.10.0/drivers/usb/serial/option.c @@ -425,8 +425,6 @@ #define CINTERION_PRODUCT_AHXX_2RMNET 0x0084 #define CINTERION_PRODUCT_AHXX_AUDIO 0x0085 #define CINTERION_PRODUCT_CLS8 0x00b0 -#define CINTERION_PRODUCT_MV31_MBIM 0x00b3 -#define CINTERION_PRODUCT_MV31_RMNET 0x00b7 /* Olivetti products */ #define OLIVETTI_VENDOR_ID 0x0b3c @@ -1916,10 +1914,6 @@ { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) }, { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */ { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, - { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_MBIM, 0xff), - .driver_info = RSVD(3)}, - { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff), - .driver_info = RSVD(0)}, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), .driver_info = RSVD(4) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120), reverted: --- linux-oem-5.10-5.10.0/drivers/vdpa/mlx5/core/mlx5_vdpa.h +++ linux-oem-5.10-5.10.0.orig/drivers/vdpa/mlx5/core/mlx5_vdpa.h @@ -15,7 +15,6 @@ struct sg_table sg_head; int log_size; int nsg; - int nent; struct list_head list; u64 offset; }; reverted: --- linux-oem-5.10-5.10.0/drivers/vdpa/mlx5/core/mr.c +++ linux-oem-5.10-5.10.0.orig/drivers/vdpa/mlx5/core/mr.c @@ -25,6 +25,17 @@ return (npages + 1) / 2; } +static void fill_sg(struct mlx5_vdpa_direct_mr *mr, void *in) +{ + struct scatterlist *sg; + __be64 *pas; + int i; + + pas = MLX5_ADDR_OF(create_mkey_in, in, klm_pas_mtt); + for_each_sg(mr->sg_head.sgl, sg, mr->nsg, i) + (*pas) = cpu_to_be64(sg_dma_address(sg)); +} + static void mlx5_set_access_mode(void *mkc, int mode) { MLX5_SET(mkc, mkc, access_mode_1_0, mode & 0x3); @@ -34,18 +45,10 @@ static void populate_mtts(struct mlx5_vdpa_direct_mr *mr, __be64 *mtt) { struct scatterlist *sg; - int nsg = mr->nsg; - u64 dma_addr; - u64 dma_len; - int j = 0; int i; + for_each_sg(mr->sg_head.sgl, sg, mr->nsg, i) + mtt[i] = cpu_to_be64(sg_dma_address(sg)); - for_each_sg(mr->sg_head.sgl, sg, mr->nent, i) { - for (dma_addr = sg_dma_address(sg), dma_len = sg_dma_len(sg); - nsg && dma_len; - nsg--, dma_addr += BIT(mr->log_size), dma_len -= BIT(mr->log_size)) - mtt[j++] = cpu_to_be64(dma_addr); - } } static int create_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr) @@ -61,6 +64,7 @@ return -ENOMEM; MLX5_SET(create_mkey_in, in, uid, mvdev->res.uid); + fill_sg(mr, in); mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); MLX5_SET(mkc, mkc, lw, !!(mr->perm & VHOST_MAP_WO)); MLX5_SET(mkc, mkc, lr, !!(mr->perm & VHOST_MAP_RO)); @@ -272,8 +276,8 @@ done: mr->log_size = log_entity_size; mr->nsg = nsg; + err = dma_map_sg_attrs(dma, mr->sg_head.sgl, mr->nsg, DMA_BIDIRECTIONAL, 0); + if (!err) - mr->nent = dma_map_sg_attrs(dma, mr->sg_head.sgl, mr->nsg, DMA_BIDIRECTIONAL, 0); - if (!mr->nent) goto err_map; err = create_direct_mr(mvdev, mr); diff -u linux-oem-5.10-5.10.0/drivers/vdpa/mlx5/net/mlx5_vnet.c linux-oem-5.10-5.10.0/drivers/vdpa/mlx5/net/mlx5_vnet.c --- linux-oem-5.10-5.10.0/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ linux-oem-5.10-5.10.0/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -77,7 +77,6 @@ u64 device_addr; u64 driver_addr; u16 avail_index; - u16 used_index; bool ready; struct vdpa_callback cb; bool restore; @@ -112,7 +111,6 @@ u32 virtq_id; struct mlx5_vdpa_net *ndev; u16 avail_idx; - u16 used_idx; int fw_state; /* keep last in the struct */ @@ -791,7 +789,6 @@ obj_context = MLX5_ADDR_OF(create_virtio_net_q_in, in, obj_context); MLX5_SET(virtio_net_q_object, obj_context, hw_available_index, mvq->avail_idx); - MLX5_SET(virtio_net_q_object, obj_context, hw_used_index, mvq->used_idx); MLX5_SET(virtio_net_q_object, obj_context, queue_feature_bit_mask_12_3, get_features_12_3(ndev->mvdev.actual_features)); vq_ctx = MLX5_ADDR_OF(virtio_net_q_object, obj_context, virtio_q_context); @@ -1010,7 +1007,6 @@ struct mlx5_virtq_attr { u8 state; u16 available_index; - u16 used_index; }; static int query_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq, @@ -1041,7 +1037,6 @@ memset(attr, 0, sizeof(*attr)); attr->state = MLX5_GET(virtio_net_q_object, obj_context, state); attr->available_index = MLX5_GET(virtio_net_q_object, obj_context, hw_available_index); - attr->used_index = MLX5_GET(virtio_net_q_object, obj_context, hw_used_index); kfree(out); return 0; @@ -1525,16 +1520,6 @@ } } -static void clear_virtqueues(struct mlx5_vdpa_net *ndev) -{ - int i; - - for (i = ndev->mvdev.max_vqs - 1; i >= 0; i--) { - ndev->vqs[i].avail_idx = 0; - ndev->vqs[i].used_idx = 0; - } -} - /* TODO: cross-endian support */ static inline bool mlx5_vdpa_is_little_endian(struct mlx5_vdpa_dev *mvdev) { @@ -1610,7 +1595,6 @@ return err; ri->avail_index = attr.available_index; - ri->used_index = attr.used_index; ri->ready = mvq->ready; ri->num_ent = mvq->num_ent; ri->desc_addr = mvq->desc_addr; @@ -1655,7 +1639,6 @@ continue; mvq->avail_idx = ri->avail_index; - mvq->used_idx = ri->used_index; mvq->ready = ri->ready; mvq->num_ent = ri->num_ent; mvq->desc_addr = ri->desc_addr; @@ -1770,7 +1753,6 @@ if (!status) { mlx5_vdpa_info(mvdev, "performing device reset\n"); teardown_driver(ndev); - clear_virtqueues(ndev); mlx5_vdpa_destroy_mr(&ndev->mvdev); ndev->mvdev.status = 0; ndev->mvdev.mlx_features = 0; reverted: --- linux-oem-5.10-5.10.0/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ linux-oem-5.10-5.10.0.orig/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -42,8 +42,6 @@ module_param(macaddr, charp, 0); MODULE_PARM_DESC(macaddr, "Ethernet MAC address"); -u8 macaddr_buf[ETH_ALEN]; - struct vdpasim_virtqueue { struct vringh vring; struct vringh_kiov iov; @@ -69,24 +67,14 @@ (1ULL << VIRTIO_F_ACCESS_PLATFORM) | (1ULL << VIRTIO_NET_F_MAC); -struct vdpasim; - -struct vdpasim_dev_attr { - size_t config_size; - int nvqs; - void (*get_config)(struct vdpasim *vdpasim, void *config); -}; - /* State of each vdpasim device */ struct vdpasim { struct vdpa_device vdpa; + struct vdpasim_virtqueue vqs[VDPASIM_VQ_NUM]; - struct vdpasim_virtqueue *vqs; struct work_struct work; - struct vdpasim_dev_attr dev_attr; /* spinlock to synchronize virtqueue state */ spinlock_t lock; + struct virtio_net_config config; - /* virtio config according to device type */ - void *config; struct vhost_iotlb *iommu; void *buffer; u32 status; @@ -156,7 +144,7 @@ { int i; + for (i = 0; i < VDPASIM_VQ_NUM; i++) - for (i = 0; i < vdpasim->dev_attr.nvqs; i++) vdpasim_vq_reset(&vdpasim->vqs[i]); spin_lock(&vdpasim->iommu_lock); @@ -357,24 +345,22 @@ static const struct vdpa_config_ops vdpasim_net_config_ops; static const struct vdpa_config_ops vdpasim_net_batch_config_ops; +static struct vdpasim *vdpasim_create(void) -static struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *dev_attr) { const struct vdpa_config_ops *ops; struct vdpasim *vdpasim; struct device *dev; + int ret = -ENOMEM; - int i, ret = -ENOMEM; if (batch_mapping) ops = &vdpasim_net_batch_config_ops; else ops = &vdpasim_net_config_ops; + vdpasim = vdpa_alloc_device(struct vdpasim, vdpa, NULL, ops, VDPASIM_VQ_NUM); - vdpasim = vdpa_alloc_device(struct vdpasim, vdpa, NULL, ops, - dev_attr->nvqs); if (!vdpasim) goto err_alloc; - vdpasim->dev_attr = *dev_attr; INIT_WORK(&vdpasim->work, vdpasim_work); spin_lock_init(&vdpasim->lock); spin_lock_init(&vdpasim->iommu_lock); @@ -385,15 +371,6 @@ goto err_iommu; set_dma_ops(dev, &vdpasim_dma_ops); - vdpasim->config = kzalloc(dev_attr->config_size, GFP_KERNEL); - if (!vdpasim->config) - goto err_iommu; - - vdpasim->vqs = kcalloc(dev_attr->nvqs, sizeof(struct vdpasim_virtqueue), - GFP_KERNEL); - if (!vdpasim->vqs) - goto err_iommu; - vdpasim->iommu = vhost_iotlb_alloc(2048, 0); if (!vdpasim->iommu) goto err_iommu; @@ -403,17 +380,17 @@ goto err_iommu; if (macaddr) { + mac_pton(macaddr, vdpasim->config.mac); + if (!is_valid_ether_addr(vdpasim->config.mac)) { - mac_pton(macaddr, macaddr_buf); - if (!is_valid_ether_addr(macaddr_buf)) { ret = -EADDRNOTAVAIL; goto err_iommu; } } else { + eth_random_addr(vdpasim->config.mac); - eth_random_addr(macaddr_buf); } + vringh_set_iotlb(&vdpasim->vqs[0].vring, vdpasim->iommu); + vringh_set_iotlb(&vdpasim->vqs[1].vring, vdpasim->iommu); - for (i = 0; i < dev_attr->nvqs; i++) - vringh_set_iotlb(&vdpasim->vqs[i].vring, vdpasim->iommu); vdpasim->vdpa.dma_dev = dev; ret = vdpa_register_device(&vdpasim->vdpa); @@ -527,6 +504,7 @@ static int vdpasim_set_features(struct vdpa_device *vdpa, u64 features) { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + struct virtio_net_config *config = &vdpasim->config; /* DMA mapping must be done by driver */ if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) @@ -534,6 +512,14 @@ vdpasim->features = features & vdpasim_features; + /* We generally only know whether guest is using the legacy interface + * here, so generally that's the earliest we can set config fields. + * Note: We actually require VIRTIO_F_ACCESS_PLATFORM above which + * implies VIRTIO_F_VERSION_1, but let's not try to be clever here. + */ + + config->mtu = cpu_to_vdpasim16(vdpasim, 1500); + config->status = cpu_to_vdpasim16(vdpasim, VIRTIO_NET_S_LINK_UP); return 0; } @@ -586,13 +572,8 @@ { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + if (offset + len < sizeof(struct virtio_net_config)) + memcpy(buf, (u8 *)&vdpasim->config + offset, len); - if (offset + len > vdpasim->dev_attr.config_size) - return; - - if (vdpasim->dev_attr.get_config) - vdpasim->dev_attr.get_config(vdpasim, vdpasim->config); - - memcpy(buf, vdpasim->config + offset, len); } static void vdpasim_set_config(struct vdpa_device *vdpa, unsigned int offset, @@ -678,8 +659,6 @@ kfree(vdpasim->buffer); if (vdpasim->iommu) vhost_iotlb_free(vdpasim->iommu); - kfree(vdpasim->vqs); - kfree(vdpasim->config); } static const struct vdpa_config_ops vdpasim_net_config_ops = { @@ -735,25 +714,9 @@ .free = vdpasim_free, }; -static void vdpasim_net_get_config(struct vdpasim *vdpasim, void *config) -{ - struct virtio_net_config *net_config = - (struct virtio_net_config *)config; - - net_config->mtu = cpu_to_vdpasim16(vdpasim, 1500); - net_config->status = cpu_to_vdpasim16(vdpasim, VIRTIO_NET_S_LINK_UP); - memcpy(net_config->mac, macaddr_buf, ETH_ALEN); -} - static int __init vdpasim_dev_init(void) { + vdpasim_dev = vdpasim_create(); - struct vdpasim_dev_attr dev_attr = {}; - - dev_attr.nvqs = VDPASIM_VQ_NUM; - dev_attr.config_size = sizeof(struct virtio_net_config); - dev_attr.get_config = vdpasim_net_get_config; - - vdpasim_dev = vdpasim_create(&dev_attr); if (!IS_ERR(vdpasim_dev)) return 0; reverted: --- linux-oem-5.10-5.10.0/drivers/video/fbdev/efifb.c +++ linux-oem-5.10-5.10.0.orig/drivers/video/fbdev/efifb.c @@ -16,7 +16,6 @@ #include #include #include -#include #include