···19871987D: netfilter: raw table19881988D: netfilter: iprange match19891989D: netfilter: new logging interfaces19901990+D: netfilter: ipset19901991D: netfilter: various other hacks19911992S: Tata19921993S: Hungary
+1-1
Documentation/admin-guide/blockdev/zoned_loop.rst
···134134135135 $ modprobe zloop136136 $ mkdir -p /var/local/zloop/0137137- $ echo "add capacity_mb=2048,zone_size_mb=64,zone_capacity=63MB" > /dev/zloop-control137137+ $ echo "add capacity_mb=2048,zone_size_mb=64,zone_capacity_mb=63" > /dev/zloop-control138138139139For the device created (/dev/zloop0), the zone backing files are all created140140under the default base directory (/var/local/zloop)::
+8
Documentation/arch/riscv/hwprobe.rst
···281281 * :c:macro:`RISCV_HWPROBE_EXT_ZICBOP`: The Zicbop extension is supported, as282282 ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.283283284284+ * :c:macro:`RISCV_HWPROBE_EXT_ZILSD`: The Zilsd extension is supported as285285+ defined in the RISC-V ISA manual starting from commit f88abf1 ("Integrating286286+ load/store pair for RV32 with the main manual") of the riscv-isa-manual.287287+288288+ * :c:macro:`RISCV_HWPROBE_EXT_ZCLSD`: The Zclsd extension is supported as289289+ defined in the RISC-V ISA manual starting from commit f88abf1 ("Integrating290290+ load/store pair for RV32 with the main manual") of the riscv-isa-manual.291291+284292* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: Deprecated. Returns similar values to285293 :c:macro:`RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF`, but the key was286294 mistakenly classified as a bitmask rather than a value.
+96-96
Documentation/arch/x86/boot.rst
···9595The traditional memory map for the kernel loader, used for Image or9696zImage kernels, typically looks like::97979898- | |9898+ | |9999 0A0000 +------------------------+100100- | Reserved for BIOS | Do not use. Reserved for BIOS EBDA.100100+ | Reserved for BIOS | Do not use. Reserved for BIOS EBDA.101101 09A000 +------------------------+102102- | Command line |103103- | Stack/heap | For use by the kernel real-mode code.102102+ | Command line |103103+ | Stack/heap | For use by the kernel real-mode code.104104 098000 +------------------------+105105- | Kernel setup | The kernel real-mode code.105105+ | Kernel setup | The kernel real-mode code.106106 090200 +------------------------+107107- | Kernel boot sector | The kernel legacy boot sector.107107+ | Kernel boot sector | The kernel legacy boot sector.108108 090000 +------------------------+109109- | Protected-mode kernel | The bulk of the kernel image.109109+ | Protected-mode kernel | The bulk of the kernel image.110110 010000 +------------------------+111111- | Boot loader | <- Boot sector entry point 0000:7C00111111+ | Boot loader | <- Boot sector entry point 0000:7C00112112 001000 +------------------------+113113- | Reserved for MBR/BIOS |113113+ | Reserved for MBR/BIOS |114114 000800 +------------------------+115115- | Typically used by MBR |115115+ | Typically used by MBR |116116 000600 +------------------------+117117- | BIOS use only |117117+ | BIOS use only |118118 000000 +------------------------+119119120120When using bzImage, the protected-mode kernel was relocated to···142142For a modern bzImage kernel with boot protocol version >= 2.02, a143143memory layout like the following is suggested::144144145145- ~ ~146146- | Protected-mode kernel |145145+ ~ ~146146+ | Protected-mode kernel |147147 100000 +------------------------+148148- | I/O memory hole |148148+ | I/O memory hole |149149 0A0000 +------------------------+150150- | Reserved for BIOS | Leave as much as possible unused151151- ~ ~152152- | Command line | (Can also be below the X+10000 mark)150150+ | Reserved for BIOS | Leave as much as possible unused151151+ ~ ~152152+ | Command line | (Can also be below the X+10000 mark)153153 X+10000 +------------------------+154154- | Stack/heap | For use by the kernel real-mode code.154154+ | Stack/heap | For use by the kernel real-mode code.155155 X+08000 +------------------------+156156- | Kernel setup | The kernel real-mode code.157157- | Kernel boot sector | The kernel legacy boot sector.156156+ | Kernel setup | The kernel real-mode code.157157+ | Kernel boot sector | The kernel legacy boot sector.158158 X +------------------------+159159- | Boot loader | <- Boot sector entry point 0000:7C00159159+ | Boot loader | <- Boot sector entry point 0000:7C00160160 001000 +------------------------+161161- | Reserved for MBR/BIOS |161161+ | Reserved for MBR/BIOS |162162 000800 +------------------------+163163- | Typically used by MBR |163163+ | Typically used by MBR |164164 000600 +------------------------+165165- | BIOS use only |165165+ | BIOS use only |166166 000000 +------------------------+167167168168 ... where the address X is as low as the design of the boot loader permits.···433433434434 Assigned boot loader IDs:435435436436- == =======================================436436+ ==== =======================================437437 0x0 LILO438438 (0x00 reserved for pre-2.00 bootloader)439439 0x1 Loadlin···456456 <http://sebastian-plotz.blogspot.de>457457 0x12 OVMF UEFI virtualization stack458458 0x13 barebox459459- == =======================================459459+ ==== =======================================460460461461 Please contact <hpa@zytor.com> if you need a bootloader ID value assigned.462462···809809 as follow::810810811811 struct setup_data {812812- __u64 next;813813- __u32 type;814814- __u32 len;815815- __u8 data[];812812+ __u64 next;813813+ __u32 type;814814+ __u32 len;815815+ __u8 data[];816816 }817817-817817+818818 Where, the next is a 64-bit physical pointer to the next node of819819 linked list, the next field of the last node is 0; the type is used820820 to identify the contents of data; the len is the length of data···835835 protocol 2.15::836836837837 struct setup_indirect {838838- __u32 type;839839- __u32 reserved; /* Reserved, must be set to zero. */840840- __u64 len;841841- __u64 addr;838838+ __u32 type;839839+ __u32 reserved; /* Reserved, must be set to zero. */840840+ __u64 len;841841+ __u64 addr;842842 };843843844844 The type member is a SETUP_INDIRECT | SETUP_* type. However, it cannot be···850850 In this case setup_data and setup_indirect will look like this::851851852852 struct setup_data {853853- .next = 0, /* or <addr_of_next_setup_data_struct> */854854- .type = SETUP_INDIRECT,855855- .len = sizeof(setup_indirect),856856- .data[sizeof(setup_indirect)] = (struct setup_indirect) {857857- .type = SETUP_INDIRECT | SETUP_E820_EXT,858858- .reserved = 0,859859- .len = <len_of_SETUP_E820_EXT_data>,860860- .addr = <addr_of_SETUP_E820_EXT_data>,861861- },853853+ .next = 0, /* or <addr_of_next_setup_data_struct> */854854+ .type = SETUP_INDIRECT,855855+ .len = sizeof(setup_indirect),856856+ .data[sizeof(setup_indirect)] = (struct setup_indirect) {857857+ .type = SETUP_INDIRECT | SETUP_E820_EXT,858858+ .reserved = 0,859859+ .len = <len_of_SETUP_E820_EXT_data>,860860+ .addr = <addr_of_SETUP_E820_EXT_data>,861861+ },862862 }863863864864.. note::···897897 The kernel runtime start address is determined by the following algorithm::898898899899 if (relocatable_kernel) {900900- if (load_address < pref_address)901901- load_address = pref_address;902902- runtime_start = align_up(load_address, kernel_alignment);900900+ if (load_address < pref_address)901901+ load_address = pref_address;902902+ runtime_start = align_up(load_address, kernel_alignment);903903 } else {904904- runtime_start = pref_address;904904+ runtime_start = pref_address;905905 }906906907907Hence the necessary memory window location and size can be estimated by···975975be prefixed with header/magic and its size, e.g.::976976977977 kernel_info:978978- .ascii "LToP" /* Header, Linux top (structure). */979979- .long kernel_info_var_len_data - kernel_info980980- .long kernel_info_end - kernel_info981981- .long 0x01234567 /* Some fixed size data for the bootloaders. */978978+ .ascii "LToP" /* Header, Linux top (structure). */979979+ .long kernel_info_var_len_data - kernel_info980980+ .long kernel_info_end - kernel_info981981+ .long 0x01234567 /* Some fixed size data for the bootloaders. */982982 kernel_info_var_len_data:983983 example_struct: /* Some variable size data for the bootloaders. */984984- .ascii "0123" /* Header/Magic. */985985- .long example_struct_end - example_struct986986- .ascii "Struct"987987- .long 0x89012345984984+ .ascii "0123" /* Header/Magic. */985985+ .long example_struct_end - example_struct986986+ .ascii "Struct"987987+ .long 0x89012345988988 example_struct_end:989989 example_strings: /* Some variable size data for the bootloaders. */990990- .ascii "ABCD" /* Header/Magic. */991991- .long example_strings_end - example_strings992992- .asciz "String_0"993993- .asciz "String_1"990990+ .ascii "ABCD" /* Header/Magic. */991991+ .long example_strings_end - example_strings992992+ .asciz "String_0"993993+ .asciz "String_1"994994 example_strings_end:995995 kernel_info_end:996996···11321132 unsigned long base_ptr; /* base address for real-mode segment */1133113311341134 if (setup_sects == 0)11351135- setup_sects = 4;11351135+ setup_sects = 4;1136113611371137 if (protocol >= 0x0200) {11381138- type_of_loader = <type code>;11391139- if (loading_initrd) {11401140- ramdisk_image = <initrd_address>;11411141- ramdisk_size = <initrd_size>;11421142- }11381138+ type_of_loader = <type code>;11391139+ if (loading_initrd) {11401140+ ramdisk_image = <initrd_address>;11411141+ ramdisk_size = <initrd_size>;11421142+ }1143114311441144- if (protocol >= 0x0202 && loadflags & 0x01)11451145- heap_end = 0xe000;11461146- else11471147- heap_end = 0x9800;11441144+ if (protocol >= 0x0202 && loadflags & 0x01)11451145+ heap_end = 0xe000;11461146+ else11471147+ heap_end = 0x9800;1148114811491149- if (protocol >= 0x0201) {11501150- heap_end_ptr = heap_end - 0x200;11511151- loadflags |= 0x80; /* CAN_USE_HEAP */11521152- }11491149+ if (protocol >= 0x0201) {11501150+ heap_end_ptr = heap_end - 0x200;11511151+ loadflags |= 0x80; /* CAN_USE_HEAP */11521152+ }1153115311541154- if (protocol >= 0x0202) {11551155- cmd_line_ptr = base_ptr + heap_end;11561156- strcpy(cmd_line_ptr, cmdline);11571157- } else {11581158- cmd_line_magic = 0xA33F;11591159- cmd_line_offset = heap_end;11601160- setup_move_size = heap_end + strlen(cmdline) + 1;11611161- strcpy(base_ptr + cmd_line_offset, cmdline);11621162- }11541154+ if (protocol >= 0x0202) {11551155+ cmd_line_ptr = base_ptr + heap_end;11561156+ strcpy(cmd_line_ptr, cmdline);11571157+ } else {11581158+ cmd_line_magic = 0xA33F;11591159+ cmd_line_offset = heap_end;11601160+ setup_move_size = heap_end + strlen(cmdline) + 1;11611161+ strcpy(base_ptr + cmd_line_offset, cmdline);11621162+ }11631163 } else {11641164- /* Very old kernel */11641164+ /* Very old kernel */1165116511661166- heap_end = 0x9800;11661166+ heap_end = 0x9800;1167116711681168- cmd_line_magic = 0xA33F;11691169- cmd_line_offset = heap_end;11681168+ cmd_line_magic = 0xA33F;11691169+ cmd_line_offset = heap_end;1170117011711171- /* A very old kernel MUST have its real-mode code loaded at 0x90000 */11721172- if (base_ptr != 0x90000) {11731173- /* Copy the real-mode kernel */11741174- memcpy(0x90000, base_ptr, (setup_sects + 1) * 512);11751175- base_ptr = 0x90000; /* Relocated */11761176- }11711171+ /* A very old kernel MUST have its real-mode code loaded at 0x90000 */11721172+ if (base_ptr != 0x90000) {11731173+ /* Copy the real-mode kernel */11741174+ memcpy(0x90000, base_ptr, (setup_sects + 1) * 512);11751175+ base_ptr = 0x90000; /* Relocated */11761176+ }1177117711781178- strcpy(0x90000 + cmd_line_offset, cmdline);11781178+ strcpy(0x90000 + cmd_line_offset, cmdline);1179117911801180- /* It is recommended to clear memory up to the 32K mark */11811181- memset(0x90000 + (setup_sects + 1) * 512, 0, (64 - (setup_sects + 1)) * 512);11801180+ /* It is recommended to clear memory up to the 32K mark */11811181+ memset(0x90000 + (setup_sects + 1) * 512, 0, (64 - (setup_sects + 1)) * 512);11821182 }1183118311841184
···77title: ARM Integrator Boards8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |+1313 These were the first ARM platforms officially supported by ARM Ltd.
···77title: ARM RealView Boards8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |+1313 The ARM RealView series of reference designs were built to explore the Arm11,
···77title: ARM Snoop Control Unit (SCU)8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 As part of the MPCore complex, Cortex-A5 and Cortex-A9 are provided
···77title: Arm Versatile system registers8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 This is a system control registers block, providing multiple low level
···77title: ARM Versatile Boards8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |+1313 The ARM Versatile boards are two variants of ARM926EJ-S evaluation boards
···8899maintainers:1010 - Sudeep Holla <sudeep.holla@arm.com>1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: |+1414 ARM's Versatile Express platform were built as reference designs for exploring
+1-1
Documentation/devicetree/bindings/arm/gemini.yaml
···2020 Many of the IP blocks used in the SoC comes from Faraday Technology.21212222maintainers:2323- - Linus Walleij <linus.walleij@linaro.org>2323+ - Linus Walleij <linusw@kernel.org>24242525properties:2626 $nodename:
···77title: Cortina Systems Gemini SATA Bridge8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
···77title: Faraday Technology FTIDE010 PATA controller8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This controller is the first Faraday IDE interface block, used in the
···77title: Common Properties for Parallel AT attachment (PATA) controllers8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This document defines device tree properties common to most Parallel
···77title: Common Properties for Serial AT attachment (SATA) controllers8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This document defines device tree properties common to most Serial
···8899maintainers:1010 - Ulf Hansson <ulf.hansson@linaro.org>1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: While named "U8500 clocks" these clocks are inside the1414 DB8500 digital baseband system-on-chip and its siblings such as
···88title: Intel IXP4xx cryptographic engine991010maintainers:1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: |1414 The Intel IXP4xx cryptographic engine makes use of the IXP4xx NPE
···77title: Common Properties for DSI Display Panels8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This document defines device tree properties common to DSI, Display
···77title: ARM Versatile TFT Panels8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 These panels are connected to the daughterboards found on the
···77title: Ilitek ILI9322 TFT panel driver with SPI control bus8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This is a driver for 320x240 TFT panels, accepting a variety of input
···1010 named DB7430 with a separate backlight controller.11111212maintainers:1313- - Linus Walleij <linus.walleij@linaro.org>1313+ - Linus Walleij <linusw@kernel.org>14141515allOf:1616 - $ref: panel-common.yaml#
···77title: Fairchild Semiconductor FSA880, FSA9480 and compatibles8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 The FSA880 and FSA9480 are USB port accessory detectors and switches.
···88title: Intel IXP4xx Network Processing Engine991010maintainers:1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: |1414 On the IXP4xx SoCs, the Network Processing Engine (NPE) is a small
···8899maintainers:1010 - Johan Hovold <johan@kernel.org>1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description:1414 Broadcom GPS chips can be used over the UART or I2C bus. The UART
···8899maintainers:1010 - Bartosz Golaszewski <brgl@bgdev.pl>1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description:1414 Pay attention to using proper GPIO flag (e.g. GPIO_ACTIVE_LOW) for the GPIOs
···2222 and this can be enabled by a special flag.23232424maintainers:2525- - Linus Walleij <linus.walleij@linaro.org>2525+ - Linus Walleij <linusw@kernel.org>26262727properties:2828 compatible:
···77title: ARM PL061 GPIO controller8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>1111 - Rob Herring <robh@kernel.org>12121313# We need a select here so we don't match all nodes with 'arm,primecell'
···66title: NTC thermistor temperature sensors7788maintainers:99- - Linus Walleij <linus.walleij@linaro.org>99+ - Linus Walleij <linusw@kernel.org>10101111description: |1212 Thermistors with negative temperature coefficient (NTC) are resistors that
···1212 DB8500 after the merge of these two companies wireless divisions.13131414maintainers:1515- - Linus Walleij <linus.walleij@linaro.org>1515+ - Linus Walleij <linusw@kernel.org>16161717# Need a custom select here or 'arm,primecell' will match on lots of nodes1818select:
···77title: Sharp GP2AP002A00F and GP2AP002S00F proximity and ambient light sensors8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 Proximity and ambient light sensor with IR LED for the proximity
···77title: Yamaha YAS530 family of magnetometer sensors8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 The Yamaha YAS530 magnetometers is a line of 3-axis magnetometers
···8899maintainers:1010 - Nick Dyer <nick@shmanahar.org>1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: |1414 Atmel maXTouch touchscreen or touchpads such as the mXT244
···77title: ARM Versatile FPGA IRQ Controller8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 One or more FPGA IRQ controllers can be synthesized in an ARM reference board
···66title: Faraday Technology FTINTC010 interrupt controller7788maintainers:99- - Linus Walleij <linus.walleij@linaro.org>99+ - Linus Walleij <linusw@kernel.org>10101111description:1212 This interrupt controller is a stock IP block from Faraday Technology found
···77title: Kinetic Technologies KTD253 and KTD259 one-wire backlight8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 The Kinetic Technologies KTD253 and KTD259 are white LED backlights
···77title: Register Bit LEDs8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |+1313 Register bit leds are used with syscon multifunctional devices where single
···77title: Regulator LEDs8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 Regulator LEDs are powered by a single regulator such that they can
···77title: Richtek RT8515 1.5A dual channel LED driver8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 The Richtek RT8515 is a dual channel (two mode) LED driver that
···77title: Arm Ltd Developer Platforms System Controllers8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 The Arm Ltd Integrator, Realview, and Versatile families of developer
···77title: ST-Ericsson Analog Baseband AB8500 and AB85058899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 the AB8500 "Analog Baseband" is the mixed-signals integrated circuit
···77title: ST-Ericsson DB8500 PRCMU - Power Reset and Control Management Unit8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 The DB8500 Power Reset and Control Management Unit is an XP70 8-bit
···77title: Cortina Systems Gemini Ethernet Controller8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This ethernet controller is found in the Gemini SoC family:
···77title: Micrel KS8995 Family DSA Switches8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 The Micrel KS8995 DSA Switches are 100 Mbit switches that were produced in
···77title: Vitesse VSC73xx DSA Switches8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 The Vitesse DSA Switches were produced in the early-to-mid 2000s.
···88title: Intel IXP46x PTP Timer (TSYNC)991010maintainers:1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: |1414 The Intel IXP46x PTP timer is known in the manual as IEEE1588 Hardware
···1111 - $ref: ethernet-controller.yaml#12121313maintainers:1414- - Linus Walleij <linus.walleij@linaro.org>1414+ - Linus Walleij <linusw@kernel.org>15151616description: |1717 The Intel IXP4xx ethernet makes use of the IXP4xx NPE (Network
···88title: Intel IXP4xx V.35 WAN High Speed Serial Link (HSS)991010maintainers:1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: |1414 The Intel IXP4xx HSS makes use of the IXP4xx NPE (Network
···77title: Faraday Technology FTPCI100 PCI Host Bridge8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This PCI bridge is found inside that Cortina Systems Gemini SoC platform and
···77title: V3 Semiconductor V360 EPC PCI bridge8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 This bridge is found in the ARM Integrator/AP (Application Platform)
···77title: Generic Pin Configuration Node8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description:1313 Many data items that are represented in a pin configuration node are common
···77title: Generic Pin Multiplexing Node8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 The contents of the pin configuration child nodes are defined by the binding
···377377 guarantee on LR/SC sequences, as ratified in commit b1d806605f87378378 ("Updated to ratified state.") of the riscv profiles specification.379379380380+ - const: zilsd381381+ description:382382+ The standard Zilsd extension which provides support for aligned383383+ register-pair load and store operations in 32-bit instruction384384+ encodings, as ratified in commit f88abf1 ("Integrating385385+ load/store pair for RV32 with the main manual") of riscv-isa-manual.386386+387387+ - const: zclsd388388+ description:389389+ The Zclsd extension implements the compressed (16-bit) version of the390390+ Load/Store Pair for RV32. As with Zilsd, this extension was ratified391391+ in commit f88abf1 ("Integrating load/store pair for RV32 with the392392+ main manual") of riscv-isa-manual.393393+380394 - const: zk381395 description:382396 The standard Zk Standard Scalar cryptography extension as ratified···896882 anyOf:897883 - const: v898884 - const: zve32x885885+ # Zclsd depends on Zilsd and Zca886886+ - if:887887+ contains:888888+ anyOf:889889+ - const: zclsd890890+ then:891891+ contains:892892+ allOf:893893+ - const: zilsd894894+ - const: zca899895900896allOf:901897 # Zcf extension does not exist on rv64···923899 not:924900 contains:925901 const: zcf902902+ # Zilsd extension does not exist on rv64903903+ - if:904904+ properties:905905+ riscv,isa-base:906906+ contains:907907+ const: rv64i908908+ then:909909+ properties:910910+ riscv,isa-extensions:911911+ not:912912+ contains:913913+ const: zilsd926914927915additionalProperties: true928916...
···77title: Faraday Technology FTRTC010 Real Time Clock8899maintainers:1010- - Linus Walleij <linus.walleij@linaro.org>1010+ - Linus Walleij <linusw@kernel.org>11111212description: |1313 This RTC appears in for example the Storlink Gemini family of SoCs.
···8899maintainers:1010 - Joel Stanley <joel@jms.id.au>1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description:1414 This timer is a generic IP block from Faraday Technology, embedded in the
···88title: Intel IXP4xx XScale Networking Processors Timers991010maintainers:1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: This timer is found in the Intel IXP4xx processors.1414
···88title: ST Microelectronics Nomadik Multi-Timer Unit MTU Timer991010maintainers:1111- - Linus Walleij <linus.walleij@linaro.org>1111+ - Linus Walleij <linusw@kernel.org>12121313description: This timer is found in the ST Microelectronics Nomadik1414 SoCs STn8800, STn8810 and STn8815 as well as in ST-Ericsson DB8500.
···7788 Prefix: 'ds620'991010- Datasheet: Publicly available at the Dallas Semiconductor website1010+ Datasheet: Publicly available at the Analog Devices website11111212- http://www.dalsemi.com/1212+ https://www.analog.com/media/en/technical-documentation/data-sheets/DS620.pdf13131414Authors:1515 Roland Stigge <stigge@antcom.de>
+1
Documentation/i2c/busses/i2c-i801.rst
···5252 * Intel Panther Lake (SOC)5353 * Intel Wildcat Lake (SOC)5454 * Intel Diamond Rapids (SOC)5555+ * Intel Nova Lake (PCH)55565657 Datasheets: Publicly available at the Intel website5758
+6
Documentation/input/event-codes.rst
···241241 emitted only when the selected profile changes, indicating the newly242242 selected profile value.243243244244+* ABS_SND_PROFILE:245245+246246+ - Used to describe the state of a multi-value sound profile switch.247247+ An event is emitted only when the selected profile changes,248248+ indicating the newly selected profile value.249249+244250* ABS_MT_<name>:245251246252 - Used to describe multitouch input events. Please see
+2-1
MAINTAINERS
···18030180301803118031NETFILTER1803218032M: Pablo Neira Ayuso <pablo@netfilter.org>1803318033-M: Jozsef Kadlecsik <kadlec@netfilter.org>1803418033M: Florian Westphal <fw@strlen.de>1803518034R: Phil Sutter <phil@nwl.cc>1803618035L: netfilter-devel@vger.kernel.org···2646526466S: Maintained2646626467Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/2646726468T: git git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git2646926469+F: Documentation/core-api/tracepoint.rst2646826470F: Documentation/trace/*2646926471F: fs/tracefs/2647026472F: include/linux/trace*.h···2792227922F: rust/kernel/regulator.rs2792327923F: include/dt-bindings/regulator/2792427924F: include/linux/regulator/2792527925+F: include/uapi/regulator/2792527926K: regulator_get_optional27926279272792727928VOLTAGE AND CURRENT REGULATOR IRQ HELPERS
···180180 set_default_vl(ARM64_VEC_SVE, val);181181}182182183183-static u8 *efi_sve_state;184184-185185-#else /* ! CONFIG_ARM64_SVE */186186-187187-/* Dummy declaration for code that will be optimised out: */188188-extern u8 *efi_sve_state;189189-190183#endif /* ! CONFIG_ARM64_SVE */191184192185#ifdef CONFIG_ARM64_SME···10881095 return 0;10891096}1090109710911091-static void __init sve_efi_setup(void)10921092-{10931093- int max_vl = 0;10941094- int i;10951095-10961096- if (!IS_ENABLED(CONFIG_EFI))10971097- return;10981098-10991099- for (i = 0; i < ARRAY_SIZE(vl_info); i++)11001100- max_vl = max(vl_info[i].max_vl, max_vl);11011101-11021102- /*11031103- * alloc_percpu() warns and prints a backtrace if this goes wrong.11041104- * This is evidence of a crippled system and we are returning void,11051105- * so no attempt is made to handle this situation here.11061106- */11071107- if (!sve_vl_valid(max_vl))11081108- goto fail;11091109-11101110- efi_sve_state = kmalloc(SVE_SIG_REGS_SIZE(sve_vq_from_vl(max_vl)),11111111- GFP_KERNEL);11121112- if (!efi_sve_state)11131113- goto fail;11141114-11151115- return;11161116-11171117-fail:11181118- panic("Cannot allocate memory for EFI SVE save/restore");11191119-}11201120-11211098void cpu_enable_sve(const struct arm64_cpu_capabilities *__always_unused p)11221099{11231100 write_sysreg(read_sysreg(CPACR_EL1) | CPACR_EL1_ZEN_EL1EN, CPACR_EL1);···11481185 if (sve_max_virtualisable_vl() < sve_max_vl())11491186 pr_warn("%s: unvirtualisable vector lengths present\n",11501187 info->name);11511151-11521152- sve_efi_setup();11531188}1154118911551190/*···19081947#ifdef CONFIG_EFI1909194819101949static struct user_fpsimd_state efi_fpsimd_state;19111911-static bool efi_fpsimd_state_used;19121912-static bool efi_sve_state_used;19131913-static bool efi_sm_state;1914195019151951/*19161952 * EFI runtime services support functions···19341976 if (may_use_simd()) {19351977 kernel_neon_begin(&efi_fpsimd_state);19361978 } else {19371937- WARN_ON(preemptible());19381938-19391979 /*19401940- * If !efi_sve_state, SVE can't be in use yet and doesn't need19411941- * preserving:19801980+ * We are running in hardirq or NMI context, and the only19811981+ * legitimate case where this might happen is when EFI pstore19821982+ * is attempting to record the system's dying gasps into EFI19831983+ * variables. This could be due to an oops, a panic or a call19841984+ * to emergency_restart(), and in none of those cases, we can19851985+ * expect the current task to ever return to user space again,19861986+ * or for the kernel to resume any normal execution, for that19871987+ * matter (an oops in hardirq context triggers a panic too).19881988+ *19891989+ * Therefore, there is no point in attempting to preserve any19901990+ * SVE/SME state here. On the off chance that we might have19911991+ * ended up here for a different reason inadvertently, kill the19921992+ * task and preserve/restore the base FP/SIMD state, which19931993+ * might belong to kernel mode FP/SIMD.19421994 */19431943- if (system_supports_sve() && efi_sve_state != NULL) {19441944- bool ffr = true;19451945- u64 svcr;19461946-19471947- efi_sve_state_used = true;19481948-19491949- if (system_supports_sme()) {19501950- svcr = read_sysreg_s(SYS_SVCR);19511951-19521952- efi_sm_state = svcr & SVCR_SM_MASK;19531953-19541954- /*19551955- * Unless we have FA64 FFR does not19561956- * exist in streaming mode.19571957- */19581958- if (!system_supports_fa64())19591959- ffr = !(svcr & SVCR_SM_MASK);19601960- }19611961-19621962- sve_save_state(efi_sve_state + sve_ffr_offset(sve_max_vl()),19631963- &efi_fpsimd_state.fpsr, ffr);19641964-19651965- if (system_supports_sme())19661966- sysreg_clear_set_s(SYS_SVCR,19671967- SVCR_SM_MASK, 0);19681968-19691969- } else {19701970- fpsimd_save_state(&efi_fpsimd_state);19711971- }19721972-19731973- efi_fpsimd_state_used = true;19951995+ pr_warn_ratelimited("Calling EFI runtime from %s context\n",19961996+ in_nmi() ? "NMI" : "hardirq");19971997+ force_signal_inject(SIGKILL, SI_KERNEL, 0, 0);19981998+ fpsimd_save_state(&efi_fpsimd_state);19741999 }19752000}19762001···19652024 if (!system_supports_fpsimd())19662025 return;1967202619681968- if (!efi_fpsimd_state_used) {20272027+ if (may_use_simd()) {19692028 kernel_neon_end(&efi_fpsimd_state);19702029 } else {19711971- if (system_supports_sve() && efi_sve_state_used) {19721972- bool ffr = true;19731973-19741974- /*19751975- * Restore streaming mode; EFI calls are19761976- * normal function calls so should not return in19771977- * streaming mode.19781978- */19791979- if (system_supports_sme()) {19801980- if (efi_sm_state) {19811981- sysreg_clear_set_s(SYS_SVCR,19821982- 0,19831983- SVCR_SM_MASK);19841984-19851985- /*19861986- * Unless we have FA64 FFR does not19871987- * exist in streaming mode.19881988- */19891989- if (!system_supports_fa64())19901990- ffr = false;19911991- }19921992- }19931993-19941994- sve_load_state(efi_sve_state + sve_ffr_offset(sve_max_vl()),19951995- &efi_fpsimd_state.fpsr, ffr);19961996-19971997- efi_sve_state_used = false;19981998- } else {19991999- fpsimd_load_state(&efi_fpsimd_state);20002000- }20012001-20022002- efi_fpsimd_state_used = false;20302030+ fpsimd_load_state(&efi_fpsimd_state);20032031 }20042032}20052033
···767767 return rodata_full || arm64_kfence_can_set_direct_map() || is_realm_world();768768}769769770770-static inline bool split_leaf_mapping_possible(void)771771-{772772- /*773773- * !BBML2_NOABORT systems should never run into scenarios where we would774774- * have to split. So exit early and let calling code detect it and raise775775- * a warning.776776- */777777- if (!system_supports_bbml2_noabort())778778- return false;779779- return !force_pte_mapping();780780-}781781-782770static DEFINE_MUTEX(pgtable_split_lock);783771784772int split_kernel_leaf_mapping(unsigned long start, unsigned long end)···774786 int ret;775787776788 /*777777- * Exit early if the region is within a pte-mapped area or if we can't778778- * split. For the latter case, the permission change code will raise a779779- * warning if not already pte-mapped.789789+ * !BBML2_NOABORT systems should not be trying to change permissions on790790+ * anything that is not pte-mapped in the first place. Just return early791791+ * and let the permission change code raise a warning if not already792792+ * pte-mapped.780793 */781781- if (!split_leaf_mapping_possible() || is_kfence_address((void *)start))794794+ if (!system_supports_bbml2_noabort())795795+ return 0;796796+797797+ /*798798+ * If the region is within a pte-mapped area, there is no need to try to799799+ * split. Additionally, CONFIG_DEBUG_PAGEALLOC and CONFIG_KFENCE may800800+ * change permissions from atomic context so for those cases (which are801801+ * always pte-mapped), we must not go any further because taking the802802+ * mutex below may sleep.803803+ */804804+ if (force_pte_mapping() || is_kfence_address((void *)start))782805 return 0;783806784807 /*···10881089 int ret;1089109010901091 /* Exit early if we know the linear map is already pte-mapped. */10911091- if (!split_leaf_mapping_possible())10921092+ if (force_pte_mapping())10921093 return true;1093109410941095 /* Kfence pool is already pte-mapped for the early init case. */
+1-1
arch/arm64/net/bpf_jit_comp.c
···10041004 arm64_get_spectre_v2_state() == SPECTRE_VULNERABLE)10051005 return;1006100610071007- if (capable(CAP_SYS_ADMIN))10071007+ if (ns_capable_noaudit(&init_user_ns, CAP_SYS_ADMIN))10081008 return;1009100910101010 if (supports_clearbhb(SCOPE_SYSTEM)) {
+1-2
arch/mips/alchemy/common/setup.c
···9494 return phys_addr;9595}96969797-static inline unsigned long io_remap_pfn_range_pfn(unsigned long pfn,9898- unsigned long size)9797+unsigned long io_remap_pfn_range_pfn(unsigned long pfn, unsigned long size)9998{10099 phys_addr_t phys_addr = fixup_bigphys_addr(pfn << PAGE_SHIFT, size);101100
···9090 if (IS_ENABLED(CONFIG_BOOKE))9191 wrtee(0);9292 else if (IS_ENABLED(CONFIG_PPC_8xx))9393- wrtspr(SPRN_NRI);9393+ wrtspr_sync(SPRN_NRI);9494 else if (IS_ENABLED(CONFIG_PPC_BOOK3S_64))9595 __mtmsrd(0, 1);9696 else
···202202 mb();203203}204204205205+206206+/*207207+ * The add_cpu() call in wake_offline_cpus() can fail as cpu_bootable()208208+ * returns false for CPUs that fail the cpu_smt_thread_allowed() check209209+ * or non primary threads if SMT is disabled. Re-enable SMT and set the210210+ * number of SMT threads to threads per core.211211+ */212212+static void kexec_smt_reenable(void)213213+{214214+#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT)215215+ lock_device_hotplug();216216+ cpu_smt_num_threads = threads_per_core;217217+ cpu_smt_control = CPU_SMT_ENABLED;218218+ unlock_device_hotplug();219219+#endif220220+}221221+205222/*206223 * We need to make sure each present CPU is online. The next kernel will scan207224 * the device tree and assume primary threads are online and query secondary···232215static void wake_offline_cpus(void)233216{234217 int cpu = 0;218218+219219+ kexec_smt_reenable();235220236221 for_each_present_cpu(cpu) {237222 if (!cpu_online(cpu)) {
+5-4
arch/powerpc/platforms/powernv/idle.c
···11711171 u64 max_residency_ns = 0;11721172 int i;1173117311741174- /* stop is not really architected, we only have p9,p10 drivers */11751175- if (!pvr_version_is(PVR_POWER10) && !pvr_version_is(PVR_POWER9))11741174+ /* stop is not really architected, we only have p9,p10 and p11 drivers */11751175+ if (!pvr_version_is(PVR_POWER9) && !pvr_version_is(PVR_POWER10) &&11761176+ !pvr_version_is(PVR_POWER11))11761177 return;1177117811781179 /*···11901189 struct pnv_idle_states_t *state = &pnv_idle_states[i];11911190 u64 psscr_rl = state->psscr_val & PSSCR_RL_MASK;1192119111931193- /* No deep loss driver implemented for POWER10 yet */11941194- if (pvr_version_is(PVR_POWER10) &&11921192+ /* No deep loss driver implemented for POWER10 and POWER11 yet */11931193+ if ((pvr_version_is(PVR_POWER10) || pvr_version_is(PVR_POWER11)) &&11951194 state->flags & (OPAL_PM_TIMEBASE_STOP|OPAL_PM_LOSE_FULL_CONTEXT))11961195 continue;11971196
···3737 SBI_EXT_NACL = 0x4E41434C,3838 SBI_EXT_FWFT = 0x46574654,3939 SBI_EXT_MPXY = 0x4D505859,4040+ SBI_EXT_DBTR = 0x44425452,40414142 /* Experimentals extensions must lie within this range */4243 SBI_EXT_EXPERIMENTAL_START = 0x08000000,···505504#define SBI_MPXY_CHAN_CAP_SEND_WITH_RESP BIT(3)506505#define SBI_MPXY_CHAN_CAP_SEND_WITHOUT_RESP BIT(4)507506#define SBI_MPXY_CHAN_CAP_GET_NOTIFICATIONS BIT(5)507507+508508+/* SBI debug triggers function IDs */509509+enum sbi_ext_dbtr_fid {510510+ SBI_EXT_DBTR_NUM_TRIGGERS = 0,511511+ SBI_EXT_DBTR_SETUP_SHMEM,512512+ SBI_EXT_DBTR_TRIG_READ,513513+ SBI_EXT_DBTR_TRIG_INSTALL,514514+ SBI_EXT_DBTR_TRIG_UPDATE,515515+ SBI_EXT_DBTR_TRIG_UNINSTALL,516516+ SBI_EXT_DBTR_TRIG_ENABLE,517517+ SBI_EXT_DBTR_TRIG_DISABLE,518518+};519519+520520+struct sbi_dbtr_data_msg {521521+ unsigned long tstate;522522+ unsigned long tdata1;523523+ unsigned long tdata2;524524+ unsigned long tdata3;525525+};526526+527527+struct sbi_dbtr_id_msg {528528+ unsigned long idx;529529+};530530+531531+union sbi_dbtr_shmem_entry {532532+ struct sbi_dbtr_data_msg data;533533+ struct sbi_dbtr_id_msg id;534534+};508535509536/* SBI spec version fields */510537#define SBI_SPEC_VERSION_DEFAULT 0x1
+3
arch/riscv/include/asm/vector.h
···424424#define riscv_v_thread_free(tsk) do {} while (0)425425#define riscv_v_setup_ctx_cache() do {} while (0)426426#define riscv_v_thread_alloc(tsk) do {} while (0)427427+#define get_cpu_vector_context() do {} while (0)428428+#define put_cpu_vector_context() do {} while (0)429429+#define riscv_v_vstate_set_restore(task, regs) do {} while (0)427430428431#endif /* CONFIG_RISCV_ISA_V */429432
···242242 return -EPROBE_DEFER;243243}244244245245+static int riscv_ext_zilsd_validate(const struct riscv_isa_ext_data *data,246246+ const unsigned long *isa_bitmap)247247+{248248+ if (IS_ENABLED(CONFIG_64BIT))249249+ return -EINVAL;250250+251251+ return 0;252252+}253253+254254+static int riscv_ext_zclsd_validate(const struct riscv_isa_ext_data *data,255255+ const unsigned long *isa_bitmap)256256+{257257+ if (IS_ENABLED(CONFIG_64BIT))258258+ return -EINVAL;259259+260260+ if (__riscv_isa_extension_available(isa_bitmap, RISCV_ISA_EXT_ZILSD) &&261261+ __riscv_isa_extension_available(isa_bitmap, RISCV_ISA_EXT_ZCA))262262+ return 0;263263+264264+ return -EPROBE_DEFER;265265+}266266+245267static int riscv_vector_f_validate(const struct riscv_isa_ext_data *data,246268 const unsigned long *isa_bitmap)247269{···506484 __RISCV_ISA_EXT_DATA_VALIDATE(zcd, RISCV_ISA_EXT_ZCD, riscv_ext_zcd_validate),507485 __RISCV_ISA_EXT_DATA_VALIDATE(zcf, RISCV_ISA_EXT_ZCF, riscv_ext_zcf_validate),508486 __RISCV_ISA_EXT_DATA_VALIDATE(zcmop, RISCV_ISA_EXT_ZCMOP, riscv_ext_zca_depends),487487+ __RISCV_ISA_EXT_DATA_VALIDATE(zclsd, RISCV_ISA_EXT_ZCLSD, riscv_ext_zclsd_validate),488488+ __RISCV_ISA_EXT_DATA_VALIDATE(zilsd, RISCV_ISA_EXT_ZILSD, riscv_ext_zilsd_validate),509489 __RISCV_ISA_EXT_DATA(zba, RISCV_ISA_EXT_ZBA),510490 __RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB),511491 __RISCV_ISA_EXT_DATA(zbc, RISCV_ISA_EXT_ZBC),
+41-21
arch/riscv/kernel/signal.c
···6868#define restore_fp_state(task, regs) (0)6969#endif70707171-#ifdef CONFIG_RISCV_ISA_V7272-7373-static long save_v_state(struct pt_regs *regs, void __user **sc_vec)7171+static long save_v_state(struct pt_regs *regs, void __user *sc_vec)7472{7575- struct __riscv_ctx_hdr __user *hdr;7673 struct __sc_riscv_v_state __user *state;7774 void __user *datap;7875 long err;79768080- hdr = *sc_vec;8181- /* Place state to the user's signal context space after the hdr */8282- state = (struct __sc_riscv_v_state __user *)(hdr + 1);7777+ if (!IS_ENABLED(CONFIG_RISCV_ISA_V) ||7878+ !((has_vector() || has_xtheadvector()) &&7979+ riscv_v_vstate_query(regs)))8080+ return 0;8181+8282+ /* Place state to the user's signal context space */8383+ state = (struct __sc_riscv_v_state __user *)sc_vec;8384 /* Point datap right after the end of __sc_riscv_v_state */8485 datap = state + 1;8586···9897 err |= __put_user((__force void *)datap, &state->v_state.datap);9998 /* Copy the whole vector content to user space datap. */10099 err |= __copy_to_user(datap, current->thread.vstate.datap, riscv_v_vsize);101101- /* Copy magic to the user space after saving all vector conetext */102102- err |= __put_user(RISCV_V_MAGIC, &hdr->magic);103103- err |= __put_user(riscv_v_sc_size, &hdr->size);104100 if (unlikely(err))105105- return err;101101+ return -EFAULT;106102107107- /* Only progress the sv_vec if everything has done successfully */108108- *sc_vec += riscv_v_sc_size;109109- return 0;103103+ /* Only return the size if everything has done successfully */104104+ return riscv_v_sc_size;110105}111106112107/*···139142 */140143 return copy_from_user(current->thread.vstate.datap, datap, riscv_v_vsize);141144}142142-#else143143-#define save_v_state(task, regs) (0)144144-#define __restore_v_state(task, regs) (0)145145-#endif145145+146146+struct arch_ext_priv {147147+ __u32 magic;148148+ long (*save)(struct pt_regs *regs, void __user *sc_vec);149149+};150150+151151+struct arch_ext_priv arch_ext_list[] = {152152+ {153153+ .magic = RISCV_V_MAGIC,154154+ .save = &save_v_state,155155+ },156156+};157157+158158+const size_t nr_arch_exts = ARRAY_SIZE(arch_ext_list);146159147160static long restore_sigcontext(struct pt_regs *regs,148161 struct sigcontext __user *sc)···277270{278271 struct sigcontext __user *sc = &frame->uc.uc_mcontext;279272 struct __riscv_ctx_hdr __user *sc_ext_ptr = &sc->sc_extdesc.hdr;280280- long err;273273+ struct arch_ext_priv *arch_ext;274274+ long err, i, ext_size;281275282276 /* sc_regs is structured the same as the start of pt_regs */283277 err = __copy_to_user(&sc->sc_regs, regs, sizeof(sc->sc_regs));···286278 if (has_fpu())287279 err |= save_fp_state(regs, &sc->sc_fpregs);288280 /* Save the vector state. */289289- if ((has_vector() || has_xtheadvector()) && riscv_v_vstate_query(regs))290290- err |= save_v_state(regs, (void __user **)&sc_ext_ptr);281281+ for (i = 0; i < nr_arch_exts; i++) {282282+ arch_ext = &arch_ext_list[i];283283+ if (!arch_ext->save)284284+ continue;285285+286286+ ext_size = arch_ext->save(regs, sc_ext_ptr + 1);287287+ if (ext_size <= 0) {288288+ err |= ext_size;289289+ } else {290290+ err |= __put_user(arch_ext->magic, &sc_ext_ptr->magic);291291+ err |= __put_user(ext_size, &sc_ext_ptr->size);292292+ sc_ext_ptr = (void *)sc_ext_ptr + ext_size;293293+ }294294+ }291295 /* Write zero to fp-reserved space and check it on restore_sigcontext */292296 err |= __put_user(0, &sc->sc_extdesc.reserved);293297 /* And put END __riscv_ctx_hdr at the end. */
···104104 struct stack_frame_vdso_wrapper __user *sf_vdso;105105 struct stack_frame_user __user *sf;106106 unsigned long ip, sp;107107- bool first = true;108107109108 if (!current->mm)110109 return;···132133 if (__get_user(ip, &sf->gprs[8]))133134 break;134135 }135135- /* Sanity check: ABI requires SP to be 8 byte aligned. */136136- if (sp & 0x7)136136+ /* Validate SP and RA (ABI requires SP to be 8 byte aligned). */137137+ if (sp & 0x7 || ip_invalid(ip))137138 break;138138- if (ip_invalid(ip)) {139139- /*140140- * If the instruction address is invalid, and this141141- * is the first stack frame, assume r14 has not142142- * been written to the stack yet. Otherwise exit.143143- */144144- if (!first)145145- break;146146- ip = regs->gprs[14];147147- if (ip_invalid(ip))148148- break;149149- }150139 if (!store_ip(consume_entry, cookie, entry, perf, ip))151140 break;152152- first = false;153141 }154142 pagefault_enable();155143}
···153153 return ret;154154}155155156156-/* zpci_bus_scan_busses - Scan all registered busses157157- *158158- * Scan all available zbusses159159- *160160- */161161-void zpci_bus_scan_busses(void)162162-{163163- struct zpci_bus *zbus = NULL;164164-165165- mutex_lock(&zbus_list_lock);166166- list_for_each_entry(zbus, &zbus_list, bus_next) {167167- zpci_bus_scan_bus(zbus);168168- cond_resched();169169- }170170- mutex_unlock(&zbus_list_lock);171171-}172172-173156static bool zpci_bus_is_multifunction_root(struct zpci_dev *zdev)174157{175158 return !s390_pci_no_rid && zdev->rid_available &&···205222 return -ENOMEM;206223}207224208208-static void zpci_bus_release(struct kref *kref)225225+/**226226+ * zpci_bus_release - Un-initialize resources associated with the zbus and227227+ * free memory228228+ * @kref: refcount * that is part of struct zpci_bus229229+ *230230+ * MUST be called with `zbus_list_lock` held, but the lock is released during231231+ * run of the function.232232+ */233233+static inline void zpci_bus_release(struct kref *kref)234234+ __releases(&zbus_list_lock)209235{210236 struct zpci_bus *zbus = container_of(kref, struct zpci_bus, kref);237237+238238+ lockdep_assert_held(&zbus_list_lock);239239+240240+ list_del(&zbus->bus_next);241241+ mutex_unlock(&zbus_list_lock);242242+243243+ /*244244+ * At this point no-one should see this object, or be able to get a new245245+ * reference to it.246246+ */211247212248 if (zbus->bus) {213249 pci_lock_rescan_remove();···239237 pci_unlock_rescan_remove();240238 }241239242242- mutex_lock(&zbus_list_lock);243243- list_del(&zbus->bus_next);244244- mutex_unlock(&zbus_list_lock);245240 zpci_remove_parent_msi_domain(zbus);246241 kfree(zbus);247242}248243249249-static void zpci_bus_put(struct zpci_bus *zbus)244244+static inline void __zpci_bus_get(struct zpci_bus *zbus)250245{251251- kref_put(&zbus->kref, zpci_bus_release);246246+ lockdep_assert_held(&zbus_list_lock);247247+ kref_get(&zbus->kref);248248+}249249+250250+static inline void zpci_bus_put(struct zpci_bus *zbus)251251+{252252+ kref_put_mutex(&zbus->kref, zpci_bus_release, &zbus_list_lock);252253}253254254255static struct zpci_bus *zpci_bus_get(int topo, bool topo_is_tid)···263258 if (!zbus->multifunction)264259 continue;265260 if (topo_is_tid == zbus->topo_is_tid && topo == zbus->topo) {266266- kref_get(&zbus->kref);261261+ __zpci_bus_get(zbus);267262 goto out_unlock;268263 }269264 }···271266out_unlock:272267 mutex_unlock(&zbus_list_lock);273268 return zbus;269269+}270270+271271+/**272272+ * zpci_bus_get_next - get the next zbus object from given position in the list273273+ * @pos: current position/cursor in the global zbus list274274+ *275275+ * Acquires and releases references as the cursor iterates (might also free/276276+ * release the cursor). Is tolerant of concurrent operations on the list.277277+ *278278+ * To begin the iteration, set *@pos to %NULL before calling the function.279279+ *280280+ * *@pos is set to %NULL in cases where either the list is empty, or *@pos is281281+ * the last element in the list.282282+ *283283+ * Context: Process context. May sleep.284284+ */285285+void zpci_bus_get_next(struct zpci_bus **pos)286286+{287287+ struct zpci_bus *curp = *pos, *next = NULL;288288+289289+ mutex_lock(&zbus_list_lock);290290+ if (curp)291291+ next = list_next_entry(curp, bus_next);292292+ else293293+ next = list_first_entry(&zbus_list, typeof(*curp), bus_next);294294+295295+ if (list_entry_is_head(next, &zbus_list, bus_next))296296+ next = NULL;297297+298298+ if (next)299299+ __zpci_bus_get(next);300300+301301+ *pos = next;302302+ mutex_unlock(&zbus_list_lock);303303+304304+ /* zpci_bus_put() might drop refcount to 0 and locks zbus_list_lock */305305+ if (curp)306306+ zpci_bus_put(curp);274307}275308276309static struct zpci_bus *zpci_bus_alloc(int topo, bool topo_is_tid)···322279 zbus->topo = topo;323280 zbus->topo_is_tid = topo_is_tid;324281 INIT_LIST_HEAD(&zbus->bus_next);325325- mutex_lock(&zbus_list_lock);326326- list_add_tail(&zbus->bus_next, &zbus_list);327327- mutex_unlock(&zbus_list_lock);328282329283 kref_init(&zbus->kref);330284 INIT_LIST_HEAD(&zbus->resources);···330290 zbus->bus_resource.end = ZPCI_BUS_NR;331291 zbus->bus_resource.flags = IORESOURCE_BUS;332292 pci_add_resource(&zbus->resources, &zbus->bus_resource);293293+294294+ mutex_lock(&zbus_list_lock);295295+ list_add_tail(&zbus->bus_next, &zbus_list);296296+ mutex_unlock(&zbus_list_lock);333297334298 return zbus;335299}
+14-1
arch/s390/pci/pci_bus.h
···1515void zpci_bus_device_unregister(struct zpci_dev *zdev);16161717int zpci_bus_scan_bus(struct zpci_bus *zbus);1818-void zpci_bus_scan_busses(void);1818+void zpci_bus_get_next(struct zpci_bus **pos);1919+2020+/**2121+ * zpci_bus_for_each - iterate over all the registered zbus objects2222+ * @pos: a struct zpci_bus * as cursor2323+ *2424+ * Acquires and releases references as the cursor iterates over the registered2525+ * objects. Is tolerant against concurrent removals of objects.2626+ *2727+ * Context: Process context. May sleep.2828+ */2929+#define zpci_bus_for_each(pos) \3030+ for ((pos) = NULL, zpci_bus_get_next(&(pos)); (pos) != NULL; \3131+ zpci_bus_get_next(&(pos)))19322033int zpci_bus_scan_device(struct zpci_dev *zdev);2134void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);
+1-1
arch/x86/include/asm/bug.h
···1515/*1616 * Despite that some emulators terminate on UD2, we use it for WARN().1717 */1818-#define ASM_UD2 _ASM_BYTES(0x0f, 0x0b)1818+#define ASM_UD2 __ASM_FORM(ud2)1919#define INSN_UD2 0x0b0f2020#define LEN_UD2 22121
···122122 struct {123123 u32 type:8; /* type of entry */124124 u32 offset:24; /* byte offset from struct start to entry */125125- } entry[1]; /* additional entries follow */125125+ } entry[]; /* additional entries follow */126126};127127extern struct uv_systab *uv_systab;128128
+1-1
arch/x86/kernel/cpu/sgx/ioctl.c
···242242/*243243 * If the caller requires measurement of the page as a proof for the content,244244 * use EEXTEND to add a measurement for 256 bytes of the page. Repeat this245245- * operation until the entire page is measured."245245+ * operation until the entire page is measured.246246 */247247static int __sgx_encl_extend(struct sgx_encl *encl,248248 struct sgx_epc_page *epc_page)
···397397398398/* Posted Interrupt Descriptors for coalesced MSIs to be posted */399399DEFINE_PER_CPU_ALIGNED(struct pi_desc, posted_msi_pi_desc);400400+static DEFINE_PER_CPU_CACHE_HOT(bool, posted_msi_handler_active);400401401402void intel_posted_msi_init(void)402403{···413412 apic_id = this_cpu_read(x86_cpu_to_apicid);414413 destination = x2apic_enabled() ? apic_id : apic_id << 8;415414 this_cpu_write(posted_msi_pi_desc.ndst, destination);415415+}416416+417417+void intel_ack_posted_msi_irq(struct irq_data *irqd)418418+{419419+ irq_move_irq(irqd);420420+421421+ /*422422+ * Handle the rare case that irq_retrigger() raised the actual423423+ * assigned vector on the target CPU, which means that it was not424424+ * invoked via the posted MSI handler below. In that case APIC EOI425425+ * is required as otherwise the ISR entry becomes stale and lower426426+ * priority interrupts are never going to be delivered after that.427427+ *428428+ * If the posted handler invoked the device interrupt handler then429429+ * the EOI would be premature because it would acknowledge the430430+ * posted vector.431431+ */432432+ if (unlikely(!__this_cpu_read(posted_msi_handler_active)))433433+ apic_eoi();416434}417435418436static __always_inline bool handle_pending_pir(unsigned long *pir, struct pt_regs *regs)···466446467447 pid = this_cpu_ptr(&posted_msi_pi_desc);468448449449+ /* Mark the handler active for intel_ack_posted_msi_irq() */450450+ __this_cpu_write(posted_msi_handler_active, true);469451 inc_irq_stat(posted_msi_notification_count);470452 irq_enter();471453···496474497475 apic_eoi();498476 irq_exit();477477+ __this_cpu_write(posted_msi_handler_active, false);499478 set_irq_regs(old_regs);500479}501480#endif /* X86_POSTED_MSI */
+27-12
arch/x86/kernel/unwind_orc.c
···22#include <linux/objtool.h>33#include <linux/module.h>44#include <linux/sort.h>55+#include <linux/bpf.h>56#include <asm/ptrace.h>67#include <asm/stacktrace.h>78#include <asm/unwind.h>···173172}174173#endif175174175175+/* Fake frame pointer entry -- used as a fallback for generated code */176176+static struct orc_entry orc_fp_entry = {177177+ .type = ORC_TYPE_CALL,178178+ .sp_reg = ORC_REG_BP,179179+ .sp_offset = 16,180180+ .bp_reg = ORC_REG_PREV_SP,181181+ .bp_offset = -16,182182+};183183+184184+static struct orc_entry *orc_bpf_find(unsigned long ip)185185+{186186+#ifdef CONFIG_BPF_JIT187187+ if (bpf_has_frame_pointer(ip))188188+ return &orc_fp_entry;189189+#endif190190+191191+ return NULL;192192+}193193+176194/*177195 * If we crash with IP==0, the last successfully executed instruction178196 * was probably an indirect function call with a NULL function pointer,···204184 .sp_reg = ORC_REG_SP,205185 .bp_reg = ORC_REG_UNDEFINED,206186 .type = ORC_TYPE_CALL207207-};208208-209209-/* Fake frame pointer entry -- used as a fallback for generated code */210210-static struct orc_entry orc_fp_entry = {211211- .type = ORC_TYPE_CALL,212212- .sp_reg = ORC_REG_BP,213213- .sp_offset = 16,214214- .bp_reg = ORC_REG_PREV_SP,215215- .bp_offset = -16,216187};217188218189static struct orc_entry *orc_find(unsigned long ip)···246235247236 /* Module lookup: */248237 orc = orc_module_find(ip);238238+ if (orc)239239+ return orc;240240+241241+ /* BPF lookup: */242242+ orc = orc_bpf_find(ip);249243 if (orc)250244 return orc;251245···511495 if (!orc) {512496 /*513497 * As a fallback, try to assume this code uses a frame pointer.514514- * This is useful for generated code, like BPF, which ORC515515- * doesn't know about. This is just a guess, so the rest of516516- * the unwind is no longer considered reliable.498498+ * This is just a guess, so the rest of the unwind is no longer499499+ * considered reliable.517500 */518501 orc = &orc_fp_entry;519502 state->error = true;
+9-2
arch/x86/kvm/cpuid.c
···510510 int r;511511512512 /*513513+ * Apply pending runtime CPUID updates to the current CPUID entries to514514+ * avoid false positives due to mismatches on KVM-owned feature flags.515515+ */516516+ if (vcpu->arch.cpuid_dynamic_bits_dirty)517517+ kvm_update_cpuid_runtime(vcpu);518518+519519+ /*513520 * Swap the existing (old) entries with the incoming (new) entries in514521 * order to massage the new entries, e.g. to account for dynamic bits515515- * that KVM controls, without clobbering the current guest CPUID, which516516- * KVM needs to preserve in order to unwind on failure.522522+ * that KVM controls, without losing the current guest CPUID, which KVM523523+ * needs to preserve in order to unwind on failure.517524 *518525 * Similarly, save the vCPU's current cpu_caps so that the capabilities519526 * can be updated alongside the CPUID entries when performing runtime
···69376937 * VM-Exit, otherwise L1 with run with a stale SVI.69386938 */69396939 if (is_guest_mode(vcpu)) {69406940- /*69416941- * KVM is supposed to forward intercepted L2 EOIs to L1 if VID69426942- * is enabled in vmcs12; as above, the EOIs affect L2's vAPIC.69436943- * Note, userspace can stuff state while L2 is active; assert69446944- * that VID is disabled if and only if the vCPU is in KVM_RUN69456945- * to avoid false positives if userspace is setting APIC state.69466946- */69476947- WARN_ON_ONCE(vcpu->wants_to_run &&69486948- nested_cpu_has_vid(get_vmcs12(vcpu)));69496940 to_vmx(vcpu)->nested.update_vmcs01_hwapic_isr = true;69506941 return;69516942 }
+7
arch/x86/kvm/x86.c
···1088610886 * pending. At the same time, KVM_REQ_EVENT may not be set as APICv was1088710887 * still active when the interrupt got accepted. Make sure1088810888 * kvm_check_and_inject_events() is called to check for that.1088910889+ *1089010890+ * Update SVI when APICv gets enabled, otherwise SVI won't reflect the1089110891+ * highest bit in vISR and the next accelerated EOI in the guest won't1089210892+ * be virtualized correctly (the CPU uses SVI to determine which vISR1089310893+ * vector to clear).1088910894 */1089010895 if (!apic->apicv_active)1089110896 kvm_make_request(KVM_REQ_EVENT, vcpu);1089710897+ else1089810898+ kvm_apic_update_hwapic_isr(vcpu);10892108991089310900out:1089410901 preempt_enable();
+12
arch/x86/net/bpf_jit_comp.c
···16781678 emit_prologue(&prog, image, stack_depth,16791679 bpf_prog_was_classic(bpf_prog), tail_call_reachable,16801680 bpf_is_subprog(bpf_prog), bpf_prog->aux->exception_cb);16811681+16821682+ bpf_prog->aux->ksym.fp_start = prog - temp;16831683+16811684 /* Exception callback will clobber callee regs for its own use, and16821685 * restore the original callee regs from main prog's stack frame.16831686 */···27392736 pop_r12(&prog);27402737 }27412738 EMIT1(0xC9); /* leave */27392739+ bpf_prog->aux->ksym.fp_end = prog - temp;27402740+27422741 emit_return(&prog, image + addrs[i - 1] + (prog - temp));27432742 break;27442743···33303325 }33313326 EMIT1(0x55); /* push rbp */33323327 EMIT3(0x48, 0x89, 0xE5); /* mov rbp, rsp */33283328+ if (im)33293329+ im->ksym.fp_start = prog - (u8 *)rw_image;33303330+33333331 if (!is_imm8(stack_size)) {33343332 /* sub rsp, stack_size */33353333 EMIT3_off32(0x48, 0x81, 0xEC, stack_size);···34703462 emit_ldx(&prog, BPF_DW, BPF_REG_0, BPF_REG_FP, -8);3471346334723464 emit_ldx(&prog, BPF_DW, BPF_REG_6, BPF_REG_FP, -rbx_off);34653465+34733466 EMIT1(0xC9); /* leave */34673467+ if (im)34683468+ im->ksym.fp_end = prog - (u8 *)rw_image;34693469+34743470 if (flags & BPF_TRAMP_F_SKIP_FRAME) {34753471 /* skip our return address and return to parent */34763472 EMIT4(0x48, 0x83, 0xC4, 8); /* add rsp, 8 */
+1-1
arch/x86/xen/enlighten_pv.c
···108108 * calls.109109 */110110DEFINE_PER_CPU(bool, xen_in_preemptible_hcall);111111-EXPORT_SYMBOL_GPL(xen_in_preemptible_hcall);111111+EXPORT_PER_CPU_SYMBOL_GPL(xen_in_preemptible_hcall);112112113113/*114114 * In case of scheduling the flag must be cleared and restored after
···161161 return -EINVAL;162162 }163163164164- if (bi->pi_tuple_size > bi->metadata_size) {165165- pr_warn("pi_tuple_size (%u) exceeds metadata_size (%u)\n",166166- bi->pi_tuple_size,167167- bi->metadata_size);164164+ if (bi->pi_offset + bi->pi_tuple_size > bi->metadata_size) {165165+ pr_warn("pi_offset (%u) + pi_tuple_size (%u) exceeds metadata_size (%u)\n",166166+ bi->pi_offset, bi->pi_tuple_size, bi->metadata_size);168167 return -EINVAL;169168 }170169···193194 break;194195 }195196196196- if (!bi->interval_exp)197197+ if (!bi->interval_exp) {197198 bi->interval_exp = ilog2(lim->logical_block_size);199199+ } else if (bi->interval_exp < SECTOR_SHIFT ||200200+ bi->interval_exp > ilog2(lim->logical_block_size)) {201201+ pr_warn("invalid interval_exp %u\n", bi->interval_exp);202202+ return -EINVAL;203203+ }198204199205 /*200206 * The PI generation / validation helpers do not expect intervals to
+1-1
block/blk-sysfs.c
···932932 elevator_set_default(q);933933934934 blk_queue_flag_set(QUEUE_FLAG_REGISTERED, q);935935- wbt_enable_default(disk);935935+ wbt_init_enable_default(disk);936936937937 /* Now everything is ready and send out KOBJ_ADD uevent */938938 kobject_uevent(&disk->queue_kobj, KOBJ_ADD);
+16-4
block/blk-wbt.c
···699699/*700700 * Enable wbt if defaults are configured that way701701 */702702-void wbt_enable_default(struct gendisk *disk)702702+static bool __wbt_enable_default(struct gendisk *disk)703703{704704 struct request_queue *q = disk->queue;705705 struct rq_qos *rqos;···716716 if (enable && RQWB(rqos)->enable_state == WBT_STATE_OFF_DEFAULT)717717 RQWB(rqos)->enable_state = WBT_STATE_ON_DEFAULT;718718 mutex_unlock(&disk->rqos_state_mutex);719719- return;719719+ return false;720720 }721721 mutex_unlock(&disk->rqos_state_mutex);722722723723 /* Queue not registered? Maybe shutting down... */724724 if (!blk_queue_registered(q))725725- return;725725+ return false;726726727727 if (queue_is_mq(q) && enable)728728- wbt_init(disk);728728+ return true;729729+ return false;730730+}731731+732732+void wbt_enable_default(struct gendisk *disk)733733+{734734+ __wbt_enable_default(disk);729735}730736EXPORT_SYMBOL_GPL(wbt_enable_default);737737+738738+void wbt_init_enable_default(struct gendisk *disk)739739+{740740+ if (__wbt_enable_default(disk))741741+ WARN_ON_ONCE(wbt_init(disk));742742+}731743732744u64 wbt_default_latency_nsec(struct request_queue *q)733745{
···13661366 /* Are any of the regs PCC ?*/13671367 if (CPC_IN_PCC(highest_reg) || CPC_IN_PCC(lowest_reg) ||13681368 CPC_IN_PCC(lowest_non_linear_reg) || CPC_IN_PCC(nominal_reg) ||13691369- CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg)) {13691369+ CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg) ||13701370+ CPC_IN_PCC(guaranteed_reg)) {13701371 if (pcc_ss_id < 0) {13711372 pr_debug("Invalid pcc_ss_id\n");13721373 return -ENODEV;
+3
drivers/ata/libata-core.c
···41434143 { "ST3320[68]13AS", "SD1[5-9]", ATA_QUIRK_NONCQ |41444144 ATA_QUIRK_FIRMWARE_WARN },4145414541464146+ /* Seagate disks with LPM issues */41474147+ { "ST2000DM008-2FR102", NULL, ATA_QUIRK_NOLPM },41484148+41464149 /* drives which fail FPDMA_AA activation (some may freeze afterwards)41474150 the ST disks also have LPM issues */41484151 { "ST1000LM024 HN-M101MBB", NULL, ATA_QUIRK_BROKEN_FPDMA_AA |
+12-10
drivers/base/power/runtime.c
···18681868 */18691869void pm_runtime_reinit(struct device *dev)18701870{18711871- if (!pm_runtime_enabled(dev)) {18721872- if (dev->power.runtime_status == RPM_ACTIVE)18731873- pm_runtime_set_suspended(dev);18741874- if (dev->power.irq_safe) {18751875- spin_lock_irq(&dev->power.lock);18761876- dev->power.irq_safe = 0;18771877- spin_unlock_irq(&dev->power.lock);18781878- if (dev->parent)18791879- pm_runtime_put(dev->parent);18801880- }18711871+ if (pm_runtime_enabled(dev))18721872+ return;18731873+18741874+ if (dev->power.runtime_status == RPM_ACTIVE)18751875+ pm_runtime_set_suspended(dev);18761876+18771877+ if (dev->power.irq_safe) {18781878+ spin_lock_irq(&dev->power.lock);18791879+ dev->power.irq_safe = 0;18801880+ spin_unlock_irq(&dev->power.lock);18811881+ if (dev->parent)18821882+ pm_runtime_put(dev->parent);18811883 }18821884 /*18831885 * Clear power.needs_force_resume in case it has been set by
+13-9
drivers/block/loop.c
···10821082 /* Order wrt reading lo_state in loop_validate_file(). */10831083 wmb();1084108410851085- lo->lo_state = Lo_bound;10851085+ WRITE_ONCE(lo->lo_state, Lo_bound);10861086 if (part_shift)10871087 lo->lo_flags |= LO_FLAGS_PARTSCAN;10881088 partscan = lo->lo_flags & LO_FLAGS_PARTSCAN;···11791179 if (!part_shift)11801180 set_bit(GD_SUPPRESS_PART_SCAN, &lo->lo_disk->state);11811181 mutex_lock(&lo->lo_mutex);11821182- lo->lo_state = Lo_unbound;11821182+ WRITE_ONCE(lo->lo_state, Lo_unbound);11831183 mutex_unlock(&lo->lo_mutex);1184118411851185 /*···1218121812191219 lo->lo_flags |= LO_FLAGS_AUTOCLEAR;12201220 if (disk_openers(lo->lo_disk) == 1)12211221- lo->lo_state = Lo_rundown;12211221+ WRITE_ONCE(lo->lo_state, Lo_rundown);12221222 loop_global_unlock(lo, true);1223122312241224 return 0;···1743174317441744 mutex_lock(&lo->lo_mutex);17451745 if (lo->lo_state == Lo_bound && (lo->lo_flags & LO_FLAGS_AUTOCLEAR))17461746- lo->lo_state = Lo_rundown;17461746+ WRITE_ONCE(lo->lo_state, Lo_rundown);1747174717481748 need_clear = (lo->lo_state == Lo_rundown);17491749 mutex_unlock(&lo->lo_mutex);···1858185818591859 blk_mq_start_request(rq);1860186018611861- if (lo->lo_state != Lo_bound)18611861+ if (data_race(READ_ONCE(lo->lo_state)) != Lo_bound)18621862 return BLK_STS_IOERR;1863186318641864 switch (req_op(rq)) {···20162016 lo->worker_tree = RB_ROOT;20172017 INIT_LIST_HEAD(&lo->idle_worker_list);20182018 timer_setup(&lo->timer, loop_free_idle_workers_timer, TIMER_DEFERRABLE);20192019- lo->lo_state = Lo_unbound;20192019+ WRITE_ONCE(lo->lo_state, Lo_unbound);2020202020212021 err = mutex_lock_killable(&loop_ctl_mutex);20222022 if (err)···21742174 goto mark_visible;21752175 }21762176 /* Mark this loop device as no more bound, but not quite unbound yet */21772177- lo->lo_state = Lo_deleting;21772177+ WRITE_ONCE(lo->lo_state, Lo_deleting);21782178 mutex_unlock(&lo->lo_mutex);2179217921802180 loop_remove(lo);···21972197 if (ret)21982198 return ret;21992199 idr_for_each_entry(&loop_index_idr, lo, id) {22002200- /* Hitting a race results in creating a new loop device which is harmless. */22012201- if (lo->idr_visible && data_race(lo->lo_state) == Lo_unbound)22002200+ /*22012201+ * Hitting a race results in creating a new loop device22022202+ * which is harmless.22032203+ */22042204+ if (lo->idr_visible &&22052205+ data_race(READ_ONCE(lo->lo_state)) == Lo_unbound)22022206 goto found;22032207 }22042208 mutex_unlock(&loop_ctl_mutex);
···112112 struct rnbd_queue *hw_queues;113113 u32 device_id;114114 /* local Idr index - used to track minor number allocations. */115115- u32 clt_device_id;115115+ int clt_device_id;116116 struct mutex lock;117117 enum rnbd_clt_dev_state dev_state;118118 refcount_t refcount;
+29-6
drivers/block/ublk_drv.c
···10801080 return io_uring_cmd_to_pdu(ioucmd, struct ublk_uring_cmd_pdu);10811081}1082108210831083+static void ublk_end_request(struct request *req, blk_status_t error)10841084+{10851085+ local_bh_disable();10861086+ blk_mq_end_request(req, error);10871087+ local_bh_enable();10881088+}10891089+10831090/* todo: handle partial completion */10841091static inline void __ublk_complete_rq(struct request *req, struct ublk_io *io,10851092 bool need_map)10861093{10871094 unsigned int unmapped_bytes;10881095 blk_status_t res = BLK_STS_OK;10961096+ bool requeue;1089109710901098 /* failed read IO if nothing is read */10911099 if (!io->res && req_op(req) == REQ_OP_READ)···11251117 if (unlikely(unmapped_bytes < io->res))11261118 io->res = unmapped_bytes;1127111911281128- if (blk_update_request(req, BLK_STS_OK, io->res))11201120+ /*11211121+ * Run bio->bi_end_io() with softirqs disabled. If the final fput11221122+ * happens off this path, then that will prevent ublk's blkdev_release()11231123+ * from being called on current's task work, see fput() implementation.11241124+ *11251125+ * Otherwise, ublk server may not provide forward progress in case of11261126+ * reading the partition table from bdev_open() with disk->open_mutex11271127+ * held, and causes dead lock as we could already be holding11281128+ * disk->open_mutex here.11291129+ *11301130+ * Preferably we would not be doing IO with a mutex held that is also11311131+ * used for release, but this work-around will suffice for now.11321132+ */11331133+ local_bh_disable();11341134+ requeue = blk_update_request(req, BLK_STS_OK, io->res);11351135+ local_bh_enable();11361136+ if (requeue)11291137 blk_mq_requeue_request(req, true);11301138 else if (likely(!blk_should_fake_timeout(req->q)))11311139 __blk_mq_end_request(req, BLK_STS_OK);1132114011331141 return;11341142exit:11351135- blk_mq_end_request(req, res);11431143+ ublk_end_request(req, res);11361144}1137114511381146static struct io_uring_cmd *__ublk_prep_compl_io_cmd(struct ublk_io *io,···11881164 if (ublk_nosrv_dev_should_queue_io(ubq->dev))11891165 blk_mq_requeue_request(rq, false);11901166 else11911191- blk_mq_end_request(rq, BLK_STS_IOERR);11671167+ ublk_end_request(rq, BLK_STS_IOERR);11921168}1193116911941170static void···12331209 ublk_auto_buf_reg_fallback(ubq, req->tag);12341210 return AUTO_BUF_REG_FALLBACK;12351211 }12361236- blk_mq_end_request(req, BLK_STS_IOERR);12121212+ ublk_end_request(req, BLK_STS_IOERR);12371213 return AUTO_BUF_REG_FAIL;12381214 }12391215···16071583{16081584 int i, j;1609158516101610- if (!(ub->dev_info.flags & (UBLK_F_SUPPORT_ZERO_COPY |16111611- UBLK_F_AUTO_BUF_REG)))15861586+ if (!ublk_dev_need_req_ref(ub))16121587 return false;1613158816141589 for (i = 0; i < ub->dev_info.nr_hw_queues; i++) {
+4-4
drivers/block/zloop.c
···697697 struct zloop_cmd *cmd = blk_mq_rq_to_pdu(rq);698698 struct zloop_device *zlo = rq->q->queuedata;699699700700- if (zlo->state == Zlo_deleting)700700+ if (data_race(READ_ONCE(zlo->state)) == Zlo_deleting)701701 return BLK_STS_IOERR;702702703703 /*···10021002 ret = -ENOMEM;10031003 goto out;10041004 }10051005- zlo->state = Zlo_creating;10051005+ WRITE_ONCE(zlo->state, Zlo_creating);1006100610071007 ret = mutex_lock_killable(&zloop_ctl_mutex);10081008 if (ret)···11131113 }1114111411151115 mutex_lock(&zloop_ctl_mutex);11161116- zlo->state = Zlo_live;11161116+ WRITE_ONCE(zlo->state, Zlo_live);11171117 mutex_unlock(&zloop_ctl_mutex);1118111811191119 pr_info("zloop: device %d, %u zones of %llu MiB, %u B block size\n",···11771177 ret = -EINVAL;11781178 } else {11791179 idr_remove(&zloop_index_idr, zlo->id);11801180- zlo->state = Zlo_deleting;11801180+ WRITE_ONCE(zlo->state, Zlo_deleting);11811181 }1182118211831183 mutex_unlock(&zloop_ctl_mutex);
+4-3
drivers/cpufreq/cpufreq-dt-platdev.c
···219219220220static int __init cpufreq_dt_platdev_init(void)221221{222222- const void *data;222222+ const void *data = NULL;223223224224- data = of_machine_get_match_data(allowlist);225225- if (data)224224+ if (of_machine_device_match(allowlist)) {225225+ data = of_machine_get_match_data(allowlist);226226 goto create_pdev;227227+ }227228228229 if (cpu0_node_has_opp_v2_prop() && !of_machine_device_match(blocklist))229230 goto create_pdev;
+5-5
drivers/firewire/nosy.c
···36363737static char driver_name[] = KBUILD_MODNAME;38383939+#define RCV_BUFFER_SIZE (16 * 1024)4040+3941/* this is the physical layout of a PCL, its size is 128 bytes */4042struct pcl {4143 __le32 next;···519517 lynx->rcv_start_pcl, lynx->rcv_start_pcl_bus);520518 dma_free_coherent(&lynx->pci_device->dev, sizeof(struct pcl),521519 lynx->rcv_pcl, lynx->rcv_pcl_bus);522522- dma_free_coherent(&lynx->pci_device->dev, PAGE_SIZE, lynx->rcv_buffer,523523- lynx->rcv_buffer_bus);520520+ dma_free_coherent(&lynx->pci_device->dev, RCV_BUFFER_SIZE,521521+ lynx->rcv_buffer, lynx->rcv_buffer_bus);524522525523 iounmap(lynx->registers);526524 pci_disable_device(dev);527525 lynx_put(lynx);528526}529529-530530-#define RCV_BUFFER_SIZE (16 * 1024)531527532528static int533529add_card(struct pci_dev *dev, const struct pci_device_id *unused)···680680 dma_free_coherent(&lynx->pci_device->dev, sizeof(struct pcl),681681 lynx->rcv_pcl, lynx->rcv_pcl_bus);682682 if (lynx->rcv_buffer)683683- dma_free_coherent(&lynx->pci_device->dev, PAGE_SIZE,683683+ dma_free_coherent(&lynx->pci_device->dev, RCV_BUFFER_SIZE,684684 lynx->rcv_buffer, lynx->rcv_buffer_bus);685685 iounmap(lynx->registers);686686
···66136613 struct amdgpu_hive_info *hive = NULL;66146614 int r = 0;66156615 bool need_emergency_restart = false;66166616+ /* save the pasid here as the job may be freed before the end of the reset */66176617+ int pasid = job ? job->pasid : -EINVAL;6616661866176619 /*66186620 * If it reaches here because of hang/timeout and a RAS error is···67156713 if (!r) {67166714 struct amdgpu_task_info *ti = NULL;6717671567186718- if (job)67196719- ti = amdgpu_vm_get_task_info_pasid(adev, job->pasid);67166716+ /*67176717+ * The job may already be freed at this point via the sched tdr workqueue so67186718+ * use the cached pasid.67196719+ */67206720+ if (pasid >= 0)67216721+ ti = amdgpu_vm_get_task_info_pasid(adev, pasid);6720672267216723 drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE,67226724 ti ? &ti->task : NULL);
+4-1
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
···3333#include <drm/drm_vblank.h>34343535#include <linux/cc_platform.h>3636+#include <linux/console.h>3637#include <linux/dynamic_debug.h>3738#include <linux/module.h>3839#include <linux/mmu_notifier.h>···27052704 struct drm_device *drm_dev = dev_get_drvdata(dev);2706270527072706 /* do not resume device if it's normal hibernation */27082708- if (!pm_hibernate_is_recovering() && !pm_hibernation_mode_is_suspend())27072707+ if (console_suspend_enabled &&27082708+ !pm_hibernate_is_recovering() &&27092709+ !pm_hibernation_mode_is_suspend())27092710 return 0;2710271127112712 return amdgpu_device_resume(drm_dev, true);
···11181118 if (dc->current_state->res_ctx.pipe_ctx[i].stream_res.audio != NULL)11191119 num_audio++;11201120 }11211121+ if (num_audio >= 1 && clk_mgr->funcs->enable_pme_wa) {11221122+ /*wake AZ from D3 first before access az endpoint*/11231123+ clk_mgr->funcs->enable_pme_wa(clk_mgr);11241124+ }1121112511221126 pipe_ctx->stream_res.audio->funcs->az_enable(pipe_ctx->stream_res.audio);11231123-11241124- if (num_audio >= 1 && clk_mgr->funcs->enable_pme_wa)11251125- /*this is the first audio. apply the PME w/a in order to wake AZ from D3*/11261126- clk_mgr->funcs->enable_pme_wa(clk_mgr);1127112711281128 link_hwss->enable_audio_packet(pipe_ctx);11291129
···5555#define MAX_PHYS_ENCODERS_PER_VIRTUAL \5656 (MAX_H_TILES_PER_DISPLAY * NUM_PHYS_ENCODER_TYPES)57575858-#define MAX_CHANNELS_PER_ENC 45858+#define MAX_CHANNELS_PER_ENC 25959#define MAX_CWB_PER_ENC 260606161#define IDLE_SHORT_TIMEOUT 1···661661 struct dpu_encoder_virt *dpu_enc = to_dpu_encoder_virt(drm_enc);662662 struct msm_drm_private *priv = dpu_enc->base.dev->dev_private;663663 struct msm_display_info *disp_info = &dpu_enc->disp_info;664664+ struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);664665 struct drm_connector *connector;665666 struct drm_connector_state *conn_state;666667 struct drm_framebuffer *fb;···675674676675 dsc = dpu_encoder_get_dsc_config(drm_enc);677676678678- /*679679- * Set DSC number as 1 to mark the enabled status, will be adjusted680680- * in dpu_crtc_get_topology()681681- */682682- if (dsc)683683- topology->num_dsc = 1;677677+ /* We only support 2 DSC mode (with 2 LM and 1 INTF) */678678+ if (dsc) {679679+ /*680680+ * Use 2 DSC encoders, 2 layer mixers and 1 or 2 interfaces681681+ * when Display Stream Compression (DSC) is enabled,682682+ * and when enough DSC blocks are available.683683+ * This is power-optimal and can drive up to (including) 4k684684+ * screens.685685+ */686686+ WARN(topology->num_intf > 2,687687+ "DSC topology cannot support more than 2 interfaces\n");688688+ if (topology->num_intf >= 2 || dpu_kms->catalog->dsc_count >= 2)689689+ topology->num_dsc = 2;690690+ else691691+ topology->num_dsc = 1;692692+ }684693685694 connector = drm_atomic_get_new_connector_for_encoder(state, drm_enc);686695 if (!connector)···21802169{21812170 int i, num_lm;21822171 struct dpu_global_state *global_state;21832183- struct dpu_hw_blk *hw_lm[MAX_CHANNELS_PER_ENC];21842184- struct dpu_hw_mixer *hw_mixer[MAX_CHANNELS_PER_ENC];21722172+ struct dpu_hw_blk *hw_lm[2];21732173+ struct dpu_hw_mixer *hw_mixer[2];21852174 struct dpu_hw_ctl *ctl = phys_enc->hw_ctl;2186217521872176 /* reset all mixers for this encoder */
+1-1
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
···302302303303 /* Use merge_3d unless DSC MERGE topology is used */304304 if (phys_enc->split_role == ENC_ROLE_SOLO &&305305- (dpu_cstate->num_mixers != 1) &&305305+ dpu_cstate->num_mixers == CRTC_DUAL_MIXERS &&306306 !dpu_encoder_use_dsc_merge(phys_enc->parent))307307 return BLEND_3D_H_ROW_INT;308308
···8989 */9090struct dpu_hw_cdm_ops {9191 /**9292- * Enable the CDM module9292+ * @enable: Enable the CDM module9393 * @cdm Pointer to chroma down context9494 */9595 int (*enable)(struct dpu_hw_cdm *cdm, struct dpu_hw_cdm_cfg *cfg);96969797 /**9898- * Enable/disable the connection with pingpong9898+ * @bind_pingpong_blk: Enable/disable the connection with pingpong9999 * @cdm Pointer to chroma down context100100 * @pp pingpong block id.101101 */
+53-31
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
···1212#include "dpu_hw_sspp.h"13131414/**1515- * dpu_ctl_mode_sel: Interface mode selection1616- * DPU_CTL_MODE_SEL_VID: Video mode interface1717- * DPU_CTL_MODE_SEL_CMD: Command mode interface1515+ * enum dpu_ctl_mode_sel: Interface mode selection1616+ * @DPU_CTL_MODE_SEL_VID: Video mode interface1717+ * @DPU_CTL_MODE_SEL_CMD: Command mode interface1818 */1919enum dpu_ctl_mode_sel {2020 DPU_CTL_MODE_SEL_VID = 0,···3737 * struct dpu_hw_intf_cfg :Describes how the DPU writes data to output interface3838 * @intf : Interface id3939 * @intf_master: Master interface id in the dual pipe topology4040+ * @wb: Writeback mode4041 * @mode_3d: 3d mux configuration4142 * @merge_3d: 3d merge block used4243 * @intf_mode_sel: Interface mode, cmd / vid···6564 */6665struct dpu_hw_ctl_ops {6766 /**6868- * kickoff hw operation for Sw controlled interfaces6767+ * @trigger_start: kickoff hw operation for Sw controlled interfaces6968 * DSI cmd mode and WB interface are SW controlled7069 * @ctx : ctl path ctx pointer7170 */7271 void (*trigger_start)(struct dpu_hw_ctl *ctx);73727473 /**7575- * check if the ctl is started7474+ * @is_started: check if the ctl is started7675 * @ctx : ctl path ctx pointer7776 * @Return: true if started, false if stopped7877 */7978 bool (*is_started)(struct dpu_hw_ctl *ctx);80798180 /**8282- * kickoff prepare is in progress hw operation for sw8181+ * @trigger_pending: kickoff prepare is in progress hw operation for sw8382 * controlled interfaces: DSI cmd mode and WB interface8483 * are SW controlled8584 * @ctx : ctl path ctx pointer···8786 void (*trigger_pending)(struct dpu_hw_ctl *ctx);88878988 /**9090- * Clear the value of the cached pending_flush_mask8989+ * @clear_pending_flush: Clear the value of the cached pending_flush_mask9190 * No effect on hardware.9291 * Required to be implemented.9392 * @ctx : ctl path ctx pointer···9594 void (*clear_pending_flush)(struct dpu_hw_ctl *ctx);96959796 /**9898- * Query the value of the cached pending_flush_mask9797+ * @get_pending_flush: Query the value of the cached pending_flush_mask9998 * No effect on hardware10099 * @ctx : ctl path ctx pointer101100 */102101 u32 (*get_pending_flush)(struct dpu_hw_ctl *ctx);103102104103 /**105105- * OR in the given flushbits to the cached pending_flush_mask104104+ * @update_pending_flush: OR in the given flushbits to the cached105105+ * pending_flush_mask.106106 * No effect on hardware107107 * @ctx : ctl path ctx pointer108108 * @flushbits : module flushmask···112110 u32 flushbits);113111114112 /**115115- * OR in the given flushbits to the cached pending_(wb_)flush_mask113113+ * @update_pending_flush_wb: OR in the given flushbits to the114114+ * cached pending_(wb_)flush_mask.116115 * No effect on hardware117116 * @ctx : ctl path ctx pointer118117 * @blk : writeback block index···122119 enum dpu_wb blk);123120124121 /**125125- * OR in the given flushbits to the cached pending_(cwb_)flush_mask122122+ * @update_pending_flush_cwb: OR in the given flushbits to the123123+ * cached pending_(cwb_)flush_mask.126124 * No effect on hardware127125 * @ctx : ctl path ctx pointer128126 * @blk : concurrent writeback block index···132128 enum dpu_cwb blk);133129134130 /**135135- * OR in the given flushbits to the cached pending_(intf_)flush_mask131131+ * @update_pending_flush_intf: OR in the given flushbits to the132132+ * cached pending_(intf_)flush_mask.136133 * No effect on hardware137134 * @ctx : ctl path ctx pointer138135 * @blk : interface block index···142137 enum dpu_intf blk);143138144139 /**145145- * OR in the given flushbits to the cached pending_(periph_)flush_mask140140+ * @update_pending_flush_periph: OR in the given flushbits to the141141+ * cached pending_(periph_)flush_mask.146142 * No effect on hardware147143 * @ctx : ctl path ctx pointer148144 * @blk : interface block index···152146 enum dpu_intf blk);153147154148 /**155155- * OR in the given flushbits to the cached pending_(merge_3d_)flush_mask149149+ * @update_pending_flush_merge_3d: OR in the given flushbits to the150150+ * cached pending_(merge_3d_)flush_mask.156151 * No effect on hardware157152 * @ctx : ctl path ctx pointer158153 * @blk : interface block index···162155 enum dpu_merge_3d blk);163156164157 /**165165- * OR in the given flushbits to the cached pending_flush_mask158158+ * @update_pending_flush_sspp: OR in the given flushbits to the159159+ * cached pending_flush_mask.166160 * No effect on hardware167161 * @ctx : ctl path ctx pointer168162 * @blk : SSPP block index···172164 enum dpu_sspp blk);173165174166 /**175175- * OR in the given flushbits to the cached pending_flush_mask167167+ * @update_pending_flush_mixer: OR in the given flushbits to the168168+ * cached pending_flush_mask.176169 * No effect on hardware177170 * @ctx : ctl path ctx pointer178171 * @blk : LM block index···182173 enum dpu_lm blk);183174184175 /**185185- * OR in the given flushbits to the cached pending_flush_mask176176+ * @update_pending_flush_dspp: OR in the given flushbits to the177177+ * cached pending_flush_mask.186178 * No effect on hardware187179 * @ctx : ctl path ctx pointer188180 * @blk : DSPP block index···193183 enum dpu_dspp blk, u32 dspp_sub_blk);194184195185 /**196196- * OR in the given flushbits to the cached pending_(dsc_)flush_mask186186+ * @update_pending_flush_dsc: OR in the given flushbits to the187187+ * cached pending_(dsc_)flush_mask.197188 * No effect on hardware198189 * @ctx: ctl path ctx pointer199190 * @blk: interface block index···203192 enum dpu_dsc blk);204193205194 /**206206- * OR in the given flushbits to the cached pending_(cdm_)flush_mask195195+ * @update_pending_flush_cdm: OR in the given flushbits to the196196+ * cached pending_(cdm_)flush_mask.207197 * No effect on hardware208198 * @ctx: ctl path ctx pointer209199 * @cdm_num: idx of cdm to be flushed···212200 void (*update_pending_flush_cdm)(struct dpu_hw_ctl *ctx, enum dpu_cdm cdm_num);213201214202 /**215215- * Write the value of the pending_flush_mask to hardware203203+ * @trigger_flush: Write the value of the pending_flush_mask to hardware216204 * @ctx : ctl path ctx pointer217205 */218206 void (*trigger_flush)(struct dpu_hw_ctl *ctx);219207220208 /**221221- * Read the value of the flush register209209+ * @get_flush_register: Read the value of the flush register222210 * @ctx : ctl path ctx pointer223211 * @Return: value of the ctl flush register.224212 */225213 u32 (*get_flush_register)(struct dpu_hw_ctl *ctx);226214227215 /**228228- * Setup ctl_path interface config216216+ * @setup_intf_cfg: Setup ctl_path interface config229217 * @ctx230218 * @cfg : interface config structure pointer231219 */···233221 struct dpu_hw_intf_cfg *cfg);234222235223 /**236236- * reset ctl_path interface config224224+ * @reset_intf_cfg: reset ctl_path interface config237225 * @ctx : ctl path ctx pointer238226 * @cfg : interface config structure pointer239227 */240228 void (*reset_intf_cfg)(struct dpu_hw_ctl *ctx,241229 struct dpu_hw_intf_cfg *cfg);242230231231+ /**232232+ * @reset: reset function for this ctl type233233+ */243234 int (*reset)(struct dpu_hw_ctl *c);244235245245- /*246246- * wait_reset_status - checks ctl reset status236236+ /**237237+ * @wait_reset_status: checks ctl reset status247238 * @ctx : ctl path ctx pointer248239 *249240 * This function checks the ctl reset status bit.···257242 int (*wait_reset_status)(struct dpu_hw_ctl *ctx);258243259244 /**260260- * Set all blend stages to disabled245245+ * @clear_all_blendstages: Set all blend stages to disabled261246 * @ctx : ctl path ctx pointer262247 */263248 void (*clear_all_blendstages)(struct dpu_hw_ctl *ctx);264249265250 /**266266- * Configure layer mixer to pipe configuration251251+ * @setup_blendstage: Configure layer mixer to pipe configuration267252 * @ctx : ctl path ctx pointer268253 * @lm : layer mixer enumeration269254 * @cfg : blend stage configuration···271256 void (*setup_blendstage)(struct dpu_hw_ctl *ctx,272257 enum dpu_lm lm, struct dpu_hw_stage_cfg *cfg);273258259259+ /**260260+ * @set_active_fetch_pipes: Set active pipes attached to this CTL261261+ * @ctx: ctl path ctx pointer262262+ * @active_pipes: bitmap of enum dpu_sspp263263+ */274264 void (*set_active_fetch_pipes)(struct dpu_hw_ctl *ctx,275265 unsigned long *fetch_active);276266277267 /**278278- * Set active pipes attached to this CTL268268+ * @set_active_pipes: Set active pipes attached to this CTL279269 * @ctx: ctl path ctx pointer280270 * @active_pipes: bitmap of enum dpu_sspp281271 */···288268 unsigned long *active_pipes);289269290270 /**291291- * Set active layer mixers attached to this CTL271271+ * @set_active_lms: Set active layer mixers attached to this CTL292272 * @ctx: ctl path ctx pointer293273 * @active_lms: bitmap of enum dpu_lm294274 */295275 void (*set_active_lms)(struct dpu_hw_ctl *ctx,296276 unsigned long *active_lms);297297-298277};299278300279/**···308289 * @pending_intf_flush_mask: pending INTF flush309290 * @pending_wb_flush_mask: pending WB flush310291 * @pending_cwb_flush_mask: pending CWB flush292292+ * @pending_periph_flush_mask: pending PERIPH flush293293+ * @pending_merge_3d_flush_mask: pending MERGE 3D flush294294+ * @pending_dspp_flush_mask: pending DSPP flush311295 * @pending_dsc_flush_mask: pending DSC flush312296 * @pending_cdm_flush_mask: pending CDM flush313297 * @mdss_ver: MDSS revision information···342320};343321344322/**345345- * dpu_hw_ctl - convert base object dpu_hw_base to container323323+ * to_dpu_hw_ctl - convert base object dpu_hw_base to container346324 * @hw: Pointer to base hardware block347325 * return: Pointer to hardware block container348326 */
+1-2
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cwb.h
···2828};29293030/**3131- *3231 * struct dpu_hw_cwb_ops : Interface to the cwb hw driver functions3332 * @config_cwb: configure CWB mux3433 */···5354};54555556/**5656- * dpu_hw_cwb - convert base object dpu_hw_base to container5757+ * to_dpu_hw_cwb - convert base object dpu_hw_base to container5758 * @hw: Pointer to base hardware block5859 * return: Pointer to hardware block container5960 */
···2222};23232424/**2525- * struct dpu_hw_pcc - pcc feature structure2525+ * struct dpu_hw_pcc_cfg - pcc feature structure2626 * @r: red coefficients.2727 * @g: green coefficients.2828 * @b: blue coefficients.···4040 */4141struct dpu_hw_dspp_ops {4242 /**4343- * setup_pcc - setup dspp pcc4343+ * @setup_pcc: setup_pcc - setup dspp pcc4444 * @ctx: Pointer to dspp context4545 * @cfg: Pointer to configuration4646 */···6969};70707171/**7272- * dpu_hw_dspp - convert base object dpu_hw_base to container7272+ * to_dpu_hw_dspp - convert base object dpu_hw_base to container7373 * @hw: Pointer to base hardware block7474 * return: Pointer to hardware block container7575 */
+7-13
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
···5757/**5858 * struct dpu_hw_intf_ops : Interface to the interface Hw driver functions5959 * Assumption is these functions will be called after clocks are enabled6060- * @ setup_timing_gen : programs the timing engine6161- * @ setup_prog_fetch : enables/disables the programmable fetch logic6262- * @ enable_timing: enable/disable timing engine6363- * @ get_status: returns if timing engine is enabled or not6464- * @ get_line_count: reads current vertical line counter6060+ * @setup_timing_gen : programs the timing engine6161+ * @setup_prg_fetch : enables/disables the programmable fetch logic6262+ * @enable_timing: enable/disable timing engine6363+ * @get_status: returns if timing engine is enabled or not6464+ * @get_line_count: reads current vertical line counter6565 * @bind_pingpong_blk: enable/disable the connection with pingpong which will6666 * feed pixels to this interface6767 * @setup_misr: enable/disable MISR···7070 * pointer and programs the tear check configuration7171 * @disable_tearcheck: Disables tearcheck block7272 * @connect_external_te: Read, modify, write to either set or clear listening to external TE7373- * Return: 1 if TE was originally connected, 0 if not, or -ERROR7474- * @get_vsync_info: Provides the programmed and current line_count7575- * @setup_autorefresh: Configure and enable the autorefresh config7676- * @get_autorefresh: Retrieve autorefresh config from hardware7777- * Return: 0 on success, -ETIMEDOUT on timeout7373+ * Returns 1 if TE was originally connected, 0 if not, or -ERROR7874 * @vsync_sel: Select vsync signal for tear-effect configuration7575+ * @disable_autorefresh: Disable autorefresh if enabled7976 * @program_intf_cmd_cfg: Program the DPU to interface datapath for command mode8077 */8178struct dpu_hw_intf_ops {···106109107110 void (*vsync_sel)(struct dpu_hw_intf *intf, enum dpu_vsync_source vsync_source);108111109109- /**110110- * Disable autorefresh if enabled111111- */112112 void (*disable_autorefresh)(struct dpu_hw_intf *intf, uint32_t encoder_id, u16 vdisplay);113113114114 void (*program_intf_cmd_cfg)(struct dpu_hw_intf *intf,
+11-12
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h
···2525};26262727/**2828- *2928 * struct dpu_hw_lm_ops : Interface to the mixer Hw driver functions3029 * Assumption is these functions will be called after clocks are enabled3130 */3231struct dpu_hw_lm_ops {3333- /*3434- * Sets up mixer output width and height3232+ /**3333+ * @setup_mixer_out: Sets up mixer output width and height3534 * and border color if enabled3635 */3736 void (*setup_mixer_out)(struct dpu_hw_mixer *ctx,3837 struct dpu_hw_mixer_cfg *cfg);39384040- /*4141- * Alpha blending configuration3939+ /**4040+ * @setup_blend_config: Alpha blending configuration4241 * for the specified stage4342 */4443 void (*setup_blend_config)(struct dpu_hw_mixer *ctx, uint32_t stage,4544 uint32_t fg_alpha, uint32_t bg_alpha, uint32_t blend_op);46454747- /*4848- * Alpha color component selection from either fg or bg4646+ /**4747+ * @setup_alpha_out: Alpha color component selection from either fg or bg4948 */5049 void (*setup_alpha_out)(struct dpu_hw_mixer *ctx, uint32_t mixer_op);51505251 /**5353- * Clear layer mixer to pipe configuration5252+ * @clear_all_blendstages: Clear layer mixer to pipe configuration5453 * @ctx : mixer ctx pointer5554 * Returns: 0 on success or -error5655 */5756 int (*clear_all_blendstages)(struct dpu_hw_mixer *ctx);58575958 /**6060- * Configure layer mixer to pipe configuration5959+ * @setup_blendstage: Configure layer mixer to pipe configuration6160 * @ctx : mixer ctx pointer6261 * @lm : layer mixer enumeration6362 * @stage_cfg : blend stage configuration···6667 struct dpu_hw_stage_cfg *stage_cfg);67686869 /**6969- * setup_border_color : enable/disable border color7070+ * @setup_border_color : enable/disable border color7071 */7172 void (*setup_border_color)(struct dpu_hw_mixer *ctx,7273 struct dpu_mdss_color *color,7374 u8 border_en);74757576 /**7676- * setup_misr: Enable/disable MISR7777+ * @setup_misr: Enable/disable MISR7778 */7879 void (*setup_misr)(struct dpu_hw_mixer *ctx);79808081 /**8181- * collect_misr: Read MISR signature8282+ * @collect_misr: Read MISR signature8283 */8384 int (*collect_misr)(struct dpu_hw_mixer *ctx, u32 *misr_value);8485};
···1212struct dpu_hw_merge_3d;13131414/**1515- *1615 * struct dpu_hw_merge_3d_ops : Interface to the merge_3d Hw driver functions1716 * Assumption is these functions will be called after clocks are enabled1817 * @setup_3d_mode : enable 3D merge
+10-10
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
···3434};35353636/**3737- *3837 * struct dpu_hw_pingpong_ops : Interface to the pingpong Hw driver functions3938 * Assumption is these functions will be called after clocks are enabled4039 * @enable_tearcheck: program and enable tear check block···4344 */4445struct dpu_hw_pingpong_ops {4546 /**4646- * enables vysnc generation and sets up init value of4747+ * @enable_tearcheck: enables vysnc generation and sets up init value of4748 * read pointer and programs the tear check cofiguration4849 */4950 int (*enable_tearcheck)(struct dpu_hw_pingpong *pp,5051 struct dpu_hw_tear_check *cfg);51525253 /**5353- * disables tear check block5454+ * @disable_tearcheck: disables tear check block5455 */5556 int (*disable_tearcheck)(struct dpu_hw_pingpong *pp);56575758 /**5858- * read, modify, write to either set or clear listening to external TE5959+ * @connect_external_te: read, modify, write to either set or clear6060+ * listening to external TE5961 * @Return: 1 if TE was originally connected, 0 if not, or -ERROR6062 */6163 int (*connect_external_te)(struct dpu_hw_pingpong *pp,6264 bool enable_external_te);63656466 /**6565- * Obtain current vertical line counter6767+ * @get_line_count: Obtain current vertical line counter6668 */6769 u32 (*get_line_count)(struct dpu_hw_pingpong *pp);68706971 /**7070- * Disable autorefresh if enabled7272+ * @disable_autorefresh: Disable autorefresh if enabled7173 */7274 void (*disable_autorefresh)(struct dpu_hw_pingpong *pp, uint32_t encoder_id, u16 vdisplay);73757476 /**7575- * Setup dither matix for pingpong block7777+ * @setup_dither: Setup dither matix for pingpong block7678 */7779 void (*setup_dither)(struct dpu_hw_pingpong *pp,7880 struct dpu_hw_dither_cfg *cfg);7981 /**8080- * Enable DSC8282+ * @enable_dsc: Enable DSC8183 */8284 int (*enable_dsc)(struct dpu_hw_pingpong *pp);83858486 /**8585- * Disable DSC8787+ * @disable_dsc: Disable DSC8688 */8789 void (*disable_dsc)(struct dpu_hw_pingpong *pp);88908991 /**9090- * Setup DSC9292+ * @setup_dsc: Setup DSC9193 */9294 int (*setup_dsc)(struct dpu_hw_pingpong *pp);9395};
+24-23
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
···14141515#define DPU_SSPP_MAX_PITCH_SIZE 0xffff16161717-/**1717+/*1818 * Flags1919 */2020#define DPU_SSPP_FLIP_LR BIT(0)···2323#define DPU_SSPP_ROT_90 BIT(3)2424#define DPU_SSPP_SOLID_FILL BIT(4)25252626-/**2626+/*2727 * Component indices2828 */2929enum {···3636};37373838/**3939- * DPU_SSPP_RECT_SOLO - multirect disabled4040- * DPU_SSPP_RECT_0 - rect0 of a multirect pipe4141- * DPU_SSPP_RECT_1 - rect1 of a multirect pipe3939+ * enum dpu_sspp_multirect_index - multirect mode4040+ * @DPU_SSPP_RECT_SOLO: multirect disabled4141+ * @DPU_SSPP_RECT_0: rect0 of a multirect pipe4242+ * @DPU_SSPP_RECT_1: rect1 of a multirect pipe4243 *4344 * Note: HW supports multirect with either RECT0 or4445 * RECT1. Considering no benefit of such configs over···144143 * struct dpu_sw_pipe_cfg : software pipe configuration145144 * @src_rect: src ROI, caller takes into account the different operations146145 * such as decimation, flip etc to program this field147147- * @dest_rect: destination ROI.146146+ * @dst_rect: destination ROI.148147 * @rotation: simplified drm rotation hint149148 */150149struct dpu_sw_pipe_cfg {···166165/**167166 * struct dpu_sw_pipe - software pipe description168167 * @sspp: backing SSPP pipe169169- * @index: index of the rectangle of SSPP170170- * @mode: parallel or time multiplex multirect mode168168+ * @multirect_index: index of the rectangle of SSPP169169+ * @multirect_mode: parallel or time multiplex multirect mode171170 */172171struct dpu_sw_pipe {173172 struct dpu_hw_sspp *sspp;···182181 */183182struct dpu_hw_sspp_ops {184183 /**185185- * setup_format - setup pixel format cropping rectangle, flip184184+ * @setup_format: setup pixel format cropping rectangle, flip186185 * @pipe: Pointer to software pipe context187186 * @cfg: Pointer to pipe config structure188187 * @flags: Extra flags for format config···191190 const struct msm_format *fmt, u32 flags);192191193192 /**194194- * setup_rects - setup pipe ROI rectangles193193+ * @setup_rects: setup pipe ROI rectangles195194 * @pipe: Pointer to software pipe context196195 * @cfg: Pointer to pipe config structure197196 */···199198 struct dpu_sw_pipe_cfg *cfg);200199201200 /**202202- * setup_pe - setup pipe pixel extension201201+ * @setup_pe: setup pipe pixel extension203202 * @ctx: Pointer to pipe context204203 * @pe_ext: Pointer to pixel ext settings205204 */···207206 struct dpu_hw_pixel_ext *pe_ext);208207209208 /**210210- * setup_sourceaddress - setup pipe source addresses209209+ * @setup_sourceaddress: setup pipe source addresses211210 * @pipe: Pointer to software pipe context212211 * @layout: format layout information for programming buffer to hardware213212 */···215214 struct dpu_hw_fmt_layout *layout);216215217216 /**218218- * setup_csc - setup color space coversion217217+ * @setup_csc: setup color space coversion219218 * @ctx: Pointer to pipe context220219 * @data: Pointer to config structure221220 */222221 void (*setup_csc)(struct dpu_hw_sspp *ctx, const struct dpu_csc_cfg *data);223222224223 /**225225- * setup_solidfill - enable/disable colorfill224224+ * @setup_solidfill: enable/disable colorfill226225 * @pipe: Pointer to software pipe context227226 * @const_color: Fill color value228227 * @flags: Pipe flags···230229 void (*setup_solidfill)(struct dpu_sw_pipe *pipe, u32 color);231230232231 /**233233- * setup_multirect - setup multirect configuration232232+ * @setup_multirect: setup multirect configuration234233 * @pipe: Pointer to software pipe context235234 */236235237236 void (*setup_multirect)(struct dpu_sw_pipe *pipe);238237239238 /**240240- * setup_sharpening - setup sharpening239239+ * @setup_sharpening: setup sharpening241240 * @ctx: Pointer to pipe context242241 * @cfg: Pointer to config structure243242 */244243 void (*setup_sharpening)(struct dpu_hw_sspp *ctx,245244 struct dpu_hw_sharp_cfg *cfg);246245247247-248246 /**249249- * setup_qos_lut - setup QoS LUTs247247+ * @setup_qos_lut: setup QoS LUTs250248 * @ctx: Pointer to pipe context251249 * @cfg: LUT configuration252250 */···253253 struct dpu_hw_qos_cfg *cfg);254254255255 /**256256- * setup_qos_ctrl - setup QoS control256256+ * @setup_qos_ctrl: setup QoS control257257 * @ctx: Pointer to pipe context258258 * @danger_safe_en: flags controlling enabling of danger/safe QoS/LUT259259 */···261261 bool danger_safe_en);262262263263 /**264264- * setup_clk_force_ctrl - setup clock force control264264+ * @setup_clk_force_ctrl: setup clock force control265265 * @ctx: Pointer to pipe context266266 * @enable: enable clock force if true267267 */···269269 bool enable);270270271271 /**272272- * setup_histogram - setup histograms272272+ * @setup_histogram: setup histograms273273 * @ctx: Pointer to pipe context274274 * @cfg: Pointer to histogram configuration275275 */···277277 void *cfg);278278279279 /**280280- * setup_scaler - setup scaler280280+ * @setup_scaler: setup scaler281281 * @scaler3_cfg: Pointer to scaler configuration282282 * @format: pixel format parameters283283 */···286286 const struct msm_format *format);287287288288 /**289289- * setup_cdp - setup client driven prefetch289289+ * @setup_cdp: setup client driven prefetch290290 * @pipe: Pointer to software pipe context291291 * @fmt: format used by the sw pipe292292 * @enable: whether the CDP should be enabled for this pipe···303303 * @ubwc: UBWC configuration data304304 * @idx: pipe index305305 * @cap: pointer to layer_cfg306306+ * @mdss_ver: MDSS version info to use for feature checks306307 * @ops: pointer to operations possible for this pipe307308 */308309struct dpu_hw_sspp {
+10-11
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
···7777/**7878 * struct dpu_hw_mdp_ops - interface to the MDP TOP Hw driver functions7979 * Assumption is these functions will be called after clocks are enabled.8080- * @setup_split_pipe : Programs the pipe control registers8181- * @setup_pp_split : Programs the pp split control registers8282- * @setup_traffic_shaper : programs traffic shaper control8380 */8481struct dpu_hw_mdp_ops {8585- /** setup_split_pipe() : Registers are not double buffered, thisk8282+ /**8383+ * @setup_split_pipe : Programs the pipe control registers.8484+ * Registers are not double buffered, this8685 * function should be called before timing control enable8786 * @mdp : mdp top context driver8887 * @cfg : upper and lower part of pipe configuration···9091 struct split_pipe_cfg *p);91929293 /**9393- * setup_traffic_shaper() : Setup traffic shaper control9494+ * @setup_traffic_shaper : programs traffic shaper control.9495 * @mdp : mdp top context driver9596 * @cfg : traffic shaper configuration9697 */···9899 struct traffic_shaper_cfg *cfg);99100100101 /**101101- * setup_clk_force_ctrl - set clock force control102102+ * @setup_clk_force_ctrl: set clock force control102103 * @mdp: mdp top context driver103104 * @clk_ctrl: clock to be controlled104105 * @enable: force on enable···108109 enum dpu_clk_ctrl_type clk_ctrl, bool enable);109110110111 /**111111- * get_danger_status - get danger status112112+ * @get_danger_status: get danger status112113 * @mdp: mdp top context driver113114 * @status: Pointer to danger safe status114115 */···116117 struct dpu_danger_safe_status *status);117118118119 /**119119- * setup_vsync_source - setup vsync source configuration details120120+ * @setup_vsync_source: setup vsync source configuration details120121 * @mdp: mdp top context driver121122 * @cfg: vsync source selection configuration122123 */···124125 struct dpu_vsync_source_cfg *cfg);125126126127 /**127127- * get_safe_status - get safe status128128+ * @get_safe_status: get safe status128129 * @mdp: mdp top context driver129130 * @status: Pointer to danger safe status130131 */···132133 struct dpu_danger_safe_status *status);133134134135 /**135135- * dp_phy_intf_sel - configure intf to phy mapping136136+ * @dp_phy_intf_sel: configure intf to phy mapping136137 * @mdp: mdp top context driver137138 * @phys: list of phys the DP interfaces should be connected to. 0 disables the INTF.138139 */139140 void (*dp_phy_intf_sel)(struct dpu_hw_mdp *mdp, enum dpu_dp_phy_sel phys[2]);140141141142 /**142142- * intf_audio_select - select the external interface for audio143143+ * @intf_audio_select: select the external interface for audio143144 * @mdp: mdp top context driver144145 */145146 void (*intf_audio_select)(struct dpu_hw_mdp *mdp);
+8-8
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h
···1717 */1818struct dpu_hw_vbif_ops {1919 /**2020- * set_limit_conf - set transaction limit config2020+ * @set_limit_conf: set transaction limit config2121 * @vbif: vbif context driver2222 * @xin_id: client interface identifier2323 * @rd: true for read limit; false for write limit···2727 u32 xin_id, bool rd, u32 limit);28282929 /**3030- * get_limit_conf - get transaction limit config3030+ * @get_limit_conf: get transaction limit config3131 * @vbif: vbif context driver3232 * @xin_id: client interface identifier3333 * @rd: true for read limit; false for write limit···3737 u32 xin_id, bool rd);38383939 /**4040- * set_halt_ctrl - set halt control4040+ * @set_halt_ctrl: set halt control4141 * @vbif: vbif context driver4242 * @xin_id: client interface identifier4343 * @enable: halt control enable···4646 u32 xin_id, bool enable);47474848 /**4949- * get_halt_ctrl - get halt control4949+ * @get_halt_ctrl: get halt control5050 * @vbif: vbif context driver5151 * @xin_id: client interface identifier5252 * @return: halt control enable···5555 u32 xin_id);56565757 /**5858- * set_qos_remap - set QoS priority remap5858+ * @set_qos_remap: set QoS priority remap5959 * @vbif: vbif context driver6060 * @xin_id: client interface identifier6161 * @level: priority level···6565 u32 xin_id, u32 level, u32 remap_level);66666767 /**6868- * set_mem_type - set memory type6868+ * @set_mem_type: set memory type6969 * @vbif: vbif context driver7070 * @xin_id: client interface identifier7171 * @value: memory type value···7474 u32 xin_id, u32 value);75757676 /**7777- * clear_errors - clear any vbif errors7777+ * @clear_errors: clear any vbif errors7878 * This function clears any detected pending/source errors7979 * on the VBIF interface, and optionally returns the detected8080 * error mask(s).···8686 u32 *pnd_errors, u32 *src_errors);87878888 /**8989- * set_write_gather_en - set write_gather enable8989+ * @set_write_gather_en: set write_gather enable9090 * @vbif: vbif context driver9191 * @xin_id: client interface identifier9292 */
+2-2
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h
···2222};23232424/**2525- *2625 * struct dpu_hw_wb_ops : Interface to the wb hw driver functions2726 * Assumption is these functions will be called after clocks are enabled2827 * @setup_outaddress: setup output address from the writeback job2928 * @setup_outformat: setup output format of writeback block from writeback job2929+ * @setup_roi: setup ROI (Region of Interest) parameters3030 * @setup_qos_lut: setup qos LUT for writeback block based on input3131 * @setup_cdp: setup chroma down prefetch block for writeback block3232 * @setup_clk_force_ctrl: setup clock force control···6161 * struct dpu_hw_wb : WB driver object6262 * @hw: block hardware details6363 * @idx: hardware index number within type6464- * @wb_hw_caps: hardware capabilities6464+ * @caps: hardware capabilities6565 * @ops: function pointers6666 */6767struct dpu_hw_wb {
+41-98
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
···826826 struct dpu_plane_state *pstate = to_dpu_plane_state(new_plane_state);827827 struct dpu_sw_pipe_cfg *pipe_cfg;828828 struct dpu_sw_pipe_cfg *r_pipe_cfg;829829- struct dpu_sw_pipe_cfg init_pipe_cfg;830829 struct drm_rect fb_rect = { 0 };831831- const struct drm_display_mode *mode = &crtc_state->adjusted_mode;832830 uint32_t max_linewidth;833833- u32 num_lm;834834- int stage_id, num_stages;835831836832 min_scale = FRAC_16_16(1, MAX_UPSCALE_RATIO);837833 max_scale = MAX_DOWNSCALE_RATIO << 16;···850854 return -EINVAL;851855 }852856853853- num_lm = dpu_crtc_get_num_lm(crtc_state);854854-857857+ /* move the assignment here, to ease handling to another pairs later */858858+ pipe_cfg = &pstate->pipe_cfg[0];859859+ r_pipe_cfg = &pstate->pipe_cfg[1];855860 /* state->src is 16.16, src_rect is not */856856- drm_rect_fp_to_int(&init_pipe_cfg.src_rect, &new_plane_state->src);861861+ drm_rect_fp_to_int(&pipe_cfg->src_rect, &new_plane_state->src);862862+863863+ pipe_cfg->dst_rect = new_plane_state->dst;857864858865 fb_rect.x2 = new_plane_state->fb->width;859866 fb_rect.y2 = new_plane_state->fb->height;···881882882883 max_linewidth = pdpu->catalog->caps->max_linewidth;883884884884- drm_rect_rotate(&init_pipe_cfg.src_rect,885885+ drm_rect_rotate(&pipe_cfg->src_rect,885886 new_plane_state->fb->width, new_plane_state->fb->height,886887 new_plane_state->rotation);887888888888- /*889889- * We have 1 mixer pair cfg for 1:1:1 and 2:2:1 topology, 2 mixer pair890890- * configs for left and right half screen in case of 4:4:2 topology.891891- * But we may have 2 rect to split wide plane that exceeds limit with 1892892- * config for 2:2:1. So need to handle both wide plane splitting, and893893- * two halves of screen splitting for quad-pipe case. Check dest894894- * rectangle left/right clipping first, then check wide rectangle895895- * splitting in every half next.896896- */897897- num_stages = (num_lm + 1) / 2;898898- /* iterate mixer configs for this plane, to separate left/right with the id */899899- for (stage_id = 0; stage_id < num_stages; stage_id++) {900900- struct drm_rect mixer_rect = {901901- .x1 = stage_id * mode->hdisplay / num_stages,902902- .y1 = 0,903903- .x2 = (stage_id + 1) * mode->hdisplay / num_stages,904904- .y2 = mode->vdisplay905905- };906906- int cfg_idx = stage_id * PIPES_PER_STAGE;907907-908908- pipe_cfg = &pstate->pipe_cfg[cfg_idx];909909- r_pipe_cfg = &pstate->pipe_cfg[cfg_idx + 1];910910-911911- drm_rect_fp_to_int(&pipe_cfg->src_rect, &new_plane_state->src);912912- pipe_cfg->dst_rect = new_plane_state->dst;913913-914914- DPU_DEBUG_PLANE(pdpu, "checking src " DRM_RECT_FMT915915- " vs clip window " DRM_RECT_FMT "\n",916916- DRM_RECT_ARG(&pipe_cfg->src_rect),917917- DRM_RECT_ARG(&mixer_rect));918918-919919- /*920920- * If this plane does not fall into mixer rect, check next921921- * mixer rect.922922- */923923- if (!drm_rect_clip_scaled(&pipe_cfg->src_rect,924924- &pipe_cfg->dst_rect,925925- &mixer_rect)) {926926- memset(pipe_cfg, 0, 2 * sizeof(struct dpu_sw_pipe_cfg));927927-928928- continue;889889+ if ((drm_rect_width(&pipe_cfg->src_rect) > max_linewidth) ||890890+ _dpu_plane_calc_clk(&crtc_state->adjusted_mode, pipe_cfg) > max_mdp_clk_rate) {891891+ if (drm_rect_width(&pipe_cfg->src_rect) > 2 * max_linewidth) {892892+ DPU_DEBUG_PLANE(pdpu, "invalid src " DRM_RECT_FMT " line:%u\n",893893+ DRM_RECT_ARG(&pipe_cfg->src_rect), max_linewidth);894894+ return -E2BIG;929895 }930896931931- pipe_cfg->dst_rect.x1 -= mixer_rect.x1;932932- pipe_cfg->dst_rect.x2 -= mixer_rect.x1;933933-934934- DPU_DEBUG_PLANE(pdpu, "Got clip src:" DRM_RECT_FMT " dst: " DRM_RECT_FMT "\n",935935- DRM_RECT_ARG(&pipe_cfg->src_rect), DRM_RECT_ARG(&pipe_cfg->dst_rect));936936-937937- /* Split wide rect into 2 rect */938938- if ((drm_rect_width(&pipe_cfg->src_rect) > max_linewidth) ||939939- _dpu_plane_calc_clk(mode, pipe_cfg) > max_mdp_clk_rate) {940940-941941- if (drm_rect_width(&pipe_cfg->src_rect) > 2 * max_linewidth) {942942- DPU_DEBUG_PLANE(pdpu, "invalid src " DRM_RECT_FMT " line:%u\n",943943- DRM_RECT_ARG(&pipe_cfg->src_rect), max_linewidth);944944- return -E2BIG;945945- }946946-947947- memcpy(r_pipe_cfg, pipe_cfg, sizeof(struct dpu_sw_pipe_cfg));948948- pipe_cfg->src_rect.x2 = (pipe_cfg->src_rect.x1 + pipe_cfg->src_rect.x2) >> 1;949949- pipe_cfg->dst_rect.x2 = (pipe_cfg->dst_rect.x1 + pipe_cfg->dst_rect.x2) >> 1;950950- r_pipe_cfg->src_rect.x1 = pipe_cfg->src_rect.x2;951951- r_pipe_cfg->dst_rect.x1 = pipe_cfg->dst_rect.x2;952952- DPU_DEBUG_PLANE(pdpu, "Split wide plane into:"953953- DRM_RECT_FMT " and " DRM_RECT_FMT "\n",954954- DRM_RECT_ARG(&pipe_cfg->src_rect),955955- DRM_RECT_ARG(&r_pipe_cfg->src_rect));956956- } else {957957- memset(r_pipe_cfg, 0, sizeof(struct dpu_sw_pipe_cfg));958958- }959959-960960- drm_rect_rotate_inv(&pipe_cfg->src_rect,961961- new_plane_state->fb->width,962962- new_plane_state->fb->height,963963- new_plane_state->rotation);964964-965965- if (drm_rect_width(&r_pipe_cfg->src_rect) != 0)966966- drm_rect_rotate_inv(&r_pipe_cfg->src_rect,967967- new_plane_state->fb->width,968968- new_plane_state->fb->height,969969- new_plane_state->rotation);897897+ *r_pipe_cfg = *pipe_cfg;898898+ pipe_cfg->src_rect.x2 = (pipe_cfg->src_rect.x1 + pipe_cfg->src_rect.x2) >> 1;899899+ pipe_cfg->dst_rect.x2 = (pipe_cfg->dst_rect.x1 + pipe_cfg->dst_rect.x2) >> 1;900900+ r_pipe_cfg->src_rect.x1 = pipe_cfg->src_rect.x2;901901+ r_pipe_cfg->dst_rect.x1 = pipe_cfg->dst_rect.x2;902902+ } else {903903+ memset(r_pipe_cfg, 0, sizeof(*r_pipe_cfg));970904 }905905+906906+ drm_rect_rotate_inv(&pipe_cfg->src_rect,907907+ new_plane_state->fb->width, new_plane_state->fb->height,908908+ new_plane_state->rotation);909909+ if (drm_rect_width(&r_pipe_cfg->src_rect) != 0)910910+ drm_rect_rotate_inv(&r_pipe_cfg->src_rect,911911+ new_plane_state->fb->width, new_plane_state->fb->height,912912+ new_plane_state->rotation);971913972914 pstate->needs_qos_remap = drm_atomic_crtc_needs_modeset(crtc_state);973915···9851045 drm_atomic_get_new_plane_state(state, plane);9861046 struct dpu_plane *pdpu = to_dpu_plane(plane);9871047 struct dpu_plane_state *pstate = to_dpu_plane_state(new_plane_state);988988- struct dpu_sw_pipe *pipe;989989- struct dpu_sw_pipe_cfg *pipe_cfg;990990- int ret = 0, i;10481048+ struct dpu_sw_pipe *pipe = &pstate->pipe[0];10491049+ struct dpu_sw_pipe *r_pipe = &pstate->pipe[1];10501050+ struct dpu_sw_pipe_cfg *pipe_cfg = &pstate->pipe_cfg[0];10511051+ struct dpu_sw_pipe_cfg *r_pipe_cfg = &pstate->pipe_cfg[1];10521052+ int ret = 0;9911053992992- for (i = 0; i < PIPES_PER_PLANE; i++) {993993- pipe = &pstate->pipe[i];994994- pipe_cfg = &pstate->pipe_cfg[i];995995- if (!drm_rect_width(&pipe_cfg->src_rect))996996- continue;997997- DPU_DEBUG_PLANE(pdpu, "pipe %d is in use, validate it\n", i);998998- ret = dpu_plane_atomic_check_pipe(pdpu, pipe, pipe_cfg,10541054+ ret = dpu_plane_atomic_check_pipe(pdpu, pipe, pipe_cfg,10551055+ &crtc_state->adjusted_mode,10561056+ new_plane_state);10571057+ if (ret)10581058+ return ret;10591059+10601060+ if (drm_rect_width(&r_pipe_cfg->src_rect) != 0) {10611061+ ret = dpu_plane_atomic_check_pipe(pdpu, r_pipe, r_pipe_cfg,9991062 &crtc_state->adjusted_mode,10001063 new_plane_state);10011064 if (ret)
+5-1
drivers/gpu/drm/msm/disp/mdp_format.h
···2424#define MSM_FORMAT_FLAG_UNPACK_TIGHT BIT(MSM_FORMAT_FLAG_UNPACK_TIGHT_BIT)2525#define MSM_FORMAT_FLAG_UNPACK_ALIGN_MSB BIT(MSM_FORMAT_FLAG_UNPACK_ALIGN_MSB_BIT)26262727-/**2727+/*2828 * DPU HW,Component order color map2929 */3030enum {···3737/**3838 * struct msm_format: defines the format configuration3939 * @pixel_format: format fourcc4040+ * @bpc_g_y: element bit widths: BPC for G or Y4141+ * @bpc_b_cb: element bit widths: BPC for B or Cb4242+ * @bpc_r_cr: element bit widths: BPC for R or Cr4343+ * @bpc_a: element bit widths: BPC for the alpha channel4044 * @element: element color ordering4145 * @fetch_type: how the color components are packed in pixel format4246 * @chroma_sample: chroma sub-samplng type
+1-1
drivers/gpu/drm/msm/dp/dp_debug.h
···1212#if defined(CONFIG_DEBUG_FS)13131414/**1515- * msm_dp_debug_get() - configure and get the DisplayPlot debug module data1515+ * msm_dp_debug_init() - configure and get the DisplayPlot debug module data1616 *1717 * @dev: device instance of the caller1818 * @panel: instance of panel module
+1
drivers/gpu/drm/msm/dp/dp_drm.c
···1818/**1919 * msm_dp_bridge_detect - callback to determine if connector is connected2020 * @bridge: Pointer to drm bridge structure2121+ * @connector: Pointer to drm connector structure2122 * Returns: Bridge's 'is connected' status2223 */2324static enum drm_connector_status
+5-4
drivers/gpu/drm/msm/dp/dp_link.h
···8080};81818282/**8383- * mdss_dp_test_bit_depth_to_bpp() - convert test bit depth to bpp8383+ * msm_dp_link_bit_depth_to_bpp() - convert test bit depth to bpp8484 * @tbd: test bit depth8585 *8686- * Returns the bits per pixel (bpp) to be used corresponding to the8787- * git bit depth value. This function assumes that bit depth has8686+ * Returns: the bits per pixel (bpp) to be used corresponding to the8787+ * bit depth value. This function assumes that bit depth has8888 * already been validated.8989 */9090static inline u32 msm_dp_link_bit_depth_to_bpp(u32 tbd)···120120121121/**122122 * msm_dp_link_get() - get the functionalities of dp test module123123- *123123+ * @dev: kernel device structure124124+ * @aux: DisplayPort AUX channel124125 *125126 * return: a pointer to msm_dp_link struct126127 */
+4-4
drivers/gpu/drm/msm/dp/dp_panel.h
···63636464/**6565 * is_link_rate_valid() - validates the link rate6666- * @lane_rate: link rate requested by the sink6666+ * @bw_code: link rate requested by the sink6767 *6868- * Returns true if the requested link rate is supported.6868+ * Returns: true if the requested link rate is supported.6969 */7070static inline bool is_link_rate_valid(u32 bw_code)7171{···7676}77777878/**7979- * msm_dp_link_is_lane_count_valid() - validates the lane count7979+ * is_lane_count_valid() - validates the lane count8080 * @lane_count: lane count requested by the sink8181 *8282- * Returns true if the requested lane count is supported.8282+ * Returns: true if the requested lane count is supported.8383 */8484static inline bool is_lane_count_valid(u32 lane_count)8585{
+19-17
drivers/gpu/drm/msm/msm_fence.h
···1616 * incrementing fence seqno at the end of each submit1717 */1818struct msm_fence_context {1919+ /** @dev: the drm device */1920 struct drm_device *dev;2020- /** name: human readable name for fence timeline */2121+ /** @name: human readable name for fence timeline */2122 char name[32];2222- /** context: see dma_fence_context_alloc() */2323+ /** @context: see dma_fence_context_alloc() */2324 unsigned context;2424- /** index: similar to context, but local to msm_fence_context's */2525+ /** @index: similar to context, but local to msm_fence_context's */2526 unsigned index;2626-2727 /**2828- * last_fence:2929- *2828+ * @last_fence:3029 * Last assigned fence, incremented each time a fence is created3130 * on this fence context. If last_fence == completed_fence,3231 * there is no remaining pending work3332 */3433 uint32_t last_fence;3535-3634 /**3737- * completed_fence:3838- *3535+ * @completed_fence:3936 * The last completed fence, updated from the CPU after interrupt4037 * from GPU4138 */4239 uint32_t completed_fence;4343-4440 /**4545- * fenceptr:4646- *4141+ * @fenceptr:4742 * The address that the GPU directly writes with completed fence4843 * seqno. This can be ahead of completed_fence. We can peek at4944 * this to see if a fence has already signaled but the CPU hasn't···4651 */4752 volatile uint32_t *fenceptr;48535454+ /**5555+ * @spinlock: fence context spinlock5656+ */4957 spinlock_t spinlock;50585159 /*···5759 * don't queue, so maybe that is ok5860 */59616060- /** next_deadline: Time of next deadline */6262+ /** @next_deadline: Time of next deadline */6163 ktime_t next_deadline;6262-6364 /**6464- * next_deadline_fence:6565- *6565+ * @next_deadline_fence:6666 * Fence value for next pending deadline. The deadline timer is6767 * canceled when this fence is signaled.6868 */6969 uint32_t next_deadline_fence;7070-7070+ /**7171+ * @deadline_timer: tracks nearest deadline of a fence timeline and7272+ * expires just before it.7373+ */7174 struct hrtimer deadline_timer;7575+ /**7676+ * @deadline_work: work to do after deadline_timer expires7777+ */7278 struct kthread_work deadline_work;7379};7480
+4-1
drivers/gpu/drm/msm/msm_gem_vma.c
···6565};66666767/**6868- * struct msm_vma_op - A MAP or UNMAP operation6868+ * struct msm_vm_op - A MAP or UNMAP operation6969 */7070struct msm_vm_op {7171 /** @op: The operation type */···798798 * synchronous operations are supported. In a user managed VM, userspace799799 * handles virtual address allocation, and both async and sync operations800800 * are supported.801801+ *802802+ * Returns: pointer to the created &struct drm_gpuvm on success803803+ * or an ERR_PTR(-errno) on failure.801804 */802805struct drm_gpuvm *803806msm_gem_vm_create(struct drm_device *drm, struct msm_mmu *mmu, const char *name,
+18-50
drivers/gpu/drm/msm/msm_gpu.h
···116116 * struct msm_gpu_devfreq - devfreq related state117117 */118118struct msm_gpu_devfreq {119119- /** devfreq: devfreq instance */119119+ /** @devfreq: devfreq instance */120120 struct devfreq *devfreq;121121-122122- /** lock: lock for "suspended", "busy_cycles", and "time" */121121+ /** @lock: lock for "suspended", "busy_cycles", and "time" */123122 struct mutex lock;124124-125123 /**126126- * idle_freq:127127- *124124+ * @idle_freq:128125 * Shadow frequency used while the GPU is idle. From the PoV of129126 * the devfreq governor, we are continuing to sample busyness and130127 * adjust frequency while the GPU is idle, but we use this shadow···129132 * it is inactive.130133 */131134 unsigned long idle_freq;132132-133135 /**134134- * boost_constraint:135135- *136136+ * @boost_freq:136137 * A PM QoS constraint to boost min freq for a period of time137138 * until the boost expires.138139 */139140 struct dev_pm_qos_request boost_freq;140140-141141 /**142142- * busy_cycles: Last busy counter value, for calculating elapsed busy142142+ * @busy_cycles: Last busy counter value, for calculating elapsed busy143143 * cycles since last sampling period.144144 */145145 u64 busy_cycles;146146-147147- /** time: Time of last sampling period. */146146+ /** @time: Time of last sampling period. */148147 ktime_t time;149149-150150- /** idle_time: Time of last transition to idle: */148148+ /** @idle_time: Time of last transition to idle. */151149 ktime_t idle_time;152152-153150 /**154154- * idle_work:155155- *151151+ * @idle_work:156152 * Used to delay clamping to idle freq on active->idle transition.157153 */158154 struct msm_hrtimer_work idle_work;159159-160155 /**161161- * boost_work:162162- *156156+ * @boost_work:163157 * Used to reset the boost_constraint after the boost period has164158 * elapsed165159 */166160 struct msm_hrtimer_work boost_work;167161168168- /** suspended: tracks if we're suspended */162162+ /** @suspended: tracks if we're suspended */169163 bool suspended;170164};171165···346358struct msm_context {347359 /** @queuelock: synchronizes access to submitqueues list */348360 rwlock_t queuelock;349349-350361 /** @submitqueues: list of &msm_gpu_submitqueue created by userspace */351362 struct list_head submitqueues;352352-353363 /**354364 * @queueid:355355- *356365 * Counter incremented each time a submitqueue is created, used to357366 * assign &msm_gpu_submitqueue.id358367 */359368 int queueid;360360-361369 /**362370 * @closed: The device file associated with this context has been closed.363363- *364371 * Once the device is closed, any submits that have not been written365372 * to the ring buffer are no-op'd.366373 */367374 bool closed;368368-369375 /**370376 * @userspace_managed_vm:371371- *372377 * Has userspace opted-in to userspace managed VM (ie. VM_BIND) via373378 * MSM_PARAM_EN_VM_BIND?374379 */375380 bool userspace_managed_vm;376376-377381 /**378382 * @vm:379379- *380383 * The per-process GPU address-space. Do not access directly, use381384 * msm_context_vm().382385 */383386 struct drm_gpuvm *vm;384384-385385- /** @kref: the reference count */387387+ /** @ref: the reference count */386388 struct kref ref;387387-388389 /**389390 * @seqno:390390- *391391 * A unique per-process sequence number. Used to detect context392392 * switches, without relying on keeping a, potentially dangling,393393 * pointer to the previous context.394394 */395395 int seqno;396396-397396 /**398397 * @sysprof:399399- *400398 * The value of MSM_PARAM_SYSPROF set by userspace. This is401399 * intended to be used by system profiling tools like Mesa's402400 * pps-producer (perfetto), and restricted to CAP_SYS_ADMIN.···397423 * file is closed.398424 */399425 int sysprof;400400-401426 /**402427 * @comm: Overridden task comm, see MSM_PARAM_COMM403428 *404429 * Accessed under msm_gpu::lock405430 */406431 char *comm;407407-408432 /**409433 * @cmdline: Overridden task cmdline, see MSM_PARAM_CMDLINE410434 *411435 * Accessed under msm_gpu::lock412436 */413437 char *cmdline;414414-415438 /**416416- * @elapsed:417417- *439439+ * @elapsed_ns:418440 * The total (cumulative) elapsed time GPU was busy with rendering419441 * from this context in ns.420442 */421443 uint64_t elapsed_ns;422422-423444 /**424445 * @cycles:425425- *426446 * The total (cumulative) GPU cycles elapsed attributed to this427447 * context.428448 */429449 uint64_t cycles;430430-431450 /**432451 * @entities:433433- *434452 * Table of per-priority-level sched entities used by submitqueues435453 * associated with this &drm_file. Because some userspace apps436454 * make assumptions about rendering from multiple gl contexts···432466 * level.433467 */434468 struct drm_sched_entity *entities[NR_SCHED_PRIORITIES * MSM_GPU_MAX_RINGS];435435-436469 /**437470 * @ctx_mem:438438- *439471 * Total amount of memory of GEM buffers with handles attached for440472 * this context.441473 */···443479struct drm_gpuvm *msm_context_vm(struct drm_device *dev, struct msm_context *ctx);444480445481/**446446- * msm_context_is_vm_bind() - has userspace opted in to VM_BIND?482482+ * msm_context_is_vmbind() - has userspace opted in to VM_BIND?447483 *448484 * @ctx: the drm_file context449485 *···451487 * do sparse binding including having multiple, potentially partial,452488 * mappings in the VM. Therefore certain legacy uabi (ie. GET_IOVA,453489 * SET_IOVA) are rejected because they don't have a sensible meaning.490490+ *491491+ * Returns: %true if userspace is managing the VM, %false otherwise.454492 */455493static inline bool456494msm_context_is_vmbind(struct msm_context *ctx)···484518 * This allows generations without preemption (nr_rings==1) to have some485519 * amount of prioritization, and provides more priority levels for gens486520 * that do have preemption.521521+ *522522+ * Returns: %0 on success, %-errno on error.487523 */488524static inline int msm_gpu_convert_priority(struct msm_gpu *gpu, int prio,489525 unsigned *ring_nr, enum drm_sched_priority *sched_prio)···509541}510542511543/**512512- * struct msm_gpu_submitqueues - Userspace created context.544544+ * struct msm_gpu_submitqueue - Userspace created context.513545 *514546 * A submitqueue is associated with a gl context or vk queue (or equiv)515547 * in userspace.
+2-2
drivers/gpu/drm/msm/msm_iommu.c
···364364}365365366366/**367367- * alloc_pt() - Custom page table allocator367367+ * msm_iommu_pagetable_alloc_pt() - Custom page table allocator368368 * @cookie: Cookie passed at page table allocation time.369369 * @size: Size of the page table. This size should be fixed,370370 * and determined at creation time based on the granule size.···416416417417418418/**419419- * free_pt() - Custom page table free function419419+ * msm_iommu_pagetable_free_pt() - Custom page table free function420420 * @cookie: Cookie passed at page table allocation time.421421 * @data: Page table to free.422422 * @size: Size of the page table. This size should be fixed,
+5-5
drivers/gpu/drm/msm/msm_perf.c
···65656666 if ((perf->cnt++ % 32) == 0) {6767 /* Header line: */6868- n = snprintf(ptr, rem, "%%BUSY");6868+ n = scnprintf(ptr, rem, "%%BUSY");6969 ptr += n;7070 rem -= n;71717272 for (i = 0; i < gpu->num_perfcntrs; i++) {7373 const struct msm_gpu_perfcntr *perfcntr = &gpu->perfcntrs[i];7474- n = snprintf(ptr, rem, "\t%s", perfcntr->name);7474+ n = scnprintf(ptr, rem, "\t%s", perfcntr->name);7575 ptr += n;7676 rem -= n;7777 }···9393 return ret;94949595 val = totaltime ? 1000 * activetime / totaltime : 0;9696- n = snprintf(ptr, rem, "%3d.%d%%", val / 10, val % 10);9696+ n = scnprintf(ptr, rem, "%3d.%d%%", val / 10, val % 10);9797 ptr += n;9898 rem -= n;9999100100 for (i = 0; i < ret; i++) {101101 /* cycle counters (I think).. convert to MHz.. */102102 val = cntrs[i] / 10000;103103- n = snprintf(ptr, rem, "\t%5d.%02d",103103+ n = scnprintf(ptr, rem, "\t%5d.%02d",104104 val / 100, val % 100);105105 ptr += n;106106 rem -= n;107107 }108108 }109109110110- n = snprintf(ptr, rem, "\n");110110+ n = scnprintf(ptr, rem, "\n");111111 ptr += n;112112 rem -= n;113113
+1
drivers/gpu/drm/panel/Kconfig
···11651165 tristate "Visionox RM69299"11661166 depends on OF11671167 depends on DRM_MIPI_DSI11681168+ depends on BACKLIGHT_CLASS_DEVICE11681169 help11691170 Say Y here if you want to enable support for Visionox11701171 RM69299 DSI Video Mode panel.
+2
drivers/gpu/drm/panel/panel-sony-td4353-jdi.c
···212212 if (ret)213213 return dev_err_probe(dev, ret, "Failed to get backlight\n");214214215215+ ctx->panel.prepare_prev_first = true;216216+215217 drm_panel_add(&ctx->panel);216218217219 ret = mipi_dsi_attach(dsi);
+35-5
drivers/gpu/drm/tests/drm_atomic_state_test.c
···156156157157 if (connector) {158158 conn_state = drm_atomic_get_connector_state(state, connector);159159- KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);159159+ if (IS_ERR(conn_state))160160+ return PTR_ERR(conn_state);160161161162 ret = drm_atomic_set_crtc_for_connector(conn_state, crtc);162162- KUNIT_EXPECT_EQ(test, ret, 0);163163+ if (ret)164164+ return ret;163165 }164166165167 crtc_state = drm_atomic_get_crtc_state(state, crtc);166166- KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc_state);168168+ if (IS_ERR(crtc_state))169169+ return PTR_ERR(crtc_state);167170168171 ret = drm_atomic_set_mode_for_crtc(crtc_state, &drm_atomic_test_mode);169169- KUNIT_EXPECT_EQ(test, ret, 0);172172+ if (ret)173173+ return ret;170174171175 crtc_state->enable = true;172176 crtc_state->active = true;173177174178 if (connector) {175179 ret = drm_atomic_commit(state);176176- KUNIT_ASSERT_EQ(test, ret, 0);180180+ if (ret)181181+ return ret;177182 } else {178183 // dummy connector mask179184 crtc_state->connector_mask = DRM_TEST_CONN_0;···211206 drm_modeset_acquire_init(&ctx, 0);212207213208 // first modeset to enable209209+retry_set_up:214210 ret = set_up_atomic_state(test, priv, old_conn, &ctx);211211+ if (ret == -EDEADLK) {212212+ ret = drm_modeset_backoff(&ctx);213213+ if (!ret)214214+ goto retry_set_up;215215+ }215216 KUNIT_ASSERT_EQ(test, ret, 0);216217217218 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···288277289278 drm_modeset_acquire_init(&ctx, 0);290279280280+retry_set_up:291281 ret = set_up_atomic_state(test, priv, NULL, &ctx);282282+ if (ret == -EDEADLK) {283283+ ret = drm_modeset_backoff(&ctx);284284+ if (!ret)285285+ goto retry_set_up;286286+ }292287 KUNIT_ASSERT_EQ(test, ret, 0);293288294289 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);295290 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, state);296291292292+retry:297293 crtc_state = drm_atomic_get_crtc_state(state, priv->crtc);294294+ if (PTR_ERR(crtc_state) == -EDEADLK) {295295+ drm_atomic_state_clear(state);296296+ ret = drm_modeset_backoff(&ctx);297297+ if (!ret)298298+ goto retry;299299+ }298300 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc_state);299301300302 crtc_state->encoder_mask = param->encoder_mask;···316292 crtc_state->mode_changed = true;317293318294 ret = drm_atomic_helper_check_modeset(drm, state);295295+ if (ret == -EDEADLK) {296296+ drm_atomic_state_clear(state);297297+ ret = drm_modeset_backoff(&ctx);298298+ if (!ret)299299+ goto retry;300300+ }319301 KUNIT_ASSERT_EQ(test, ret, param->expected_result);320302321303 drm_modeset_drop_locks(&ctx);
···257257258258 drm_modeset_acquire_init(&ctx, 0);259259260260+retry_conn_enable:260261 ret = drm_kunit_helper_enable_crtc_connector(test, drm,261262 crtc, conn,262263 preferred,263264 &ctx);265265+ if (ret == -EDEADLK) {266266+ ret = drm_modeset_backoff(&ctx);267267+ if (!ret)268268+ goto retry_conn_enable;269269+ }264270 KUNIT_ASSERT_EQ(test, ret, 0);265271266272 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···332326333327 drm_modeset_acquire_init(&ctx, 0);334328329329+retry_conn_enable:335330 ret = drm_kunit_helper_enable_crtc_connector(test, drm,336331 crtc, conn,337332 preferred,338333 &ctx);334334+ if (ret == -EDEADLK) {335335+ ret = drm_modeset_backoff(&ctx);336336+ if (!ret)337337+ goto retry_conn_enable;338338+ }339339 KUNIT_ASSERT_EQ(test, ret, 0);340340341341 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···409397410398 drm_modeset_acquire_init(&ctx, 0);411399400400+retry_conn_enable:412401 ret = drm_kunit_helper_enable_crtc_connector(test, drm,413402 crtc, conn,414403 preferred,415404 &ctx);405405+ if (ret == -EDEADLK) {406406+ ret = drm_modeset_backoff(&ctx);407407+ if (!ret)408408+ goto retry_conn_enable;409409+ }416410 KUNIT_ASSERT_EQ(test, ret, 0);417411418412 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···475457 KUNIT_ASSERT_NOT_NULL(test, mode);476458477459 crtc = priv->crtc;460460+461461+retry_conn_enable:478462 ret = drm_kunit_helper_enable_crtc_connector(test, drm,479463 crtc, conn,480464 mode,481465 &ctx);466466+ if (ret == -EDEADLK) {467467+ ret = drm_modeset_backoff(&ctx);468468+ if (!ret)469469+ goto retry_conn_enable;470470+ }482471 KUNIT_ASSERT_EQ(test, ret, 0);483472484473 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···543518544519 drm_modeset_acquire_init(&ctx, 0);545520521521+retry_conn_enable:546522 ret = drm_kunit_helper_enable_crtc_connector(test, drm,547523 crtc, conn,548524 preferred,549525 &ctx);526526+ if (ret == -EDEADLK) {527527+ ret = drm_modeset_backoff(&ctx);528528+ if (!ret)529529+ goto retry_conn_enable;530530+ }550531 KUNIT_ASSERT_EQ(test, ret, 0);551532552533 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···611580 KUNIT_ASSERT_NOT_NULL(test, mode);612581613582 crtc = priv->crtc;583583+584584+retry_conn_enable:614585 ret = drm_kunit_helper_enable_crtc_connector(test, drm,615586 crtc, conn,616587 mode,617588 &ctx);589589+ if (ret == -EDEADLK) {590590+ ret = drm_modeset_backoff(&ctx);591591+ if (!ret)592592+ goto retry_conn_enable;593593+ }618594 KUNIT_ASSERT_EQ(test, ret, 0);619595620596 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···681643682644 drm_modeset_acquire_init(&ctx, 0);683645646646+retry_conn_enable:684647 ret = drm_kunit_helper_enable_crtc_connector(test, drm,685648 crtc, conn,686649 preferred,687650 &ctx);651651+ if (ret == -EDEADLK) {652652+ ret = drm_modeset_backoff(&ctx);653653+ if (!ret)654654+ goto retry_conn_enable;655655+ }688656 KUNIT_ASSERT_EQ(test, ret, 0);689657690658 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···749705 KUNIT_ASSERT_NOT_NULL(test, mode);750706751707 crtc = priv->crtc;708708+709709+retry_conn_enable:752710 ret = drm_kunit_helper_enable_crtc_connector(test, drm,753711 crtc, conn,754712 mode,755713 &ctx);714714+ if (ret == -EDEADLK) {715715+ ret = drm_modeset_backoff(&ctx);716716+ if (!ret)717717+ goto retry_conn_enable;718718+ }756719 KUNIT_ASSERT_EQ(test, ret, 0);757720758721 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···921870922871 drm_modeset_acquire_init(&ctx, 0);923872873873+retry_conn_enable:924874 ret = drm_kunit_helper_enable_crtc_connector(test, drm,925875 crtc, conn,926876 preferred,927877 &ctx);878878+ if (ret == -EDEADLK) {879879+ ret = drm_modeset_backoff(&ctx);880880+ if (!ret)881881+ goto retry_conn_enable;882882+ }928883 KUNIT_ASSERT_EQ(test, ret, 0);929884930885 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···10039461004947 drm_modeset_acquire_init(&ctx, 0);1005948949949+retry_conn_enable:1006950 ret = drm_kunit_helper_enable_crtc_connector(test, drm,1007951 crtc, conn,1008952 preferred,1009953 &ctx);954954+ if (ret == -EDEADLK) {955955+ ret = drm_modeset_backoff(&ctx);956956+ if (!ret)957957+ goto retry_conn_enable;958958+ }1010959 KUNIT_ASSERT_EQ(test, ret, 0);10119601012961 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);···1085102210861023 drm_modeset_acquire_init(&ctx, 0);1087102410251025+retry_conn_enable:10881026 ret = drm_kunit_helper_enable_crtc_connector(test, drm,10891027 crtc, conn,10901028 preferred,10911029 &ctx);10301030+ if (ret == -EDEADLK) {10311031+ ret = drm_modeset_backoff(&ctx);10321032+ if (!ret)10331033+ goto retry_conn_enable;10341034+ }10921035 KUNIT_ASSERT_EQ(test, ret, 0);1093103610941037 conn_state = conn->state;···1138106911391070 drm_modeset_acquire_init(&ctx, 0);1140107110721072+retry_conn_enable:11411073 ret = drm_kunit_helper_enable_crtc_connector(test, drm,11421074 crtc, conn,11431075 preferred,11441076 &ctx);10771077+ if (ret == -EDEADLK) {10781078+ ret = drm_modeset_backoff(&ctx);10791079+ if (!ret)10801080+ goto retry_conn_enable;10811081+ }11451082 KUNIT_ASSERT_EQ(test, ret, 0);1146108311471084 conn_state = conn->state;···1193111811941119 drm_modeset_acquire_init(&ctx, 0);1195112011211121+retry_conn_enable:11961122 ret = drm_kunit_helper_enable_crtc_connector(test, drm,11971123 crtc, conn,11981124 preferred,11991125 &ctx);11261126+ if (ret == -EDEADLK) {11271127+ ret = drm_modeset_backoff(&ctx);11281128+ if (!ret)11291129+ goto retry_conn_enable;11301130+ }12001131 KUNIT_ASSERT_EQ(test, ret, 0);1201113212021133 conn_state = conn->state;···1248116712491168 drm_modeset_acquire_init(&ctx, 0);1250116911701170+retry_conn_enable:12511171 ret = drm_kunit_helper_enable_crtc_connector(test, drm,12521172 crtc, conn,12531173 preferred,12541174 &ctx);11751175+ if (ret == -EDEADLK) {11761176+ ret = drm_modeset_backoff(&ctx);11771177+ if (!ret)11781178+ goto retry_conn_enable;11791179+ }12551180 KUNIT_ASSERT_EQ(test, ret, 0);1256118112571182 conn_state = conn->state;···1305121813061219 drm_modeset_acquire_init(&ctx, 0);1307122012211221+retry_conn_enable:13081222 ret = drm_kunit_helper_enable_crtc_connector(test, drm,13091223 crtc, conn,13101224 preferred,13111225 &ctx);12261226+ if (ret == -EDEADLK) {12271227+ ret = drm_modeset_backoff(&ctx);12281228+ if (!ret)12291229+ goto retry_conn_enable;12301230+ }13121231 KUNIT_ASSERT_EQ(test, ret, 0);1313123213141233 /* You shouldn't be doing that at home. */···1385129213861293 drm_modeset_acquire_init(&ctx, 0);1387129412951295+retry_conn_enable:13881296 ret = drm_kunit_helper_enable_crtc_connector(test, drm,13891297 crtc, conn,13901298 preferred,13911299 &ctx);13001300+ if (ret == -EDEADLK) {13011301+ ret = drm_modeset_backoff(&ctx);13021302+ if (!ret)13031303+ goto retry_conn_enable;13041304+ }13921305 KUNIT_EXPECT_EQ(test, ret, 0);1393130613941307 conn_state = conn->state;···1539144015401441 drm_modeset_acquire_init(&ctx, 0);1541144214431443+retry_conn_enable:15421444 ret = drm_kunit_helper_enable_crtc_connector(test, drm,15431445 crtc, conn,15441446 preferred,15451447 &ctx);14481448+ if (ret == -EDEADLK) {14491449+ ret = drm_modeset_backoff(&ctx);14501450+ if (!ret)14511451+ goto retry_conn_enable;14521452+ }15461453 KUNIT_EXPECT_EQ(test, ret, 0);1547145415481455 conn_state = conn->state;···17741669 drm_modeset_acquire_init(&ctx, 0);1775167017761671 crtc = priv->crtc;16721672+16731673+retry_conn_enable:17771674 ret = drm_kunit_helper_enable_crtc_connector(test, drm,17781675 crtc, conn,17791676 mode,17801677 &ctx);16781678+ if (ret == -EDEADLK) {16791679+ ret = drm_modeset_backoff(&ctx);16801680+ if (!ret)16811681+ goto retry_conn_enable;16821682+ }17811683 KUNIT_EXPECT_EQ(test, ret, 0);1782168417831685 conn_state = conn->state;···1848173618491737 drm_modeset_acquire_init(&ctx, 0);1850173817391739+retry_conn_enable:18511740 ret = drm_kunit_helper_enable_crtc_connector(test, drm,18521741 crtc, conn,18531742 preferred,18541743 &ctx);17441744+ if (ret == -EDEADLK) {17451745+ ret = drm_modeset_backoff(&ctx);17461746+ if (!ret)17471747+ goto retry_conn_enable;17481748+ }18551749 KUNIT_EXPECT_EQ(test, ret, 0);1856175018571751 conn_state = conn->state;···1923180519241806 drm_modeset_acquire_init(&ctx, 0);1925180718081808+retry_conn_enable:19261809 ret = drm_kunit_helper_enable_crtc_connector(test, drm,19271810 crtc, conn,19281811 preferred,19291812 &ctx);18131813+ if (ret == -EDEADLK) {18141814+ ret = drm_modeset_backoff(&ctx);18151815+ if (!ret)18161816+ goto retry_conn_enable;18171817+ }19301818 KUNIT_EXPECT_EQ(test, ret, 0);1931181919321820 conn_state = conn->state;···1989186519901866 drm_modeset_acquire_init(&ctx, 0);1991186718681868+retry_conn_enable:19921869 ret = drm_kunit_helper_enable_crtc_connector(test, drm,19931870 crtc, conn,19941871 preferred,19951872 &ctx);18731873+ if (ret == -EDEADLK) {18741874+ ret = drm_modeset_backoff(&ctx);18751875+ if (!ret)18761876+ goto retry_conn_enable;18771877+ }19961878 KUNIT_EXPECT_EQ(test, ret, 0);1997187919981880 conn_state = conn->state;···2057192720581928 drm_modeset_acquire_init(&ctx, 0);2059192919301930+retry_conn_enable:20601931 ret = drm_kunit_helper_enable_crtc_connector(test, drm,20611932 crtc, conn,20621933 preferred,20631934 &ctx);19351935+ if (ret == -EDEADLK) {19361936+ ret = drm_modeset_backoff(&ctx);19371937+ if (!ret)19381938+ goto retry_conn_enable;19391939+ }20641940 KUNIT_EXPECT_EQ(test, ret, 0);2065194120661942 conn_state = conn->state;···2106197021071971 drm = &priv->drm;21081972 crtc = priv->crtc;19731973+19741974+retry_conn_enable:21091975 ret = drm_kunit_helper_enable_crtc_connector(test, drm,21101976 crtc, conn,21111977 preferred,21121978 &ctx);19791979+ if (ret == -EDEADLK) {19801980+ ret = drm_modeset_backoff(&ctx);19811981+ if (!ret)19821982+ goto retry_conn_enable;19831983+ }21131984 KUNIT_ASSERT_EQ(test, ret, 0);2114198521151986 state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);
+4-11
drivers/gpu/drm/xe/xe_bo.c
···15271527 * always succeed here, as long as we hold the lru lock.15281528 */15291529 spin_lock(&ttm_bo->bdev->lru_lock);15301530- locked = dma_resv_trylock(ttm_bo->base.resv);15301530+ locked = dma_resv_trylock(&ttm_bo->base._resv);15311531 spin_unlock(&ttm_bo->bdev->lru_lock);15321532 xe_assert(xe, locked);15331533···15471547 bo = ttm_to_xe_bo(ttm_bo);15481548 xe_assert(xe_bo_device(bo), !(bo->created && kref_read(&ttm_bo->base.refcount)));1549154915501550- /*15511551- * Corner case where TTM fails to allocate memory and this BOs resv15521552- * still points the VMs resv15531553- */15541554- if (ttm_bo->base.resv != &ttm_bo->base._resv)15551555- return;15561556-15571550 if (!xe_ttm_bo_lock_in_destructor(ttm_bo))15581551 return;15591552···15561563 * TODO: Don't do this for external bos once we scrub them after15571564 * unbind.15581565 */15591559- dma_resv_for_each_fence(&cursor, ttm_bo->base.resv,15661566+ dma_resv_for_each_fence(&cursor, &ttm_bo->base._resv,15601567 DMA_RESV_USAGE_BOOKKEEP, fence) {15611568 if (xe_fence_is_xe_preempt(fence) &&15621569 !dma_fence_is_signaled(fence)) {15631570 if (!replacement)15641571 replacement = dma_fence_get_stub();1565157215661566- dma_resv_replace_fences(ttm_bo->base.resv,15731573+ dma_resv_replace_fences(&ttm_bo->base._resv,15671574 fence->context,15681575 replacement,15691576 DMA_RESV_USAGE_BOOKKEEP);···15711578 }15721579 dma_fence_put(replacement);1573158015741574- dma_resv_unlock(ttm_bo->base.resv);15811581+ dma_resv_unlock(&ttm_bo->base._resv);15751582}1576158315771584static void xe_ttm_bo_delete_mem_notify(struct ttm_buffer_object *ttm_bo)
+1-1
drivers/gpu/drm/xe/xe_device.c
···10561056 * transient and need to be flushed..10571057 */10581058 if (xe_mmio_wait32(>->mmio, XE2_TDF_CTRL, TRANSIENT_FLUSH_REQUEST, 0,10591059- 150, NULL, false))10591059+ 300, NULL, false))10601060 xe_gt_err_once(gt, "TD flush timeout\n");1061106110621062 xe_force_wake_put(gt_to_fw(gt), fw_ref);
+1-1
drivers/gpu/drm/xe/xe_dma_buf.c
···124124 case XE_PL_TT:125125 sgt = drm_prime_pages_to_sg(obj->dev,126126 bo->ttm.ttm->pages,127127- bo->ttm.ttm->num_pages);127127+ obj->size >> PAGE_SHIFT);128128 if (IS_ERR(sgt))129129 return sgt;130130
···15081508 INIT_WORK(&vm->destroy_work, vm_destroy_work_func);1509150915101510 INIT_LIST_HEAD(&vm->preempt.exec_queues);15111511- vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up to uAPI */15111511+ if (flags & XE_VM_FLAG_FAULT_MODE)15121512+ vm->preempt.min_run_period_ms = 0;15131513+ else15141514+ vm->preempt.min_run_period_ms = 5;1512151515131516 for_each_tile(tile, xe, id)15141517 xe_range_fence_tree_init(&vm->rftree[id]);···33253322 return -EINVAL;3326332333273324 if (XE_IOCTL_DBG(xe, args->extensions))33253325+ return -EINVAL;33263326+33273327+ if (XE_IOCTL_DBG(xe, args->num_syncs > DRM_XE_MAX_SYNCS))33283328 return -EINVAL;3329332933303330 if (args->num_binds > 1) {
+1-1
drivers/gpu/drm/xe/xe_vm_types.h
···263263 * @min_run_period_ms: The minimum run period before preempting264264 * an engine again265265 */266266- s64 min_run_period_ms;266266+ unsigned int min_run_period_ms;267267 /** @exec_queues: list of exec queues attached to this VM */268268 struct list_head exec_queues;269269 /** @num_exec_queues: number exec queues attached to this VM */
···167167 Panther Lake (SOC)168168 Wildcat Lake (SOC)169169 Diamond Rapids (SOC)170170+ Nova Lake (PCH)170171171172 This driver can also be built as a module. If so, the module172173 will be called i2c-i801.
···2975297529762976 psmouse_reset(psmouse);29772977 timer_shutdown_sync(&priv->timer);29782978+ disable_delayed_work_sync(&priv->dev3_register_work);29782979 if (priv->dev2)29792980 input_unregister_device(priv->dev2);29802981 if (!IS_ERR_OR_NULL(priv->dev3))
+7
drivers/input/serio/i8042-acpipnpio.h
···11691169 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |11701170 SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)11711171 },11721172+ {11731173+ .matches = {11741174+ DMI_MATCH(DMI_BOARD_NAME, "X5KK45xS_X5SP45xS"),11751175+ },11761176+ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |11771177+ SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)11781178+ },11721179 /*11731180 * A lot of modern Clevo barebones have touchpad and/or keyboard issues11741181 * after suspend fixable with the forcenorestore quirk.
···315315316316config MMC_SDHCI_ESDHC_IMX317317 tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"318318- depends on ARCH_MXC || COMPILE_TEST318318+ depends on ARCH_MXC || ARCH_S32 || COMPILE_TEST319319 depends on MMC_SDHCI_PLTFM320320 depends on OF321321 select MMC_SDHCI_IO_ACCESSORS322322 select MMC_CQHCI323323 help324324 This selects the Freescale eSDHC/uSDHC controller support325325- found on i.MX25, i.MX35 i.MX5x and i.MX6x.325325+ found on i.MX25, i.MX35, i.MX5x, i.MX6x, and S32G.326326327327 If you have a controller with this interface, say Y or M here.328328
···11# SPDX-License-Identifier: GPL-2.0-only2233menuconfig CAN_DEV44- tristate "CAN Device Drivers"44+ bool "CAN Device Drivers"55 default y66 depends on CAN77 help···1717 virtual ones. If you own such devices or plan to use the virtual CAN1818 interfaces to develop applications, say Y here.19192020- To compile as a module, choose M here: the module will be called2121- can-dev.2222-2323-if CAN_DEV2020+if CAN_DEV && CAN24212522config CAN_VCAN2623 tristate "Virtual Local CAN Interface (vcan)"
···10741074 usb_free_urb(urb);10751075out_usb_kill_anchored_urbs:10761076 if (!parent->active_channels) {10771077- usb_kill_anchored_urbs(&dev->tx_submitted);10771077+ usb_kill_anchored_urbs(&parent->rx_submitted);1078107810791079 if (dev->feature & GS_CAN_FEATURE_HW_TIMESTAMP)10801080 gs_usb_timestamp_stop(parent);
-3
drivers/net/dsa/lantiq/lantiq_gswip.c
···444444 if (!priv)445445 return;446446447447- /* disable the switch */448448- gswip_disable_switch(priv);449449-450447 dsa_unregister_switch(priv->ds);451448452449 for (i = 0; i < priv->num_gphy_fw; i++)
···17871787 int xdp_tx_bd_cnt, i, k;17881788 int xdp_tx_frm_cnt = 0;1789178917901790- if (unlikely(test_bit(ENETC_TX_DOWN, &priv->flags)))17901790+ if (unlikely(test_bit(ENETC_TX_DOWN, &priv->flags) ||17911791+ !netif_carrier_ok(ndev)))17911792 return -ENETDOWN;1792179317931794 enetc_lock_mdio();
···1055510555 bool writen_to_tbl = false;1055610556 int ret = 0;10557105571055810558+ if (vlan_id >= VLAN_N_VID)1055910559+ return -EINVAL;1056010560+1055810561 /* When device is resetting or reset failed, firmware is unable to1055910562 * handle mailbox. Just record the vlan id, and remove it after1056010563 * reset finished.
···193193 return -EINVAL;194194195195 for (i = 0; i < ring_num; i++) {196196- if (req->msg.param[i].tqp_index >= vport->nic.kinfo.rss_size) {196196+ if (req->msg.param[i].tqp_index >= vport->nic.kinfo.num_tqps) {197197 dev_err(&hdev->pdev->dev, "tqp index(%u) is out of range(0-%u)\n",198198 req->msg.param[i].tqp_index,199199- vport->nic.kinfo.rss_size - 1U);199199+ vport->nic.kinfo.num_tqps - 1U);200200 return -EINVAL;201201 }202202 }
···342342 rt_dst_entry = &rt->dst;343343 break;344344 case AF_INET6:345345- rt_dst_entry = ipv6_stub->ipv6_dst_lookup_flow(346346- dev_net(netdev), NULL, &fl6, NULL);347347- if (IS_ERR(rt_dst_entry))345345+ if (!IS_ENABLED(CONFIG_IPV6) ||346346+ ip6_dst_lookup(dev_net(netdev), NULL, &rt_dst_entry, &fl6))348347 goto neigh;349348 break;350349 default:···358359359360 neigh_ha_snapshot(addr, n, netdev);360361 ether_addr_copy(dst, addr);362362+ if (attrs->dir == XFRM_DEV_OFFLOAD_OUT &&363363+ is_zero_ether_addr(addr))364364+ neigh_event_send(n, NULL);361365 dst_release(rt_dst_entry);362366 neigh_release(n);363367 return;
-1
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
···68256825 * is already unregistered before changing to NIC profile.68266826 */68276827 if (priv->netdev->reg_state == NETREG_REGISTERED) {68286828- mlx5e_psp_unregister(priv);68296828 unregister_netdev(priv->netdev);68306829 _mlx5e_suspend(adev, false);68316830 } else {
+5-1
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
···939939 sq->dma_fifo_cc = dma_fifo_cc;940940 sq->cc = sqcc;941941942942- netdev_tx_completed_queue(sq->txq, npkts, nbytes);942942+ /* Do not update BQL for TXQs that got replaced by new active ones, as943943+ * netdev_tx_reset_queue() is called for them in mlx5e_activate_txqsq().944944+ */945945+ if (sq == sq->priv->txq2sq[sq->txq_ix])946946+ netdev_tx_completed_queue(sq->txq, npkts, nbytes);943947}944948945949#ifdef CONFIG_MLX5_CORE_IPOIB
···5252#include "devlink.h"5353#include "lag/lag.h"5454#include "en/tc/post_meter.h"5555+#include "fw_reset.h"55565657/* There are two match-all miss flows, one for unicast dst mac and5758 * one for multicast.···39913990 esw = mlx5_devlink_eswitch_get(devlink);39923991 if (IS_ERR(esw))39933992 return PTR_ERR(esw);39933993+39943994+ if (mlx5_fw_reset_in_progress(esw->dev)) {39953995+ NL_SET_ERR_MSG_MOD(extack, "Can't change eswitch mode during firmware reset");39963996+ return -EBUSY;39973997+ }3994399839953999 if (esw_mode_from_devlink(mode, &mlx5_mode))39964000 return -EINVAL;
···22652265 if (!neigh_entry)22662266 return NULL;2267226722682268+ neigh_hold(n);22682269 neigh_entry->key.n = n;22692270 neigh_entry->rif = rif;22702271 INIT_LIST_HEAD(&neigh_entry->nexthop_list);···2275227422762275static void mlxsw_sp_neigh_entry_free(struct mlxsw_sp_neigh_entry *neigh_entry)22772276{22772277+ neigh_release(neigh_entry->key.n);22782278 kfree(neigh_entry);22792279}22802280···28602858 if (!net_work)28612859 return NOTIFY_BAD;2862286028612861+ /* Take a reference to ensure the neighbour won't be destructed until28622862+ * we drop the reference in the work item.28632863+ */28642864+ neigh_clone(n);28652865+28632866 INIT_WORK(&net_work->work, cb);28642867 net_work->mlxsw_sp = router->mlxsw_sp;28652868 net_work->n = n;···28882881 struct net *net;2889288228902883 net = neigh_parms_net(n->parms);28912891-28922892- /* Take a reference to ensure the neighbour won't be destructed until we28932893- * drop the reference in delayed work.28942894- */28952895- neigh_clone(n);28962884 return mlxsw_sp_router_schedule_work(net, router, n,28972885 mlxsw_sp_router_neigh_event_work);28982886}···43224320 if (err)43234321 goto err_neigh_entry_insert;4324432243234323+ neigh_release(old_n);43244324+43254325 read_lock_bh(&n->lock);43264326 nud_state = n->nud_state;43274327 dead = n->dead;···4332432843334329 list_for_each_entry(nh, &neigh_entry->nexthop_list,43344330 neigh_list_node) {43354335- neigh_release(old_n);43364336- neigh_clone(n);43374331 __mlxsw_sp_nexthop_neigh_update(nh, !entry_connected);43384332 mlxsw_sp_nexthop_group_refresh(mlxsw_sp, nh->nhgi->nh_grp);43394333 }43404340-43414341- neigh_release(n);4342433443434335 return 0;43444336···44284428 }44294429 }4430443044314431+ /* Release the reference taken by neigh_lookup() / neigh_create() since44324432+ * neigh_entry already holds one.44334433+ */44344434+ neigh_release(n);44354435+44314436 /* If that is the first nexthop connected to that neigh, add to44324437 * nexthop_neighs_list44334438 */···44594454 struct mlxsw_sp_nexthop *nh)44604455{44614456 struct mlxsw_sp_neigh_entry *neigh_entry = nh->neigh_entry;44624462- struct neighbour *n;4463445744644458 if (!neigh_entry)44654459 return;44664466- n = neigh_entry->key.n;4467446044684461 __mlxsw_sp_nexthop_neigh_update(nh, true);44694462 list_del(&nh->neigh_list_node);···4475447244764473 if (!neigh_entry->connected && list_empty(&neigh_entry->nexthop_list))44774474 mlxsw_sp_neigh_entry_destroy(mlxsw_sp, neigh_entry);44784478-44794479- neigh_release(n);44804475}4481447644824477static bool mlxsw_sp_ipip_netdev_ul_up(struct net_device *ol_dev)
+1-4
drivers/net/ethernet/realtek/r8169_main.c
···2655265526562656static void rtl_prepare_power_down(struct rtl8169_private *tp)26572657{26582658- if (tp->dash_enabled)26592659- return;26602660-26612658 if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||26622659 tp->mac_version == RTL_GIGA_MAC_VER_33)26632660 rtl_ephy_write(tp, 0x19, 0xff64);···48094812 rtl_disable_exit_l1(tp);48104813 rtl_prepare_power_down(tp);4811481448124812- if (tp->dash_type != RTL_DASH_NONE)48154815+ if (tp->dash_type != RTL_DASH_NONE && !tp->saved_wolopts)48134816 rtl8168_driver_stop(tp);48144817}48154818
+2-1
drivers/net/ethernet/ti/Kconfig
···209209 depends on PRU_REMOTEPROC210210 depends on NET_SWITCHDEV211211 depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER212212+ depends on PTP_1588_CLOCK_OPTIONAL212213 help213214 Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem.214215 This subsystem is available on the AM65 SR1.0 platform.···235234 depends on PRU_REMOTEPROC236235 depends on NET_SWITCHDEV237236 select TI_ICSS_IEP238238- imply PTP_1588_CLOCK237237+ depends on PTP_1588_CLOCK_OPTIONAL239238 help240239 Some TI SoCs has Programmable Realtime Unit (PRU) cores which can241240 support Single or Dual Ethernet ports with the help of firmware code
+3
drivers/net/ipvlan/ipvlan_core.c
···737737 struct ethhdr *eth = eth_hdr(skb);738738 rx_handler_result_t ret = RX_HANDLER_PASS;739739740740+ if (unlikely(skb->pkt_type == PACKET_LOOPBACK))741741+ return RX_HANDLER_PASS;742742+740743 if (is_multicast_ether_addr(eth->h_dest)) {741744 if (ipvlan_external_frame(skb, port)) {742745 struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
+1-1
drivers/net/phy/marvell-88q2xxx.c
···698698699699 switch (attr) {700700 case hwmon_temp_max:701701- clamp_val(val, -75000, 180000);701701+ val = clamp(val, -75000, 180000);702702 val = (val / 1000) + 75;703703 val = FIELD_PREP(MDIO_MMD_PCS_MV_TEMP_SENSOR3_INT_THRESH_MASK,704704 val);
-4
drivers/net/phy/realtek/realtek_main.c
···691691692692static int rtl8211f_config_phy_eee(struct phy_device *phydev)693693{694694- /* RTL8211FVD has no PHYCR2 register */695695- if (phydev->drv->phy_id == RTL_8211FVD_PHYID)696696- return 0;697697-698694 /* Disable PHY-mode EEE so LPI is passed to the MAC */699695 return phy_modify_paged(phydev, RTL8211F_PHYCR_PAGE, RTL8211F_PHYCR2,700696 RTL8211F_PHYCR2_PHY_EEE_ENABLE, 0);
+2
drivers/net/phy/sfp.c
···497497 SFP_QUIRK("ALCATELLUCENT", "3FE46541AA", sfp_quirk_2500basex,498498 sfp_fixup_nokia),499499500500+ SFP_QUIRK_F("BIDB", "X-ONU-SFPP", sfp_fixup_potron),501501+500502 // FLYPRO SFP-10GT-CS-30M uses Rollball protocol to talk to the PHY.501503 SFP_QUIRK_F("FLYPRO", "SFP-10GT-CS-30M", sfp_fixup_rollball),502504
+1-1
drivers/nfc/pn533/usb.c
···406406 if (rc || (transferred != sizeof(cmd))) {407407 nfc_err(&phy->udev->dev,408408 "Reader power on cmd error %d\n", rc);409409- return rc;409409+ return rc ?: -EINVAL;410410 }411411412412 rc = usb_submit_urb(phy->in_urb, GFP_KERNEL);
+1-1
drivers/of/fdt.c
···503503 if (!initial_boot_params)504504 return;505505506506- fdt_scan_reserved_mem();507506 fdt_reserve_elfcorehdr();507507+ fdt_scan_reserved_mem();508508509509 /* Process header /memreserve/ fields */510510 for (n = 0; ; n++) {
+2-2
drivers/parisc/sba_iommu.c
···578578 pba &= IOVP_MASK;579579 pba |= (ci >> PAGE_SHIFT) & 0xff; /* move CI (8 bits) into lowest byte */580580581581- pba |= SBA_PDIR_VALID_BIT; /* set "valid" bit */582582- *pdir_ptr = cpu_to_le64(pba); /* swap and store into I/O Pdir */581581+ /* set "valid" bit, swap and store into I/O Pdir */582582+ *pdir_ptr = cpu_to_le64((unsigned long)pba | SBA_PDIR_VALID_BIT);583583584584 /*585585 * If the PDC_MODEL capabilities has Non-coherent IO-PDIR bit set
···577577578578 ret = devm_spi_register_controller(&pdev->dev, host);579579 if (ret) {580580+ mpfs_spi_disable_ints(spi);580581 mpfs_spi_disable(spi);581582 return dev_err_probe(&pdev->dev, ret,582583 "unable to register host for SPI controller\n");
+1-1
drivers/spi/spi-mt65xx.c
···1320132013211321 ret = devm_request_threaded_irq(dev, irq, mtk_spi_interrupt,13221322 mtk_spi_interrupt_thread,13231323- IRQF_TRIGGER_NONE, dev_name(dev), host);13231323+ IRQF_ONESHOT, dev_name(dev), host);13241324 if (ret)13251325 return dev_err_probe(dev, ret, "failed to register irq\n");13261326
+7-4
drivers/spi/spi-sun6i.c
···795795static const struct of_device_id sun6i_spi_match[] = {796796 { .compatible = "allwinner,sun6i-a31-spi", .data = &sun6i_a31_spi_cfg },797797 { .compatible = "allwinner,sun8i-h3-spi", .data = &sun8i_h3_spi_cfg },798798- {799799- .compatible = "allwinner,sun50i-r329-spi",800800- .data = &sun50i_r329_spi_cfg801801- },798798+ { .compatible = "allwinner,sun50i-r329-spi", .data = &sun50i_r329_spi_cfg },799799+ /*800800+ * A523's SPI controller has a combined RX buffer + FIFO counter801801+ * at offset 0x400, instead of split buffer count in FIFO status802802+ * register. But in practice we only care about the FIFO level.803803+ */804804+ { .compatible = "allwinner,sun55i-a523-spi", .data = &sun50i_r329_spi_cfg },802805 {}803806};804807MODULE_DEVICE_TABLE(of, sun6i_spi_match);
···500500 WRITE_ONCE(trip->hysteresis, hyst);501501 thermal_notify_tz_trip_change(tz, trip);502502 /*503503- * If the zone temperature is above or at the trip tmperature, the trip503503+ * If the zone temperature is above or at the trip temperature, the trip504504 * is in the trips_reached list and its threshold is equal to its low505505 * temperature. It needs to stay in that list, but its threshold needs506506 * to be updated and the list ordering may need to be restored.···10431043 * @np: a pointer to a device tree node.10441044 * @type: the thermal cooling device type.10451045 * @devdata: device private data.10461046- * @ops: standard thermal cooling devices callbacks.10461046+ * @ops: standard thermal cooling devices callbacks.10471047 *10481048 * This interface function adds a new thermal cooling device (fan/processor/...)10491049 * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself
···30203020 pdev->dev.dma_mask = &lpc32xx_usbd_dmamask;30213021 retval = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));30223022 if (retval)30233023- return retval;30233023+ goto err_put_client;3024302430253025 udc->board = &lpc32xx_usbddata;30263026···30383038 /* Get IRQs */30393039 for (i = 0; i < 4; i++) {30403040 udc->udp_irq[i] = platform_get_irq(pdev, i);30413041- if (udc->udp_irq[i] < 0)30423042- return udc->udp_irq[i];30413041+ if (udc->udp_irq[i] < 0) {30423042+ retval = udc->udp_irq[i];30433043+ goto err_put_client;30443044+ }30433045 }3044304630453047 udc->udp_baseaddr = devm_platform_ioremap_resource(pdev, 0);30463048 if (IS_ERR(udc->udp_baseaddr)) {30473049 dev_err(udc->dev, "IO map failure\n");30483048- return PTR_ERR(udc->udp_baseaddr);30503050+ retval = PTR_ERR(udc->udp_baseaddr);30513051+ goto err_put_client;30493052 }3050305330513054 /* Get USB device clock */30523055 udc->usb_slv_clk = devm_clk_get(&pdev->dev, NULL);30533056 if (IS_ERR(udc->usb_slv_clk)) {30543057 dev_err(udc->dev, "failed to acquire USB device clock\n");30553055- return PTR_ERR(udc->usb_slv_clk);30583058+ retval = PTR_ERR(udc->usb_slv_clk);30593059+ goto err_put_client;30563060 }3057306130583062 /* Enable USB device clock */30593063 retval = clk_prepare_enable(udc->usb_slv_clk);30603064 if (retval < 0) {30613065 dev_err(udc->dev, "failed to start USB device clock\n");30623062- return retval;30663066+ goto err_put_client;30633067 }3064306830653069 /* Setup deferred workqueue data */···30843080 if (!udc->udca_v_base) {30853081 dev_err(udc->dev, "error getting UDCA region\n");30863082 retval = -ENOMEM;30873087- goto i2c_fail;30833083+ goto err_disable_clk;30883084 }30893085 udc->udca_p_base = dma_handle;30903086 dev_dbg(udc->dev, "DMA buffer(0x%x bytes), P:0x%08x, V:0x%p\n",···30973093 if (!udc->dd_cache) {30983094 dev_err(udc->dev, "error getting DD DMA region\n");30993095 retval = -ENOMEM;31003100- goto dma_alloc_fail;30963096+ goto err_free_dma;31013097 }3102309831033099 /* Clear USB peripheral and initialize gadget endpoints */···31113107 if (retval < 0) {31123108 dev_err(udc->dev, "LP request irq %d failed\n",31133109 udc->udp_irq[IRQ_USB_LP]);31143114- goto irq_req_fail;31103110+ goto err_destroy_pool;31153111 }31163112 retval = devm_request_irq(dev, udc->udp_irq[IRQ_USB_HP],31173113 lpc32xx_usb_hp_irq, 0, "udc_hp", udc);31183114 if (retval < 0) {31193115 dev_err(udc->dev, "HP request irq %d failed\n",31203116 udc->udp_irq[IRQ_USB_HP]);31213121- goto irq_req_fail;31173117+ goto err_destroy_pool;31223118 }3123311931243120 retval = devm_request_irq(dev, udc->udp_irq[IRQ_USB_DEVDMA],···31263122 if (retval < 0) {31273123 dev_err(udc->dev, "DEV request irq %d failed\n",31283124 udc->udp_irq[IRQ_USB_DEVDMA]);31293129- goto irq_req_fail;31253125+ goto err_destroy_pool;31303126 }3131312731323128 /* The transceiver interrupt is used for VBUS detection and will···31373133 if (retval < 0) {31383134 dev_err(udc->dev, "VBUS request irq %d failed\n",31393135 udc->udp_irq[IRQ_USB_ATX]);31403140- goto irq_req_fail;31363136+ goto err_destroy_pool;31413137 }3142313831433139 /* Initialize wait queue */···3146314231473143 retval = usb_add_gadget_udc(dev, &udc->gadget);31483144 if (retval < 0)31493149- goto add_gadget_fail;31453145+ goto err_destroy_pool;3150314631513147 dev_set_drvdata(dev, udc);31523148 device_init_wakeup(dev, 1);···31583154 dev_info(udc->dev, "%s version %s\n", driver_name, DRIVER_VERSION);31593155 return 0;3160315631613161-add_gadget_fail:31623162-irq_req_fail:31573157+err_destroy_pool:31633158 dma_pool_destroy(udc->dd_cache);31643164-dma_alloc_fail:31593159+err_free_dma:31653160 dma_free_coherent(&pdev->dev, UDCA_BUFF_SIZE,31663161 udc->udca_v_base, udc->udca_p_base);31673167-i2c_fail:31623162+err_disable_clk:31683163 clk_disable_unprepare(udc->usb_slv_clk);31643164+err_put_client:31653165+ put_device(&udc->isp1301_i2c_client->dev);31663166+31693167 dev_err(udc->dev, "%s probe failed, %d\n", driver_name, retval);3170316831713169 return retval;···31963190 udc->udca_v_base, udc->udca_p_base);3197319131983192 clk_disable_unprepare(udc->usb_slv_clk);31933193+31943194+ put_device(&udc->isp1301_i2c_client->dev);31993195}3200319632013197#ifdef CONFIG_PM
+10-8
drivers/usb/host/ohci-nxp.c
···169169170170 ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));171171 if (ret)172172- goto fail_disable;172172+ goto err_put_client;173173174174 dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name);175175 if (usb_disabled()) {176176 dev_err(&pdev->dev, "USB is disabled\n");177177 ret = -ENODEV;178178- goto fail_disable;178178+ goto err_put_client;179179 }180180181181 /* Enable USB host clock */···183183 if (IS_ERR(usb_host_clk)) {184184 dev_err(&pdev->dev, "failed to acquire and start USB OHCI clock\n");185185 ret = PTR_ERR(usb_host_clk);186186- goto fail_disable;186186+ goto err_put_client;187187 }188188189189 isp1301_configure();···192192 if (!hcd) {193193 dev_err(&pdev->dev, "Failed to allocate HC buffer\n");194194 ret = -ENOMEM;195195- goto fail_disable;195195+ goto err_put_client;196196 }197197198198 hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);199199 if (IS_ERR(hcd->regs)) {200200 ret = PTR_ERR(hcd->regs);201201- goto fail_resource;201201+ goto err_put_hcd;202202 }203203 hcd->rsrc_start = res->start;204204 hcd->rsrc_len = resource_size(res);···206206 irq = platform_get_irq(pdev, 0);207207 if (irq < 0) {208208 ret = -ENXIO;209209- goto fail_resource;209209+ goto err_put_hcd;210210 }211211212212 ohci_nxp_start_hc();···220220 }221221222222 ohci_nxp_stop_hc();223223-fail_resource:223223+err_put_hcd:224224 usb_put_hcd(hcd);225225-fail_disable:225225+err_put_client:226226+ put_device(&isp1301_i2c_client->dev);226227 isp1301_i2c_client = NULL;227228 return ret;228229}···235234 usb_remove_hcd(hcd);236235 ohci_nxp_stop_hc();237236 usb_put_hcd(hcd);237237+ put_device(&isp1301_i2c_client->dev);238238 isp1301_i2c_client = NULL;239239}240240
+1-1
drivers/usb/host/xhci-dbgtty.c
···554554 * Hang up the TTY. This wakes up any blocked555555 * writers and causes subsequent writes to fail.556556 */557557- tty_vhangup(port->port.tty);557557+ tty_port_tty_vhangup(&port->port);558558559559 tty_unregister_device(dbc_tty_driver, port->minor);560560 xhci_dbc_tty_exit_port(port);
···9696config UCSI_HUAWEI_GAOKUN9797 tristate "UCSI Interface Driver for Huawei Matebook E Go"9898 depends on EC_HUAWEI_GAOKUN9999+ depends on DRM || !DRM99100 select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF100101 help101102 This driver enables UCSI support on the Huawei Matebook E Go tablet,
+3-2
drivers/usb/typec/ucsi/cros_ec_ucsi.c
···105105 return 0;106106}107107108108-static int cros_ucsi_sync_control(struct ucsi *ucsi, u64 cmd, u32 *cci)108108+static int cros_ucsi_sync_control(struct ucsi *ucsi, u64 cmd, u32 *cci,109109+ void *data, size_t size)109110{110111 struct cros_ucsi_data *udata = ucsi_get_drvdata(ucsi);111112 int ret;112113113113- ret = ucsi_sync_control_common(ucsi, cmd, cci);114114+ ret = ucsi_sync_control_common(ucsi, cmd, cci, data, size);114115 switch (ret) {115116 case -EBUSY:116117 /* EC may return -EBUSY if CCI.busy is set.
+4-32
drivers/usb/typec/ucsi/debugfs.c
···3737 case UCSI_SET_USB:3838 case UCSI_SET_POWER_LEVEL:3939 case UCSI_READ_POWER_LEVEL:4040- case UCSI_SET_PDOS:4141- ucsi->message_in_size = 0;4242- ret = ucsi_send_command(ucsi, val);4040+ ret = ucsi_send_command(ucsi, val, NULL, 0);4341 break;4442 case UCSI_GET_CAPABILITY:4543 case UCSI_GET_CONNECTOR_CAPABILITY:···5254 case UCSI_GET_ATTENTION_VDO:5355 case UCSI_GET_CAM_CS:5456 case UCSI_GET_LPM_PPM_INFO:5555- ucsi->message_in_size = sizeof(ucsi->debugfs->response);5656- ret = ucsi_send_command(ucsi, val);5757- memcpy(&ucsi->debugfs->response, ucsi->message_in, sizeof(ucsi->debugfs->response));5757+ ret = ucsi_send_command(ucsi, val,5858+ &ucsi->debugfs->response,5959+ sizeof(ucsi->debugfs->response));5860 break;5961 default:6062 ret = -EOPNOTSUPP;···109111}110112DEFINE_SHOW_ATTRIBUTE(ucsi_vbus_volt);111113112112-static ssize_t ucsi_message_out_write(struct file *file,113113- const char __user *data, size_t count, loff_t *ppos)114114-{115115- struct ucsi *ucsi = file->private_data;116116- int ret;117117-118118- char *buf __free(kfree) = memdup_user_nul(data, count);119119- if (IS_ERR(buf))120120- return PTR_ERR(buf);121121-122122- ucsi->message_out_size = min(count / 2, UCSI_MAX_MESSAGE_OUT_LENGTH);123123- ret = hex2bin(ucsi->message_out, buf, ucsi->message_out_size);124124- if (ret)125125- return ret;126126-127127- return count;128128-}129129-130130-static const struct file_operations ucsi_message_out_fops = {131131- .open = simple_open,132132- .write = ucsi_message_out_write,133133- .llseek = generic_file_llseek,134134-};135135-136114void ucsi_debugfs_register(struct ucsi *ucsi)137115{138116 ucsi->debugfs = kzalloc(sizeof(*ucsi->debugfs), GFP_KERNEL);···121147 debugfs_create_file("peak_current", 0400, ucsi->debugfs->dentry, ucsi, &ucsi_peak_curr_fops);122148 debugfs_create_file("avg_current", 0400, ucsi->debugfs->dentry, ucsi, &ucsi_avg_curr_fops);123149 debugfs_create_file("vbus_voltage", 0400, ucsi->debugfs->dentry, ucsi, &ucsi_vbus_volt_fops);124124- debugfs_create_file("message_out", 0200, ucsi->debugfs->dentry, ucsi,125125- &ucsi_message_out_fops);126150}127151128152void ucsi_debugfs_unregister(struct ucsi *ucsi)
+3-8
drivers/usb/typec/ucsi/displayport.c
···6767 }68686969 command = UCSI_GET_CURRENT_CAM | UCSI_CONNECTOR_NUMBER(dp->con->num);7070- ucsi->message_in_size = sizeof(cur);7171- ret = ucsi_send_command(ucsi, command);7070+ ret = ucsi_send_command(ucsi, command, &cur, sizeof(cur));7271 if (ret < 0) {7372 if (ucsi->version > 0x0100)7473 goto err_unlock;7574 cur = 0xff;7676- } else {7777- memcpy(&cur, ucsi->message_in, ucsi->message_in_size);7875 }79768077 if (cur != 0xff) {···126129 }127130128131 command = UCSI_CMD_SET_NEW_CAM(dp->con->num, 0, dp->offset, 0);129129- dp->con->ucsi->message_in_size = 0;130130- ret = ucsi_send_command(dp->con->ucsi, command);132132+ ret = ucsi_send_command(dp->con->ucsi, command, NULL, 0);131133 if (ret < 0)132134 goto out_unlock;133135···193197194198 command = UCSI_CMD_SET_NEW_CAM(dp->con->num, 1, dp->offset, pins);195199196196- dp->con->ucsi->message_in_size = 0;197197- return ucsi_send_command(dp->con->ucsi, command);200200+ return ucsi_send_command(dp->con->ucsi, command, NULL, 0);198201}199202200203static int ucsi_displayport_vdm(struct typec_altmode *alt,
+36-82
drivers/usb/typec/ucsi/ucsi.c
···5555}5656EXPORT_SYMBOL_GPL(ucsi_notify_common);57575858-int ucsi_sync_control_common(struct ucsi *ucsi, u64 command, u32 *cci)5858+int ucsi_sync_control_common(struct ucsi *ucsi, u64 command, u32 *cci,5959+ void *data, size_t size)5960{6061 bool ack = UCSI_COMMAND(command) == UCSI_ACK_CC_CI;6162 int ret;···6766 set_bit(COMMAND_PENDING, &ucsi->flags);68676968 reinit_completion(&ucsi->complete);7070-7171- if (ucsi->message_out_size > 0) {7272- if (!ucsi->ops->write_message_out) {7373- ucsi->message_out_size = 0;7474- ret = -EOPNOTSUPP;7575- goto out_clear_bit;7676- }7777-7878- ret = ucsi->ops->write_message_out(ucsi, ucsi->message_out,7979- ucsi->message_out_size);8080- ucsi->message_out_size = 0;8181- if (ret)8282- goto out_clear_bit;8383- }84698570 ret = ucsi->ops->async_control(ucsi, command);8671 if (ret)···8497 if (!ret && cci)8598 ret = ucsi->ops->read_cci(ucsi, cci);86998787- if (!ret && ucsi->message_in_size > 0 &&100100+ if (!ret && data &&88101 (*cci & UCSI_CCI_COMMAND_COMPLETE))8989- ret = ucsi->ops->read_message_in(ucsi, ucsi->message_in,9090- ucsi->message_in_size);102102+ ret = ucsi->ops->read_message_in(ucsi, data, size);9110392104 return ret;93105}···103117 ctrl |= UCSI_ACK_CONNECTOR_CHANGE;104118 }105119106106- ucsi->message_in_size = 0;107107- return ucsi->ops->sync_control(ucsi, ctrl, NULL);120120+ return ucsi->ops->sync_control(ucsi, ctrl, NULL, NULL, 0);108121}109122110110-static int ucsi_run_command(struct ucsi *ucsi, u64 command, u32 *cci, bool conn_ack)123123+static int ucsi_run_command(struct ucsi *ucsi, u64 command, u32 *cci,124124+ void *data, size_t size, bool conn_ack)111125{112126 int ret, err;113127114128 *cci = 0;115129116116- if (ucsi->message_in_size > UCSI_MAX_DATA_LENGTH(ucsi))130130+ if (size > UCSI_MAX_DATA_LENGTH(ucsi))117131 return -EINVAL;118132119119- ret = ucsi->ops->sync_control(ucsi, command, cci);133133+ ret = ucsi->ops->sync_control(ucsi, command, cci, data, size);120134121121- if (*cci & UCSI_CCI_BUSY) {122122- ucsi->message_in_size = 0;123123- return ucsi_run_command(ucsi, UCSI_CANCEL, cci, false) ?: -EBUSY;124124- }135135+ if (*cci & UCSI_CCI_BUSY)136136+ return ucsi_run_command(ucsi, UCSI_CANCEL, cci, NULL, 0, false) ?: -EBUSY;125137 if (ret)126138 return ret;127139···151167 int ret;152168153169 command = UCSI_GET_ERROR_STATUS | UCSI_CONNECTOR_NUMBER(connector_num);154154- ucsi->message_in_size = sizeof(error);155155- ret = ucsi_run_command(ucsi, command, &cci, false);170170+ ret = ucsi_run_command(ucsi, command, &cci, &error, sizeof(error), false);156171 if (ret < 0)157172 return ret;158158-159159- memcpy(&error, ucsi->message_in, sizeof(error));160173161174 switch (error) {162175 case UCSI_ERROR_INCOMPATIBLE_PARTNER:···200219 return -EIO;201220}202221203203-static int ucsi_send_command_common(struct ucsi *ucsi, u64 cmd, bool conn_ack)222222+static int ucsi_send_command_common(struct ucsi *ucsi, u64 cmd,223223+ void *data, size_t size, bool conn_ack)204224{205225 u8 connector_num;206226 u32 cci;···229247230248 mutex_lock(&ucsi->ppm_lock);231249232232- ret = ucsi_run_command(ucsi, cmd, &cci, conn_ack);250250+ ret = ucsi_run_command(ucsi, cmd, &cci, data, size, conn_ack);233251234252 if (cci & UCSI_CCI_ERROR)235253 ret = ucsi_read_error(ucsi, connector_num);···238256 return ret;239257}240258241241-int ucsi_send_command(struct ucsi *ucsi, u64 command)259259+int ucsi_send_command(struct ucsi *ucsi, u64 command,260260+ void *data, size_t size)242261{243243- return ucsi_send_command_common(ucsi, command, false);262262+ return ucsi_send_command_common(ucsi, command, data, size, false);244263}245264EXPORT_SYMBOL_GPL(ucsi_send_command);246265···319336 int i;320337321338 command = UCSI_GET_CURRENT_CAM | UCSI_CONNECTOR_NUMBER(con->num);322322- con->ucsi->message_in_size = sizeof(cur);323323- ret = ucsi_send_command(con->ucsi, command);339339+ ret = ucsi_send_command(con->ucsi, command, &cur, sizeof(cur));324340 if (ret < 0) {325341 if (con->ucsi->version > 0x0100) {326342 dev_err(con->ucsi->dev,···327345 return;328346 }329347 cur = 0xff;330330- } else {331331- memcpy(&cur, con->ucsi->message_in, sizeof(cur));332348 }333349334350 if (cur < UCSI_MAX_ALTMODES)···510530 command |= UCSI_GET_ALTMODE_RECIPIENT(recipient);511531 command |= UCSI_GET_ALTMODE_CONNECTOR_NUMBER(con->num);512532 command |= UCSI_GET_ALTMODE_OFFSET(i);513513- ucsi->message_in_size = sizeof(alt);514514- len = ucsi_send_command(con->ucsi, command);533533+ len = ucsi_send_command(con->ucsi, command, &alt, sizeof(alt));515534 /*516535 * We are collecting all altmodes first and then registering.517536 * Some type-C device will return zero length data beyond last···518539 */519540 if (len < 0)520541 return len;521521-522522- memcpy(&alt, ucsi->message_in, sizeof(alt));523542524543 /* We got all altmodes, now break out and register them */525544 if (!len || !alt.svid)···586609 command |= UCSI_GET_ALTMODE_RECIPIENT(recipient);587610 command |= UCSI_GET_ALTMODE_CONNECTOR_NUMBER(con->num);588611 command |= UCSI_GET_ALTMODE_OFFSET(i);589589- con->ucsi->message_in_size = sizeof(alt);590590- len = ucsi_send_command(con->ucsi, command);612612+ len = ucsi_send_command(con->ucsi, command, alt, sizeof(alt));591613 if (len == -EBUSY)592614 continue;593615 if (len <= 0)594616 return len;595595-596596- memcpy(&alt, con->ucsi->message_in, sizeof(alt));597617598618 /*599619 * This code is requesting one alt mode at a time, but some PPMs···659685 UCSI_MAX_DATA_LENGTH(con->ucsi));660686 int ret;661687662662- con->ucsi->message_in_size = size;663663- ret = ucsi_send_command_common(con->ucsi, command, conn_ack);664664- memcpy(&con->status, con->ucsi->message_in, size);688688+ ret = ucsi_send_command_common(con->ucsi, command, &con->status, size, conn_ack);665689666690 return ret < 0 ? ret : 0;667691}···682710 command |= UCSI_GET_PDOS_PDO_OFFSET(offset);683711 command |= UCSI_GET_PDOS_NUM_PDOS(num_pdos - 1);684712 command |= is_source(role) ? UCSI_GET_PDOS_SRC_PDOS : 0;685685- ucsi->message_in_size = num_pdos * sizeof(u32);686686- ret = ucsi_send_command(ucsi, command);687687- memcpy(pdos + offset, ucsi->message_in, num_pdos * sizeof(u32));713713+ ret = ucsi_send_command(ucsi, command, pdos + offset,714714+ num_pdos * sizeof(u32));688715 if (ret < 0 && ret != -ETIMEDOUT)689716 dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret);690717···770799 command |= UCSI_GET_PD_MESSAGE_BYTES(len);771800 command |= UCSI_GET_PD_MESSAGE_TYPE(type);772801773773- con->ucsi->message_in_size = len;774774- ret = ucsi_send_command(con->ucsi, command);775775- memcpy(data + offset, con->ucsi->message_in, len);802802+ ret = ucsi_send_command(con->ucsi, command, data + offset, len);776803 if (ret < 0)777804 return ret;778805 }···935966 int ret;936967937968 command = UCSI_GET_CABLE_PROPERTY | UCSI_CONNECTOR_NUMBER(con->num);938938- con->ucsi->message_in_size = sizeof(cable_prop);939939- ret = ucsi_send_command(con->ucsi, command);940940- memcpy(&cable_prop, con->ucsi->message_in, sizeof(cable_prop));969969+ ret = ucsi_send_command(con->ucsi, command, &cable_prop, sizeof(cable_prop));941970 if (ret < 0) {942971 dev_err(con->ucsi->dev, "GET_CABLE_PROPERTY failed (%d)\n", ret);943972 return ret;···9961029 return 0;99710309981031 command = UCSI_GET_CONNECTOR_CAPABILITY | UCSI_CONNECTOR_NUMBER(con->num);999999- con->ucsi->message_in_size = sizeof(con->cap);10001000- ret = ucsi_send_command(con->ucsi, command);10011001- memcpy(&con->cap, con->ucsi->message_in, sizeof(con->cap));10321032+ ret = ucsi_send_command(con->ucsi, command, &con->cap, sizeof(con->cap));10021033 if (ret < 0) {10031034 dev_err(con->ucsi->dev, "GET_CONNECTOR_CAPABILITY failed (%d)\n", ret);10041035 return ret;···13801415 else if (con->ucsi->version >= UCSI_VERSION_2_0)13811416 command |= hard ? 0 : UCSI_CONNECTOR_RESET_DATA_VER_2_0;1382141713831383- con->ucsi->message_in_size = 0;13841384- return ucsi_send_command(con->ucsi, command);14181418+ return ucsi_send_command(con->ucsi, command, NULL, 0);13851419}1386142013871421static int ucsi_reset_ppm(struct ucsi *ucsi)···14611497{14621498 int ret;1463149914641464- con->ucsi->message_in_size = 0;14651465- ret = ucsi_send_command(con->ucsi, command);15001500+ ret = ucsi_send_command(con->ucsi, command, NULL, 0);14661501 if (ret == -ETIMEDOUT) {14671502 u64 c;14681503···14691506 ucsi_reset_ppm(con->ucsi);1470150714711508 c = UCSI_SET_NOTIFICATION_ENABLE | con->ucsi->ntfy;14721472- con->ucsi->message_in_size = 0;14731473- ucsi_send_command(con->ucsi, c);15091509+ ucsi_send_command(con->ucsi, c, NULL, 0);1474151014751511 ucsi_reset_connector(con, true);14761512 }···16221660 /* Get connector capability */16231661 command = UCSI_GET_CONNECTOR_CAPABILITY;16241662 command |= UCSI_CONNECTOR_NUMBER(con->num);16251625- ucsi->message_in_size = sizeof(con->cap);16261626- ret = ucsi_send_command(ucsi, command);16631663+ ret = ucsi_send_command(ucsi, command, &con->cap, sizeof(con->cap));16271664 if (ret < 0)16281665 goto out_unlock;16291629-16301630- memcpy(&con->cap, ucsi->message_in, sizeof(con->cap));1631166616321667 if (UCSI_CONCAP(con, OPMODE_DRP))16331668 cap->data = TYPEC_PORT_DRD;···18221863 /* Enable basic notifications */18231864 ntfy = UCSI_ENABLE_NTFY_CMD_COMPLETE | UCSI_ENABLE_NTFY_ERROR;18241865 command = UCSI_SET_NOTIFICATION_ENABLE | ntfy;18251825- ucsi->message_in_size = 0;18261826- ret = ucsi_send_command(ucsi, command);18661866+ ret = ucsi_send_command(ucsi, command, NULL, 0);18271867 if (ret < 0)18281868 goto err_reset;1829186918301870 /* Get PPM capabilities */18311871 command = UCSI_GET_CAPABILITY;18321832- ucsi->message_in_size = BITS_TO_BYTES(UCSI_GET_CAPABILITY_SIZE);18331833- ret = ucsi_send_command(ucsi, command);18721872+ ret = ucsi_send_command(ucsi, command, &ucsi->cap,18731873+ BITS_TO_BYTES(UCSI_GET_CAPABILITY_SIZE));18341874 if (ret < 0)18351875 goto err_reset;18361836-18371837- memcpy(&ucsi->cap, ucsi->message_in, BITS_TO_BYTES(UCSI_GET_CAPABILITY_SIZE));1838187618391877 if (!ucsi->cap.num_connectors) {18401878 ret = -ENODEV;···18621906 /* Enable all supported notifications */18631907 ntfy = ucsi_get_supported_notifications(ucsi);18641908 command = UCSI_SET_NOTIFICATION_ENABLE | ntfy;18651865- ucsi->message_in_size = 0;18661866- ret = ucsi_send_command(ucsi, command);19091909+ ret = ucsi_send_command(ucsi, command, NULL, 0);18671910 if (ret < 0)18681911 goto err_unregister;18691912···1913195819141959 /* Restore UCSI notification enable mask after system resume */19151960 command = UCSI_SET_NOTIFICATION_ENABLE | ucsi->ntfy;19161916- ucsi->message_in_size = 0;19171917- ret = ucsi_send_command(ucsi, command);19611961+ ret = ucsi_send_command(ucsi, command, NULL, 0);19181962 if (ret < 0) {19191963 dev_err(ucsi->dev, "failed to re-enable notifications (%d)\n", ret);19201964 return;
+6-16
drivers/usb/typec/ucsi/ucsi.h
···2929#define UCSI_MESSAGE_OUT 323030#define UCSIv2_MESSAGE_OUT 27231313232-/* Define maximum lengths for message buffers */3333-#define UCSI_MAX_MESSAGE_IN_LENGTH 2563434-#define UCSI_MAX_MESSAGE_OUT_LENGTH 2563535-3632/* UCSI versions */3733#define UCSI_VERSION_1_0 0x01003834#define UCSI_VERSION_1_1 0x0110···6569 * @read_cci: Read CCI register6670 * @poll_cci: Read CCI register while polling with notifications disabled6771 * @read_message_in: Read message data from UCSI6868- * @write_message_out: Write message data to UCSI6972 * @sync_control: Blocking control operation7073 * @async_control: Non-blocking control operation7174 * @update_altmodes: Squashes duplicate DP altmodes···8085 int (*read_cci)(struct ucsi *ucsi, u32 *cci);8186 int (*poll_cci)(struct ucsi *ucsi, u32 *cci);8287 int (*read_message_in)(struct ucsi *ucsi, void *val, size_t val_len);8383- int (*write_message_out)(struct ucsi *ucsi, void *data, size_t data_len);8484- int (*sync_control)(struct ucsi *ucsi, u64 command, u32 *cci);8888+ int (*sync_control)(struct ucsi *ucsi, u64 command, u32 *cci,8989+ void *data, size_t size);8590 int (*async_control)(struct ucsi *ucsi, u64 command);8691 bool (*update_altmodes)(struct ucsi *ucsi, u8 recipient,8792 struct ucsi_altmode *orig,···132137#define UCSI_GET_PD_MESSAGE 0x15133138#define UCSI_GET_CAM_CS 0x18134139#define UCSI_SET_SINK_PATH 0x1c135135-#define UCSI_SET_PDOS 0x1d136140#define UCSI_READ_POWER_LEVEL 0x1e137141#define UCSI_SET_USB 0x21138142#define UCSI_GET_LPM_PPM_INFO 0x22···493499 unsigned long quirks;494500#define UCSI_NO_PARTNER_PDOS BIT(0) /* Don't read partner's PDOs */495501#define UCSI_DELAY_DEVICE_PDOS BIT(1) /* Reading PDOs fails until the parter is in PD mode */496496-497497- /* Fixed-size buffers for incoming and outgoing messages */498498- u8 message_in[UCSI_MAX_MESSAGE_IN_LENGTH];499499- size_t message_in_size;500500- u8 message_out[UCSI_MAX_MESSAGE_OUT_LENGTH];501501- size_t message_out_size;502502};503503504504#define UCSI_MAX_DATA_LENGTH(u) (((u)->version < UCSI_VERSION_2_0) ? 0x10 : 0xff)···555567 struct usb_pd_identity cable_identity;556568};557569558558-int ucsi_send_command(struct ucsi *ucsi, u64 command);570570+int ucsi_send_command(struct ucsi *ucsi, u64 command,571571+ void *retval, size_t size);559572560573void ucsi_altmode_update_active(struct ucsi_connector *con);561574int ucsi_resume(struct ucsi *ucsi);562575563576void ucsi_notify_common(struct ucsi *ucsi, u32 cci);564564-int ucsi_sync_control_common(struct ucsi *ucsi, u64 command, u32 *cci);577577+int ucsi_sync_control_common(struct ucsi *ucsi, u64 command, u32 *cci,578578+ void *data, size_t size);565579566580#if IS_ENABLED(CONFIG_POWER_SUPPLY)567581int ucsi_register_port_psy(struct ucsi_connector *con);
···88888989static int yoga_c630_ucsi_sync_control(struct ucsi *ucsi,9090 u64 command,9191- u32 *cci)9191+ u32 *cci,9292+ void *data, size_t size)9293{9394 int ret;9495···107106 };108107109108 dev_dbg(ucsi->dev, "faking DP altmode for con1\n");110110- memset(ucsi->message_in, 0, ucsi->message_in_size);111111- memcpy(ucsi->message_in, &alt, min(sizeof(alt), ucsi->message_in_size));109109+ memset(data, 0, size);110110+ memcpy(data, &alt, min(sizeof(alt), size));112111 *cci = UCSI_CCI_COMMAND_COMPLETE | UCSI_SET_CCI_LENGTH(sizeof(alt));113112 return 0;114113 }···121120 if (UCSI_COMMAND(command) == UCSI_GET_ALTERNATE_MODES &&122121 UCSI_GET_ALTMODE_GET_CONNECTOR_NUMBER(command) == 2) {123122 dev_dbg(ucsi->dev, "ignoring altmodes for con2\n");124124- memset(ucsi->message_in, 0, ucsi->message_in_size);123123+ memset(data, 0, size);125124 *cci = UCSI_CCI_COMMAND_COMPLETE;126125 return 0;127126 }128127129129- ret = ucsi_sync_control_common(ucsi, command, cci);128128+ ret = ucsi_sync_control_common(ucsi, command, cci, data, size);130129 if (ret < 0)131130 return ret;132131133132 /* UCSI_GET_CURRENT_CAM is off-by-one on all ports */134134- if (UCSI_COMMAND(command) == UCSI_GET_CURRENT_CAM && ucsi->message_in_size > 0)135135- ucsi->message_in[0]--;133133+ if (UCSI_COMMAND(command) == UCSI_GET_CURRENT_CAM && data)134134+ ((u8 *)data)[0]--;136135137136 return ret;138137}
+11-4
drivers/vhost/vsock.c
···6666 return VHOST_VSOCK_DEFAULT_HOST_CID;6767}68686969-/* Callers that dereference the return value must hold vhost_vsock_mutex or the7070- * RCU read lock.6969+/* Callers must be in an RCU read section or hold the vhost_vsock_mutex.7070+ * The return value can only be dereferenced while within the section.7171 */7272static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)7373{7474 struct vhost_vsock *vsock;75757676- hash_for_each_possible_rcu(vhost_vsock_hash, vsock, hash, guest_cid) {7676+ hash_for_each_possible_rcu(vhost_vsock_hash, vsock, hash, guest_cid,7777+ lockdep_is_held(&vhost_vsock_mutex)) {7778 u32 other_cid = vsock->guest_cid;78797980 /* Skip instances that have no CID yet */···710709 * executing.711710 */712711712712+ rcu_read_lock();713713+713714 /* If the peer is still valid, no need to reset connection */714714- if (vhost_vsock_get(vsk->remote_addr.svm_cid))715715+ if (vhost_vsock_get(vsk->remote_addr.svm_cid)) {716716+ rcu_read_unlock();715717 return;718718+ }719719+720720+ rcu_read_unlock();716721717722 /* If the close timeout is pending, let it expire. This avoids races718723 * with the timeout callback.
+2-1
fs/btrfs/file.c
···20192019 else20202020 btrfs_delalloc_release_space(inode, data_reserved, page_start,20212021 reserved_space, true);20222022- extent_changeset_free(data_reserved);20232022out_noreserve:20242023 if (only_release_metadata)20252024 btrfs_check_nocow_unlock(inode);2026202520272026 sb_end_pagefault(inode->vfs_inode.i_sb);20272027+20282028+ extent_changeset_free(data_reserved);2028202920292030 if (ret < 0)20302031 return vmf_error(ret);
+1
fs/btrfs/inode.c
···256256 if (ret < 0) {257257 btrfs_err_rl(fs_info, "failed to lookup extent item for logical %llu: %d",258258 logical, ret);259259+ btrfs_release_path(&path);259260 return;260261 }261262 eb = path.nodes[0];
+4-23
fs/btrfs/qgroup.c
···12431243 btrfs_end_transaction(trans);12441244 else if (trans)12451245 ret = btrfs_end_transaction(trans);12461246-12471247- /*12481248- * At this point we either failed at allocating prealloc, or we12491249- * succeeded and passed the ownership to it to add_qgroup_rb(). In any12501250- * case, this needs to be NULL or there is something wrong.12511251- */12521252- ASSERT(prealloc == NULL);12531253-12461246+ kfree(prealloc);12541247 return ret;12551248}12561249···16751682 ret = btrfs_sysfs_add_one_qgroup(fs_info, qgroup);16761683out:16771684 mutex_unlock(&fs_info->qgroup_ioctl_lock);16781678- /*16791679- * At this point we either failed at allocating prealloc, or we16801680- * succeeded and passed the ownership to it to add_qgroup_rb(). In any16811681- * case, this needs to be NULL or there is something wrong.16821682- */16831683- ASSERT(prealloc == NULL);16851685+ kfree(prealloc);16841686 return ret;16851687}16861688···32673279 struct btrfs_root *quota_root;32683280 struct btrfs_qgroup *srcgroup;32693281 struct btrfs_qgroup *dstgroup;32703270- struct btrfs_qgroup *prealloc = NULL;32823282+ struct btrfs_qgroup *prealloc;32713283 struct btrfs_qgroup_list **qlist_prealloc = NULL;32723284 bool free_inherit = false;32733285 bool need_rescan = false;···35083520 }35093521 if (free_inherit)35103522 kfree(inherit);35113511-35123512- /*35133513- * At this point we either failed at allocating prealloc, or we35143514- * succeeded and passed the ownership to it to add_qgroup_rb(). In any35153515- * case, this needs to be NULL or there is something wrong.35163516- */35173517- ASSERT(prealloc == NULL);35183518-35233523+ kfree(prealloc);35193524 return ret;35203525}35213526
···58655865 struct btrfs_inode *curr_inode = start_inode;58665866 int ret = 0;5867586758685868- /*58695869- * If we are logging a new name, as part of a link or rename operation,58705870- * don't bother logging new dentries, as we just want to log the names58715871- * of an inode and that any new parents exist.58725872- */58735873- if (ctx->logging_new_name)58745874- return 0;58755875-58765868 path = btrfs_alloc_path();58775869 if (!path)58785870 return -ENOMEM;···60436051 return ret;60446052}6045605360546054+static bool can_log_conflicting_inode(const struct btrfs_trans_handle *trans,60556055+ const struct btrfs_inode *inode)60566056+{60576057+ if (!S_ISDIR(inode->vfs_inode.i_mode))60586058+ return true;60596059+60606060+ if (inode->last_unlink_trans < trans->transid)60616061+ return true;60626062+60636063+ /*60646064+ * If this is a directory and its unlink_trans is not from a past60656065+ * transaction then we must fallback to a transaction commit in order60666066+ * to avoid getting a directory with 2 hard links after log replay.60676067+ *60686068+ * This happens if a directory A is renamed, moved from one parent60696069+ * directory to another one, a new file is created in the old parent60706070+ * directory with the old name of our directory A, the new file is60716071+ * fsynced, then we moved the new file to some other parent directory60726072+ * and fsync again the new file. This results in a log tree where we60736073+ * logged that directory A existed, with the INODE_REF item for the60746074+ * new location but without having logged its old parent inode, so60756075+ * that on log replay we add a new link for the new location but the60766076+ * old link remains, resulting in a link count of 2.60776077+ */60786078+ return false;60796079+}60806080+60466081static int add_conflicting_inode(struct btrfs_trans_handle *trans,60476082 struct btrfs_root *root,60486083 struct btrfs_path *path,···61736154 return 0;61746155 }6175615661576157+ if (!can_log_conflicting_inode(trans, inode)) {61586158+ btrfs_add_delayed_iput(inode);61596159+ return BTRFS_LOG_FORCE_COMMIT;61606160+ }61616161+61766162 btrfs_add_delayed_iput(inode);6177616361786164 ino_elem = kmalloc(sizeof(*ino_elem), GFP_NOFS);···62396215 inode = btrfs_iget_logging(parent, root);62406216 if (IS_ERR(inode)) {62416217 ret = PTR_ERR(inode);62186218+ break;62196219+ }62206220+62216221+ if (!can_log_conflicting_inode(trans, inode)) {62226222+ btrfs_add_delayed_iput(inode);62236223+ ret = BTRFS_LOG_FORCE_COMMIT;62426224 break;62436225 }62446226
···547547#define NFSD_SUPPATTR_EXCLCREAT_WORD1 \548548 (NFSD_WRITEABLE_ATTRS_WORD1 & \549549 ~(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET))550550+/*551551+ * The FATTR4_WORD2_TIME_DELEG attributes are not to be allowed for552552+ * OPEN(create) with EXCLUSIVE4_1. It doesn't make sense to set a553553+ * delegated timestamp on a new file.554554+ */550555#define NFSD_SUPPATTR_EXCLCREAT_WORD2 \551551- NFSD_WRITEABLE_ATTRS_WORD2556556+ (NFSD_WRITEABLE_ATTRS_WORD2 & \557557+ ~(FATTR4_WORD2_TIME_DELEG_ACCESS | FATTR4_WORD2_TIME_DELEG_MODIFY))552558553559extern int nfsd4_is_junction(struct dentry *dentry);554560extern int register_cld_notifier(void);
···270270 /*271271 * Include parent/name in notification either if some notification272272 * groups require parent info or the parent is interested in this event.273273+ * The parent interest in ACCESS/MODIFY events does not apply to special274274+ * files, where read/write are not on the filesystem of the parent and275275+ * events can provide an undesirable side-channel for information276276+ * exfiltration.273277 */274274- parent_interested = mask & p_mask & ALL_FSNOTIFY_EVENTS;278278+ parent_interested = mask & p_mask & ALL_FSNOTIFY_EVENTS &&279279+ !(data_type == FSNOTIFY_EVENT_PATH &&280280+ d_is_special(dentry) &&281281+ (mask & (FS_ACCESS | FS_MODIFY)));275282 if (parent_needed || parent_interested) {276283 /* When notifying parent, child should be passed as data */277284 WARN_ON_ONCE(inode != fsnotify_data_inode(data, data_type));
+2-2
fs/smb/client/cifsfs.h
···145145#endif /* CONFIG_CIFS_NFSD_EXPORT */146146147147/* when changing internal version - update following two lines at same time */148148-#define SMB3_PRODUCT_BUILD 57149149-#define CIFS_VERSION "2.57"148148+#define SMB3_PRODUCT_BUILD 58149149+#define CIFS_VERSION "2.58"150150#endif /* _CIFSFS_H */
···242242 * disable[_delayed]_work_sync()243243 */244244 disable_work(&sc->disconnect_work);245245+ disable_work(&sc->connect.work);245246 disable_work(&sc->recv_io.posted.refill_work);246247 disable_delayed_work(&sc->idle.timer_work);247248 disable_work(&sc->idle.immediate_work);···298297 * not queued again but here we don't block and avoid299298 * disable[_delayed]_work_sync()300299 */300300+ disable_work(&sc->connect.work);301301 disable_work(&sc->recv_io.posted.refill_work);302302 disable_work(&sc->idle.immediate_work);303303 disable_delayed_work(&sc->idle.timer_work);···469467 */470468 smb_direct_disconnect_wake_up_all(sc);471469470470+ disable_work_sync(&sc->connect.work);472471 disable_work_sync(&sc->recv_io.posted.refill_work);473472 disable_delayed_work_sync(&sc->idle.timer_work);474473 disable_work_sync(&sc->idle.immediate_work);···638635639636 switch (sc->recv_io.expected) {640637 case SMBDIRECT_EXPECT_NEGOTIATE_REQ:641641- if (wc->byte_len < sizeof(struct smbdirect_negotiate_req)) {642642- put_recvmsg(sc, recvmsg);643643- smb_direct_disconnect_rdma_connection(sc);644644- return;645645- }646646- sc->recv_io.reassembly.full_packet_received = true;647647- /*648648- * Some drivers (at least mlx5_ib) might post a649649- * recv completion before RDMA_CM_EVENT_ESTABLISHED,650650- * we need to adjust our expectation in that case.651651- */652652- if (!sc->first_error && sc->status == SMBDIRECT_SOCKET_RDMA_CONNECT_RUNNING)653653- sc->status = SMBDIRECT_SOCKET_NEGOTIATE_NEEDED;654654- if (SMBDIRECT_CHECK_STATUS_WARN(sc, SMBDIRECT_SOCKET_NEGOTIATE_NEEDED)) {655655- put_recvmsg(sc, recvmsg);656656- smb_direct_disconnect_rdma_connection(sc);657657- return;658658- }659659- sc->status = SMBDIRECT_SOCKET_NEGOTIATE_RUNNING;660660- enqueue_reassembly(sc, recvmsg, 0);661661- wake_up(&sc->status_wait);662662- return;638638+ /* see smb_direct_negotiate_recv_done */639639+ break;663640 case SMBDIRECT_EXPECT_DATA_TRANSFER: {664641 struct smbdirect_data_transfer *data_transfer =665642 (struct smbdirect_data_transfer *)recvmsg->packet;···725742 smb_direct_disconnect_rdma_connection(sc);726743}727744745745+static void smb_direct_negotiate_recv_work(struct work_struct *work);746746+747747+static void smb_direct_negotiate_recv_done(struct ib_cq *cq, struct ib_wc *wc)748748+{749749+ struct smbdirect_recv_io *recv_io =750750+ container_of(wc->wr_cqe, struct smbdirect_recv_io, cqe);751751+ struct smbdirect_socket *sc = recv_io->socket;752752+ unsigned long flags;753753+754754+ /*755755+ * reset the common recv_done for later reuse.756756+ */757757+ recv_io->cqe.done = recv_done;758758+759759+ if (wc->status != IB_WC_SUCCESS || wc->opcode != IB_WC_RECV) {760760+ put_recvmsg(sc, recv_io);761761+ if (wc->status != IB_WC_WR_FLUSH_ERR) {762762+ pr_err("Negotiate Recv error. status='%s (%d)' opcode=%d\n",763763+ ib_wc_status_msg(wc->status), wc->status,764764+ wc->opcode);765765+ smb_direct_disconnect_rdma_connection(sc);766766+ }767767+ return;768768+ }769769+770770+ ksmbd_debug(RDMA, "Negotiate Recv completed. status='%s (%d)', opcode=%d\n",771771+ ib_wc_status_msg(wc->status), wc->status,772772+ wc->opcode);773773+774774+ ib_dma_sync_single_for_cpu(sc->ib.dev,775775+ recv_io->sge.addr,776776+ recv_io->sge.length,777777+ DMA_FROM_DEVICE);778778+779779+ /*780780+ * This is an internal error!781781+ */782782+ if (WARN_ON_ONCE(sc->recv_io.expected != SMBDIRECT_EXPECT_NEGOTIATE_REQ)) {783783+ put_recvmsg(sc, recv_io);784784+ smb_direct_disconnect_rdma_connection(sc);785785+ return;786786+ }787787+788788+ /*789789+ * Don't reset timer to the keepalive interval in790790+ * this will be done in smb_direct_negotiate_recv_work.791791+ */792792+793793+ /*794794+ * Only remember the recv_io if it has enough bytes,795795+ * this gives smb_direct_negotiate_recv_work enough796796+ * information in order to disconnect if it was not797797+ * valid.798798+ */799799+ sc->recv_io.reassembly.full_packet_received = true;800800+ if (wc->byte_len >= sizeof(struct smbdirect_negotiate_req))801801+ enqueue_reassembly(sc, recv_io, 0);802802+ else803803+ put_recvmsg(sc, recv_io);804804+805805+ /*806806+ * Some drivers (at least mlx5_ib and irdma in roce mode)807807+ * might post a recv completion before RDMA_CM_EVENT_ESTABLISHED,808808+ * we need to adjust our expectation in that case.809809+ *810810+ * So we defer further processing of the negotiation811811+ * to smb_direct_negotiate_recv_work().812812+ *813813+ * If we are already in SMBDIRECT_SOCKET_NEGOTIATE_NEEDED814814+ * we queue the work directly otherwise815815+ * smb_direct_cm_handler() will do it, when816816+ * RDMA_CM_EVENT_ESTABLISHED arrived.817817+ */818818+ spin_lock_irqsave(&sc->connect.lock, flags);819819+ if (!sc->first_error) {820820+ INIT_WORK(&sc->connect.work, smb_direct_negotiate_recv_work);821821+ if (sc->status == SMBDIRECT_SOCKET_NEGOTIATE_NEEDED)822822+ queue_work(sc->workqueue, &sc->connect.work);823823+ }824824+ spin_unlock_irqrestore(&sc->connect.lock, flags);825825+}826826+827827+static void smb_direct_negotiate_recv_work(struct work_struct *work)828828+{829829+ struct smbdirect_socket *sc =830830+ container_of(work, struct smbdirect_socket, connect.work);831831+ const struct smbdirect_socket_parameters *sp = &sc->parameters;832832+ struct smbdirect_recv_io *recv_io;833833+834834+ if (sc->first_error)835835+ return;836836+837837+ ksmbd_debug(RDMA, "Negotiate Recv Work running\n");838838+839839+ /*840840+ * Reset timer to the keepalive interval in841841+ * order to trigger our next keepalive message.842842+ */843843+ sc->idle.keepalive = SMBDIRECT_KEEPALIVE_NONE;844844+ mod_delayed_work(sc->workqueue, &sc->idle.timer_work,845845+ msecs_to_jiffies(sp->keepalive_interval_msec));846846+847847+ /*848848+ * If smb_direct_negotiate_recv_done() detected an849849+ * invalid request we want to disconnect.850850+ */851851+ recv_io = get_first_reassembly(sc);852852+ if (!recv_io) {853853+ smb_direct_disconnect_rdma_connection(sc);854854+ return;855855+ }856856+857857+ if (SMBDIRECT_CHECK_STATUS_WARN(sc, SMBDIRECT_SOCKET_NEGOTIATE_NEEDED)) {858858+ smb_direct_disconnect_rdma_connection(sc);859859+ return;860860+ }861861+ sc->status = SMBDIRECT_SOCKET_NEGOTIATE_RUNNING;862862+ wake_up(&sc->status_wait);863863+}864864+728865static int smb_direct_post_recv(struct smbdirect_socket *sc,729866 struct smbdirect_recv_io *recvmsg)730867{···861758 return ret;862759 recvmsg->sge.length = sp->max_recv_size;863760 recvmsg->sge.lkey = sc->ib.pd->local_dma_lkey;864864- recvmsg->cqe.done = recv_done;865761866762 wr.wr_cqe = &recvmsg->cqe;867763 wr.next = NULL;···18341732 struct rdma_cm_event *event)18351733{18361734 struct smbdirect_socket *sc = cm_id->context;17351735+ unsigned long flags;1837173618381737 ksmbd_debug(RDMA, "RDMA CM event. cm_id=%p event=%s (%d)\n",18391738 cm_id, rdma_event_msg(event->event), event->event);···18421739 switch (event->event) {18431740 case RDMA_CM_EVENT_ESTABLISHED: {18441741 /*18451845- * Some drivers (at least mlx5_ib) might post a18461846- * recv completion before RDMA_CM_EVENT_ESTABLISHED,17421742+ * Some drivers (at least mlx5_ib and irdma in roce mode)17431743+ * might post a recv completion before RDMA_CM_EVENT_ESTABLISHED,18471744 * we need to adjust our expectation in that case.18481745 *18491849- * As we already started the negotiation, we just18501850- * ignore RDMA_CM_EVENT_ESTABLISHED here.17461746+ * If smb_direct_negotiate_recv_done was called first17471747+ * it initialized sc->connect.work only for us to17481748+ * start, so that we turned into17491749+ * SMBDIRECT_SOCKET_NEGOTIATE_NEEDED, before17501750+ * smb_direct_negotiate_recv_work() runs.17511751+ *17521752+ * If smb_direct_negotiate_recv_done didn't happen17531753+ * yet. sc->connect.work is still be disabled and17541754+ * queue_work() is a no-op.18511755 */18521852- if (!sc->first_error && sc->status > SMBDIRECT_SOCKET_RDMA_CONNECT_RUNNING)18531853- break;18541756 if (SMBDIRECT_CHECK_STATUS_DISCONNECT(sc, SMBDIRECT_SOCKET_RDMA_CONNECT_RUNNING))18551757 break;18561758 sc->status = SMBDIRECT_SOCKET_NEGOTIATE_NEEDED;17591759+ spin_lock_irqsave(&sc->connect.lock, flags);17601760+ if (!sc->first_error)17611761+ queue_work(sc->workqueue, &sc->connect.work);17621762+ spin_unlock_irqrestore(&sc->connect.lock, flags);18571763 wake_up(&sc->status_wait);18581764 break;18591765 }···20331921 recvmsg = get_free_recvmsg(sc);20341922 if (!recvmsg)20351923 return -ENOMEM;19241924+ recvmsg->cqe.done = smb_direct_negotiate_recv_done;2036192520371926 ret = smb_direct_post_recv(sc, recvmsg);20381927 if (ret) {···2452233924532340static int smb_direct_connect(struct smbdirect_socket *sc)24542341{23422342+ struct smbdirect_recv_io *recv_io;24552343 int ret;2456234424572345 ret = smb_direct_init_params(sc);···24662352 pr_err("Can't init RDMA pool: %d\n", ret);24672353 return ret;24682354 }23552355+23562356+ list_for_each_entry(recv_io, &sc->recv_io.free.list, list)23572357+ recv_io->cqe.done = recv_done;2469235824702359 ret = smb_direct_create_qpair(sc);24712360 if (ret) {
···301301 sbp->sb_rbmblocks != xfs_expected_rbmblocks(sbp))302302 return false;303303304304+ if (xfs_sb_is_v5(sbp) &&305305+ (sbp->sb_features_incompat & XFS_SB_FEAT_INCOMPAT_ZONED)) {306306+ uint32_t mod;307307+308308+ /*309309+ * Zoned RT devices must be aligned to the RT group size,310310+ * because garbage collection assumes that all zones have the311311+ * same size to avoid insane complexity if that weren't the312312+ * case.313313+ */314314+ div_u64_rem(sbp->sb_rextents, sbp->sb_rgextents, &mod);315315+ if (mod)316316+ return false;317317+ }318318+304319 return true;305320}306321
+1-1
fs/xfs/scrub/attr_repair.c
···333333 .attr_filter = ent->flags & XFS_ATTR_NSP_ONDISK_MASK,334334 .namelen = rentry->namelen,335335 .name = rentry->name,336336- .value = ab->value,337336 .valuelen = be32_to_cpu(rentry->valuelen),338337 };339338 unsigned int namesize;···362363 error = -EDEADLOCK;363364 if (error)364365 return error;366366+ args.value = ab->value;365367366368 /* Look up the remote value and stash it for reconstruction. */367369 error = xfs_attr3_leaf_getvalue(leaf_bp, &args);
···896896 map_size = DIV_ROUND_UP(chunks, NBWORD);897897898898 if (map_size > XFS_BLF_DATAMAP_SIZE) {899899+ xfs_buf_item_free_format(bip);899900 kmem_cache_free(xfs_buf_item_cache, bip);900901 xfs_err(mp,901902 "buffer item dirty bitmap (%u uints) too small to reflect %u bytes!",
+5-22
fs/xfs/xfs_discard.c
···108108 * list. We plug and chain the bios so that we only need a single completion109109 * call to clear all the busy extents once the discards are complete.110110 */111111-int111111+void112112xfs_discard_extents(113113 struct xfs_mount *mp,114114 struct xfs_busy_extents *extents)···116116 struct xfs_extent_busy *busyp;117117 struct bio *bio = NULL;118118 struct blk_plug plug;119119- int error = 0;120119121120 blk_start_plug(&plug);122121 list_for_each_entry(busyp, &extents->extent_list, list) {···125126126127 trace_xfs_discard_extent(xg, busyp->bno, busyp->length);127128128128- error = __blkdev_issue_discard(btp->bt_bdev,129129+ __blkdev_issue_discard(btp->bt_bdev,129130 xfs_gbno_to_daddr(xg, busyp->bno),130131 XFS_FSB_TO_BB(mp, busyp->length),131132 GFP_KERNEL, &bio);132132- if (error && error != -EOPNOTSUPP) {133133- xfs_info(mp,134134- "discard failed for extent [0x%llx,%u], error %d",135135- (unsigned long long)busyp->bno,136136- busyp->length,137137- error);138138- break;139139- }140133 }141134142135 if (bio) {···139148 xfs_discard_endio_work(&extents->endio_work);140149 }141150 blk_finish_plug(&plug);142142-143143- return error;144151}145152146153/*···374385 * list after this function call, as it may have been freed by375386 * the time control returns to us.376387 */377377- error = xfs_discard_extents(pag_mount(pag), extents);378378- if (error)379379- break;388388+ xfs_discard_extents(pag_mount(pag), extents);380389381390 if (xfs_trim_should_stop())382391 break;···483496484497 trace_xfs_discard_rtextent(mp, busyp->bno, busyp->length);485498486486- error = __blkdev_issue_discard(bdev,499499+ __blkdev_issue_discard(bdev,487500 xfs_rtb_to_daddr(mp, busyp->bno),488501 XFS_FSB_TO_BB(mp, busyp->length),489502 GFP_NOFS, &bio);490490- if (error)491491- break;492503 }493504 xfs_discard_free_rtdev_extents(tr);494505···726741 * list after this function call, as it may have been freed by727742 * the time control returns to us.728743 */729729- error = xfs_discard_extents(rtg_mount(rtg), tr.extents);730730- if (error)731731- break;744744+ xfs_discard_extents(rtg_mount(rtg), tr.extents);732745733746 low = tr.restart_rtx;734747 } while (!xfs_trim_should_stop() && low <= high);
···12411241}1242124212431243/*12441244+ * For various operations we need to zero up to one block at each end of12451245+ * the affected range. For zoned file systems this will require a space12461246+ * allocation, for which we need a reservation ahead of time.12471247+ */12481248+#define XFS_ZONED_ZERO_EDGE_SPACE_RES 212491249+12501250+/*12511251+ * Zero range implements a full zeroing mechanism but is only used in limited12521252+ * situations. It is more efficient to allocate unwritten extents than to12531253+ * perform zeroing here, so use an errortag to randomly force zeroing on DEBUG12541254+ * kernels for added test coverage.12551255+ *12561256+ * On zoned file systems, the error is already injected by12571257+ * xfs_file_zoned_fallocate, which then reserves the additional space needed.12581258+ * We only check for this extra space reservation here.12591259+ */12601260+static inline bool12611261+xfs_falloc_force_zero(12621262+ struct xfs_inode *ip,12631263+ struct xfs_zone_alloc_ctx *ac)12641264+{12651265+ if (xfs_is_zoned_inode(ip)) {12661266+ if (ac->reserved_blocks > XFS_ZONED_ZERO_EDGE_SPACE_RES) {12671267+ ASSERT(IS_ENABLED(CONFIG_XFS_DEBUG));12681268+ return true;12691269+ }12701270+ return false;12711271+ }12721272+ return XFS_TEST_ERROR(ip->i_mount, XFS_ERRTAG_FORCE_ZERO_RANGE);12731273+}12741274+12751275+/*12441276 * Punch a hole and prealloc the range. We use a hole punch rather than12451277 * unwritten extent conversion for two reasons:12461278 *···13001268 if (error)13011269 return error;1302127013031303- /*13041304- * Zero range implements a full zeroing mechanism but is only used in13051305- * limited situations. It is more efficient to allocate unwritten13061306- * extents than to perform zeroing here, so use an errortag to randomly13071307- * force zeroing on DEBUG kernels for added test coverage.13081308- */13091309- if (XFS_TEST_ERROR(ip->i_mount,13101310- XFS_ERRTAG_FORCE_ZERO_RANGE)) {12711271+ if (xfs_falloc_force_zero(ip, ac)) {13111272 error = xfs_zero_range(ip, offset, len, ac, NULL);13121273 } else {13131274 error = xfs_free_file_space(ip, offset, len, ac);···14481423{14491424 struct xfs_zone_alloc_ctx ac = { };14501425 struct xfs_inode *ip = XFS_I(file_inode(file));14261426+ struct xfs_mount *mp = ip->i_mount;14271427+ xfs_filblks_t count_fsb;14511428 int error;1452142914531453- error = xfs_zoned_space_reserve(ip->i_mount, 2, XFS_ZR_RESERVED, &ac);14301430+ /*14311431+ * If full zeroing is forced by the error injection knob, we need a14321432+ * space reservation that covers the entire range. See the comment in14331433+ * xfs_zoned_write_space_reserve for the rationale for the calculation.14341434+ * Otherwise just reserve space for the two boundary blocks.14351435+ */14361436+ count_fsb = XFS_ZONED_ZERO_EDGE_SPACE_RES;14371437+ if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ZERO_RANGE &&14381438+ XFS_TEST_ERROR(mp, XFS_ERRTAG_FORCE_ZERO_RANGE))14391439+ count_fsb += XFS_B_TO_FSB(mp, len) + 1;14401440+14411441+ error = xfs_zoned_space_reserve(mp, count_fsb, XFS_ZR_RESERVED, &ac);14541442 if (error)14551443 return error;14561444 error = __xfs_file_fallocate(file, mode, offset, len, &ac);14571457- xfs_zoned_space_unreserve(ip->i_mount, &ac);14451445+ xfs_zoned_space_unreserve(mp, &ac);14581446 return error;14591447}14601448
+8-6
fs/xfs/xfs_rtalloc.c
···12551255 min_logfsbs = min_t(xfs_extlen_t, xfs_log_calc_minimum_size(nmp),12561256 nmp->m_rsumblocks * 2);1257125712581258- kfree(nmp);12591259-12601258 trace_xfs_growfs_check_rtgeom(mp, min_logfsbs);1261125912621260 if (min_logfsbs > mp->m_sb.sb_logblocks)12631263- return -EINVAL;12611261+ goto out_inval;1264126212651263 if (xfs_has_zoned(mp)) {12661264 uint32_t gblocks = mp->m_groups[XG_TYPE_RTG].blocks;···1266126812671269 if (rextsize != 1)12681270 return -EINVAL;12691269- div_u64_rem(mp->m_sb.sb_rblocks, gblocks, &rem);12711271+ div_u64_rem(nmp->m_sb.sb_rblocks, gblocks, &rem);12701272 if (rem) {12711273 xfs_warn(mp,12721274"new RT volume size (%lld) not aligned to RT group size (%d)",12731273- mp->m_sb.sb_rblocks, gblocks);12741274- return -EINVAL;12751275+ nmp->m_sb.sb_rblocks, gblocks);12761276+ goto out_inval;12751277 }12761278 }1277127912801280+ kfree(nmp);12781281 return 0;12821282+out_inval:12831283+ kfree(nmp);12841284+ return -EINVAL;12791285}1280128612811287/*
+15-15
include/linux/bio.h
···4646#define bio_data_dir(bio) \4747 (op_is_write(bio_op(bio)) ? WRITE : READ)48484949+static inline bool bio_flagged(const struct bio *bio, unsigned int bit)5050+{5151+ return bio->bi_flags & (1U << bit);5252+}5353+5454+static inline void bio_set_flag(struct bio *bio, unsigned int bit)5555+{5656+ bio->bi_flags |= (1U << bit);5757+}5858+5959+static inline void bio_clear_flag(struct bio *bio, unsigned int bit)6060+{6161+ bio->bi_flags &= ~(1U << bit);6262+}6363+4964/*5065 * Check whether this bio carries any data or not. A NULL bio is allowed.5166 */···238223 smp_mb();239224 }240225 atomic_set(&bio->__bi_cnt, count);241241-}242242-243243-static inline bool bio_flagged(struct bio *bio, unsigned int bit)244244-{245245- return bio->bi_flags & (1U << bit);246246-}247247-248248-static inline void bio_set_flag(struct bio *bio, unsigned int bit)249249-{250250- bio->bi_flags |= (1U << bit);251251-}252252-253253-static inline void bio_clear_flag(struct bio *bio, unsigned int bit)254254-{255255- bio->bi_flags &= ~(1U << bit);256226}257227258228static inline struct bio_vec *bio_first_bvec_all(struct bio *bio)
···1313#include <linux/completion.h>1414#include <linux/virtio_features.h>15151616+struct module;1717+1618/**1719 * struct virtqueue - a queue to register buffers for sending or receiving.1820 * @list: the chain of virtqueues for this device
···123123124124int fqdir_init(struct fqdir **fqdirp, struct inet_frags *f, struct net *net);125125126126-static inline void fqdir_pre_exit(struct fqdir *fqdir)127127-{128128- /* Prevent creation of new frags.129129- * Pairs with READ_ONCE() in inet_frag_find().130130- */131131- WRITE_ONCE(fqdir->high_thresh, 0);132132-133133- /* Pairs with READ_ONCE() in inet_frag_kill(), ip_expire()134134- * and ip6frag_expire_frag_queue().135135- */136136- WRITE_ONCE(fqdir->dead, true);137137-}126126+void fqdir_pre_exit(struct fqdir *fqdir);138127void fqdir_exit(struct fqdir *fqdir);139128140129void inet_frag_kill(struct inet_frag_queue *q, int *refs);141130void inet_frag_destroy(struct inet_frag_queue *q);142131struct inet_frag_queue *inet_frag_find(struct fqdir *fqdir, void *key);143132144144-/* Free all skbs in the queue; return the sum of their truesizes. */145145-unsigned int inet_frag_rbtree_purge(struct rb_root *root,146146- enum skb_drop_reason reason);133133+void inet_frag_queue_flush(struct inet_frag_queue *q,134134+ enum skb_drop_reason reason);147135148136static inline void inet_frag_putn(struct inet_frag_queue *q, int refs)149137{
+6-3
include/net/ipv6_frag.h
···6969 int refs = 1;70707171 rcu_read_lock();7272- /* Paired with the WRITE_ONCE() in fqdir_pre_exit(). */7373- if (READ_ONCE(fq->q.fqdir->dead))7474- goto out_rcu_unlock;7572 spin_lock(&fq->q.lock);76737774 if (fq->q.flags & INET_FRAG_COMPLETE)···76797780 fq->q.flags |= INET_FRAG_DROP;7881 inet_frag_kill(&fq->q, &refs);8282+8383+ /* Paired with the WRITE_ONCE() in fqdir_pre_exit(). */8484+ if (READ_ONCE(fq->q.fqdir->dead)) {8585+ inet_frag_queue_flush(&fq->q, 0);8686+ goto out;8787+ }79888089 dev = dev_get_by_index_rcu(net, fq->iif);8190 if (!dev)
+26-8
include/net/netfilter/nf_tables.h
···10911091 __attribute__((aligned(__alignof__(struct nft_rule_dp))));10921092};1093109310941094+enum nft_chain_types {10951095+ NFT_CHAIN_T_DEFAULT = 0,10961096+ NFT_CHAIN_T_ROUTE,10971097+ NFT_CHAIN_T_NAT,10981098+ NFT_CHAIN_T_MAX10991099+};11001100+11011101+/**11021102+ * struct nft_chain_validate_state - validation state11031103+ *11041104+ * If a chain is encountered again during table validation it is11051105+ * possible to avoid revalidation provided the calling context is11061106+ * compatible. This structure stores relevant calling context of11071107+ * previous validations.11081108+ *11091109+ * @hook_mask: the hook numbers and locations the chain is linked to11101110+ * @depth: the deepest call chain level the chain is linked to11111111+ */11121112+struct nft_chain_validate_state {11131113+ u8 hook_mask[NFT_CHAIN_T_MAX];11141114+ u8 depth;11151115+};11161116+10941117/**10951118 * struct nft_chain - nf_tables chain10961119 *···11321109 * @udlen: user data length11331110 * @udata: user data in the chain11341111 * @blob_next: rule blob pointer to the next in the chain11121112+ * @vstate: validation state11351113 */11361114struct nft_chain {11371115 struct nft_rule_blob __rcu *blob_gen_0;···1152112811531129 /* Only used during control plane commit phase: */11541130 struct nft_rule_blob *blob_next;11311131+ struct nft_chain_validate_state vstate;11551132};1156113311571157-int nft_chain_validate(const struct nft_ctx *ctx, const struct nft_chain *chain);11341134+int nft_chain_validate(const struct nft_ctx *ctx, struct nft_chain *chain);11581135int nft_setelem_validate(const struct nft_ctx *ctx, struct nft_set *set,11591136 const struct nft_set_iter *iter,11601137 struct nft_elem_priv *elem_priv);11611138int nft_set_catchall_validate(const struct nft_ctx *ctx, struct nft_set *set);11621139int nf_tables_bind_chain(const struct nft_ctx *ctx, struct nft_chain *chain);11631140void nf_tables_unbind_chain(const struct nft_ctx *ctx, struct nft_chain *chain);11641164-11651165-enum nft_chain_types {11661166- NFT_CHAIN_T_DEFAULT = 0,11671167- NFT_CHAIN_T_ROUTE,11681168- NFT_CHAIN_T_NAT,11691169- NFT_CHAIN_T_MAX11701170-};1171114111721142/**11731143 * struct nft_chain_type - nf_tables chain type info
+4-1
include/sound/soc-acpi.h
···203203 * @mach: the pointer of the machine driver204204 * @prefix: the prefix of the topology file name. Typically, it is the path.205205 * @tplg_files: the pointer of the array of the topology file names.206206+ * @best_effort: ignore non supported links and try to build the card in best effort207207+ * with supported links206208 */207209/* Descriptor for SST ASoC machine driver */208210struct snd_soc_acpi_mach {···226224 const u32 tplg_quirk_mask;227225 int (*get_function_tplg_files)(struct snd_soc_card *card,228226 const struct snd_soc_acpi_mach *mach,229229- const char *prefix, const char ***tplg_files);227227+ const char *prefix, const char ***tplg_files,228228+ bool best_effort);230229};231230232231#define SND_SOC_ACPI_MAX_CODECS 3
+3-2
include/trace/events/tlb.h
···1212 EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \1313 EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \1414 EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \1515- EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \1616- EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" )1515+ EM( TLB_LOCAL_MM_SHOOTDOWN, "local MM shootdown" ) \1616+ EM( TLB_REMOTE_SEND_IPI, "remote IPI send" ) \1717+ EMe( TLB_REMOTE_WRONG_CPU, "remote wrong CPU" )17181819/*1920 * First define the enums in TLB_FLUSH_REASON to be exported to userspace
+1
include/uapi/drm/xe_drm.h
···14631463 /** @exec_queue_id: Exec queue ID for the batch buffer */14641464 __u32 exec_queue_id;1465146514661466+#define DRM_XE_MAX_SYNCS 102414661467 /** @num_syncs: Amount of struct drm_xe_sync in array. */14671468 __u32 num_syncs;14681469
+1
include/uapi/linux/energy_model.h
···22/* Do not edit directly, auto-generated from: */33/* Documentation/netlink/specs/em.yaml */44/* YNL-GEN uapi header */55+/* To regenerate run: tools/net/ynl/ynl-regen.sh */5667#ifndef _UAPI_LINUX_ENERGY_MODEL_H78#define _UAPI_LINUX_ENERGY_MODEL_H
···10591059 if (count < imu->len) {10601060 const struct bio_vec *bvec = iter->bvec;1061106110621062+ len += iter->iov_offset;10621063 while (len > bvec->bv_len) {10631064 len -= bvec->bv_len;10641065 bvec++;
+16
kernel/bpf/core.c
···760760 NULL;761761}762762763763+bool bpf_has_frame_pointer(unsigned long ip)764764+{765765+ struct bpf_ksym *ksym;766766+ unsigned long offset;767767+768768+ guard(rcu)();769769+770770+ ksym = bpf_ksym_find(ip);771771+ if (!ksym || !ksym->fp_start || !ksym->fp_end)772772+ return false;773773+774774+ offset = ip - ksym->start;775775+776776+ return offset >= ksym->fp_start && offset < ksym->fp_end;777777+}778778+763779const struct exception_table_entry *search_bpf_extables(unsigned long addr)764780{765781 const struct exception_table_entry *e = NULL;
+49-7
kernel/bpf/dmabuf_iter.c
···66#include <linux/kernel.h>77#include <linux/seq_file.h>8899+struct dmabuf_iter_priv {1010+ /*1111+ * If this pointer is non-NULL, the buffer's refcount is elevated to1212+ * prevent destruction between stop/start. If reading is not resumed and1313+ * start is never called again, then dmabuf_iter_seq_fini drops the1414+ * reference when the iterator is released.1515+ */1616+ struct dma_buf *dmabuf;1717+};1818+919static void *dmabuf_iter_seq_start(struct seq_file *seq, loff_t *pos)1020{1111- if (*pos)1212- return NULL;2121+ struct dmabuf_iter_priv *p = seq->private;2222+2323+ if (*pos) {2424+ struct dma_buf *dmabuf = p->dmabuf;2525+2626+ if (!dmabuf)2727+ return NULL;2828+2929+ /*3030+ * Always resume from where we stopped, regardless of the value3131+ * of pos.3232+ */3333+ p->dmabuf = NULL;3434+ return dmabuf;3535+ }13361437 return dma_buf_iter_begin();1538}···7754{7855 struct dma_buf *dmabuf = v;79568080- if (dmabuf)8181- dma_buf_put(dmabuf);5757+ if (dmabuf) {5858+ struct dmabuf_iter_priv *p = seq->private;5959+6060+ p->dmabuf = dmabuf;6161+ }8262}83638464static const struct seq_operations dmabuf_iter_seq_ops = {···9771 seq_puts(seq, "dmabuf iter\n");9872}99737474+static int dmabuf_iter_seq_init(void *priv, struct bpf_iter_aux_info *aux)7575+{7676+ struct dmabuf_iter_priv *p = (struct dmabuf_iter_priv *)priv;7777+7878+ p->dmabuf = NULL;7979+ return 0;8080+}8181+8282+static void dmabuf_iter_seq_fini(void *priv)8383+{8484+ struct dmabuf_iter_priv *p = (struct dmabuf_iter_priv *)priv;8585+8686+ if (p->dmabuf)8787+ dma_buf_put(p->dmabuf);8888+}8989+10090static const struct bpf_iter_seq_info dmabuf_iter_seq_info = {10191 .seq_ops = &dmabuf_iter_seq_ops,102102- .init_seq_private = NULL,103103- .fini_seq_private = NULL,104104- .seq_priv_size = 0,9292+ .init_seq_private = dmabuf_iter_seq_init,9393+ .fini_seq_private = dmabuf_iter_seq_fini,9494+ .seq_priv_size = sizeof(struct dmabuf_iter_priv),10595};1069610797static struct bpf_iter_reg bpf_dmabuf_reg_info = {
+8-5
kernel/cgroup/rstat.c
···7171{7272 struct llist_head *lhead;7373 struct css_rstat_cpu *rstatc;7474- struct css_rstat_cpu __percpu *rstatc_pcpu;7574 struct llist_node *self;76757776 /*···103104 /*104105 * This function can be renentered by irqs and nmis for the same cgroup105106 * and may try to insert the same per-cpu lnode into the llist. Note106106- * that llist_add() does not protect against such scenarios.107107+ * that llist_add() does not protect against such scenarios. In addition108108+ * this same per-cpu lnode can be modified through init_llist_node()109109+ * from css_rstat_flush() running on a different CPU.107110 *108111 * To protect against such stacked contexts of irqs/nmis, we use the109112 * fact that lnode points to itself when not on a list and then use110110- * this_cpu_cmpxchg() to atomically set to NULL to select the winner113113+ * try_cmpxchg() to atomically set to NULL to select the winner111114 * which will call llist_add(). The losers can assume the insertion is112115 * successful and the winner will eventually add the per-cpu lnode to113116 * the llist.117117+ *118118+ * Please note that we can not use this_cpu_cmpxchg() here as on some119119+ * archs it is not safe against modifications from multiple CPUs.114120 */115121 self = &rstatc->lnode;116116- rstatc_pcpu = css->rstat_cpu;117117- if (this_cpu_cmpxchg(rstatc_pcpu->lnode.next, self, NULL) != self)122122+ if (!try_cmpxchg(&rstatc->lnode.next, &self, NULL))118123 return;119124120125 lhead = ss_lhead_cpu(css->ss, cpu);
+1-1
kernel/irq/manage.c
···14141414 * Ensure the thread adjusts the affinity once it reaches the14151415 * thread function.14161416 */14171417- new->thread_flags = BIT(IRQTF_AFFINITY);14171417+ set_bit(IRQTF_AFFINITY, &new->thread_flags);1418141814191419 return 0;14201420}
+1
kernel/kthread.c
···1599159916001600 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD));16011601 WARN_ON_ONCE(tsk->mm);16021602+ WARN_ON_ONCE(!mm->user_ns);1602160316031604 /*16041605 * It is possible for mm to be the same as tsk->active_mm, but
+1
kernel/power/em_netlink_autogen.c
···22/* Do not edit directly, auto-generated from: */33/* Documentation/netlink/specs/em.yaml */44/* YNL-GEN kernel source */55+/* To regenerate run: tools/net/ynl/ynl-regen.sh */5667#include <net/netlink.h>78#include <net/genetlink.h>
+1
kernel/power/em_netlink_autogen.h
···22/* Do not edit directly, auto-generated from: */33/* Documentation/netlink/specs/em.yaml */44/* YNL-GEN kernel header */55+/* To regenerate run: tools/net/ynl/ynl-regen.sh */5667#ifndef _LINUX_EM_GEN_H78#define _LINUX_EM_GEN_H
+48-24
kernel/sched/ext.c
···4141static bool scx_switching_all;4242DEFINE_STATIC_KEY_FALSE(__scx_switched_all);43434444+/*4545+ * Tracks whether scx_enable() called scx_bypass(true). Used to balance bypass4646+ * depth on enable failure. Will be removed when bypass depth is moved into the4747+ * sched instance.4848+ */4949+static bool scx_bypassed_for_enable;5050+4451static atomic_long_t scx_nr_rejected = ATOMIC_LONG_INIT(0);4552static atomic_long_t scx_hotplug_seq = ATOMIC_LONG_INIT(0);4653···982975 __scx_add_event(sch, SCX_EV_REFILL_SLICE_DFL, 1);983976}984977978978+static void local_dsq_post_enq(struct scx_dispatch_q *dsq, struct task_struct *p,979979+ u64 enq_flags)980980+{981981+ struct rq *rq = container_of(dsq, struct rq, scx.local_dsq);982982+ bool preempt = false;983983+984984+ /*985985+ * If @rq is in balance, the CPU is already vacant and looking for the986986+ * next task to run. No need to preempt or trigger resched after moving987987+ * @p into its local DSQ.988988+ */989989+ if (rq->scx.flags & SCX_RQ_IN_BALANCE)990990+ return;991991+992992+ if ((enq_flags & SCX_ENQ_PREEMPT) && p != rq->curr &&993993+ rq->curr->sched_class == &ext_sched_class) {994994+ rq->curr->scx.slice = 0;995995+ preempt = true;996996+ }997997+998998+ if (preempt || sched_class_above(&ext_sched_class, rq->curr->sched_class))999999+ resched_curr(rq);10001000+}10011001+9851002static void dispatch_enqueue(struct scx_sched *sch, struct scx_dispatch_q *dsq,9861003 struct task_struct *p, u64 enq_flags)9871004{···11171086 if (enq_flags & SCX_ENQ_CLEAR_OPSS)11181087 atomic_long_set_release(&p->scx.ops_state, SCX_OPSS_NONE);1119108811201120- if (is_local) {11211121- struct rq *rq = container_of(dsq, struct rq, scx.local_dsq);11221122- bool preempt = false;11231123-11241124- if ((enq_flags & SCX_ENQ_PREEMPT) && p != rq->curr &&11251125- rq->curr->sched_class == &ext_sched_class) {11261126- rq->curr->scx.slice = 0;11271127- preempt = true;11281128- }11291129-11301130- if (preempt || sched_class_above(&ext_sched_class,11311131- rq->curr->sched_class))11321132- resched_curr(rq);11331133- } else {10891089+ if (is_local)10901090+ local_dsq_post_enq(dsq, p, enq_flags);10911091+ else11341092 raw_spin_unlock(&dsq->lock);11351135- }11361093}1137109411381095static void task_unlink_from_dsq(struct task_struct *p,···1644162516451626 dsq_mod_nr(dst_dsq, 1);16461627 p->scx.dsq = dst_dsq;16281628+16291629+ local_dsq_post_enq(dst_dsq, p, enq_flags);16471630}1648163116491632/**···24232402 * ops.enqueue() that @p is the only one available for this cpu,24242403 * which should trigger an explicit follow-up scheduling event.24252404 */24262426- if (sched_class_above(&ext_sched_class, next->sched_class)) {24052405+ if (next && sched_class_above(&ext_sched_class, next->sched_class)) {24272406 WARN_ON_ONCE(!(sch->ops.flags & SCX_OPS_ENQ_LAST));24282407 do_enqueue_task(rq, p, SCX_ENQ_LAST, -1);24292408 } else {···24462425do_pick_task_scx(struct rq *rq, struct rq_flags *rf, bool force_scx)24472426{24482427 struct task_struct *prev = rq->curr;24492449- bool keep_prev, kick_idle = false;24282428+ bool keep_prev;24502429 struct task_struct *p;2451243024522431 /* see kick_cpus_irq_workfn() */···24882467 refill_task_slice_dfl(rcu_dereference_sched(scx_root), p);24892468 } else {24902469 p = first_local_task(rq);24912491- if (!p) {24922492- if (kick_idle)24932493- scx_kick_cpu(rcu_dereference_sched(scx_root),24942494- cpu_of(rq), SCX_KICK_IDLE);24702470+ if (!p)24952471 return NULL;24962496- }2497247224982473 if (unlikely(!p->scx.slice)) {24992474 struct scx_sched *sch = rcu_dereference_sched(scx_root);···35923575 int node;3593357635943577 irq_work_sync(&sch->error_irq_work);35953595- kthread_stop(sch->helper->task);35783578+ kthread_destroy_worker(sch->helper);3596357935973580 free_percpu(sch->pcpu);35983581···43354318 scx_dsp_max_batch = 0;43364319 free_kick_syncs();4337432043214321+ if (scx_bypassed_for_enable) {43224322+ scx_bypassed_for_enable = false;43234323+ scx_bypass(false);43244324+ }43254325+43384326 mutex_unlock(&scx_enable_mutex);4339432743404328 WARN_ON_ONCE(scx_set_enable_state(SCX_DISABLED) != SCX_DISABLING);···48084786 return sch;4809478748104788err_stop_helper:48114811- kthread_stop(sch->helper->task);47894789+ kthread_destroy_worker(sch->helper);48124790err_free_pcpu:48134791 free_percpu(sch->pcpu);48144792err_free_gdsqs:···49924970 * Init in bypass mode to guarantee forward progress.49934971 */49944972 scx_bypass(true);49734973+ scx_bypassed_for_enable = true;4995497449964975 for (i = SCX_OPI_NORMAL_BEGIN; i < SCX_OPI_NORMAL_END; i++)49974976 if (((void (**)(void))ops)[i])···50905067 scx_task_iter_stop(&sti);50915068 percpu_up_write(&scx_fork_rwsem);5092506950705070+ scx_bypassed_for_enable = false;50935071 scx_bypass(false);5094507250955073 if (!scx_tryset_enable_state(SCX_ENABLED, SCX_ENABLING)) {
···45184518 unsigned long direct;4519451945204520 direct = ftrace_find_rec_direct(rec->ip);45214521- if (direct)45224522- seq_printf(m, "\n\tdirect-->%pS", (void *)direct);45214521+ if (direct) {45224522+ seq_printf(m, "\n\tdirect%s-->%pS",45234523+ ftrace_is_jmp(direct) ? "(jmp)" : "",45244524+ (void *)ftrace_jmp_get(direct));45254525+ }45234526 }45244527 }45254528
+1-1
kernel/trace/trace.c
···10507105071050810508 /* Disable all the flags that were enabled coming in */1050910509 for (i = 0; i < TRACE_FLAGS_MAX_SIZE; i++) {1051010510- if ((1 << i) & ZEROED_TRACE_FLAGS)1051010510+ if ((1ULL << i) & ZEROED_TRACE_FLAGS)1051110511 set_tracer_flag(tr, 1ULL << i, 0);1051210512 }1051310513
+2
kernel/trace/trace_events.c
···700700701701#ifdef CONFIG_PERF_EVENTS702702 case TRACE_REG_PERF_REGISTER:703703+ if (!call->class->perf_probe)704704+ return -ENODEV;703705 return tracepoint_probe_register(call->tp,704706 call->class->perf_probe,705707 call);
···2828 bool "Enable KUnit tests which print BUG stacktraces"2929 depends on KUNIT_TEST3030 depends on !UML3131- default y3131+ default !PANIC_ON_OOPS3232 help3333 Enables fault handling tests for the KUnit framework. These tests may3434 trigger a kernel BUG(), and the associated stack trace, even when they
+3-4
lib/kunit/device.c
···106106107107/* Helper which creates a kunit_device, attaches it to the kunit_bus*/108108static struct kunit_device *kunit_device_register_internal(struct kunit *test,109109- const char *name,110110- const struct device_driver *drv)109109+ const char *name)111110{112111 struct kunit_device *kunit_dev;113112 int err = -ENOMEM;···149150 const char *name,150151 const struct device_driver *drv)151152{152152- struct kunit_device *kunit_dev = kunit_device_register_internal(test, name, drv);153153+ struct kunit_device *kunit_dev = kunit_device_register_internal(test, name);153154154155 if (IS_ERR_OR_NULL(kunit_dev))155156 return ERR_CAST(kunit_dev);···171172 if (IS_ERR(drv))172173 return ERR_CAST(drv);173174174174- dev = kunit_device_register_internal(test, name, drv);175175+ dev = kunit_device_register_internal(test, name);175176 if (IS_ERR(dev)) {176177 kunit_release_action(test, driver_unregister_wrapper, (void *)drv);177178 return ERR_CAST(dev);
+17-21
mm/shmem.c
···40194019 whiteout = d_alloc(old_dentry->d_parent, &old_dentry->d_name);40204020 if (!whiteout)40214021 return -ENOMEM;40224022-40234022 error = shmem_mknod(idmap, old_dir, whiteout,40244023 S_IFCHR | WHITEOUT_MODE, WHITEOUT_DEV);40254024 dput(whiteout);40264026- if (error)40274027- return error;40284028-40294029- /*40304030- * Cheat and hash the whiteout while the old dentry is still in40314031- * place, instead of playing games with FS_RENAME_DOES_D_MOVE.40324032- *40334033- * d_lookup() will consistently find one of them at this point,40344034- * not sure which one, but that isn't even important.40354035- */40364036- d_rehash(whiteout);40374037- return 0;40254025+ return error;40384026}4039402740404028/*···40384050{40394051 struct inode *inode = d_inode(old_dentry);40404052 int they_are_dirs = S_ISDIR(inode->i_mode);40534053+ bool had_offset = false;40414054 int error;4042405540434056 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT))···40514062 if (!simple_empty(new_dentry))40524063 return -ENOTEMPTY;4053406440544054- if (flags & RENAME_WHITEOUT) {40554055- error = shmem_whiteout(idmap, old_dir, old_dentry);40564056- if (error)40574057- return error;40584058- }40594059-40604060- error = simple_offset_rename(old_dir, old_dentry, new_dir, new_dentry);40614061- if (error)40654065+ error = simple_offset_add(shmem_get_offset_ctx(new_dir), new_dentry);40664066+ if (error == -EBUSY)40674067+ had_offset = true;40684068+ else if (unlikely(error))40624069 return error;4063407040714071+ if (flags & RENAME_WHITEOUT) {40724072+ error = shmem_whiteout(idmap, old_dir, old_dentry);40734073+ if (error) {40744074+ if (!had_offset)40754075+ simple_offset_remove(shmem_get_offset_ctx(new_dir),40764076+ new_dentry);40774077+ return error;40784078+ }40794079+ }40804080+40814081+ simple_offset_rename(old_dir, old_dentry, new_dir, new_dentry);40644082 if (d_really_is_positive(new_dentry)) {40654083 (void) shmem_unlink(new_dir, new_dentry);40664084 if (they_are_dirs) {
+2
mm/slub.c
···6539653965406540 guard(preempt)();6541654165426542+ head = kasan_reset_tag(head);65436543+65426544 df = this_cpu_ptr(&defer_free_objects);65436545 if (llist_add(head + s->offset, &df->objects))65446546 irq_work_queue(&df->work);
+8-1
net/caif/cffrml.c
···9292 len = le16_to_cpu(tmp);93939494 /* Subtract for FCS on length if FCS is not used. */9595- if (!this->dofcs)9595+ if (!this->dofcs) {9696+ if (len < 2) {9797+ ++cffrml_rcv_error;9898+ pr_err("Invalid frame length (%d)\n", len);9999+ cfpkt_destroy(pkt);100100+ return -EPROTO;101101+ }96102 len -= 2;103103+ }9710498105 if (cfpkt_setlen(pkt, len) < 0) {99106 ++cffrml_rcv_error;
-1
net/can/Kconfig
···5566menuconfig CAN77 tristate "CAN bus subsystem support"88- select CAN_DEV98 help109 Controller Area Network (CAN) is a slow (up to 1Mbit/s) serial1110 communications protocol. Development of the CAN bus started in
+6
net/can/j1939/socket.c
···482482 goto out_release_sock;483483 }484484485485+ if (ndev->reg_state != NETREG_REGISTERED) {486486+ dev_put(ndev);487487+ ret = -ENODEV;488488+ goto out_release_sock;489489+ }490490+485491 can_ml = can_get_ml_priv(ndev);486492 if (!can_ml) {487493 dev_put(ndev);
+2
net/can/j1939/transport.c
···15671567 if (active) {15681568 j1939_session_put(active);15691569 ret = -EAGAIN;15701570+ } else if (priv->ndev->reg_state != NETREG_REGISTERED) {15711571+ ret = -ENODEV;15701572 } else {15711573 WARN_ON_ONCE(session->state != J1939_SESSION_NEW);15721574 list_add_tail(&session->active_session_list_entry,
+24-6
net/ethtool/ioctl.c
···23832383 return -ENOMEM;23842384 WARN_ON_ONCE(!ret);2385238523862386- gstrings.len = ret;23862386+ if (gstrings.len && gstrings.len != ret)23872387+ gstrings.len = 0;23882388+ else23892389+ gstrings.len = ret;2387239023882391 if (gstrings.len) {23892392 data = vzalloc(array_size(gstrings.len, ETH_GSTRING_LEN));···25122509 if (copy_from_user(&stats, useraddr, sizeof(stats)))25132510 return -EFAULT;2514251125152515- stats.n_stats = n_stats;25122512+ if (stats.n_stats && stats.n_stats != n_stats)25132513+ stats.n_stats = 0;25142514+ else25152515+ stats.n_stats = n_stats;2516251625172517- if (n_stats) {25182518- data = vzalloc(array_size(n_stats, sizeof(u64)));25172517+ if (stats.n_stats) {25182518+ data = vzalloc(array_size(stats.n_stats, sizeof(u64)));25192519 if (!data)25202520 return -ENOMEM;25212521 ops->get_ethtool_stats(dev, &stats, data);···25302524 if (copy_to_user(useraddr, &stats, sizeof(stats)))25312525 goto out;25322526 useraddr += sizeof(stats);25332533- if (n_stats && copy_to_user(useraddr, data, array_size(n_stats, sizeof(u64))))25272527+ if (stats.n_stats &&25282528+ copy_to_user(useraddr, data,25292529+ array_size(stats.n_stats, sizeof(u64))))25342530 goto out;25352531 ret = 0;25362532···25682560 return -EOPNOTSUPP;2569256125702562 n_stats = phy_ops->get_sset_count(phydev);25632563+ if (stats->n_stats && stats->n_stats != n_stats) {25642564+ stats->n_stats = 0;25652565+ return 0;25662566+ }2571256725722568 ret = ethtool_vzalloc_stats_array(n_stats, data);25732569 if (ret)···25922580 return -EOPNOTSUPP;2593258125942582 n_stats = ops->get_sset_count(dev, ETH_SS_PHY_STATS);25832583+ if (stats->n_stats && stats->n_stats != n_stats) {25842584+ stats->n_stats = 0;25852585+ return 0;25862586+ }2595258725962588 ret = ethtool_vzalloc_stats_array(n_stats, data);25972589 if (ret)···26322616 }2633261726342618 useraddr += sizeof(stats);26352635- if (copy_to_user(useraddr, data, array_size(stats.n_stats, sizeof(u64))))26192619+ if (stats.n_stats &&26202620+ copy_to_user(useraddr, data,26212621+ array_size(stats.n_stats, sizeof(u64))))26362622 ret = -EFAULT;2637262326382624 out:
+7-1
net/handshake/request.c
···276276out_unlock:277277 spin_unlock(&hn->hn_lock);278278out_err:279279+ /* Restore original destructor so socket teardown still runs on failure */280280+ req->hr_sk->sk_destruct = req->hr_odestruct;279281 trace_handshake_submit_err(net, req, req->hr_sk, ret);280282 handshake_req_destroy(req);281283 return ret;···326324327325 hn = handshake_pernet(net);328326 if (hn && remove_pending(hn, req)) {329329- /* Request hadn't been accepted */327327+ /* Request hadn't been accepted - mark cancelled */328328+ if (test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED, &req->hr_flags)) {329329+ trace_handshake_cancel_busy(net, req, sk);330330+ return false;331331+ }330332 goto out_true;331333 }332334 if (test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED, &req->hr_flags)) {
···218218219219pure_initcall(inet_frag_wq_init);220220221221+void fqdir_pre_exit(struct fqdir *fqdir)222222+{223223+ struct inet_frag_queue *fq;224224+ struct rhashtable_iter hti;225225+226226+ /* Prevent creation of new frags.227227+ * Pairs with READ_ONCE() in inet_frag_find().228228+ */229229+ WRITE_ONCE(fqdir->high_thresh, 0);230230+231231+ /* Pairs with READ_ONCE() in inet_frag_kill(), ip_expire()232232+ * and ip6frag_expire_frag_queue().233233+ */234234+ WRITE_ONCE(fqdir->dead, true);235235+236236+ rhashtable_walk_enter(&fqdir->rhashtable, &hti);237237+ rhashtable_walk_start(&hti);238238+239239+ while ((fq = rhashtable_walk_next(&hti))) {240240+ if (IS_ERR(fq)) {241241+ if (PTR_ERR(fq) != -EAGAIN)242242+ break;243243+ continue;244244+ }245245+ spin_lock_bh(&fq->lock);246246+ if (!(fq->flags & INET_FRAG_COMPLETE))247247+ inet_frag_queue_flush(fq, 0);248248+ spin_unlock_bh(&fq->lock);249249+ }250250+251251+ rhashtable_walk_stop(&hti);252252+ rhashtable_walk_exit(&hti);253253+}254254+EXPORT_SYMBOL(fqdir_pre_exit);255255+221256void fqdir_exit(struct fqdir *fqdir)222257{223258 INIT_WORK(&fqdir->destroy_work, fqdir_work_fn);···298263 kmem_cache_free(f->frags_cachep, q);299264}300265301301-unsigned int inet_frag_rbtree_purge(struct rb_root *root,302302- enum skb_drop_reason reason)266266+static unsigned int267267+inet_frag_rbtree_purge(struct rb_root *root, enum skb_drop_reason reason)303268{304269 struct rb_node *p = rb_first(root);305270 unsigned int sum = 0;···319284 }320285 return sum;321286}322322-EXPORT_SYMBOL(inet_frag_rbtree_purge);287287+288288+void inet_frag_queue_flush(struct inet_frag_queue *q,289289+ enum skb_drop_reason reason)290290+{291291+ unsigned int sum;292292+293293+ reason = reason ?: SKB_DROP_REASON_FRAG_REASM_TIMEOUT;294294+ sum = inet_frag_rbtree_purge(&q->rb_fragments, reason);295295+ sub_frag_mem_limit(q->fqdir, sum);296296+}297297+EXPORT_SYMBOL(inet_frag_queue_flush);323298324299void inet_frag_destroy(struct inet_frag_queue *q)325300{···372327373328 timer_setup(&q->timer, f->frag_expire, 0);374329 spin_lock_init(&q->lock);375375- /* One reference for the timer, one for the hash table. */330330+ /* One reference for the timer, one for the hash table.331331+ * We never take any extra references, only decrement this field.332332+ */376333 refcount_set(&q->refcnt, 2);377334378335 return q;
+9-13
net/ipv4/ip_fragment.c
···134134 net = qp->q.fqdir->net;135135136136 rcu_read_lock();137137-138138- /* Paired with WRITE_ONCE() in fqdir_pre_exit(). */139139- if (READ_ONCE(qp->q.fqdir->dead))140140- goto out_rcu_unlock;141141-142137 spin_lock(&qp->q.lock);143138144139 if (qp->q.flags & INET_FRAG_COMPLETE)···141146142147 qp->q.flags |= INET_FRAG_DROP;143148 inet_frag_kill(&qp->q, &refs);149149+150150+ /* Paired with WRITE_ONCE() in fqdir_pre_exit(). */151151+ if (READ_ONCE(qp->q.fqdir->dead)) {152152+ inet_frag_queue_flush(&qp->q, 0);153153+ goto out;154154+ }155155+144156 __IP_INC_STATS(net, IPSTATS_MIB_REASMFAILS);145157 __IP_INC_STATS(net, IPSTATS_MIB_REASMTIMEOUT);146158···242240243241static int ip_frag_reinit(struct ipq *qp)244242{245245- unsigned int sum_truesize = 0;246246-247247- if (!mod_timer(&qp->q.timer, jiffies + qp->q.fqdir->timeout)) {248248- refcount_inc(&qp->q.refcnt);243243+ if (!mod_timer_pending(&qp->q.timer, jiffies + qp->q.fqdir->timeout))249244 return -ETIMEDOUT;250250- }251245252252- sum_truesize = inet_frag_rbtree_purge(&qp->q.rb_fragments,253253- SKB_DROP_REASON_FRAG_TOO_FAR);254254- sub_frag_mem_limit(qp->q.fqdir, sum_truesize);246246+ inet_frag_queue_flush(&qp->q, SKB_DROP_REASON_FRAG_TOO_FAR);255247256248 qp->q.flags = 0;257249 qp->q.len = 0;
+1-1
net/mptcp/Kconfig
···44 depends on INET55 select SKB_EXTENSIONS66 select CRYPTO_LIB_SHA25677- select CRYPTO77+ select CRYPTO_LIB_UTILS88 help99 Multipath TCP (MPTCP) connections send and receive data over multiple1010 subflows in order to utilize multiple network paths. Each subflow
+2-1
net/mptcp/pm_netlink.c
···119119 }120120121121 if (tb[MPTCP_PM_ADDR_ATTR_FLAGS])122122- entry->flags = nla_get_u32(tb[MPTCP_PM_ADDR_ATTR_FLAGS]);122122+ entry->flags = nla_get_u32(tb[MPTCP_PM_ADDR_ATTR_FLAGS]) &123123+ MPTCP_PM_ADDR_FLAGS_MASK;123124124125 if (tb[MPTCP_PM_ADDR_ATTR_PORT])125126 entry->addr.port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]));
+14-8
net/mptcp/protocol.c
···16231623 struct mptcp_sendmsg_info info = {16241624 .flags = flags,16251625 };16261626- bool do_check_data_fin = false;16261626+ bool copied = false;16271627 int push_count = 1;1628162816291629 while (mptcp_send_head(sk) && (push_count > 0)) {···16651665 push_count--;16661666 continue;16671667 }16681668- do_check_data_fin = true;16681668+ copied = true;16691669 }16701670 }16711671 }···16741674 if (ssk)16751675 mptcp_push_release(ssk, &info);1676167616771677- /* ensure the rtx timer is running */16781678- if (!mptcp_rtx_timer_pending(sk))16791679- mptcp_reset_rtx_timer(sk);16801680- if (do_check_data_fin)16771677+ /* Avoid scheduling the rtx timer if no data has been pushed; the timer16781678+ * will be updated on positive acks by __mptcp_cleanup_una().16791679+ */16801680+ if (copied) {16811681+ if (!mptcp_rtx_timer_pending(sk))16821682+ mptcp_reset_rtx_timer(sk);16811683 mptcp_check_send_data_fin(sk);16841684+ }16821685}1683168616841687static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first)···2769276627702767 /*27712768 * make the whole retrans decision, xmit, disallow27722772- * fallback atomic27692769+ * fallback atomic, note that we can't retrans even27702770+ * when an infinite fallback is in progress, i.e. new27712771+ * subflows are disallowed.27732772 */27742773 spin_lock_bh(&msk->fallback_lock);27752775- if (__mptcp_check_fallback(msk)) {27742774+ if (__mptcp_check_fallback(msk) ||27752775+ !msk->allow_subflows) {27762776 spin_unlock_bh(&msk->fallback_lock);27772777 release_sock(ssk);27782778 goto clear_scheduled;
···28022802 return err;28032803}2804280428052805-static bool validate_push_nsh(const struct nlattr *attr, bool log)28052805+static bool validate_push_nsh(const struct nlattr *a, bool log)28062806{28072807+ struct nlattr *nsh_key = nla_data(a);28072808 struct sw_flow_match match;28082809 struct sw_flow_key key;2809281028112811+ /* There must be one and only one NSH header. */28122812+ if (!nla_ok(nsh_key, nla_len(a)) ||28132813+ nla_total_size(nla_len(nsh_key)) != nla_len(a) ||28142814+ nla_type(nsh_key) != OVS_KEY_ATTR_NSH)28152815+ return false;28162816+28102817 ovs_match_init(&match, &key, true, NULL);28112811- return !nsh_key_put_from_nlattr(attr, &match, false, true, log);28182818+ return !nsh_key_put_from_nlattr(nsh_key, &match, false, true, log);28122819}2813282028142821/* Return false if there are any non-masked bits set.···33963389 return -EINVAL;33973390 }33983391 mac_proto = MAC_PROTO_NONE;33993399- if (!validate_push_nsh(nla_data(a), log))33923392+ if (!validate_push_nsh(a, log))34003393 return -EINVAL;34013394 break;34023395
+9
net/sched/act_mirred.c
···281281282282 want_ingress = tcf_mirred_act_wants_ingress(m_eaction);283283284284+ if (dev == skb->dev && want_ingress == at_ingress) {285285+ pr_notice_once("tc mirred: Loop (%s:%s --> %s:%s)\n",286286+ netdev_name(skb->dev),287287+ at_ingress ? "ingress" : "egress",288288+ netdev_name(dev),289289+ want_ingress ? "ingress" : "egress");290290+ goto err_cant_do;291291+ }292292+284293 /* All mirred/redirected skbs should clear previous ct info */285294 nf_reset_ct(skb_to_send);286295 if (want_ingress && !at_ingress) /* drop dst for egress -> ingress */
+5-1
net/sched/sch_ets.c
···652652 sch_tree_lock(sch);653653654654 for (i = nbands; i < oldbands; i++) {655655- if (i >= q->nstrict && q->classes[i].qdisc->q.qlen)655655+ if (cl_is_active(&q->classes[i]))656656 list_del_init(&q->classes[i].alist);657657 qdisc_purge_queue(q->classes[i].qdisc);658658 }···663663 list_add_tail(&q->classes[i].alist, &q->active);664664 q->classes[i].deficit = quanta[i];665665 }666666+ }667667+ for (i = q->nstrict; i < nstrict; i++) {668668+ if (cl_is_active(&q->classes[i]))669669+ list_del_init(&q->classes[i].alist);666670 }667671 WRITE_ONCE(q->nstrict, nstrict);668672 memcpy(q->prio2band, priomap, sizeof(priomap));
···5454 // Select the test.5555 bar.write8(index.0, Regs::TEST);56565757- let offset = u32::from_le(bar.read32(Regs::OFFSET)) as usize;5757+ let offset = bar.read32(Regs::OFFSET) as usize;5858 let data = bar.read8(Regs::DATA);59596060 // Write `data` to `offset` to increase `count` by one.
+5-1
scripts/coccicheck
···270270271271if [ "$COCCI" = "" ] ; then272272 for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do273273- coccinelle $f273273+ if grep -q "virtual[[:space:]]\+$MODE" "$f"; then274274+ coccinelle $f275275+ else276276+ echo "warning: Skipping $f as it does not match mode '$MODE'"277277+ fi274278 done275279else276280 coccinelle $COCCI
+1-1
scripts/coccinelle/api/pm_runtime.cocci
···109109pm_runtime_api << r.pm_runtime_api;110110@@111111112112-msg = "%s returns < 0 as error. Unecessary IS_ERR_VALUE at line %s" % (pm_runtime_api, p2[0].line)112112+msg = "%s returns < 0 as error. Unnecessary IS_ERR_VALUE at line %s" % (pm_runtime_api, p2[0].line)113113coccilib.report.print_report(p1[0],msg)
···15341534 * endpoint check is not necessary15351535 */15361536 if (dai_info->quirk &&15371537- !(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk)))15371537+ !(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk))) {15381538+ (*num_devs)--;15381539 continue;15401540+ }15391541 } else {15401542 /* Check SDCA codec endpoint if there is no matching quirk */15411543 ret = is_sdca_endpoint_present(dev, codec_info, adr_link, i, j);···15451543 return ret;1546154415471545 /* The endpoint is not present, skip */15481548- if (!ret)15461546+ if (!ret) {15471547+ (*num_devs)--;15491548 continue;15491549+ }15501550 }1551155115521552 dev_dbg(dev,
+20-12
sound/soc/soc-ops.c
···111111EXPORT_SYMBOL_GPL(snd_soc_put_enum_double);112112113113static int sdca_soc_q78_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val,114114- unsigned int mask, unsigned int shift, int max)114114+ unsigned int mask, unsigned int shift, int max,115115+ bool sx)115116{116117 int val = reg_val;117118···142141}143142144143static int soc_mixer_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val,145145- unsigned int mask, unsigned int shift, int max)144144+ unsigned int mask, unsigned int shift, int max,145145+ bool sx)146146{147147 int val = (reg_val >> shift) & mask;148148149149 if (mc->sign_bit)150150 val = sign_extend32(val, mc->sign_bit);151151152152- val = clamp(val, mc->min, mc->max);153153- val -= mc->min;152152+ if (sx) {153153+ val -= mc->min; // SX controls intentionally can overflow here154154+ val = min_t(unsigned int, val & mask, max);155155+ } else {156156+ val = clamp(val, mc->min, mc->max);157157+ val -= mc->min;158158+ }154159155160 if (mc->invert)156161 val = max - val;157162158158- return val & mask;163163+ return val;159164}160165161166static unsigned int soc_mixer_ctl_to_reg(struct soc_mixer_control *mc, int val,···287280288281static int soc_get_volsw(struct snd_kcontrol *kcontrol,289282 struct snd_ctl_elem_value *ucontrol,290290- struct soc_mixer_control *mc, int mask, int max)283283+ struct soc_mixer_control *mc, int mask, int max, bool sx)291284{292292- int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int, unsigned int, int);285285+ int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int,286286+ unsigned int, int, bool);293287 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);294288 unsigned int reg_val;295289 int val;···301293 reg_to_ctl = soc_mixer_reg_to_ctl;302294303295 reg_val = snd_soc_component_read(component, mc->reg);304304- val = reg_to_ctl(mc, reg_val, mask, mc->shift, max);296296+ val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx);305297306298 ucontrol->value.integer.value[0] = val;307299308300 if (snd_soc_volsw_is_stereo(mc)) {309301 if (mc->reg == mc->rreg) {310310- val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max);302302+ val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max, sx);311303 } else {312304 reg_val = snd_soc_component_read(component, mc->rreg);313313- val = reg_to_ctl(mc, reg_val, mask, mc->shift, max);305305+ val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx);314306 }315307316308 ucontrol->value.integer.value[1] = val;···379371 (struct soc_mixer_control *)kcontrol->private_value;380372 unsigned int mask = soc_mixer_mask(mc);381373382382- return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min);374374+ return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min, false);383375}384376EXPORT_SYMBOL_GPL(snd_soc_get_volsw);385377···421413 (struct soc_mixer_control *)kcontrol->private_value;422414 unsigned int mask = soc_mixer_sx_mask(mc);423415424424- return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max);416416+ return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max, true);425417}426418EXPORT_SYMBOL_GPL(snd_soc_get_volsw_sx);427419
···17521752 channel_count = params_channels(params);17531753 sample_rate = params_rate(params);17541754 bit_depth = params_width(params);17551755- /*17561756- * Look for 32-bit blob first instead of 16-bit if copier17571757- * supports multiple formats17581758- */17591759- if (bit_depth == 16 && !single_bitdepth) {17551755+17561756+ /* Prefer 32-bit blob if copier supports multiple formats */17571757+ if (bit_depth <= 16 && !single_bitdepth) {17601758 dev_dbg(sdev->dev, "Looking for 32-bit blob first for DMIC\n");17611759 format_change = true;17621760 bit_depth = 32;···17971799 if (format_change) {17981800 /*17991801 * The 32-bit blob was not found in NHLT table, try to18001800- * look for one based on the params18021802+ * look for 16-bit for DMIC or based on the params for18031803+ * SSP18011804 */18021802- bit_depth = params_width(params);18031803- format_change = false;18051805+ if (linktype == SOF_DAI_INTEL_DMIC) {18061806+ bit_depth = 16;18071807+ if (params_width(params) == 16)18081808+ format_change = false;18091809+ } else {18101810+ bit_depth = params_width(params);18111811+ format_change = false;18121812+ }18131813+18041814 get_new_blob = true;18051815 } else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth) {18061816 /*···18431837 *len = cfg->size >> 2;18441838 *dst = (u32 *)cfg->caps;1845183918461846- if (format_change) {18401840+ if (format_change || params_format(params) == SNDRV_PCM_FORMAT_FLOAT_LE) {18471841 /*18481842 * Update the params to reflect that different blob was loaded18491843 * instead of the requested bit depth (16 -> 32 or 32 -> 16).···22862280 ch_map >>= 4;22872281 }2288228222892289- step = ch_count / blob->alh_cfg.device_count;22902290- mask = GENMASK(step - 1, 0);22832283+ if (swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) {22842284+ /*22852285+ * For playback DAI widgets where the channel number is equal to22862286+ * the output reference channels, set the step = 0 to ensure all22872287+ * the ch_mask is applied to all alh mappings.22882288+ */22892289+ mask = ch_mask;22902290+ step = 0;22912291+ } else {22922292+ step = ch_count / blob->alh_cfg.device_count;22932293+ mask = GENMASK(step - 1, 0);22942294+ }22952295+22912296 /*22922297 * Set each gtw_cfg.node_id to blob->alh_cfg.mapping[]22932298 * for all widgets with the same stream name···23332316 }2334231723352318 /*23362336- * Set the same channel mask for playback as the audio data is23372337- * duplicated for all speakers. For capture, split the channels23192319+ * Set the same channel mask if the widget channel count is the same23202320+ * as the FE channels for playback as the audio data is duplicated23212321+ * for all speakers in this case. Otherwise, split the channels23382322 * among the aggregated DAIs. For example, with 4 channels on 223392323 * aggregated DAIs, the channel_mask should be 0x3 and 0xc for the23402324 * two DAI's.···23442326 * the tables in soc_acpi files depending on the _ADR and devID23452327 * registers for each codec.23462328 */23472347- if (w->id == snd_soc_dapm_dai_in)23482348- blob->alh_cfg.mapping[i].channel_mask = ch_mask;23492349- else23502350- blob->alh_cfg.mapping[i].channel_mask = mask << (step * i);23292329+ blob->alh_cfg.mapping[i].channel_mask = mask << (step * i);2351233023522331 i++;23532332 }
+21-5
sound/soc/sof/topology.c
···21062106 /* source component */21072107 source_swidget = snd_sof_find_swidget(scomp, (char *)route->source);21082108 if (!source_swidget) {21092109- dev_err(scomp->dev, "error: source %s not found\n",21102110- route->source);21092109+ dev_err(scomp->dev, "source %s for sink %s is not found\n",21102110+ route->source, route->sink);21112111 ret = -EINVAL;21122112 goto err;21132113 }···21252125 /* sink component */21262126 sink_swidget = snd_sof_find_swidget(scomp, (char *)route->sink);21272127 if (!sink_swidget) {21282128- dev_err(scomp->dev, "error: sink %s not found\n",21292129- route->sink);21282128+ dev_err(scomp->dev, "sink %s for source %s is not found\n",21292129+ route->sink, route->source);21302130 ret = -EINVAL;21312131 goto err;21322132 }···25062506 if (!tplg_files)25072507 return -ENOMEM;2508250825092509+ /* Try to use function topologies if possible */25092510 if (!sof_pdata->disable_function_topology && !disable_function_topology &&25102511 sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {25122512+ /*25132513+ * When the topology name contains 'dummy' word, it means that25142514+ * there is no fallback option to monolithic topology in case25152515+ * any of the function topologies might be missing.25162516+ * In this case we should use best effort to form the card,25172517+ * ignoring functionalities that we are missing a fragment for.25182518+ *25192519+ * Note: monolithic topologies also ignore these possibly25202520+ * missing functions, so the functionality of the card would be25212521+ * identical to the case if there would be a fallback monolithic25222522+ * topology created for the configuration.25232523+ */25242524+ bool no_fallback = strstr(file, "dummy");25252525+25112526 tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,25122527 sof_pdata->machine,25132528 tplg_filename_prefix,25142514- &tplg_files);25292529+ &tplg_files,25302530+ no_fallback);25152531 if (tplg_cnt < 0) {25162532 kfree(tplg_files);25172533 return tplg_cnt;
···138138 defer tc qdisc del dev "$dev" clsact139139140140 tc filter add dev "$dev" ingress proto ip pref 104 \141141- flower skip_hw ip_proto udp dst_port "$VXPORT" \142142- action pass141141+ u32 match ip protocol 0x11 0xff \142142+ match u16 "$VXPORT" 0xffff at 0x16 \143143+ match u16 0x0800 0xffff at 0x30 \144144+ action pass143145 defer tc filter del dev "$dev" ingress proto ip pref 104144146145147 tc filter add dev "$dev" ingress proto ipv6 pref 106 \146146- flower skip_hw ip_proto udp dst_port "$VXPORT" \147147- action pass148148+ u32 match ip6 protocol 0x11 0xff \149149+ match u16 "$VXPORT" 0xffff at 0x2a \150150+ match u16 0x86dd 0xffff at 0x44 \151151+ match u8 0x11 0xff at 0x4c \152152+ action pass148153 defer tc filter del dev "$dev" ingress proto ipv6 pref 106149154}150155···253248}254249export -f vx_create255250256256-vx_wait()257257-{258258- # Wait for all the ARP, IGMP etc. noise to settle down so that the259259- # tunnel is clear for measurements.260260- sleep 10261261-}262262-263251vx10_create()264252{265253 vx_create vx10 10 id 1000 "$@"···264266 vx_create vx20 20 id 2000 "$@"265267}266268export -f vx20_create267267-268268-vx10_create_wait()269269-{270270- vx10_create "$@"271271- vx_wait272272-}273273-274274-vx20_create_wait()275275-{276276- vx20_create "$@"277277- vx_wait278278-}279269280270ns_init_common()281271{···540554 # Install a misleading (S,G) rule to attempt to trick the system into541555 # pushing the packets elsewhere.542556 adf_install_broken_sg543543- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$swp2"557557+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$swp2"544558 do_test 4 10 0 "IPv4 nomcroute"545559}546560···548562{549563 # Like for IPv4, install a misleading (S,G).550564 adf_install_broken_sg551551- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$swp2"565565+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$swp2"552566 do_test 6 10 0 "IPv6 nomcroute"553567}554568···567581ipv4_mcroute()568582{569583 adf_install_sg570570- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute584584+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute571585 do_test 4 10 10 "IPv4 mcroute"572586}573587574588ipv6_mcroute()575589{576590 adf_install_sg577577- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute591591+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute578592 do_test 6 10 10 "IPv6 mcroute"579593}580594581595ipv4_mcroute_rx()582596{583597 adf_install_sg584584- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute598598+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute585599 ipv4_do_test_rx 0 "IPv4 mcroute ping"586600}587601588602ipv6_mcroute_rx()589603{590604 adf_install_sg591591- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute605605+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute592606 ipv6_do_test_rx 0 "IPv6 mcroute ping"593607}594608595609ipv4_mcroute_changelink()596610{597611 adf_install_sg598598- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR"612612+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR"599613 ip link set dev vx10 type vxlan mcroute600614 sleep 1601615 do_test 4 10 10 "IPv4 mcroute changelink"···604618ipv6_mcroute_changelink()605619{606620 adf_install_sg607607- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute621621+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute608622 ip link set dev vx20 type vxlan mcroute609623 sleep 1610624 do_test 6 10 10 "IPv6 mcroute changelink"···613627ipv4_mcroute_starg()614628{615629 adf_install_starg616616- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute630630+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute617631 do_test 4 10 10 "IPv4 mcroute (*,G)"618632}619633620634ipv6_mcroute_starg()621635{622636 adf_install_starg623623- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute637637+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute624638 do_test 6 10 10 "IPv6 mcroute (*,G)"625639}626640627641ipv4_mcroute_starg_rx()628642{629643 adf_install_starg630630- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute644644+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute631645 ipv4_do_test_rx 0 "IPv4 mcroute (*,G) ping"632646}633647634648ipv6_mcroute_starg_rx()635649{636650 adf_install_starg637637- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute651651+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute638652 ipv6_do_test_rx 0 "IPv6 mcroute (*,G) ping"639653}640654641655ipv4_mcroute_noroute()642656{643643- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute657657+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute644658 do_test 4 0 0 "IPv4 mcroute, no route"645659}646660647661ipv6_mcroute_noroute()648662{649649- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute663663+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute650664 do_test 6 0 0 "IPv6 mcroute, no route"651665}652666653667ipv4_mcroute_fdb()654668{655669 adf_install_sg656656- vx10_create_wait local 192.0.2.100 dev "$IPMR" mcroute670670+ vx10_create local 192.0.2.100 dev "$IPMR" mcroute657671 bridge fdb add dev vx10 \658672 00:00:00:00:00:00 self static dst "$GROUP4" via "$IPMR"659673 do_test 4 10 10 "IPv4 mcroute FDB"···662676ipv6_mcroute_fdb()663677{664678 adf_install_sg665665- vx20_create_wait local 2001:db8:4::1 dev "$IPMR" mcroute679679+ vx20_create local 2001:db8:4::1 dev "$IPMR" mcroute666680 bridge -6 fdb add dev vx20 \667681 00:00:00:00:00:00 self static dst "$GROUP6" via "$IPMR"668682 do_test 6 10 10 "IPv6 mcroute FDB"···672686ipv4_mcroute_fdb_oif0()673687{674688 adf_install_sg675675- vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute689689+ vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute676690 bridge fdb del dev vx10 00:00:00:00:00:00677691 bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"678692 do_test 4 10 10 "IPv4 mcroute oif=0"···689703 defer ip -6 route del table local multicast "$GROUP6/128" dev "$IPMR"690704691705 adf_install_sg692692- vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute706706+ vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute693707 bridge -6 fdb del dev vx20 00:00:00:00:00:00694708 bridge -6 fdb add dev vx20 00:00:00:00:00:00 self static dst "$GROUP6"695709 do_test 6 10 10 "IPv6 mcroute oif=0"···702716 adf_install_sg_sep703717704718 adf_ip_addr_add lo 192.0.2.120/28705705- vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute719719+ vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute706720 bridge fdb del dev vx10 00:00:00:00:00:00707721 bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"708722 do_test 4 10 10 "IPv4 mcroute TX!=RX oif=0"···713727 adf_install_sg_sep_rx lo714728715729 adf_ip_addr_add lo 192.0.2.120/28716716- vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute730730+ vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute717731 bridge fdb del dev vx10 00:00:00:00:00:00718732 bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"719733 ipv4_do_test_rx 0 "IPv4 mcroute TX!=RX oif=0 ping"···724738 adf_install_sg_sep_rx lo725739726740 adf_ip_addr_add lo 192.0.2.120/28727727- vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute741741+ vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute728742 bridge fdb del dev vx10 00:00:00:00:00:00729743 bridge fdb add \730744 dev vx10 00:00:00:00:00:00 self static dst "$GROUP4" via lo···736750 adf_install_sg_sep_rx "X$IPMR"737751738752 adf_ip_addr_add "X$IPMR" 2001:db8:5::1/64739739- vx20_create_wait local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute753753+ vx20_create local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute740754 bridge -6 fdb del dev vx20 00:00:00:00:00:00741755 bridge -6 fdb add dev vx20 00:00:00:00:00:00 \742756 self static dst "$GROUP6" via "X$IPMR"
+2-1
tools/testing/selftests/net/lib.sh
···280280 local selector=${1:-.packets}; shift281281282282 tc -j -s filter show dev $dev $dir pref $pref \283283- | jq ".[1].options.actions[].stats$selector"283283+ | jq ".[] | select(.options.actions) |284284+ .options.actions[].stats$selector"284285}285286286287tc_rule_handle_stats_get()
+4-2
tools/testing/selftests/net/lib/ksft.h
···2424 fd = STDOUT_FILENO;2525 }26262727- write(fd, msg, sizeof(msg));2727+ if (write(fd, msg, sizeof(msg)) < 0)2828+ perror("write()");2829 if (fd != STDOUT_FILENO)2930 close(fd);3031}···4948 fd = STDIN_FILENO;5049 }51505252- read(fd, &byte, sizeof(byte));5151+ if (read(fd, &byte, sizeof(byte)) < 0)5252+ perror("read()");5353 if (fd != STDIN_FILENO)5454 close(fd);5555}
···4545 echo "PASS: No SNAT performed for null bindings"4646else4747 echo "ERROR: SNAT performed without any matching snat rule"4848+ ip netns exec "$ns0" conntrack -L4949+ ip netns exec "$ns0" conntrack -S4850 exit 14951fi5052
···4646 if (!quiet)4747 printf("DESCRIPTION: %s\n", test->description);4848 printf("OUTPUT:\n");4949+5050+ /*5151+ * The tests may fork with the preamble buffered5252+ * in the children's stdout. Flush before the test5353+ * to avoid printing the message multiple times.5454+ */5555+ fflush(stdout);5656+ fflush(stderr);4957}50585159static const char *status_to_result(enum scx_test_status status)
···2020CFLAGS += -pthread2121LDFLAGS += -pthread2222vpath %.c ../../drivers/virtio ../../drivers/vhost2323+BUILD=KCFLAGS="-I "`pwd`/../../drivers/vhost ${MAKE} -C `pwd`/../.. V=${V}2324mod:2424- ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test V=${V}2525+ ${BUILD} M=`pwd`/vhost_test25262627#oot: build vhost as an out of tree module for a distro kernel2728#no effort is taken to make it actually build or work, but tends to mostly work···3837 CONFIG_VHOST_NET=n \3938 CONFIG_VHOST_SCSI=n \4039 CONFIG_VHOST_VSOCK=n \4141- CONFIG_VHOST_RING=n4242-OOT_BUILD=KCFLAGS="-I "${OOT_VHOST} ${MAKE} -C ${OOT_KSRC} V=${V}4040+ CONFIG_VHOST_RING=n \4141+ CONFIG_VHOST_VDPA=n4242+OOT_BUILD=KCFLAGS="-include "`pwd`"/oot-stubs.h -I "${OOT_VHOST} ${MAKE} -C ${OOT_KSRC} V=${V}4343oot-build:4444 echo "UNSUPPORTED! Don't use the resulting modules in production!"4545 ${OOT_BUILD} M=`pwd`/vhost_test
···17491749 kvm_free_memslot(kvm, old);17501750 break;17511751 case KVM_MR_MOVE:17521752+ /*17531753+ * Moving a guest_memfd memslot isn't supported, and will never17541754+ * be supported.17551755+ */17561756+ WARN_ON_ONCE(old->flags & KVM_MEM_GUEST_MEMFD);17571757+ fallthrough;17521758 case KVM_MR_FLAGS_ONLY:17531759 /*17541760 * Free the dirty bitmap as needed; the below check encompasses···17621756 */17631757 if (old->dirty_bitmap && !new->dirty_bitmap)17641758 kvm_destroy_dirty_bitmap(old);17591759+17601760+ /*17611761+ * Unbind the guest_memfd instance as needed; the @new slot has17621762+ * already created its own binding. TODO: Drop the WARN when17631763+ * dirty logging guest_memfd memslots is supported. Until then,17641764+ * flags-only changes on guest_memfd slots should be impossible.17651765+ */17661766+ if (WARN_ON_ONCE(old->flags & KVM_MEM_GUEST_MEMFD))17671767+ kvm_gmem_unbind(old);1765176817661769 /*17671770 * The final quirk. Free the detached, old slot, but only its···21012086 return -EINVAL;21022087 if ((mem->userspace_addr != old->userspace_addr) ||21032088 (npages != old->npages) ||21042104- ((mem->flags ^ old->flags) & KVM_MEM_READONLY))20892089+ ((mem->flags ^ old->flags) & (KVM_MEM_READONLY | KVM_MEM_GUEST_MEMFD)))21052090 return -EINVAL;2106209121072092 if (base_gfn != old->base_gfn)