History

Merge tag 'v6.15' into rdma.git for-next

Following patches need the RDMA rc branch since we are past the RC cycle now. Merge conflicts resolved based on Linux-next: - For RXE odp changes keep for-next version and fixup new places that need to call is_odp_mr() https://lore.kernel.org/r/20250422143019.500201bd@canb.auug.org.au https://lore.kernel.org/r/20250514122455.3593b083@canb.auug.org.au - irdma is keeping the while/kfree bugfix from -rc and the pf/cdev_info change from for-next https://lore.kernel.org/r/20250513130630.280ee6c5@canb.auug.org.au

Jason Gunthorpe committed 1 year ago

Commit ef223382 parents 260ce16 0ff41df1920 files · +26599 −12627Browse files

Unified · Split

1920 files
  1. .clang-format +37 −4
  2. .clippy.toml +1 −1
  3. .mailmap +11 −0
  4. CREDITS +4 −0
  5. Documentation/ABI/stable/sysfs-block +1 −1
  6. Documentation/ABI/testing/sysfs-devices-system-cpu +1 −0
  7. Documentation/ABI/testing/sysfs-driver-hid-appletb-kbd +2 −2
  8. Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon +2 −2
  9. Documentation/ABI/testing/sysfs-driver-ufs +32 −0
  10. Documentation/ABI/testing/sysfs-kernel-reboot +5 −5
  11. Documentation/admin-guide/hw-vuln/index.rst +2 −0
  12. Documentation/admin-guide/hw-vuln/indirect-target-selection.rst +168 −0
  13. Documentation/admin-guide/hw-vuln/rsb.rst +268 −0
  14. Documentation/admin-guide/kernel-parameters.txt +19 −4
  15. Documentation/admin-guide/xfs.rst +37 −0
  16. Documentation/arch/openrisc/openrisc_port.rst +6 −6
  17. Documentation/arch/riscv/hwprobe.rst +1 −1
  18. Documentation/arch/x86/cpuinfo.rst +36 −33
  19. Documentation/bpf/bpf_devel_QA.rst +8 −0
  20. Documentation/devicetree/bindings/ata/ceva,ahci-1v84.yaml +0 −1
  21. Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml +17 −1
  22. Documentation/devicetree/bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml +0 −1
  23. Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml +1 −1
  24. Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml +1 −0
  25. Documentation/devicetree/bindings/net/can/microchip,mcp2510.yaml +1 −1
  26. Documentation/devicetree/bindings/net/ethernet-controller.yaml +90 −7
  27. Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml +1 −1
  28. Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +4 −0
  29. Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml +25 −0
  30. Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml +0 −9
  31. Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml +0 −1
  32. Documentation/devicetree/bindings/soc/fsl/fsl,ls1028a-reset.yaml +1 −1
  33. Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +7 −12
  34. Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml +8 −3
  35. Documentation/devicetree/bindings/timer/renesas,tpu.yaml +0 −56
  36. Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml +0 −1
  37. Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +0 −1
  38. Documentation/devicetree/bindings/usb/xlnx,usb2.yaml +0 −1
  39. Documentation/filesystems/ext4/super.rst +14 −6
  40. Documentation/kbuild/reproducible-builds.rst +17 −0
  41. Documentation/netlink/specs/ethtool.yaml +3 −1
  42. Documentation/netlink/specs/ovs_vport.yaml +1 −3
  43. Documentation/netlink/specs/rt_link.yaml +13 −7
  44. Documentation/netlink/specs/rt_neigh.yaml +7 −7
  45. Documentation/netlink/specs/tc.yaml +6 −4
  46. Documentation/networking/netdevices.rst +6 −4
  47. Documentation/networking/timestamping.rst +3 −5
  48. Documentation/power/runtime_pm.rst +1 −1
  49. Documentation/translations/zh_CN/arch/openrisc/openrisc_port.rst +6 −6
  50. Documentation/translations/zh_TW/arch/openrisc/openrisc_port.rst +6 −6
  51. Documentation/userspace-api/mseal.rst +1 −1
  52. Documentation/virt/kvm/api.rst +383 −406
  53. Documentation/wmi/devices/msi-wmi-platform.rst +4 −0
  54. MAINTAINERS +255 −26
  55. Makefile +5 −8
  56. arch/arm/boot/dts/amlogic/meson8.dtsi +3 −3
  57. arch/arm/boot/dts/amlogic/meson8b.dtsi +3 −3
  58. arch/arm/boot/dts/nxp/imx/imx6ul-imx6ull-opos6ul.dtsi +3 −0
  59. arch/arm/configs/at91_dt_defconfig +0 −1
  60. arch/arm/configs/collie_defconfig +0 −1
  61. arch/arm/configs/davinci_all_defconfig +0 −1
  62. arch/arm/configs/dove_defconfig +0 −1
  63. arch/arm/configs/exynos_defconfig +0 −1
  64. arch/arm/configs/imx_v6_v7_defconfig +0 −2
  65. arch/arm/configs/lpc18xx_defconfig +0 −1
  66. arch/arm/configs/lpc32xx_defconfig +0 −1
  67. arch/arm/configs/milbeaut_m10v_defconfig +0 −2
  68. arch/arm/configs/mmp2_defconfig +0 −1
  69. arch/arm/configs/multi_v4t_defconfig +0 −1
  70. arch/arm/configs/multi_v5_defconfig +0 −1
  71. arch/arm/configs/mvebu_v5_defconfig +0 −1
  72. arch/arm/configs/mxs_defconfig +0 −1
  73. arch/arm/configs/omap2plus_defconfig +0 −3
  74. arch/arm/configs/orion5x_defconfig +0 −1
  75. arch/arm/configs/pxa168_defconfig +0 −1
  76. arch/arm/configs/pxa910_defconfig +0 −1
  77. arch/arm/configs/pxa_defconfig +0 −2
  78. arch/arm/configs/s5pv210_defconfig +0 −1
  79. arch/arm/configs/sama7_defconfig +0 −2
  80. arch/arm/configs/spitz_defconfig +0 −1
  81. arch/arm/configs/stm32_defconfig +0 −1
  82. arch/arm/configs/wpcm450_defconfig +0 −2
  83. arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +19 −19
  84. arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +7 −7
  85. arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi +11 −11
  86. arch/arm64/boot/dts/amazon/alpine-v2.dtsi +1 −1
  87. arch/arm64/boot/dts/amazon/alpine-v3.dtsi +1 −1
  88. arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +3 −3
  89. arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi +4 −0
  90. arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +3 −3
  91. arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +3 −3
  92. arch/arm64/boot/dts/apple/t8103-j293.dts +10 −0
  93. arch/arm64/boot/dts/apple/t8112-j493.dts +10 −0
  94. arch/arm64/boot/dts/arm/morello.dtsi +11 −11
  95. arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +20 −5
  96. arch/arm64/boot/dts/freescale/imx8mp-nominal.dtsi +28 −0
  97. arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi +11 −1
  98. arch/arm64/boot/dts/freescale/imx8mp.dtsi +6 −0
  99. arch/arm64/boot/dts/freescale/imx95.dtsi +4 −4
  100. arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi +6 −2
  101. arch/arm64/boot/dts/rockchip/px30-engicam-common.dtsi +1 −2
  102. arch/arm64/boot/dts/rockchip/px30-engicam-ctouch2.dtsi +1 −1
  103. arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-edimm2.2.dts +1 −1
  104. arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1 −1
  105. arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi +1 −1
  106. arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +2 −0
  107. arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts +1 −1
  108. arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi +4 −0
  109. arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi +2 −0
  110. arch/arm64/boot/dts/rockchip/rk3588j.dtsi +17 −36
  111. arch/arm64/boot/dts/st/stm32mp211.dtsi +4 −4
  112. arch/arm64/boot/dts/st/stm32mp231.dtsi +4 −5
  113. arch/arm64/boot/dts/st/stm32mp251.dtsi +4 −5
  114. arch/arm64/configs/defconfig +1 −1
  115. arch/arm64/include/asm/cputype.h +2 −0
  116. arch/arm64/include/asm/el2_setup.h +1 −1
  117. arch/arm64/include/asm/esr.h +42 −2
  118. arch/arm64/include/asm/insn.h +1 −0
  119. arch/arm64/include/asm/kvm_arm.h +1 −2
  120. arch/arm64/include/asm/kvm_emulate.h +6 −1
  121. arch/arm64/include/asm/kvm_host.h +5 −0
  122. arch/arm64/include/asm/kvm_ras.h +1 −1
  123. arch/arm64/include/asm/mmu.h +0 −11
  124. arch/arm64/include/asm/rqspinlock.h +1 −1
  125. arch/arm64/include/asm/spectre.h +3 −0
  126. arch/arm64/include/asm/vdso/gettimeofday.h +13 −0
  127. arch/arm64/kernel/cpu_errata.c +1 −1
  128. arch/arm64/kernel/cpufeature.c +8 −1
  129. arch/arm64/kernel/image-vars.h +0 −4
  130. arch/arm64/kernel/pi/map_kernel.c +24 −1
  131. arch/arm64/kernel/proton-pack.c +14 −1
  132. arch/arm64/kvm/arm.c +0 −5
  133. arch/arm64/kvm/hyp/include/hyp/fault.h +48 −22
  134. arch/arm64/kvm/hyp/include/hyp/switch.h +6 −7
  135. arch/arm64/kvm/hyp/nvhe/ffa.c +5 −4
  136. arch/arm64/kvm/hyp/nvhe/mem_protect.c +9 −2
  137. arch/arm64/kvm/hyp/vgic-v3-sr.c +21 −15
  138. arch/arm64/kvm/mmu.c +27 −17
  139. arch/arm64/kvm/sys_regs.c +6 −0
  140. arch/arm64/lib/insn.c +37 −23
  141. arch/arm64/net/bpf_jit_comp.c +53 −4
  142. arch/arm64/tools/sysreg +7 −0
  143. arch/hexagon/configs/comet_defconfig +0 −3
  144. arch/loongarch/Kconfig +1 −0
  145. arch/loongarch/include/asm/fpu.h +23 −16
  146. arch/loongarch/include/asm/lbt.h +7 −3
  147. arch/loongarch/include/asm/ptrace.h +3 −3
  148. arch/loongarch/include/asm/uprobes.h +0 −1
  149. arch/loongarch/kernel/Makefile +4 −4
  150. arch/loongarch/kernel/fpu.S +6 −0
  151. arch/loongarch/kernel/genex.S +5 −2
  152. arch/loongarch/kernel/kfpu.c +20 −2
  153. arch/loongarch/kernel/lbt.S +4 −0
  154. arch/loongarch/kernel/signal.c +0 −21
  155. arch/loongarch/kernel/time.c +1 −1
  156. arch/loongarch/kernel/traps.c +12 −8
  157. arch/loongarch/kernel/uprobes.c +1 −10
  158. arch/loongarch/kvm/Makefile +1 −1
  159. arch/loongarch/kvm/intc/ipi.c +2 −2
  160. arch/loongarch/kvm/main.c +2 −2
  161. arch/loongarch/kvm/vcpu.c +8 −0
  162. arch/loongarch/mm/hugetlbpage.c +1 −1
  163. arch/loongarch/mm/init.c +0 −3
  164. arch/loongarch/power/hibernate.c +3 −0
  165. arch/m68k/configs/amcore_defconfig +0 −1
  166. arch/mips/configs/ath79_defconfig +0 −1
  167. arch/mips/configs/bigsur_defconfig +0 −1
  168. arch/mips/configs/fuloong2e_defconfig +0 −1
  169. arch/mips/configs/ip22_defconfig +0 −1
  170. arch/mips/configs/ip27_defconfig +0 −1
  171. arch/mips/configs/ip30_defconfig +0 −1
  172. arch/mips/configs/ip32_defconfig +0 −1
  173. arch/mips/configs/omega2p_defconfig +0 −1
  174. arch/mips/configs/rb532_defconfig +0 −1
  175. arch/mips/configs/rt305x_defconfig +0 −1
  176. arch/mips/configs/sb1250_swarm_defconfig +0 −1
  177. arch/mips/configs/vocore2_defconfig +0 −1
  178. arch/mips/configs/xway_defconfig +0 −1
  179. arch/mips/include/asm/idle.h +2 −3
  180. arch/mips/include/asm/ptrace.h +2 −1
  181. arch/mips/kernel/genex.S +41 −30
  182. arch/mips/kernel/idle.c +0 −7
  183. arch/mips/kernel/smp-cps.c +4 −0
  184. arch/mips/kernel/traps.c +5 −5
  185. arch/openrisc/include/asm/cacheflush.h +17 −0
  186. arch/openrisc/include/asm/cpuinfo.h +17 −7
  187. arch/openrisc/kernel/Makefile +1 −1
  188. arch/openrisc/kernel/cacheinfo.c +104 −0
  189. arch/openrisc/kernel/dma.c +4 −14
  190. arch/openrisc/kernel/setup.c +3 −42
  191. arch/openrisc/mm/cache.c +47 −9
  192. arch/openrisc/mm/init.c +3 −2
  193. arch/parisc/configs/generic-32bit_defconfig +0 −2
  194. arch/parisc/configs/generic-64bit_defconfig +0 −1
  195. arch/parisc/math-emu/driver.c +13 −3
  196. arch/powerpc/boot/wrapper +2 −4
  197. arch/powerpc/configs/44x/sam440ep_defconfig +0 −1
  198. arch/powerpc/configs/44x/warp_defconfig +0 −2
  199. arch/powerpc/configs/83xx/mpc832x_rdb_defconfig +0 −1
  200. arch/powerpc/configs/83xx/mpc834x_itx_defconfig +0 −1
  201. arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig +0 −1
  202. arch/powerpc/configs/83xx/mpc837x_rdb_defconfig +0 −1
  203. arch/powerpc/configs/85xx/ge_imp3a_defconfig +0 −2
  204. arch/powerpc/configs/85xx/stx_gp3_defconfig +0 −2
  205. arch/powerpc/configs/85xx/xes_mpc85xx_defconfig +0 −1
  206. arch/powerpc/configs/86xx-hw.config +0 −1
  207. arch/powerpc/configs/amigaone_defconfig +0 −1
  208. arch/powerpc/configs/chrp32_defconfig +0 −1
  209. arch/powerpc/configs/fsl-emb-nonhw.config +0 −1
  210. arch/powerpc/configs/g5_defconfig +0 −1
  211. arch/powerpc/configs/gamecube_defconfig +0 −1
  212. arch/powerpc/configs/linkstation_defconfig +0 −2
  213. arch/powerpc/configs/mpc83xx_defconfig +0 −1
  214. arch/powerpc/configs/mpc866_ads_defconfig +0 −1
  215. arch/powerpc/configs/mvme5100_defconfig +0 −2
  216. arch/powerpc/configs/pasemi_defconfig +0 −1
  217. arch/powerpc/configs/pmac32_defconfig +0 −1
  218. arch/powerpc/configs/ppc44x_defconfig +0 −1
  219. arch/powerpc/configs/ppc64e_defconfig +0 −1
  220. arch/powerpc/configs/ps3_defconfig +0 −2
  221. arch/powerpc/configs/skiroot_defconfig +0 −2
  222. arch/powerpc/configs/storcenter_defconfig +0 −1
  223. arch/powerpc/configs/wii_defconfig +0 −1
  224. arch/powerpc/kernel/module_64.c +0 −4
  225. arch/powerpc/mm/book3s64/radix_pgtable.c +17 −3
  226. arch/powerpc/platforms/powernv/Kconfig +1 −1
  227. arch/powerpc/platforms/pseries/Kconfig +1 −1
  228. arch/riscv/boot/dts/sophgo/cv18xx.dtsi +1 −1
  229. arch/riscv/include/asm/alternative-macros.h +7 −12
  230. arch/riscv/include/asm/cacheflush.h +10 −5
  231. arch/riscv/include/asm/kgdb.h +1 −8
  232. arch/riscv/include/asm/syscall.h +5 −2
  233. arch/riscv/kernel/Makefile +2 −2
  234. arch/riscv/kernel/kgdb.c +6 −0
  235. arch/riscv/kernel/module-sections.c +7 −6
  236. arch/riscv/kernel/module.c +6 −5
  237. arch/riscv/kernel/probes/uprobes.c +2 −8
  238. arch/riscv/kernel/process.c +6 −0
  239. arch/riscv/kernel/setup.c +35 −1
  240. arch/riscv/kernel/traps.c +37 −27
  241. arch/riscv/kernel/traps_misaligned.c +18 −1
  242. arch/riscv/kernel/unaligned_access_speed.c +21 −14
  243. arch/riscv/kvm/vcpu.c +2 −0
  244. arch/s390/Kconfig +19 −0
  245. arch/s390/Makefile +2 −0
  246. arch/s390/configs/debug_defconfig +19 −9
  247. arch/s390/configs/defconfig +17 −7
  248. arch/s390/configs/zfcpdump_defconfig +0 −1
  249. arch/s390/include/asm/march.h +4 −0
  250. arch/s390/kernel/entry.S +2 −1
  251. arch/s390/kernel/perf_cpum_cf.c +2 −9
  252. arch/s390/kernel/perf_cpum_cf_events.c +164 −3
  253. arch/s390/kernel/perf_cpum_sf.c +0 −3
  254. arch/s390/kernel/processor.c +4 −0
  255. arch/s390/kvm/intercept.c +1 −1
  256. arch/s390/kvm/interrupt.c +4 −4
  257. arch/s390/kvm/kvm-s390.c +5 −5
  258. arch/s390/kvm/trace-s390.h +2 −2
  259. arch/s390/pci/pci_clp.c +2 −0
  260. arch/s390/tools/gen_facilities.c +3 −0
  261. arch/sh/configs/ap325rxa_defconfig +0 −1
  262. arch/sh/configs/ecovec24_defconfig +0 −1
  263. arch/sh/configs/edosk7705_defconfig +0 −1
  264. arch/sh/configs/espt_defconfig +0 −1
  265. arch/sh/configs/hp6xx_defconfig +0 −2
  266. arch/sh/configs/kfr2r09-romimage_defconfig +0 −1
  267. arch/sh/configs/landisk_defconfig +0 −1
  268. arch/sh/configs/lboxre2_defconfig +0 −1
  269. arch/sh/configs/magicpanelr2_defconfig +0 −2
  270. arch/sh/configs/migor_defconfig +0 −1
  271. arch/sh/configs/r7780mp_defconfig +0 −1
  272. arch/sh/configs/r7785rp_defconfig +0 −1
  273. arch/sh/configs/rts7751r2d1_defconfig +0 −1
  274. arch/sh/configs/rts7751r2dplus_defconfig +0 −1
  275. arch/sh/configs/sdk7780_defconfig +0 −1
  276. arch/sh/configs/se7206_defconfig +0 −3
  277. arch/sh/configs/se7712_defconfig +0 −1
  278. arch/sh/configs/se7721_defconfig +0 −1
  279. arch/sh/configs/se7724_defconfig +0 −1
  280. arch/sh/configs/sh03_defconfig +0 −1
  281. arch/sh/configs/sh2007_defconfig +0 −2
  282. arch/sh/configs/sh7724_generic_defconfig +0 −1
  283. arch/sh/configs/sh7763rdp_defconfig +0 −1
  284. arch/sh/configs/sh7770_generic_defconfig +0 −1
  285. arch/sh/configs/titan_defconfig +0 −1
  286. arch/sparc/configs/sparc64_defconfig +0 −1
  287. arch/um/Makefile +1 −0
  288. arch/um/include/asm/uaccess.h +2 −0
  289. arch/um/kernel/trap.c +13 −13
  290. arch/x86/Kconfig +13 −0
  291. arch/x86/boot/Makefile +1 −1
  292. arch/x86/boot/compressed/mem.c +1 −1
  293. arch/x86/boot/compressed/sev.c +55 −52
  294. arch/x86/boot/compressed/sev.h +4 −0
  295. arch/x86/coco/sev/core.c +165 −90
  296. arch/x86/entry/entry.S +5 −4
  297. arch/x86/entry/entry_64.S +17 −3
  298. arch/x86/events/core.c +2 −2
  299. arch/x86/events/intel/core.c +21 −5
  300. arch/x86/events/intel/ds.c +29 −9
  301. arch/x86/events/intel/uncore_snbep.c +10 −97
  302. arch/x86/events/perf_event.h +9 −2
  303. arch/x86/include/asm/alternative.h +32 −0
  304. arch/x86/include/asm/cpufeatures.h +4 −1
  305. arch/x86/include/asm/intel-family.h +2 −0
  306. arch/x86/include/asm/kvm_host.h +12 −1
  307. arch/x86/include/asm/microcode.h +2 −0
  308. arch/x86/include/asm/msr-index.h +8 −0
  309. arch/x86/include/asm/nospec-branch.h +16 −6
  310. arch/x86/include/asm/pgalloc.h +11 −8
  311. arch/x86/include/asm/sev-common.h +1 −1
  312. arch/x86/include/asm/smap.h +6 −6
  313. arch/x86/kernel/acpi/boot.c +11 −0
  314. arch/x86/kernel/alternative.c +322 −20
  315. arch/x86/kernel/cpu/amd.c +18 −7
  316. arch/x86/kernel/cpu/bugs.c +200 −77
  317. arch/x86/kernel/cpu/common.c +57 −15
  318. arch/x86/kernel/cpu/microcode/amd.c +11 −4
  319. arch/x86/kernel/cpu/microcode/core.c +34 −24
  320. arch/x86/kernel/cpu/microcode/intel.c +1 −1
  321. arch/x86/kernel/cpu/microcode/internal.h +0 −1
  322. arch/x86/kernel/cpu/resctrl/rdtgroup.c +27 −21
  323. arch/x86/kernel/e820.c +16 −9
  324. arch/x86/kernel/early_printk.c +5 −5
  325. arch/x86/kernel/ftrace.c +1 −1
  326. arch/x86/kernel/head32.c +0 −4
  327. arch/x86/kernel/i8253.c +2 −1
  328. arch/x86/kernel/machine_kexec_32.c +2 −2
  329. arch/x86/kernel/module.c +6 −0
  330. arch/x86/kernel/static_call.c +2 −2
  331. arch/x86/kernel/vmlinux.lds.S +19 −1
  332. arch/x86/kvm/cpuid.c +3 −5
  333. arch/x86/kvm/mmu.h +3 −0
  334. arch/x86/kvm/mmu/mmu.c +54 −16
  335. arch/x86/kvm/mmu/tdp_mmu.c +7 −1
  336. arch/x86/kvm/smm.c +1 −0
  337. arch/x86/kvm/svm/avic.c +37 −31
  338. arch/x86/kvm/svm/sev.c +19 −13
  339. arch/x86/kvm/svm/svm.c +69 −6
  340. arch/x86/kvm/svm/svm.h +2 −0
  341. arch/x86/kvm/trace.h +10 −3
  342. arch/x86/kvm/vmx/posted_intr.c +40 −25
  343. arch/x86/kvm/x86.c +28 −12
  344. arch/x86/lib/retpoline.S +48 −0
  345. arch/x86/lib/x86-opcode-map.txt +2 −2
  346. arch/x86/mm/init_32.c +4 −1
  347. arch/x86/mm/init_64.c +3 −0
  348. arch/x86/mm/pgtable.c +2 −2
  349. arch/x86/mm/tlb.c +22 −6
  350. arch/x86/net/bpf_jit_comp.c +56 −2
  351. arch/x86/platform/efi/efi_64.c +2 −2
  352. arch/x86/power/hibernate_asm_64.S +2 −2
  353. arch/x86/um/shared/sysdep/faultinfo_32.h +1 −1
  354. arch/x86/um/shared/sysdep/faultinfo_64.h +1 −1
  355. arch/x86/xen/enlighten.c +11 −6
  356. arch/x86/xen/enlighten_pvh.c +18 −1
  357. arch/x86/xen/multicalls.c +14 −12
  358. arch/x86/xen/setup.c +0 −3
  359. arch/x86/xen/smp_pv.c +0 −1
  360. arch/x86/xen/xen-asm.S +1 −3
  361. arch/x86/xen/xen-ops.h +0 −3
  362. block/bdev.c +52 −18
  363. block/bio-integrity-auto.c +47 −15
  364. block/bio-integrity.c +6 −11
  365. block/bio.c +1 −1
  366. block/blk-cgroup.c +1 −1
  367. block/blk-settings.c +7 −1
  368. block/blk-sysfs.c +2 −0
  369. block/blk-throttle.h +1 −0
  370. block/blk-zoned.c +4 −1
  371. block/blk.h +5 −1
  372. block/fops.c +17 −1
  373. block/ioctl.c +6 −0
  374. block/ioprio.c +1 −5
  375. crypto/ahash.c +1 −75
  376. crypto/algif_hash.c +0 −4
  377. crypto/scompress.c +14 −11
  378. crypto/testmgr.c +64 −83
  379. drivers/accel/ivpu/ivpu_debugfs.c +3 −3
  380. drivers/accel/ivpu/ivpu_drv.c +5 −5
  381. drivers/accel/ivpu/ivpu_fw.c +15 −6
  382. drivers/accel/ivpu/ivpu_hw.c +1 −1
  383. drivers/accel/ivpu/ivpu_hw.h +7 −7
  384. drivers/accel/ivpu/ivpu_hw_btrs.c +64 −70
  385. drivers/accel/ivpu/ivpu_hw_btrs.h +4 −5
  386. drivers/accel/ivpu/ivpu_ipc.c +2 −1
  387. drivers/accel/ivpu/ivpu_job.c +33 −17
  388. drivers/accel/ivpu/ivpu_ms.c +24 −0
  389. drivers/accel/ivpu/ivpu_pm.c +10 −8
  390. drivers/accel/ivpu/ivpu_sysfs.c +48 −1
  391. drivers/accel/ivpu/vpu_boot_api.h +10 −3
  392. drivers/accel/ivpu/vpu_jsm_api.h +36 −17
  393. drivers/acpi/acpica/aclocal.h +2 −2
  394. drivers/acpi/acpica/nsrepair2.c +1 −1
  395. drivers/acpi/button.c +1 −1
  396. drivers/acpi/ec.c +28 −0
  397. drivers/acpi/pptt.c +10 −5
  398. drivers/android/binder.c +1 −1
  399. drivers/ata/libata-sata.c +15 −0
  400. drivers/ata/libata-scsi.c +17 −8
  401. drivers/ata/pata_pxa.c +6 −0
  402. drivers/ata/sata_sx4.c +10 −3
  403. drivers/base/auxiliary.c +10 −0
  404. drivers/base/base.h +17 −0
  405. drivers/base/bus.c +1 −1
  406. drivers/base/core.c +32 −6
  407. drivers/base/cpu.c +3 −0
  408. drivers/base/dd.c +3 −4
  409. drivers/base/devtmpfs.c +9 −13
  410. drivers/base/memory.c +17 −24
  411. drivers/base/module.c +5 −8
  412. drivers/base/platform.c +3 −3
  413. drivers/base/swnode.c +1 −2
  414. drivers/block/Kconfig +1 −7
  415. drivers/block/drbd/Kconfig +1 −1
  416. drivers/block/loop.c +42 −99
  417. drivers/block/null_blk/main.c +1 −1
  418. drivers/block/ublk_drv.c +361 −307
  419. drivers/bluetooth/btintel_pcie.c +31 −26
  420. drivers/bluetooth/btmtksdio.c +10 −2
  421. drivers/bluetooth/btnxpuart.c +11 −10
  422. drivers/bluetooth/btqca.c +1 −1
  423. drivers/bluetooth/btrtl.c +2 −0
  424. drivers/bluetooth/btusb.c +72 −45
  425. drivers/bluetooth/hci_vhci.c +5 −5
  426. drivers/char/misc.c +1 −1
  427. drivers/char/tpm/tpm-buf.c +3 −3
  428. drivers/char/tpm/tpm2-sessions.c +6 −14
  429. drivers/char/tpm/tpm_tis_core.h +1 −1
  430. drivers/char/virtio_console.c +4 −3
  431. drivers/clk/clk-s2mps11.c +2 −1
  432. drivers/clk/rockchip/clk-rk3576.c +2 −0
  433. drivers/clk/sunxi-ng/ccu-sun20i-d1.c +25 −19
  434. drivers/clk/sunxi-ng/ccu_mp.h +23 −2
  435. drivers/clocksource/i8253.c +1 −3
  436. drivers/comedi/drivers/jr3_pci.c +1 −1
  437. drivers/cpufreq/Kconfig.arm +10 −10
  438. drivers/cpufreq/acpi-cpufreq.c +13 −2
  439. drivers/cpufreq/amd-pstate.c +15 −21
  440. drivers/cpufreq/apple-soc-cpufreq.c +8 −2
  441. drivers/cpufreq/cppc_cpufreq.c +1 −1
  442. drivers/cpufreq/cpufreq-dt-platdev.c +1 −0
  443. drivers/cpufreq/cpufreq.c +33 −9
  444. drivers/cpufreq/cpufreq_ondemand.c +2 −1
  445. drivers/cpufreq/freq_table.c +3 −3
  446. drivers/cpufreq/intel_pstate.c +4 −1
  447. drivers/cpufreq/scmi-cpufreq.c +8 −2
  448. drivers/cpufreq/scpi-cpufreq.c +10 −3
  449. drivers/cpufreq/sun50i-cpufreq-nvmem.c +12 −6
  450. drivers/crypto/atmel-sha204a.c +6 −0
  451. drivers/crypto/caam/qi.c +3 −3
  452. drivers/crypto/tegra/tegra-se-aes.c +1 −4
  453. drivers/cxl/core/core.h +1 −1
  454. drivers/cxl/core/features.c +3 −3
  455. drivers/cxl/core/pci.c +17 −13
  456. drivers/cxl/core/port.c +1 −1
  457. drivers/cxl/core/regs.c +0 −4
  458. drivers/cxl/cxl.h +3 −3
  459. drivers/cxl/pci.c +1 −1
  460. drivers/cxl/pmem.c +1 −1
  461. drivers/dma-buf/dma-resv.c +3 −2
  462. drivers/dma-buf/sw_sync.c +14 −5
  463. drivers/dma-buf/udmabuf.c +1 −1
  464. drivers/dma/amd/ptdma/ptdma-dmaengine.c +10 −9
  465. drivers/dma/dmatest.c +3 −3
  466. drivers/dma/fsl-edma-main.c +1 −1
  467. drivers/dma/idxd/cdev.c +11 −2
  468. drivers/dma/idxd/init.c +113 −46
  469. drivers/dma/mediatek/mtk-cqdma.c +2 −4
  470. drivers/dma/ti/k3-udma.c +8 −2
  471. drivers/edac/altera_edac.c +5 −4
  472. drivers/edac/altera_edac.h +2 −0
  473. drivers/firmware/arm_ffa/driver.c +2 −1
  474. drivers/firmware/arm_scmi/bus.c +3 −0
  475. drivers/firmware/arm_scmi/driver.c +8 −5
  476. drivers/firmware/cirrus/Kconfig +1 −4
  477. drivers/firmware/cirrus/test/cs_dsp_mock_mem_maps.c +0 −30
  478. drivers/firmware/cirrus/test/cs_dsp_test_bin.c +1 −1
  479. drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c +1 −1
  480. drivers/firmware/samsung/exynos-acpm.c +30 −14
  481. drivers/firmware/smccc/kvm_guest.c +2 −2
  482. drivers/firmware/stratix10-svc.c +11 −3
  483. drivers/fpga/tests/fpga-bridge-test.c +1 −0
  484. drivers/fpga/tests/fpga-mgr-test.c +1 −0
  485. drivers/fpga/tests/fpga-region-test.c +1 −0
  486. drivers/fwctl/main.c +1 −1
  487. drivers/fwctl/pds/main.c +20 −13
  488. drivers/gpio/TODO +34 −0
  489. drivers/gpio/gpio-mpc8xxx.c +3 −1
  490. drivers/gpio/gpio-pca953x.c +6 −0
  491. drivers/gpio/gpio-tegra186.c +14 −13
  492. drivers/gpio/gpio-virtuser.c +10 −2
  493. drivers/gpio/gpio-zynq.c +1 −0
  494. drivers/gpio/gpiolib-devres.c +5 −1
  495. drivers/gpio/gpiolib-of.c +5 −3
  496. drivers/gpio/gpiolib.c +7 −1
  497. drivers/gpu/drm/Kconfig +1 −1
  498. drivers/gpu/drm/adp/adp_drv.c +14 −13
  499. drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 −3
  500. drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +0 −18
  501. drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c +1 −1
  502. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +15 −23
  503. drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +2 −0
  504. drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +63 −9
  505. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +14 −10
  506. drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +11 −3
  507. drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +14 −5
  508. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 −2
  509. drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 −1
  510. drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4 −0
  511. drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +4 −4
  512. drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +6 −6
  513. drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +3 −3
  514. drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +2 −2
  515. drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +14 −2
  516. drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +2 −2
  517. drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 −1
  518. drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +6 −1
  519. drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c +6 −1
  520. drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c +11 −1
  521. drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c +6 −1
  522. drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c +6 −1
  523. drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +4 −0
  524. drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +12 −9
  525. drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c +1 −1
  526. drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +1 −1
  527. drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +1 −1
  528. drivers/gpu/drm/amd/amdgpu/psp_v14_0.c +1 −1
  529. drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1 −0
  530. drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1 −0
  531. drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +1 −0
  532. drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +3 −1
  533. drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1 −0
  534. drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +9 −0
  535. drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +2 −1
  536. drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +54 −0
  537. drivers/gpu/drm/amd/amdgpu/vi.c +7 −0
  538. drivers/gpu/drm/amd/amdkfd/kfd_topology.c +5 −4
  539. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +53 −53
  540. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +14 −3
  541. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +16 −3
  542. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 −1
  543. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +30 −4
  544. drivers/gpu/drm/amd/display/dc/core/dc.c +7 −3
  545. drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c +11 −9
  546. drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c +21 −7
  547. drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +5 −9
  548. drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c +13 −2
  549. drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c +3 −2
  550. drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 −3
  551. drivers/gpu/drm/amd/display/dc/link/link_dpms.c +11 −2
  552. drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c +36 −18
  553. drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +0 −6
  554. drivers/gpu/drm/amd/include/kgd_pp_interface.h +1 −0
  555. drivers/gpu/drm/amd/pm/amdgpu_dpm.c +19 −0
  556. drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +2 −0
  557. drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +35 −1
  558. drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h +1 −0
  559. drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 −1
  560. drivers/gpu/drm/drm_drv.c +1 −1
  561. drivers/gpu/drm/drm_edid.c +1 −0
  562. drivers/gpu/drm/drm_file.c +6 −0
  563. drivers/gpu/drm/drm_gpusvm.c +32 −5
  564. drivers/gpu/drm/drm_mipi_dbi.c +5 −1
  565. drivers/gpu/drm/exynos/exynos7_drm_decon.c +2 −2
  566. drivers/gpu/drm/exynos/exynos_drm_drv.c +1 −2
  567. drivers/gpu/drm/exynos/exynos_drm_fimc.c +1 −1
  568. drivers/gpu/drm/exynos/exynos_drm_fimd.c +1 −1
  569. drivers/gpu/drm/exynos/exynos_drm_vidi.c +0 −3
  570. drivers/gpu/drm/i915/display/intel_bw.c +13 −1
  571. drivers/gpu/drm/i915/display/intel_display.c +3 −1
  572. drivers/gpu/drm/i915/display/intel_display_device.h +1 −0
  573. drivers/gpu/drm/i915/display/intel_dp.c +46 −10
  574. drivers/gpu/drm/i915/display/intel_dp_mst.c +1 −1
  575. drivers/gpu/drm/i915/display/intel_vblank.c +3 −1
  576. drivers/gpu/drm/i915/gt/intel_rc6.c +4 −15
  577. drivers/gpu/drm/i915/gt/intel_rps.c +11 −3
  578. drivers/gpu/drm/i915/gt/uc/intel_huc.c +5 −6
  579. drivers/gpu/drm/i915/gt/uc/intel_huc.h +1 −0
  580. drivers/gpu/drm/i915/gt/uc/intel_uc.c +1 −0
  581. drivers/gpu/drm/i915/gvt/opregion.c +4 −3
  582. drivers/gpu/drm/i915/i915_drv.h +1 −0
  583. drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h +6 −2
  584. drivers/gpu/drm/i915/selftests/i915_selftest.c +18 −0
  585. drivers/gpu/drm/i915/soc/intel_dram.c +4 −0
  586. drivers/gpu/drm/imagination/pvr_fw.c +20 −7
  587. drivers/gpu/drm/imagination/pvr_job.c +7 −0
  588. drivers/gpu/drm/imagination/pvr_queue.c +4 −0
  589. drivers/gpu/drm/meson/meson_drv.c +1 −1
  590. drivers/gpu/drm/meson/meson_drv.h +1 −1
  591. drivers/gpu/drm/meson/meson_encoder_hdmi.c +16 −13
  592. drivers/gpu/drm/meson/meson_vclk.c +101 −94
  593. drivers/gpu/drm/meson/meson_vclk.h +7 −6
  594. drivers/gpu/drm/mgag200/mgag200_mode.c +1 −1
  595. drivers/gpu/drm/msm/adreno/a6xx_gpu.c +4 −4
  596. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h +0 −2
  597. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h +0 −1
  598. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h +0 −3
  599. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h +0 −4
  600. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h +0 −3
  601. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h +0 −2
  602. drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +3 −1
  603. drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +39 −35
  604. drivers/gpu/drm/msm/registers/adreno/adreno_pm4.xml +7 −0
  605. drivers/gpu/drm/nouveau/nouveau_bo.c +3 −0
  606. drivers/gpu/drm/nouveau/nouveau_fence.c +1 −1
  607. drivers/gpu/drm/nouveau/nouveau_gem.c +0 −3
  608. drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c +2 −2
  609. drivers/gpu/drm/panel/panel-simple.c +13 −12
  610. drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c +3 −20
  611. drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +3 −3
  612. drivers/gpu/drm/sti/Makefile +0 −2
  613. drivers/gpu/drm/tests/drm_client_modeset_test.c +8 −1
  614. drivers/gpu/drm/tests/drm_cmdline_parser_test.c +9 −1
  615. drivers/gpu/drm/tests/drm_gem_shmem_test.c +3 −0
  616. drivers/gpu/drm/tests/drm_kunit_helpers.c +22 −0
  617. drivers/gpu/drm/tests/drm_modes_test.c +26 −0
  618. drivers/gpu/drm/tests/drm_probe_helper_test.c +7 −1
  619. drivers/gpu/drm/tiny/panel-mipi-dbi.c +4 −1
  620. drivers/gpu/drm/ttm/ttm_backup.c +12 −32
  621. drivers/gpu/drm/ttm/ttm_bo.c +2 −1
  622. drivers/gpu/drm/ttm/ttm_pool.c +3 −3
  623. drivers/gpu/drm/ttm/ttm_tt.c +1 −1
  624. drivers/gpu/drm/v3d/v3d_sched.c +34 −10
  625. drivers/gpu/drm/virtio/virtgpu_drv.c +9 −0
  626. drivers/gpu/drm/virtio/virtgpu_gem.c +6 −5
  627. drivers/gpu/drm/virtio/virtgpu_plane.c +14 −6
  628. drivers/gpu/drm/virtio/virtgpu_prime.c +1 −0
  629. drivers/gpu/drm/xe/instructions/xe_gpu_commands.h +1 −0
  630. drivers/gpu/drm/xe/instructions/xe_mi_commands.h +4 −0
  631. drivers/gpu/drm/xe/regs/xe_engine_regs.h +5 −0
  632. drivers/gpu/drm/xe/regs/xe_gt_regs.h +1 −0
  633. drivers/gpu/drm/xe/regs/xe_lrc_layout.h +2 −0
  634. drivers/gpu/drm/xe/tests/xe_mocs.c +5 −2
  635. drivers/gpu/drm/xe/xe_device_types.h +3 −0
  636. drivers/gpu/drm/xe/xe_dma_buf.c +1 −4
  637. drivers/gpu/drm/xe/xe_eu_stall.c +12 −2
  638. drivers/gpu/drm/xe/xe_eu_stall.h +2 −1
  639. drivers/gpu/drm/xe/xe_exec_queue.c +1 −1
  640. drivers/gpu/drm/xe/xe_gsc.c +22 −0
  641. drivers/gpu/drm/xe/xe_gsc.h +1 −0
  642. drivers/gpu/drm/xe/xe_gsc_proxy.c +11 −0
  643. drivers/gpu/drm/xe/xe_gsc_proxy.h +1 −0
  644. drivers/gpu/drm/xe/xe_gt.c +1 −1
  645. drivers/gpu/drm/xe/xe_gt_debugfs.c +5 −4
  646. drivers/gpu/drm/xe/xe_gt_pagefault.c +9 −2
  647. drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +10 −2
  648. drivers/gpu/drm/xe/xe_guc_ads.c +45 −30
  649. drivers/gpu/drm/xe/xe_guc_capture.c +1 −1
  650. drivers/gpu/drm/xe/xe_guc_pc.c +1 −0
  651. drivers/gpu/drm/xe/xe_guc_submit.c +1 −1
  652. drivers/gpu/drm/xe/xe_hmm.c +0 −24
  653. drivers/gpu/drm/xe/xe_hw_engine.c +6 −6
  654. drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +52 −56
  655. drivers/gpu/drm/xe/xe_lrc.c +186 −13
  656. drivers/gpu/drm/xe/xe_lrc.h +3 −2
  657. drivers/gpu/drm/xe/xe_lrc_types.h +6 −3
  658. drivers/gpu/drm/xe/xe_migrate.c +3 −3
  659. drivers/gpu/drm/xe/xe_mmio.c +5 −5
  660. drivers/gpu/drm/xe/xe_mocs.c +6 −5
  661. drivers/gpu/drm/xe/xe_module.c +0 −3
  662. drivers/gpu/drm/xe/xe_module.h +0 −1
  663. drivers/gpu/drm/xe/xe_pci.c +2 −0
  664. drivers/gpu/drm/xe/xe_pci_types.h +1 −0
  665. drivers/gpu/drm/xe/xe_pt.c +11 −3
  666. drivers/gpu/drm/xe/xe_pxp_debugfs.c +11 −2
  667. drivers/gpu/drm/xe/xe_ring_ops.c +11 −9
  668. drivers/gpu/drm/xe/xe_shrinker.c +1 −1
  669. drivers/gpu/drm/xe/xe_svm.c +108 −29
  670. drivers/gpu/drm/xe/xe_svm.h +8 −5
  671. drivers/gpu/drm/xe/xe_trace_lrc.h +4 −4
  672. drivers/gpu/drm/xe/xe_uc.c +7 −1
  673. drivers/gpu/drm/xe/xe_uc.h +1 −0
  674. drivers/gpu/drm/xe/xe_vm.c +1 −2
  675. drivers/gpu/drm/xe/xe_wa.c +4 −0
  676. drivers/gpu/drm/xe/xe_wa_oob.rules +2 −0
  677. drivers/gpu/nova-core/gpu.rs +1 −1
  678. drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c +8 −4
  679. drivers/hid/bpf/hid_bpf_dispatch.c +9 −0
  680. drivers/hid/bpf/progs/XPPen__ACK05.bpf.c +1 −0
  681. drivers/hid/hid-ids.h +4 −0
  682. drivers/hid/hid-quirks.c +2 −0
  683. drivers/hid/hid-steam.c +0 −2
  684. drivers/hid/hid-thrustmaster.c +1 −0
  685. drivers/hid/hid-uclogic-core.c +4 −3
  686. drivers/hid/wacom_sys.c +10 −1
  687. drivers/hv/channel.c +3 −62
  688. drivers/hv/hv_common.c +6 −4
  689. drivers/hv/hyperv_vmbus.h +6 −0
  690. drivers/hv/vmbus_drv.c +108 −1
  691. drivers/hwtracing/intel_th/Kconfig +1 −0
  692. drivers/hwtracing/intel_th/msu.c +7 −24
  693. drivers/i2c/busses/i2c-cros-ec-tunnel.c +3 −0
  694. drivers/i2c/busses/i2c-designware-pcidrv.c +3 −1
  695. drivers/i2c/busses/i2c-imx-lpi2c.c +2 −2
  696. drivers/i2c/busses/i2c-omap.c +1 −1
  697. drivers/i2c/i2c-atr.c +1 −1
  698. drivers/iio/accel/adis16201.c +2 −2
  699. drivers/iio/accel/adxl355_core.c +1 −1
  700. drivers/iio/accel/adxl367.c +3 −7
  701. drivers/iio/accel/fxls8962af-core.c +5 −2
  702. drivers/iio/adc/ad7266.c +1 −1
  703. drivers/iio/adc/ad7380.c +22 −10
  704. drivers/iio/adc/ad7606.c +8 −3
  705. drivers/iio/adc/ad7606_spi.c +1 −1
  706. drivers/iio/adc/ad7768-1.c +1 −1
  707. drivers/iio/adc/dln2-adc.c +1 −1
  708. drivers/iio/adc/qcom-spmi-iadc.c +3 −1
  709. drivers/iio/adc/rockchip_saradc.c +8 −9
  710. drivers/iio/chemical/pms7003.c +3 −2
  711. drivers/iio/chemical/sps30.c +1 −1
  712. drivers/iio/common/hid-sensors/hid-sensor-attributes.c +4 −0
  713. drivers/iio/imu/adis16550.c +1 −1
  714. drivers/iio/imu/bmi270/bmi270_core.c +2 −4
  715. drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +1 −1
  716. drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +6 −0
  717. drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +5 −2
  718. drivers/iio/light/hid-sensor-prox.c +14 −8
  719. drivers/iio/light/opt3001.c +3 −2
  720. drivers/iio/magnetometer/ak8974.c +2 −2
  721. drivers/iio/pressure/mprls0025pa.h +6 −11
  722. drivers/iio/temperature/maxim_thermocouple.c +1 −1
  723. drivers/infiniband/core/cma.c +3 −1
  724. drivers/infiniband/core/device.c +4 −2
  725. drivers/infiniband/core/ucaps.c +1 −1
  726. drivers/infiniband/hw/bnxt_re/ib_verbs.c +0 −10
  727. drivers/infiniband/hw/hns/hns_roce_main.c +1 −1
  728. drivers/infiniband/hw/irdma/main.c +3 −1
  729. drivers/infiniband/hw/irdma/verbs.c +0 −1
  730. drivers/infiniband/hw/mlx5/fs.c +0 −2
  731. drivers/infiniband/hw/usnic/usnic_ib_main.c +7 −7
  732. drivers/infiniband/sw/rxe/rxe_cq.c +1 −4
  733. drivers/infiniband/sw/rxe/rxe_loc.h +6 −0
  734. drivers/infiniband/sw/rxe/rxe_mr.c +2 −2
  735. drivers/infiniband/sw/rxe/rxe_resp.c +2 −2
  736. drivers/input/joystick/magellan.c +1 −1
  737. drivers/input/joystick/xpad.c +34 −18
  738. drivers/input/keyboard/mtk-pmic-keys.c +2 −2
  739. drivers/input/misc/hisi_powerkey.c +1 −1
  740. drivers/input/misc/sparcspkr.c +16 −6
  741. drivers/input/mouse/synaptics.c +5 −0
  742. drivers/input/rmi4/rmi_f34.c +76 −59
  743. drivers/input/touchscreen/cyttsp5.c +5 −2
  744. drivers/input/touchscreen/stmpe-ts.c +1 −6
  745. drivers/iommu/amd/init.c +8 −0
  746. drivers/iommu/amd/iommu.c +4 −11
  747. drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c +6 −0
  748. drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +18 −5
  749. drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c +5 −27
  750. drivers/iommu/dma-iommu.c +2 −2
  751. drivers/iommu/exynos-iommu.c +2 −2
  752. drivers/iommu/intel/iommu.c +22 −14
  753. drivers/iommu/intel/irq_remapping.c +15 −14
  754. drivers/iommu/iommu.c +33 −16
  755. drivers/iommu/ipmmu-vmsa.c +10 −17
  756. drivers/iommu/mtk_iommu.c +13 −13
  757. drivers/irqchip/Kconfig +2 −2
  758. drivers/irqchip/irq-bcm2712-mip.c +1 −0
  759. drivers/irqchip/irq-gic-v2m.c +2 −2
  760. drivers/irqchip/irq-gic-v3-its-msi-parent.c +1 −1
  761. drivers/irqchip/irq-gic-v3-mbi.c +1 −1
  762. drivers/irqchip/irq-mvebu-gicp.c +1 −1
  763. drivers/irqchip/irq-mvebu-odmi.c +1 −1
  764. drivers/irqchip/irq-qcom-mpm.c +3 −0
  765. drivers/irqchip/irq-renesas-rzv2h.c +8 −0
  766. drivers/irqchip/irq-riscv-imsic-state.c +5 −5
  767. drivers/irqchip/irq-sg2042-msi.c +1 −0
  768. drivers/mcb/mcb-parse.c +1 −1
  769. drivers/md/Kconfig +1 −1
  770. drivers/md/bcache/super.c +1 −1
  771. drivers/md/dm-bufio.c +8 −1
  772. drivers/md/dm-integrity.c +1 −1
  773. drivers/md/dm-table.c +5 −6
  774. drivers/md/md-bitmap.c +2 −3
  775. drivers/md/persistent-data/Kconfig +1 −1
  776. drivers/md/raid1.c +16 −10
  777. drivers/md/raid10.c +1 −0
  778. drivers/media/cec/i2c/Kconfig +1 −0
  779. drivers/media/i2c/Kconfig +4 −1
  780. drivers/media/platform/synopsys/hdmirx/Kconfig +1 −0
  781. drivers/media/test-drivers/vivid/Kconfig +2 −1
  782. drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c +6 −2
  783. drivers/misc/mei/hw-me-regs.h +1 −0
  784. drivers/misc/mei/pci-me.c +1 −0
  785. drivers/misc/mei/vsc-tp.c +22 −18
  786. drivers/misc/pci_endpoint_test.c +1 −20
  787. drivers/mmc/host/Kconfig +1 −1
  788. drivers/mmc/host/renesas_sdhi_core.c +5 −7
  789. drivers/mmc/host/sdhci-of-dwcmshc.c +40 −0
  790. drivers/mmc/host/sdhci_am654.c +34 −1
  791. drivers/mtd/inftlcore.c +5 −4
  792. drivers/mtd/nand/Makefile +0 −3
  793. drivers/mtd/nand/raw/r852.c +3 −0
  794. drivers/net/bonding/bond_main.c +9 −4
  795. drivers/net/can/kvaser_pciefd.c +102 −80
  796. drivers/net/can/m_can/m_can.c +2 −1
  797. drivers/net/can/rockchip/rockchip_canfd-core.c +5 −4
  798. drivers/net/can/slcan/slcan-core.c +20 −6
  799. drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +33 −9
  800. drivers/net/dsa/b53/b53_common.c +193 −57
  801. drivers/net/dsa/b53/b53_priv.h +3 −0
  802. drivers/net/dsa/b53/b53_regs.h +14 −0
  803. drivers/net/dsa/bcm_sf2.c +1 −0
  804. drivers/net/dsa/microchip/ksz_common.c +107 −28
  805. drivers/net/dsa/mt7530.c +3 −3
  806. drivers/net/dsa/mv88e6xxx/chip.c +12 −1
  807. drivers/net/dsa/mv88e6xxx/devlink.c +2 −1
  808. drivers/net/dsa/ocelot/felix_vsc9959.c +4 −1
  809. drivers/net/dsa/sja1105/sja1105_main.c +1 −5
  810. drivers/net/ethernet/airoha/airoha_eth.c +9 −13
  811. drivers/net/ethernet/airoha/airoha_npu.c +6 −4
  812. drivers/net/ethernet/amd/pds_core/adminq.c +14 −22
  813. drivers/net/ethernet/amd/pds_core/auxbus.c +0 −4
  814. drivers/net/ethernet/amd/pds_core/core.c +4 −5
  815. drivers/net/ethernet/amd/pds_core/core.h +2 −2
  816. drivers/net/ethernet/amd/pds_core/debugfs.c +3 −2
  817. drivers/net/ethernet/amd/pds_core/devlink.c +1 −3
  818. drivers/net/ethernet/amd/xgbe/xgbe-desc.c +7 −2
  819. drivers/net/ethernet/amd/xgbe/xgbe-dev.c +22 −2
  820. drivers/net/ethernet/amd/xgbe/xgbe-drv.c +9 −2
  821. drivers/net/ethernet/amd/xgbe/xgbe.h +4 −0
  822. drivers/net/ethernet/broadcom/Kconfig +2 −2
  823. drivers/net/ethernet/broadcom/bnxt/bnxt.c +51 −24
  824. drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 −0
  825. drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c +15 −5
  826. drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +33 −7
  827. drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +21 −8
  828. drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h +1 −0
  829. drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +3 −6
  830. drivers/net/ethernet/cadence/macb_main.c +6 −13
  831. drivers/net/ethernet/cavium/Kconfig +1 −1
  832. drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +1 −0
  833. drivers/net/ethernet/dlink/dl2k.c +1 −1
  834. drivers/net/ethernet/dlink/dl2k.h +1 −1
  835. drivers/net/ethernet/engleder/tsnep_main.c +19 −11
  836. drivers/net/ethernet/freescale/enetc/enetc.c +28 −17
  837. drivers/net/ethernet/freescale/fec_main.c +6 −1
  838. drivers/net/ethernet/hisilicon/hibmcge/hbg_common.h +5 −3
  839. drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c +7 −4
  840. drivers/net/ethernet/hisilicon/hibmcge/hbg_diagnose.c +1 −1
  841. drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c +11 −8
  842. drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c +3 −0
  843. drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c +7 −0
  844. drivers/net/ethernet/hisilicon/hibmcge/hbg_irq.c +15 −9
  845. drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c +4 −4
  846. drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c +10 −1
  847. drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h +3 −0
  848. drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c +1 −1
  849. drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +39 −43
  850. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c +7 −6
  851. drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +19 −6
  852. drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h +1 −0
  853. drivers/net/ethernet/intel/ice/ice_adapter.c +18 −29
  854. drivers/net/ethernet/intel/ice/ice_adapter.h +4 −2
  855. drivers/net/ethernet/intel/ice/ice_ddp.c +5 −5
  856. drivers/net/ethernet/intel/ice/ice_lag.c +6 −0
  857. drivers/net/ethernet/intel/ice/ice_virtchnl.c +0 −1
  858. drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c +5 −0
  859. drivers/net/ethernet/intel/idpf/idpf.h +10 −10
  860. drivers/net/ethernet/intel/idpf/idpf_lib.c +36 −50
  861. drivers/net/ethernet/intel/idpf/idpf_main.c +1 −0
  862. drivers/net/ethernet/intel/idpf/idpf_txrx.c +9 −9
  863. drivers/net/ethernet/intel/igc/igc.h +1 −0
  864. drivers/net/ethernet/intel/igc/igc_defines.h +5 −1
  865. drivers/net/ethernet/intel/igc/igc_main.c +1 −0
  866. drivers/net/ethernet/intel/igc/igc_ptp.c +76 −39
  867. drivers/net/ethernet/marvell/octeon_ep/octep_main.c +1 −1
  868. drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c +3 −1
  869. drivers/net/ethernet/marvell/octeontx2/af/cgx.c +5 −0
  870. drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +19 −5
  871. drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +8 −3
  872. drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c +2 −1
  873. drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +1 −0
  874. drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c +1 −0
  875. drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +5 −5
  876. drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +2 −1
  877. drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +6 −3
  878. drivers/net/ethernet/marvell/octeontx2/nic/qos.c +5 −0
  879. drivers/net/ethernet/marvell/octeontx2/nic/rep.c +2 −0
  880. drivers/net/ethernet/mediatek/mtk_eth_soc.c +71 −41
  881. drivers/net/ethernet/mediatek/mtk_eth_soc.h +10 −1
  882. drivers/net/ethernet/mediatek/mtk_star_emac.c +7 −6
  883. drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +2 −4
  884. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c +29 −3
  885. drivers/net/ethernet/mellanox/mlx5/core/en_main.c +4 −0
  886. drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 −4
  887. drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +4 −1
  888. drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c +18 −8
  889. drivers/net/ethernet/mellanox/mlx5/core/rdma.c +6 −5
  890. drivers/net/ethernet/mellanox/mlx5/core/rdma.h +2 −2
  891. drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +3 −0
  892. drivers/net/ethernet/meta/fbnic/fbnic.h +4 −4
  893. drivers/net/ethernet/meta/fbnic/fbnic_csr.h +2 −0
  894. drivers/net/ethernet/meta/fbnic/fbnic_fw.c +119 −78
  895. drivers/net/ethernet/meta/fbnic/fbnic_irq.c +96 −46
  896. drivers/net/ethernet/meta/fbnic/fbnic_mac.c +0 −6
  897. drivers/net/ethernet/meta/fbnic/fbnic_netdev.c +3 −2
  898. drivers/net/ethernet/meta/fbnic/fbnic_pci.c +7 −7
  899. drivers/net/ethernet/microchip/lan743x_main.c +16 −11
  900. drivers/net/ethernet/microchip/lan743x_main.h +1 −0
  901. drivers/net/ethernet/mscc/ocelot.c +6 −0
  902. drivers/net/ethernet/qlogic/qede/qede_main.c +1 −1
  903. drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +5 −2
  904. drivers/net/ethernet/realtek/rtase/rtase_main.c +2 −2
  905. drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 −1
  906. drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +2 −2
  907. drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +1 −1
  908. drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c +1 −1
  909. drivers/net/ethernet/sun/niu.c +2 −0
  910. drivers/net/ethernet/ti/am65-cpsw-nuss.c +15 −2
  911. drivers/net/ethernet/ti/icssg/icss_iep.c +58 −63
  912. drivers/net/ethernet/ti/icssg/icssg_common.c +17 −7
  913. drivers/net/ethernet/ti/icssg/icssg_prueth.c +10 −6
  914. drivers/net/ethernet/vertexcom/mse102x.c +29 −7
  915. drivers/net/ethernet/wangxun/libwx/wx_hw.c +8 −2
  916. drivers/net/ethernet/wangxun/libwx/wx_lib.c +4 −2
  917. drivers/net/ethernet/wangxun/libwx/wx_type.h +1 −2
  918. drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +2 −1
  919. drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c +7 −1
  920. drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +2 −1
  921. drivers/net/ethernet/wangxun/txgbe/txgbe_type.h +2 −0
  922. drivers/net/hyperv/hyperv_net.h +12 −1
  923. drivers/net/hyperv/netvsc.c +48 −9
  924. drivers/net/hyperv/netvsc_drv.c +14 −48
  925. drivers/net/hyperv/rndis_filter.c +5 −19
  926. drivers/net/mdio/mdio-mux-meson-gxl.c +2 −1
  927. drivers/net/phy/dp83822.c +1 −1
  928. drivers/net/phy/micrel.c +0 −7
  929. drivers/net/phy/microchip.c +3 −43
  930. drivers/net/phy/phy_device.c +42 −15
  931. drivers/net/phy/phy_led_triggers.c +13 −10
  932. drivers/net/phy/phylink.c +22 −16
  933. drivers/net/ppp/ppp_synctty.c +5 −0
  934. drivers/net/team/team_core.c +3 −3
  935. drivers/net/usb/rndis_host.c +2 −14
  936. drivers/net/virtio_net.c +75 −17
  937. drivers/net/vmxnet3/vmxnet3_drv.c +3 −2
  938. drivers/net/vmxnet3/vmxnet3_xdp.c +1 −1
  939. drivers/net/vxlan/vxlan_vnifilter.c +7 −1
  940. drivers/net/wireless/ath/carl9170/fw.c +1 −1
  941. drivers/net/wireless/atmel/at76c50x-usb.c +1 −1
  942. drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +3 −1
  943. drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +4 −2
  944. drivers/net/wireless/intel/iwlwifi/cfg/sc.c +0 −2
  945. drivers/net/wireless/intel/iwlwifi/iwl-config.h +9 −7
  946. drivers/net/wireless/intel/iwlwifi/iwl-csr.h +1 −0
  947. drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +6 −10
  948. drivers/net/wireless/intel/iwlwifi/iwl-trans.c +21 −7
  949. drivers/net/wireless/intel/iwlwifi/iwl-trans.h +8 −6
  950. drivers/net/wireless/intel/iwlwifi/mld/agg.c +3 −3
  951. drivers/net/wireless/intel/iwlwifi/mld/d3.c +9 −8
  952. drivers/net/wireless/intel/iwlwifi/mld/debugfs.c +4 −3
  953. drivers/net/wireless/intel/iwlwifi/mld/fw.c +10 −3
  954. drivers/net/wireless/intel/iwlwifi/mld/iface.h +1 −1
  955. drivers/net/wireless/intel/iwlwifi/mld/mac80211.c +6 −2
  956. drivers/net/wireless/intel/iwlwifi/mld/mld.c +9 −2
  957. drivers/net/wireless/intel/iwlwifi/mld/mld.h +0 −5
  958. drivers/net/wireless/intel/iwlwifi/pcie/drv.c +121 −126
  959. drivers/net/wireless/intel/iwlwifi/pcie/internal.h +5 −4
  960. drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +7 −1
  961. drivers/net/wireless/intel/iwlwifi/pcie/trans.c +12 −4
  962. drivers/net/wireless/intel/iwlwifi/pcie/tx.c +1 −1
  963. drivers/net/wireless/intel/iwlwifi/tests/devinfo.c +5 −10
  964. drivers/net/wireless/mediatek/mt76/dma.c +1 −0
  965. drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +2 −2
  966. drivers/net/wireless/purelifi/plfxlc/mac.c +0 −1
  967. drivers/net/wireless/ti/wl1251/tx.c +3 −1
  968. drivers/net/xen-netfront.c +12 −5
  969. drivers/nvme/host/Kconfig +1 −0
  970. drivers/nvme/host/core.c +38 −4
  971. drivers/nvme/host/multipath.c +10 −9
  972. drivers/nvme/host/nvme.h +2 −1
  973. drivers/nvme/host/pci.c +12 −2
  974. drivers/nvme/host/sysfs.c +28 −0
  975. drivers/nvme/host/tcp.c +31 −2
  976. drivers/nvme/target/Kconfig +1 −0
  977. drivers/nvme/target/auth.c +2 −3
  978. drivers/nvme/target/core.c +3 −0
  979. drivers/nvme/target/fc.c +20 −40
  980. drivers/nvme/target/fcloop.c +40 −34
  981. drivers/nvme/target/pci-epf.c +81 −46
  982. drivers/nvme/target/tcp.c +3 −0
  983. drivers/nvmem/core.c +32 −8
  984. drivers/nvmem/qfprom.c +20 −6
  985. drivers/nvmem/rockchip-otp.c +15 −2
  986. drivers/pci/hotplug/s390_pci_hpc.c +0 −1
  987. drivers/pci/msi/msi.c +3 −0
  988. drivers/pci/pci.c +0 −4
  989. drivers/pci/quirks.c +6 −6
  990. drivers/pci/setup-bus.c +4 −0
  991. drivers/phy/phy-can-transceiver.c +15 −7
  992. drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +2 −1
  993. drivers/phy/renesas/phy-rcar-gen3-usb2.c +75 −60
  994. drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c +1 −1
  995. drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c +2 −0
  996. drivers/phy/starfive/phy-jh7110-usb.c +7 −0
  997. drivers/phy/tegra/xusb-tegra186.c +27 −19
  998. drivers/phy/tegra/xusb.c +4 −4
  999. drivers/pinctrl/freescale/pinctrl-imx.c +3 −3
  1000. drivers/pinctrl/mediatek/mtk-eint.c +1 −1
  1001. drivers/pinctrl/mediatek/pinctrl-airoha.c +70 −89
  1002. drivers/pinctrl/mediatek/pinctrl-mtk-common.c +9 −3
  1003. drivers/pinctrl/meson/pinctrl-meson.c +1 −1
  1004. drivers/pinctrl/qcom/pinctrl-msm.c +12 −11
  1005. drivers/pinctrl/qcom/pinctrl-sm8750.c +3 −1
  1006. drivers/platform/mellanox/mlxbf-bootctl.c +2 −2
  1007. drivers/platform/x86/amd/hsmp/acpi.c +1 −2
  1008. drivers/platform/x86/amd/hsmp/hsmp.h +1 −0
  1009. drivers/platform/x86/amd/hsmp/plat.c +5 −1
  1010. drivers/platform/x86/amd/pmc/pmc-quirks.c +7 −0
  1011. drivers/platform/x86/amd/pmc/pmc.c +3 −4
  1012. drivers/platform/x86/amd/pmf/auto-mode.c +2 −2
  1013. drivers/platform/x86/amd/pmf/cnqf.c +4 −4
  1014. drivers/platform/x86/amd/pmf/core.c +14 −0
  1015. drivers/platform/x86/amd/pmf/pmf.h +1 −0
  1016. drivers/platform/x86/amd/pmf/sps.c +8 −4
  1017. drivers/platform/x86/amd/pmf/tee-if.c +26 −3
  1018. drivers/platform/x86/asus-laptop.c +6 −3
  1019. drivers/platform/x86/asus-wmi.c +12 −2
  1020. drivers/platform/x86/dell/alienware-wmi-wmax.c +58 −4
  1021. drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c +1 −1
  1022. drivers/platform/x86/fujitsu-laptop.c +29 −4
  1023. drivers/platform/x86/ideapad-laptop.c +16 −0
  1024. drivers/platform/x86/intel/hid.c +11 −10
  1025. drivers/platform/x86/intel/pmc/arl.c +2 −1
  1026. drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c +9 −4
  1027. drivers/platform/x86/msi-wmi-platform.c +63 −36
  1028. drivers/platform/x86/think-lmi.c +14 −12
  1029. drivers/platform/x86/think-lmi.h +1 −0
  1030. drivers/platform/x86/thinkpad_acpi.c +7 −0
  1031. drivers/platform/x86/x86-android-tablets/dmi.c +13 −1
  1032. drivers/platform/x86/x86-android-tablets/other.c +92 −32
  1033. drivers/platform/x86/x86-android-tablets/x86-android-tablets.h +2 −1
  1034. drivers/pmdomain/core.c +1 −1
  1035. drivers/pmdomain/renesas/rcar-gen4-sysc.c +0 −5
  1036. drivers/pmdomain/renesas/rcar-sysc.c +0 −5
  1037. drivers/power/supply/power_supply_sysfs.c +1 −1
  1038. drivers/pps/generators/pps_gen_tio.c +1 −1
  1039. drivers/ptp/ptp_ocp.c +68 −9
  1040. drivers/pwm/core.c +7 −6
  1041. drivers/pwm/pwm-axi-pwmgen.c +7 −3
  1042. drivers/pwm/pwm-fsl-ftm.c +6 −0
  1043. drivers/pwm/pwm-mediatek.c +6 −2
  1044. drivers/pwm/pwm-rcar.c +13 −11
  1045. drivers/pwm/pwm-stm32.c +3 −9
  1046. drivers/ras/amd/atl/internal.h +3 −0
  1047. drivers/ras/amd/atl/umc.c +17 −2
  1048. drivers/ras/amd/fmpm.c +8 −1
  1049. drivers/regulator/max20086-regulator.c +6 −1
  1050. drivers/remoteproc/qcom_wcnss.c +2 −1
  1051. drivers/s390/block/Kconfig +1 −2
  1052. drivers/s390/virtio/virtio_ccw.c +12 −4
  1053. drivers/scsi/hisi_sas/hisi_sas_main.c +20 −0
  1054. drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +7 −2
  1055. drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +12 −2
  1056. drivers/scsi/megaraid/megaraid_sas.h +2 −2
  1057. drivers/scsi/megaraid/megaraid_sas_base.c +7 −2
  1058. drivers/scsi/megaraid/megaraid_sas_fusion.c +4 −1
  1059. drivers/scsi/mpi3mr/mpi3mr_fw.c +7 −1
  1060. drivers/scsi/myrb.c +1 −1
  1061. drivers/scsi/pm8001/pm8001_sas.c +1 −0
  1062. drivers/scsi/scsi.c +24 −12
  1063. drivers/scsi/scsi_lib.c +5 −1
  1064. drivers/scsi/scsi_transport_iscsi.c +5 −2
  1065. drivers/scsi/scsi_transport_srp.c +1 −1
  1066. drivers/scsi/sd_zbc.c +5 −1
  1067. drivers/scsi/smartpqi/smartpqi_init.c +7 −6
  1068. drivers/scsi/storvsc_drv.c +1 −0
  1069. drivers/soc/samsung/exynos-usi.c +1 −1
  1070. drivers/soundwire/bus.c +5 −4
  1071. drivers/soundwire/intel_auxdevice.c +13 −23
  1072. drivers/spi/spi-fsl-dspi.c +45 −1
  1073. drivers/spi/spi-fsl-qspi.c +2 −6
  1074. drivers/spi/spi-imx.c +4 −1
  1075. drivers/spi/spi-loopback-test.c +1 −1
  1076. drivers/spi/spi-mem.c +5 −1
  1077. drivers/spi/spi-qpic-snand.c +2 −3
  1078. drivers/spi/spi-stm32-ospi.c +4 −0
  1079. drivers/spi/spi-sun4i.c +5 −1
  1080. drivers/spi/spi-tegra114.c +3 −3
  1081. drivers/spi/spi-tegra210-quad.c +3 −3
  1082. drivers/staging/axis-fifo/axis-fifo.c +3 −11
  1083. drivers/staging/iio/adc/ad7816.c +1 −1
  1084. drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1 −0
  1085. drivers/target/iscsi/iscsi_target.c +1 −1
  1086. drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +4 −3
  1087. drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c +17 −16
  1088. drivers/thermal/intel/x86_pkg_temp_thermal.c +1 −0
  1089. drivers/tty/serial/msm_serial.c +6 −0
  1090. drivers/tty/serial/sifive.c +6 −0
  1091. drivers/tty/vt/selection.c +2 −3
  1092. drivers/ufs/core/ufs-mcq.c +5 −7
  1093. drivers/ufs/core/ufs-sysfs.c +54 −0
  1094. drivers/ufs/core/ufshcd-priv.h +1 −0
  1095. drivers/ufs/core/ufshcd.c +99 −26
  1096. drivers/ufs/host/ufs-exynos.c +63 −22
  1097. drivers/ufs/host/ufs-exynos.h +5 −1
  1098. drivers/ufs/host/ufs-qcom.c +43 −0
  1099. drivers/ufs/host/ufs-qcom.h +18 −0
  1100. drivers/uio/uio_hv_generic.c +17 −22
  1101. drivers/usb/cdns3/cdns3-gadget.c +2 −0
  1102. drivers/usb/cdns3/cdnsp-gadget.c +31 −0
  1103. drivers/usb/cdns3/cdnsp-gadget.h +6 −0
  1104. drivers/usb/cdns3/cdnsp-pci.c +10 −2
  1105. drivers/usb/cdns3/cdnsp-ring.c +2 −1
  1106. drivers/usb/cdns3/core.h +3 −0
  1107. drivers/usb/chipidea/ci_hdrc_imx.c +31 −13
  1108. drivers/usb/class/cdc-wdm.c +16 −5
  1109. drivers/usb/class/usbtmc.c +36 −23
  1110. drivers/usb/core/quirks.c +9 −0
  1111. drivers/usb/dwc3/core.h +4 −0
  1112. drivers/usb/dwc3/dwc3-xilinx.c +1 −3
  1113. drivers/usb/dwc3/gadget.c +29 −37
  1114. drivers/usb/gadget/composite.c +5 −7
  1115. drivers/usb/gadget/function/f_ecm.c +7 −0
  1116. drivers/usb/gadget/function/f_midi2.c +1 −1
  1117. drivers/usb/gadget/udc/tegra-xudc.c +4 −0
  1118. drivers/usb/host/ohci-pci.c +23 −0
  1119. drivers/usb/host/uhci-platform.c +1 −1
  1120. drivers/usb/host/xhci-dbgcap.c +16 −3
  1121. drivers/usb/host/xhci-dbgcap.h +3 −0
  1122. drivers/usb/host/xhci-hub.c +16 −14
  1123. drivers/usb/host/xhci-ring.c +13 −17
  1124. drivers/usb/host/xhci-tegra.c +3 −0
  1125. drivers/usb/host/xhci.c +5 −13
  1126. drivers/usb/host/xhci.h +3 −2
  1127. drivers/usb/misc/onboard_usb_dev.c +8 −2
  1128. drivers/usb/serial/ftdi_sio.c +2 −0
  1129. drivers/usb/serial/ftdi_sio_ids.h +5 −0
  1130. drivers/usb/serial/option.c +3 −0
  1131. drivers/usb/serial/usb-serial-simple.c +7 −0
  1132. drivers/usb/storage/unusual_uas.h +7 −0
  1133. drivers/usb/typec/class.c +20 −4
  1134. drivers/usb/typec/class.h +1 −0
  1135. drivers/usb/typec/tcpm/tcpm.c +1 −1
  1136. drivers/usb/typec/ucsi/displayport.c +13 −8
  1137. drivers/usb/typec/ucsi/ucsi.c +34 −0
  1138. drivers/usb/typec/ucsi/ucsi.h +2 −0
  1139. drivers/vfio/pci/vfio_pci_config.c +1 −1
  1140. drivers/vfio/pci/vfio_pci_core.c +6 −6
  1141. drivers/vhost/scsi.c +56 −18
  1142. drivers/virtio/virtio.c +6 −0
  1143. drivers/virtio/virtio_pci_modern.c +2 −2
  1144. drivers/virtio/virtio_ring.c +1 −1
  1145. drivers/xen/Kconfig +1 −1
  1146. drivers/xen/balloon.c +24 −10
  1147. drivers/xen/swiotlb-xen.c +1 −0
  1148. drivers/xen/xenbus/xenbus.h +2 −0
  1149. drivers/xen/xenbus/xenbus_comms.c +4 −5
  1150. drivers/xen/xenbus/xenbus_dev_frontend.c +1 −1
  1151. drivers/xen/xenbus/xenbus_probe.c +8 −6
  1152. drivers/xen/xenbus/xenbus_probe_frontend.c +1 −0
  1153. drivers/xen/xenbus/xenbus_xs.c +16 −2
  1154. fs/Kconfig +1 −0
  1155. fs/afs/dynroot.c +2 −2
  1156. fs/bcachefs/Kconfig +3 −4
  1157. fs/bcachefs/alloc_foreground.c +23 −1
  1158. fs/bcachefs/alloc_foreground.h +3 −1
  1159. fs/bcachefs/backpointers.c +79 −38
  1160. fs/bcachefs/bcachefs.h +4 −2
  1161. fs/bcachefs/bcachefs_format.h +43 −38
  1162. fs/bcachefs/bkey_methods.c +20 −4
  1163. fs/bcachefs/btree_cache.c +4 −5
  1164. fs/bcachefs/btree_gc.c +25 −2
  1165. fs/bcachefs/btree_io.c +8 −1
  1166. fs/bcachefs/btree_iter.c +20 −11
  1167. fs/bcachefs/btree_journal_iter.c +3 −4
  1168. fs/bcachefs/btree_key_cache.c +17 −8
  1169. fs/bcachefs/btree_key_cache.h +1 −2
  1170. fs/bcachefs/btree_node_scan.c +3 −3
  1171. fs/bcachefs/btree_update_interior.c +33 −18
  1172. fs/bcachefs/btree_write_buffer.c +4 −4
  1173. fs/bcachefs/buckets.c +12 −6
  1174. fs/bcachefs/buckets.h +1 −5
  1175. fs/bcachefs/checksum.c +57 −190
  1176. fs/bcachefs/checksum.h +1 −2
  1177. fs/bcachefs/data_update.c +1 −1
  1178. fs/bcachefs/dirent.c +21 −36
  1179. fs/bcachefs/dirent.h +16 −1
  1180. fs/bcachefs/disk_accounting.c +15 −2
  1181. fs/bcachefs/disk_accounting.h +11 −5
  1182. fs/bcachefs/disk_groups.c +12 −13
  1183. fs/bcachefs/ec.c +9 −15
  1184. fs/bcachefs/ec.h +1 −0
  1185. fs/bcachefs/errcode.h +2 −2
  1186. fs/bcachefs/error.c +15 −6
  1187. fs/bcachefs/error.h +1 −0
  1188. fs/bcachefs/extents.c +4 −3
  1189. fs/bcachefs/extents.h +0 −7
  1190. fs/bcachefs/fs-io-buffered.c +16 −1
  1191. fs/bcachefs/fs-io-pagecache.c +11 −7
  1192. fs/bcachefs/fs-io.c +35 −9
  1193. fs/bcachefs/fs-ioctl.c +0 −217
  1194. fs/bcachefs/fs-ioctl.h +0 −75
  1195. fs/bcachefs/fs.c +378 −83
  1196. fs/bcachefs/fsck.c +81 −2
  1197. fs/bcachefs/inode.c +36 −0
  1198. fs/bcachefs/inode.h +11 −1
  1199. fs/bcachefs/inode_format.h +5 −4
  1200. fs/bcachefs/io_read.c +17 −10
  1201. fs/bcachefs/io_write.c +21 −0
  1202. fs/bcachefs/journal.c +33 −3
  1203. fs/bcachefs/journal.h +1 −6
  1204. fs/bcachefs/journal_io.c +5 −3
  1205. fs/bcachefs/journal_reclaim.c +17 −6
  1206. fs/bcachefs/move.c +2 −1
  1207. fs/bcachefs/movinggc.c +7 −0
  1208. fs/bcachefs/movinggc.h +9 −0
  1209. fs/bcachefs/namei.c +3 −6
  1210. fs/bcachefs/opts.h +5 −0
  1211. fs/bcachefs/rebalance.c +10 −3
  1212. fs/bcachefs/rebalance.h +1 −1
  1213. fs/bcachefs/recovery.c +13 −6
  1214. fs/bcachefs/recovery_passes.c +37 −33
  1215. fs/bcachefs/sb-downgrade.c +4 −0
  1216. fs/bcachefs/sb-errors_format.h +17 −6
  1217. fs/bcachefs/sb-members.c +4 −2
  1218. fs/bcachefs/sb-members.h +8 −5
  1219. fs/bcachefs/snapshot.c +1 −1
  1220. fs/bcachefs/str_hash.h +2 −3
  1221. fs/bcachefs/subvolume.c +3 −2
  1222. fs/bcachefs/super-io.c +20 −3
  1223. fs/bcachefs/super.c +103 −117
  1224. fs/bcachefs/sysfs.c +3 −4
  1225. fs/bcachefs/tests.c +4 −0
  1226. fs/bcachefs/thread_with_file.c +3 −1
  1227. fs/bcachefs/util.h +38 −0
  1228. fs/bcachefs/xattr.c +6 −0
  1229. fs/bcachefs/xattr_format.h +7 −1
  1230. fs/binfmt_elf.c +47 −24
  1231. fs/btrfs/Kconfig +1 −1
  1232. fs/btrfs/compression.c +1 −1
  1233. fs/btrfs/discard.c +15 −2
  1234. fs/btrfs/disk-io.c +0 −2
  1235. fs/btrfs/extent_io.c +3 −3
  1236. fs/btrfs/extent_io.h +2 −0
  1237. fs/btrfs/file.c +7 −2
  1238. fs/btrfs/fs.h +1 −0
  1239. fs/btrfs/inode.c +15 −5
  1240. fs/btrfs/ioctl.c +2 −0
  1241. fs/btrfs/relocation.c +1 −1
  1242. fs/btrfs/scrub.c +2 −2
  1243. fs/btrfs/subpage.c +2 −2
  1244. fs/btrfs/super.c +5 −2
  1245. fs/btrfs/tree-checker.c +1 −1
  1246. fs/btrfs/volumes.c +1 −90
  1247. fs/btrfs/zoned.c +16 −3
  1248. fs/buffer.c +66 −31
  1249. fs/cachefiles/key.c +1 −1
  1250. fs/ceph/Kconfig +1 −1
  1251. fs/ceph/inode.c +1 −1
  1252. fs/dax.c +1 −0
  1253. fs/devpts/inode.c +2 −2
  1254. fs/erofs/Kconfig +1 −1
  1255. fs/erofs/erofs_fs.h +4 −4
  1256. fs/erofs/fileio.c +4 −2
  1257. fs/erofs/super.c +0 −1
  1258. fs/erofs/zdata.c +14 −18
  1259. fs/erofs/zmap.c +3 −2
  1260. fs/eventpoll.c +11 −2
  1261. fs/ext4/block_validity.c +2 −3
  1262. fs/ext4/ialloc.c +2 −1
  1263. fs/ext4/inode.c +52 −23
  1264. fs/ext4/mballoc.c +10 −11
  1265. fs/ext4/namei.c +1 −1
  1266. fs/file.c +1 −1
  1267. fs/fuse/virtio_fs.c +3 −0
  1268. fs/gfs2/Kconfig +0 −1
  1269. fs/hfs/bnode.c +6 −0
  1270. fs/hfsplus/bnode.c +6 −0
  1271. fs/iomap/buffered-io.c +1 −1
  1272. fs/isofs/export.c +1 −1
  1273. fs/jbd2/revoke.c +9 −6
  1274. fs/namei.c +62 −27
  1275. fs/namespace.c +64 −56
  1276. fs/netfs/fscache_cache.c +1 −1
  1277. fs/netfs/fscache_cookie.c +1 −1
  1278. fs/netfs/main.c +4 −0
  1279. fs/nfs/Kconfig +1 −1
  1280. fs/nfs/client.c +9 −0
  1281. fs/nfs/dir.c +14 −1
  1282. fs/nfs/direct.c +1 −1
  1283. fs/nfs/filelayout/filelayoutdev.c +3 −3
  1284. fs/nfs/flexfilelayout/flexfilelayout.c +3 −3
  1285. fs/nfs/flexfilelayout/flexfilelayoutdev.c +3 −3
  1286. fs/nfs/internal.h +0 −7
  1287. fs/nfs/localio.c +1 −1
  1288. fs/nfs/netns.h +5 −1
  1289. fs/nfs/nfs3acl.c +1 −1
  1290. fs/nfs/nfs4proc.c +17 −1
  1291. fs/nfs/nfs4session.h +0 −4
  1292. fs/nfs/nfs4trace.h +22 −12
  1293. fs/nfs/pnfs.c +34 −17
  1294. fs/nfs/pnfs.h +3 −1
  1295. fs/nfs/pnfs_nfs.c +18 −14
  1296. fs/nfsd/Kconfig +1 −0
  1297. fs/nfsd/nfs4state.c +1 −1
  1298. fs/nfsd/nfsfh.h +0 −7
  1299. fs/nilfs2/the_nilfs.c +0 −3
  1300. fs/notify/fanotify/fanotify_user.c +1 −6
  1301. fs/ocfs2/alloc.c +1 −0
  1302. fs/ocfs2/journal.c +59 −23
  1303. fs/ocfs2/journal.h +1 −0
  1304. fs/ocfs2/ocfs2.h +16 −1
  1305. fs/ocfs2/quota_local.c +2 −7
  1306. fs/ocfs2/suballoc.c +32 −6
  1307. fs/ocfs2/suballoc.h +1 −0
  1308. fs/ocfs2/super.c +3 −0
  1309. fs/orangefs/inode.c +5 −4
  1310. fs/overlayfs/overlayfs.h +0 −2
  1311. fs/overlayfs/super.c +5 −0
  1312. fs/pnode.c +9 −8
  1313. fs/pnode.h +1 −1
  1314. fs/smb/client/cached_dir.c +2 −8
  1315. fs/smb/client/cifsencrypt.c +5 −11
  1316. fs/smb/client/cifsglob.h +2 −4
  1317. fs/smb/client/cifspdu.h +4 −3
  1318. fs/smb/client/cifsproto.h +6 −0
  1319. fs/smb/client/cifssmb.c +57 −0
  1320. fs/smb/client/connect.c +12 −47
  1321. fs/smb/client/file.c +32 −4
  1322. fs/smb/client/fs_context.c +6 −19
  1323. fs/smb/client/fs_context.h +47 −0
  1324. fs/smb/client/inode.c +17 −8
  1325. fs/smb/client/readdir.c +5 −2
  1326. fs/smb/client/reparse.c +29 −34
  1327. fs/smb/client/reparse.h +1 −4
  1328. fs/smb/client/sess.c +40 −20
  1329. fs/smb/client/smb1ops.c +244 −32
  1330. fs/smb/client/smb2inode.c +2 −0
  1331. fs/smb/client/smb2ops.c +7 −7
  1332. fs/smb/client/smb2pdu.c +6 −16
  1333. fs/smb/common/smb2pdu.h +3 −3
  1334. fs/smb/server/auth.c +13 −1
  1335. fs/smb/server/connection.c +3 −1
  1336. fs/smb/server/mgmt/user_session.c +14 −6
  1337. fs/smb/server/mgmt/user_session.h +1 −0
  1338. fs/smb/server/oplock.c +15 −26
  1339. fs/smb/server/oplock.h +0 −1
  1340. fs/smb/server/smb2pdu.c +12 −9
  1341. fs/smb/server/smb_common.h +2 −0
  1342. fs/smb/server/transport_ipc.c +6 −1
  1343. fs/smb/server/transport_tcp.c +9 −5
  1344. fs/smb/server/transport_tcp.h +1 −0
  1345. fs/smb/server/vfs.c +9 −3
  1346. fs/smb/server/vfs_cache.c +27 −14
  1347. fs/splice.c +1 −1
  1348. fs/stat.c +18 −14
  1349. fs/udf/truncate.c +1 −1
  1350. fs/userfaultfd.c +22 −6
  1351. fs/xattr.c +26 −2
  1352. fs/xfs/Kconfig +1 −1
  1353. fs/xfs/xfs_buf.c +1 −0
  1354. fs/xfs/xfs_buf_mem.c +1 −1
  1355. fs/xfs/xfs_dquot.c +1 −2
  1356. fs/xfs/xfs_fsmap.c +33 −18
  1357. fs/xfs/xfs_inode_item.c +0 −6
  1358. fs/xfs/xfs_log.c +1 −1
  1359. fs/xfs/xfs_mount.h +1 −0
  1360. fs/xfs/xfs_super.c +27 −1
  1361. fs/xfs/xfs_sysfs.c +32 −0
  1362. fs/xfs/xfs_trans_ail.c +20 −19
  1363. fs/xfs/xfs_trans_priv.h +0 −28
  1364. fs/xfs/xfs_zone_alloc.c +7 −0
  1365. fs/xfs/xfs_zone_gc.c +23 −4
  1366. include/acpi/actbl.h +1 −1
  1367. include/crypto/hash.h +5 −1
  1368. include/crypto/internal/hash.h +1 −1
  1369. include/cxl/features.h +3 −2
  1370. include/drm/drm_gem.h +1 −2
  1371. include/drm/drm_gpusvm.h +33 −14
  1372. include/drm/drm_kunit_helpers.h +3 −0
  1373. include/drm/intel/pciids.h +5 −0
  1374. include/drm/ttm/ttm_backup.h +8 −10
  1375. include/drm/ttm/ttm_tt.h +1 −1
  1376. include/kunit/test.h +1 −1
  1377. include/linux/alloc_tag.h +12 −0
  1378. include/linux/backing-dev.h +1 −0
  1379. include/linux/bio.h +1 −0
  1380. include/linux/blkdev.h +49 −29
  1381. include/linux/buffer_head.h +9 −0
  1382. include/linux/ceph/osd_client.h +0 −6
  1383. include/linux/cgroup-defs.h +1 −0
  1384. include/linux/cgroup.h +1 −1
  1385. include/linux/codetag.h +4 −4
  1386. include/linux/cpu.h +2 −0
  1387. include/linux/cpufreq.h +54 −29
  1388. include/linux/dcache.h +50 −56
  1389. include/linux/dma-mapping.h +8 −4
  1390. include/linux/execmem.h +10 −1
  1391. include/linux/file_ref.h +6 −13
  1392. include/linux/firmware/cirrus/cs_dsp_test_utils.h +0 −1
  1393. include/linux/fs.h +1 −1
  1394. include/linux/fsnotify_backend.h +0 −15
  1395. include/linux/fwnode.h +5 −0
  1396. include/linux/gpio/consumer.h +1 −0
  1397. include/linux/highmem.h +5 −5
  1398. include/linux/hrtimer.h +1 −1
  1399. include/linux/hugetlb.h +5 −0
  1400. include/linux/hyperv.h +6 −7
  1401. include/linux/ieee80211.h +1 −1
  1402. include/linux/iommu.h +4 −4
  1403. include/linux/irqchip/irq-davinci-aintc.h +0 −27
  1404. include/linux/kvm_host.h +1 −1
  1405. include/linux/local_lock.h +8 −50
  1406. include/linux/local_lock_internal.h +87 −120
  1407. include/linux/micrel_phy.h +0 −1
  1408. include/linux/mm.h +18 −1
  1409. include/linux/mman.h +2 −0
  1410. include/linux/mmzone.h +3 −2
  1411. include/linux/module.h +7 −0
  1412. include/linux/mroute_base.h +5 −0
  1413. include/linux/mtd/spinand.h +1 −1
  1414. include/linux/namei.h +1 −0
  1415. include/linux/netdevice.h +3 −0
  1416. include/linux/nfs.h +0 −7
  1417. include/linux/nfs_fs_sb.h +9 −3
  1418. include/linux/page-flags.h +7 −0
  1419. include/linux/pci.h +2 −0
  1420. include/linux/percpu.h +0 −4
  1421. include/linux/perf_event.h +0 −1
  1422. include/linux/pgalloc_tag.h +8 −0
  1423. include/linux/pgtable.h +6 −3
  1424. include/linux/phylink.h +20 −11
  1425. include/linux/platform_data/x86/intel_pmc_ipc.h +4 −0
  1426. include/linux/rtnetlink.h +1 −1
  1427. include/linux/soundwire/sdw_intel.h +1 −1
  1428. include/linux/spi/spi.h +1 −4
  1429. include/linux/timekeeper_internal.h +5 −3
  1430. include/linux/tpm.h +20 −1
  1431. include/linux/virtio.h +3 −0
  1432. include/linux/vmalloc.h +1 −0
  1433. include/net/bluetooth/hci.h +3 −1
  1434. include/net/bluetooth/hci_core.h +10 −11
  1435. include/net/bluetooth/hci_sync.h +3 −0
  1436. include/net/fib_rules.h +2 −0
  1437. include/net/flow.h +1 −0
  1438. include/net/l3mdev.h +27 −0
  1439. include/net/netdev_lock.h +3 −0
  1440. include/net/netdev_queues.h +6 −0
  1441. include/net/sch_generic.h +15 −0
  1442. include/net/sctp/structs.h +2 −1
  1443. include/net/sock.h +38 −2
  1444. include/net/xdp_sock.h +0 −3
  1445. include/net/xfrm.h +0 −1
  1446. include/net/xsk_buff_pool.h +3 −1
  1447. include/rdma/ib_verbs.h +7 −0
  1448. include/sound/pcm.h +2 −0
  1449. include/sound/soc_sdw_utils.h +1 −0
  1450. include/sound/ump_convert.h +1 −1
  1451. include/sound/ump_msg.h +2 −2
  1452. include/trace/events/btrfs.h +1 −1
  1453. include/uapi/cxl/features.h +15 −6
  1454. include/uapi/drm/ivpu_accel.h +2 −2
  1455. include/uapi/linux/bpf.h +3 −0
  1456. include/uapi/linux/ethtool_netlink_generated.h +0 −5
  1457. include/uapi/linux/io_uring.h +3 −1
  1458. include/uapi/linux/landlock.h +57 −30
  1459. include/uapi/linux/taskstats.h +29 −18
  1460. include/uapi/linux/vhost.h +2 −2
  1461. include/uapi/linux/virtio_pci.h +1 −0
  1462. include/ufs/ufs.h +4 −1
  1463. include/ufs/ufs_quirks.h +6 −0
  1464. include/ufs/ufshcd.h +6 −1
  1465. include/vdso/unaligned.h +6 −6
  1466. init/Kconfig +13 −15
  1467. io_uring/fdinfo.c +27 −25
  1468. io_uring/io_uring.c +39 −44
  1469. io_uring/kbuf.c +2 −0
  1470. io_uring/memmap.c +1 −1
  1471. io_uring/net.c +10 −4
  1472. io_uring/rsrc.c +63 −46
  1473. io_uring/sqpoll.c +1 −1
  1474. io_uring/uring_cmd.c +5 −0
  1475. io_uring/uring_cmd.h +0 −6
  1476. io_uring/zcrx.c +38 −18
  1477. io_uring/zcrx.h +4 −2
  1478. kernel/audit_watch.c +10 −6
  1479. kernel/bpf/hashtab.c +1 −1
  1480. kernel/bpf/preload/bpf_preload_kern.c +1 −0
  1481. kernel/bpf/queue_stack_maps.c +12 −23
  1482. kernel/bpf/ringbuf.c +7 −10
  1483. kernel/bpf/rqspinlock.c +1 −1
  1484. kernel/bpf/syscall.c +3 −3
  1485. kernel/cgroup/cgroup.c +36 −1
  1486. kernel/cgroup/cpuset-internal.h +1 −0
  1487. kernel/cgroup/cpuset.c +242 −165
  1488. kernel/cgroup/rstat.c +2 −1
  1489. kernel/dma/coherent.c +9 −3
  1490. kernel/dma/contiguous.c +1 −2
  1491. kernel/dma/mapping.c +17 −8
  1492. kernel/events/core.c +23 −51
  1493. kernel/events/uprobes.c +13 −2
  1494. kernel/fork.c +5 −4
  1495. kernel/irq/msi.c +1 −1
  1496. kernel/module/Kconfig +5 −0
  1497. kernel/module/main.c +1 −0
  1498. kernel/padata.c +2 −1
  1499. kernel/params.c +25 −26
  1500. kernel/sched/cpufreq_schedutil.c +42 −7
  1501. kernel/sched/ext.c +130 −111
  1502. kernel/sched/ext_idle.c +1 −1
  1503. kernel/sched/fair.c +1 −3
  1504. kernel/time/hrtimer.c +1 −1
  1505. kernel/time/tick-common.c +22 −0
  1506. kernel/time/timekeeping.c +42 −8
  1507. kernel/time/vsyscall.c +2 −2
  1508. kernel/trace/fprobe.c +150 −21
  1509. kernel/trace/ftrace.c +194 −143
  1510. kernel/trace/ring_buffer.c +5 −3
  1511. kernel/trace/rv/rv.c +6 −1
  1512. kernel/trace/trace.c +13 −3
  1513. kernel/trace/trace_dynevent.c +15 −1
  1514. kernel/trace/trace_dynevent.h +1 −0
  1515. kernel/trace/trace_entries.h +2 −2
  1516. kernel/trace/trace_eprobe.c +3 −0
  1517. kernel/trace/trace_events_filter.c +2 −2
  1518. kernel/trace/trace_events_synth.c +0 −1
  1519. kernel/trace/trace_events_trigger.c +1 −1
  1520. kernel/trace/trace_fprobe.c +17 −9
  1521. kernel/trace/trace_functions.c +1 −5
  1522. kernel/trace/trace_functions_graph.c +5 −6
  1523. kernel/trace/trace_kprobe.c +1 −1
  1524. kernel/trace/trace_output.c +2 −2
  1525. kernel/trace/trace_probe.c +9 −0
  1526. kernel/trace/trace_uprobe.c +1 −1
  1527. kernel/vhost_task.c +1 −1
  1528. lib/Kconfig +26 −31
  1529. lib/Kconfig.debug +1 −1
  1530. lib/Kconfig.ubsan +0 −1
  1531. lib/alloc_tag.c +81 −21
  1532. lib/asn1_decoder.c +1 −0
  1533. lib/codetag.c +3 −2
  1534. lib/iov_iter.c +1 −1
  1535. lib/string.c +10 −3
  1536. lib/test_ubsan.c +11 −7
  1537. lib/tests/slub_kunit.c +1 −0
  1538. lib/ucs2_string.c +1 −0
  1539. lib/zlib_inflate/inflate_syms.c +1 −0
  1540. mm/cma.c +15 −9
  1541. mm/compaction.c +3 −3
  1542. mm/execmem.c +37 −3
  1543. mm/filemap.c +1 −0
  1544. mm/gup.c +2 −2
  1545. mm/huge_memory.c +8 −3
  1546. mm/hugetlb.c +71 −10
  1547. mm/hugetlb_vmemmap.c +3 −3
  1548. mm/internal.h +11 −16
  1549. mm/kasan/kasan_test_c.c +21 −0
  1550. mm/kasan/shadow.c +78 −14
  1551. mm/memblock.c +19 −2
  1552. mm/memcontrol-v1.c +1 −1
  1553. mm/memcontrol.c +21 −24
  1554. mm/memory.c +6 −6
  1555. mm/migrate.c +5 −3
  1556. mm/mm_init.c +1 −1
  1557. mm/mremap.c +1 −2
  1558. mm/page_alloc.c +116 −96
  1559. mm/slub.c +17 −21
  1560. mm/swapfile.c +25 −7
  1561. mm/truncate.c +12 −8
  1562. mm/userfaultfd.c +21 −4
  1563. mm/vma.c +48 −4
  1564. mm/vma.h +8 −1
  1565. mm/vmalloc.c +27 −7
  1566. mm/vmscan.c +26 −3
  1567. mm/zsmalloc.c +4 −4
  1568. net/batman-adv/Kconfig +1 −1
  1569. net/batman-adv/hard-interface.c +18 −14
  1570. net/bluetooth/hci_conn.c +37 −176
  1571. net/bluetooth/hci_event.c +49 −44
  1572. net/bluetooth/hci_sync.c +145 −5
  1573. net/bluetooth/iso.c +12 −14
  1574. net/bluetooth/l2cap_core.c +29 −8
  1575. net/bluetooth/mgmt.c +6 −3
  1576. net/bridge/br_nf_core.c +2 −5
  1577. net/bridge/br_private.h +1 −0
  1578. net/bridge/br_vlan.c +3 −1
  1579. net/can/bcm.c +54 −25
  1580. net/can/gw.c +90 −59
  1581. net/can/j1939/socket.c +1 −0
  1582. net/ceph/Kconfig +1 −1
  1583. net/ceph/osd_client.c +0 −23
  1584. net/core/dev.c +22 −28
  1585. net/core/dev_api.c +39 −0
  1586. net/core/devmem.c +7 −0
  1587. net/core/devmem.h +2 −0
  1588. net/core/fib_rules.c +40 −8
  1589. net/core/filter.c +45 −36
  1590. net/core/link_watch.c +23 −5
  1591. net/core/lock_debug.c +1 −1
  1592. net/core/lwtunnel.c +20 −6
  1593. net/core/netdev-genl.c +67 −22
  1594. net/core/rtnetlink.c +6 −6
  1595. net/core/selftests.c +13 −5
  1596. net/core/sock.c +5 −0
  1597. net/dsa/dsa.c +49 −10
  1598. net/dsa/tag_8021q.c +1 −1
  1599. net/dsa/tag_ksz.c +15 −4
  1600. net/ethtool/cmis.h +0 −1
  1601. net/ethtool/cmis_cdb.c +4 −16
  1602. net/ethtool/common.c +1 −0
  1603. net/ethtool/ioctl.c +1 −1
  1604. net/ethtool/netlink.c +5 −3
  1605. net/hsr/hsr_device.c +3 −3
  1606. net/ipv4/esp4.c +7 −46
  1607. net/ipv4/ipmr.c +1 −11
  1608. net/ipv4/tcp_offload.c +1 −1
  1609. net/ipv4/udp_offload.c +60 −1
  1610. net/ipv4/xfrm4_input.c +10 −8
  1611. net/ipv6/addrconf.c +14 −10
  1612. net/ipv6/esp6.c +7 −46
  1613. net/ipv6/ip6mr.c +1 −11
  1614. net/ipv6/route.c +5 −4
  1615. net/ipv6/tcpv6_offload.c +1 −1
  1616. net/ipv6/xfrm6_input.c +10 −8
  1617. net/l3mdev/l3mdev.c +3 −1
  1618. net/llc/af_llc.c +4 −4
  1619. net/mac80211/iface.c +3 −0
  1620. net/mac80211/main.c +4 −2
  1621. net/mac80211/mlme.c +6 −6
  1622. net/mac80211/status.c +7 −1
  1623. net/mctp/af_mctp.c +3 −0
  1624. net/mctp/device.c +12 −5
  1625. net/mctp/route.c +3 −1
  1626. net/mptcp/pm_userspace.c +5 −1
  1627. net/mptcp/subflow.c +6 −2
  1628. net/netfilter/Kconfig +2 −2
  1629. net/netfilter/ipset/ip_set_hash_gen.h +1 −1
  1630. net/netfilter/ipvs/Kconfig +1 −1
  1631. net/netfilter/ipvs/ip_vs_xmit.c +8 −19
  1632. net/netfilter/nf_flow_table_core.c +6 −4
  1633. net/netfilter/nft_set_pipapo_avx2.c +2 −1
  1634. net/openvswitch/Kconfig +1 −1
  1635. net/openvswitch/actions.c +1 −2
  1636. net/openvswitch/flow_netlink.c +2 −1
  1637. net/sched/Kconfig +1 −1
  1638. net/sched/cls_api.c +45 −21
  1639. net/sched/sch_codel.c +2 −5
  1640. net/sched/sch_drr.c +10 −6
  1641. net/sched/sch_ets.c +10 −7
  1642. net/sched/sch_fq.c +1 −1
  1643. net/sched/sch_fq_codel.c +3 −5
  1644. net/sched/sch_fq_pie.c +1 −1
  1645. net/sched/sch_hfsc.c +27 −12
  1646. net/sched/sch_hhf.c +1 −1
  1647. net/sched/sch_htb.c +6 −7
  1648. net/sched/sch_pie.c +1 −1
  1649. net/sched/sch_qfq.c +12 −6
  1650. net/sched/sch_sfq.c +50 −16
  1651. net/sctp/Kconfig +1 −1
  1652. net/sctp/socket.c +14 −8
  1653. net/sctp/transport.c +2 −0
  1654. net/smc/af_smc.c +5 −0
  1655. net/sunrpc/cache.c +1 −5
  1656. net/tipc/crypto.c +5 −0
  1657. net/tipc/link.c +1 −0
  1658. net/tipc/monitor.c +2 −1
  1659. net/tls/tls_main.c +6 −0
  1660. net/tls/tls_strp.c +2 −1
  1661. net/wireless/scan.c +1 −1
  1662. net/xdp/xsk.c +4 −4
  1663. net/xdp/xsk_buff_pool.c +1 −0
  1664. net/xfrm/espintcp.c +3 −1
  1665. net/xfrm/xfrm_ipcomp.c +1 −2
  1666. net/xfrm/xfrm_policy.c +3 −0
  1667. net/xfrm/xfrm_state.c +3 −3
  1668. rust/Makefile +1 −1
  1669. rust/bindings/lib.rs +1 −0
  1670. rust/helpers/dma.c +16 −0
  1671. rust/helpers/helpers.c +1 −0
  1672. rust/helpers/io.c +17 −17
  1673. rust/kernel/alloc/kvec.rs +3 −0
  1674. rust/kernel/firmware.rs +6 −2
  1675. rust/kernel/list.rs +3 −0
  1676. rust/kernel/str.rs +23 −23
  1677. rust/macros/kunit.rs +4 −9
  1678. rust/macros/module.rs +5 −14
  1679. rust/macros/paste.rs +1 −1
  1680. rust/pin-init/examples/pthread_mutex.rs +1 −1
  1681. rust/pin-init/internal/src/pinned_drop.rs +1 −2
  1682. rust/pin-init/src/alloc.rs +3 −5
  1683. rust/pin-init/src/lib.rs +1 −1
  1684. rust/uapi/lib.rs +1 −0
  1685. samples/bpf/Makefile +1 −1
  1686. samples/ftrace/sample-trace-array.c +1 −1
  1687. samples/livepatch/livepatch-callbacks-busymod.c +1 −0
  1688. samples/livepatch/livepatch-callbacks-demo.c +1 −0
  1689. samples/livepatch/livepatch-callbacks-mod.c +1 −0
  1690. samples/livepatch/livepatch-sample.c +1 −0
  1691. samples/livepatch/livepatch-shadow-fix1.c +1 −0
  1692. samples/livepatch/livepatch-shadow-fix2.c +1 −0
  1693. scripts/Makefile.compiler +2 −2
  1694. scripts/Makefile.extrawarn +21 −2
  1695. scripts/Makefile.vmlinux +3 −3
  1696. scripts/Makefile.vmlinux_o +2 −2
  1697. scripts/generate_rust_analyzer.py +9 −3
  1698. scripts/genksyms/keywords.c +7 −0
  1699. scripts/genksyms/parse.y +4 −1
  1700. scripts/package/kernel.spec +1 −0
  1701. scripts/package/mkdebian +1 −1
  1702. security/Kconfig.hardening +1 −1
  1703. security/integrity/ima/ima_main.c +3 −1
  1704. security/landlock/audit.c +2 −2
  1705. security/landlock/domain.c +2 −2
  1706. security/landlock/domain.h +1 −1
  1707. security/landlock/id.c +31 −2
  1708. security/landlock/syscalls.c +15 −15
  1709. sound/core/oss/pcm_oss.c +1 −2
  1710. sound/core/pcm_native.c +11 −0
  1711. sound/core/seq/seq_clientmgr.c +33 −19
  1712. sound/core/seq/seq_ump_convert.c +18 −0
  1713. sound/core/seq/seq_ump_convert.h +1 −0
  1714. sound/hda/intel-sdw-acpi.c +1 −1
  1715. sound/isa/azt2320.c +2 −2
  1716. sound/pci/es1968.c +4 −2
  1717. sound/pci/hda/Kconfig +1 −3
  1718. sound/pci/hda/patch_realtek.c +104 −19
  1719. sound/pci/hda/tas2781_hda_spi.c +1 −2
  1720. sound/sh/Kconfig +1 −1
  1721. sound/soc/amd/acp/acp-i2s.c +1 −1
  1722. sound/soc/amd/acp/acp-legacy-common.c +1 −1
  1723. sound/soc/amd/acp/acp-rembrandt.c +1 −1
  1724. sound/soc/amd/acp/acp-renoir.c +1 −1
  1725. sound/soc/amd/acp/acp63.c +1 −1
  1726. sound/soc/amd/acp/acp70.c +1 −1
  1727. sound/soc/amd/ps/pci-ps.c +3 −2
  1728. sound/soc/codecs/Kconfig +2 −3
  1729. sound/soc/codecs/aw88081.c +10 −0
  1730. sound/soc/codecs/cs42l43-jack.c +10 −0
  1731. sound/soc/codecs/hdmi-codec.c +19 −3
  1732. sound/soc/codecs/lpass-wsa-macro.c +84 −33
  1733. sound/soc/dwc/dwc-i2s.c +6 −7
  1734. sound/soc/fsl/fsl_asrc_dma.c +14 −1
  1735. sound/soc/fsl/fsl_qmc_audio.c +3 −0
  1736. sound/soc/fsl/imx-card.c +1 −1
  1737. sound/soc/generic/simple-card-utils.c +2 −2
  1738. sound/soc/intel/avs/path.c +72 −0
  1739. sound/soc/intel/avs/path.h +5 −0
  1740. sound/soc/intel/avs/pcm.c +50 −2
  1741. sound/soc/intel/boards/bytcr_rt5640.c +13 −0
  1742. sound/soc/intel/boards/sof_sdw.c +1 −0
  1743. sound/soc/intel/catpt/dsp.c +1 −1
  1744. sound/soc/intel/common/soc-acpi-intel-ptl-match.c +2 −1
  1745. sound/soc/mediatek/Kconfig +1 −0
  1746. sound/soc/qcom/lpass.h +2 −1
  1747. sound/soc/renesas/rz-ssi.c +1 −1
  1748. sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c +4 −0
  1749. sound/soc/sdw_utils/soc_sdw_cs42l43.c +10 −0
  1750. sound/soc/sdw_utils/soc_sdw_cs_amp.c +24 −0
  1751. sound/soc/sdw_utils/soc_sdw_rt_dmic.c +2 −0
  1752. sound/soc/soc-pcm.c +4 −1
  1753. sound/soc/sof/intel/hda-bus.c +1 −1
  1754. sound/soc/sof/intel/hda.c +15 −1
  1755. sound/soc/sof/ipc4-control.c +10 −1
  1756. sound/soc/sof/ipc4-pcm.c +2 −1
  1757. sound/soc/sof/topology.c +14 −4
  1758. sound/soc/stm/stm32_sai_sub.c +11 −5
  1759. sound/usb/endpoint.c +7 −0
  1760. sound/usb/format.c +2 −1
  1761. sound/usb/midi.c +12 −4
  1762. sound/usb/quirks.c +4 −0
  1763. tools/arch/arm64/include/uapi/asm/kvm.h +2 −3
  1764. tools/arch/arm64/include/uapi/asm/unistd.h +1 −23
  1765. tools/arch/x86/include/asm/cpufeatures.h +20 −8
  1766. tools/arch/x86/include/asm/msr-index.h +19 −12
  1767. tools/arch/x86/include/uapi/asm/kvm.h +4 −0
  1768. tools/arch/x86/include/uapi/asm/svm.h +2 −0
  1769. tools/arch/x86/lib/memset_64.S +2 −1
  1770. tools/arch/x86/lib/x86-opcode-map.txt +2 −2
  1771. tools/hv/hv_kvp_daemon.c +84 −24
  1772. tools/include/linux/cfi_types.h +45 −0
  1773. tools/include/uapi/asm-generic/mman-common.h +1 −0
  1774. tools/include/uapi/asm-generic/unistd.h +3 −1
  1775. tools/include/uapi/linux/bpf.h +3 −0
  1776. tools/include/uapi/linux/in.h +2 −0
  1777. tools/include/uapi/linux/kvm.h +5 −4
  1778. tools/include/uapi/linux/perf_event.h +2 −0
  1779. tools/include/uapi/linux/stat.h +75 −24
  1780. tools/lib/perf/Makefile +12 −2
  1781. tools/net/ynl/lib/ynl.c +1 −1
  1782. tools/net/ynl/pyynl/ethtool.py +15 −7
  1783. tools/net/ynl/pyynl/ynl_gen_c.py +71 −24
  1784. tools/objtool/arch/x86/decode.c +20 −7
  1785. tools/objtool/arch/x86/special.c +1 −1
  1786. tools/objtool/check.c +53 −8
  1787. tools/objtool/include/objtool/arch.h +2 −1
  1788. tools/perf/Makefile.config +1 −0
  1789. tools/perf/arch/arm/entry/syscalls/syscall.tbl +1 −0
  1790. tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl +1 −0
  1791. tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +1 −0
  1792. tools/perf/arch/s390/entry/syscalls/syscall.tbl +1 −0
  1793. tools/perf/arch/sh/entry/syscalls/syscall.tbl +1 −0
  1794. tools/perf/arch/sparc/entry/syscalls/syscall.tbl +1 −0
  1795. tools/perf/arch/x86/entry/syscalls/syscall_32.tbl +2 −1
  1796. tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +1 −0
  1797. tools/perf/arch/xtensa/entry/syscalls/syscall.tbl +1 −0
  1798. tools/perf/check-headers.sh +1 −0
  1799. tools/perf/trace/beauty/include/linux/socket.h +2 −0
  1800. tools/perf/trace/beauty/include/uapi/linux/fcntl.h +4 −0
  1801. tools/perf/trace/beauty/include/uapi/linux/fs.h +16 −5
  1802. tools/perf/trace/beauty/include/uapi/linux/mount.h +9 −1
  1803. tools/perf/trace/beauty/include/uapi/linux/prctl.h +11 −0
  1804. tools/perf/trace/beauty/include/uapi/linux/stat.h +75 −24
  1805. tools/perf/trace/beauty/include/uapi/sound/asound.h +6 −2
  1806. tools/perf/util/evsel.c +0 −22
  1807. tools/perf/util/unwind-libunwind-local.c +1 −1
  1808. tools/sched_ext/scx_flatcg.bpf.c +1 −1
  1809. tools/scripts/syscall.tbl +1 −0
  1810. tools/testing/cxl/test/mem.c +1 −1
  1811. tools/testing/kunit/configs/all_tests.config +4 −0
  1812. tools/testing/kunit/kunit_parser.py +4 −0
  1813. tools/testing/kunit/kunit_tool_test.py +2 −2
  1814. tools/testing/kunit/qemu_configs/sh.py +3 −1
  1815. tools/testing/memblock/internal.h +6 −0
  1816. tools/testing/memblock/linux/mutex.h +14 −0
  1817. tools/testing/memblock/tests/basic_api.c +102 −0
  1818. tools/testing/selftests/.gitignore +0 −1
  1819. tools/testing/selftests/Makefile +1 −0
  1820. tools/testing/selftests/bpf/config.x86_64 +0 −1
  1821. tools/testing/selftests/bpf/prog_tests/for_each.c +37 −0
  1822. tools/testing/selftests/bpf/prog_tests/res_spin_lock.c +5 −2
  1823. tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c +0 −1
  1824. tools/testing/selftests/bpf/progs/bpf_misc.h +1 −1
  1825. tools/testing/selftests/bpf/progs/for_each_hash_modify.c +30 −0
  1826. tools/testing/selftests/bpf/progs/res_spin_lock.c +7 −3
  1827. tools/testing/selftests/cgroup/test_cpuset_prs.sh +402 −215
  1828. tools/testing/selftests/drivers/net/dsa/tc_taprio.sh +1 −0
  1829. tools/testing/selftests/drivers/net/hds.py +32 −1
  1830. tools/testing/selftests/drivers/net/hw/iou-zcrx.py +4 −0
  1831. tools/testing/selftests/drivers/net/hw/ncdevmem.c +22 −33
  1832. tools/testing/selftests/drivers/net/ocelot/psfp.sh +2 −6
  1833. tools/testing/selftests/drivers/net/ping.py +27 −18
  1834. tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c +46 −11
  1835. tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc +22 −1
  1836. tools/testing/selftests/ftrace/test.d/filter/event-filter-function.tc +20 −0
  1837. tools/testing/selftests/ftrace/test.d/ftrace/fgraph-multi-filter.tc +177 −0
  1838. tools/testing/selftests/futex/functional/futex_wait_wouldblock.c +1 −1
  1839. tools/testing/selftests/hid/config.common +0 −1
  1840. tools/testing/selftests/kvm/Makefile.kvm +15 −30
  1841. tools/testing/selftests/kvm/arm64/page_fault_test.c +1 −1
  1842. tools/testing/selftests/kvm/arm64/set_id_regs.c +4 −4
  1843. tools/testing/selftests/kvm/include/arm64/processor.h +61 −6
  1844. tools/testing/selftests/kvm/lib/arm64/processor.c +34 −26
  1845. tools/testing/selftests/kvm/lib/kvm_util.c +2 −3
  1846. tools/testing/selftests/kvm/rseq_test.c +25 −6
  1847. tools/testing/selftests/kvm/x86/monitor_mwait_test.c +57 −51
  1848. tools/testing/selftests/landlock/audit.h +14 −7
  1849. tools/testing/selftests/landlock/audit_test.c +137 −17
  1850. tools/testing/selftests/landlock/fs_test.c +2 −1
  1851. tools/testing/selftests/lib/config +1 −0
  1852. tools/testing/selftests/mincore/mincore_selftest.c +2 −17
  1853. tools/testing/selftests/mm/charge_reserved_hugetlb.sh +2 −2
  1854. tools/testing/selftests/mm/compaction_test.c +14 −5
  1855. tools/testing/selftests/mm/cow.c +1 −1
  1856. tools/testing/selftests/mm/guard-regions.c +10 −6
  1857. tools/testing/selftests/mm/hugetlb_reparenting_test.sh +1 −1
  1858. tools/testing/selftests/mm/pkey-powerpc.h +13 −1
  1859. tools/testing/selftests/mm/pkey_util.c +1 −0
  1860. tools/testing/selftests/net/.gitignore +1 −0
  1861. tools/testing/selftests/net/Makefile +3 −0
  1862. tools/testing/selftests/net/fib_rule_tests.sh +34 −0
  1863. tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh +95 −1
  1864. tools/testing/selftests/net/forwarding/tc_taprio.sh +421 −0
  1865. tools/testing/selftests/net/forwarding/tsn_lib.sh +26 −0
  1866. tools/testing/selftests/net/gre_ipv6_lladdr.sh +177 −0
  1867. tools/testing/selftests/net/mptcp/diag.sh +2 −3
  1868. tools/testing/selftests/net/mptcp/mptcp_join.sh +18 −0
  1869. tools/testing/selftests/net/netfilter/nft_concat_range.sh +38 −1
  1870. tools/testing/selftests/net/skf_net_off.c +244 −0
  1871. tools/testing/selftests/net/skf_net_off.sh +30 −0
  1872. tools/testing/selftests/net/tls.c +36 −0
  1873. tools/testing/selftests/pcie_bwctrl/Makefile +2 −1
  1874. tools/testing/selftests/tc-testing/tc-tests/infra/actions.json +22 −0
  1875. tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json +442 −0
  1876. tools/testing/selftests/tc-testing/tc-tests/qdiscs/codel.json +24 −0
  1877. tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq.json +22 −0
  1878. tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_codel.json +22 −0
  1879. tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json +22 −0
  1880. tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf.json +22 −0
  1881. tools/testing/selftests/tc-testing/tc-tests/qdiscs/pie.json +24 −0
  1882. tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json +36 −0
  1883. tools/testing/selftests/tpm2/.gitignore +3 −0
  1884. tools/testing/selftests/tpm2/test_smoke.sh +1 −1
  1885. tools/testing/selftests/ublk/Makefile +9 −1
  1886. tools/testing/selftests/ublk/fault_inject.c +98 −0
  1887. tools/testing/selftests/ublk/kublk.c +324 −32
  1888. tools/testing/selftests/ublk/kublk.h +41 −6
  1889. tools/testing/selftests/ublk/stripe.c +27 −1
  1890. tools/testing/selftests/ublk/test_common.sh +121 −25
  1891. tools/testing/selftests/ublk/test_generic_04.sh +40 −0
  1892. tools/testing/selftests/ublk/test_generic_05.sh +44 −0
  1893. tools/testing/selftests/ublk/test_generic_06.sh +41 −0
  1894. tools/testing/selftests/ublk/test_generic_07.sh +28 −0
  1895. tools/testing/selftests/ublk/test_loop_01.sh +3 −5
  1896. tools/testing/selftests/ublk/test_loop_02.sh +3 −5
  1897. tools/testing/selftests/ublk/test_loop_03.sh +3 −5
  1898. tools/testing/selftests/ublk/test_loop_04.sh +4 −5
  1899. tools/testing/selftests/ublk/test_loop_05.sh +3 −5
  1900. tools/testing/selftests/ublk/test_stress_01.sh +16 −29
  1901. tools/testing/selftests/ublk/test_stress_02.sh +16 −29
  1902. tools/testing/selftests/ublk/test_stress_03.sh +38 −0
  1903. tools/testing/selftests/ublk/test_stress_04.sh +37 −0
  1904. tools/testing/selftests/ublk/test_stress_05.sh +64 −0
  1905. tools/testing/selftests/ublk/test_stripe_01.sh +4 −8
  1906. tools/testing/selftests/ublk/test_stripe_02.sh +5 −8
  1907. tools/testing/selftests/ublk/test_stripe_03.sh +4 −8
  1908. tools/testing/selftests/ublk/test_stripe_04.sh +21 −0
  1909. tools/testing/selftests/x86/bugs/Makefile +3 −0
  1910. tools/testing/selftests/x86/bugs/common.py +164 −0
  1911. tools/testing/selftests/x86/bugs/its_indirect_alignment.py +150 −0
  1912. tools/testing/selftests/x86/bugs/its_permutations.py +109 −0
  1913. tools/testing/selftests/x86/bugs/its_ret_alignment.py +139 −0
  1914. tools/testing/selftests/x86/bugs/its_sysfs.py +65 −0
  1915. tools/testing/shared/linux.c +2 −2
  1916. tools/testing/shared/linux/cleanup.h +2 −0
  1917. tools/testing/vsock/vsock_test.c +16 −12
  1918. usr/include/Makefile +4 −0
  1919. virt/kvm/Kconfig +1 −1
  1920. virt/kvm/eventfd.c +5 −5
.clang-format+37−4
@@ -92,6 +92,7 @@ ForEachMacros: · 91 unmodified lines
9292 - '__rq_for_each_bio'
9393 - '__shost_for_each_device'
9494 - '__sym_for_each'
95+ - '_for_each_counter'
9596 - 'apei_estatus_for_each_section'
9697 - 'ata_for_each_dev'
9798 - 'ata_for_each_link'
@@ -141,11 +142,14 @@ ForEachMacros: · 43 unmodified lines
141142 - 'damon_for_each_target_safe'
142143 - 'damos_for_each_filter'
143144 - 'damos_for_each_filter_safe'
145+ - 'damos_for_each_ops_filter'
146+ - 'damos_for_each_ops_filter_safe'
144147 - 'damos_for_each_quota_goal'
145148 - 'damos_for_each_quota_goal_safe'
146149 - 'data__for_each_file'
147150 - 'data__for_each_file_new'
148151 - 'data__for_each_file_start'
152+ - 'def_for_each_cpu'
149153 - 'device_for_each_child_node'
150154 - 'device_for_each_child_node_scoped'
151155 - 'dma_fence_array_for_each'
@@ -176,6 +180,7 @@ ForEachMacros: · 24 unmodified lines
176180 - 'drm_for_each_privobj'
177181 - 'drm_gem_for_each_gpuvm_bo'
178182 - 'drm_gem_for_each_gpuvm_bo_safe'
183+ - 'drm_gpusvm_for_each_range'
179184 - 'drm_gpuva_for_each_op'
180185 - 'drm_gpuva_for_each_op_from_reverse'
181186 - 'drm_gpuva_for_each_op_reverse'
@@ -216,8 +221,10 @@ ForEachMacros: · 34 unmodified lines
216221 - 'for_each_active_dev_scope'
217222 - 'for_each_active_drhd_unit'
218223 - 'for_each_active_iommu'
224+ - 'for_each_active_irq'
219225 - 'for_each_active_route'
220226 - 'for_each_aggr_pgid'
227+ - 'for_each_alloc_capable_rdt_resource'
221228 - 'for_each_and_bit'
222229 - 'for_each_andnot_bit'
223230 - 'for_each_available_child_of_node'
@@ -228,6 +235,7 @@ ForEachMacros: · 4 unmodified lines
228235 - 'for_each_btf_ext_rec'
229236 - 'for_each_btf_ext_sec'
230237 - 'for_each_bvec'
238+ - 'for_each_capable_rdt_resource'
231239 - 'for_each_card_auxs'
232240 - 'for_each_card_auxs_safe'
233241 - 'for_each_card_components'
@@ -241,6 +249,7 @@ ForEachMacros: · 7 unmodified lines
241249 - 'for_each_cgroup_storage_type'
242250 - 'for_each_child_of_node'
243251 - 'for_each_child_of_node_scoped'
252+ - 'for_each_child_of_node_with_prefix'
244253 - 'for_each_clear_bit'
245254 - 'for_each_clear_bit_from'
246255 - 'for_each_clear_bitrange'
@@ -296,6 +305,7 @@ ForEachMacros: · 49 unmodified lines
296305 - 'for_each_group_member_head'
297306 - 'for_each_hstate'
298307 - 'for_each_hwgpio'
308+ - 'for_each_hwgpio_in_range'
299309 - 'for_each_if'
300310 - 'for_each_inject_fn'
301311 - 'for_each_insn'
@@ -304,6 +314,7 @@ ForEachMacros: · 2 unmodified lines
304314 - 'for_each_intid'
305315 - 'for_each_iommu'
306316 - 'for_each_ip_tunnel_rcu'
317+ - 'for_each_irq_desc'
307318 - 'for_each_irq_nr'
308319 - 'for_each_lang'
309320 - 'for_each_link_ch_maps'
@@ -324,6 +335,8 @@ ForEachMacros: · 14 unmodified lines
324335 - 'for_each_missing_reg'
325336 - 'for_each_mle_subelement'
326337 - 'for_each_mod_mem_type'
338+ - 'for_each_mon_capable_rdt_resource'
339+ - 'for_each_mp_bvec'
327340 - 'for_each_net'
328341 - 'for_each_net_continue_reverse'
329342 - 'for_each_net_rcu'
@@ -351,6 +364,7 @@ ForEachMacros: · 21 unmodified lines
351364 - 'for_each_node_by_name'
352365 - 'for_each_node_by_type'
353366 - 'for_each_node_mask'
367+ - 'for_each_node_numadist'
354368 - 'for_each_node_state'
355369 - 'for_each_node_with_cpus'
356370 - 'for_each_node_with_property'
@@ -359,6 +373,8 @@ ForEachMacros: · 2 unmodified lines
359373 - 'for_each_of_allnodes'
360374 - 'for_each_of_allnodes_from'
361375 - 'for_each_of_cpu_node'
376+ - 'for_each_of_graph_port'
377+ - 'for_each_of_graph_port_endpoint'
362378 - 'for_each_of_pci_range'
363379 - 'for_each_old_connector_in_state'
364380 - 'for_each_old_crtc_in_state'
@@ -372,9 +388,11 @@ ForEachMacros: · 7 unmodified lines
372388 - 'for_each_oldnew_plane_in_state_reverse'
373389 - 'for_each_oldnew_private_obj_in_state'
374390 - 'for_each_online_cpu'
391+ - 'for_each_online_cpu_wrap'
375392 - 'for_each_online_node'
376393 - 'for_each_online_pgdat'
377394 - 'for_each_or_bit'
395+ - 'for_each_page_ext'
378396 - 'for_each_path'
379397 - 'for_each_pci_bridge'
380398 - 'for_each_pci_dev'
@@ -382,8 +400,10 @@ ForEachMacros: · 1 unmodified line
382400 - 'for_each_physmem_range'
383401 - 'for_each_populated_zone'
384402 - 'for_each_possible_cpu'
403+ - 'for_each_possible_cpu_wrap'
385404 - 'for_each_present_blessed_reg'
386405 - 'for_each_present_cpu'
406+ - 'for_each_present_section_nr'
387407 - 'for_each_prime_number'
388408 - 'for_each_prime_number_from'
389409 - 'for_each_probe_cache_entry'
@@ -396,6 +416,7 @@ ForEachMacros: · 6 unmodified lines
396416 - 'for_each_prop_dlc_cpus'
397417 - 'for_each_prop_dlc_platforms'
398418 - 'for_each_property_of_node'
419+ - 'for_each_rdt_resource'
399420 - 'for_each_reg'
400421 - 'for_each_reg_filtered'
401422 - 'for_each_reloc'
@@ -434,10 +455,10 @@ ForEachMacros: · 32 unmodified lines
434455 - 'for_each_subelement_id'
435456 - 'for_each_sublist'
436457 - 'for_each_subsystem'
458+ - 'for_each_suite'
437459 - 'for_each_supported_activate_fn'
438460 - 'for_each_supported_inject_fn'
439461 - 'for_each_sym'
440− - 'for_each_test'
441462 - 'for_each_thread'
442463 - 'for_each_token'
443464 - 'for_each_unicast_dest_pgid'
@@ -499,8 +520,10 @@ ForEachMacros: · 55 unmodified lines
499520 - 'idr_for_each_entry_continue'
500521 - 'idr_for_each_entry_continue_ul'
501522 - 'idr_for_each_entry_ul'
523+ - 'iio_for_each_active_channel'
502524 - 'in_dev_for_each_ifa_rcu'
503525 - 'in_dev_for_each_ifa_rtnl'
526+ - 'in_dev_for_each_ifa_rtnl_net'
504527 - 'inet_bind_bucket_for_each'
505528 - 'interval_tree_for_each_span'
506529 - 'intlist__for_each_entry'
@@ -542,7 +565,6 @@ ForEachMacros: · 35 unmodified lines
542565 - 'list_for_each_prev'
543566 - 'list_for_each_prev_safe'
544567 - 'list_for_each_rcu'
545− - 'list_for_each_reverse'
546568 - 'list_for_each_safe'
547569 - 'llist_for_each'
548570 - 'llist_for_each_entry'
@@ -552,6 +574,7 @@ ForEachMacros: · 3 unmodified lines
552574 - 'map__for_each_symbol'
553575 - 'map__for_each_symbol_by_name'
554576 - 'mas_for_each'
577+ - 'mas_for_each_rev'
555578 - 'mci_for_each_dimm'
556579 - 'media_device_for_each_entity'
557580 - 'media_device_for_each_intf'
@@ -561,10 +584,15 @@ ForEachMacros: · 3 unmodified lines
561584 - 'media_pipeline_for_each_entity'
562585 - 'media_pipeline_for_each_pad'
563586 - 'mlx5_lag_for_each_peer_mdev'
587+ - 'mptcp_for_each_subflow'
564588 - 'msi_domain_for_each_desc'
565589 - 'msi_for_each_desc'
566590 - 'mt_for_each'
591+ - 'nanddev_io_for_each_block'
567592 - 'nanddev_io_for_each_page'
593+ - 'neigh_for_each_in_bucket'
594+ - 'neigh_for_each_in_bucket_rcu'
595+ - 'neigh_for_each_in_bucket_safe'
568596 - 'netdev_for_each_lower_dev'
569597 - 'netdev_for_each_lower_private'
570598 - 'netdev_for_each_lower_private_rcu'
@@ -604,11 +632,11 @@ ForEachMacros: · 33 unmodified lines
604632 - 'perf_evlist__for_each_entry_safe'
605633 - 'perf_evlist__for_each_evsel'
606634 - 'perf_evlist__for_each_mmap'
635+ - 'perf_evsel_for_each_per_thread_period_safe'
607636 - 'perf_hpp_list__for_each_format'
608637 - 'perf_hpp_list__for_each_format_safe'
609638 - 'perf_hpp_list__for_each_sort_list'
610639 - 'perf_hpp_list__for_each_sort_list_safe'
611− - 'perf_tool_event__for_each_event'
612640 - 'plist_for_each'
613641 - 'plist_for_each_continue'
614642 - 'plist_for_each_entry'
@@ -627,7 +655,6 @@ ForEachMacros: · 12 unmodified lines
627655 - 'rdma_for_each_block'
628656 - 'rdma_for_each_port'
629657 - 'rdma_umem_for_each_dma_block'
630− - 'resort_rb__for_each_entry'
631658 - 'resource_list_for_each_entry'
632659 - 'resource_list_for_each_entry_safe'
633660 - 'rhl_for_each_entry_rcu'
@@ -658,6 +685,7 @@ ForEachMacros: · 24 unmodified lines
658685 - 'shost_for_each_device'
659686 - 'sk_for_each'
660687 - 'sk_for_each_bound'
688+ - 'sk_for_each_bound_safe'
661689 - 'sk_for_each_entry_offset_rcu'
662690 - 'sk_for_each_from'
663691 - 'sk_for_each_rcu'
@@ -680,7 +708,11 @@ ForEachMacros: · 16 unmodified lines
680708 - 'tb_property_for_each'
681709 - 'tcf_act_for_each_action'
682710 - 'tcf_exts_for_each_action'
711+ - 'test_suite__for_each_test_case'
712+ - 'tool_pmu__for_each_event'
713+ - 'ttm_bo_lru_for_each_reserved_guarded'
683714 - 'ttm_resource_manager_for_each_res'
715+ - 'udp_lrpa_for_each_entry_rcu'
684716 - 'udp_portaddr_for_each_entry'
685717 - 'udp_portaddr_for_each_entry_rcu'
686718 - 'usb_hub_for_each_child'
@@ -691,6 +723,7 @@ ForEachMacros: · 4 unmodified lines
691723 - 'v4l2_m2m_for_each_src_buf_safe'
692724 - 'virtio_device_for_each_vq'
693725 - 'while_for_each_ftrace_op'
726+ - 'workloads__for_each'
694727 - 'xa_for_each'
695728 - 'xa_for_each_marked'
696729 - 'xa_for_each_range'
.clippy.toml+1−1
@@ -7,5 +7,5 @@ check-private-items = true · 6 unmodified lines
77 disallowed-macros = [
88 # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate
99 # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303.
10− { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool" },
10+ { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true },
1111 ]
.mailmap+11−0
@@ -102,6 +102,7 @@ Ard Biesheuvel <ardb@kernel.org> <ard.biesheuvel@linaro.org> · 101 unmodified lines
102102 Arnaud Patard <arnaud.patard@rtp-net.org>
103103 Arnd Bergmann <arnd@arndb.de>
104104 Arun Kumar Neelakantam <quic_aneela@quicinc.com> <aneela@codeaurora.org>
105+Asahi Lina <lina+kernel@asahilina.net> <lina@asahilina.net>
105106 Ashok Raj Nagarajan <quic_arnagara@quicinc.com> <arnagara@codeaurora.org>
106107 Ashwin Chaugule <quic_ashwinc@quicinc.com> <ashwinc@codeaurora.org>
107108 Asutosh Das <quic_asutoshd@quicinc.com> <asutoshd@codeaurora.org>
@@ -312,6 +313,7 @@ Jan Glauber <jan.glauber@gmail.com> <jglauber@cavium.com> · 204 unmodified lines
312313 Jan Kuliga <jtkuliga.kdev@gmail.com> <jankul@alatek.krakow.pl>
313314 Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@linux.intel.com>
314315 Jarkko Sakkinen <jarkko@kernel.org> <jarkko@profian.com>
316+Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@opinsys.com>
315317 Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
316318 Jason Gunthorpe <jgg@ziepe.ca> <jgg@nvidia.com>
317319 Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
@@ -322,6 +324,7 @@ Jayachandran C <c.jayachandran@gmail.com> <jchandra@broadcom.com> · 4 unmodified lines
322324 Jayachandran C <c.jayachandran@gmail.com> <jchandra@digeo.com>
323325 Jayachandran C <c.jayachandran@gmail.com> <jnair@caviumnetworks.com>
324326 <jean-philippe@linaro.org> <jean-philippe.brucker@arm.com>
327+Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> <jeanmichel.hautbois@ideasonboard.com>
325328 Jean Tourrilhes <jt@hpl.hp.com>
326329 Jeevan Shriram <quic_jshriram@quicinc.com> <jshriram@codeaurora.org>
327330 Jeff Garzik <jgarzik@pretzel.yyz.us>
@@ -438,12 +441,16 @@ Linus Lüssing <linus.luessing@c0d3.blue> <ll@simonwunderlich.de> · 110 unmodified lines
438441 Li Yang <leoyang.li@nxp.com> <leoli@freescale.com>
439442 Li Yang <leoyang.li@nxp.com> <leo@zh-kernel.org>
440443 Lior David <quic_liord@quicinc.com> <liord@codeaurora.org>
444+Loic Poulain <loic.poulain@oss.qualcomm.com> <loic.poulain@linaro.org>
445+Loic Poulain <loic.poulain@oss.qualcomm.com> <loic.poulain@intel.com>
441446 Lorenzo Pieralisi <lpieralisi@kernel.org> <lorenzo.pieralisi@arm.com>
442447 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> <lstoakes@gmail.com>
443448 Luca Ceresoli <luca.ceresoli@bootlin.com> <luca@lucaceresoli.net>
444449 Luca Weiss <luca@lucaweiss.eu> <luca@z3ntu.xyz>
445450 Lukasz Luba <lukasz.luba@arm.com> <l.luba@partner.samsung.com>
446451 Luo Jie <quic_luoj@quicinc.com> <luoj@codeaurora.org>
452+Lance Yang <lance.yang@linux.dev> <ioworker0@gmail.com>
453+Lance Yang <lance.yang@linux.dev> <mingzhe.yang@ly.com>
447454 Maciej W. Rozycki <macro@mips.com> <macro@imgtec.com>
448455 Maciej W. Rozycki <macro@orcam.me.uk> <macro@linux-mips.org>
449456 Maharaja Kennadyrajan <quic_mkenna@quicinc.com> <mkenna@codeaurora.org>
@@ -480,6 +487,7 @@ Matthias Fuchs <socketcan@esd.eu> <matthias.fuchs@esd.eu> · 30 unmodified lines
480487 Matthieu Baerts <matttbe@kernel.org> <matthieu.baerts@tessares.net>
481488 Matthieu CASTET <castet.matthieu@free.fr>
482489 Matti Vaittinen <mazziesaccount@gmail.com> <matti.vaittinen@fi.rohmeurope.com>
490+Mattijs Korpershoek <mkorpershoek@kernel.org> <mkorpershoek@baylibre.com>
483491 Matt Ranostay <matt@ranostay.sg> <matt.ranostay@konsulko.com>
484492 Matt Ranostay <matt@ranostay.sg> <matt@ranostay.consulting>
485493 Matt Ranostay <matt@ranostay.sg> Matthew Ranostay <mranostay@embeddedalley.com>
@@ -685,6 +693,8 @@ Simon Wunderlich <sw@simonwunderlich.de> <simon.wunderlich@saxnet.de> · 199 unmodified lines
685693 Simon Wunderlich <sw@simonwunderlich.de> <simon@open-mesh.com>
686694 Simon Wunderlich <sw@simonwunderlich.de> <siwu@hrz.tu-chemnitz.de>
687695 Sricharan Ramabadhran <quic_srichara@quicinc.com> <sricharan@codeaurora.org>
696+Srinivas Kandagatla <srini@kernel.org> <srinivas.kandagatla@st.com>
697+Srinivas Kandagatla <srini@kernel.org> <srinivas.kandagatla@linaro.org>
688698 Srinivas Ramana <quic_sramana@quicinc.com> <sramana@codeaurora.org>
689699 Sriram R <quic_srirrama@quicinc.com> <srirrama@codeaurora.org>
690700 Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> <sriram.yagnaraman@est.tech>
@@ -744,6 +754,7 @@ Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko@ursulin.net> · 53 unmodified lines
744754 Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
745755 Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
746756 Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
757+Uwe Kleine-König <u.kleine-koenig@baylibre.com> <ukleinek@baylibre.com>
747758 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
748759 Uwe Kleine-König <ukleinek@strlen.de>
749760 Uwe Kleine-König <ukl@pengutronix.de>
CREDITS+4−0
@@ -2071,6 +2071,10 @@ S: 660 Harvard Ave. #7 · 2070 unmodified lines
20712071 S: Santa Clara, CA 95051
20722072 S: USA
20732073
2074+N: Joonsoo Kim
2075+E: iamjoonsoo.kim@lge.com
2076+D: Slab allocators
2077+
20742078 N: Kukjin Kim
20752079 E: kgene@kernel.org
20762080 D: Samsung S3C, S5P and Exynos ARM architectures
Documentation/ABI/stable/sysfs-block+1−1
@@ -77,7 +77,7 @@ Description: · 76 unmodified lines
7777
7878 What: /sys/block/<disk>/diskseq
7979 Date: February 2021
80−Contact: Matteo Croce <mcroce@microsoft.com>
80+Contact: Matteo Croce <teknoraver@meta.com>
8181 Description:
8282 The /sys/block/<disk>/diskseq files reports the disk
8383 sequence number, which is a monotonically increasing
Documentation/ABI/testing/sysfs-devices-system-cpu+1−0
@@ -511,6 +511,7 @@ Description: information about CPUs heterogeneity. · 510 unmodified lines
511511
512512 What: /sys/devices/system/cpu/vulnerabilities
513513 /sys/devices/system/cpu/vulnerabilities/gather_data_sampling
514+ /sys/devices/system/cpu/vulnerabilities/indirect_target_selection
514515 /sys/devices/system/cpu/vulnerabilities/itlb_multihit
515516 /sys/devices/system/cpu/vulnerabilities/l1tf
516517 /sys/devices/system/cpu/vulnerabilities/mds
Documentation/ABI/testing/sysfs-driver-hid-appletb-kbd+2−2
@@ -1,6 +1,6 @@
11 What: /sys/bus/hid/drivers/hid-appletb-kbd/<dev>/mode
2−Date: September, 2023
3−KernelVersion: 6.5
2+Date: March, 2025
3+KernelVersion: 6.15
44 Contact: linux-input@vger.kernel.org
55 Description:
66 The set of keys displayed on the Touch Bar.
Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon+2−2
@@ -111,7 +111,7 @@ Description: RO. Package current voltage in millivolt. · 110 unmodified lines
111111
112112 What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp2_input
113113 Date: March 2025
114−KernelVersion: 6.14
114+KernelVersion: 6.15
115115 Contact: intel-xe@lists.freedesktop.org
116116 Description: RO. Package temperature in millidegree Celsius.
117117
@@ -119,7 +119,7 @@ Description: RO. Package temperature in millidegree Celsius. · 1 unmodified line
119119
120120 What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp3_input
121121 Date: March 2025
122−KernelVersion: 6.14
122+KernelVersion: 6.15
123123 Contact: intel-xe@lists.freedesktop.org
124124 Description: RO. VRAM temperature in millidegree Celsius.
125125
Documentation/ABI/testing/sysfs-driver-ufs+32−0
@@ -1604,3 +1604,35 @@ Description: · 1603 unmodified lines
16041604 prevent the UFS from frequently performing clock gating/ungating.
16051605
16061606 The attribute is read/write.
1607+
1608+What: /sys/bus/platform/drivers/ufshcd/*/device_lvl_exception_count
1609+What: /sys/bus/platform/devices/*.ufs/device_lvl_exception_count
1610+Date: March 2025
1611+Contact: Bao D. Nguyen <quic_nguyenb@quicinc.com>
1612+Description:
1613+ This attribute is applicable to ufs devices compliant to the
1614+ JEDEC specifications version 4.1 or later. The
1615+ device_lvl_exception_count is a counter indicating the number of
1616+ times the device level exceptions have occurred since the last
1617+ time this variable is reset. Writing a 0 value to this
1618+ attribute will reset the device_lvl_exception_count. If the
1619+ device_lvl_exception_count reads a positive value, the user
1620+ application should read the device_lvl_exception_id attribute to
1621+ know more information about the exception.
1622+
1623+ The attribute is read/write.
1624+
1625+What: /sys/bus/platform/drivers/ufshcd/*/device_lvl_exception_id
1626+What: /sys/bus/platform/devices/*.ufs/device_lvl_exception_id
1627+Date: March 2025
1628+Contact: Bao D. Nguyen <quic_nguyenb@quicinc.com>
1629+Description:
1630+ Reading the device_lvl_exception_id returns the
1631+ qDeviceLevelExceptionID attribute of the ufs device JEDEC
1632+ specification version 4.1. The definition of the
1633+ qDeviceLevelExceptionID is the ufs device vendor specific
1634+ implementation. Refer to the device manufacturer datasheet for
1635+ more information on the meaning of the qDeviceLevelExceptionID
1636+ attribute value.
1637+
1638+ The attribute is read only.
Documentation/ABI/testing/sysfs-kernel-reboot+5−5
@@ -1,7 +1,7 @@
11 What: /sys/kernel/reboot
22 Date: November 2020
33 KernelVersion: 5.11
4−Contact: Matteo Croce <mcroce@microsoft.com>
4+Contact: Matteo Croce <teknoraver@meta.com>
55 Description: Interface to set the kernel reboot behavior, similarly to
66 what can be done via the reboot= cmdline option.
77 (see Documentation/admin-guide/kernel-parameters.txt)
@@ -9,25 +9,25 @@ Description: Interface to set the kernel reboot behavior, similarly to · 1 unmodified line
99 What: /sys/kernel/reboot/mode
1010 Date: November 2020
1111 KernelVersion: 5.11
12−Contact: Matteo Croce <mcroce@microsoft.com>
12+Contact: Matteo Croce <teknoraver@meta.com>
1313 Description: Reboot mode. Valid values are: cold warm hard soft gpio
1414
1515 What: /sys/kernel/reboot/type
1616 Date: November 2020
1717 KernelVersion: 5.11
18−Contact: Matteo Croce <mcroce@microsoft.com>
18+Contact: Matteo Croce <teknoraver@meta.com>
1919 Description: Reboot type. Valid values are: bios acpi kbd triple efi pci
2020
2121 What: /sys/kernel/reboot/cpu
2222 Date: November 2020
2323 KernelVersion: 5.11
24−Contact: Matteo Croce <mcroce@microsoft.com>
24+Contact: Matteo Croce <teknoraver@meta.com>
2525 Description: CPU number to use to reboot.
2626
2727 What: /sys/kernel/reboot/force
2828 Date: November 2020
2929 KernelVersion: 5.11
30−Contact: Matteo Croce <mcroce@microsoft.com>
30+Contact: Matteo Croce <teknoraver@meta.com>
3131 Description: Don't wait for any other CPUs on reboot and
3232 avoid anything that could hang.
3333
Documentation/admin-guide/hw-vuln/index.rst+2−0
@@ -22,3 +22,5 @@ are configurable at compile, boot or run time. · 21 unmodified lines
2222 srso
2323 gather_data_sampling
2424 reg-file-data-sampling
25+ rsb
26+ indirect-target-selection
Documentation/admin-guide/hw-vuln/indirect-target-selection.rst+168−0
@@ -0,0 +1,168 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
3+Indirect Target Selection (ITS)
4+===============================
5+
6+ITS is a vulnerability in some Intel CPUs that support Enhanced IBRS and were
7+released before Alder Lake. ITS may allow an attacker to control the prediction
8+of indirect branches and RETs located in the lower half of a cacheline.
9+
10+ITS is assigned CVE-2024-28956 with a CVSS score of 4.7 (Medium).
11+
12+Scope of Impact
13+---------------
14+- **eIBRS Guest/Host Isolation**: Indirect branches in KVM/kernel may still be
15+ predicted with unintended target corresponding to a branch in the guest.
16+
17+- **Intra-Mode BTI**: In-kernel training such as through cBPF or other native
18+ gadgets.
19+
20+- **Indirect Branch Prediction Barrier (IBPB)**: After an IBPB, indirect
21+ branches may still be predicted with targets corresponding to direct branches
22+ executed prior to the IBPB. This is fixed by the IPU 2025.1 microcode, which
23+ should be available via distro updates. Alternatively microcode can be
24+ obtained from Intel's github repository [#f1]_.
25+
26+Affected CPUs
27+-------------
28+Below is the list of ITS affected CPUs [#f2]_ [#f3]_:
29+
30+ ======================== ============ ==================== ===============
31+ Common name Family_Model eIBRS Intra-mode BTI
32+ Guest/Host Isolation
33+ ======================== ============ ==================== ===============
34+ SKYLAKE_X (step >= 6) 06_55H Affected Affected
35+ ICELAKE_X 06_6AH Not affected Affected
36+ ICELAKE_D 06_6CH Not affected Affected
37+ ICELAKE_L 06_7EH Not affected Affected
38+ TIGERLAKE_L 06_8CH Not affected Affected
39+ TIGERLAKE 06_8DH Not affected Affected
40+ KABYLAKE_L (step >= 12) 06_8EH Affected Affected
41+ KABYLAKE (step >= 13) 06_9EH Affected Affected
42+ COMETLAKE 06_A5H Affected Affected
43+ COMETLAKE_L 06_A6H Affected Affected
44+ ROCKETLAKE 06_A7H Not affected Affected
45+ ======================== ============ ==================== ===============
46+
47+- All affected CPUs enumerate Enhanced IBRS feature.
48+- IBPB isolation is affected on all ITS affected CPUs, and need a microcode
49+ update for mitigation.
50+- None of the affected CPUs enumerate BHI_CTRL which was introduced in Golden
51+ Cove (Alder Lake and Sapphire Rapids). This can help guests to determine the
52+ host's affected status.
53+- Intel Atom CPUs are not affected by ITS.
54+
55+Mitigation
56+----------
57+As only the indirect branches and RETs that have their last byte of instruction
58+in the lower half of the cacheline are vulnerable to ITS, the basic idea behind
59+the mitigation is to not allow indirect branches in the lower half.
60+
61+This is achieved by relying on existing retpoline support in the kernel, and in
62+compilers. ITS-vulnerable retpoline sites are runtime patched to point to newly
63+added ITS-safe thunks. These safe thunks consists of indirect branch in the
64+second half of the cacheline. Not all retpoline sites are patched to thunks, if
65+a retpoline site is evaluated to be ITS-safe, it is replaced with an inline
66+indirect branch.
67+
68+Dynamic thunks
69+~~~~~~~~~~~~~~
70+From a dynamically allocated pool of safe-thunks, each vulnerable site is
71+replaced with a new thunk, such that they get a unique address. This could
72+improve the branch prediction accuracy. Also, it is a defense-in-depth measure
73+against aliasing.
74+
75+Note, for simplicity, indirect branches in eBPF programs are always replaced
76+with a jump to a static thunk in __x86_indirect_its_thunk_array. If required,
77+in future this can be changed to use dynamic thunks.
78+
79+All vulnerable RETs are replaced with a static thunk, they do not use dynamic
80+thunks. This is because RETs get their prediction from RSB mostly that does not
81+depend on source address. RETs that underflow RSB may benefit from dynamic
82+thunks. But, RETs significantly outnumber indirect branches, and any benefit
83+from a unique source address could be outweighed by the increased icache
84+footprint and iTLB pressure.
85+
86+Retpoline
87+~~~~~~~~~
88+Retpoline sequence also mitigates ITS-unsafe indirect branches. For this
89+reason, when retpoline is enabled, ITS mitigation only relocates the RETs to
90+safe thunks. Unless user requested the RSB-stuffing mitigation.
91+
92+RSB Stuffing
93+~~~~~~~~~~~~
94+RSB-stuffing via Call Depth Tracking is a mitigation for Retbleed RSB-underflow
95+attacks. And it also mitigates RETs that are vulnerable to ITS.
96+
97+Mitigation in guests
98+^^^^^^^^^^^^^^^^^^^^
99+All guests deploy ITS mitigation by default, irrespective of eIBRS enumeration
100+and Family/Model of the guest. This is because eIBRS feature could be hidden
101+from a guest. One exception to this is when a guest enumerates BHI_DIS_S, which
102+indicates that the guest is running on an unaffected host.
103+
104+To prevent guests from unnecessarily deploying the mitigation on unaffected
105+platforms, Intel has defined ITS_NO bit(62) in MSR IA32_ARCH_CAPABILITIES. When
106+a guest sees this bit set, it should not enumerate the ITS bug. Note, this bit
107+is not set by any hardware, but is **intended for VMMs to synthesize** it for
108+guests as per the host's affected status.
109+
110+Mitigation options
111+^^^^^^^^^^^^^^^^^^
112+The ITS mitigation can be controlled using the "indirect_target_selection"
113+kernel parameter. The available options are:
114+
115+ ======== ===================================================================
116+ on (default) Deploy the "Aligned branch/return thunks" mitigation.
117+ If spectre_v2 mitigation enables retpoline, aligned-thunks are only
118+ deployed for the affected RET instructions. Retpoline mitigates
119+ indirect branches.
120+
121+ off Disable ITS mitigation.
122+
123+ vmexit Equivalent to "=on" if the CPU is affected by guest/host isolation
124+ part of ITS. Otherwise, mitigation is not deployed. This option is
125+ useful when host userspace is not in the threat model, and only
126+ attacks from guest to host are considered.
127+
128+ stuff Deploy RSB-fill mitigation when retpoline is also deployed.
129+ Otherwise, deploy the default mitigation. When retpoline mitigation
130+ is enabled, RSB-stuffing via Call-Depth-Tracking also mitigates
131+ ITS.
132+
133+ force Force the ITS bug and deploy the default mitigation.
134+ ======== ===================================================================
135+
136+Sysfs reporting
137+---------------
138+
139+The sysfs file showing ITS mitigation status is:
140+
141+ /sys/devices/system/cpu/vulnerabilities/indirect_target_selection
142+
143+Note, microcode mitigation status is not reported in this file.
144+
145+The possible values in this file are:
146+
147+.. list-table::
148+
149+ * - Not affected
150+ - The processor is not vulnerable.
151+ * - Vulnerable
152+ - System is vulnerable and no mitigation has been applied.
153+ * - Vulnerable, KVM: Not affected
154+ - System is vulnerable to intra-mode BTI, but not affected by eIBRS
155+ guest/host isolation.
156+ * - Mitigation: Aligned branch/return thunks
157+ - The mitigation is enabled, affected indirect branches and RETs are
158+ relocated to safe thunks.
159+ * - Mitigation: Retpolines, Stuffing RSB
160+ - The mitigation is enabled using retpoline and RSB stuffing.
161+
162+References
163+----------
164+.. [#f1] Microcode repository - https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
165+
166+.. [#f2] Affected Processors list - https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
167+
168+.. [#f3] Affected Processors list (machine readable) - https://github.com/intel/Intel-affected-processor-list
Documentation/admin-guide/hw-vuln/rsb.rst+268−0
@@ -0,0 +1,268 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
3+=======================
4+RSB-related mitigations
5+=======================
6+
7+.. warning::
8+ Please keep this document up-to-date, otherwise you will be
9+ volunteered to update it and convert it to a very long comment in
10+ bugs.c!
11+
12+Since 2018 there have been many Spectre CVEs related to the Return Stack
13+Buffer (RSB) (sometimes referred to as the Return Address Stack (RAS) or
14+Return Address Predictor (RAP) on AMD).
15+
16+Information about these CVEs and how to mitigate them is scattered
17+amongst a myriad of microarchitecture-specific documents.
18+
19+This document attempts to consolidate all the relevant information in
20+once place and clarify the reasoning behind the current RSB-related
21+mitigations. It's meant to be as concise as possible, focused only on
22+the current kernel mitigations: what are the RSB-related attack vectors
23+and how are they currently being mitigated?
24+
25+It's *not* meant to describe how the RSB mechanism operates or how the
26+exploits work. More details about those can be found in the references
27+below.
28+
29+Rather, this is basically a glorified comment, but too long to actually
30+be one. So when the next CVE comes along, a kernel developer can
31+quickly refer to this as a refresher to see what we're actually doing
32+and why.
33+
34+At a high level, there are two classes of RSB attacks: RSB poisoning
35+(Intel and AMD) and RSB underflow (Intel only). They must each be
36+considered individually for each attack vector (and microarchitecture
37+where applicable).
38+
39+----
40+
41+RSB poisoning (Intel and AMD)
42+=============================
43+
44+SpectreRSB
45+~~~~~~~~~~
46+
47+RSB poisoning is a technique used by SpectreRSB [#spectre-rsb]_ where
48+an attacker poisons an RSB entry to cause a victim's return instruction
49+to speculate to an attacker-controlled address. This can happen when
50+there are unbalanced CALLs/RETs after a context switch or VMEXIT.
51+
52+* All attack vectors can potentially be mitigated by flushing out any
53+ poisoned RSB entries using an RSB filling sequence
54+ [#intel-rsb-filling]_ [#amd-rsb-filling]_ when transitioning between
55+ untrusted and trusted domains. But this has a performance impact and
56+ should be avoided whenever possible.
57+
58+ .. DANGER::
59+ **FIXME**: Currently we're flushing 32 entries. However, some CPU
60+ models have more than 32 entries. The loop count needs to be
61+ increased for those. More detailed information is needed about RSB
62+ sizes.
63+
64+* On context switch, the user->user mitigation requires ensuring the
65+ RSB gets filled or cleared whenever IBPB gets written [#cond-ibpb]_
66+ during a context switch:
67+
68+ * AMD:
69+ On Zen 4+, IBPB (or SBPB [#amd-sbpb]_ if used) clears the RSB.
70+ This is indicated by IBPB_RET in CPUID [#amd-ibpb-rsb]_.
71+
72+ On Zen < 4, the RSB filling sequence [#amd-rsb-filling]_ must be
73+ always be done in addition to IBPB [#amd-ibpb-no-rsb]_. This is
74+ indicated by X86_BUG_IBPB_NO_RET.
75+
76+ * Intel:
77+ IBPB always clears the RSB:
78+
79+ "Software that executed before the IBPB command cannot control
80+ the predicted targets of indirect branches executed after the
81+ command on the same logical processor. The term indirect branch
82+ in this context includes near return instructions, so these
83+ predicted targets may come from the RSB." [#intel-ibpb-rsb]_
84+
85+* On context switch, user->kernel attacks are prevented by SMEP. User
86+ space can only insert user space addresses into the RSB. Even
87+ non-canonical addresses can't be inserted due to the page gap at the
88+ end of the user canonical address space reserved by TASK_SIZE_MAX.
89+ A SMEP #PF at instruction fetch prevents the kernel from speculatively
90+ executing user space.
91+
92+ * AMD:
93+ "Finally, branches that are predicted as 'ret' instructions get
94+ their predicted targets from the Return Address Predictor (RAP).
95+ AMD recommends software use a RAP stuffing sequence (mitigation
96+ V2-3 in [2]) and/or Supervisor Mode Execution Protection (SMEP)
97+ to ensure that the addresses in the RAP are safe for
98+ speculation. Collectively, we refer to these mitigations as "RAP
99+ Protection"." [#amd-smep-rsb]_
100+
101+ * Intel:
102+ "On processors with enhanced IBRS, an RSB overwrite sequence may
103+ not suffice to prevent the predicted target of a near return
104+ from using an RSB entry created in a less privileged predictor
105+ mode. Software can prevent this by enabling SMEP (for
106+ transitions from user mode to supervisor mode) and by having
107+ IA32_SPEC_CTRL.IBRS set during VM exits." [#intel-smep-rsb]_
108+
109+* On VMEXIT, guest->host attacks are mitigated by eIBRS (and PBRSB
110+ mitigation if needed):
111+
112+ * AMD:
113+ "When Automatic IBRS is enabled, the internal return address
114+ stack used for return address predictions is cleared on VMEXIT."
115+ [#amd-eibrs-vmexit]_
116+
117+ * Intel:
118+ "On processors with enhanced IBRS, an RSB overwrite sequence may
119+ not suffice to prevent the predicted target of a near return
120+ from using an RSB entry created in a less privileged predictor
121+ mode. Software can prevent this by enabling SMEP (for
122+ transitions from user mode to supervisor mode) and by having
123+ IA32_SPEC_CTRL.IBRS set during VM exits. Processors with
124+ enhanced IBRS still support the usage model where IBRS is set
125+ only in the OS/VMM for OSes that enable SMEP. To do this, such
126+ processors will ensure that guest behavior cannot control the
127+ RSB after a VM exit once IBRS is set, even if IBRS was not set
128+ at the time of the VM exit." [#intel-eibrs-vmexit]_
129+
130+ Note that some Intel CPUs are susceptible to Post-barrier Return
131+ Stack Buffer Predictions (PBRSB) [#intel-pbrsb]_, where the last
132+ CALL from the guest can be used to predict the first unbalanced RET.
133+ In this case the PBRSB mitigation is needed in addition to eIBRS.
134+
135+AMD RETBleed / SRSO / Branch Type Confusion
136+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137+
138+On AMD, poisoned RSB entries can also be created by the AMD RETBleed
139+variant [#retbleed-paper]_ [#amd-btc]_ or by Speculative Return Stack
140+Overflow [#amd-srso]_ (Inception [#inception-paper]_). The kernel
141+protects itself by replacing every RET in the kernel with a branch to a
142+single safe RET.
143+
144+----
145+
146+RSB underflow (Intel only)
147+==========================
148+
149+RSB Alternate (RSBA) ("Intel Retbleed")
150+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151+
152+Some Intel Skylake-generation CPUs are susceptible to the Intel variant
153+of RETBleed [#retbleed-paper]_ (Return Stack Buffer Underflow
154+[#intel-rsbu]_). If a RET is executed when the RSB buffer is empty due
155+to mismatched CALLs/RETs or returning from a deep call stack, the branch
156+predictor can fall back to using the Branch Target Buffer (BTB). If a
157+user forces a BTB collision then the RET can speculatively branch to a
158+user-controlled address.
159+
160+* Note that RSB filling doesn't fully mitigate this issue. If there
161+ are enough unbalanced RETs, the RSB may still underflow and fall back
162+ to using a poisoned BTB entry.
163+
164+* On context switch, user->user underflow attacks are mitigated by the
165+ conditional IBPB [#cond-ibpb]_ on context switch which effectively
166+ clears the BTB:
167+
168+ * "The indirect branch predictor barrier (IBPB) is an indirect branch
169+ control mechanism that establishes a barrier, preventing software
170+ that executed before the barrier from controlling the predicted
171+ targets of indirect branches executed after the barrier on the same
172+ logical processor." [#intel-ibpb-btb]_
173+
174+* On context switch and VMEXIT, user->kernel and guest->host RSB
175+ underflows are mitigated by IBRS or eIBRS:
176+
177+ * "Enabling IBRS (including enhanced IBRS) will mitigate the "RSBU"
178+ attack demonstrated by the researchers. As previously documented,
179+ Intel recommends the use of enhanced IBRS, where supported. This
180+ includes any processor that enumerates RRSBA but not RRSBA_DIS_S."
181+ [#intel-rsbu]_
182+
183+ However, note that eIBRS and IBRS do not mitigate intra-mode attacks.
184+ Like RRSBA below, this is mitigated by clearing the BHB on kernel
185+ entry.
186+
187+ As an alternative to classic IBRS, call depth tracking (combined with
188+ retpolines) can be used to track kernel returns and fill the RSB when
189+ it gets close to being empty.
190+
191+Restricted RSB Alternate (RRSBA)
192+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193+
194+Some newer Intel CPUs have Restricted RSB Alternate (RRSBA) behavior,
195+which, similar to RSBA described above, also falls back to using the BTB
196+on RSB underflow. The only difference is that the predicted targets are
197+restricted to the current domain when eIBRS is enabled:
198+
199+* "Restricted RSB Alternate (RRSBA) behavior allows alternate branch
200+ predictors to be used by near RET instructions when the RSB is
201+ empty. When eIBRS is enabled, the predicted targets of these
202+ alternate predictors are restricted to those belonging to the
203+ indirect branch predictor entries of the current prediction domain.
204+ [#intel-eibrs-rrsba]_
205+
206+When a CPU with RRSBA is vulnerable to Branch History Injection
207+[#bhi-paper]_ [#intel-bhi]_, an RSB underflow could be used for an
208+intra-mode BTI attack. This is mitigated by clearing the BHB on
209+kernel entry.
210+
211+However if the kernel uses retpolines instead of eIBRS, it needs to
212+disable RRSBA:
213+
214+* "Where software is using retpoline as a mitigation for BHI or
215+ intra-mode BTI, and the processor both enumerates RRSBA and
216+ enumerates RRSBA_DIS controls, it should disable this behavior."
217+ [#intel-retpoline-rrsba]_
218+
219+----
220+
221+References
222+==========
223+
224+.. [#spectre-rsb] `Spectre Returns! Speculation Attacks using the Return Stack Buffer <https://arxiv.org/pdf/1807.07940.pdf>`_
225+
226+.. [#intel-rsb-filling] "Empty RSB Mitigation on Skylake-generation" in `Retpoline: A Branch Target Injection Mitigation <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/retpoline-branch-target-injection-mitigation.html#inpage-nav-5-1>`_
227+
228+.. [#amd-rsb-filling] "Mitigation V2-3" in `Software Techniques for Managing Speculation <https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/software-techniques-for-managing-speculation.pdf>`_
229+
230+.. [#cond-ibpb] Whether IBPB is written depends on whether the prev and/or next task is protected from Spectre attacks. It typically requires opting in per task or system-wide. For more details see the documentation for the ``spectre_v2_user`` cmdline option in Documentation/admin-guide/kernel-parameters.txt.
231+
232+.. [#amd-sbpb] IBPB without flushing of branch type predictions. Only exists for AMD.
233+
234+.. [#amd-ibpb-rsb] "Function 8000_0008h -- Processor Capacity Parameters and Extended Feature Identification" in `AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions <https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/24594.pdf>`_. SBPB behaves the same way according to `this email <https://lore.kernel.org/5175b163a3736ca5fd01cedf406735636c99a>`_.
235+
236+.. [#amd-ibpb-no-rsb] `Spectre Attacks: Exploiting Speculative Execution <https://comsec.ethz.ch/wp-content/files/ibpb_sp25.pdf>`_
237+
238+.. [#intel-ibpb-rsb] "Introduction" in `Post-barrier Return Stack Buffer Predictions / CVE-2022-26373 / INTEL-SA-00706 <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/post-barrier-return-stack-buffer-predictions.html>`_
239+
240+.. [#amd-smep-rsb] "Existing Mitigations" in `Technical Guidance for Mitigating Branch Type Confusion <https://www.amd.com/content/dam/amd/en/documents/resources/technical-guidance-for-mitigating-branch-type-confusion.pdf>`_
241+
242+.. [#intel-smep-rsb] "Enhanced IBRS" in `Indirect Branch Restricted Speculation <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/indirect-branch-restricted-speculation.html>`_
243+
244+.. [#amd-eibrs-vmexit] "Extended Feature Enable Register (EFER)" in `AMD64 Architecture Programmer's Manual Volume 2: System Programming <https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/24593.pdf>`_
245+
246+.. [#intel-eibrs-vmexit] "Enhanced IBRS" in `Indirect Branch Restricted Speculation <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/indirect-branch-restricted-speculation.html>`_
247+
248+.. [#intel-pbrsb] `Post-barrier Return Stack Buffer Predictions / CVE-2022-26373 / INTEL-SA-00706 <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/post-barrier-return-stack-buffer-predictions.html>`_
249+
250+.. [#retbleed-paper] `RETBleed: Arbitrary Speculative Code Execution with Return Instruction <https://comsec.ethz.ch/wp-content/files/retbleed_sec22.pdf>`_
251+
252+.. [#amd-btc] `Technical Guidance for Mitigating Branch Type Confusion <https://www.amd.com/content/dam/amd/en/documents/resources/technical-guidance-for-mitigating-branch-type-confusion.pdf>`_
253+
254+.. [#amd-srso] `Technical Update Regarding Speculative Return Stack Overflow <https://www.amd.com/content/dam/amd/en/documents/corporate/cr/speculative-return-stack-overflow-whitepaper.pdf>`_
255+
256+.. [#inception-paper] `Inception: Exposing New Attack Surfaces with Training in Transient Execution <https://comsec.ethz.ch/wp-content/files/inception_sec23.pdf>`_
257+
258+.. [#intel-rsbu] `Return Stack Buffer Underflow / Return Stack Buffer Underflow / CVE-2022-29901, CVE-2022-28693 / INTEL-SA-00702 <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/return-stack-buffer-underflow.html>`_
259+
260+.. [#intel-ibpb-btb] `Indirect Branch Predictor Barrier' <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/indirect-branch-predictor-barrier.html>`_
261+
262+.. [#intel-eibrs-rrsba] "Guidance for RSBU" in `Return Stack Buffer Underflow / Return Stack Buffer Underflow / CVE-2022-29901, CVE-2022-28693 / INTEL-SA-00702 <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/return-stack-buffer-underflow.html>`_
263+
264+.. [#bhi-paper] `Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 Attacks <http://download.vusec.net/papers/bhi-spectre-bhb_sec22.pdf>`_
265+
266+.. [#intel-bhi] `Branch History Injection and Intra-mode Branch Target Injection / CVE-2022-0001, CVE-2022-0002 / INTEL-SA-00598 <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html>`_
267+
268+.. [#intel-retpoline-rrsba] "Retpoline" in `Branch History Injection and Intra-mode Branch Target Injection / CVE-2022-0001, CVE-2022-0002 / INTEL-SA-00598 <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html>`_
Documentation/admin-guide/kernel-parameters.txt+19−4
@@ -1407,18 +1407,15 @@ · 1406 unmodified lines
14071407 earlyprintk=serial[,0x...[,baudrate]]
14081408 earlyprintk=ttySn[,baudrate]
14091409 earlyprintk=dbgp[debugController#]
1410+ earlyprintk=mmio32,membase[,{nocfg|baudrate}]
14101411 earlyprintk=pciserial[,force],bus:device.function[,{nocfg|baudrate}]
14111412 earlyprintk=xdbc[xhciController#]
14121413 earlyprintk=bios
1413− earlyprintk=mmio,membase[,{nocfg|baudrate}]
14141414
14151415 earlyprintk is useful when the kernel crashes before
14161416 the normal console is initialized. It is not enabled by
14171417 default because it has some cosmetic problems.
14181418
1419− Only 32-bit memory addresses are supported for "mmio"
1420− and "pciserial" devices.
1421−
14221419 Use "nocfg" to skip UART configuration, assume
14231420 BIOS/firmware has configured UART correctly.
14241421
@@ -2205,6 +2202,23 @@ · 780 unmodified lines
22052202 different crypto accelerators. This option can be used
22062203 to achieve best performance for particular HW.
22072204
2205+ indirect_target_selection= [X86,Intel] Mitigation control for Indirect
2206+ Target Selection(ITS) bug in Intel CPUs. Updated
2207+ microcode is also required for a fix in IBPB.
2208+
2209+ on: Enable mitigation (default).
2210+ off: Disable mitigation.
2211+ force: Force the ITS bug and deploy default
2212+ mitigation.
2213+ vmexit: Only deploy mitigation if CPU is affected by
2214+ guest/host isolation part of ITS.
2215+ stuff: Deploy RSB-fill mitigation when retpoline is
2216+ also deployed. Otherwise, deploy the default
2217+ mitigation.
2218+
2219+ For details see:
2220+ Documentation/admin-guide/hw-vuln/indirect-target-selection.rst
2221+
22082222 init= [KNL]
22092223 Format: <full_path>
22102224 Run specified binary instead of /sbin/init as init
@@ -3696,6 +3710,7 @@ · 1485 unmodified lines
36963710 expose users to several CPU vulnerabilities.
36973711 Equivalent to: if nokaslr then kpti=0 [ARM64]
36983712 gather_data_sampling=off [X86]
3713+ indirect_target_selection=off [X86]
36993714 kvm.nx_huge_pages=off [X86]
37003715 l1tf=off [X86]
37013716 mds=off [X86]
Documentation/admin-guide/xfs.rst+37−0
@@ -124,6 +124,14 @@ When mounting an XFS filesystem, the following options are accepted. · 123 unmodified lines
124124 controls the size of each buffer and so is also relevant to
125125 this case.
126126
127+ lifetime (default) or nolifetime
128+ Enable data placement based on write life time hints provided
129+ by the user. This turns on co-allocation of data of similar
130+ life times when statistically favorable to reduce garbage
131+ collection cost.
132+
133+ These options are only available for zoned rt file systems.
134+
127135 logbsize=value
128136 Set the size of each in-memory log buffer. The size may be
129137 specified in bytes, or in kilobytes with a "k" suffix.
@@ -143,6 +151,14 @@ When mounting an XFS filesystem, the following options are accepted. · 13 unmodified lines
143151 optional, and the log section can be separate from the data
144152 section or contained within it.
145153
154+ max_open_zones=value
155+ Specify the max number of zones to keep open for writing on a
156+ zoned rt device. Many open zones aids file data separation
157+ but may impact performance on HDDs.
158+
159+ If ``max_open_zones`` is not specified, the value is determined
160+ by the capabilities and the size of the zoned rt device.
161+
146162 noalign
147163 Data allocations will not be aligned at stripe unit
148164 boundaries. This is only relevant to filesystems created
@@ -542,3 +558,24 @@ The interesting knobs for XFS workqueues are as follows: · 393 unmodified lines
542558 nice Relative priority of scheduling the threads. These are the
543559 same nice levels that can be applied to userspace processes.
544560 ============ ===========
561+
562+Zoned Filesystems
563+=================
564+
565+For zoned file systems, the following attributes are exposed in:
566+
567+ /sys/fs/xfs/<dev>/zoned/
568+
569+ max_open_zones (Min: 1 Default: Varies Max: UINTMAX)
570+ This read-only attribute exposes the maximum number of open zones
571+ available for data placement. The value is determined at mount time and
572+ is limited by the capabilities of the backing zoned device, file system
573+ size and the max_open_zones mount option.
574+
575+ zonegc_low_space (Min: 0 Default: 0 Max: 100)
576+ Define a percentage for how much of the unused space that GC should keep
577+ available for writing. A high value will reclaim more of the space
578+ occupied by unused blocks, creating a larger buffer against write
579+ bursts at the cost of increased write amplification. Regardless
580+ of this value, garbage collection will always aim to free a minimum
581+ amount of blocks to keep max_open_zones open for data placement purposes.
Documentation/arch/openrisc/openrisc_port.rst+6−6
@@ -7,10 +7,10 @@ target architecture, specifically, is the 32-bit OpenRISC 1000 family (or1k). · 6 unmodified lines
77
88 For information about OpenRISC processors and ongoing development:
99
10− ======= =============================
10+ ======= ==============================
1111 website https://openrisc.io
12− email openrisc@lists.librecores.org
13− ======= =============================
12+ email linux-openrisc@vger.kernel.org
13+ ======= ==============================
1414
1515 ---------------------------------------------------------------------
1616
@@ -27,11 +27,11 @@ Toolchain binaries can be obtained from openrisc.io or our github releases page. · 10 unmodified lines
2727 Instructions for building the different toolchains can be found on openrisc.io
2828 or Stafford's toolchain build and release scripts.
2929
30− ========== =================================================
31− binaries https://github.com/openrisc/or1k-gcc/releases
30+ ========== ==========================================================
31+ binaries https://github.com/stffrdhrn/or1k-toolchain-build/releases
3232 toolchains https://openrisc.io/software
3333 building https://github.com/stffrdhrn/or1k-toolchain-build
34− ========== =================================================
34+ ========== ==========================================================
3535
3636 2) Building
3737
Documentation/arch/riscv/hwprobe.rst+1−1
@@ -51,7 +51,7 @@ The following keys are defined: · 50 unmodified lines
5151 * :c:macro:`RISCV_HWPROBE_KEY_MARCHID`: Contains the value of ``marchid``, as
5252 defined by the RISC-V privileged architecture specification.
5353
54−* :c:macro:`RISCV_HWPROBE_KEY_MIMPLID`: Contains the value of ``mimplid``, as
54+* :c:macro:`RISCV_HWPROBE_KEY_MIMPID`: Contains the value of ``mimpid``, as
5555 defined by the RISC-V privileged architecture specification.
5656
5757 * :c:macro:`RISCV_HWPROBE_KEY_BASE_BEHAVIOR`: A bitmask containing the base
Documentation/arch/x86/cpuinfo.rst+36−33
@@ -79,8 +79,9 @@ feature flags. · 78 unmodified lines
7979 How are feature flags created?
8080 ==============================
8181
82−a: Feature flags can be derived from the contents of CPUID leaves.
83−------------------------------------------------------------------
82+Feature flags can be derived from the contents of CPUID leaves
83+--------------------------------------------------------------
84+
8485 These feature definitions are organized mirroring the layout of CPUID
8586 leaves and grouped in words with offsets as mapped in enum cpuid_leafs
8687 in cpufeatures.h (see arch/x86/include/asm/cpufeatures.h for details).
@@ -89,8 +90,9 @@ cpufeatures.h, and if it is detected at run time, the flags will be · 2 unmodified lines
8990 displayed accordingly in /proc/cpuinfo. For example, the flag "avx2"
9091 comes from X86_FEATURE_AVX2 in cpufeatures.h.
9192
92−b: Flags can be from scattered CPUID-based features.
93−----------------------------------------------------
93+Flags can be from scattered CPUID-based features
94+------------------------------------------------
95+
9496 Hardware features enumerated in sparsely populated CPUID leaves get
9597 software-defined values. Still, CPUID needs to be queried to determine
9698 if a given feature is present. This is done in init_scattered_cpuid_features().
@@ -104,8 +106,9 @@ has only one feature and would waste 31 bits of space in the x86_capability[] · 7 unmodified lines
104106 array. Since there is a struct cpuinfo_x86 for each possible CPU, the wasted
105107 memory is not trivial.
106108
107−c: Flags can be created synthetically under certain conditions for hardware features.
108−-------------------------------------------------------------------------------------
109+Flags can be created synthetically under certain conditions for hardware features
110+---------------------------------------------------------------------------------
111+
109112 Examples of conditions include whether certain features are present in
110113 MSR_IA32_CORE_CAPS or specific CPU models are identified. If the needed
111114 conditions are met, the features are enabled by the set_cpu_cap or
@@ -114,8 +117,8 @@ the feature X86_FEATURE_SPLIT_LOCK_DETECT will be enabled and · 2 unmodified lines
114117 "split_lock_detect" will be displayed. The flag "ring3mwait" will be
115118 displayed only when running on INTEL_XEON_PHI_[KNL|KNM] processors.
116119
117−d: Flags can represent purely software features.
118−------------------------------------------------
120+Flags can represent purely software features
121+--------------------------------------------
119122 These flags do not represent hardware features. Instead, they represent a
120123 software feature implemented in the kernel. For example, Kernel Page Table
121124 Isolation is purely software feature and its feature flag X86_FEATURE_PTI is
@@ -130,14 +133,18 @@ x86_cap/bug_flags[] arrays in kernel/cpu/capflags.c. The names in the · 8 unmodified lines
130133 resulting x86_cap/bug_flags[] are used to populate /proc/cpuinfo. The naming
131134 of flags in the x86_cap/bug_flags[] are as follows:
132135
133−a: The name of the flag is from the string in X86_FEATURE_<name> by default.
134−----------------------------------------------------------------------------
135−By default, the flag <name> in /proc/cpuinfo is extracted from the respective
136−X86_FEATURE_<name> in cpufeatures.h. For example, the flag "avx2" is from
137−X86_FEATURE_AVX2.
136+Flags do not appear by default in /proc/cpuinfo
137+-----------------------------------------------
138+
139+Feature flags are omitted by default from /proc/cpuinfo as it does not make
140+sense for the feature to be exposed to userspace in most cases. For example,
141+X86_FEATURE_ALWAYS is defined in cpufeatures.h but that flag is an internal
142+kernel feature used in the alternative runtime patching functionality. So the
143+flag does not appear in /proc/cpuinfo.
144+
145+Specify a flag name if absolutely needed
146+----------------------------------------
138147
139−b: The naming can be overridden.
140−--------------------------------
141148 If the comment on the line for the #define X86_FEATURE_* starts with a
142149 double-quote character (""), the string inside the double-quote characters
143150 will be the name of the flags. For example, the flag "sse4_1" comes from
@@ -148,36 +155,31 @@ needed. For instance, /proc/cpuinfo is a userspace interface and must remain · 4 unmodified lines
148155 constant. If, for some reason, the naming of X86_FEATURE_<name> changes, one
149156 shall override the new naming with the name already used in /proc/cpuinfo.
150157
151−c: The naming override can be "", which means it will not appear in /proc/cpuinfo.
152−----------------------------------------------------------------------------------
153−The feature shall be omitted from /proc/cpuinfo if it does not make sense for
154−the feature to be exposed to userspace. For example, X86_FEATURE_ALWAYS is
155−defined in cpufeatures.h but that flag is an internal kernel feature used
156−in the alternative runtime patching functionality. So, its name is overridden
157−with "". Its flag will not appear in /proc/cpuinfo.
158−
159158 Flags are missing when one or more of these happen
160159 ==================================================
161160
162−a: The hardware does not enumerate support for it.
163−--------------------------------------------------
161+The hardware does not enumerate support for it
162+----------------------------------------------
163+
164164 For example, when a new kernel is running on old hardware or the feature is
165165 not enabled by boot firmware. Even if the hardware is new, there might be a
166166 problem enabling the feature at run time, the flag will not be displayed.
167167
168−b: The kernel does not know about the flag.
169−-------------------------------------------
168+The kernel does not know about the flag
169+---------------------------------------
170+
170171 For example, when an old kernel is running on new hardware.
171172
172−c: The kernel disabled support for it at compile-time.
173−------------------------------------------------------
173+The kernel disabled support for it at compile-time
174+--------------------------------------------------
175+
174176 For example, if 5-level-paging is not enabled when building (i.e.,
175177 CONFIG_X86_5LEVEL is not selected) the flag "la57" will not show up [#f1]_.
176178 Even though the feature will still be detected via CPUID, the kernel disables
177179 it by clearing via setup_clear_cpu_cap(X86_FEATURE_LA57).
178180
179−d: The feature is disabled at boot-time.
180−----------------------------------------
181+The feature is disabled at boot-time
182+------------------------------------
181183 A feature can be disabled either using a command-line parameter or because
182184 it failed to be enabled. The command-line parameter clearcpuid= can be used
183185 to disable features using the feature number as defined in
@@ -190,8 +192,9 @@ disable specific features. The list of parameters includes, but is not limited · 6 unmodified lines
190192 to, nofsgsbase, nosgx, noxsave, etc. 5-level paging can also be disabled using
191193 "no5lvl".
192194
193−e: The feature was known to be non-functional.
194−----------------------------------------------
195+The feature was known to be non-functional
196+------------------------------------------
197+
195198 The feature was known to be non-functional because a dependency was
196199 missing at runtime. For example, AVX flags will not show up if XSAVE feature
197200 is disabled since they depend on XSAVE feature. Another example would be broken
Documentation/bpf/bpf_devel_QA.rst+8−0
@@ -382,6 +382,14 @@ In case of new BPF instructions, once the changes have been accepted · 381 unmodified lines
382382 into the Linux kernel, please implement support into LLVM's BPF back
383383 end. See LLVM_ section below for further information.
384384
385+Q: What "BPF_INTERNAL" symbol namespace is for?
386+-----------------------------------------------
387+A: Symbols exported as BPF_INTERNAL can only be used by BPF infrastructure
388+like preload kernel modules with light skeleton. Most symbols outside
389+of BPF_INTERNAL are not expected to be used by code outside of BPF either.
390+Symbols may lack the designation because they predate the namespaces,
391+or due to an oversight.
392+
385393 Stable submission
386394 =================
387395
Documentation/devicetree/bindings/ata/ceva,ahci-1v84.yaml+0−1
@@ -7,7 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Ceva AHCI SATA Controller
88
99 maintainers:
10− - Mubin Sayyed <mubin.sayyed@amd.com>
1110 - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
1211
1312 description: |
Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml+17−1
@@ -111,11 +111,27 @@ properties: · 110 unmodified lines
111111 unevaluatedProperties: false
112112
113113 port@1:
114− $ref: /schemas/graph.yaml#/properties/port
114+ $ref: /schemas/graph.yaml#/$defs/port-base
115+ unevaluatedProperties: false
115116 description:
116117 DSI output port node to the panel or the next bridge
117118 in the chain
118119
120+ properties:
121+ endpoint:
122+ $ref: /schemas/media/video-interfaces.yaml#
123+ unevaluatedProperties: false
124+
125+ properties:
126+ data-lanes:
127+ description: array of physical DSI data lane indexes.
128+ minItems: 1
129+ items:
130+ - const: 1
131+ - const: 2
132+ - const: 3
133+ - const: 4
134+
119135 required:
120136 - port@0
121137 - port@1
Documentation/devicetree/bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml+0−1
@@ -12,7 +12,6 @@ description: · 11 unmodified lines
1212 PS_MODE). Every pin can be configured as input/output.
1313
1414 maintainers:
15− - Mubin Sayyed <mubin.sayyed@amd.com>
1615 - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
1716
1817 properties:
Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Mediatek's Keypad Controller
88
99 maintainers:
10− - Mattijs Korpershoek <mkorpershoek@baylibre.com>
10+ - Mattijs Korpershoek <mkorpershoek@kernel.org>
1111
1212 allOf:
1313 - $ref: /schemas/input/matrix-keymap.yaml#
Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml+1−0
@@ -19,6 +19,7 @@ properties: · 18 unmodified lines
1919 - fsl,imx8mp-irqsteer
2020 - fsl,imx8qm-irqsteer
2121 - fsl,imx8qxp-irqsteer
22+ - fsl,imx94-irqsteer
2223 - const: fsl,imx-irqsteer
2324
2425 reg:
Documentation/devicetree/bindings/net/can/microchip,mcp2510.yaml+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/can/microchip,mcp2510.yaml#
4+$id: http://devicetree.org/schemas/net/can/microchip,mcp2510.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Microchip MCP251X stand-alone CAN controller
Documentation/devicetree/bindings/net/ethernet-controller.yaml+90−7
@@ -74,19 +74,17 @@ properties: · 73 unmodified lines
7474 - rev-rmii
7575 - moca
7676
77− # RX and TX delays are added by the MAC when required
77+ # RX and TX delays are provided by the PCB. See below
7878 - rgmii
7979
80− # RGMII with internal RX and TX delays provided by the PHY,
81− # the MAC should not add the RX or TX delays in this case
80+ # RX and TX delays are not provided by the PCB. This is the most
81+ # frequent case. See below
8282 - rgmii-id
8383
84− # RGMII with internal RX delay provided by the PHY, the MAC
85− # should not add an RX delay in this case
84+ # TX delay is provided by the PCB. See below
8685 - rgmii-rxid
8786
88− # RGMII with internal TX delay provided by the PHY, the MAC
89− # should not add an TX delay in this case
87+ # RX delay is provided by the PCB. See below
9088 - rgmii-txid
9189 - rtbi
9290 - smii
@@ -286,4 +284,89 @@ allOf: · 193 unmodified lines
286284
287285 additionalProperties: true
288286
287+# Informative
288+# ===========
289+#
290+# 'phy-modes' & 'phy-connection-type' properties 'rgmii', 'rgmii-id',
291+# 'rgmii-rxid', and 'rgmii-txid' are frequently used wrongly by
292+# developers. This informative section clarifies their usage.
293+#
294+# The RGMII specification requires a 2ns delay between the data and
295+# clock signals on the RGMII bus. How this delay is implemented is not
296+# specified.
297+#
298+# One option is to make the clock traces on the PCB longer than the
299+# data traces. A sufficiently difference in length can provide the 2ns
300+# delay. If both the RX and TX delays are implemented in this manner,
301+# 'rgmii' should be used, so indicating the PCB adds the delays.
302+#
303+# If the PCB does not add these delays via extra long traces,
304+# 'rgmii-id' should be used. Here, 'id' refers to 'internal delay',
305+# where either the MAC or PHY adds the delay.
306+#
307+# If only one of the two delays are implemented via extra long clock
308+# lines, either 'rgmii-rxid' or 'rgmii-txid' should be used,
309+# indicating the MAC or PHY should implement one of the delays
310+# internally, while the PCB implements the other delay.
311+#
312+# Device Tree describes hardware, and in this case, it describes the
313+# PCB between the MAC and the PHY, if the PCB implements delays or
314+# not.
315+#
316+# In practice, very few PCBs make use of extra long clock lines. Hence
317+# any RGMII phy mode other than 'rgmii-id' is probably wrong, and is
318+# unlikely to be accepted during review without details provided in
319+# the commit description and comments in the .dts file.
320+#
321+# When the PCB does not implement the delays, the MAC or PHY must. As
322+# such, this is software configuration, and so not described in Device
323+# Tree.
324+#
325+# The following describes how Linux implements the configuration of
326+# the MAC and PHY to add these delays when the PCB does not. As stated
327+# above, developers often get this wrong, and the aim of this section
328+# is reduce the frequency of these errors by Linux developers. Other
329+# users of the Device Tree may implement it differently, and still be
330+# consistent with both the normative and informative description
331+# above.
332+#
333+# By default in Linux, when using phylib/phylink, the MAC is expected
334+# to read the 'phy-mode' from Device Tree, not implement any delays,
335+# and pass the value to the PHY. The PHY will then implement delays as
336+# specified by the 'phy-mode'. The PHY should always be reconfigured
337+# to implement the needed delays, replacing any setting performed by
338+# strapping or the bootloader, etc.
339+#
340+# Experience to date is that all PHYs which implement RGMII also
341+# implement the ability to add or not add the needed delays. Hence
342+# this default is expected to work in all cases. Ignoring this default
343+# is likely to be questioned by Reviews, and require a strong argument
344+# to be accepted.
345+#
346+# There are a small number of cases where the MAC has hard coded
347+# delays which cannot be disabled. The 'phy-mode' only describes the
348+# PCB. The inability to disable the delays in the MAC does not change
349+# the meaning of 'phy-mode'. It does however mean that a 'phy-mode' of
350+# 'rgmii' is now invalid, it cannot be supported, since both the PCB
351+# and the MAC and PHY adding delays cannot result in a functional
352+# link. Thus the MAC should report a fatal error for any modes which
353+# cannot be supported. When the MAC implements the delay, it must
354+# ensure that the PHY does not also implement the same delay. So it
355+# must modify the phy-mode it passes to the PHY, removing the delay it
356+# has added. Failure to remove the delay will result in a
357+# non-functioning link.
358+#
359+# Sometimes there is a need to fine tune the delays. Often the MAC or
360+# PHY can perform this fine tuning. In the MAC node, the Device Tree
361+# properties 'rx-internal-delay-ps' and 'tx-internal-delay-ps' should
362+# be used to indicate fine tuning performed by the MAC. The values
363+# expected here are small. A value of 2000ps, i.e 2ns, and a phy-mode
364+# of 'rgmii' will not be accepted by Reviewers.
365+#
366+# If the PHY is to perform fine tuning, the properties
367+# 'rx-internal-delay-ps' and 'tx-internal-delay-ps' in the PHY node
368+# should be used. When the PHY is implementing delays, e.g. 'rgmii-id'
369+# these properties should have a value near to 2000ps. If the PCB is
370+# implementing delays, e.g. 'rgmii', a small value can be used to fine
371+# tune the delay added by the PCB.
289372 ...
Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml+1−1
@@ -27,7 +27,7 @@ properties: · 26 unmodified lines
2727 $ref: /schemas/types.yaml#/definitions/uint32-array
2828 items:
2929 - minimum: 0
30− maximum: 7
30+ maximum: 31
3131 description:
3232 Offset in bit within the address range specified by reg.
3333 - minimum: 1
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml+4−0
@@ -19,6 +19,7 @@ properties: · 18 unmodified lines
1919 - enum:
2020 - qcom,apq8064-qfprom
2121 - qcom,apq8084-qfprom
22+ - qcom,ipq5018-qfprom
2223 - qcom,ipq5332-qfprom
2324 - qcom,ipq5424-qfprom
2425 - qcom,ipq6018-qfprom
@@ -28,6 +29,8 @@ properties: · 3 unmodified lines
2829 - qcom,msm8226-qfprom
2930 - qcom,msm8916-qfprom
3031 - qcom,msm8917-qfprom
32+ - qcom,msm8937-qfprom
33+ - qcom,msm8960-qfprom
3134 - qcom,msm8974-qfprom
3235 - qcom,msm8976-qfprom
3336 - qcom,msm8996-qfprom
@@ -51,6 +54,7 @@ properties: · 17 unmodified lines
5154 - qcom,sm8450-qfprom
5255 - qcom,sm8550-qfprom
5356 - qcom,sm8650-qfprom
57+ - qcom,x1e80100-qfprom
5458 - const: qcom,qfprom
5559
5660 reg:
Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml+25−0
@@ -14,6 +14,7 @@ properties: · 13 unmodified lines
1414 enum:
1515 - rockchip,px30-otp
1616 - rockchip,rk3308-otp
17+ - rockchip,rk3576-otp
1718 - rockchip,rk3588-otp
1819
1920 reg:
@@ -62,12 +63,34 @@ allOf: · 42 unmodified lines
6263 properties:
6364 clocks:
6465 maxItems: 3
66+ clock-names:
67+ maxItems: 3
6568 resets:
6669 maxItems: 1
6770 reset-names:
6871 items:
6972 - const: phy
7073
74+ - if:
75+ properties:
76+ compatible:
77+ contains:
78+ enum:
79+ - rockchip,rk3576-otp
80+ then:
81+ properties:
82+ clocks:
83+ maxItems: 3
84+ clock-names:
85+ maxItems: 3
86+ resets:
87+ minItems: 2
88+ maxItems: 2
89+ reset-names:
90+ items:
91+ - const: otp
92+ - const: apb
93+
7194 - if:
7295 properties:
7396 compatible:
@@ -78,6 +101,8 @@ allOf: · 4 unmodified lines
78101 properties:
79102 clocks:
80103 minItems: 4
104+ clock-names:
105+ minItems: 4
81106 resets:
82107 minItems: 3
83108 reset-names:
Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml+0−9
@@ -9,15 +9,6 @@ title: Renesas R-Car Timer Pulse Unit PWM Controller · 8 unmodified lines
99 maintainers:
1010 - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
1111
12−select:
13− properties:
14− compatible:
15− contains:
16− const: renesas,tpu
17− required:
18− - compatible
19− - '#pwm-cells'
20−
2112 properties:
2213 compatible:
2314 items:
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml+0−1
@@ -7,7 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Zynq UltraScale+ MPSoC and Versal reset
88
99 maintainers:
10− - Mubin Sayyed <mubin.sayyed@amd.com>
1110 - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
1211
1312 description: |
Documentation/devicetree/bindings/soc/fsl/fsl,ls1028a-reset.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Freescale Layerscape Reset Registers Module
88
99 maintainers:
10− - Frank Li
10+ - Frank Li <Frank.Li@nxp.com>
1111
1212 description:
1313 Reset Module includes chip reset, service processor control and Reset Control
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml+7−12
@@ -56,19 +56,18 @@ properties: · 55 unmodified lines
5656 enum:
5757 - snps,dw-apb-ssi
5858 - snps,dwc-ssi-1.01a
59− - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller
60− items:
61− - enum:
62− - mscc,ocelot-spi
63− - mscc,jaguar2-spi
64− - const: snps,dw-apb-ssi
6559 - description: Microchip Sparx5 SoC SPI Controller
6660 const: microchip,sparx5-spi
6761 - description: Amazon Alpine SPI Controller
6862 const: amazon,alpine-dw-apb-ssi
69− - description: Renesas RZ/N1 SPI Controller
63+ - description: Vendor controllers which use snps,dw-apb-ssi as fallback
7064 items:
71− - const: renesas,rzn1-spi
65+ - enum:
66+ - mscc,ocelot-spi
67+ - mscc,jaguar2-spi
68+ - renesas,rzn1-spi
69+ - sophgo,sg2042-spi
70+ - thead,th1520-spi
7271 - const: snps,dw-apb-ssi
7372 - description: Intel Keem Bay SPI Controller
7473 const: intel,keembay-ssi
@@ -88,10 +87,6 @@ properties: · 13 unmodified lines
8887 - renesas,r9a06g032-spi # RZ/N1D
8988 - renesas,r9a06g033-spi # RZ/N1S
9089 - const: renesas,rzn1-spi # RZ/N1
91− - description: T-HEAD TH1520 SoC SPI Controller
92− items:
93− - const: thead,th1520-spi
94− - const: snps,dw-apb-ssi
9590
9691 reg:
9792 minItems: 1
Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml+8−3
@@ -18,9 +18,14 @@ description: | · 17 unmodified lines
1818
1919 properties:
2020 compatible:
21− enum:
22− - nxp,imx95-sysctr-timer
23− - nxp,sysctr-timer
21+ oneOf:
22+ - enum:
23+ - nxp,imx95-sysctr-timer
24+ - nxp,sysctr-timer
25+ - items:
26+ - enum:
27+ - nxp,imx94-sysctr-timer
28+ - const: nxp,imx95-sysctr-timer
2429
2530 reg:
2631 maxItems: 1
Documentation/devicetree/bindings/timer/renesas,tpu.yaml+0−56
@@ -1,56 +0,0 @@
1−# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2−%YAML 1.2
3−---
4−$id: http://devicetree.org/schemas/timer/renesas,tpu.yaml#
5−$schema: http://devicetree.org/meta-schemas/core.yaml#
6−
7−title: Renesas H8/300 Timer Pulse Unit
8−
9−maintainers:
10− - Yoshinori Sato <ysato@users.sourceforge.jp>
11−
12−description:
13− The TPU is a 16bit timer/counter with configurable clock inputs and
14− programmable compare match.
15− This implementation supports only cascade mode.
16−
17−select:
18− properties:
19− compatible:
20− contains:
21− const: renesas,tpu
22− '#pwm-cells': false
23− required:
24− - compatible
25−
26−properties:
27− compatible:
28− const: renesas,tpu
29−
30− reg:
31− items:
32− - description: First channel
33− - description: Second channel
34−
35− clocks:
36− maxItems: 1
37−
38− clock-names:
39− const: fck
40−
41−required:
42− - compatible
43− - reg
44− - clocks
45− - clock-names
46−
47−additionalProperties: false
48−
49−examples:
50− - |
51− tpu: tpu@ffffe0 {
52− compatible = "renesas,tpu";
53− reg = <0xffffe0 16>, <0xfffff0 12>;
54− clocks = <&pclk>;
55− clock-names = "fck";
56− };
Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml+0−1
@@ -7,7 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Xilinx SuperSpeed DWC3 USB SoC controller
88
99 maintainers:
10− - Mubin Sayyed <mubin.sayyed@amd.com>
1110 - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
1211
1312 properties:
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml+0−1
@@ -17,7 +17,6 @@ description: · 16 unmodified lines
1717
1818 maintainers:
1919 - Michal Simek <michal.simek@amd.com>
20− - Mubin Sayyed <mubin.sayyed@amd.com>
2120 - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
2221
2322 properties:
Documentation/devicetree/bindings/usb/xlnx,usb2.yaml+0−1
@@ -7,7 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Xilinx udc controller
88
99 maintainers:
10− - Mubin Sayyed <mubin.sayyed@amd.com>
1110 - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
1211
1312 properties:
Documentation/filesystems/ext4/super.rst+14−6
@@ -328,9 +328,13 @@ The ext4 superblock is laid out as follows in · 327 unmodified lines
328328 - s_checksum_type
329329 - Metadata checksum algorithm type. The only valid value is 1 (crc32c).
330330 * - 0x176
331− - __le16
332− - s_reserved_pad
333− -
331+ - \_\_u8
332+ - s\_encryption\_level
333+ - Versioning level for encryption.
334+ * - 0x177
335+ - \_\_u8
336+ - s\_reserved\_pad
337+ - Padding to next 32bits.
334338 * - 0x178
335339 - __le64
336340 - s_kbytes_written
@@ -466,9 +470,13 @@ The ext4 superblock is laid out as follows in · 129 unmodified lines
466470 - s_last_error_time_hi
467471 - Upper 8 bits of the s_last_error_time field.
468472 * - 0x27A
469− - __u8
470− - s_pad[2]
471− - Zero padding.
473+ - \_\_u8
474+ - s\_first\_error\_errcode
475+ -
476+ * - 0x27B
477+ - \_\_u8
478+ - s\_last\_error\_errcode
479+ -
472480 * - 0x27C
473481 - __le16
474482 - s_encoding
Documentation/kbuild/reproducible-builds.rst+17−0
@@ -46,6 +46,21 @@ The kernel embeds the building user and host names in · 45 unmodified lines
4646 `KBUILD_BUILD_USER and KBUILD_BUILD_HOST`_ variables. If you are
4747 building from a git commit, you could use its committer address.
4848
49+Absolute filenames
50+------------------
51+
52+When the kernel is built out-of-tree, debug information may include
53+absolute filenames for the source files. This must be overridden by
54+including the ``-fdebug-prefix-map`` option in the `KCFLAGS`_ variable.
55+
56+Depending on the compiler used, the ``__FILE__`` macro may also expand
57+to an absolute filename in an out-of-tree build. Kbuild automatically
58+uses the ``-fmacro-prefix-map`` option to prevent this, if it is
59+supported.
60+
61+The Reproducible Builds web site has more information about these
62+`prefix-map options`_.
63+
4964 Generated files in source packages
5065 ----------------------------------
5166
@@ -116,5 +131,7 @@ See ``scripts/setlocalversion`` for details. · 64 unmodified lines
116131
117132 .. _KBUILD_BUILD_TIMESTAMP: kbuild.html#kbuild-build-timestamp
118133 .. _KBUILD_BUILD_USER and KBUILD_BUILD_HOST: kbuild.html#kbuild-build-user-kbuild-build-host
134+.. _KCFLAGS: kbuild.html#kcflags
135+.. _prefix-map options: https://reproducible-builds.org/docs/build-path/
119136 .. _Reproducible Builds project: https://reproducible-builds.org/
120137 .. _SOURCE_DATE_EPOCH: https://reproducible-builds.org/docs/source-date-epoch/
Documentation/netlink/specs/ethtool.yaml+3−1
@@ -89,8 +89,10 @@ definitions: · 88 unmodified lines
8989 doc: Group of short_detected states
9090 -
9191 name: phy-upstream-type
92− enum-name:
92+ enum-name: phy-upstream
93+ header: linux/ethtool.h
9394 type: enum
95+ name-prefix: phy-upstream
9496 entries: [ mac, phy ]
9597 -
9698 name: tcp-data-split
Documentation/netlink/specs/ovs_vport.yaml+1−3
@@ -123,12 +123,12 @@ attribute-sets: · 122 unmodified lines
123123
124124 operations:
125125 name-prefix: ovs-vport-cmd-
126+ fixed-header: ovs-header
126127 list:
127128 -
128129 name: new
129130 doc: Create a new OVS vport
130131 attribute-set: vport
131− fixed-header: ovs-header
132132 do:
133133 request:
134134 attributes:
@@ -141,7 +141,6 @@ operations: · 6 unmodified lines
141141 name: del
142142 doc: Delete existing OVS vport from a data path
143143 attribute-set: vport
144− fixed-header: ovs-header
145144 do:
146145 request:
147146 attributes:
@@ -152,7 +151,6 @@ operations: · 4 unmodified lines
152151 name: get
153152 doc: Get / dump OVS vport configuration and state
154153 attribute-set: vport
155− fixed-header: ovs-header
156154 do: &vport-get-op
157155 request:
158156 attributes:
Documentation/netlink/specs/rt_link.yaml+13−7
@@ -1113,11 +1113,10 @@ attribute-sets: · 1112 unmodified lines
11131113 -
11141114 name: prop-list
11151115 type: nest
1116− nested-attributes: link-attrs
1116+ nested-attributes: prop-list-link-attrs
11171117 -
11181118 name: alt-ifname
11191119 type: string
1120− multi-attr: true
11211120 -
11221121 name: perm-address
11231122 type: binary
@@ -1163,6 +1162,13 @@ attribute-sets: · 39 unmodified lines
11631162 -
11641163 name: netns-immutable
11651164 type: u8
1165+ -
1166+ name: prop-list-link-attrs
1167+ subset-of: link-attrs
1168+ attributes:
1169+ -
1170+ name: alt-ifname
1171+ multi-attr: true
11661172 -
11671173 name: af-spec-attrs
11681174 attributes:
@@ -1585,7 +1591,7 @@ attribute-sets: · 416 unmodified lines
15851591 name: nf-call-iptables
15861592 type: u8
15871593 -
1588− name: nf-call-ip6-tables
1594+ name: nf-call-ip6tables
15891595 type: u8
15901596 -
15911597 name: nf-call-arptables
@@ -2077,7 +2083,7 @@ attribute-sets: · 485 unmodified lines
20772083 name: id
20782084 type: u16
20792085 -
2080− name: flag
2086+ name: flags
20812087 type: binary
20822088 struct: ifla-vlan-flags
20832089 -
@@ -2165,7 +2171,7 @@ attribute-sets: · 81 unmodified lines
21652171 type: binary
21662172 struct: ifla-cacheinfo
21672173 -
2168− name: icmp6-stats
2174+ name: icmp6stats
21692175 type: binary
21702176 struct: ifla-icmp6-stats
21712177 -
@@ -2179,9 +2185,10 @@ attribute-sets: · 7 unmodified lines
21792185 type: u32
21802186 -
21812187 name: mctp-attrs
2188+ name-prefix: ifla-mctp-
21822189 attributes:
21832190 -
2184− name: mctp-net
2191+ name: net
21852192 type: u32
21862193 -
21872194 name: phys-binding
@@ -2453,7 +2460,6 @@ operations: · 265 unmodified lines
24532460 - min-mtu
24542461 - max-mtu
24552462 - prop-list
2456− - alt-ifname
24572463 - perm-address
24582464 - proto-down-reason
24592465 - parent-dev-name
Documentation/netlink/specs/rt_neigh.yaml+7−7
@@ -13,25 +13,25 @@ definitions: · 12 unmodified lines
1313 type: struct
1414 members:
1515 -
16− name: family
16+ name: ndm-family
1717 type: u8
1818 -
19− name: pad
19+ name: ndm-pad
2020 type: pad
2121 len: 3
2222 -
23− name: ifindex
23+ name: ndm-ifindex
2424 type: s32
2525 -
26− name: state
26+ name: ndm-state
2727 type: u16
2828 enum: nud-state
2929 -
30− name: flags
30+ name: ndm-flags
3131 type: u8
3232 enum: ntf-flags
3333 -
34− name: type
34+ name: ndm-type
3535 type: u8
3636 enum: rtm-type
3737 -
@@ -189,7 +189,7 @@ attribute-sets: · 151 unmodified lines
189189 type: binary
190190 display-hint: ipv4
191191 -
192− name: lladr
192+ name: lladdr
193193 type: binary
194194 display-hint: mac
195195 -
Documentation/netlink/specs/tc.yaml+6−4
@@ -2017,7 +2017,8 @@ attribute-sets: · 2016 unmodified lines
20172017 attributes:
20182018 -
20192019 name: act
2020− type: nest
2020+ type: indexed-array
2021+ sub-type: nest
20212022 nested-attributes: tc-act-attrs
20222023 -
20232024 name: police
@@ -2250,7 +2251,8 @@ attribute-sets: · 226 unmodified lines
22502251 attributes:
22512252 -
22522253 name: act
2253− type: nest
2254+ type: indexed-array
2255+ sub-type: nest
22542256 nested-attributes: tc-act-attrs
22552257 -
22562258 name: police
@@ -2745,7 +2747,7 @@ attribute-sets: · 488 unmodified lines
27452747 type: u16
27462748 byte-order: big-endian
27472749 -
2748− name: key-l2-tpv3-sid
2750+ name: key-l2tpv3-sid
27492751 type: u32
27502752 byte-order: big-endian
27512753 -
@@ -3504,7 +3506,7 @@ attribute-sets: · 752 unmodified lines
35043506 name: rate64
35053507 type: u64
35063508 -
3507− name: prate4
3509+ name: prate64
35083510 type: u64
35093511 -
35103512 name: burst
Documentation/networking/netdevices.rst+6−4
@@ -338,10 +338,11 @@ operations directly under the netdev instance lock. · 337 unmodified lines
338338 Devices drivers are encouraged to rely on the instance lock where possible.
339339
340340 For the (mostly software) drivers that need to interact with the core stack,
341−there are two sets of interfaces: ``dev_xxx`` and ``netif_xxx`` (e.g.,
342−``dev_set_mtu`` and ``netif_set_mtu``). The ``dev_xxx`` functions handle
343−acquiring the instance lock themselves, while the ``netif_xxx`` functions
344−assume that the driver has already acquired the instance lock.
341+there are two sets of interfaces: ``dev_xxx``/``netdev_xxx`` and ``netif_xxx``
342+(e.g., ``dev_set_mtu`` and ``netif_set_mtu``). The ``dev_xxx``/``netdev_xxx``
343+functions handle acquiring the instance lock themselves, while the
344+``netif_xxx`` functions assume that the driver has already acquired
345+the instance lock.
345346
346347 Notifiers and netdev instance lock
347348 ==================================
@@ -354,6 +355,7 @@ For devices with locked ops, currently only the following notifiers are · 6 unmodified lines
354355 running under the lock:
355356 * ``NETDEV_REGISTER``
356357 * ``NETDEV_UP``
358+* ``NETDEV_CHANGE``
357359
358360 The following notifiers are running without the lock:
359361 * ``NETDEV_UNREGISTER``
Documentation/networking/timestamping.rst+3−5
@@ -811,11 +811,9 @@ Documentation/devicetree/bindings/ptp/timestamper.txt for more details. · 810 unmodified lines
811811 3.2.4 Other caveats for MAC drivers
812812 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
813813
814−Stacked PHCs, especially DSA (but not only) - since that doesn't require any
815−modification to MAC drivers, so it is more difficult to ensure correctness of
816−all possible code paths - is that they uncover bugs which were impossible to
817−trigger before the existence of stacked PTP clocks. One example has to do with
818−this line of code, already presented earlier::
814+The use of stacked PHCs may uncover MAC driver bugs which were impossible to
815+trigger without them. One example has to do with this line of code, already
816+presented earlier::
819817
820818 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
821819
Documentation/power/runtime_pm.rst+1−1
@@ -154,7 +154,7 @@ suspending the device are satisfied) and to queue up a suspend request for the · 153 unmodified lines
154154 device in that case. If there is no idle callback, or if the callback returns
155155 0, then the PM core will attempt to carry out a runtime suspend of the device,
156156 also respecting devices configured for autosuspend. In essence this means a
157−call to __pm_runtime_autosuspend() (do note that drivers needs to update the
157+call to pm_runtime_autosuspend() (do note that drivers needs to update the
158158 device last busy mark, pm_runtime_mark_last_busy(), to control the delay under
159159 this circumstance). To prevent this (for example, if the callback routine has
160160 started a delayed suspend), the routine must return a non-zero value. Negative
Documentation/translations/zh_CN/arch/openrisc/openrisc_port.rst+6−6
@@ -17,10 +17,10 @@ OpenRISC 1000系列(或1k)。 · 16 unmodified lines
1717
1818 关于OpenRISC处理器和正在进行中的开发的信息:
1919
20− ======= =============================
20+ ======= ==============================
2121 网站 https://openrisc.io
22− 邮箱 openrisc@lists.librecores.org
23− ======= =============================
22+ 邮箱 linux-openrisc@vger.kernel.org
23+ ======= ==============================
2424
2525 ---------------------------------------------------------------------
2626
@@ -36,11 +36,11 @@ OpenRISC工具链和Linux的构建指南 · 9 unmodified lines
3636 工具链的构建指南可以在openrisc.io或Stafford的工具链构建和发布脚本
3737 中找到。
3838
39− ====== =================================================
40− 二进制 https://github.com/openrisc/or1k-gcc/releases
39+ ====== ==========================================================
40+ 二进制 https://github.com/stffrdhrn/or1k-toolchain-build/releases
4141 工具链 https://openrisc.io/software
4242 构建 https://github.com/stffrdhrn/or1k-toolchain-build
43− ====== =================================================
43+ ====== ==========================================================
4444
4545 2) 构建
4646
Documentation/translations/zh_TW/arch/openrisc/openrisc_port.rst+6−6
@@ -17,10 +17,10 @@ OpenRISC 1000系列(或1k)。 · 16 unmodified lines
1717
1818 關於OpenRISC處理器和正在進行中的開發的信息:
1919
20− ======= =============================
20+ ======= ==============================
2121 網站 https://openrisc.io
22− 郵箱 openrisc@lists.librecores.org
23− ======= =============================
22+ 郵箱 linux-openrisc@vger.kernel.org
23+ ======= ==============================
2424
2525 ---------------------------------------------------------------------
2626
@@ -36,11 +36,11 @@ OpenRISC工具鏈和Linux的構建指南 · 9 unmodified lines
3636 工具鏈的構建指南可以在openrisc.io或Stafford的工具鏈構建和發佈腳本
3737 中找到。
3838
39− ====== =================================================
40− 二進制 https://github.com/openrisc/or1k-gcc/releases
39+ ====== ==========================================================
40+ 二進制 https://github.com/stffrdhrn/or1k-toolchain-build/releases
4141 工具鏈 https://openrisc.io/software
4242 構建 https://github.com/stffrdhrn/or1k-toolchain-build
43− ====== =================================================
43+ ====== ==========================================================
4444
4545 2) 構建
4646
Documentation/userspace-api/mseal.rst+1−1
@@ -27,7 +27,7 @@ SYSCALL · 26 unmodified lines
2727 =======
2828 mseal syscall signature
2929 -----------------------
30− ``int mseal(void \* addr, size_t len, unsigned long flags)``
30+ ``int mseal(void *addr, size_t len, unsigned long flags)``
3131
3232 **addr**/**len**: virtual memory address range.
3333 The address range set by **addr**/**len** must meet:
Documentation/virt/kvm/api.rst+383−406
@@ -7447,6 +7447,75 @@ Unused bitfields in the bitarrays must be set to zero. · 7446 unmodified lines
74477447
74487448 This capability connects the vcpu to an in-kernel XIVE device.
74497449
7450+6.76 KVM_CAP_HYPERV_SYNIC
7451+-------------------------
7452+
7453+:Architectures: x86
7454+:Target: vcpu
7455+
7456+This capability, if KVM_CHECK_EXTENSION indicates that it is
7457+available, means that the kernel has an implementation of the
7458+Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is
7459+used to support Windows Hyper-V based guest paravirt drivers(VMBus).
7460+
7461+In order to use SynIC, it has to be activated by setting this
7462+capability via KVM_ENABLE_CAP ioctl on the vcpu fd. Note that this
7463+will disable the use of APIC hardware virtualization even if supported
7464+by the CPU, as it's incompatible with SynIC auto-EOI behavior.
7465+
7466+6.77 KVM_CAP_HYPERV_SYNIC2
7467+--------------------------
7468+
7469+:Architectures: x86
7470+:Target: vcpu
7471+
7472+This capability enables a newer version of Hyper-V Synthetic interrupt
7473+controller (SynIC). The only difference with KVM_CAP_HYPERV_SYNIC is that KVM
7474+doesn't clear SynIC message and event flags pages when they are enabled by
7475+writing to the respective MSRs.
7476+
7477+6.78 KVM_CAP_HYPERV_DIRECT_TLBFLUSH
7478+-----------------------------------
7479+
7480+:Architectures: x86
7481+:Target: vcpu
7482+
7483+This capability indicates that KVM running on top of Hyper-V hypervisor
7484+enables Direct TLB flush for its guests meaning that TLB flush
7485+hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM.
7486+Due to the different ABI for hypercall parameters between Hyper-V and
7487+KVM, enabling this capability effectively disables all hypercall
7488+handling by KVM (as some KVM hypercall may be mistakenly treated as TLB
7489+flush hypercalls by Hyper-V) so userspace should disable KVM identification
7490+in CPUID and only exposes Hyper-V identification. In this case, guest
7491+thinks it's running on Hyper-V and only use Hyper-V hypercalls.
7492+
7493+6.79 KVM_CAP_HYPERV_ENFORCE_CPUID
7494+---------------------------------
7495+
7496+:Architectures: x86
7497+:Target: vcpu
7498+
7499+When enabled, KVM will disable emulated Hyper-V features provided to the
7500+guest according to the bits Hyper-V CPUID feature leaves. Otherwise, all
7501+currently implemented Hyper-V features are provided unconditionally when
7502+Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001)
7503+leaf.
7504+
7505+6.80 KVM_CAP_ENFORCE_PV_FEATURE_CPUID
7506+-------------------------------------
7507+
7508+:Architectures: x86
7509+:Target: vcpu
7510+
7511+When enabled, KVM will disable paravirtual features provided to the
7512+guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf
7513+(0x40000001). Otherwise, a guest may use the paravirtual features
7514+regardless of what has actually been exposed through the CPUID leaf.
7515+
7516+.. _KVM_CAP_DIRTY_LOG_RING:
7517+
7518+
74507519 .. _cap_enable_vm:
74517520
74527521 7. Capabilities that can be enabled on VMs
@@ -7927,10 +7996,10 @@ by POWER10 processor. · 474 unmodified lines
79277996 7.24 KVM_CAP_VM_COPY_ENC_CONTEXT_FROM
79287997 -------------------------------------
79297998
7930−Architectures: x86 SEV enabled
7931−Type: vm
7932−Parameters: args[0] is the fd of the source vm
7933−Returns: 0 on success; ENOTTY on error
7999+:Architectures: x86 SEV enabled
8000+:Type: vm
8001+:Parameters: args[0] is the fd of the source vm
8002+:Returns: 0 on success; ENOTTY on error
79348003
79358004 This capability enables userspace to copy encryption context from the vm
79368005 indicated by the fd to the vm this is called on.
@@ -7963,24 +8032,6 @@ default. · 26 unmodified lines
79638032
79648033 See Documentation/arch/x86/sgx.rst for more details.
79658034
7966−7.26 KVM_CAP_PPC_RPT_INVALIDATE
7967−-------------------------------
7968−
7969−:Capability: KVM_CAP_PPC_RPT_INVALIDATE
7970−:Architectures: ppc
7971−:Type: vm
7972−
7973−This capability indicates that the kernel is capable of handling
7974−H_RPT_INVALIDATE hcall.
7975−
7976−In order to enable the use of H_RPT_INVALIDATE in the guest,
7977−user space might have to advertise it for the guest. For example,
7978−IBM pSeries (sPAPR) guest starts using it if "hcall-rpt-invalidate" is
7979−present in the "ibm,hypertas-functions" device-tree property.
7980−
7981−This capability is enabled for hypervisors on platforms like POWER9
7982−that support radix MMU.
7983−
79848035 7.27 KVM_CAP_EXIT_ON_EMULATION_FAILURE
79858036 --------------------------------------
79868037
@@ -8038,24 +8089,9 @@ indicated by the fd to the VM this is called on. · 51 unmodified lines
80388089 This is intended to support intra-host migration of VMs between userspace VMMs,
80398090 upgrading the VMM process without interrupting the guest.
80408091
8041−7.30 KVM_CAP_PPC_AIL_MODE_3
8042−-------------------------------
8043−
8044−:Capability: KVM_CAP_PPC_AIL_MODE_3
8045−:Architectures: ppc
8046−:Type: vm
8047−
8048−This capability indicates that the kernel supports the mode 3 setting for the
8049−"Address Translation Mode on Interrupt" aka "Alternate Interrupt Location"
8050−resource that is controlled with the H_SET_MODE hypercall.
8051−
8052−This capability allows a guest kernel to use a better-performance mode for
8053−handling interrupts and system calls.
8054−
80558092 7.31 KVM_CAP_DISABLE_QUIRKS2
80568093 ----------------------------
80578094
8058−:Capability: KVM_CAP_DISABLE_QUIRKS2
80598095 :Parameters: args[0] - set of KVM quirks to disable
80608096 :Architectures: x86
80618097 :Type: vm
@@ -8210,27 +8246,6 @@ This capability is aimed to mitigate the threat that malicious VMs can · 148 unmodified lines
82108246 cause CPU stuck (due to event windows don't open up) and make the CPU
82118247 unavailable to host or other VMs.
82128248
8213−7.34 KVM_CAP_MEMORY_FAULT_INFO
8214−------------------------------
8215−
8216−:Architectures: x86
8217−:Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
8218−
8219−The presence of this capability indicates that KVM_RUN will fill
8220−kvm_run.memory_fault if KVM cannot resolve a guest page fault VM-Exit, e.g. if
8221−there is a valid memslot but no backing VMA for the corresponding host virtual
8222−address.
8223−
8224−The information in kvm_run.memory_fault is valid if and only if KVM_RUN returns
8225−an error with errno=EFAULT or errno=EHWPOISON *and* kvm_run.exit_reason is set
8226−to KVM_EXIT_MEMORY_FAULT.
8227−
8228−Note: Userspaces which attempt to resolve memory faults so that they can retry
8229−KVM_RUN are encouraged to guard against repeatedly receiving the same
8230−error/annotated fault.
8231−
8232−See KVM_EXIT_MEMORY_FAULT for more information.
8233−
82348249 7.35 KVM_CAP_X86_APIC_BUS_CYCLES_NS
82358250 -----------------------------------
82368251
@@ -8248,82 +8263,268 @@ by KVM_CHECK_EXTENSION. · 11 unmodified lines
82488263 Note: Userspace is responsible for correctly configuring CPUID 0x15, a.k.a. the
82498264 core crystal clock frequency, if a non-zero CPUID 0x15 is exposed to the guest.
82508265
8251−7.36 KVM_CAP_X86_GUEST_MODE
8252−------------------------------
8253−
8254−:Architectures: x86
8255−:Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
8266+7.36 KVM_CAP_DIRTY_LOG_RING/KVM_CAP_DIRTY_LOG_RING_ACQ_REL
8267+----------------------------------------------------------
82568268
8257−The presence of this capability indicates that KVM_RUN will update the
8258−KVM_RUN_X86_GUEST_MODE bit in kvm_run.flags to indicate whether the
8259−vCPU was executing nested guest code when it exited.
8269+:Architectures: x86, arm64
8270+:Type: vm
8271+:Parameters: args[0] - size of the dirty log ring
82608272
8261−KVM exits with the register state of either the L1 or L2 guest
8262−depending on which executed at the time of an exit. Userspace must
8263−take care to differentiate between these cases.
8273+KVM is capable of tracking dirty memory using ring buffers that are
8274+mmapped into userspace; there is one dirty ring per vcpu.
82648275
8265−7.37 KVM_CAP_ARM_WRITABLE_IMP_ID_REGS
8266−-------------------------------------
8276+The dirty ring is available to userspace as an array of
8277+``struct kvm_dirty_gfn``. Each dirty entry is defined as::
82678278
8268−:Architectures: arm64
8269−:Target: VM
8270−:Parameters: None
8271−:Returns: 0 on success, -EINVAL if vCPUs have been created before enabling this
8272− capability.
8279+ struct kvm_dirty_gfn {
8280+ __u32 flags;
8281+ __u32 slot; /* as_id | slot_id */
8282+ __u64 offset;
8283+ };
82738284
8274−This capability changes the behavior of the registers that identify a PE
8275−implementation of the Arm architecture: MIDR_EL1, REVIDR_EL1, and AIDR_EL1.
8276−By default, these registers are visible to userspace but treated as invariant.
8285+The following values are defined for the flags field to define the
8286+current state of the entry::
82778287
8278−When this capability is enabled, KVM allows userspace to change the
8279−aforementioned registers before the first KVM_RUN. These registers are VM
8280−scoped, meaning that the same set of values are presented on all vCPUs in a
8281−given VM.
8288+ #define KVM_DIRTY_GFN_F_DIRTY BIT(0)
8289+ #define KVM_DIRTY_GFN_F_RESET BIT(1)
8290+ #define KVM_DIRTY_GFN_F_MASK 0x3
82828291
8283−8. Other capabilities.
8284−======================
8292+Userspace should call KVM_ENABLE_CAP ioctl right after KVM_CREATE_VM
8293+ioctl to enable this capability for the new guest and set the size of
8294+the rings. Enabling the capability is only allowed before creating any
8295+vCPU, and the size of the ring must be a power of two. The larger the
8296+ring buffer, the less likely the ring is full and the VM is forced to
8297+exit to userspace. The optimal size depends on the workload, but it is
8298+recommended that it be at least 64 KiB (4096 entries).
82858299
8286−This section lists capabilities that give information about other
8287−features of the KVM implementation.
8300+Just like for dirty page bitmaps, the buffer tracks writes to
8301+all user memory regions for which the KVM_MEM_LOG_DIRTY_PAGES flag was
8302+set in KVM_SET_USER_MEMORY_REGION. Once a memory region is registered
8303+with the flag set, userspace can start harvesting dirty pages from the
8304+ring buffer.
82888305
8289−8.1 KVM_CAP_PPC_HWRNG
8290−---------------------
8306+An entry in the ring buffer can be unused (flag bits ``00``),
8307+dirty (flag bits ``01``) or harvested (flag bits ``1X``). The
8308+state machine for the entry is as follows::
82918309
8292−:Architectures: ppc
8310+ dirtied harvested reset
8311+ 00 -----------> 01 -------------> 1X -------+
8312+ ^ |
8313+ | |
8314+ +------------------------------------------+
82938315
8294−This capability, if KVM_CHECK_EXTENSION indicates that it is
8295−available, means that the kernel has an implementation of the
8296−H_RANDOM hypercall backed by a hardware random-number generator.
8297−If present, the kernel H_RANDOM handler can be enabled for guest use
8298−with the KVM_CAP_PPC_ENABLE_HCALL capability.
8316+To harvest the dirty pages, userspace accesses the mmapped ring buffer
8317+to read the dirty GFNs. If the flags has the DIRTY bit set (at this stage
8318+the RESET bit must be cleared), then it means this GFN is a dirty GFN.
8319+The userspace should harvest this GFN and mark the flags from state
8320+``01b`` to ``1Xb`` (bit 0 will be ignored by KVM, but bit 1 must be set
8321+to show that this GFN is harvested and waiting for a reset), and move
8322+on to the next GFN. The userspace should continue to do this until the
8323+flags of a GFN have the DIRTY bit cleared, meaning that it has harvested
8324+all the dirty GFNs that were available.
82998325
8300−8.2 KVM_CAP_HYPERV_SYNIC
8301−------------------------
8326+Note that on weakly ordered architectures, userspace accesses to the
8327+ring buffer (and more specifically the 'flags' field) must be ordered,
8328+using load-acquire/store-release accessors when available, or any
8329+other memory barrier that will ensure this ordering.
83028330
8303−:Architectures: x86
8331+It's not necessary for userspace to harvest the all dirty GFNs at once.
8332+However it must collect the dirty GFNs in sequence, i.e., the userspace
8333+program cannot skip one dirty GFN to collect the one next to it.
83048334
8305−This capability, if KVM_CHECK_EXTENSION indicates that it is
8306−available, means that the kernel has an implementation of the
8307−Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is
8308−used to support Windows Hyper-V based guest paravirt drivers(VMBus).
8335+After processing one or more entries in the ring buffer, userspace
8336+calls the VM ioctl KVM_RESET_DIRTY_RINGS to notify the kernel about
8337+it, so that the kernel will reprotect those collected GFNs.
8338+Therefore, the ioctl must be called *before* reading the content of
8339+the dirty pages.
83098340
8310−In order to use SynIC, it has to be activated by setting this
8311−capability via KVM_ENABLE_CAP ioctl on the vcpu fd. Note that this
8312−will disable the use of APIC hardware virtualization even if supported
8313−by the CPU, as it's incompatible with SynIC auto-EOI behavior.
8341+The dirty ring can get full. When it happens, the KVM_RUN of the
8342+vcpu will return with exit reason KVM_EXIT_DIRTY_LOG_FULL.
83148343
8315−8.3 KVM_CAP_PPC_MMU_RADIX
8316−-------------------------
8344+The dirty ring interface has a major difference comparing to the
8345+KVM_GET_DIRTY_LOG interface in that, when reading the dirty ring from
8346+userspace, it's still possible that the kernel has not yet flushed the
8347+processor's dirty page buffers into the kernel buffer (with dirty bitmaps, the
8348+flushing is done by the KVM_GET_DIRTY_LOG ioctl). To achieve that, one
8349+needs to kick the vcpu out of KVM_RUN using a signal. The resulting
8350+vmexit ensures that all dirty GFNs are flushed to the dirty rings.
83178351
8318−:Architectures: ppc
8352+NOTE: KVM_CAP_DIRTY_LOG_RING_ACQ_REL is the only capability that
8353+should be exposed by weakly ordered architecture, in order to indicate
8354+the additional memory ordering requirements imposed on userspace when
8355+reading the state of an entry and mutating it from DIRTY to HARVESTED.
8356+Architecture with TSO-like ordering (such as x86) are allowed to
8357+expose both KVM_CAP_DIRTY_LOG_RING and KVM_CAP_DIRTY_LOG_RING_ACQ_REL
8358+to userspace.
83198359
8320−This capability, if KVM_CHECK_EXTENSION indicates that it is
8321−available, means that the kernel can support guests using the
8322−radix MMU defined in Power ISA V3.00 (as implemented in the POWER9
8323−processor).
8360+After enabling the dirty rings, the userspace needs to detect the
8361+capability of KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP to see whether the
8362+ring structures can be backed by per-slot bitmaps. With this capability
8363+advertised, it means the architecture can dirty guest pages without
8364+vcpu/ring context, so that some of the dirty information will still be
8365+maintained in the bitmap structure. KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP
8366+can't be enabled if the capability of KVM_CAP_DIRTY_LOG_RING_ACQ_REL
8367+hasn't been enabled, or any memslot has been existing.
83248368
8325−8.4 KVM_CAP_PPC_MMU_HASH_V3
8326−---------------------------
8369+Note that the bitmap here is only a backup of the ring structure. The
8370+use of the ring and bitmap combination is only beneficial if there is
8371+only a very small amount of memory that is dirtied out of vcpu/ring
8372+context. Otherwise, the stand-alone per-slot bitmap mechanism needs to
8373+be considered.
8374+
8375+To collect dirty bits in the backup bitmap, userspace can use the same
8376+KVM_GET_DIRTY_LOG ioctl. KVM_CLEAR_DIRTY_LOG isn't needed as long as all
8377+the generation of the dirty bits is done in a single pass. Collecting
8378+the dirty bitmap should be the very last thing that the VMM does before
8379+considering the state as complete. VMM needs to ensure that the dirty
8380+state is final and avoid missing dirty pages from another ioctl ordered
8381+after the bitmap collection.
8382+
8383+NOTE: Multiple examples of using the backup bitmap: (1) save vgic/its
8384+tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} on
8385+KVM device "kvm-arm-vgic-its". (2) restore vgic/its tables through
8386+command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM device
8387+"kvm-arm-vgic-its". VGICv3 LPI pending status is restored. (3) save
8388+vgic3 pending table through KVM_DEV_ARM_VGIC_{GRP_CTRL, SAVE_PENDING_TABLES}
8389+command on KVM device "kvm-arm-vgic-v3".
8390+
8391+7.37 KVM_CAP_PMU_CAPABILITY
8392+---------------------------
8393+
8394+:Architectures: x86
8395+:Type: vm
8396+:Parameters: arg[0] is bitmask of PMU virtualization capabilities.
8397+:Returns: 0 on success, -EINVAL when arg[0] contains invalid bits
8398+
8399+This capability alters PMU virtualization in KVM.
8400+
8401+Calling KVM_CHECK_EXTENSION for this capability returns a bitmask of
8402+PMU virtualization capabilities that can be adjusted on a VM.
8403+
8404+The argument to KVM_ENABLE_CAP is also a bitmask and selects specific
8405+PMU virtualization capabilities to be applied to the VM. This can
8406+only be invoked on a VM prior to the creation of VCPUs.
8407+
8408+At this time, KVM_PMU_CAP_DISABLE is the only capability. Setting
8409+this capability will disable PMU virtualization for that VM. Usermode
8410+should adjust CPUID leaf 0xA to reflect that the PMU is disabled.
8411+
8412+7.38 KVM_CAP_VM_DISABLE_NX_HUGE_PAGES
8413+-------------------------------------
8414+
8415+:Architectures: x86
8416+:Type: vm
8417+:Parameters: arg[0] must be 0.
8418+:Returns: 0 on success, -EPERM if the userspace process does not
8419+ have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been
8420+ created.
8421+
8422+This capability disables the NX huge pages mitigation for iTLB MULTIHIT.
8423+
8424+The capability has no effect if the nx_huge_pages module parameter is not set.
8425+
8426+This capability may only be set before any vCPUs are created.
8427+
8428+7.39 KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE
8429+---------------------------------------
8430+
8431+:Architectures: arm64
8432+:Type: vm
8433+:Parameters: arg[0] is the new split chunk size.
8434+:Returns: 0 on success, -EINVAL if any memslot was already created.
8435+
8436+This capability sets the chunk size used in Eager Page Splitting.
8437+
8438+Eager Page Splitting improves the performance of dirty-logging (used
8439+in live migrations) when guest memory is backed by huge-pages. It
8440+avoids splitting huge-pages (into PAGE_SIZE pages) on fault, by doing
8441+it eagerly when enabling dirty logging (with the
8442+KVM_MEM_LOG_DIRTY_PAGES flag for a memory region), or when using
8443+KVM_CLEAR_DIRTY_LOG.
8444+
8445+The chunk size specifies how many pages to break at a time, using a
8446+single allocation for each chunk. Bigger the chunk size, more pages
8447+need to be allocated ahead of time.
8448+
8449+The chunk size needs to be a valid block size. The list of acceptable
8450+block sizes is exposed in KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES as a
8451+64-bit bitmap (each bit describing a block size). The default value is
8452+0, to disable the eager page splitting.
8453+
8454+7.40 KVM_CAP_EXIT_HYPERCALL
8455+---------------------------
8456+
8457+:Architectures: x86
8458+:Type: vm
8459+
8460+This capability, if enabled, will cause KVM to exit to userspace
8461+with KVM_EXIT_HYPERCALL exit reason to process some hypercalls.
8462+
8463+Calling KVM_CHECK_EXTENSION for this capability will return a bitmask
8464+of hypercalls that can be configured to exit to userspace.
8465+Right now, the only such hypercall is KVM_HC_MAP_GPA_RANGE.
8466+
8467+The argument to KVM_ENABLE_CAP is also a bitmask, and must be a subset
8468+of the result of KVM_CHECK_EXTENSION. KVM will forward to userspace
8469+the hypercalls whose corresponding bit is in the argument, and return
8470+ENOSYS for the others.
8471+
8472+7.41 KVM_CAP_ARM_SYSTEM_SUSPEND
8473+-------------------------------
8474+
8475+:Architectures: arm64
8476+:Type: vm
8477+
8478+When enabled, KVM will exit to userspace with KVM_EXIT_SYSTEM_EVENT of
8479+type KVM_SYSTEM_EVENT_SUSPEND to process the guest suspend request.
8480+
8481+7.37 KVM_CAP_ARM_WRITABLE_IMP_ID_REGS
8482+-------------------------------------
8483+
8484+:Architectures: arm64
8485+:Target: VM
8486+:Parameters: None
8487+:Returns: 0 on success, -EINVAL if vCPUs have been created before enabling this
8488+ capability.
8489+
8490+This capability changes the behavior of the registers that identify a PE
8491+implementation of the Arm architecture: MIDR_EL1, REVIDR_EL1, and AIDR_EL1.
8492+By default, these registers are visible to userspace but treated as invariant.
8493+
8494+When this capability is enabled, KVM allows userspace to change the
8495+aforementioned registers before the first KVM_RUN. These registers are VM
8496+scoped, meaning that the same set of values are presented on all vCPUs in a
8497+given VM.
8498+
8499+8. Other capabilities.
8500+======================
8501+
8502+This section lists capabilities that give information about other
8503+features of the KVM implementation.
8504+
8505+8.1 KVM_CAP_PPC_HWRNG
8506+---------------------
8507+
8508+:Architectures: ppc
8509+
8510+This capability, if KVM_CHECK_EXTENSION indicates that it is
8511+available, means that the kernel has an implementation of the
8512+H_RANDOM hypercall backed by a hardware random-number generator.
8513+If present, the kernel H_RANDOM handler can be enabled for guest use
8514+with the KVM_CAP_PPC_ENABLE_HCALL capability.
8515+
8516+8.3 KVM_CAP_PPC_MMU_RADIX
8517+-------------------------
8518+
8519+:Architectures: ppc
8520+
8521+This capability, if KVM_CHECK_EXTENSION indicates that it is
8522+available, means that the kernel can support guests using the
8523+radix MMU defined in Power ISA V3.00 (as implemented in the POWER9
8524+processor).
8525+
8526+8.4 KVM_CAP_PPC_MMU_HASH_V3
8527+---------------------------
83278528
83288529 :Architectures: ppc
83298530
@@ -8362,20 +8563,6 @@ may be incompatible with the MIPS VZ ASE. · 32 unmodified lines
83628563 virtualization, including standard guest virtual memory segments.
83638564 == ==========================================================================
83648565
8365−8.6 KVM_CAP_MIPS_TE
8366−-------------------
8367−
8368−:Architectures: mips
8369−
8370−This capability, if KVM_CHECK_EXTENSION on the main kvm handle indicates that
8371−it is available, means that the trap & emulate implementation is available to
8372−run guest code in user mode, even if KVM_CAP_MIPS_VZ indicates that hardware
8373−assisted virtualisation is also available. KVM_VM_MIPS_TE (0) must be passed
8374−to KVM_CREATE_VM to create a VM which utilises it.
8375−
8376−If KVM_CHECK_EXTENSION on a kvm VM handle indicates that this capability is
8377−available, it means that the VM is using trap & emulate.
8378−
83798566 8.7 KVM_CAP_MIPS_64BIT
83808567 ----------------------
83818568
@@ -8457,16 +8644,6 @@ virtual SMT modes that can be set using KVM_CAP_PPC_SMT. If bit N · 75 unmodified lines
84578644 (counting from the right) is set, then a virtual SMT mode of 2^N is
84588645 available.
84598646
8460−8.11 KVM_CAP_HYPERV_SYNIC2
8461−--------------------------
8462−
8463−:Architectures: x86
8464−
8465−This capability enables a newer version of Hyper-V Synthetic interrupt
8466−controller (SynIC). The only difference with KVM_CAP_HYPERV_SYNIC is that KVM
8467−doesn't clear SynIC message and event flags pages when they are enabled by
8468−writing to the respective MSRs.
8469−
84708647 8.12 KVM_CAP_HYPERV_VP_INDEX
84718648 ----------------------------
84728649
@@ -8481,7 +8658,6 @@ capability is absent, userspace can still query this msr's value. · 8 unmodified lines
84818658 -------------------------------
84828659
84838660 :Architectures: s390
8484−:Parameters: none
84858661
84868662 This capability indicates if the flic device will be able to get/set the
84878663 AIS states for migration via the KVM_DEV_FLIC_AISM_ALL attribute and allows
@@ -8555,21 +8731,6 @@ This capability indicates that KVM supports paravirtualized Hyper-V IPI send · 67 unmodified lines
85558731 hypercalls:
85568732 HvCallSendSyntheticClusterIpi, HvCallSendSyntheticClusterIpiEx.
85578733
8558−8.21 KVM_CAP_HYPERV_DIRECT_TLBFLUSH
8559−-----------------------------------
8560−
8561−:Architectures: x86
8562−
8563−This capability indicates that KVM running on top of Hyper-V hypervisor
8564−enables Direct TLB flush for its guests meaning that TLB flush
8565−hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM.
8566−Due to the different ABI for hypercall parameters between Hyper-V and
8567−KVM, enabling this capability effectively disables all hypercall
8568−handling by KVM (as some KVM hypercall may be mistakenly treated as TLB
8569−flush hypercalls by Hyper-V) so userspace should disable KVM identification
8570−in CPUID and only exposes Hyper-V identification. In this case, guest
8571−thinks it's running on Hyper-V and only use Hyper-V hypercalls.
8572−
85738734 8.22 KVM_CAP_S390_VCPU_RESETS
85748735 -----------------------------
85758736
@@ -8647,142 +8808,6 @@ In combination with KVM_CAP_X86_USER_SPACE_MSR, this allows user space to · 71 unmodified lines
86478808 trap and emulate MSRs that are outside of the scope of KVM as well as
86488809 limit the attack surface on KVM's MSR emulation code.
86498810
8650−8.28 KVM_CAP_ENFORCE_PV_FEATURE_CPUID
8651−-------------------------------------
8652−
8653−Architectures: x86
8654−
8655−When enabled, KVM will disable paravirtual features provided to the
8656−guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf
8657−(0x40000001). Otherwise, a guest may use the paravirtual features
8658−regardless of what has actually been exposed through the CPUID leaf.
8659−
8660−.. _KVM_CAP_DIRTY_LOG_RING:
8661−
8662−8.29 KVM_CAP_DIRTY_LOG_RING/KVM_CAP_DIRTY_LOG_RING_ACQ_REL
8663−----------------------------------------------------------
8664−
8665−:Architectures: x86, arm64
8666−:Parameters: args[0] - size of the dirty log ring
8667−
8668−KVM is capable of tracking dirty memory using ring buffers that are
8669−mmapped into userspace; there is one dirty ring per vcpu.
8670−
8671−The dirty ring is available to userspace as an array of
8672−``struct kvm_dirty_gfn``. Each dirty entry is defined as::
8673−
8674− struct kvm_dirty_gfn {
8675− __u32 flags;
8676− __u32 slot; /* as_id | slot_id */
8677− __u64 offset;
8678− };
8679−
8680−The following values are defined for the flags field to define the
8681−current state of the entry::
8682−
8683− #define KVM_DIRTY_GFN_F_DIRTY BIT(0)
8684− #define KVM_DIRTY_GFN_F_RESET BIT(1)
8685− #define KVM_DIRTY_GFN_F_MASK 0x3
8686−
8687−Userspace should call KVM_ENABLE_CAP ioctl right after KVM_CREATE_VM
8688−ioctl to enable this capability for the new guest and set the size of
8689−the rings. Enabling the capability is only allowed before creating any
8690−vCPU, and the size of the ring must be a power of two. The larger the
8691−ring buffer, the less likely the ring is full and the VM is forced to
8692−exit to userspace. The optimal size depends on the workload, but it is
8693−recommended that it be at least 64 KiB (4096 entries).
8694−
8695−Just like for dirty page bitmaps, the buffer tracks writes to
8696−all user memory regions for which the KVM_MEM_LOG_DIRTY_PAGES flag was
8697−set in KVM_SET_USER_MEMORY_REGION. Once a memory region is registered
8698−with the flag set, userspace can start harvesting dirty pages from the
8699−ring buffer.
8700−
8701−An entry in the ring buffer can be unused (flag bits ``00``),
8702−dirty (flag bits ``01``) or harvested (flag bits ``1X``). The
8703−state machine for the entry is as follows::
8704−
8705− dirtied harvested reset
8706− 00 -----------> 01 -------------> 1X -------+
8707− ^ |
8708− | |
8709− +------------------------------------------+
8710−
8711−To harvest the dirty pages, userspace accesses the mmapped ring buffer
8712−to read the dirty GFNs. If the flags has the DIRTY bit set (at this stage
8713−the RESET bit must be cleared), then it means this GFN is a dirty GFN.
8714−The userspace should harvest this GFN and mark the flags from state
8715−``01b`` to ``1Xb`` (bit 0 will be ignored by KVM, but bit 1 must be set
8716−to show that this GFN is harvested and waiting for a reset), and move
8717−on to the next GFN. The userspace should continue to do this until the
8718−flags of a GFN have the DIRTY bit cleared, meaning that it has harvested
8719−all the dirty GFNs that were available.
8720−
8721−Note that on weakly ordered architectures, userspace accesses to the
8722−ring buffer (and more specifically the 'flags' field) must be ordered,
8723−using load-acquire/store-release accessors when available, or any
8724−other memory barrier that will ensure this ordering.
8725−
8726−It's not necessary for userspace to harvest the all dirty GFNs at once.
8727−However it must collect the dirty GFNs in sequence, i.e., the userspace
8728−program cannot skip one dirty GFN to collect the one next to it.
8729−
8730−After processing one or more entries in the ring buffer, userspace
8731−calls the VM ioctl KVM_RESET_DIRTY_RINGS to notify the kernel about
8732−it, so that the kernel will reprotect those collected GFNs.
8733−Therefore, the ioctl must be called *before* reading the content of
8734−the dirty pages.
8735−
8736−The dirty ring can get full. When it happens, the KVM_RUN of the
8737−vcpu will return with exit reason KVM_EXIT_DIRTY_LOG_FULL.
8738−
8739−The dirty ring interface has a major difference comparing to the
8740−KVM_GET_DIRTY_LOG interface in that, when reading the dirty ring from
8741−userspace, it's still possible that the kernel has not yet flushed the
8742−processor's dirty page buffers into the kernel buffer (with dirty bitmaps, the
8743−flushing is done by the KVM_GET_DIRTY_LOG ioctl). To achieve that, one
8744−needs to kick the vcpu out of KVM_RUN using a signal. The resulting
8745−vmexit ensures that all dirty GFNs are flushed to the dirty rings.
8746−
8747−NOTE: KVM_CAP_DIRTY_LOG_RING_ACQ_REL is the only capability that
8748−should be exposed by weakly ordered architecture, in order to indicate
8749−the additional memory ordering requirements imposed on userspace when
8750−reading the state of an entry and mutating it from DIRTY to HARVESTED.
8751−Architecture with TSO-like ordering (such as x86) are allowed to
8752−expose both KVM_CAP_DIRTY_LOG_RING and KVM_CAP_DIRTY_LOG_RING_ACQ_REL
8753−to userspace.
8754−
8755−After enabling the dirty rings, the userspace needs to detect the
8756−capability of KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP to see whether the
8757−ring structures can be backed by per-slot bitmaps. With this capability
8758−advertised, it means the architecture can dirty guest pages without
8759−vcpu/ring context, so that some of the dirty information will still be
8760−maintained in the bitmap structure. KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP
8761−can't be enabled if the capability of KVM_CAP_DIRTY_LOG_RING_ACQ_REL
8762−hasn't been enabled, or any memslot has been existing.
8763−
8764−Note that the bitmap here is only a backup of the ring structure. The
8765−use of the ring and bitmap combination is only beneficial if there is
8766−only a very small amount of memory that is dirtied out of vcpu/ring
8767−context. Otherwise, the stand-alone per-slot bitmap mechanism needs to
8768−be considered.
8769−
8770−To collect dirty bits in the backup bitmap, userspace can use the same
8771−KVM_GET_DIRTY_LOG ioctl. KVM_CLEAR_DIRTY_LOG isn't needed as long as all
8772−the generation of the dirty bits is done in a single pass. Collecting
8773−the dirty bitmap should be the very last thing that the VMM does before
8774−considering the state as complete. VMM needs to ensure that the dirty
8775−state is final and avoid missing dirty pages from another ioctl ordered
8776−after the bitmap collection.
8777−
8778−NOTE: Multiple examples of using the backup bitmap: (1) save vgic/its
8779−tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} on
8780−KVM device "kvm-arm-vgic-its". (2) restore vgic/its tables through
8781−command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM device
8782−"kvm-arm-vgic-its". VGICv3 LPI pending status is restored. (3) save
8783−vgic3 pending table through KVM_DEV_ARM_VGIC_{GRP_CTRL, SAVE_PENDING_TABLES}
8784−command on KVM device "kvm-arm-vgic-v3".
8785−
87868811 8.30 KVM_CAP_XEN_HVM
87878812 --------------------
87888813
@@ -8847,10 +8872,9 @@ clearing the PVCLOCK_TSC_STABLE_BIT flag in Xen pvclock sources. This will be · 58 unmodified lines
88478872 done when the KVM_CAP_XEN_HVM ioctl sets the
88488873 KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE flag.
88498874
8850−8.31 KVM_CAP_PPC_MULTITCE
8851−-------------------------
8875+8.31 KVM_CAP_SPAPR_MULTITCE
8876+---------------------------
88528877
8853−:Capability: KVM_CAP_PPC_MULTITCE
88548878 :Architectures: ppc
88558879 :Type: vm
88568880
@@ -8882,72 +8906,9 @@ This capability indicates that the KVM virtual PTP service is · 25 unmodified lines
88828906 supported in the host. A VMM can check whether the service is
88838907 available to the guest on migration.
88848908
8885−8.33 KVM_CAP_HYPERV_ENFORCE_CPUID
8886−---------------------------------
8887−
8888−Architectures: x86
8889−
8890−When enabled, KVM will disable emulated Hyper-V features provided to the
8891−guest according to the bits Hyper-V CPUID feature leaves. Otherwise, all
8892−currently implemented Hyper-V features are provided unconditionally when
8893−Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001)
8894−leaf.
8895−
8896−8.34 KVM_CAP_EXIT_HYPERCALL
8897−---------------------------
8898−
8899−:Capability: KVM_CAP_EXIT_HYPERCALL
8900−:Architectures: x86
8901−:Type: vm
8902−
8903−This capability, if enabled, will cause KVM to exit to userspace
8904−with KVM_EXIT_HYPERCALL exit reason to process some hypercalls.
8905−
8906−Calling KVM_CHECK_EXTENSION for this capability will return a bitmask
8907−of hypercalls that can be configured to exit to userspace.
8908−Right now, the only such hypercall is KVM_HC_MAP_GPA_RANGE.
8909−
8910−The argument to KVM_ENABLE_CAP is also a bitmask, and must be a subset
8911−of the result of KVM_CHECK_EXTENSION. KVM will forward to userspace
8912−the hypercalls whose corresponding bit is in the argument, and return
8913−ENOSYS for the others.
8914−
8915−8.35 KVM_CAP_PMU_CAPABILITY
8916−---------------------------
8917−
8918−:Capability: KVM_CAP_PMU_CAPABILITY
8919−:Architectures: x86
8920−:Type: vm
8921−:Parameters: arg[0] is bitmask of PMU virtualization capabilities.
8922−:Returns: 0 on success, -EINVAL when arg[0] contains invalid bits
8923−
8924−This capability alters PMU virtualization in KVM.
8925−
8926−Calling KVM_CHECK_EXTENSION for this capability returns a bitmask of
8927−PMU virtualization capabilities that can be adjusted on a VM.
8928−
8929−The argument to KVM_ENABLE_CAP is also a bitmask and selects specific
8930−PMU virtualization capabilities to be applied to the VM. This can
8931−only be invoked on a VM prior to the creation of VCPUs.
8932−
8933−At this time, KVM_PMU_CAP_DISABLE is the only capability. Setting
8934−this capability will disable PMU virtualization for that VM. Usermode
8935−should adjust CPUID leaf 0xA to reflect that the PMU is disabled.
8936−
8937−8.36 KVM_CAP_ARM_SYSTEM_SUSPEND
8938−-------------------------------
8939−
8940−:Capability: KVM_CAP_ARM_SYSTEM_SUSPEND
8941−:Architectures: arm64
8942−:Type: vm
8943−
8944−When enabled, KVM will exit to userspace with KVM_EXIT_SYSTEM_EVENT of
8945−type KVM_SYSTEM_EVENT_SUSPEND to process the guest suspend request.
8946−
89478909 8.37 KVM_CAP_S390_PROTECTED_DUMP
89488910 --------------------------------
89498911
8950−:Capability: KVM_CAP_S390_PROTECTED_DUMP
89518912 :Architectures: s390
89528913 :Type: vm
89538914
@@ -8957,27 +8918,9 @@ PV guests. The `KVM_PV_DUMP` command is available for the · 3 unmodified lines
89578918 dump related UV data. Also the vcpu ioctl `KVM_S390_PV_CPU_COMMAND` is
89588919 available and supports the `KVM_PV_DUMP_CPU` subcommand.
89598920
8960−8.38 KVM_CAP_VM_DISABLE_NX_HUGE_PAGES
8961−-------------------------------------
8962−
8963−:Capability: KVM_CAP_VM_DISABLE_NX_HUGE_PAGES
8964−:Architectures: x86
8965−:Type: vm
8966−:Parameters: arg[0] must be 0.
8967−:Returns: 0 on success, -EPERM if the userspace process does not
8968− have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been
8969− created.
8970−
8971−This capability disables the NX huge pages mitigation for iTLB MULTIHIT.
8972−
8973−The capability has no effect if the nx_huge_pages module parameter is not set.
8974−
8975−This capability may only be set before any vCPUs are created.
8976−
89778921 8.39 KVM_CAP_S390_CPU_TOPOLOGY
89788922 ------------------------------
89798923
8980−:Capability: KVM_CAP_S390_CPU_TOPOLOGY
89818924 :Architectures: s390
89828925 :Type: vm
89838926
@@ -8999,37 +8942,9 @@ structure. · 15 unmodified lines
89998942 When getting the Modified Change Topology Report value, the attr->addr
90008943 must point to a byte where the value will be stored or retrieved from.
90018944
9002−8.40 KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE
9003−---------------------------------------
9004−
9005−:Capability: KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE
9006−:Architectures: arm64
9007−:Type: vm
9008−:Parameters: arg[0] is the new split chunk size.
9009−:Returns: 0 on success, -EINVAL if any memslot was already created.
9010−
9011−This capability sets the chunk size used in Eager Page Splitting.
9012−
9013−Eager Page Splitting improves the performance of dirty-logging (used
9014−in live migrations) when guest memory is backed by huge-pages. It
9015−avoids splitting huge-pages (into PAGE_SIZE pages) on fault, by doing
9016−it eagerly when enabling dirty logging (with the
9017−KVM_MEM_LOG_DIRTY_PAGES flag for a memory region), or when using
9018−KVM_CLEAR_DIRTY_LOG.
9019−
9020−The chunk size specifies how many pages to break at a time, using a
9021−single allocation for each chunk. Bigger the chunk size, more pages
9022−need to be allocated ahead of time.
9023−
9024−The chunk size needs to be a valid block size. The list of acceptable
9025−block sizes is exposed in KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES as a
9026−64-bit bitmap (each bit describing a block size). The default value is
9027−0, to disable the eager page splitting.
9028−
90298945 8.41 KVM_CAP_VM_TYPES
90308946 ---------------------
90318947
9032−:Capability: KVM_CAP_MEMORY_ATTRIBUTES
90338948 :Architectures: x86
90348949 :Type: system ioctl
90358950
@@ -9046,6 +8961,67 @@ Do not use KVM_X86_SW_PROTECTED_VM for "real" VMs, and especially not in · 10 unmodified lines
90468961 production. The behavior and effective ABI for software-protected VMs is
90478962 unstable.
90488963
8964+8.42 KVM_CAP_PPC_RPT_INVALIDATE
8965+-------------------------------
8966+
8967+:Architectures: ppc
8968+
8969+This capability indicates that the kernel is capable of handling
8970+H_RPT_INVALIDATE hcall.
8971+
8972+In order to enable the use of H_RPT_INVALIDATE in the guest,
8973+user space might have to advertise it for the guest. For example,
8974+IBM pSeries (sPAPR) guest starts using it if "hcall-rpt-invalidate" is
8975+present in the "ibm,hypertas-functions" device-tree property.
8976+
8977+This capability is enabled for hypervisors on platforms like POWER9
8978+that support radix MMU.
8979+
8980+8.43 KVM_CAP_PPC_AIL_MODE_3
8981+---------------------------
8982+
8983+:Architectures: ppc
8984+
8985+This capability indicates that the kernel supports the mode 3 setting for the
8986+"Address Translation Mode on Interrupt" aka "Alternate Interrupt Location"
8987+resource that is controlled with the H_SET_MODE hypercall.
8988+
8989+This capability allows a guest kernel to use a better-performance mode for
8990+handling interrupts and system calls.
8991+
8992+8.44 KVM_CAP_MEMORY_FAULT_INFO
8993+------------------------------
8994+
8995+:Architectures: x86
8996+
8997+The presence of this capability indicates that KVM_RUN will fill
8998+kvm_run.memory_fault if KVM cannot resolve a guest page fault VM-Exit, e.g. if
8999+there is a valid memslot but no backing VMA for the corresponding host virtual
9000+address.
9001+
9002+The information in kvm_run.memory_fault is valid if and only if KVM_RUN returns
9003+an error with errno=EFAULT or errno=EHWPOISON *and* kvm_run.exit_reason is set
9004+to KVM_EXIT_MEMORY_FAULT.
9005+
9006+Note: Userspaces which attempt to resolve memory faults so that they can retry
9007+KVM_RUN are encouraged to guard against repeatedly receiving the same
9008+error/annotated fault.
9009+
9010+See KVM_EXIT_MEMORY_FAULT for more information.
9011+
9012+8.45 KVM_CAP_X86_GUEST_MODE
9013+---------------------------
9014+
9015+:Architectures: x86
9016+
9017+The presence of this capability indicates that KVM_RUN will update the
9018+KVM_RUN_X86_GUEST_MODE bit in kvm_run.flags to indicate whether the
9019+vCPU was executing nested guest code when it exited.
9020+
9021+KVM exits with the register state of either the L1 or L2 guest
9022+depending on which executed at the time of an exit. Userspace must
9023+take care to differentiate between these cases.
9024+
90499025 9. Known KVM API problems
90509026 =========================
90519027
@@ -9076,9 +9052,10 @@ the local APIC. · 24 unmodified lines
90769052
90779053 The same is true for the ``KVM_FEATURE_PV_UNHALT`` paravirtualized feature.
90789054
9079−CPU[EAX=1]:ECX[24] (TSC_DEADLINE) is not reported by ``KVM_GET_SUPPORTED_CPUID``.
9080−It can be enabled if ``KVM_CAP_TSC_DEADLINE_TIMER`` is present and the kernel
9081−has enabled in-kernel emulation of the local APIC.
9055+On older versions of Linux, CPU[EAX=1]:ECX[24] (TSC_DEADLINE) is not reported by
9056+``KVM_GET_SUPPORTED_CPUID``, but it can be enabled if ``KVM_CAP_TSC_DEADLINE_TIMER``
9057+is present and the kernel has enabled in-kernel emulation of the local APIC.
9058+On newer versions, ``KVM_GET_SUPPORTED_CPUID`` does report the bit as available.
90829059
90839060 CPU topology
90849061 ~~~~~~~~~~~~
Documentation/wmi/devices/msi-wmi-platform.rst+4−0
@@ -138,6 +138,10 @@ input data, the meaning of which depends on the subfeature being accessed. · 137 unmodified lines
138138 The output buffer contains a single byte which signals success or failure (``0x00`` on failure)
139139 and 31 bytes of output data, the meaning if which depends on the subfeature being accessed.
140140
141+.. note::
142+ The ACPI control method responsible for handling the WMI method calls is not thread-safe.
143+ This is a firmware bug that needs to be handled inside the driver itself.
144+
141145 WMI method Get_EC()
142146 -------------------
143147
MAINTAINERS+255−26
@@ -2519,6 +2519,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git · 2518 unmodified lines
25192519 F: arch/arm/boot/dts/nxp/imx/
25202520 F: arch/arm/boot/dts/nxp/mxs/
25212521 F: arch/arm64/boot/dts/freescale/
2522+X: Documentation/devicetree/bindings/media/i2c/
25222523 X: arch/arm64/boot/dts/freescale/fsl-*
25232524 X: arch/arm64/boot/dts/freescale/qoriq-*
25242525 X: drivers/media/i2c/
@@ -3191,6 +3192,12 @@ M: Dinh Nguyen <dinguyen@kernel.org> · 666 unmodified lines
31913192 S: Maintained
31923193 F: drivers/clk/socfpga/
31933194
3195+ARM/SOCFPGA DWMAC GLUE LAYER
3196+M: Maxime Chevallier <maxime.chevallier@bootlin.com>
3197+S: Maintained
3198+F: Documentation/devicetree/bindings/net/socfpga-dwmac.txt
3199+F: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
3200+
31943201 ARM/SOCFPGA EDAC BINDINGS
31953202 M: Matthew Gerlach <matthew.gerlach@altera.com>
31963203 S: Maintained
@@ -3867,8 +3874,9 @@ AUXILIARY BUS DRIVER · 670 unmodified lines
38673874 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38683875 R: Dave Ertman <david.m.ertman@intel.com>
38693876 R: Ira Weiny <ira.weiny@intel.com>
3877+R: Leon Romanovsky <leon@kernel.org>
38703878 S: Supported
3871−T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
3879+T: git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
38723880 F: Documentation/driver-api/auxiliary_bus.rst
38733881 F: drivers/base/auxiliary.c
38743882 F: include/linux/auxiliary_bus.h
@@ -6335,6 +6343,7 @@ F: Documentation/process/cve.rst · 2460 unmodified lines
63356343
63366344 CW1200 WLAN driver
63376345 S: Orphan
6346+L: linux-wireless@vger.kernel.org
63386347 F: drivers/net/wireless/st/
63396348 F: include/linux/platform_data/net-cw1200.h
63406349
@@ -7020,6 +7029,7 @@ L: rust-for-linux@vger.kernel.org · 679 unmodified lines
70207029 S: Supported
70217030 W: https://rust-for-linux.com
70227031 T: git https://github.com/Rust-for-Linux/linux.git alloc-next
7032+F: rust/helpers/dma.c
70237033 F: rust/kernel/dma.rs
70247034 F: samples/rust/rust_dma.rs
70257035
@@ -7225,7 +7235,7 @@ M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> · 199 unmodified lines
72257235 M: "Rafael J. Wysocki" <rafael@kernel.org>
72267236 M: Danilo Krummrich <dakr@kernel.org>
72277237 S: Supported
7228−T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
7238+T: git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
72297239 F: Documentation/core-api/kobject.rst
72307240 F: drivers/base/
72317241 F: fs/debugfs/
@@ -8717,6 +8727,7 @@ M: Chao Yu <chao@kernel.org> · 1485 unmodified lines
87178727 R: Yue Hu <zbestahu@gmail.com>
87188728 R: Jeffle Xu <jefflexu@linux.alibaba.com>
87198729 R: Sandeep Dhavale <dhavale@google.com>
8730+R: Hongbo Li <lihongbo22@huawei.com>
87208731 L: linux-erofs@lists.ozlabs.org
87218732 S: Maintained
87228733 W: https://erofs.docs.kernel.org
@@ -10136,6 +10147,13 @@ F: drivers/gpio/gpio-regmap.c · 1413 unmodified lines
1013610147 F: include/linux/gpio/regmap.h
1013710148 K: (devm_)?gpio_regmap_(un)?register
1013810149
10150+GPIO SLOPPY LOGIC ANALYZER
10151+M: Wolfram Sang <wsa+renesas@sang-engineering.com>
10152+S: Supported
10153+F: Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst
10154+F: drivers/gpio/gpio-sloppy-logic-analyzer.c
10155+F: tools/gpio/gpio-sloppy-logic-analyzer.sh
10156+
1013910157 GPIO SUBSYSTEM
1014010158 M: Linus Walleij <linus.walleij@linaro.org>
1014110159 M: Bartosz Golaszewski <brgl@bgdev.pl>
@@ -10151,6 +10169,8 @@ F: include/linux/gpio.h · 9 unmodified lines
1015110169 F: include/linux/gpio/
1015210170 F: include/linux/of_gpio.h
1015310171 K: (devm_)?gpio_(request|free|direction|get|set)
10172+K: GPIOD_FLAGS_BIT_NONEXCLUSIVE
10173+K: devm_gpiod_unhinge
1015410174
1015510175 GPIO UAPI
1015610176 M: Bartosz Golaszewski <brgl@bgdev.pl>
@@ -10453,14 +10473,20 @@ S: Supported · 296 unmodified lines
1045310473 F: drivers/infiniband/hw/hfi1
1045410474
1045510475 HFS FILESYSTEM
10476+M: Viacheslav Dubeyko <slava@dubeyko.com>
10477+M: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
10478+M: Yangtao Li <frank.li@vivo.com>
1045610479 L: linux-fsdevel@vger.kernel.org
10457−S: Orphan
10480+S: Maintained
1045810481 F: Documentation/filesystems/hfs.rst
1045910482 F: fs/hfs/
1046010483
1046110484 HFSPLUS FILESYSTEM
10485+M: Viacheslav Dubeyko <slava@dubeyko.com>
10486+M: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
10487+M: Yangtao Li <frank.li@vivo.com>
1046210488 L: linux-fsdevel@vger.kernel.org
10463−S: Orphan
10489+S: Maintained
1046410490 F: Documentation/filesystems/hfsplus.rst
1046510491 F: fs/hfsplus/
1046610492
@@ -10954,6 +10980,7 @@ F: include/linux/platform_data/huawei-gaokun-ec.h · 487 unmodified lines
1095410980
1095510981 HUGETLB SUBSYSTEM
1095610982 M: Muchun Song <muchun.song@linux.dev>
10983+R: Oscar Salvador <osalvador@suse.de>
1095710984 L: linux-mm@kvack.org
1095810985 S: Maintained
1095910986 F: Documentation/ABI/testing/sysfs-kernel-mm-hugepages
@@ -11079,6 +11106,14 @@ L: linuxppc-dev@lists.ozlabs.org · 119 unmodified lines
1107911106 S: Odd Fixes
1108011107 F: drivers/tty/hvc/
1108111108
11109+HUNG TASK DETECTOR
11110+M: Andrew Morton <akpm@linux-foundation.org>
11111+R: Lance Yang <lance.yang@linux.dev>
11112+L: linux-kernel@vger.kernel.org
11113+S: Maintained
11114+F: include/linux/hung_task.h
11115+F: kernel/hung_task.c
11116+
1108211117 I2C ACPI SUPPORT
1108311118 M: Mika Westerberg <westeri@kernel.org>
1108411119 L: linux-i2c@vger.kernel.org
@@ -11217,7 +11252,6 @@ S: Maintained · 132 unmodified lines
1121711252 F: drivers/i2c/busses/i2c-cht-wc.c
1121811253
1121911254 I2C/SMBUS ISMT DRIVER
11220−M: Seth Heasley <seth.heasley@intel.com>
1122111255 M: Neil Horman <nhorman@tuxdriver.com>
1122211256 L: linux-i2c@vger.kernel.org
1122311257 F: Documentation/i2c/busses/i2c-ismt.rst
@@ -12810,6 +12844,7 @@ F: lib/Kconfig.kcsan · 1586 unmodified lines
1281012844 F: scripts/Makefile.kcsan
1281112845
1281212846 KDUMP
12847+M: Andrew Morton <akpm@linux-foundation.org>
1281312848 M: Baoquan He <bhe@redhat.com>
1281412849 R: Vivek Goyal <vgoyal@redhat.com>
1281512850 R: Dave Young <dyoung@redhat.com>
@@ -13106,11 +13141,13 @@ KERNFS · 290 unmodified lines
1310613141 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1310713142 M: Tejun Heo <tj@kernel.org>
1310813143 S: Supported
13109−T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
13144+T: git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
1311013145 F: fs/kernfs/
1311113146 F: include/linux/kernfs.h
1311213147
1311313148 KEXEC
13149+M: Andrew Morton <akpm@linux-foundation.org>
13150+M: Baoquan He <bhe@redhat.com>
1311413151 L: kexec@lists.infradead.org
1311513152 W: http://kernel.org/pub/linux/utils/kernel/kexec/
1311613153 F: include/linux/kexec.h
@@ -14283,6 +14320,7 @@ S: Odd fixes · 1166 unmodified lines
1428314320 F: drivers/net/ethernet/marvell/sk*
1428414321
1428514322 MARVELL LIBERTAS WIRELESS DRIVER
14323+L: linux-wireless@vger.kernel.org
1428614324 L: libertas-dev@lists.infradead.org
1428714325 S: Orphan
1428814326 F: drivers/net/wireless/marvell/libertas/
@@ -15049,7 +15087,7 @@ F: Documentation/devicetree/bindings/media/mediatek-jpeg-*.yaml · 760 unmodified lines
1504915087 F: drivers/media/platform/mediatek/jpeg/
1505015088
1505115089 MEDIATEK KEYPAD DRIVER
15052−M: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15090+M: Mattijs Korpershoek <mkorpershoek@kernel.org>
1505315091 S: Supported
1505415092 F: Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml
1505515093 F: drivers/input/keyboard/mt6779-keypad.c
@@ -15472,24 +15510,45 @@ F: Documentation/mm/ · 416 unmodified lines
1547215510 F: include/linux/gfp.h
1547315511 F: include/linux/gfp_types.h
1547415512 F: include/linux/memfd.h
15475−F: include/linux/memory.h
1547615513 F: include/linux/memory_hotplug.h
1547715514 F: include/linux/memory-tiers.h
1547815515 F: include/linux/mempolicy.h
1547915516 F: include/linux/mempool.h
1548015517 F: include/linux/memremap.h
15481−F: include/linux/mm.h
15482−F: include/linux/mm_*.h
1548315518 F: include/linux/mmzone.h
1548415519 F: include/linux/mmu_notifier.h
1548515520 F: include/linux/pagewalk.h
15486−F: include/linux/rmap.h
1548715521 F: include/trace/events/ksm.h
1548815522 F: mm/
1548915523 F: tools/mm/
1549015524 F: tools/testing/selftests/mm/
1549115525 N: include/linux/page[-_]*
1549215526
15527+MEMORY MANAGEMENT - CORE
15528+M: Andrew Morton <akpm@linux-foundation.org>
15529+M: David Hildenbrand <david@redhat.com>
15530+R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
15531+R: Liam R. Howlett <Liam.Howlett@oracle.com>
15532+R: Vlastimil Babka <vbabka@suse.cz>
15533+R: Mike Rapoport <rppt@kernel.org>
15534+R: Suren Baghdasaryan <surenb@google.com>
15535+R: Michal Hocko <mhocko@suse.com>
15536+L: linux-mm@kvack.org
15537+S: Maintained
15538+W: http://www.linux-mm.org
15539+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15540+F: include/linux/memory.h
15541+F: include/linux/mm.h
15542+F: include/linux/mm_*.h
15543+F: include/linux/mmdebug.h
15544+F: include/linux/pagewalk.h
15545+F: mm/Kconfig
15546+F: mm/debug.c
15547+F: mm/init-mm.c
15548+F: mm/memory.c
15549+F: mm/pagewalk.c
15550+F: mm/util.c
15551+
1549315552 MEMORY MANAGEMENT - EXECMEM
1549415553 M: Andrew Morton <akpm@linux-foundation.org>
1549515554 M: Mike Rapoport <rppt@kernel.org>
@@ -15498,6 +15557,53 @@ S: Maintained · 2 unmodified lines
1549815557 F: include/linux/execmem.h
1549915558 F: mm/execmem.c
1550015559
15560+MEMORY MANAGEMENT - GUP (GET USER PAGES)
15561+M: Andrew Morton <akpm@linux-foundation.org>
15562+M: David Hildenbrand <david@redhat.com>
15563+R: Jason Gunthorpe <jgg@nvidia.com>
15564+R: John Hubbard <jhubbard@nvidia.com>
15565+R: Peter Xu <peterx@redhat.com>
15566+L: linux-mm@kvack.org
15567+S: Maintained
15568+W: http://www.linux-mm.org
15569+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15570+F: mm/gup.c
15571+
15572+MEMORY MANAGEMENT - KSM (Kernel Samepage Merging)
15573+M: Andrew Morton <akpm@linux-foundation.org>
15574+M: David Hildenbrand <david@redhat.com>
15575+R: Xu Xin <xu.xin16@zte.com.cn>
15576+R: Chengming Zhou <chengming.zhou@linux.dev>
15577+L: linux-mm@kvack.org
15578+S: Maintained
15579+W: http://www.linux-mm.org
15580+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15581+F: Documentation/admin-guide/mm/ksm.rst
15582+F: Documentation/mm/ksm.rst
15583+F: include/linux/ksm.h
15584+F: include/trace/events/ksm.h
15585+F: mm/ksm.c
15586+
15587+MEMORY MANAGEMENT - MEMORY POLICY AND MIGRATION
15588+M: Andrew Morton <akpm@linux-foundation.org>
15589+M: David Hildenbrand <david@redhat.com>
15590+R: Zi Yan <ziy@nvidia.com>
15591+R: Matthew Brost <matthew.brost@intel.com>
15592+R: Joshua Hahn <joshua.hahnjy@gmail.com>
15593+R: Rakie Kim <rakie.kim@sk.com>
15594+R: Byungchul Park <byungchul@sk.com>
15595+R: Gregory Price <gourry@gourry.net>
15596+R: Ying Huang <ying.huang@linux.alibaba.com>
15597+L: linux-mm@kvack.org
15598+S: Maintained
15599+W: http://www.linux-mm.org
15600+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15601+F: include/linux/mempolicy.h
15602+F: include/linux/migrate.h
15603+F: mm/mempolicy.c
15604+F: mm/migrate.c
15605+F: mm/migrate_device.c
15606+
1550115607 MEMORY MANAGEMENT - NUMA MEMBLOCKS AND NUMA EMULATION
1550215608 M: Andrew Morton <akpm@linux-foundation.org>
1550315609 M: Mike Rapoport <rppt@kernel.org>
@@ -15508,6 +15614,49 @@ F: mm/numa.c · 4 unmodified lines
1550815614 F: mm/numa_emulation.c
1550915615 F: mm/numa_memblks.c
1551015616
15617+MEMORY MANAGEMENT - PAGE ALLOCATOR
15618+M: Andrew Morton <akpm@linux-foundation.org>
15619+M: Vlastimil Babka <vbabka@suse.cz>
15620+R: Suren Baghdasaryan <surenb@google.com>
15621+R: Michal Hocko <mhocko@suse.com>
15622+R: Brendan Jackman <jackmanb@google.com>
15623+R: Johannes Weiner <hannes@cmpxchg.org>
15624+R: Zi Yan <ziy@nvidia.com>
15625+L: linux-mm@kvack.org
15626+S: Maintained
15627+F: include/linux/compaction.h
15628+F: include/linux/gfp.h
15629+F: include/linux/page-isolation.h
15630+F: mm/compaction.c
15631+F: mm/page_alloc.c
15632+F: mm/page_isolation.c
15633+
15634+MEMORY MANAGEMENT - RECLAIM
15635+M: Andrew Morton <akpm@linux-foundation.org>
15636+M: Johannes Weiner <hannes@cmpxchg.org>
15637+R: David Hildenbrand <david@redhat.com>
15638+R: Michal Hocko <mhocko@kernel.org>
15639+R: Qi Zheng <zhengqi.arch@bytedance.com>
15640+R: Shakeel Butt <shakeel.butt@linux.dev>
15641+R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
15642+L: linux-mm@kvack.org
15643+S: Maintained
15644+F: mm/pt_reclaim.c
15645+F: mm/vmscan.c
15646+
15647+MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)
15648+M: Andrew Morton <akpm@linux-foundation.org>
15649+M: David Hildenbrand <david@redhat.com>
15650+M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
15651+R: Rik van Riel <riel@surriel.com>
15652+R: Liam R. Howlett <Liam.Howlett@oracle.com>
15653+R: Vlastimil Babka <vbabka@suse.cz>
15654+R: Harry Yoo <harry.yoo@oracle.com>
15655+L: linux-mm@kvack.org
15656+S: Maintained
15657+F: include/linux/rmap.h
15658+F: mm/rmap.c
15659+
1551115660 MEMORY MANAGEMENT - SECRETMEM
1551215661 M: Andrew Morton <akpm@linux-foundation.org>
1551315662 M: Mike Rapoport <rppt@kernel.org>
@@ -15516,6 +15665,30 @@ S: Maintained · 2 unmodified lines
1551615665 F: include/linux/secretmem.h
1551715666 F: mm/secretmem.c
1551815667
15668+MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE)
15669+M: Andrew Morton <akpm@linux-foundation.org>
15670+M: David Hildenbrand <david@redhat.com>
15671+R: Zi Yan <ziy@nvidia.com>
15672+R: Baolin Wang <baolin.wang@linux.alibaba.com>
15673+R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
15674+R: Liam R. Howlett <Liam.Howlett@oracle.com>
15675+R: Nico Pache <npache@redhat.com>
15676+R: Ryan Roberts <ryan.roberts@arm.com>
15677+R: Dev Jain <dev.jain@arm.com>
15678+L: linux-mm@kvack.org
15679+S: Maintained
15680+W: http://www.linux-mm.org
15681+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15682+F: Documentation/admin-guide/mm/transhuge.rst
15683+F: include/linux/huge_mm.h
15684+F: include/linux/khugepaged.h
15685+F: include/trace/events/huge_memory.h
15686+F: mm/huge_memory.c
15687+F: mm/khugepaged.c
15688+F: tools/testing/selftests/mm/khugepaged.c
15689+F: tools/testing/selftests/mm/split_huge_page_test.c
15690+F: tools/testing/selftests/mm/transhuge-stress.c
15691+
1551915692 MEMORY MANAGEMENT - USERFAULTFD
1552015693 M: Andrew Morton <akpm@linux-foundation.org>
1552115694 R: Peter Xu <peterx@redhat.com>
@@ -15535,10 +15708,12 @@ M: Liam R. Howlett <Liam.Howlett@oracle.com> · 13 unmodified lines
1553515708 M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
1553615709 R: Vlastimil Babka <vbabka@suse.cz>
1553715710 R: Jann Horn <jannh@google.com>
15711+R: Pedro Falcato <pfalcato@suse.de>
1553815712 L: linux-mm@kvack.org
1553915713 S: Maintained
1554015714 W: http://www.linux-mm.org
1554115715 T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15716+F: include/trace/events/mmap.h
1554215717 F: mm/mlock.c
1554315718 F: mm/mmap.c
1554415719 F: mm/mprotect.c
@@ -15549,6 +15724,36 @@ F: mm/vma.h · 4 unmodified lines
1554915724 F: mm/vma_internal.h
1555015725 F: tools/testing/vma/
1555115726
15727+MEMORY MAPPING - LOCKING
15728+M: Andrew Morton <akpm@linux-foundation.org>
15729+M: Suren Baghdasaryan <surenb@google.com>
15730+M: Liam R. Howlett <Liam.Howlett@oracle.com>
15731+M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
15732+R: Vlastimil Babka <vbabka@suse.cz>
15733+R: Shakeel Butt <shakeel.butt@linux.dev>
15734+L: linux-mm@kvack.org
15735+S: Maintained
15736+W: http://www.linux-mm.org
15737+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15738+F: Documentation/mm/process_addrs.rst
15739+F: include/linux/mmap_lock.h
15740+F: include/trace/events/mmap_lock.h
15741+F: mm/mmap_lock.c
15742+
15743+MEMORY MAPPING - MADVISE (MEMORY ADVICE)
15744+M: Andrew Morton <akpm@linux-foundation.org>
15745+M: Liam R. Howlett <Liam.Howlett@oracle.com>
15746+M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
15747+M: David Hildenbrand <david@redhat.com>
15748+R: Vlastimil Babka <vbabka@suse.cz>
15749+R: Jann Horn <jannh@google.com>
15750+L: linux-mm@kvack.org
15751+S: Maintained
15752+W: http://www.linux-mm.org
15753+T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
15754+F: include/uapi/asm-generic/mman-common.h
15755+F: mm/madvise.c
15756+
1555215757 MEMORY TECHNOLOGY DEVICES (MTD)
1555315758 M: Miquel Raynal <miquel.raynal@bootlin.com>
1555415759 M: Richard Weinberger <richard@nod.at>
@@ -16756,6 +16961,7 @@ F: Documentation/networking/net_cachelines/net_device.rst · 1201 unmodified lines
1675616961 F: drivers/connector/
1675716962 F: drivers/net/
1675816963 F: drivers/ptp/
16964+F: drivers/s390/net/
1675916965 F: include/dt-bindings/net/
1676016966 F: include/linux/cn_proc.h
1676116967 F: include/linux/etherdevice.h
@@ -16765,6 +16971,7 @@ F: include/linux/fddidevice.h · 3 unmodified lines
1676516971 F: include/linux/hippidevice.h
1676616972 F: include/linux/if_*
1676716973 F: include/linux/inetdevice.h
16974+F: include/linux/ism.h
1676816975 F: include/linux/netdev*
1676916976 F: include/linux/platform_data/wiznet.h
1677016977 F: include/uapi/linux/cn_proc.h
@@ -17368,7 +17575,7 @@ T: git git://git.infradead.org/nvme.git · 597 unmodified lines
1736817575 F: drivers/nvme/target/
1736917576
1737017577 NVMEM FRAMEWORK
17371−M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
17578+M: Srinivas Kandagatla <srini@kernel.org>
1737217579 S: Maintained
1737317580 T: git git://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git
1737417581 F: Documentation/ABI/stable/sysfs-bus-nvmem
@@ -18302,7 +18509,7 @@ F: include/uapi/linux/ppdev.h · 927 unmodified lines
1830218509 PARAVIRT_OPS INTERFACE
1830318510 M: Juergen Gross <jgross@suse.com>
1830418511 R: Ajay Kaher <ajay.kaher@broadcom.com>
18305−R: Alexey Makhalov <alexey.amakhalov@broadcom.com>
18512+R: Alexey Makhalov <alexey.makhalov@broadcom.com>
1830618513 R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
1830718514 L: virtualization@lists.linux.dev
1830818515 L: x86@kernel.org
@@ -18633,7 +18840,7 @@ F: drivers/pci/controller/pci-xgene-msi.c · 324 unmodified lines
1863318840 PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
1863418841 M: Lorenzo Pieralisi <lpieralisi@kernel.org>
1863518842 M: Krzysztof Wilczyński <kw@linux.com>
18636−R: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
18843+M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1863718844 R: Rob Herring <robh@kernel.org>
1863818845 L: linux-pci@vger.kernel.org
1863918846 S: Supported
@@ -18686,6 +18893,16 @@ F: include/asm-generic/pci* · 46 unmodified lines
1868618893 F: include/linux/of_pci.h
1868718894 F: include/linux/pci*
1868818895 F: include/uapi/linux/pci*
18896+
18897+PCI SUBSYSTEM [RUST]
18898+M: Danilo Krummrich <dakr@kernel.org>
18899+R: Bjorn Helgaas <bhelgaas@google.com>
18900+R: Krzysztof Wilczyński <kwilczynski@kernel.org>
18901+L: linux-pci@vger.kernel.org
18902+S: Maintained
18903+C: irc://irc.oftc.net/linux-pci
18904+T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git
18905+F: rust/helpers/pci.c
1868918906 F: rust/kernel/pci.rs
1869018907 F: samples/rust/rust_driver_pci.rs
1869118908
@@ -19573,7 +19790,7 @@ S: Supported · 881 unmodified lines
1957319790 F: drivers/crypto/intel/qat/
1957419791
1957519792 QCOM AUDIO (ASoC) DRIVERS
19576−M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
19793+M: Srinivas Kandagatla <srini@kernel.org>
1957719794 L: linux-sound@vger.kernel.org
1957819795 L: linux-arm-msm@vger.kernel.org
1957919796 S: Supported
@@ -19746,6 +19963,7 @@ F: drivers/media/tuners/qt1010* · 166 unmodified lines
1974619963
1974719964 QUALCOMM ATH12K WIRELESS DRIVER
1974819965 M: Jeff Johnson <jjohnson@kernel.org>
19966+L: linux-wireless@vger.kernel.org
1974919967 L: ath12k@lists.infradead.org
1975019968 S: Supported
1975119969 W: https://wireless.wiki.kernel.org/en/users/Drivers/ath12k
@@ -19755,6 +19973,7 @@ N: ath12k · 3 unmodified lines
1975519973
1975619974 QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
1975719975 M: Jeff Johnson <jjohnson@kernel.org>
19976+L: linux-wireless@vger.kernel.org
1975819977 L: ath10k@lists.infradead.org
1975919978 S: Supported
1976019979 W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
@@ -19764,6 +19983,7 @@ N: ath10k · 3 unmodified lines
1976419983
1976519984 QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
1976619985 M: Jeff Johnson <jjohnson@kernel.org>
19986+L: linux-wireless@vger.kernel.org
1976719987 L: ath11k@lists.infradead.org
1976819988 S: Supported
1976919989 W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
@@ -19873,7 +20093,7 @@ F: Documentation/devicetree/bindings/net/qcom,ethqos.yaml · 103 unmodified lines
1987320093 F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
1987420094
1987520095 QUALCOMM FASTRPC DRIVER
19876−M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
20096+M: Srinivas Kandagatla <srini@kernel.org>
1987720097 M: Amol Maheshwari <amahesh@qti.qualcomm.com>
1987820098 L: linux-arm-msm@vger.kernel.org
1987920099 L: dri-devel@lists.freedesktop.org
@@ -20451,8 +20671,8 @@ F: Documentation/devicetree/bindings/i2c/renesas,iic-emev2.yaml · 571 unmodified lines
2045120671 F: drivers/i2c/busses/i2c-emev2.c
2045220672
2045320673 RENESAS ETHERNET AVB DRIVER
20454−M: Paul Barker <paul.barker.ct@bp.renesas.com>
2045520674 M: Niklas Söderlund <niklas.soderlund@ragnatech.se>
20675+R: Paul Barker <paul@pbarker.dev>
2045620676 L: netdev@vger.kernel.org
2045720677 L: linux-renesas-soc@vger.kernel.org
2045820678 S: Maintained
@@ -21253,6 +21473,7 @@ L: linux-s390@vger.kernel.org · 794 unmodified lines
2125321473 L: netdev@vger.kernel.org
2125421474 S: Supported
2125521475 F: drivers/s390/net/
21476+F: include/linux/ism.h
2125621477
2125721478 S390 PCI SUBSYSTEM
2125821479 M: Niklas Schnelle <schnelle@linux.ibm.com>
@@ -21921,7 +22142,7 @@ S: Maintained · 662 unmodified lines
2192122142 F: drivers/media/rc/serial_ir.c
2192222143
2192322144 SERIAL LOW-POWER INTER-CHIP MEDIA BUS (SLIMbus)
21924−M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
22145+M: Srinivas Kandagatla <srini@kernel.org>
2192522146 L: linux-sound@vger.kernel.org
2192622147 S: Maintained
2192722148 F: Documentation/devicetree/bindings/slimbus/
@@ -22137,6 +22358,7 @@ F: drivers/platform/x86/touchscreen_dmi.c · 209 unmodified lines
2213722358
2213822359 SILICON LABS WIRELESS DRIVERS (for WFxxx series)
2213922360 M: Jérôme Pouiller <jerome.pouiller@silabs.com>
22361+L: linux-wireless@vger.kernel.org
2214022362 S: Supported
2214122363 F: Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
2214222364 F: drivers/net/wireless/silabs/
@@ -22237,9 +22459,7 @@ F: drivers/nvmem/layouts/sl28vpd.c · 94 unmodified lines
2223722459
2223822460 SLAB ALLOCATOR
2223922461 M: Christoph Lameter <cl@linux.com>
22240−M: Pekka Enberg <penberg@kernel.org>
2224122462 M: David Rientjes <rientjes@google.com>
22242−M: Joonsoo Kim <iamjoonsoo.kim@lge.com>
2224322463 M: Andrew Morton <akpm@linux-foundation.org>
2224422464 M: Vlastimil Babka <vbabka@suse.cz>
2224522465 R: Roman Gushchin <roman.gushchin@linux.dev>
@@ -22654,9 +22874,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git · 408 unmodified lines
2265422874 F: Documentation/devicetree/bindings/sound/
2265522875 F: Documentation/sound/soc/
2265622876 F: include/dt-bindings/sound/
22877+F: include/sound/cs-amp-lib.h
22878+F: include/sound/cs35l*
22879+F: include/sound/cs4271.h
22880+F: include/sound/cs42l*
22881+F: include/sound/madera-pdata.h
2265722882 F: include/sound/soc*
2265822883 F: include/sound/sof.h
2265922884 F: include/sound/sof/
22885+F: include/sound/wm*.h
2266022886 F: include/trace/events/sof*.h
2266122887 F: include/uapi/sound/asoc.h
2266222888 F: sound/soc/
@@ -22767,7 +22993,6 @@ F: drivers/accessibility/speakup/ · 104 unmodified lines
2276722993
2276822994 SPEAR PLATFORM/CLOCK/PINCTRL SUPPORT
2276922995 M: Viresh Kumar <vireshk@kernel.org>
22770−M: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
2277122996 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
2277222997 L: soc@lists.linux.dev
2277322998 S: Maintained
@@ -25126,9 +25351,13 @@ S: Maintained · 2352 unmodified lines
2512625351 F: drivers/usb/typec/mux/pi3usb30532.c
2512725352
2512825353 USB TYPEC PORT CONTROLLER DRIVERS
25354+M: Badhri Jagan Sridharan <badhri@google.com>
2512925355 L: linux-usb@vger.kernel.org
25130−S: Orphan
25131−F: drivers/usb/typec/tcpm/
25356+S: Maintained
25357+F: drivers/usb/typec/tcpm/tcpci.c
25358+F: drivers/usb/typec/tcpm/tcpm.c
25359+F: include/linux/usb/tcpci.h
25360+F: include/linux/usb/tcpm.h
2513225361
2513325362 USB TYPEC TUSB1046 MUX DRIVER
2513425363 M: Romain Gantois <romain.gantois@bootlin.com>
@@ -25741,7 +25970,7 @@ F: tools/testing/vsock/ · 606 unmodified lines
2574125970
2574225971 VMALLOC
2574325972 M: Andrew Morton <akpm@linux-foundation.org>
25744−R: Uladzislau Rezki <urezki@gmail.com>
25973+M: Uladzislau Rezki <urezki@gmail.com>
2574525974 L: linux-mm@kvack.org
2574625975 S: Maintained
2574725976 W: http://www.linux-mm.org
@@ -25765,7 +25994,7 @@ F: drivers/misc/vmw_balloon.c · 17 unmodified lines
2576525994
2576625995 VMWARE HYPERVISOR INTERFACE
2576725996 M: Ajay Kaher <ajay.kaher@broadcom.com>
25768−M: Alexey Makhalov <alexey.amakhalov@broadcom.com>
25997+M: Alexey Makhalov <alexey.makhalov@broadcom.com>
2576925998 R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
2577025999 L: virtualization@lists.linux.dev
2577126000 L: x86@kernel.org
@@ -25793,7 +26022,7 @@ F: drivers/scsi/vmw_pvscsi.h · 21 unmodified lines
2579326022 VMWARE VIRTUAL PTP CLOCK DRIVER
2579426023 M: Nick Shi <nick.shi@broadcom.com>
2579526024 R: Ajay Kaher <ajay.kaher@broadcom.com>
25796−R: Alexey Makhalov <alexey.amakhalov@broadcom.com>
26025+R: Alexey Makhalov <alexey.makhalov@broadcom.com>
2579726026 R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
2579826027 L: netdev@vger.kernel.org
2579926028 S: Supported
Makefile+5−8
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 6
33 PATCHLEVEL = 15
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc1
5+EXTRAVERSION =
66 NAME = Baby Opossum Posse
77
88 # *DOCUMENTATION*
@@ -477,7 +477,6 @@ export rust_common_flags := --edition=2021 \ · 468 unmodified lines
477477 -Wclippy::ignored_unit_patterns \
478478 -Wclippy::mut_mut \
479479 -Wclippy::needless_bitwise_bool \
480− -Wclippy::needless_continue \
481480 -Aclippy::needless_lifetimes \
482481 -Wclippy::no_mangle_with_rust_abi \
483482 -Wclippy::undocumented_unsafe_blocks \
@@ -1053,10 +1052,6 @@ NOSTDINC_FLAGS += -nostdinc · 569 unmodified lines
10531052 # perform bounds checking.
10541053 KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
10551054
1056−#Currently, disable -Wstringop-overflow for GCC 11, globally.
1057−KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, -Wno-stringop-overflow)
1058−KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, -Wstringop-overflow)
1059−
10601055 # disable invalid "can't wrap" optimizations for signed / pointers
10611056 KBUILD_CFLAGS += -fno-strict-overflow
10621057
@@ -1068,10 +1063,12 @@ ifdef CONFIG_CC_IS_GCC · 5 unmodified lines
10681063 KBUILD_CFLAGS += -fconserve-stack
10691064 endif
10701065
1066+# Ensure compilers do not transform certain loops into calls to wcslen()
1067+KBUILD_CFLAGS += -fno-builtin-wcslen
1068+
10711069 # change __FILE__ to the relative path to the source directory
10721070 ifdef building_out_of_srctree
1073−KBUILD_CPPFLAGS += $(call cc-option,-ffile-prefix-map=$(srcroot)/=)
1074−KBUILD_RUSTFLAGS += --remap-path-prefix=$(srcroot)/=
1071+KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srcroot)/=)
10751072 endif
10761073
10771074 # include additional Makefiles when needed
arch/arm/boot/dts/amlogic/meson8.dtsi+3−3
@@ -451,7 +451,7 @@ · 450 unmodified lines
451451 pwm_ef: pwm@86c0 {
452452 compatible = "amlogic,meson8-pwm-v2";
453453 clocks = <&xtal>,
454− <>, /* unknown/untested, the datasheet calls it "Video PLL" */
454+ <0>, /* unknown/untested, the datasheet calls it "Video PLL" */
455455 <&clkc CLKID_FCLK_DIV4>,
456456 <&clkc CLKID_FCLK_DIV3>;
457457 reg = <0x86c0 0x10>;
@@ -705,7 +705,7 @@ · 247 unmodified lines
705705 &pwm_ab {
706706 compatible = "amlogic,meson8-pwm-v2";
707707 clocks = <&xtal>,
708− <>, /* unknown/untested, the datasheet calls it "Video PLL" */
708+ <0>, /* unknown/untested, the datasheet calls it "Video PLL" */
709709 <&clkc CLKID_FCLK_DIV4>,
710710 <&clkc CLKID_FCLK_DIV3>;
711711 };
@@ -713,7 +713,7 @@ · 1 unmodified line
713713 &pwm_cd {
714714 compatible = "amlogic,meson8-pwm-v2";
715715 clocks = <&xtal>,
716− <>, /* unknown/untested, the datasheet calls it "Video PLL" */
716+ <0>, /* unknown/untested, the datasheet calls it "Video PLL" */
717717 <&clkc CLKID_FCLK_DIV4>,
718718 <&clkc CLKID_FCLK_DIV3>;
719719 };
arch/arm/boot/dts/amlogic/meson8b.dtsi+3−3
@@ -406,7 +406,7 @@ · 405 unmodified lines
406406 compatible = "amlogic,meson8b-pwm-v2", "amlogic,meson8-pwm-v2";
407407 reg = <0x86c0 0x10>;
408408 clocks = <&xtal>,
409− <>, /* unknown/untested, the datasheet calls it "Video PLL" */
409+ <0>, /* unknown/untested, the datasheet calls it "Video PLL" */
410410 <&clkc CLKID_FCLK_DIV4>,
411411 <&clkc CLKID_FCLK_DIV3>;
412412 #pwm-cells = <3>;
@@ -680,7 +680,7 @@ · 267 unmodified lines
680680 &pwm_ab {
681681 compatible = "amlogic,meson8b-pwm-v2", "amlogic,meson8-pwm-v2";
682682 clocks = <&xtal>,
683− <>, /* unknown/untested, the datasheet calls it "Video PLL" */
683+ <0>, /* unknown/untested, the datasheet calls it "Video PLL" */
684684 <&clkc CLKID_FCLK_DIV4>,
685685 <&clkc CLKID_FCLK_DIV3>;
686686 };
@@ -688,7 +688,7 @@ · 1 unmodified line
688688 &pwm_cd {
689689 compatible = "amlogic,meson8b-pwm-v2", "amlogic,meson8-pwm-v2";
690690 clocks = <&xtal>,
691− <>, /* unknown/untested, the datasheet calls it "Video PLL" */
691+ <0>, /* unknown/untested, the datasheet calls it "Video PLL" */
692692 <&clkc CLKID_FCLK_DIV4>,
693693 <&clkc CLKID_FCLK_DIV3>;
694694 };
arch/arm/boot/dts/nxp/imx/imx6ul-imx6ull-opos6ul.dtsi+3−0
@@ -40,6 +40,9 @@ · 39 unmodified lines
4040 reg = <1>;
4141 interrupt-parent = <&gpio4>;
4242 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
43+ micrel,led-mode = <1>;
44+ clocks = <&clks IMX6UL_CLK_ENET_REF>;
45+ clock-names = "rmii-ref";
4346 status = "okay";
4447 };
4548 };
arch/arm/configs/at91_dt_defconfig+0−1
@@ -232,7 +232,6 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m · 231 unmodified lines
232232 CONFIG_CRYPTO_DEV_ATMEL_AES=y
233233 CONFIG_CRYPTO_DEV_ATMEL_TDES=y
234234 CONFIG_CRYPTO_DEV_ATMEL_SHA=y
235−CONFIG_CRC_CCITT=y
236235 CONFIG_FONTS=y
237236 CONFIG_FONT_8x8=y
238237 CONFIG_FONT_ACORN_8x8=y
arch/arm/configs/collie_defconfig+0−1
@@ -78,7 +78,6 @@ CONFIG_ROMFS_FS=y · 77 unmodified lines
7878 CONFIG_NLS_DEFAULT="cp437"
7979 CONFIG_NLS_CODEPAGE_437=y
8080 CONFIG_NLS_ISO8859_1=y
81−CONFIG_CRC_CCITT=y
8281 CONFIG_FONTS=y
8382 CONFIG_FONT_MINI_4x6=y
8483 # CONFIG_DEBUG_BUGVERBOSE is not set
arch/arm/configs/davinci_all_defconfig+0−1
@@ -249,7 +249,6 @@ CONFIG_NLS_ASCII=m · 248 unmodified lines
249249 CONFIG_NLS_ISO8859_1=y
250250 CONFIG_NLS_UTF8=m
251251 # CONFIG_CRYPTO_HW is not set
252−CONFIG_CRC_T10DIF=m
253252 CONFIG_DMA_CMA=y
254253 CONFIG_DEBUG_FS=y
255254 CONFIG_DEBUG_RT_MUTEXES=y
arch/arm/configs/dove_defconfig+0−1
@@ -128,7 +128,6 @@ CONFIG_CRYPTO_DEFLATE=y · 127 unmodified lines
128128 CONFIG_CRYPTO_LZO=y
129129 # CONFIG_CRYPTO_ANSI_CPRNG is not set
130130 CONFIG_CRYPTO_DEV_MARVELL_CESA=y
131−CONFIG_CRC_CCITT=y
132131 CONFIG_PRINTK_TIME=y
133132 # CONFIG_DEBUG_BUGVERBOSE is not set
134133 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/arm/configs/exynos_defconfig+0−1
@@ -370,7 +370,6 @@ CONFIG_CRYPTO_AES_ARM_BS=m · 369 unmodified lines
370370 CONFIG_CRYPTO_CHACHA20_NEON=m
371371 CONFIG_CRYPTO_DEV_EXYNOS_RNG=y
372372 CONFIG_CRYPTO_DEV_S5P=y
373−CONFIG_CRC_CCITT=y
374373 CONFIG_DMA_CMA=y
375374 CONFIG_CMA_SIZE_MBYTES=96
376375 CONFIG_FONTS=y
arch/arm/configs/imx_v6_v7_defconfig+0−2
@@ -481,8 +481,6 @@ CONFIG_SECURITYFS=y · 480 unmodified lines
481481 CONFIG_CRYPTO_DEV_FSL_CAAM=y
482482 CONFIG_CRYPTO_DEV_SAHARA=y
483483 CONFIG_CRYPTO_DEV_MXS_DCP=y
484−CONFIG_CRC_CCITT=m
485−CONFIG_CRC_T10DIF=y
486484 CONFIG_CMA_SIZE_MBYTES=64
487485 CONFIG_FONTS=y
488486 CONFIG_FONT_8x8=y
arch/arm/configs/lpc18xx_defconfig+0−1
@@ -147,7 +147,6 @@ CONFIG_EXT2_FS=y · 146 unmodified lines
147147 # CONFIG_INOTIFY_USER is not set
148148 CONFIG_JFFS2_FS=y
149149 # CONFIG_NETWORK_FILESYSTEMS is not set
150−CONFIG_CRC_ITU_T=y
151150 CONFIG_PRINTK_TIME=y
152151 # CONFIG_ENABLE_MUST_CHECK is not set
153152 # CONFIG_DEBUG_BUGVERBOSE is not set
arch/arm/configs/lpc32xx_defconfig+0−1
@@ -179,7 +179,6 @@ CONFIG_NLS_ISO8859_1=y · 178 unmodified lines
179179 CONFIG_NLS_UTF8=y
180180 CONFIG_CRYPTO_ANSI_CPRNG=y
181181 # CONFIG_CRYPTO_HW is not set
182−CONFIG_CRC_CCITT=y
183182 CONFIG_PRINTK_TIME=y
184183 CONFIG_DYNAMIC_DEBUG=y
185184 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/arm/configs/milbeaut_m10v_defconfig+0−2
@@ -108,8 +108,6 @@ CONFIG_CRYPTO_AES_ARM_BS=m · 107 unmodified lines
108108 CONFIG_CRYPTO_AES_ARM_CE=m
109109 CONFIG_CRYPTO_CHACHA20_NEON=m
110110 # CONFIG_CRYPTO_HW is not set
111−CONFIG_CRC_CCITT=m
112−CONFIG_CRC_ITU_T=m
113111 CONFIG_DMA_CMA=y
114112 CONFIG_CMA_SIZE_MBYTES=64
115113 CONFIG_PRINTK_TIME=y
arch/arm/configs/mmp2_defconfig+0−1
@@ -67,7 +67,6 @@ CONFIG_NFS_V3=y · 66 unmodified lines
6767 CONFIG_NFS_V3_ACL=y
6868 CONFIG_NFS_V4=y
6969 CONFIG_ROOT_NFS=y
70−CONFIG_CRC_CCITT=y
7170 CONFIG_PRINTK_TIME=y
7271 CONFIG_DEBUG_KERNEL=y
7372 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/arm/configs/multi_v4t_defconfig+0−1
@@ -91,6 +91,5 @@ CONFIG_MSDOS_FS=y · 90 unmodified lines
9191 CONFIG_VFAT_FS=y
9292 CONFIG_CRAMFS=y
9393 CONFIG_MINIX_FS=y
94−CONFIG_CRC_CCITT=y
9594 # CONFIG_FTRACE is not set
9695 CONFIG_DEBUG_USER=y
arch/arm/configs/multi_v5_defconfig+0−1
@@ -289,7 +289,6 @@ CONFIG_NLS_UTF8=y · 288 unmodified lines
289289 CONFIG_CRYPTO_CBC=m
290290 CONFIG_CRYPTO_PCBC=m
291291 CONFIG_CRYPTO_DEV_MARVELL_CESA=y
292−CONFIG_CRC_CCITT=y
293292 CONFIG_DEBUG_KERNEL=y
294293 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
295294 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/mvebu_v5_defconfig+0−1
@@ -187,7 +187,6 @@ CONFIG_NLS_UTF8=y · 186 unmodified lines
187187 CONFIG_CRYPTO_CBC=m
188188 CONFIG_CRYPTO_PCBC=m
189189 CONFIG_CRYPTO_DEV_MARVELL_CESA=y
190−CONFIG_CRC_CCITT=y
191190 CONFIG_DEBUG_KERNEL=y
192191 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
193192 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/mxs_defconfig+0−1
@@ -160,7 +160,6 @@ CONFIG_NLS_CODEPAGE_850=y · 159 unmodified lines
160160 CONFIG_NLS_ISO8859_1=y
161161 CONFIG_NLS_ISO8859_15=y
162162 CONFIG_CRYPTO_DEV_MXS_DCP=y
163−CONFIG_CRC_ITU_T=m
164163 CONFIG_FONTS=y
165164 CONFIG_PRINTK_TIME=y
166165 CONFIG_DEBUG_KERNEL=y
arch/arm/configs/omap2plus_defconfig+0−3
@@ -706,9 +706,6 @@ CONFIG_CRYPTO_DEV_OMAP=m · 705 unmodified lines
706706 CONFIG_CRYPTO_DEV_OMAP_SHAM=m
707707 CONFIG_CRYPTO_DEV_OMAP_AES=m
708708 CONFIG_CRYPTO_DEV_OMAP_DES=m
709−CONFIG_CRC_CCITT=y
710−CONFIG_CRC_T10DIF=y
711−CONFIG_CRC_ITU_T=y
712709 CONFIG_DMA_CMA=y
713710 CONFIG_FONTS=y
714711 CONFIG_FONT_8x8=y
arch/arm/configs/orion5x_defconfig+0−1
@@ -136,7 +136,6 @@ CONFIG_CRYPTO_CBC=m · 135 unmodified lines
136136 CONFIG_CRYPTO_ECB=m
137137 CONFIG_CRYPTO_PCBC=m
138138 CONFIG_CRYPTO_DEV_MARVELL_CESA=y
139−CONFIG_CRC_T10DIF=y
140139 # CONFIG_DEBUG_BUGVERBOSE is not set
141140 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
142141 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/pxa168_defconfig+0−1
@@ -41,7 +41,6 @@ CONFIG_NFS_V3=y · 40 unmodified lines
4141 CONFIG_NFS_V3_ACL=y
4242 CONFIG_NFS_V4=y
4343 CONFIG_ROOT_NFS=y
44−CONFIG_CRC_CCITT=y
4544 CONFIG_PRINTK_TIME=y
4645 CONFIG_DEBUG_KERNEL=y
4746 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/arm/configs/pxa910_defconfig+0−1
@@ -50,7 +50,6 @@ CONFIG_NFS_V3=y · 49 unmodified lines
5050 CONFIG_NFS_V3_ACL=y
5151 CONFIG_NFS_V4=y
5252 CONFIG_ROOT_NFS=y
53−CONFIG_CRC_CCITT=y
5453 CONFIG_PRINTK_TIME=y
5554 CONFIG_DEBUG_KERNEL=y
5655 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/arm/configs/pxa_defconfig+0−2
@@ -663,8 +663,6 @@ CONFIG_CRYPTO_SHA1_ARM=m · 662 unmodified lines
663663 CONFIG_CRYPTO_SHA256_ARM=m
664664 CONFIG_CRYPTO_SHA512_ARM=m
665665 CONFIG_CRYPTO_AES_ARM=m
666−CONFIG_CRC_CCITT=y
667−CONFIG_CRC_T10DIF=m
668666 CONFIG_FONTS=y
669667 CONFIG_FONT_8x8=y
670668 CONFIG_FONT_8x16=y
arch/arm/configs/s5pv210_defconfig+0−1
@@ -113,7 +113,6 @@ CONFIG_NLS_CODEPAGE_437=y · 112 unmodified lines
113113 CONFIG_NLS_ASCII=y
114114 CONFIG_NLS_ISO8859_1=y
115115 CONFIG_NLS_UTF8=y
116−CONFIG_CRC_CCITT=y
117116 CONFIG_DEBUG_KERNEL=y
118117 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
119118 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/sama7_defconfig+0−2
@@ -227,8 +227,6 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m · 226 unmodified lines
227227 CONFIG_CRYPTO_DEV_ATMEL_AES=y
228228 CONFIG_CRYPTO_DEV_ATMEL_TDES=y
229229 CONFIG_CRYPTO_DEV_ATMEL_SHA=y
230−CONFIG_CRC_CCITT=y
231−CONFIG_CRC_ITU_T=y
232230 CONFIG_DMA_CMA=y
233231 CONFIG_CMA_SIZE_MBYTES=32
234232 CONFIG_CMA_ALIGNMENT=9
arch/arm/configs/spitz_defconfig+0−1
@@ -234,7 +234,6 @@ CONFIG_CRYPTO_MD4=m · 233 unmodified lines
234234 CONFIG_CRYPTO_MICHAEL_MIC=m
235235 CONFIG_CRYPTO_SHA512=m
236236 CONFIG_CRYPTO_WP512=m
237−CONFIG_CRC_CCITT=y
238237 CONFIG_FONTS=y
239238 CONFIG_FONT_8x8=y
240239 CONFIG_FONT_8x16=y
arch/arm/configs/stm32_defconfig+0−1
@@ -74,7 +74,6 @@ CONFIG_EXT3_FS=y · 73 unmodified lines
7474 # CONFIG_DNOTIFY is not set
7575 # CONFIG_INOTIFY_USER is not set
7676 CONFIG_NLS=y
77−CONFIG_CRC_ITU_T=y
7877 CONFIG_PRINTK_TIME=y
7978 # CONFIG_DEBUG_BUGVERBOSE is not set
8079 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/arm/configs/wpcm450_defconfig+0−2
@@ -191,8 +191,6 @@ CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y · 190 unmodified lines
191191 CONFIG_X509_CERTIFICATE_PARSER=y
192192 CONFIG_PKCS7_MESSAGE_PARSER=y
193193 CONFIG_SYSTEM_TRUSTED_KEYRING=y
194−CONFIG_CRC_CCITT=y
195−CONFIG_CRC_ITU_T=m
196194 CONFIG_PRINTK_TIME=y
197195 CONFIG_DEBUG_KERNEL=y
198196 CONFIG_MAGIC_SYSRQ=y
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts+19−19
@@ -152,28 +152,12 @@ · 151 unmodified lines
152152 vcc-pg-supply = <&reg_aldo1>;
153153 };
154154
155−&r_ir {
156− linux,rc-map-name = "rc-beelink-gs1";
157− status = "okay";
158−};
159−
160−&r_pio {
161− /*
162− * FIXME: We can't add that supply for now since it would
163− * create a circular dependency between pinctrl, the regulator
164− * and the RSB Bus.
165− *
166− * vcc-pl-supply = <&reg_aldo1>;
167− */
168− vcc-pm-supply = <&reg_aldo1>;
169−};
170−
171−&r_rsb {
155+&r_i2c {
172156 status = "okay";
173157
174− axp805: pmic@745 {
158+ axp805: pmic@36 {
175159 compatible = "x-powers,axp805", "x-powers,axp806";
176− reg = <0x745>;
160+ reg = <0x36>;
177161 interrupt-parent = <&r_intc>;
178162 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
179163 interrupt-controller;
@@ -291,6 +275,22 @@ · 111 unmodified lines
291275 };
292276 };
293277
278+&r_ir {
279+ linux,rc-map-name = "rc-beelink-gs1";
280+ status = "okay";
281+};
282+
283+&r_pio {
284+ /*
285+ * PL0 and PL1 are used for PMIC I2C
286+ * don't enable the pl-supply else
287+ * it will fail at boot
288+ *
289+ * vcc-pl-supply = <&reg_aldo1>;
290+ */
291+ vcc-pm-supply = <&reg_aldo1>;
292+};
293+
294294 &spdif {
295295 pinctrl-names = "default";
296296 pinctrl-0 = <&spdif_tx_pin>;
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts+7−7
@@ -176,16 +176,12 @@ · 175 unmodified lines
176176 vcc-pg-supply = <&reg_vcc_wifi_io>;
177177 };
178178
179−&r_ir {
180− status = "okay";
181−};
182−
183−&r_rsb {
179+&r_i2c {
184180 status = "okay";
185181
186− axp805: pmic@745 {
182+ axp805: pmic@36 {
187183 compatible = "x-powers,axp805", "x-powers,axp806";
188− reg = <0x745>;
184+ reg = <0x36>;
189185 interrupt-parent = <&r_intc>;
190186 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
191187 interrupt-controller;
@@ -296,6 +292,10 @@ · 104 unmodified lines
296292 };
297293 };
298294
295+&r_ir {
296+ status = "okay";
297+};
298+
299299 &rtc {
300300 clocks = <&ext_osc32k>;
301301 };
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi+11−11
@@ -113,20 +113,12 @@ · 112 unmodified lines
113113 vcc-pg-supply = <&reg_aldo1>;
114114 };
115115
116−&r_ir {
117− status = "okay";
118−};
119−
120−&r_pio {
121− vcc-pm-supply = <&reg_bldo3>;
122−};
123−
124−&r_rsb {
116+&r_i2c {
125117 status = "okay";
126118
127− axp805: pmic@745 {
119+ axp805: pmic@36 {
128120 compatible = "x-powers,axp805", "x-powers,axp806";
129− reg = <0x745>;
121+ reg = <0x36>;
130122 interrupt-parent = <&r_intc>;
131123 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
132124 interrupt-controller;
@@ -241,6 +233,14 @@ · 108 unmodified lines
241233 };
242234 };
243235
236+&r_ir {
237+ status = "okay";
238+};
239+
240+&r_pio {
241+ vcc-pm-supply = <&reg_bldo3>;
242+};
243+
244244 &rtc {
245245 clocks = <&ext_osc32k>;
246246 };
arch/arm64/boot/dts/amazon/alpine-v2.dtsi+1−1
@@ -151,7 +151,7 @@ · 150 unmodified lines
151151 al,msi-num-spis = <160>;
152152 };
153153
154− io-fabric@fc000000 {
154+ io-bus@fc000000 {
155155 compatible = "simple-bus";
156156 #address-cells = <1>;
157157 #size-cells = <1>;
arch/arm64/boot/dts/amazon/alpine-v3.dtsi+1−1
@@ -361,7 +361,7 @@ · 360 unmodified lines
361361 interrupt-parent = <&gic>;
362362 };
363363
364− io-fabric@fc000000 {
364+ io-bus@fc000000 {
365365 compatible = "simple-bus";
366366 #address-cells = <1>;
367367 #size-cells = <1>;
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi+3−3
@@ -2313,7 +2313,7 @@ · 2312 unmodified lines
23132313 "amlogic,meson8-pwm-v2";
23142314 reg = <0x0 0x19000 0x0 0x20>;
23152315 clocks = <&xtal>,
2316− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
2316+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
23172317 <&clkc CLKID_FCLK_DIV4>,
23182318 <&clkc CLKID_FCLK_DIV3>;
23192319 #pwm-cells = <3>;
@@ -2325,7 +2325,7 @@ · 5 unmodified lines
23252325 "amlogic,meson8-pwm-v2";
23262326 reg = <0x0 0x1a000 0x0 0x20>;
23272327 clocks = <&xtal>,
2328− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
2328+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
23292329 <&clkc CLKID_FCLK_DIV4>,
23302330 <&clkc CLKID_FCLK_DIV3>;
23312331 #pwm-cells = <3>;
@@ -2337,7 +2337,7 @@ · 5 unmodified lines
23372337 "amlogic,meson8-pwm-v2";
23382338 reg = <0x0 0x1b000 0x0 0x20>;
23392339 clocks = <&xtal>,
2340− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
2340+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
23412341 <&clkc CLKID_FCLK_DIV4>,
23422342 <&clkc CLKID_FCLK_DIV3>;
23432343 #pwm-cells = <3>;
arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi+4−0
@@ -116,6 +116,10 @@ · 115 unmodified lines
116116 status = "okay";
117117 };
118118
119+&clkc_audio {
120+ status = "okay";
121+};
122+
119123 &frddr_a {
120124 status = "okay";
121125 };
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi+3−3
@@ -741,7 +741,7 @@ · 740 unmodified lines
741741
742742 &pwm_ab {
743743 clocks = <&xtal>,
744− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
744+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
745745 <&clkc CLKID_FCLK_DIV4>,
746746 <&clkc CLKID_FCLK_DIV3>;
747747 };
@@ -752,14 +752,14 @@ · 4 unmodified lines
752752
753753 &pwm_cd {
754754 clocks = <&xtal>,
755− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
755+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
756756 <&clkc CLKID_FCLK_DIV4>,
757757 <&clkc CLKID_FCLK_DIV3>;
758758 };
759759
760760 &pwm_ef {
761761 clocks = <&xtal>,
762− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
762+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
763763 <&clkc CLKID_FCLK_DIV4>,
764764 <&clkc CLKID_FCLK_DIV3>;
765765 };
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi+3−3
@@ -811,7 +811,7 @@ · 810 unmodified lines
811811
812812 &pwm_ab {
813813 clocks = <&xtal>,
814− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
814+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
815815 <&clkc CLKID_FCLK_DIV4>,
816816 <&clkc CLKID_FCLK_DIV3>;
817817 };
@@ -822,14 +822,14 @@ · 4 unmodified lines
822822
823823 &pwm_cd {
824824 clocks = <&xtal>,
825− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
825+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
826826 <&clkc CLKID_FCLK_DIV4>,
827827 <&clkc CLKID_FCLK_DIV3>;
828828 };
829829
830830 &pwm_ef {
831831 clocks = <&xtal>,
832− <>, /* unknown/untested, the datasheet calls it "vid_pll" */
832+ <0>, /* unknown/untested, the datasheet calls it "vid_pll" */
833833 <&clkc CLKID_FCLK_DIV4>,
834834 <&clkc CLKID_FCLK_DIV3>;
835835 };
arch/arm64/boot/dts/apple/t8103-j293.dts+10−0
@@ -77,6 +77,16 @@ · 76 unmodified lines
7777 };
7878 };
7979
80+/*
81+ * The driver depends on boot loader initialized state which resets when this
82+ * power-domain is powered off. This happens on suspend or when the driver is
83+ * missing during boot. Mark the domain as always on until the driver can
84+ * handle this.
85+ */
86+&ps_dispdfr_be {
87+ apple,always-on;
88+};
89+
8090 &display_dfr {
8191 status = "okay";
8292 };
arch/arm64/boot/dts/apple/t8112-j493.dts+10−0
@@ -40,6 +40,16 @@ · 39 unmodified lines
4040 };
4141 };
4242
43+/*
44+ * The driver depends on boot loader initialized state which resets when this
45+ * power-domain is powered off. This happens on suspend or when the driver is
46+ * missing during boot. Mark the domain as always on until the driver can
47+ * handle this.
48+ */
49+&ps_dispdfr_be {
50+ apple,always-on;
51+};
52+
4353 &display_dfr {
4454 status = "okay";
4555 };
arch/arm64/boot/dts/arm/morello.dtsi+11−11
@@ -44,7 +44,7 @@ · 43 unmodified lines
4444 next-level-cache = <&l2_0>;
4545 clocks = <&scmi_dvfs 0>;
4646
47− l2_0: l2-cache-0 {
47+ l2_0: l2-cache {
4848 compatible = "cache";
4949 cache-level = <2>;
5050 /* 8 ways set associative */
@@ -53,13 +53,6 @@ · 2 unmodified lines
5353 cache-sets = <2048>;
5454 cache-unified;
5555 next-level-cache = <&l3_0>;
56−
57− l3_0: l3-cache {
58− compatible = "cache";
59− cache-level = <3>;
60− cache-size = <0x100000>;
61− cache-unified;
62− };
6356 };
6457 };
6558
@@ -78,7 +71,7 @@ · 12 unmodified lines
7871 next-level-cache = <&l2_1>;
7972 clocks = <&scmi_dvfs 0>;
8073
81− l2_1: l2-cache-1 {
74+ l2_1: l2-cache {
8275 compatible = "cache";
8376 cache-level = <2>;
8477 /* 8 ways set associative */
@@ -105,7 +98,7 @@ · 20 unmodified lines
10598 next-level-cache = <&l2_2>;
10699 clocks = <&scmi_dvfs 1>;
107100
108− l2_2: l2-cache-2 {
101+ l2_2: l2-cache {
109102 compatible = "cache";
110103 cache-level = <2>;
111104 /* 8 ways set associative */
@@ -132,7 +125,7 @@ · 20 unmodified lines
132125 next-level-cache = <&l2_3>;
133126 clocks = <&scmi_dvfs 1>;
134127
135− l2_3: l2-cache-3 {
128+ l2_3: l2-cache {
136129 compatible = "cache";
137130 cache-level = <2>;
138131 /* 8 ways set associative */
@@ -143,6 +136,13 @@ · 4 unmodified lines
143136 next-level-cache = <&l3_0>;
144137 };
145138 };
139+
140+ l3_0: l3-cache {
141+ compatible = "cache";
142+ cache-level = <3>;
143+ cache-size = <0x100000>;
144+ cache-unified;
145+ };
146146 };
147147
148148 firmware {
arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi+20−5
@@ -144,6 +144,19 @@ · 143 unmodified lines
144144 startup-delay-us = <20000>;
145145 };
146146
147+ reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc {
148+ compatible = "regulator-gpio";
149+ pinctrl-names = "default";
150+ pinctrl-0 = <&pinctrl_usdhc2_vsel>;
151+ gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
152+ regulator-max-microvolt = <3300000>;
153+ regulator-min-microvolt = <1800000>;
154+ states = <1800000 0x1>,
155+ <3300000 0x0>;
156+ regulator-name = "PMIC_USDHC_VSELECT";
157+ vin-supply = <&reg_nvcc_sd>;
158+ };
159+
147160 reserved-memory {
148161 #address-cells = <2>;
149162 #size-cells = <2>;
@@ -269,7 +282,7 @@ · 119 unmodified lines
269282 "SODIMM_19",
270283 "",
271284 "",
272− "",
285+ "PMIC_USDHC_VSELECT",
273286 "",
274287 "",
275288 "",
@@ -785,6 +798,7 @@ · 509 unmodified lines
785798 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_cd>;
786799 pinctrl-3 = <&pinctrl_usdhc2_sleep>, <&pinctrl_usdhc2_cd_sleep>;
787800 vmmc-supply = <&reg_usdhc2_vmmc>;
801+ vqmmc-supply = <&reg_usdhc2_vqmmc>;
788802 };
789803
790804 &wdog1 {
@@ -1206,13 +1220,17 @@ · 415 unmodified lines
12061220 <MX8MM_IOMUXC_NAND_CLE_GPIO3_IO5 0x6>; /* SODIMM 76 */
12071221 };
12081222
1223+ pinctrl_usdhc2_vsel: usdhc2vselgrp {
1224+ fsl,pins =
1225+ <MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x10>; /* PMIC_USDHC_VSELECT */
1226+ };
1227+
12091228 /*
12101229 * Note: Due to ERR050080 we use discrete external on-module resistors pulling-up to the
12111230 * on-module +V3.3_1.8_SD (LDO5) rail and explicitly disable the internal pull-ups here.
12121231 */
12131232 pinctrl_usdhc2: usdhc2grp {
12141233 fsl,pins =
1215− <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x10>,
12161234 <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x90>, /* SODIMM 78 */
12171235 <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x90>, /* SODIMM 74 */
12181236 <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x90>, /* SODIMM 80 */
@@ -1223,7 +1241,6 @@ · 4 unmodified lines
12231241
12241242 pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
12251243 fsl,pins =
1226− <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x10>,
12271244 <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x94>,
12281245 <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x94>,
12291246 <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x94>,
@@ -1234,7 +1251,6 @@ · 4 unmodified lines
12341251
12351252 pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
12361253 fsl,pins =
1237− <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x10>,
12381254 <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x96>,
12391255 <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x96>,
12401256 <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x96>,
@@ -1246,7 +1262,6 @@ · 5 unmodified lines
12461262 /* Avoid backfeeding with removed card power */
12471263 pinctrl_usdhc2_sleep: usdhc2slpgrp {
12481264 fsl,pins =
1249− <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x0>,
12501265 <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x0>,
12511266 <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x0>,
12521267 <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x0>,
arch/arm64/boot/dts/freescale/imx8mp-nominal.dtsi+28−0
@@ -24,6 +24,20 @@ · 23 unmodified lines
2424 fsl,operating-mode = "nominal";
2525 };
2626
27+&gpu2d {
28+ assigned-clocks = <&clk IMX8MP_CLK_GPU2D_CORE>;
29+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
30+ assigned-clock-rates = <800000000>;
31+};
32+
33+&gpu3d {
34+ assigned-clocks = <&clk IMX8MP_CLK_GPU3D_CORE>,
35+ <&clk IMX8MP_CLK_GPU3D_SHADER_CORE>;
36+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
37+ <&clk IMX8MP_SYS_PLL1_800M>;
38+ assigned-clock-rates = <800000000>, <800000000>;
39+};
40+
2741 &pgc_hdmimix {
2842 assigned-clocks = <&clk IMX8MP_CLK_HDMI_AXI>,
2943 <&clk IMX8MP_CLK_HDMI_APB>;
@@ -46,6 +60,18 @@ · 16 unmodified lines
4660 assigned-clock-rates = <600000000>, <300000000>;
4761 };
4862
63+&pgc_mlmix {
64+ assigned-clocks = <&clk IMX8MP_CLK_ML_CORE>,
65+ <&clk IMX8MP_CLK_ML_AXI>,
66+ <&clk IMX8MP_CLK_ML_AHB>;
67+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
68+ <&clk IMX8MP_SYS_PLL1_800M>,
69+ <&clk IMX8MP_SYS_PLL1_800M>;
70+ assigned-clock-rates = <800000000>,
71+ <800000000>,
72+ <300000000>;
73+};
74+
4975 &media_blk_ctrl {
5076 assigned-clocks = <&clk IMX8MP_CLK_MEDIA_AXI>,
5177 <&clk IMX8MP_CLK_MEDIA_APB>,
@@ -62,3 +88,5 @@ · 10 unmodified lines
6288 <0>, <0>, <400000000>,
6389 <1039500000>;
6490 };
91+
92+/delete-node/ &{noc_opp_table/opp-1000000000};
arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi+11−1
@@ -35,7 +35,6 @@ · 34 unmodified lines
3535 <0x1 0x00000000 0 0xc0000000>;
3636 };
3737
38−
3938 reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
4039 compatible = "regulator-fixed";
4140 regulator-name = "VSD_3V3";
@@ -46,6 +45,16 @@ · 4 unmodified lines
4645 startup-delay-us = <100>;
4746 off-on-delay-us = <12000>;
4847 };
48+
49+ reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc {
50+ compatible = "regulator-gpio";
51+ regulator-name = "VSD_VSEL";
52+ regulator-min-microvolt = <1800000>;
53+ regulator-max-microvolt = <3300000>;
54+ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
55+ states = <3300000 0x0 1800000 0x1>;
56+ vin-supply = <&ldo5>;
57+ };
4958 };
5059
5160 &A53_0 {
@@ -205,6 +214,7 @@ · 153 unmodified lines
205214 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
206215 cd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
207216 vmmc-supply = <&reg_usdhc2_vmmc>;
217+ vqmmc-supply = <&reg_usdhc2_vqmmc>;
208218 bus-width = <4>;
209219 status = "okay";
210220 };
arch/arm64/boot/dts/freescale/imx8mp.dtsi+6−0
@@ -1645,6 +1645,12 @@ · 1644 unmodified lines
16451645 opp-hz = /bits/ 64 <200000000>;
16461646 };
16471647
1648+ /* Nominal drive mode maximum */
1649+ opp-800000000 {
1650+ opp-hz = /bits/ 64 <800000000>;
1651+ };
1652+
1653+ /* Overdrive mode maximum */
16481654 opp-1000000000 {
16491655 opp-hz = /bits/ 64 <1000000000>;
16501656 };
arch/arm64/boot/dts/freescale/imx95.dtsi+4−4
@@ -1626,7 +1626,7 @@ · 1625 unmodified lines
16261626 reg = <0 0x4c300000 0 0x10000>,
16271627 <0 0x60100000 0 0xfe00000>,
16281628 <0 0x4c360000 0 0x10000>,
1629− <0 0x4c340000 0 0x2000>;
1629+ <0 0x4c340000 0 0x4000>;
16301630 reg-names = "dbi", "config", "atu", "app";
16311631 ranges = <0x81000000 0x0 0x00000000 0x0 0x6ff00000 0 0x00100000>,
16321632 <0x82000000 0x0 0x10000000 0x9 0x10000000 0 0x10000000>;
@@ -1673,7 +1673,7 @@ · 40 unmodified lines
16731673 reg = <0 0x4c300000 0 0x10000>,
16741674 <0 0x4c360000 0 0x1000>,
16751675 <0 0x4c320000 0 0x1000>,
1676− <0 0x4c340000 0 0x2000>,
1676+ <0 0x4c340000 0 0x4000>,
16771677 <0 0x4c370000 0 0x10000>,
16781678 <0x9 0 1 0>;
16791679 reg-names = "dbi","atu", "dbi2", "app", "dma", "addr_space";
@@ -1700,7 +1700,7 @@ · 20 unmodified lines
17001700 reg = <0 0x4c380000 0 0x10000>,
17011701 <8 0x80100000 0 0xfe00000>,
17021702 <0 0x4c3e0000 0 0x10000>,
1703− <0 0x4c3c0000 0 0x2000>;
1703+ <0 0x4c3c0000 0 0x4000>;
17041704 reg-names = "dbi", "config", "atu", "app";
17051705 ranges = <0x81000000 0 0x00000000 0x8 0x8ff00000 0 0x00100000>,
17061706 <0x82000000 0 0x10000000 0xa 0x10000000 0 0x10000000>;
@@ -1749,7 +1749,7 @@ · 42 unmodified lines
17491749 reg = <0 0x4c380000 0 0x10000>,
17501750 <0 0x4c3e0000 0 0x1000>,
17511751 <0 0x4c3a0000 0 0x1000>,
1752− <0 0x4c3c0000 0 0x2000>,
1752+ <0 0x4c3c0000 0 0x4000>,
17531753 <0 0x4c3f0000 0 0x10000>,
17541754 <0xa 0 1 0>;
17551755 reg-names = "dbi", "atu", "dbi2", "app", "dma", "addr_space";
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi+6−2
@@ -26,6 +26,8 @@ · 25 unmodified lines
2626
2727 leds {
2828 compatible = "gpio-leds";
29+ pinctrl-names = "default";
30+ pinctrl-0 = <&spi_quad_pins>;
2931
3032 led-power1 {
3133 label = "udpu:green:power";
@@ -82,8 +84,6 @@ · 50 unmodified lines
8284
8385 &spi0 {
8486 status = "okay";
85− pinctrl-names = "default";
86− pinctrl-0 = <&spi_quad_pins>;
8787
8888 flash@0 {
8989 compatible = "jedec,spi-nor";
@@ -108,6 +108,10 @@ · 18 unmodified lines
108108 };
109109 };
110110
111+&spi_quad_pins {
112+ function = "gpio";
113+};
114+
111115 &pinctrl_nb {
112116 i2c2_recovery_pins: i2c2-recovery-pins {
113117 groups = "i2c2";
arch/arm64/boot/dts/rockchip/px30-engicam-common.dtsi+1−2
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131 };
3232
3333 vcc3v3_btreg: vcc3v3-btreg {
34− compatible = "regulator-gpio";
34+ compatible = "regulator-fixed";
3535 enable-active-high;
3636 pinctrl-names = "default";
3737 pinctrl-0 = <&bt_enable_h>;
@@ -39,7 +39,6 @@ · 1 unmodified line
3939 regulator-min-microvolt = <3300000>;
4040 regulator-max-microvolt = <3300000>;
4141 regulator-always-on;
42− states = <3300000 0x0>;
4342 };
4443
4544 vcc3v3_rf_aux_mod: regulator-vcc3v3-rf-aux-mod {
arch/arm64/boot/dts/rockchip/px30-engicam-ctouch2.dtsi+1−1
@@ -26,5 +26,5 @@ · 25 unmodified lines
2626 };
2727
2828 &vcc3v3_btreg {
29− enable-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
29+ gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
3030 };
arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-edimm2.2.dts+1−1
@@ -39,5 +39,5 @@ · 38 unmodified lines
3939 };
4040
4141 &vcc3v3_btreg {
42− enable-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
42+ gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
4343 };
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi+1−1
@@ -43,7 +43,7 @@ · 42 unmodified lines
4343 sdio_pwrseq: sdio-pwrseq {
4444 compatible = "mmc-pwrseq-simple";
4545 clocks = <&rk808 1>;
46− clock-names = "lpo";
46+ clock-names = "ext_clock";
4747 pinctrl-names = "default";
4848 pinctrl-0 = <&wifi_enable_h>;
4949 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi+1−1
@@ -775,7 +775,7 @@ · 774 unmodified lines
775775 rockchip,default-sample-phase = <90>;
776776 status = "okay";
777777
778− sdio-wifi@1 {
778+ wifi@1 {
779779 compatible = "brcm,bcm4329-fmac";
780780 reg = <1>;
781781 interrupt-parent = <&gpio2>;
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts+2−0
@@ -619,6 +619,8 @@ · 618 unmodified lines
619619 bus-width = <8>;
620620 max-frequency = <200000000>;
621621 non-removable;
622+ pinctrl-names = "default";
623+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
622624 status = "okay";
623625 };
624626
arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts+1−1
@@ -610,7 +610,7 @@ · 609 unmodified lines
610610 reg = <0x51>;
611611 clock-output-names = "hym8563";
612612 interrupt-parent = <&gpio0>;
613− interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
613+ interrupts = <RK_PA0 IRQ_TYPE_LEVEL_LOW>;
614614 pinctrl-names = "default";
615615 pinctrl-0 = <&hym8563_int>;
616616 wakeup-source;
arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi+4−0
@@ -222,6 +222,10 @@ · 221 unmodified lines
222222 compatible = "realtek,rt5616";
223223 reg = <0x1b>;
224224 #sound-dai-cells = <0>;
225+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
226+ assigned-clock-rates = <12288000>;
227+ clocks = <&cru I2S0_8CH_MCLKOUT>;
228+ clock-names = "mclk";
225229 };
226230 };
227231
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi+2−0
@@ -214,6 +214,8 @@ · 213 unmodified lines
214214 };
215215
216216 &package_thermal {
217+ polling-delay = <1000>;
218+
217219 trips {
218220 package_active1: trip-active1 {
219221 temperature = <45000>;
arch/arm64/boot/dts/rockchip/rk3588j.dtsi+17−36
@@ -11,20 +11,15 @@ · 10 unmodified lines
1111 compatible = "operating-points-v2";
1212 opp-shared;
1313
14− opp-1416000000 {
15− opp-hz = /bits/ 64 <1416000000>;
14+ opp-1200000000 {
15+ opp-hz = /bits/ 64 <1200000000>;
1616 opp-microvolt = <750000 750000 950000>;
1717 clock-latency-ns = <40000>;
1818 opp-suspend;
1919 };
20− opp-1608000000 {
21− opp-hz = /bits/ 64 <1608000000>;
22− opp-microvolt = <887500 887500 950000>;
23− clock-latency-ns = <40000>;
24− };
25− opp-1704000000 {
26− opp-hz = /bits/ 64 <1704000000>;
27− opp-microvolt = <937500 937500 950000>;
20+ opp-1296000000 {
21+ opp-hz = /bits/ 64 <1296000000>;
22+ opp-microvolt = <775000 775000 950000>;
2823 clock-latency-ns = <40000>;
2924 };
3025 };
@@ -33,9 +28,14 @@ · 2 unmodified lines
3328 compatible = "operating-points-v2";
3429 opp-shared;
3530
31+ opp-1200000000{
32+ opp-hz = /bits/ 64 <1200000000>;
33+ opp-microvolt = <750000 750000 950000>;
34+ clock-latency-ns = <40000>;
35+ };
3636 opp-1416000000 {
3737 opp-hz = /bits/ 64 <1416000000>;
38− opp-microvolt = <750000 750000 950000>;
38+ opp-microvolt = <762500 762500 950000>;
3939 clock-latency-ns = <40000>;
4040 };
4141 opp-1608000000 {
@@ -43,25 +43,20 @@ · 1 unmodified line
4343 opp-microvolt = <787500 787500 950000>;
4444 clock-latency-ns = <40000>;
4545 };
46− opp-1800000000 {
47− opp-hz = /bits/ 64 <1800000000>;
48− opp-microvolt = <875000 875000 950000>;
49− clock-latency-ns = <40000>;
50− };
51− opp-2016000000 {
52− opp-hz = /bits/ 64 <2016000000>;
53− opp-microvolt = <950000 950000 950000>;
54− clock-latency-ns = <40000>;
55− };
5646 };
5747
5848 cluster2_opp_table: opp-table-cluster2 {
5949 compatible = "operating-points-v2";
6050 opp-shared;
6151
52+ opp-1200000000{
53+ opp-hz = /bits/ 64 <1200000000>;
54+ opp-microvolt = <750000 750000 950000>;
55+ clock-latency-ns = <40000>;
56+ };
6257 opp-1416000000 {
6358 opp-hz = /bits/ 64 <1416000000>;
64− opp-microvolt = <750000 750000 950000>;
59+ opp-microvolt = <762500 762500 950000>;
6560 clock-latency-ns = <40000>;
6661 };
6762 opp-1608000000 {
@@ -69,16 +64,6 @@ · 1 unmodified line
6964 opp-microvolt = <787500 787500 950000>;
7065 clock-latency-ns = <40000>;
7166 };
72− opp-1800000000 {
73− opp-hz = /bits/ 64 <1800000000>;
74− opp-microvolt = <875000 875000 950000>;
75− clock-latency-ns = <40000>;
76− };
77− opp-2016000000 {
78− opp-hz = /bits/ 64 <2016000000>;
79− opp-microvolt = <950000 950000 950000>;
80− clock-latency-ns = <40000>;
81− };
8267 };
8368
8469 gpu_opp_table: opp-table {
@@ -104,10 +89,6 @@ · 19 unmodified lines
10489 opp-hz = /bits/ 64 <700000000>;
10590 opp-microvolt = <750000 750000 850000>;
10691 };
107− opp-850000000 {
108− opp-hz = /bits/ 64 <800000000>;
109− opp-microvolt = <787500 787500 850000>;
110− };
11192 };
11293 };
11394
arch/arm64/boot/dts/st/stm32mp211.dtsi+4−4
@@ -116,11 +116,11 @@ · 115 unmodified lines
116116 };
117117
118118 intc: interrupt-controller@4ac10000 {
119− compatible = "arm,cortex-a7-gic";
119+ compatible = "arm,gic-400";
120120 reg = <0x4ac10000 0x0 0x1000>,
121− <0x4ac20000 0x0 0x2000>,
122− <0x4ac40000 0x0 0x2000>,
123− <0x4ac60000 0x0 0x2000>;
121+ <0x4ac20000 0x0 0x20000>,
122+ <0x4ac40000 0x0 0x20000>,
123+ <0x4ac60000 0x0 0x20000>;
124124 #interrupt-cells = <3>;
125125 interrupt-controller;
126126 };
arch/arm64/boot/dts/st/stm32mp231.dtsi+4−5
@@ -1201,13 +1201,12 @@ · 1200 unmodified lines
12011201 };
12021202
12031203 intc: interrupt-controller@4ac10000 {
1204− compatible = "arm,cortex-a7-gic";
1204+ compatible = "arm,gic-400";
12051205 reg = <0x4ac10000 0x1000>,
1206− <0x4ac20000 0x2000>,
1207− <0x4ac40000 0x2000>,
1208− <0x4ac60000 0x2000>;
1206+ <0x4ac20000 0x20000>,
1207+ <0x4ac40000 0x20000>,
1208+ <0x4ac60000 0x20000>;
12091209 #interrupt-cells = <3>;
1210− #address-cells = <1>;
12111210 interrupt-controller;
12121211 };
12131212 };
arch/arm64/boot/dts/st/stm32mp251.dtsi+4−5
@@ -115,14 +115,13 @@ · 114 unmodified lines
115115 };
116116
117117 intc: interrupt-controller@4ac00000 {
118− compatible = "arm,cortex-a7-gic";
118+ compatible = "arm,gic-400";
119119 #interrupt-cells = <3>;
120− #address-cells = <1>;
121120 interrupt-controller;
122121 reg = <0x0 0x4ac10000 0x0 0x1000>,
123− <0x0 0x4ac20000 0x0 0x2000>,
124− <0x0 0x4ac40000 0x0 0x2000>,
125− <0x0 0x4ac60000 0x0 0x2000>;
122+ <0x0 0x4ac20000 0x0 0x20000>,
123+ <0x0 0x4ac40000 0x0 0x20000>,
124+ <0x0 0x4ac60000 0x0 0x20000>;
126125 };
127126
128127 psci {
arch/arm64/configs/defconfig+1−1
@@ -1729,12 +1729,12 @@ CONFIG_NLS_CODEPAGE_437=y · 1728 unmodified lines
17291729 CONFIG_NLS_ISO8859_1=y
17301730 CONFIG_SECURITY=y
17311731 CONFIG_CRYPTO_USER=y
1732+CONFIG_CRYPTO_CHACHA20=m
17321733 CONFIG_CRYPTO_TEST=m
17331734 CONFIG_CRYPTO_ECHAINIV=y
17341735 CONFIG_CRYPTO_MICHAEL_MIC=m
17351736 CONFIG_CRYPTO_ANSI_CPRNG=y
17361737 CONFIG_CRYPTO_USER_API_RNG=m
1737−CONFIG_CRYPTO_CHACHA20_NEON=m
17381738 CONFIG_CRYPTO_GHASH_ARM64_CE=y
17391739 CONFIG_CRYPTO_SHA1_ARM64_CE=y
17401740 CONFIG_CRYPTO_SHA2_ARM64_CE=y
arch/arm64/include/asm/cputype.h+2−0
@@ -81,6 +81,7 @@ · 80 unmodified lines
8181 #define ARM_CPU_PART_CORTEX_A78AE 0xD42
8282 #define ARM_CPU_PART_CORTEX_X1 0xD44
8383 #define ARM_CPU_PART_CORTEX_A510 0xD46
84+#define ARM_CPU_PART_CORTEX_X1C 0xD4C
8485 #define ARM_CPU_PART_CORTEX_A520 0xD80
8586 #define ARM_CPU_PART_CORTEX_A710 0xD47
8687 #define ARM_CPU_PART_CORTEX_A715 0xD4D
@@ -168,6 +169,7 @@ · 81 unmodified lines
168169 #define MIDR_CORTEX_A78AE MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78AE)
169170 #define MIDR_CORTEX_X1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1)
170171 #define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510)
172+#define MIDR_CORTEX_X1C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1C)
171173 #define MIDR_CORTEX_A520 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A520)
172174 #define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
173175 #define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715)
arch/arm64/include/asm/el2_setup.h+1−1
@@ -52,7 +52,7 @@ · 51 unmodified lines
5252 mrs x0, id_aa64mmfr1_el1
5353 ubfx x0, x0, #ID_AA64MMFR1_EL1_HCX_SHIFT, #4
5454 cbz x0, .Lskip_hcrx_\@
55− mov_q x0, HCRX_HOST_FLAGS
55+ mov_q x0, (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En | HCRX_EL2_EnFPM)
5656
5757 /* Enable GCS if supported */
5858 mrs_s x1, SYS_ID_AA64PFR1_EL1
arch/arm64/include/asm/esr.h+42−2
@@ -121,6 +121,15 @@ · 120 unmodified lines
121121 #define ESR_ELx_FSC_SEA_TTW(n) (0x14 + (n))
122122 #define ESR_ELx_FSC_SECC (0x18)
123123 #define ESR_ELx_FSC_SECC_TTW(n) (0x1c + (n))
124+#define ESR_ELx_FSC_ADDRSZ (0x00)
125+
126+/*
127+ * Annoyingly, the negative levels for Address size faults aren't laid out
128+ * contiguously (or in the desired order)
129+ */
130+#define ESR_ELx_FSC_ADDRSZ_nL(n) ((n) == -1 ? 0x25 : 0x2C)
131+#define ESR_ELx_FSC_ADDRSZ_L(n) ((n) < 0 ? ESR_ELx_FSC_ADDRSZ_nL(n) : \
132+ (ESR_ELx_FSC_ADDRSZ + (n)))
124133
125134 /* Status codes for individual page table levels */
126135 #define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + (n))
@@ -161,8 +170,6 @@ · 34 unmodified lines
161170 #define ESR_ELx_Xs_MASK (GENMASK_ULL(4, 0))
162171
163172 /* ISS field definitions for exceptions taken in to Hyp */
164−#define ESR_ELx_FSC_ADDRSZ (0x00)
165−#define ESR_ELx_FSC_ADDRSZ_L(n) (ESR_ELx_FSC_ADDRSZ + (n))
166173 #define ESR_ELx_CV (UL(1) << 24)
167174 #define ESR_ELx_COND_SHIFT (20)
168175 #define ESR_ELx_COND_MASK (UL(0xF) << ESR_ELx_COND_SHIFT)
@@ -464,6 +471,39 @@ static inline bool esr_fsc_is_access_flag_fault(unsigned long esr) · 295 unmodified lines
464471 (esr == ESR_ELx_FSC_ACCESS_L(0));
465472 }
466473
474+static inline bool esr_fsc_is_addr_sz_fault(unsigned long esr)
475+{
476+ esr &= ESR_ELx_FSC;
477+
478+ return (esr == ESR_ELx_FSC_ADDRSZ_L(3)) ||
479+ (esr == ESR_ELx_FSC_ADDRSZ_L(2)) ||
480+ (esr == ESR_ELx_FSC_ADDRSZ_L(1)) ||
481+ (esr == ESR_ELx_FSC_ADDRSZ_L(0)) ||
482+ (esr == ESR_ELx_FSC_ADDRSZ_L(-1));
483+}
484+
485+static inline bool esr_fsc_is_sea_ttw(unsigned long esr)
486+{
487+ esr = esr & ESR_ELx_FSC;
488+
489+ return (esr == ESR_ELx_FSC_SEA_TTW(3)) ||
490+ (esr == ESR_ELx_FSC_SEA_TTW(2)) ||
491+ (esr == ESR_ELx_FSC_SEA_TTW(1)) ||
492+ (esr == ESR_ELx_FSC_SEA_TTW(0)) ||
493+ (esr == ESR_ELx_FSC_SEA_TTW(-1));
494+}
495+
496+static inline bool esr_fsc_is_secc_ttw(unsigned long esr)
497+{
498+ esr = esr & ESR_ELx_FSC;
499+
500+ return (esr == ESR_ELx_FSC_SECC_TTW(3)) ||
501+ (esr == ESR_ELx_FSC_SECC_TTW(2)) ||
502+ (esr == ESR_ELx_FSC_SECC_TTW(1)) ||
503+ (esr == ESR_ELx_FSC_SECC_TTW(0)) ||
504+ (esr == ESR_ELx_FSC_SECC_TTW(-1));
505+}
506+
467507 /* Indicate whether ESR.EC==0x1A is for an ERETAx instruction */
468508 static inline bool esr_iss_is_eretax(unsigned long esr)
469509 {
arch/arm64/include/asm/insn.h+1−0
@@ -706,6 +706,7 @@ u32 aarch64_insn_gen_cas(enum aarch64_insn_register result, · 705 unmodified lines
706706 }
707707 #endif
708708 u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type);
709+u32 aarch64_insn_gen_dsb(enum aarch64_insn_mb_type type);
709710 u32 aarch64_insn_gen_mrs(enum aarch64_insn_register result,
710711 enum aarch64_insn_system_register sysreg);
711712
arch/arm64/include/asm/kvm_arm.h+1−2
@@ -100,9 +100,8 @@ · 99 unmodified lines
100100 HCR_FMO | HCR_IMO | HCR_PTW | HCR_TID3 | HCR_TID1)
101101 #define HCR_HOST_NVHE_FLAGS (HCR_RW | HCR_API | HCR_APK | HCR_ATA)
102102 #define HCR_HOST_NVHE_PROTECTED_FLAGS (HCR_HOST_NVHE_FLAGS | HCR_TSC)
103−#define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H)
103+#define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H | HCR_AMO | HCR_IMO | HCR_FMO)
104104
105−#define HCRX_HOST_FLAGS (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En | HCRX_EL2_EnFPM)
106105 #define MPAMHCR_HOST_FLAGS 0
107106
108107 /* TCR_EL2 Registers bits */
arch/arm64/include/asm/kvm_emulate.h+6−1
@@ -305,7 +305,12 @@ static __always_inline unsigned long kvm_vcpu_get_hfar(const struct kvm_vcpu *vc · 304 unmodified lines
305305
306306 static __always_inline phys_addr_t kvm_vcpu_get_fault_ipa(const struct kvm_vcpu *vcpu)
307307 {
308− return ((phys_addr_t)vcpu->arch.fault.hpfar_el2 & HPFAR_MASK) << 8;
308+ u64 hpfar = vcpu->arch.fault.hpfar_el2;
309+
310+ if (unlikely(!(hpfar & HPFAR_EL2_NS)))
311+ return INVALID_GPA;
312+
313+ return FIELD_GET(HPFAR_EL2_FIPA, hpfar) << 12;
309314 }
310315
311316 static inline u64 kvm_vcpu_get_disr(const struct kvm_vcpu *vcpu)
arch/arm64/include/asm/kvm_host.h+5−0
@@ -1588,4 +1588,9 @@ void kvm_set_vm_id_reg(struct kvm *kvm, u32 reg, u64 val); · 1587 unmodified lines
15881588 #define kvm_has_s1poe(k) \
15891589 (kvm_has_feat((k), ID_AA64MMFR3_EL1, S1POE, IMP))
15901590
1591+static inline bool kvm_arch_has_irq_bypass(void)
1592+{
1593+ return true;
1594+}
1595+
15911596 #endif /* __ARM64_KVM_HOST_H__ */
arch/arm64/include/asm/kvm_ras.h+1−1
@@ -14,7 +14,7 @@ · 13 unmodified lines
1414 * Was this synchronous external abort a RAS notification?
1515 * Returns '0' for errors handled by some RAS subsystem, or -ENOENT.
1616 */
17−static inline int kvm_handle_guest_sea(phys_addr_t addr, u64 esr)
17+static inline int kvm_handle_guest_sea(void)
1818 {
1919 /* apei_claim_sea(NULL) expects to mask interrupts itself */
2020 lockdep_assert_irqs_enabled();
arch/arm64/include/asm/mmu.h+0−11
@@ -94,17 +94,6 @@ static inline bool kaslr_requires_kpti(void) · 93 unmodified lines
9494 return false;
9595 }
9696
97− /*
98− * Systems affected by Cavium erratum 24756 are incompatible
99− * with KPTI.
100− */
101− if (IS_ENABLED(CONFIG_CAVIUM_ERRATUM_27456)) {
102− extern const struct midr_range cavium_erratum_27456_cpus[];
103−
104− if (is_midr_in_range_list(cavium_erratum_27456_cpus))
105− return false;
106− }
107−
10897 return true;
10998 }
11099
arch/arm64/include/asm/rqspinlock.h+1−1
@@ -86,7 +86,7 @@ · 85 unmodified lines
8686
8787 #endif
8888
89−#define res_smp_cond_load_acquire_timewait(v, c) smp_cond_load_acquire_timewait(v, c, 0, 1)
89+#define res_smp_cond_load_acquire(v, c) smp_cond_load_acquire_timewait(v, c, 0, 1)
9090
9191 #include <asm-generic/rqspinlock.h>
9292
arch/arm64/include/asm/spectre.h+3−0
@@ -97,6 +97,9 @@ enum mitigation_state arm64_get_meltdown_state(void); · 96 unmodified lines
9797
9898 enum mitigation_state arm64_get_spectre_bhb_state(void);
9999 bool is_spectre_bhb_affected(const struct arm64_cpu_capabilities *entry, int scope);
100+extern bool __nospectre_bhb;
101+u8 get_spectre_bhb_loop_value(void);
102+bool is_spectre_bhb_fw_mitigated(void);
100103 void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *__unused);
101104 bool try_emulate_el1_ssbs(struct pt_regs *regs, u32 instr);
102105
arch/arm64/include/asm/vdso/gettimeofday.h+13−0
@@ -99,6 +99,19 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode, · 98 unmodified lines
9999 return res;
100100 }
101101
102+#if IS_ENABLED(CONFIG_CC_IS_GCC) && IS_ENABLED(CONFIG_PAGE_SIZE_64KB)
103+static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
104+{
105+ const struct vdso_time_data *ret = &vdso_u_time_data;
106+
107+ /* Work around invalid absolute relocations */
108+ OPTIMIZER_HIDE_VAR(ret);
109+
110+ return ret;
111+}
112+#define __arch_get_vdso_u_time_data __arch_get_vdso_u_time_data
113+#endif /* IS_ENABLED(CONFIG_CC_IS_GCC) && IS_ENABLED(CONFIG_PAGE_SIZE_64KB) */
114+
102115 #endif /* !__ASSEMBLY__ */
103116
104117 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/arm64/kernel/cpu_errata.c+1−1
@@ -335,7 +335,7 @@ static const struct midr_range cavium_erratum_23154_cpus[] = { · 334 unmodified lines
335335 #endif
336336
337337 #ifdef CONFIG_CAVIUM_ERRATUM_27456
338−const struct midr_range cavium_erratum_27456_cpus[] = {
338+static const struct midr_range cavium_erratum_27456_cpus[] = {
339339 /* Cavium ThunderX, T88 pass 1.x - 2.1 */
340340 MIDR_RANGE(MIDR_THUNDERX, 0, 0, 1, 1),
341341 /* Cavium ThunderX, T81 pass 1.0 */
arch/arm64/kernel/cpufeature.c+8−1
@@ -114,7 +114,14 @@ static struct arm64_cpu_capabilities const __ro_after_init *cpucap_ptrs[ARM64_NC · 113 unmodified lines
114114
115115 DECLARE_BITMAP(boot_cpucaps, ARM64_NCAPS);
116116
117−bool arm64_use_ng_mappings = false;
117+/*
118+ * arm64_use_ng_mappings must be placed in the .data section, otherwise it
119+ * ends up in the .bss section where it is initialized in early_map_kernel()
120+ * after the MMU (with the idmap) was enabled. create_init_idmap() - which
121+ * runs before early_map_kernel() and reads the variable via PTE_MAYBE_NG -
122+ * may end up generating an incorrect idmap page table attributes.
123+ */
124+bool arm64_use_ng_mappings __read_mostly = false;
118125 EXPORT_SYMBOL(arm64_use_ng_mappings);
119126
120127 DEFINE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector) = vectors;
arch/arm64/kernel/image-vars.h+0−4
@@ -47,10 +47,6 @@ PROVIDE(__pi_id_aa64smfr0_override = id_aa64smfr0_override); · 46 unmodified lines
4747 PROVIDE(__pi_id_aa64zfr0_override = id_aa64zfr0_override);
4848 PROVIDE(__pi_arm64_sw_feature_override = arm64_sw_feature_override);
4949 PROVIDE(__pi_arm64_use_ng_mappings = arm64_use_ng_mappings);
50−#ifdef CONFIG_CAVIUM_ERRATUM_27456
51−PROVIDE(__pi_cavium_erratum_27456_cpus = cavium_erratum_27456_cpus);
52−PROVIDE(__pi_is_midr_in_range_list = is_midr_in_range_list);
53−#endif
5450 PROVIDE(__pi__ctype = _ctype);
5551 PROVIDE(__pi_memstart_offset_seed = memstart_offset_seed);
5652
arch/arm64/kernel/pi/map_kernel.c+24−1
@@ -207,6 +207,29 @@ static void __init map_fdt(u64 fdt) · 206 unmodified lines
207207 dsb(ishst);
208208 }
209209
210+/*
211+ * PI version of the Cavium Eratum 27456 detection, which makes it
212+ * impossible to use non-global mappings.
213+ */
214+static bool __init ng_mappings_allowed(void)
215+{
216+ static const struct midr_range cavium_erratum_27456_cpus[] __initconst = {
217+ /* Cavium ThunderX, T88 pass 1.x - 2.1 */
218+ MIDR_RANGE(MIDR_THUNDERX, 0, 0, 1, 1),
219+ /* Cavium ThunderX, T81 pass 1.0 */
220+ MIDR_REV(MIDR_THUNDERX_81XX, 0, 0),
221+ {},
222+ };
223+
224+ for (const struct midr_range *r = cavium_erratum_27456_cpus; r->model; r++) {
225+ if (midr_is_cpu_model_range(read_cpuid_id(), r->model,
226+ r->rv_min, r->rv_max))
227+ return false;
228+ }
229+
230+ return true;
231+}
232+
210233 asmlinkage void __init early_map_kernel(u64 boot_status, void *fdt)
211234 {
212235 static char const chosen_str[] __initconst = "/chosen";
@@ -246,7 +269,7 @@ asmlinkage void __init early_map_kernel(u64 boot_status, void *fdt) · 33 unmodified lines
246269 u64 kaslr_seed = kaslr_early_init(fdt, chosen);
247270
248271 if (kaslr_seed && kaslr_requires_kpti())
249− arm64_use_ng_mappings = true;
272+ arm64_use_ng_mappings = ng_mappings_allowed();
250273
251274 kaslr_offset |= kaslr_seed & ~(MIN_KIMG_ALIGN - 1);
252275 }
arch/arm64/kernel/proton-pack.c+14−1
@@ -879,16 +879,19 @@ static u8 spectre_bhb_loop_affected(void) · 878 unmodified lines
879879 static const struct midr_range spectre_bhb_k132_list[] = {
880880 MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
881881 MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
882+ {},
882883 };
883884 static const struct midr_range spectre_bhb_k38_list[] = {
884885 MIDR_ALL_VERSIONS(MIDR_CORTEX_A715),
885886 MIDR_ALL_VERSIONS(MIDR_CORTEX_A720),
887+ {},
886888 };
887889 static const struct midr_range spectre_bhb_k32_list[] = {
888890 MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
889891 MIDR_ALL_VERSIONS(MIDR_CORTEX_A78AE),
890892 MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C),
891893 MIDR_ALL_VERSIONS(MIDR_CORTEX_X1),
894+ MIDR_ALL_VERSIONS(MIDR_CORTEX_X1C),
892895 MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
893896 MIDR_ALL_VERSIONS(MIDR_CORTEX_X2),
894897 MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
@@ -997,6 +1000,11 @@ bool is_spectre_bhb_affected(const struct arm64_cpu_capabilities *entry, · 102 unmodified lines
9971000 return true;
9981001 }
9991002
1003+u8 get_spectre_bhb_loop_value(void)
1004+{
1005+ return max_bhb_k;
1006+}
1007+
10001008 static void this_cpu_set_vectors(enum arm64_bp_harden_el1_vectors slot)
10011009 {
10021010 const char *v = arm64_get_bp_hardening_vector(slot);
@@ -1014,7 +1022,7 @@ static void this_cpu_set_vectors(enum arm64_bp_harden_el1_vectors slot) · 11 unmodified lines
10141022 isb();
10151023 }
10161024
1017−static bool __read_mostly __nospectre_bhb;
1025+bool __read_mostly __nospectre_bhb;
10181026 static int __init parse_spectre_bhb_param(char *str)
10191027 {
10201028 __nospectre_bhb = true;
@@ -1092,6 +1100,11 @@ void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry) · 71 unmodified lines
10921100 update_mitigation_state(&spectre_bhb_state, state);
10931101 }
10941102
1103+bool is_spectre_bhb_fw_mitigated(void)
1104+{
1105+ return test_bit(BHB_FW, &system_bhb_mitigations);
1106+}
1107+
10951108 /* Patched to NOP when enabled */
10961109 void noinstr spectre_bhb_patch_loop_mitigation_enable(struct alt_instr *alt,
10971110 __le32 *origptr,
arch/arm64/kvm/arm.c+0−5
@@ -2743,11 +2743,6 @@ bool kvm_arch_irqchip_in_kernel(struct kvm *kvm) · 2742 unmodified lines
27432743 return irqchip_in_kernel(kvm);
27442744 }
27452745
2746−bool kvm_arch_has_irq_bypass(void)
2747−{
2748− return true;
2749−}
2750−
27512746 int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
27522747 struct irq_bypass_producer *prod)
27532748 {
arch/arm64/kvm/hyp/include/hyp/fault.h+48−22
@@ -12,6 +12,16 @@ · 11 unmodified lines
1212 #include <asm/kvm_hyp.h>
1313 #include <asm/kvm_mmu.h>
1414
15+static inline bool __fault_safe_to_translate(u64 esr)
16+{
17+ u64 fsc = esr & ESR_ELx_FSC;
18+
19+ if (esr_fsc_is_sea_ttw(esr) || esr_fsc_is_secc_ttw(esr))
20+ return false;
21+
22+ return !(fsc == ESR_ELx_FSC_EXTABT && (esr & ESR_ELx_FnV));
23+}
24+
1525 static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar)
1626 {
1727 int ret;
@@ -44,34 +54,50 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar) · 26 unmodified lines
4454 return true;
4555 }
4656
47−static inline bool __get_fault_info(u64 esr, struct kvm_vcpu_fault_info *fault)
57+/*
58+ * Checks for the conditions when HPFAR_EL2 is written, per ARM ARM R_FKLWR.
59+ */
60+static inline bool __hpfar_valid(u64 esr)
4861 {
49− u64 hpfar, far;
50−
51− far = read_sysreg_el2(SYS_FAR);
52−
5362 /*
54− * The HPFAR can be invalid if the stage 2 fault did not
55− * happen during a stage 1 page table walk (the ESR_EL2.S1PTW
56− * bit is clear) and one of the two following cases are true:
57− * 1. The fault was due to a permission fault
58− * 2. The processor carries errata 834220
63+ * CPUs affected by ARM erratum #834220 may incorrectly report a
64+ * stage-2 translation fault when a stage-1 permission fault occurs.
5965 *
60− * Therefore, for all non S1PTW faults where we either have a
61− * permission fault or the errata workaround is enabled, we
62− * resolve the IPA using the AT instruction.
66+ * Re-walk the page tables to determine if a stage-1 fault actually
67+ * occurred.
6368 */
64− if (!(esr & ESR_ELx_S1PTW) &&
65− (cpus_have_final_cap(ARM64_WORKAROUND_834220) ||
66− esr_fsc_is_permission_fault(esr))) {
67− if (!__translate_far_to_hpfar(far, &hpfar))
68− return false;
69− } else {
69+ if (cpus_have_final_cap(ARM64_WORKAROUND_834220) &&
70+ esr_fsc_is_translation_fault(esr))
71+ return false;
72+
73+ if (esr_fsc_is_translation_fault(esr) || esr_fsc_is_access_flag_fault(esr))
74+ return true;
75+
76+ if ((esr & ESR_ELx_S1PTW) && esr_fsc_is_permission_fault(esr))
77+ return true;
78+
79+ return esr_fsc_is_addr_sz_fault(esr);
80+}
81+
82+static inline bool __get_fault_info(u64 esr, struct kvm_vcpu_fault_info *fault)
83+{
84+ u64 hpfar;
85+
86+ fault->far_el2 = read_sysreg_el2(SYS_FAR);
87+ fault->hpfar_el2 = 0;
88+
89+ if (__hpfar_valid(esr))
7090 hpfar = read_sysreg(hpfar_el2);
71− }
91+ else if (unlikely(!__fault_safe_to_translate(esr)))
92+ return true;
93+ else if (!__translate_far_to_hpfar(fault->far_el2, &hpfar))
94+ return false;
7295
73− fault->far_el2 = far;
74− fault->hpfar_el2 = hpfar;
96+ /*
97+ * Hijack HPFAR_EL2.NS (RES0 in Non-secure) to indicate a valid
98+ * HPFAR value.
99+ */
100+ fault->hpfar_el2 = hpfar | HPFAR_EL2_NS;
75101 return true;
76102 }
77103
arch/arm64/kvm/hyp/include/hyp/switch.h+6−7
@@ -235,6 +235,8 @@ static inline void __deactivate_traps_mpam(void) · 234 unmodified lines
235235
236236 static inline void __activate_traps_common(struct kvm_vcpu *vcpu)
237237 {
238+ struct kvm_cpu_context *hctxt = host_data_ptr(host_ctxt);
239+
238240 /* Trap on AArch32 cp15 c15 (impdef sysregs) accesses (EL1 or EL0) */
239241 write_sysreg(1 << 15, hstr_el2);
240242
@@ -245,11 +247,8 @@ static inline void __activate_traps_common(struct kvm_vcpu *vcpu) · 4 unmodified lines
245247 * EL1 instead of being trapped to EL2.
246248 */
247249 if (system_supports_pmuv3()) {
248− struct kvm_cpu_context *hctxt;
249−
250250 write_sysreg(0, pmselr_el0);
251251
252− hctxt = host_data_ptr(host_ctxt);
253252 ctxt_sys_reg(hctxt, PMUSERENR_EL0) = read_sysreg(pmuserenr_el0);
254253 write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0);
255254 vcpu_set_flag(vcpu, PMUSERENR_ON_CPU);
@@ -269,6 +268,7 @@ static inline void __activate_traps_common(struct kvm_vcpu *vcpu) · 13 unmodified lines
269268 hcrx &= ~clr;
270269 }
271270
271+ ctxt_sys_reg(hctxt, HCRX_EL2) = read_sysreg_s(SYS_HCRX_EL2);
272272 write_sysreg_s(hcrx, SYS_HCRX_EL2);
273273 }
274274
@@ -278,19 +278,18 @@ static inline void __activate_traps_common(struct kvm_vcpu *vcpu) · 3 unmodified lines
278278
279279 static inline void __deactivate_traps_common(struct kvm_vcpu *vcpu)
280280 {
281+ struct kvm_cpu_context *hctxt = host_data_ptr(host_ctxt);
282+
281283 write_sysreg(*host_data_ptr(host_debug_state.mdcr_el2), mdcr_el2);
282284
283285 write_sysreg(0, hstr_el2);
284286 if (system_supports_pmuv3()) {
285− struct kvm_cpu_context *hctxt;
286−
287− hctxt = host_data_ptr(host_ctxt);
288287 write_sysreg(ctxt_sys_reg(hctxt, PMUSERENR_EL0), pmuserenr_el0);
289288 vcpu_clear_flag(vcpu, PMUSERENR_ON_CPU);
290289 }
291290
292291 if (cpus_have_final_cap(ARM64_HAS_HCX))
293− write_sysreg_s(HCRX_HOST_FLAGS, SYS_HCRX_EL2);
292+ write_sysreg_s(ctxt_sys_reg(hctxt, HCRX_EL2), SYS_HCRX_EL2);
294293
295294 __deactivate_traps_hfgxtr(vcpu);
296295 __deactivate_traps_mpam();
arch/arm64/kvm/hyp/nvhe/ffa.c+5−4
@@ -730,10 +730,10 @@ static void do_ffa_version(struct arm_smccc_res *res, · 729 unmodified lines
730730 hyp_ffa_version = ffa_req_version;
731731 }
732732
733− if (hyp_ffa_post_init())
733+ if (hyp_ffa_post_init()) {
734734 res->a0 = FFA_RET_NOT_SUPPORTED;
735− else {
736− has_version_negotiated = true;
735+ } else {
736+ smp_store_release(&has_version_negotiated, true);
737737 res->a0 = hyp_ffa_version;
738738 }
739739 unlock:
@@ -809,7 +809,8 @@ bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt, u32 func_id) · 69 unmodified lines
809809 if (!is_ffa_call(func_id))
810810 return false;
811811
812− if (!has_version_negotiated && func_id != FFA_VERSION) {
812+ if (func_id != FFA_VERSION &&
813+ !smp_load_acquire(&has_version_negotiated)) {
813814 ffa_to_smccc_error(&res, FFA_RET_INVALID_PARAMETERS);
814815 goto out_handled;
815816 }
arch/arm64/kvm/hyp/nvhe/mem_protect.c+9−2
@@ -503,7 +503,7 @@ int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, u8 owner_id) · 502 unmodified lines
503503 {
504504 int ret;
505505
506− if (!addr_is_memory(addr))
506+ if (!range_is_memory(addr, addr + size))
507507 return -EPERM;
508508
509509 ret = host_stage2_try(kvm_pgtable_stage2_set_owner, &host_mmu.pgt,
@@ -578,7 +578,14 @@ void handle_host_mem_abort(struct kvm_cpu_context *host_ctxt) · 68 unmodified lines
578578 return;
579579 }
580580
581− addr = (fault.hpfar_el2 & HPFAR_MASK) << 8;
581+
582+ /*
583+ * Yikes, we couldn't resolve the fault IPA. This should reinject an
584+ * abort into the host when we figure out how to do that.
585+ */
586+ BUG_ON(!(fault.hpfar_el2 & HPFAR_EL2_NS));
587+ addr = FIELD_GET(HPFAR_EL2_FIPA, fault.hpfar_el2) << 12;
588+
582589 ret = host_stage2_idmap(addr);
583590 BUG_ON(ret && ret != -EAGAIN);
584591 }
arch/arm64/kvm/hyp/vgic-v3-sr.c+21−15
@@ -429,23 +429,27 @@ u64 __vgic_v3_get_gic_config(void) · 428 unmodified lines
429429 /*
430430 * To check whether we have a MMIO-based (GICv2 compatible)
431431 * CPU interface, we need to disable the system register
432− * view. To do that safely, we have to prevent any interrupt
433− * from firing (which would be deadly).
432+ * view.
434433 *
435− * Note that this only makes sense on VHE, as interrupts are
436− * already masked for nVHE as part of the exception entry to
437− * EL2.
438− */
439− if (has_vhe())
440− flags = local_daif_save();
441−
442− /*
443434 * Table 11-2 "Permitted ICC_SRE_ELx.SRE settings" indicates
444435 * that to be able to set ICC_SRE_EL1.SRE to 0, all the
445436 * interrupt overrides must be set. You've got to love this.
437+ *
438+ * As we always run VHE with HCR_xMO set, no extra xMO
439+ * manipulation is required in that case.
440+ *
441+ * To safely disable SRE, we have to prevent any interrupt
442+ * from firing (which would be deadly). This only makes sense
443+ * on VHE, as interrupts are already masked for nVHE as part
444+ * of the exception entry to EL2.
446445 */
447− sysreg_clear_set(hcr_el2, 0, HCR_AMO | HCR_FMO | HCR_IMO);
448− isb();
446+ if (has_vhe()) {
447+ flags = local_daif_save();
448+ } else {
449+ sysreg_clear_set(hcr_el2, 0, HCR_AMO | HCR_FMO | HCR_IMO);
450+ isb();
451+ }
452+
449453 write_gicreg(0, ICC_SRE_EL1);
450454 isb();
451455
@@ -453,11 +457,13 @@ u64 __vgic_v3_get_gic_config(void) · 1 unmodified line
453457
454458 write_gicreg(sre, ICC_SRE_EL1);
455459 isb();
456− sysreg_clear_set(hcr_el2, HCR_AMO | HCR_FMO | HCR_IMO, 0);
457− isb();
458460
459− if (has_vhe())
461+ if (has_vhe()) {
460462 local_daif_restore(flags);
463+ } else {
464+ sysreg_clear_set(hcr_el2, HCR_AMO | HCR_FMO | HCR_IMO, 0);
465+ isb();
466+ }
461467
462468 val = (val & ICC_SRE_EL1_SRE) ? 0 : (1ULL << 63);
463469 val |= read_gicreg(ICH_VTR_EL2);
arch/arm64/kvm/mmu.c+27−17
@@ -1501,6 +1501,11 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 1500 unmodified lines
15011501 return -EFAULT;
15021502 }
15031503
1504+ if (!is_protected_kvm_enabled())
1505+ memcache = &vcpu->arch.mmu_page_cache;
1506+ else
1507+ memcache = &vcpu->arch.pkvm_memcache;
1508+
15041509 /*
15051510 * Permission faults just need to update the existing leaf entry,
15061511 * and so normally don't require allocations from the memcache. The
@@ -1510,13 +1515,11 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 3 unmodified lines
15101515 if (!fault_is_perm || (logging_active && write_fault)) {
15111516 int min_pages = kvm_mmu_cache_min_pages(vcpu->arch.hw_mmu);
15121517
1513− if (!is_protected_kvm_enabled()) {
1514− memcache = &vcpu->arch.mmu_page_cache;
1518+ if (!is_protected_kvm_enabled())
15151519 ret = kvm_mmu_topup_memory_cache(memcache, min_pages);
1516− } else {
1517− memcache = &vcpu->arch.pkvm_memcache;
1520+ else
15181521 ret = topup_hyp_memcache(memcache, min_pages);
1519− }
1522+
15201523 if (ret)
15211524 return ret;
15221525 }
@@ -1794,9 +1797,28 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu) · 271 unmodified lines
17941797 gfn_t gfn;
17951798 int ret, idx;
17961799
1800+ /* Synchronous External Abort? */
1801+ if (kvm_vcpu_abt_issea(vcpu)) {
1802+ /*
1803+ * For RAS the host kernel may handle this abort.
1804+ * There is no need to pass the error into the guest.
1805+ */
1806+ if (kvm_handle_guest_sea())
1807+ kvm_inject_vabt(vcpu);
1808+
1809+ return 1;
1810+ }
1811+
17971812 esr = kvm_vcpu_get_esr(vcpu);
17981813
1814+ /*
1815+ * The fault IPA should be reliable at this point as we're not dealing
1816+ * with an SEA.
1817+ */
17991818 ipa = fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
1819+ if (KVM_BUG_ON(ipa == INVALID_GPA, vcpu->kvm))
1820+ return -EFAULT;
1821+
18001822 is_iabt = kvm_vcpu_trap_is_iabt(vcpu);
18011823
18021824 if (esr_fsc_is_translation_fault(esr)) {
@@ -1818,18 +1840,6 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu) · 15 unmodified lines
18181840 }
18191841 }
18201842
1821− /* Synchronous External Abort? */
1822− if (kvm_vcpu_abt_issea(vcpu)) {
1823− /*
1824− * For RAS the host kernel may handle this abort.
1825− * There is no need to pass the error into the guest.
1826− */
1827− if (kvm_handle_guest_sea(fault_ipa, kvm_vcpu_get_esr(vcpu)))
1828− kvm_inject_vabt(vcpu);
1829−
1830− return 1;
1831− }
1832−
18331843 trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_esr(vcpu),
18341844 kvm_vcpu_get_hfar(vcpu), fault_ipa);
18351845
arch/arm64/kvm/sys_regs.c+6−0
@@ -1945,6 +1945,12 @@ static int set_id_aa64pfr0_el1(struct kvm_vcpu *vcpu, · 1944 unmodified lines
19451945 if ((hw_val & mpam_mask) == (user_val & mpam_mask))
19461946 user_val &= ~ID_AA64PFR0_EL1_MPAM_MASK;
19471947
1948+ /* Fail the guest's request to disable the AA64 ISA at EL{0,1,2} */
1949+ if (!FIELD_GET(ID_AA64PFR0_EL1_EL0, user_val) ||
1950+ !FIELD_GET(ID_AA64PFR0_EL1_EL1, user_val) ||
1951+ (vcpu_has_nv(vcpu) && !FIELD_GET(ID_AA64PFR0_EL1_EL2, user_val)))
1952+ return -EINVAL;
1953+
19481954 return set_id_reg(vcpu, rd, user_val);
19491955 }
19501956
arch/arm64/lib/insn.c+37−23
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2014-2016 Zi Shen Lim <zlim.lnx@gmail.com>
77 */
8+#include <linux/bitfield.h>
89 #include <linux/bitops.h>
910 #include <linux/bug.h>
1011 #include <linux/printk.h>
@@ -1500,43 +1501,41 @@ u32 aarch64_insn_gen_extr(enum aarch64_insn_variant variant, · 1489 unmodified lines
15001501 return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, Rm);
15011502 }
15021503
1503−u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type)
1504+static u32 __get_barrier_crm_val(enum aarch64_insn_mb_type type)
15041505 {
1505− u32 opt;
1506− u32 insn;
1507−
15081506 switch (type) {
15091507 case AARCH64_INSN_MB_SY:
1510− opt = 0xf;
1511− break;
1508+ return 0xf;
15121509 case AARCH64_INSN_MB_ST:
1513− opt = 0xe;
1514− break;
1510+ return 0xe;
15151511 case AARCH64_INSN_MB_LD:
1516− opt = 0xd;
1517− break;
1512+ return 0xd;
15181513 case AARCH64_INSN_MB_ISH:
1519− opt = 0xb;
1520− break;
1514+ return 0xb;
15211515 case AARCH64_INSN_MB_ISHST:
1522− opt = 0xa;
1523− break;
1516+ return 0xa;
15241517 case AARCH64_INSN_MB_ISHLD:
1525− opt = 0x9;
1526− break;
1518+ return 0x9;
15271519 case AARCH64_INSN_MB_NSH:
1528− opt = 0x7;
1529− break;
1520+ return 0x7;
15301521 case AARCH64_INSN_MB_NSHST:
1531− opt = 0x6;
1532− break;
1522+ return 0x6;
15331523 case AARCH64_INSN_MB_NSHLD:
1534− opt = 0x5;
1535− break;
1524+ return 0x5;
15361525 default:
1537− pr_err("%s: unknown dmb type %d\n", __func__, type);
1526+ pr_err("%s: unknown barrier type %d\n", __func__, type);
15381527 return AARCH64_BREAK_FAULT;
15391528 }
1529+}
1530+
1531+u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type)
1532+{
1533+ u32 opt;
1534+ u32 insn;
1535+
1536+ opt = __get_barrier_crm_val(type);
1537+ if (opt == AARCH64_BREAK_FAULT)
1538+ return AARCH64_BREAK_FAULT;
15401539
15411540 insn = aarch64_insn_get_dmb_value();
15421541 insn &= ~GENMASK(11, 8);
@@ -1545,6 +1544,21 @@ u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type) · 2 unmodified lines
15451544 return insn;
15461545 }
15471546
1547+u32 aarch64_insn_gen_dsb(enum aarch64_insn_mb_type type)
1548+{
1549+ u32 opt, insn;
1550+
1551+ opt = __get_barrier_crm_val(type);
1552+ if (opt == AARCH64_BREAK_FAULT)
1553+ return AARCH64_BREAK_FAULT;
1554+
1555+ insn = aarch64_insn_get_dsb_base_value();
1556+ insn &= ~GENMASK(11, 8);
1557+ insn |= (opt << 8);
1558+
1559+ return insn;
1560+}
1561+
15481562 u32 aarch64_insn_gen_mrs(enum aarch64_insn_register result,
15491563 enum aarch64_insn_system_register sysreg)
15501564 {
arch/arm64/net/bpf_jit_comp.c+53−4
@@ -7,6 +7,7 @@ · 6 unmodified lines
77
88 #define pr_fmt(fmt) "bpf_jit: " fmt
99
10+#include <linux/arm-smccc.h>
1011 #include <linux/bitfield.h>
1112 #include <linux/bpf.h>
1213 #include <linux/filter.h>
@@ -17,6 +18,7 @@ · 4 unmodified lines
1718 #include <asm/asm-extable.h>
1819 #include <asm/byteorder.h>
1920 #include <asm/cacheflush.h>
21+#include <asm/cpufeature.h>
2022 #include <asm/debug-monitors.h>
2123 #include <asm/insn.h>
2224 #include <asm/text-patching.h>
@@ -939,7 +941,51 @@ static void build_plt(struct jit_ctx *ctx) · 916 unmodified lines
939941 plt->target = (u64)&dummy_tramp;
940942 }
941943
942−static void build_epilogue(struct jit_ctx *ctx)
944+/* Clobbers BPF registers 1-4, aka x0-x3 */
945+static void __maybe_unused build_bhb_mitigation(struct jit_ctx *ctx)
946+{
947+ const u8 r1 = bpf2a64[BPF_REG_1]; /* aka x0 */
948+ u8 k = get_spectre_bhb_loop_value();
949+
950+ if (!IS_ENABLED(CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY) ||
951+ cpu_mitigations_off() || __nospectre_bhb ||
952+ arm64_get_spectre_v2_state() == SPECTRE_VULNERABLE)
953+ return;
954+
955+ if (capable(CAP_SYS_ADMIN))
956+ return;
957+
958+ if (supports_clearbhb(SCOPE_SYSTEM)) {
959+ emit(aarch64_insn_gen_hint(AARCH64_INSN_HINT_CLEARBHB), ctx);
960+ return;
961+ }
962+
963+ if (k) {
964+ emit_a64_mov_i64(r1, k, ctx);
965+ emit(A64_B(1), ctx);
966+ emit(A64_SUBS_I(true, r1, r1, 1), ctx);
967+ emit(A64_B_(A64_COND_NE, -2), ctx);
968+ emit(aarch64_insn_gen_dsb(AARCH64_INSN_MB_ISH), ctx);
969+ emit(aarch64_insn_get_isb_value(), ctx);
970+ }
971+
972+ if (is_spectre_bhb_fw_mitigated()) {
973+ emit(A64_ORR_I(false, r1, AARCH64_INSN_REG_ZR,
974+ ARM_SMCCC_ARCH_WORKAROUND_3), ctx);
975+ switch (arm_smccc_1_1_get_conduit()) {
976+ case SMCCC_CONDUIT_HVC:
977+ emit(aarch64_insn_get_hvc_value(), ctx);
978+ break;
979+ case SMCCC_CONDUIT_SMC:
980+ emit(aarch64_insn_get_smc_value(), ctx);
981+ break;
982+ default:
983+ pr_err_once("Firmware mitigation enabled with unknown conduit\n");
984+ }
985+ }
986+}
987+
988+static void build_epilogue(struct jit_ctx *ctx, bool was_classic)
943989 {
944990 const u8 r0 = bpf2a64[BPF_REG_0];
945991 const u8 ptr = bpf2a64[TCCNT_PTR];
@@ -952,10 +998,13 @@ static void build_epilogue(struct jit_ctx *ctx) · 6 unmodified lines
952998
953999 emit(A64_POP(A64_ZR, ptr, A64_SP), ctx);
9541000
1001+ if (was_classic)
1002+ build_bhb_mitigation(ctx);
1003+
9551004 /* Restore FP/LR registers */
9561005 emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx);
9571006
958− /* Set return value */
1007+ /* Move the return value from bpf:r0 (aka x7) to x0 */
9591008 emit(A64_MOV(1, A64_R(0), r0), ctx);
9601009
9611010 /* Authenticate lr */
@@ -1898,7 +1947,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) · 936 unmodified lines
18981947 }
18991948
19001949 ctx.epilogue_offset = ctx.idx;
1901− build_epilogue(&ctx);
1950+ build_epilogue(&ctx, was_classic);
19021951 build_plt(&ctx);
19031952
19041953 extable_align = __alignof__(struct exception_table_entry);
@@ -1961,7 +2010,7 @@ skip_init_ctx: · 56 unmodified lines
19612010 goto out_free_hdr;
19622011 }
19632012
1964− build_epilogue(&ctx);
2013+ build_epilogue(&ctx, was_classic);
19652014 build_plt(&ctx);
19662015
19672016 /* Extra pass to validate JITed code. */
arch/arm64/tools/sysreg+7−0
@@ -3536,3 +3536,10 @@ Field 5 F · 3535 unmodified lines
35363536 Field 4 P
35373537 Field 3:0 Align
35383538 EndSysreg
3539+
3540+Sysreg HPFAR_EL2 3 4 6 0 4
3541+Field 63 NS
3542+Res0 62:48
3543+Field 47:4 FIPA
3544+Res0 3:0
3545+EndSysreg
arch/hexagon/configs/comet_defconfig+0−3
@@ -72,9 +72,6 @@ CONFIG_INET=y · 71 unmodified lines
7272 CONFIG_CRYPTO_MD5=y
7373 # CONFIG_CRYPTO_ANSI_CPRNG is not set
7474 # CONFIG_CRYPTO_HW is not set
75−CONFIG_CRC_CCITT=y
76−CONFIG_CRC16=y
77−CONFIG_CRC_T10DIF=y
7875 CONFIG_FRAME_WARN=0
7976 CONFIG_MAGIC_SYSRQ=y
8077 CONFIG_DEBUG_FS=y
arch/loongarch/Kconfig+1−0
@@ -73,6 +73,7 @@ config LOONGARCH · 72 unmodified lines
7373 select ARCH_SUPPORTS_RT
7474 select ARCH_USE_BUILTIN_BSWAP
7575 select ARCH_USE_CMPXCHG_LOCKREF
76+ select ARCH_USE_MEMTEST
7677 select ARCH_USE_QUEUED_RWLOCKS
7778 select ARCH_USE_QUEUED_SPINLOCKS
7879 select ARCH_WANT_DEFAULT_BPF_JIT
arch/loongarch/include/asm/fpu.h+23−16
@@ -22,22 +22,29 @@ · 21 unmodified lines
2222 struct sigcontext;
2323
2424 #define kernel_fpu_available() cpu_has_fpu
25−extern void kernel_fpu_begin(void);
26−extern void kernel_fpu_end(void);
27−
28−extern void _init_fpu(unsigned int);
29−extern void _save_fp(struct loongarch_fpu *);
30−extern void _restore_fp(struct loongarch_fpu *);
31−
32−extern void _save_lsx(struct loongarch_fpu *fpu);
33−extern void _restore_lsx(struct loongarch_fpu *fpu);
34−extern void _init_lsx_upper(void);
35−extern void _restore_lsx_upper(struct loongarch_fpu *fpu);
36−
37−extern void _save_lasx(struct loongarch_fpu *fpu);
38−extern void _restore_lasx(struct loongarch_fpu *fpu);
39−extern void _init_lasx_upper(void);
40−extern void _restore_lasx_upper(struct loongarch_fpu *fpu);
25+
26+void kernel_fpu_begin(void);
27+void kernel_fpu_end(void);
28+
29+asmlinkage void _init_fpu(unsigned int);
30+asmlinkage void _save_fp(struct loongarch_fpu *);
31+asmlinkage void _restore_fp(struct loongarch_fpu *);
32+asmlinkage int _save_fp_context(void __user *fpregs, void __user *fcc, void __user *csr);
33+asmlinkage int _restore_fp_context(void __user *fpregs, void __user *fcc, void __user *csr);
34+
35+asmlinkage void _save_lsx(struct loongarch_fpu *fpu);
36+asmlinkage void _restore_lsx(struct loongarch_fpu *fpu);
37+asmlinkage void _init_lsx_upper(void);
38+asmlinkage void _restore_lsx_upper(struct loongarch_fpu *fpu);
39+asmlinkage int _save_lsx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
40+asmlinkage int _restore_lsx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
41+
42+asmlinkage void _save_lasx(struct loongarch_fpu *fpu);
43+asmlinkage void _restore_lasx(struct loongarch_fpu *fpu);
44+asmlinkage void _init_lasx_upper(void);
45+asmlinkage void _restore_lasx_upper(struct loongarch_fpu *fpu);
46+asmlinkage int _save_lasx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
47+asmlinkage int _restore_lasx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
4148
4249 static inline void enable_lsx(void);
4350 static inline void disable_lsx(void);
arch/loongarch/include/asm/lbt.h+7−3
@@ -12,9 +12,13 @@ · 11 unmodified lines
1212 #include <asm/loongarch.h>
1313 #include <asm/processor.h>
1414
15−extern void _init_lbt(void);
16−extern void _save_lbt(struct loongarch_lbt *);
17−extern void _restore_lbt(struct loongarch_lbt *);
15+asmlinkage void _init_lbt(void);
16+asmlinkage void _save_lbt(struct loongarch_lbt *);
17+asmlinkage void _restore_lbt(struct loongarch_lbt *);
18+asmlinkage int _save_lbt_context(void __user *regs, void __user *eflags);
19+asmlinkage int _restore_lbt_context(void __user *regs, void __user *eflags);
20+asmlinkage int _save_ftop_context(void __user *ftop);
21+asmlinkage int _restore_ftop_context(void __user *ftop);
1822
1923 static inline int is_lbt_enabled(void)
2024 {
arch/loongarch/include/asm/ptrace.h+3−3
@@ -33,9 +33,9 @@ struct pt_regs { · 32 unmodified lines
3333 unsigned long __last[];
3434 } __aligned(8);
3535
36−static inline int regs_irqs_disabled(struct pt_regs *regs)
36+static __always_inline bool regs_irqs_disabled(struct pt_regs *regs)
3737 {
38− return arch_irqs_disabled_flags(regs->csr_prmd);
38+ return !(regs->csr_prmd & CSR_PRMD_PIE);
3939 }
4040
4141 static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
@@ -55,7 +55,7 @@ static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long v · 13 unmodified lines
5555
5656 /* Query offset/name of register from its name/offset */
5757 extern int regs_query_register_offset(const char *name);
58−#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
58+#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
5959
6060 /**
6161 * regs_get_register() - get register value from its offset
arch/loongarch/include/asm/uprobes.h+0−1
@@ -15,7 +15,6 @@ typedef u32 uprobe_opcode_t; · 14 unmodified lines
1515 #define UPROBE_XOLBP_INSN __emit_break(BRK_UPROBE_XOLBP)
1616
1717 struct arch_uprobe {
18− unsigned long resume_era;
1918 u32 insn[2];
2019 u32 ixol[2];
2120 bool simulate;
arch/loongarch/kernel/Makefile+4−4
@@ -21,10 +21,10 @@ obj-$(CONFIG_CPU_HAS_LBT) += lbt.o · 20 unmodified lines
2121
2222 obj-$(CONFIG_ARCH_STRICT_ALIGN) += unaligned.o
2323
24−CFLAGS_module.o += $(call cc-option,-Wno-override-init,)
25−CFLAGS_syscall.o += $(call cc-option,-Wno-override-init,)
26−CFLAGS_traps.o += $(call cc-option,-Wno-override-init,)
27−CFLAGS_perf_event.o += $(call cc-option,-Wno-override-init,)
24+CFLAGS_module.o += $(call cc-disable-warning, override-init)
25+CFLAGS_syscall.o += $(call cc-disable-warning, override-init)
26+CFLAGS_traps.o += $(call cc-disable-warning, override-init)
27+CFLAGS_perf_event.o += $(call cc-disable-warning, override-init)
2828
2929 ifdef CONFIG_FUNCTION_TRACER
3030 ifndef CONFIG_DYNAMIC_FTRACE
arch/loongarch/kernel/fpu.S+6−0
@@ -458,6 +458,7 @@ SYM_FUNC_START(_save_fp_context) · 457 unmodified lines
458458 li.w a0, 0 # success
459459 jr ra
460460 SYM_FUNC_END(_save_fp_context)
461+EXPORT_SYMBOL_GPL(_save_fp_context)
461462
462463 /*
463464 * a0: fpregs
@@ -471,6 +472,7 @@ SYM_FUNC_START(_restore_fp_context) · 7 unmodified lines
471472 li.w a0, 0 # success
472473 jr ra
473474 SYM_FUNC_END(_restore_fp_context)
475+EXPORT_SYMBOL_GPL(_restore_fp_context)
474476
475477 /*
476478 * a0: fpregs
@@ -484,6 +486,7 @@ SYM_FUNC_START(_save_lsx_context) · 7 unmodified lines
484486 li.w a0, 0 # success
485487 jr ra
486488 SYM_FUNC_END(_save_lsx_context)
489+EXPORT_SYMBOL_GPL(_save_lsx_context)
487490
488491 /*
489492 * a0: fpregs
@@ -497,6 +500,7 @@ SYM_FUNC_START(_restore_lsx_context) · 7 unmodified lines
497500 li.w a0, 0 # success
498501 jr ra
499502 SYM_FUNC_END(_restore_lsx_context)
503+EXPORT_SYMBOL_GPL(_restore_lsx_context)
500504
501505 /*
502506 * a0: fpregs
@@ -510,6 +514,7 @@ SYM_FUNC_START(_save_lasx_context) · 7 unmodified lines
510514 li.w a0, 0 # success
511515 jr ra
512516 SYM_FUNC_END(_save_lasx_context)
517+EXPORT_SYMBOL_GPL(_save_lasx_context)
513518
514519 /*
515520 * a0: fpregs
@@ -523,6 +528,7 @@ SYM_FUNC_START(_restore_lasx_context) · 7 unmodified lines
523528 li.w a0, 0 # success
524529 jr ra
525530 SYM_FUNC_END(_restore_lasx_context)
531+EXPORT_SYMBOL_GPL(_restore_lasx_context)
526532
527533 .L_fpu_fault:
528534 li.w a0, -EFAULT # failure
arch/loongarch/kernel/genex.S+5−2
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include <asm/stackframe.h>
1717 #include <asm/thread_info.h>
1818
19+ .section .cpuidle.text, "ax"
1920 .align 5
2021 SYM_FUNC_START(__arch_cpu_idle)
2122 /* start of idle interrupt region */
@@ -31,14 +32,16 @@ SYM_FUNC_START(__arch_cpu_idle) · 9 unmodified lines
3132 */
3233 idle 0
3334 /* end of idle interrupt region */
34−1: jr ra
35+idle_exit:
36+ jr ra
3537 SYM_FUNC_END(__arch_cpu_idle)
38+ .previous
3639
3740 SYM_CODE_START(handle_vint)
3841 UNWIND_HINT_UNDEFINED
3942 BACKUP_T0T1
4043 SAVE_ALL
41− la_abs t1, 1b
44+ la_abs t1, idle_exit
4245 LONG_L t0, sp, PT_ERA
4346 /* 3 instructions idle interrupt region */
4447 ori t0, t0, 0b1100
arch/loongarch/kernel/kfpu.c+20−2
@@ -18,11 +18,28 @@ static unsigned int euen_mask = CSR_EUEN_FPEN; · 17 unmodified lines
1818 static DEFINE_PER_CPU(bool, in_kernel_fpu);
1919 static DEFINE_PER_CPU(unsigned int, euen_current);
2020
21+static inline void fpregs_lock(void)
22+{
23+ if (IS_ENABLED(CONFIG_PREEMPT_RT))
24+ preempt_disable();
25+ else
26+ local_bh_disable();
27+}
28+
29+static inline void fpregs_unlock(void)
30+{
31+ if (IS_ENABLED(CONFIG_PREEMPT_RT))
32+ preempt_enable();
33+ else
34+ local_bh_enable();
35+}
36+
2137 void kernel_fpu_begin(void)
2238 {
2339 unsigned int *euen_curr;
2440
25− preempt_disable();
41+ if (!irqs_disabled())
42+ fpregs_lock();
2643
2744 WARN_ON(this_cpu_read(in_kernel_fpu));
2845
@@ -73,7 +90,8 @@ void kernel_fpu_end(void) · 44 unmodified lines
7390
7491 this_cpu_write(in_kernel_fpu, false);
7592
76− preempt_enable();
93+ if (!irqs_disabled())
94+ fpregs_unlock();
7795 }
7896 EXPORT_SYMBOL_GPL(kernel_fpu_end);
7997
arch/loongarch/kernel/lbt.S+4−0
@@ -90,6 +90,7 @@ SYM_FUNC_START(_save_lbt_context) · 89 unmodified lines
9090 li.w a0, 0 # success
9191 jr ra
9292 SYM_FUNC_END(_save_lbt_context)
93+EXPORT_SYMBOL_GPL(_save_lbt_context)
9394
9495 /*
9596 * a0: scr
@@ -110,6 +111,7 @@ SYM_FUNC_START(_restore_lbt_context) · 14 unmodified lines
110111 li.w a0, 0 # success
111112 jr ra
112113 SYM_FUNC_END(_restore_lbt_context)
114+EXPORT_SYMBOL_GPL(_restore_lbt_context)
113115
114116 /*
115117 * a0: ftop
@@ -120,6 +122,7 @@ SYM_FUNC_START(_save_ftop_context) · 4 unmodified lines
120122 li.w a0, 0 # success
121123 jr ra
122124 SYM_FUNC_END(_save_ftop_context)
125+EXPORT_SYMBOL_GPL(_save_ftop_context)
123126
124127 /*
125128 * a0: ftop
@@ -150,6 +153,7 @@ SYM_FUNC_START(_restore_ftop_context) · 24 unmodified lines
150153 li.w a0, 0 # success
151154 jr ra
152155 SYM_FUNC_END(_restore_ftop_context)
156+EXPORT_SYMBOL_GPL(_restore_ftop_context)
153157
154158 .L_lbt_fault:
155159 li.w a0, -EFAULT # failure
arch/loongarch/kernel/signal.c+0−21
@@ -51,27 +51,6 @@ · 50 unmodified lines
5151 #define lock_lbt_owner() ({ preempt_disable(); pagefault_disable(); })
5252 #define unlock_lbt_owner() ({ pagefault_enable(); preempt_enable(); })
5353
54−/* Assembly functions to move context to/from the FPU */
55−extern asmlinkage int
56−_save_fp_context(void __user *fpregs, void __user *fcc, void __user *csr);
57−extern asmlinkage int
58−_restore_fp_context(void __user *fpregs, void __user *fcc, void __user *csr);
59−extern asmlinkage int
60−_save_lsx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
61−extern asmlinkage int
62−_restore_lsx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
63−extern asmlinkage int
64−_save_lasx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
65−extern asmlinkage int
66−_restore_lasx_context(void __user *fpregs, void __user *fcc, void __user *fcsr);
67−
68−#ifdef CONFIG_CPU_HAS_LBT
69−extern asmlinkage int _save_lbt_context(void __user *regs, void __user *eflags);
70−extern asmlinkage int _restore_lbt_context(void __user *regs, void __user *eflags);
71−extern asmlinkage int _save_ftop_context(void __user *ftop);
72−extern asmlinkage int _restore_ftop_context(void __user *ftop);
73−#endif
74−
7554 struct rt_sigframe {
7655 struct siginfo rs_info;
7756 struct ucontext rs_uctx;
arch/loongarch/kernel/time.c+1−1
@@ -111,7 +111,7 @@ static unsigned long __init get_loops_per_jiffy(void) · 110 unmodified lines
111111 return lpj;
112112 }
113113
114−static long init_offset __nosavedata;
114+static long init_offset;
115115
116116 void save_counter(void)
117117 {
arch/loongarch/kernel/traps.c+12−8
@@ -553,9 +553,10 @@ asmlinkage void noinstr do_ale(struct pt_regs *regs) · 552 unmodified lines
553553 die_if_kernel("Kernel ale access", regs);
554554 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)regs->csr_badvaddr);
555555 #else
556+ bool pie = regs_irqs_disabled(regs);
556557 unsigned int *pc;
557558
558− if (regs->csr_prmd & CSR_PRMD_PIE)
559+ if (!pie)
559560 local_irq_enable();
560561
561562 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, regs->csr_badvaddr);
@@ -582,7 +583,7 @@ sigbus: · 20 unmodified lines
582583 die_if_kernel("Kernel ale access", regs);
583584 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)regs->csr_badvaddr);
584585 out:
585− if (regs->csr_prmd & CSR_PRMD_PIE)
586+ if (!pie)
586587 local_irq_disable();
587588 #endif
588589 irqentry_exit(regs, state);
@@ -621,12 +622,13 @@ static void bug_handler(struct pt_regs *regs) · 32 unmodified lines
621622 asmlinkage void noinstr do_bce(struct pt_regs *regs)
622623 {
623624 bool user = user_mode(regs);
625+ bool pie = regs_irqs_disabled(regs);
624626 unsigned long era = exception_era(regs);
625627 u64 badv = 0, lower = 0, upper = ULONG_MAX;
626628 union loongarch_instruction insn;
627629 irqentry_state_t state = irqentry_enter(regs);
628630
629− if (regs->csr_prmd & CSR_PRMD_PIE)
631+ if (!pie)
630632 local_irq_enable();
631633
632634 current->thread.trap_nr = read_csr_excode();
@@ -692,7 +694,7 @@ asmlinkage void noinstr do_bce(struct pt_regs *regs) · 59 unmodified lines
692694 force_sig_bnderr((void __user *)badv, (void __user *)lower, (void __user *)upper);
693695
694696 out:
695− if (regs->csr_prmd & CSR_PRMD_PIE)
697+ if (!pie)
696698 local_irq_disable();
697699
698700 irqentry_exit(regs, state);
@@ -710,11 +712,12 @@ bad_era: · 11 unmodified lines
710712 asmlinkage void noinstr do_bp(struct pt_regs *regs)
711713 {
712714 bool user = user_mode(regs);
715+ bool pie = regs_irqs_disabled(regs);
713716 unsigned int opcode, bcode;
714717 unsigned long era = exception_era(regs);
715718 irqentry_state_t state = irqentry_enter(regs);
716719
717− if (regs->csr_prmd & CSR_PRMD_PIE)
720+ if (!pie)
718721 local_irq_enable();
719722
720723 if (__get_inst(&opcode, (u32 *)era, user))
@@ -780,7 +783,7 @@ asmlinkage void noinstr do_bp(struct pt_regs *regs) · 59 unmodified lines
780783 }
781784
782785 out:
783− if (regs->csr_prmd & CSR_PRMD_PIE)
786+ if (!pie)
784787 local_irq_disable();
785788
786789 irqentry_exit(regs, state);
@@ -1015,6 +1018,7 @@ static void init_restore_lbt(void) · 228 unmodified lines
10151018
10161019 asmlinkage void noinstr do_lbt(struct pt_regs *regs)
10171020 {
1021+ bool pie = regs_irqs_disabled(regs);
10181022 irqentry_state_t state = irqentry_enter(regs);
10191023
10201024 /*
@@ -1024,7 +1028,7 @@ asmlinkage void noinstr do_lbt(struct pt_regs *regs) · 3 unmodified lines
10241028 * (including the user using 'MOVGR2GCSR' to turn on TM, which
10251029 * will not trigger the BTE), we need to check PRMD first.
10261030 */
1027− if (regs->csr_prmd & CSR_PRMD_PIE)
1031+ if (!pie)
10281032 local_irq_enable();
10291033
10301034 if (!cpu_has_lbt) {
@@ -1038,7 +1042,7 @@ asmlinkage void noinstr do_lbt(struct pt_regs *regs) · 7 unmodified lines
10381042 preempt_enable();
10391043
10401044 out:
1041− if (regs->csr_prmd & CSR_PRMD_PIE)
1045+ if (!pie)
10421046 local_irq_disable();
10431047
10441048 irqentry_exit(regs, state);
arch/loongarch/kernel/uprobes.c+1−10
@@ -42,7 +42,6 @@ int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) · 41 unmodified lines
4242 utask->autask.saved_trap_nr = current->thread.trap_nr;
4343 current->thread.trap_nr = UPROBE_TRAP_NR;
4444 instruction_pointer_set(regs, utask->xol_vaddr);
45− user_enable_single_step(current);
4645
4746 return 0;
4847 }
@@ -53,13 +52,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) · 4 unmodified lines
5352
5453 WARN_ON_ONCE(current->thread.trap_nr != UPROBE_TRAP_NR);
5554 current->thread.trap_nr = utask->autask.saved_trap_nr;
56−
57− if (auprobe->simulate)
58− instruction_pointer_set(regs, auprobe->resume_era);
59− else
60− instruction_pointer_set(regs, utask->vaddr + LOONGARCH_INSN_SIZE);
61−
62− user_disable_single_step(current);
55+ instruction_pointer_set(regs, utask->vaddr + LOONGARCH_INSN_SIZE);
6356
6457 return 0;
6558 }
@@ -70,7 +63,6 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) · 4 unmodified lines
7063
7164 current->thread.trap_nr = utask->autask.saved_trap_nr;
7265 instruction_pointer_set(regs, utask->vaddr);
73− user_disable_single_step(current);
7466 }
7567
7668 bool arch_uprobe_xol_was_trapped(struct task_struct *t)
@@ -90,7 +82,6 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) · 13 unmodified lines
9082
9183 insn.word = auprobe->insn[0];
9284 arch_simulate_insn(insn, regs);
93− auprobe->resume_era = regs->csr_era;
9485
9586 return true;
9687 }
arch/loongarch/kvm/Makefile+1−1
@@ -21,4 +21,4 @@ kvm-y += intc/eiointc.o · 20 unmodified lines
2121 kvm-y += intc/pch_pic.o
2222 kvm-y += irqfd.o
2323
24−CFLAGS_exit.o += $(call cc-option,-Wno-override-init,)
24+CFLAGS_exit.o += $(call cc-disable-warning, override-init)
arch/loongarch/kvm/intc/ipi.c+2−2
@@ -111,7 +111,7 @@ static int send_ipi_data(struct kvm_vcpu *vcpu, gpa_t addr, uint64_t data) · 110 unmodified lines
111111 ret = kvm_io_bus_read(vcpu, KVM_IOCSR_BUS, addr, sizeof(val), &val);
112112 srcu_read_unlock(&vcpu->kvm->srcu, idx);
113113 if (unlikely(ret)) {
114− kvm_err("%s: : read date from addr %llx failed\n", __func__, addr);
114+ kvm_err("%s: : read data from addr %llx failed\n", __func__, addr);
115115 return ret;
116116 }
117117 /* Construct the mask by scanning the bit 27-30 */
@@ -127,7 +127,7 @@ static int send_ipi_data(struct kvm_vcpu *vcpu, gpa_t addr, uint64_t data) · 9 unmodified lines
127127 ret = kvm_io_bus_write(vcpu, KVM_IOCSR_BUS, addr, sizeof(val), &val);
128128 srcu_read_unlock(&vcpu->kvm->srcu, idx);
129129 if (unlikely(ret))
130− kvm_err("%s: : write date to addr %llx failed\n", __func__, addr);
130+ kvm_err("%s: : write data to addr %llx failed\n", __func__, addr);
131131
132132 return ret;
133133 }
arch/loongarch/kvm/main.c+2−2
@@ -296,10 +296,10 @@ int kvm_arch_enable_virtualization_cpu(void) · 295 unmodified lines
296296 /*
297297 * Enable virtualization features granting guest direct control of
298298 * certain features:
299− * GCI=2: Trap on init or unimplement cache instruction.
299+ * GCI=2: Trap on init or unimplemented cache instruction.
300300 * TORU=0: Trap on Root Unimplement.
301301 * CACTRL=1: Root control cache.
302− * TOP=0: Trap on Previlege.
302+ * TOP=0: Trap on Privilege.
303303 * TOE=0: Trap on Exception.
304304 * TIT=0: Trap on Timer.
305305 */
arch/loongarch/kvm/vcpu.c+8−0
@@ -294,6 +294,7 @@ static int kvm_pre_enter_guest(struct kvm_vcpu *vcpu) · 293 unmodified lines
294294 vcpu->arch.aux_inuse &= ~KVM_LARCH_SWCSR_LATEST;
295295
296296 if (kvm_request_pending(vcpu) || xfer_to_guest_mode_work_pending()) {
297+ kvm_lose_pmu(vcpu);
297298 /* make sure the vcpu mode has been written */
298299 smp_store_mb(vcpu->mode, OUTSIDE_GUEST_MODE);
299300 local_irq_enable();
@@ -902,6 +903,13 @@ static int kvm_set_one_reg(struct kvm_vcpu *vcpu, · 602 unmodified lines
902903 vcpu->arch.st.guest_addr = 0;
903904 memset(&vcpu->arch.irq_pending, 0, sizeof(vcpu->arch.irq_pending));
904905 memset(&vcpu->arch.irq_clear, 0, sizeof(vcpu->arch.irq_clear));
906+
907+ /*
908+ * When vCPU reset, clear the ESTAT and GINTC registers
909+ * Other CSR registers are cleared with function _kvm_setcsr().
910+ */
911+ kvm_write_sw_gcsr(vcpu->arch.csr, LOONGARCH_CSR_GINTC, 0);
912+ kvm_write_sw_gcsr(vcpu->arch.csr, LOONGARCH_CSR_ESTAT, 0);
905913 break;
906914 default:
907915 ret = -EINVAL;
arch/loongarch/mm/hugetlbpage.c+1−1
@@ -47,7 +47,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr, · 46 unmodified lines
4747 pmd = pmd_offset(pud, addr);
4848 }
4949 }
50− return (pte_t *) pmd;
50+ return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;
5151 }
5252
5353 uint64_t pmd_to_entrylo(unsigned long pmd_val)
arch/loongarch/mm/init.c+0−3
@@ -65,9 +65,6 @@ void __init paging_init(void) · 64 unmodified lines
6565 {
6666 unsigned long max_zone_pfns[MAX_NR_ZONES];
6767
68−#ifdef CONFIG_ZONE_DMA
69− max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
70−#endif
7168 #ifdef CONFIG_ZONE_DMA32
7269 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
7370 #endif
arch/loongarch/power/hibernate.c+3−0
@@ -2,6 +2,7 @@ · 1 unmodified line
22 #include <asm/fpu.h>
33 #include <asm/loongson.h>
44 #include <asm/sections.h>
5+#include <asm/time.h>
56 #include <asm/tlbflush.h>
67 #include <linux/suspend.h>
78
@@ -14,6 +15,7 @@ struct pt_regs saved_regs; · 6 unmodified lines
1415
1516 void save_processor_state(void)
1617 {
18+ save_counter();
1719 saved_crmd = csr_read32(LOONGARCH_CSR_CRMD);
1820 saved_prmd = csr_read32(LOONGARCH_CSR_PRMD);
1921 saved_euen = csr_read32(LOONGARCH_CSR_EUEN);
@@ -26,6 +28,7 @@ void save_processor_state(void) · 6 unmodified lines
2628
2729 void restore_processor_state(void)
2830 {
31+ sync_counter();
2932 csr_write32(saved_crmd, LOONGARCH_CSR_CRMD);
3033 csr_write32(saved_prmd, LOONGARCH_CSR_PRMD);
3134 csr_write32(saved_euen, LOONGARCH_CSR_EUEN);
arch/m68k/configs/amcore_defconfig+0−1
@@ -89,4 +89,3 @@ CONFIG_PANIC_ON_OOPS=y · 88 unmodified lines
8989 # CONFIG_CRYPTO_ECHAINIV is not set
9090 CONFIG_CRYPTO_ANSI_CPRNG=y
9191 # CONFIG_CRYPTO_HW is not set
92−CONFIG_CRC16=y
arch/mips/configs/ath79_defconfig+0−1
@@ -82,7 +82,6 @@ CONFIG_LEDS_GPIO=y · 81 unmodified lines
8282 # CONFIG_IOMMU_SUPPORT is not set
8383 # CONFIG_DNOTIFY is not set
8484 # CONFIG_PROC_PAGE_MONITOR is not set
85−CONFIG_CRC_ITU_T=m
8685 CONFIG_STRIP_ASM_SYMS=y
8786 CONFIG_DEBUG_FS=y
8887 # CONFIG_SCHED_DEBUG is not set
arch/mips/configs/bigsur_defconfig+0−1
@@ -238,7 +238,6 @@ CONFIG_CRYPTO_SERPENT=m · 237 unmodified lines
238238 CONFIG_CRYPTO_TEA=m
239239 CONFIG_CRYPTO_TWOFISH=m
240240 CONFIG_CRYPTO_LZO=m
241−CONFIG_CRC_T10DIF=m
242241 CONFIG_MAGIC_SYSRQ=y
243242 CONFIG_DEBUG_MEMORY_INIT=y
244243 CONFIG_DETECT_HUNG_TASK=y
arch/mips/configs/fuloong2e_defconfig+0−1
@@ -218,4 +218,3 @@ CONFIG_CRYPTO_SEED=m · 217 unmodified lines
218218 CONFIG_CRYPTO_DEFLATE=m
219219 CONFIG_CRYPTO_LZO=m
220220 # CONFIG_CRYPTO_HW is not set
221−CONFIG_CRC_CCITT=y
arch/mips/configs/ip22_defconfig+0−1
@@ -326,5 +326,4 @@ CONFIG_CRYPTO_TEA=m · 325 unmodified lines
326326 CONFIG_CRYPTO_TWOFISH=m
327327 CONFIG_CRYPTO_LZO=m
328328 # CONFIG_CRYPTO_HW is not set
329−CONFIG_CRC_T10DIF=m
330329 CONFIG_DEBUG_MEMORY_INIT=y
arch/mips/configs/ip27_defconfig+0−1
@@ -317,4 +317,3 @@ CONFIG_CRYPTO_SERPENT=m · 316 unmodified lines
317317 CONFIG_CRYPTO_TEA=m
318318 CONFIG_CRYPTO_TWOFISH=m
319319 CONFIG_CRYPTO_LZO=m
320−CONFIG_CRC_T10DIF=m
arch/mips/configs/ip30_defconfig+0−1
@@ -179,4 +179,3 @@ CONFIG_CRYPTO_RMD160=m · 178 unmodified lines
179179 CONFIG_CRYPTO_WP512=m
180180 CONFIG_CRYPTO_XCBC=m
181181 CONFIG_CRYPTO_LZO=m
182−CONFIG_CRC_T10DIF=m
arch/mips/configs/ip32_defconfig+0−1
@@ -177,7 +177,6 @@ CONFIG_CRYPTO_SERPENT=y · 176 unmodified lines
177177 CONFIG_CRYPTO_TEA=y
178178 CONFIG_CRYPTO_TWOFISH=y
179179 CONFIG_CRYPTO_DEFLATE=y
180−CONFIG_CRC_T10DIF=y
181180 CONFIG_FONTS=y
182181 CONFIG_FONT_8x8=y
183182 CONFIG_FONT_8x16=y
arch/mips/configs/omega2p_defconfig+0−1
@@ -111,7 +111,6 @@ CONFIG_NLS_KOI8_U=y · 110 unmodified lines
111111 CONFIG_NLS_UTF8=y
112112 CONFIG_CRYPTO_DEFLATE=y
113113 CONFIG_CRYPTO_LZO=y
114−CONFIG_CRC16=y
115114 CONFIG_XZ_DEC=y
116115 CONFIG_PRINTK_TIME=y
117116 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/mips/configs/rb532_defconfig+0−1
@@ -155,5 +155,4 @@ CONFIG_JFFS2_COMPRESSION_OPTIONS=y · 154 unmodified lines
155155 CONFIG_SQUASHFS=y
156156 CONFIG_CRYPTO_TEST=m
157157 # CONFIG_CRYPTO_HW is not set
158−CONFIG_CRC16=m
159158 CONFIG_STRIP_ASM_SYMS=y
arch/mips/configs/rt305x_defconfig+0−1
@@ -128,7 +128,6 @@ CONFIG_SQUASHFS=y · 127 unmodified lines
128128 # CONFIG_SQUASHFS_ZLIB is not set
129129 CONFIG_SQUASHFS_XZ=y
130130 CONFIG_CRYPTO_ARC4=m
131−CONFIG_CRC_ITU_T=m
132131 # CONFIG_XZ_DEC_X86 is not set
133132 # CONFIG_XZ_DEC_POWERPC is not set
134133 # CONFIG_XZ_DEC_IA64 is not set
arch/mips/configs/sb1250_swarm_defconfig+0−1
@@ -99,4 +99,3 @@ CONFIG_CRYPTO_TWOFISH=m · 98 unmodified lines
9999 CONFIG_CRYPTO_DEFLATE=m
100100 CONFIG_CRYPTO_LZO=m
101101 # CONFIG_CRYPTO_HW is not set
102−CONFIG_CRC16=m
arch/mips/configs/vocore2_defconfig+0−1
@@ -111,7 +111,6 @@ CONFIG_NLS_KOI8_U=y · 110 unmodified lines
111111 CONFIG_NLS_UTF8=y
112112 CONFIG_CRYPTO_DEFLATE=y
113113 CONFIG_CRYPTO_LZO=y
114−CONFIG_CRC16=y
115114 CONFIG_XZ_DEC=y
116115 CONFIG_PRINTK_TIME=y
117116 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
arch/mips/configs/xway_defconfig+0−1
@@ -140,7 +140,6 @@ CONFIG_SQUASHFS=y · 139 unmodified lines
140140 # CONFIG_SQUASHFS_ZLIB is not set
141141 CONFIG_SQUASHFS_XZ=y
142142 CONFIG_CRYPTO_ARC4=m
143−CONFIG_CRC_ITU_T=m
144143 CONFIG_PRINTK_TIME=y
145144 CONFIG_STRIP_ASM_SYMS=y
146145 CONFIG_DEBUG_FS=y
arch/mips/include/asm/idle.h+2−3
@@ -6,11 +6,10 @@ · 5 unmodified lines
66 #include <linux/linkage.h>
77
88 extern void (*cpu_wait)(void);
9−extern void r4k_wait(void);
10−extern asmlinkage void __r4k_wait(void);
9+extern asmlinkage void r4k_wait(void);
1110 extern void r4k_wait_irqoff(void);
1211
13−static inline int using_rollback_handler(void)
12+static inline int using_skipover_handler(void)
1413 {
1514 return cpu_wait == r4k_wait;
1615 }
arch/mips/include/asm/ptrace.h+2−1
@@ -65,7 +65,8 @@ static inline void instruction_pointer_set(struct pt_regs *regs, · 64 unmodified lines
6565
6666 /* Query offset/name of register from its name/offset */
6767 extern int regs_query_register_offset(const char *name);
68−#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
68+#define MAX_REG_OFFSET \
69+ (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
6970
7071 /**
7172 * regs_get_register() - get register value from its offset
arch/mips/kernel/genex.S+41−30
@@ -104,48 +104,59 @@ handle_vcei: · 103 unmodified lines
104104
105105 __FINIT
106106
107− .align 5 /* 32 byte rollback region */
108−LEAF(__r4k_wait)
109− .set push
110− .set noreorder
111− /* start of rollback region */
112− LONG_L t0, TI_FLAGS($28)
113− nop
114− andi t0, _TIF_NEED_RESCHED
115− bnez t0, 1f
116− nop
117− nop
118− nop
119−#ifdef CONFIG_CPU_MICROMIPS
120− nop
121− nop
122− nop
123− nop
124−#endif
107+ .section .cpuidle.text,"ax"
108+ /* Align to 32 bytes for the maximum idle interrupt region size. */
109+ .align 5
110+LEAF(r4k_wait)
111+ /* Keep the ISA bit clear for calculations on local labels here. */
112+0: .fill 0
113+ /* Start of idle interrupt region. */
114+ local_irq_enable
115+ /*
116+ * If an interrupt lands here, before going idle on the next
117+ * instruction, we must *NOT* go idle since the interrupt could
118+ * have set TIF_NEED_RESCHED or caused a timer to need resched.
119+ * Fall through -- see skipover_handler below -- and have the
120+ * idle loop take care of things.
121+ */
122+1: .fill 0
123+ /* The R2 EI/EHB sequence takes 8 bytes, otherwise pad up. */
124+ .if 1b - 0b > 32
125+ .error "overlong idle interrupt region"
126+ .elseif 1b - 0b > 8
127+ .align 4
128+ .endif
129+2: .fill 0
130+ .equ r4k_wait_idle_size, 2b - 0b
131+ /* End of idle interrupt region; size has to be a power of 2. */
125132 .set MIPS_ISA_ARCH_LEVEL_RAW
133+r4k_wait_insn:
126134 wait
127− /* end of rollback region (the region size must be power of two) */
128−1:
135+r4k_wait_exit:
136+ .set mips0
137+ local_irq_disable
129138 jr ra
130− nop
131− .set pop
132− END(__r4k_wait)
139+ END(r4k_wait)
140+ .previous
133141
134− .macro BUILD_ROLLBACK_PROLOGUE handler
135− FEXPORT(rollback_\handler)
142+ .macro BUILD_SKIPOVER_PROLOGUE handler
143+ FEXPORT(skipover_\handler)
136144 .set push
137145 .set noat
138146 MFC0 k0, CP0_EPC
139− PTR_LA k1, __r4k_wait
140− ori k0, 0x1f /* 32 byte rollback region */
141− xori k0, 0x1f
147+ /* Subtract/add 2 to let the ISA bit propagate through the mask. */
148+ PTR_LA k1, r4k_wait_insn - 2
149+ ori k0, r4k_wait_idle_size - 2
150+ .set noreorder
142151 bne k0, k1, \handler
152+ PTR_ADDIU k0, r4k_wait_exit - r4k_wait_insn + 2
153+ .set reorder
143154 MTC0 k0, CP0_EPC
144155 .set pop
145156 .endm
146157
147158 .align 5
148−BUILD_ROLLBACK_PROLOGUE handle_int
159+BUILD_SKIPOVER_PROLOGUE handle_int
149160 NESTED(handle_int, PT_SIZE, sp)
150161 .cfi_signal_frame
151162 #ifdef CONFIG_TRACE_IRQFLAGS
@@ -265,7 +276,7 @@ NESTED(except_vec_ejtag_debug, 0, sp) · 113 unmodified lines
265276 * This prototype is copied to ebase + n*IntCtl.VS and patched
266277 * to invoke the handler
267278 */
268−BUILD_ROLLBACK_PROLOGUE except_vec_vi
279+BUILD_SKIPOVER_PROLOGUE except_vec_vi
269280 NESTED(except_vec_vi, 0, sp)
270281 SAVE_SOME docfi=1
271282 SAVE_AT docfi=1
arch/mips/kernel/idle.c+0−7
@@ -35,13 +35,6 @@ static void __cpuidle r3081_wait(void) · 34 unmodified lines
3535 write_c0_conf(cfg | R30XX_CONF_HALT);
3636 }
3737
38−void __cpuidle r4k_wait(void)
39−{
40− raw_local_irq_enable();
41− __r4k_wait();
42− raw_local_irq_disable();
43−}
44−
4538 /*
4639 * This variant is preferable as it allows testing need_resched and going to
4740 * sleep depending on the outcome atomically. Unfortunately the "It is
arch/mips/kernel/smp-cps.c+4−0
@@ -332,6 +332,8 @@ static void __init cps_prepare_cpus(unsigned int max_cpus) · 331 unmodified lines
332332 mips_cps_cluster_bootcfg = kcalloc(nclusters,
333333 sizeof(*mips_cps_cluster_bootcfg),
334334 GFP_KERNEL);
335+ if (!mips_cps_cluster_bootcfg)
336+ goto err_out;
335337
336338 if (nclusters > 1)
337339 mips_cm_update_property();
@@ -348,6 +350,8 @@ static void __init cps_prepare_cpus(unsigned int max_cpus) · 10 unmodified lines
348350 mips_cps_cluster_bootcfg[cl].core_power =
349351 kcalloc(BITS_TO_LONGS(ncores), sizeof(unsigned long),
350352 GFP_KERNEL);
353+ if (!mips_cps_cluster_bootcfg[cl].core_power)
354+ goto err_out;
351355
352356 /* Allocate VPE boot configuration structs */
353357 for (c = 0; c < ncores; c++) {
arch/mips/kernel/traps.c+5−5
@@ -77,7 +77,7 @@ · 76 unmodified lines
7777 #include "access-helper.h"
7878
7979 extern void check_wait(void);
80−extern asmlinkage void rollback_handle_int(void);
80+extern asmlinkage void skipover_handle_int(void);
8181 extern asmlinkage void handle_int(void);
8282 extern asmlinkage void handle_adel(void);
8383 extern asmlinkage void handle_ades(void);
@@ -2066,7 +2066,7 @@ void *set_vi_handler(int n, vi_handler_t addr) · 1982 unmodified lines
20662066 {
20672067 extern const u8 except_vec_vi[];
20682068 extern const u8 except_vec_vi_ori[], except_vec_vi_end[];
2069− extern const u8 rollback_except_vec_vi[];
2069+ extern const u8 skipover_except_vec_vi[];
20702070 unsigned long handler;
20712071 unsigned long old_handler = vi_handlers[n];
20722072 int srssets = current_cpu_data.srsets;
@@ -2095,7 +2095,7 @@ void *set_vi_handler(int n, vi_handler_t addr) · 22 unmodified lines
20952095 change_c0_srsmap(0xf << n*4, 0 << n*4);
20962096 }
20972097
2098− vec_start = using_rollback_handler() ? rollback_except_vec_vi :
2098+ vec_start = using_skipover_handler() ? skipover_except_vec_vi :
20992099 except_vec_vi;
21002100 #if defined(CONFIG_CPU_MICROMIPS) || defined(CONFIG_CPU_BIG_ENDIAN)
21012101 ori_offset = except_vec_vi_ori - vec_start + 2;
@@ -2426,8 +2426,8 @@ void __init trap_init(void) · 324 unmodified lines
24262426 if (board_be_init)
24272427 board_be_init();
24282428
2429− set_except_vector(EXCCODE_INT, using_rollback_handler() ?
2430− rollback_handle_int : handle_int);
2429+ set_except_vector(EXCCODE_INT, using_skipover_handler() ?
2430+ skipover_handle_int : handle_int);
24312431 set_except_vector(EXCCODE_MOD, handle_tlbm);
24322432 set_except_vector(EXCCODE_TLBL, handle_tlbl);
24332433 set_except_vector(EXCCODE_TLBS, handle_tlbs);
arch/openrisc/include/asm/cacheflush.h+17−0
@@ -23,6 +23,9 @@ · 22 unmodified lines
2323 */
2424 extern void local_dcache_page_flush(struct page *page);
2525 extern void local_icache_page_inv(struct page *page);
26+extern void local_dcache_range_flush(unsigned long start, unsigned long end);
27+extern void local_dcache_range_inv(unsigned long start, unsigned long end);
28+extern void local_icache_range_inv(unsigned long start, unsigned long end);
2629
2730 /*
2831 * Data cache flushing always happen on the local cpu. Instruction cache
@@ -38,6 +41,20 @@ extern void local_icache_page_inv(struct page *page); · 9 unmodified lines
3841 extern void smp_icache_page_inv(struct page *page);
3942 #endif /* CONFIG_SMP */
4043
44+/*
45+ * Even if the actual block size is larger than L1_CACHE_BYTES, paddr
46+ * can be incremented by L1_CACHE_BYTES. When paddr is written to the
47+ * invalidate register, the entire cache line encompassing this address
48+ * is invalidated. Each subsequent reference to the same cache line will
49+ * not affect the invalidation process.
50+ */
51+#define local_dcache_block_flush(addr) \
52+ local_dcache_range_flush(addr, addr + L1_CACHE_BYTES)
53+#define local_dcache_block_inv(addr) \
54+ local_dcache_range_inv(addr, addr + L1_CACHE_BYTES)
55+#define local_icache_block_inv(addr) \
56+ local_icache_range_inv(addr, addr + L1_CACHE_BYTES)
57+
4158 /*
4259 * Synchronizes caches. Whenever a cpu writes executable code to memory, this
4360 * should be called to make sure the processor sees the newly written code.
arch/openrisc/include/asm/cpuinfo.h+17−7
@@ -15,16 +15,21 @@ · 14 unmodified lines
1515 #ifndef __ASM_OPENRISC_CPUINFO_H
1616 #define __ASM_OPENRISC_CPUINFO_H
1717
18+#include <asm/spr.h>
19+#include <asm/spr_defs.h>
20+
21+struct cache_desc {
22+ u32 size;
23+ u32 sets;
24+ u32 block_size;
25+ u32 ways;
26+};
27+
1828 struct cpuinfo_or1k {
1929 u32 clock_frequency;
2030
21− u32 icache_size;
22− u32 icache_block_size;
23− u32 icache_ways;
24−
25− u32 dcache_size;
26− u32 dcache_block_size;
27− u32 dcache_ways;
31+ struct cache_desc icache;
32+ struct cache_desc dcache;
2833
2934 u16 coreid;
3035 };
@@ -32,4 +37,9 @@ struct cpuinfo_or1k { · 1 unmodified line
3237 extern struct cpuinfo_or1k cpuinfo_or1k[NR_CPUS];
3338 extern void setup_cpuinfo(void);
3439
40+/*
41+ * Check if the cache component exists.
42+ */
43+extern bool cpu_cache_is_present(const unsigned int cache_type);
44+
3545 #endif /* __ASM_OPENRISC_CPUINFO_H */
arch/openrisc/kernel/Makefile+1−1
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds · 6 unmodified lines
77
88 obj-y := head.o setup.o or32_ksyms.o process.o dma.o \
99 traps.o time.o irq.o entry.o ptrace.o signal.o \
10− sys_call_table.o unwinder.o
10+ sys_call_table.o unwinder.o cacheinfo.o
1111
1212 obj-$(CONFIG_SMP) += smp.o sync-timer.o
1313 obj-$(CONFIG_STACKTRACE) += stacktrace.o
arch/openrisc/kernel/cacheinfo.c+104−0
@@ -0,0 +1,104 @@
1+// SPDX-License-Identifier: GPL-2.0-or-later
2+/*
3+ * OpenRISC cacheinfo support
4+ *
5+ * Based on work done for MIPS and LoongArch. All original copyrights
6+ * apply as per the original source declaration.
7+ *
8+ * OpenRISC implementation:
9+ * Copyright (C) 2025 Sahil Siddiq <sahilcdq@proton.me>
10+ */
11+
12+#include <linux/cacheinfo.h>
13+#include <asm/cpuinfo.h>
14+#include <asm/spr.h>
15+#include <asm/spr_defs.h>
16+
17+static inline void ci_leaf_init(struct cacheinfo *this_leaf, enum cache_type type,
18+ unsigned int level, struct cache_desc *cache, int cpu)
19+{
20+ this_leaf->type = type;
21+ this_leaf->level = level;
22+ this_leaf->coherency_line_size = cache->block_size;
23+ this_leaf->number_of_sets = cache->sets;
24+ this_leaf->ways_of_associativity = cache->ways;
25+ this_leaf->size = cache->size;
26+ cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map);
27+}
28+
29+int init_cache_level(unsigned int cpu)
30+{
31+ struct cpuinfo_or1k *cpuinfo = &cpuinfo_or1k[smp_processor_id()];
32+ struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
33+ int leaves = 0, levels = 0;
34+ unsigned long upr = mfspr(SPR_UPR);
35+ unsigned long iccfgr, dccfgr;
36+
37+ if (!(upr & SPR_UPR_UP)) {
38+ printk(KERN_INFO
39+ "-- no UPR register... unable to detect configuration\n");
40+ return -ENOENT;
41+ }
42+
43+ if (cpu_cache_is_present(SPR_UPR_DCP)) {
44+ dccfgr = mfspr(SPR_DCCFGR);
45+ cpuinfo->dcache.ways = 1 << (dccfgr & SPR_DCCFGR_NCW);
46+ cpuinfo->dcache.sets = 1 << ((dccfgr & SPR_DCCFGR_NCS) >> 3);
47+ cpuinfo->dcache.block_size = 16 << ((dccfgr & SPR_DCCFGR_CBS) >> 7);
48+ cpuinfo->dcache.size =
49+ cpuinfo->dcache.sets * cpuinfo->dcache.ways * cpuinfo->dcache.block_size;
50+ leaves += 1;
51+ printk(KERN_INFO
52+ "-- dcache: %d bytes total, %d bytes/line, %d set(s), %d way(s)\n",
53+ cpuinfo->dcache.size, cpuinfo->dcache.block_size,
54+ cpuinfo->dcache.sets, cpuinfo->dcache.ways);
55+ } else
56+ printk(KERN_INFO "-- dcache disabled\n");
57+
58+ if (cpu_cache_is_present(SPR_UPR_ICP)) {
59+ iccfgr = mfspr(SPR_ICCFGR);
60+ cpuinfo->icache.ways = 1 << (iccfgr & SPR_ICCFGR_NCW);
61+ cpuinfo->icache.sets = 1 << ((iccfgr & SPR_ICCFGR_NCS) >> 3);
62+ cpuinfo->icache.block_size = 16 << ((iccfgr & SPR_ICCFGR_CBS) >> 7);
63+ cpuinfo->icache.size =
64+ cpuinfo->icache.sets * cpuinfo->icache.ways * cpuinfo->icache.block_size;
65+ leaves += 1;
66+ printk(KERN_INFO
67+ "-- icache: %d bytes total, %d bytes/line, %d set(s), %d way(s)\n",
68+ cpuinfo->icache.size, cpuinfo->icache.block_size,
69+ cpuinfo->icache.sets, cpuinfo->icache.ways);
70+ } else
71+ printk(KERN_INFO "-- icache disabled\n");
72+
73+ if (!leaves)
74+ return -ENOENT;
75+
76+ levels = 1;
77+
78+ this_cpu_ci->num_leaves = leaves;
79+ this_cpu_ci->num_levels = levels;
80+
81+ return 0;
82+}
83+
84+int populate_cache_leaves(unsigned int cpu)
85+{
86+ struct cpuinfo_or1k *cpuinfo = &cpuinfo_or1k[smp_processor_id()];
87+ struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
88+ struct cacheinfo *this_leaf = this_cpu_ci->info_list;
89+ int level = 1;
90+
91+ if (cpu_cache_is_present(SPR_UPR_DCP)) {
92+ ci_leaf_init(this_leaf, CACHE_TYPE_DATA, level, &cpuinfo->dcache, cpu);
93+ this_leaf->attributes = ((mfspr(SPR_DCCFGR) & SPR_DCCFGR_CWS) >> 8) ?
94+ CACHE_WRITE_BACK : CACHE_WRITE_THROUGH;
95+ this_leaf++;
96+ }
97+
98+ if (cpu_cache_is_present(SPR_UPR_ICP))
99+ ci_leaf_init(this_leaf, CACHE_TYPE_INST, level, &cpuinfo->icache, cpu);
100+
101+ this_cpu_ci->cpu_map_populated = true;
102+
103+ return 0;
104+}
arch/openrisc/kernel/dma.c+4−14
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <linux/pagewalk.h>
1818
1919 #include <asm/cpuinfo.h>
20+#include <asm/cacheflush.h>
2021 #include <asm/spr_defs.h>
2122 #include <asm/tlbflush.h>
2223
@@ -24,9 +25,6 @@ static int · 1 unmodified line
2425 page_set_nocache(pte_t *pte, unsigned long addr,
2526 unsigned long next, struct mm_walk *walk)
2627 {
27− unsigned long cl;
28− struct cpuinfo_or1k *cpuinfo = &cpuinfo_or1k[smp_processor_id()];
29−
3028 pte_val(*pte) |= _PAGE_CI;
3129
3230 /*
@@ -36,8 +34,7 @@ page_set_nocache(pte_t *pte, unsigned long addr, · 3 unmodified lines
3634 flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
3735
3836 /* Flush page out of dcache */
39− for (cl = __pa(addr); cl < __pa(next); cl += cpuinfo->dcache_block_size)
40− mtspr(SPR_DCBFR, cl);
37+ local_dcache_range_flush(__pa(addr), __pa(next));
4138
4239 return 0;
4340 }
@@ -98,21 +95,14 @@ void arch_dma_clear_uncached(void *cpu_addr, size_t size) · 54 unmodified lines
9895 void arch_sync_dma_for_device(phys_addr_t addr, size_t size,
9996 enum dma_data_direction dir)
10097 {
101− unsigned long cl;
102− struct cpuinfo_or1k *cpuinfo = &cpuinfo_or1k[smp_processor_id()];
103−
10498 switch (dir) {
10599 case DMA_TO_DEVICE:
106100 /* Flush the dcache for the requested range */
107− for (cl = addr; cl < addr + size;
108− cl += cpuinfo->dcache_block_size)
109− mtspr(SPR_DCBFR, cl);
101+ local_dcache_range_flush(addr, addr + size);
110102 break;
111103 case DMA_FROM_DEVICE:
112104 /* Invalidate the dcache for the requested range */
113− for (cl = addr; cl < addr + size;
114− cl += cpuinfo->dcache_block_size)
115− mtspr(SPR_DCBIR, cl);
105+ local_dcache_range_inv(addr, addr + size);
116106 break;
117107 default:
118108 /*
arch/openrisc/kernel/setup.c+3−42
@@ -113,21 +113,6 @@ static void print_cpuinfo(void) · 112 unmodified lines
113113 return;
114114 }
115115
116− if (upr & SPR_UPR_DCP)
117− printk(KERN_INFO
118− "-- dcache: %4d bytes total, %2d bytes/line, %d way(s)\n",
119− cpuinfo->dcache_size, cpuinfo->dcache_block_size,
120− cpuinfo->dcache_ways);
121− else
122− printk(KERN_INFO "-- dcache disabled\n");
123− if (upr & SPR_UPR_ICP)
124− printk(KERN_INFO
125− "-- icache: %4d bytes total, %2d bytes/line, %d way(s)\n",
126− cpuinfo->icache_size, cpuinfo->icache_block_size,
127− cpuinfo->icache_ways);
128− else
129− printk(KERN_INFO "-- icache disabled\n");
130−
131116 if (upr & SPR_UPR_DMP)
132117 printk(KERN_INFO "-- dmmu: %4d entries, %lu way(s)\n",
133118 1 << ((mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTS) >> 2),
@@ -155,8 +140,6 @@ static void print_cpuinfo(void) · 21 unmodified lines
155140 void __init setup_cpuinfo(void)
156141 {
157142 struct device_node *cpu;
158− unsigned long iccfgr, dccfgr;
159− unsigned long cache_set_size;
160143 int cpu_id = smp_processor_id();
161144 struct cpuinfo_or1k *cpuinfo = &cpuinfo_or1k[cpu_id];
162145
@@ -164,20 +147,6 @@ void __init setup_cpuinfo(void) · 1 unmodified line
164147 if (!cpu)
165148 panic("Couldn't find CPU%d in device tree...\n", cpu_id);
166149
167− iccfgr = mfspr(SPR_ICCFGR);
168− cpuinfo->icache_ways = 1 << (iccfgr & SPR_ICCFGR_NCW);
169− cache_set_size = 1 << ((iccfgr & SPR_ICCFGR_NCS) >> 3);
170− cpuinfo->icache_block_size = 16 << ((iccfgr & SPR_ICCFGR_CBS) >> 7);
171− cpuinfo->icache_size =
172− cache_set_size * cpuinfo->icache_ways * cpuinfo->icache_block_size;
173−
174− dccfgr = mfspr(SPR_DCCFGR);
175− cpuinfo->dcache_ways = 1 << (dccfgr & SPR_DCCFGR_NCW);
176− cache_set_size = 1 << ((dccfgr & SPR_DCCFGR_NCS) >> 3);
177− cpuinfo->dcache_block_size = 16 << ((dccfgr & SPR_DCCFGR_CBS) >> 7);
178− cpuinfo->dcache_size =
179− cache_set_size * cpuinfo->dcache_ways * cpuinfo->dcache_block_size;
180−
181150 if (of_property_read_u32(cpu, "clock-frequency",
182151 &cpuinfo->clock_frequency)) {
183152 printk(KERN_WARNING
@@ -294,14 +263,14 @@ static int show_cpuinfo(struct seq_file *m, void *v) · 110 unmodified lines
294263 unsigned int vr, cpucfgr;
295264 unsigned int avr;
296265 unsigned int version;
266+#ifdef CONFIG_SMP
297267 struct cpuinfo_or1k *cpuinfo = v;
268+ seq_printf(m, "processor\t\t: %d\n", cpuinfo->coreid);
269+#endif
298270
299271 vr = mfspr(SPR_VR);
300272 cpucfgr = mfspr(SPR_CPUCFGR);
301273
302−#ifdef CONFIG_SMP
303− seq_printf(m, "processor\t\t: %d\n", cpuinfo->coreid);
304−#endif
305274 if (vr & SPR_VR_UVRP) {
306275 vr = mfspr(SPR_VR2);
307276 version = vr & SPR_VR2_VER;
@@ -320,14 +289,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) · 12 unmodified lines
320289 seq_printf(m, "revision\t\t: %d\n", vr & SPR_VR_REV);
321290 }
322291 seq_printf(m, "frequency\t\t: %ld\n", loops_per_jiffy * HZ);
323− seq_printf(m, "dcache size\t\t: %d bytes\n", cpuinfo->dcache_size);
324− seq_printf(m, "dcache block size\t: %d bytes\n",
325− cpuinfo->dcache_block_size);
326− seq_printf(m, "dcache ways\t\t: %d\n", cpuinfo->dcache_ways);
327− seq_printf(m, "icache size\t\t: %d bytes\n", cpuinfo->icache_size);
328− seq_printf(m, "icache block size\t: %d bytes\n",
329− cpuinfo->icache_block_size);
330− seq_printf(m, "icache ways\t\t: %d\n", cpuinfo->icache_ways);
331292 seq_printf(m, "immu\t\t\t: %d entries, %lu ways\n",
332293 1 << ((mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTS) >> 2),
333294 1 + (mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTW));
arch/openrisc/mm/cache.c+47−9
@@ -14,31 +14,70 @@ · 13 unmodified lines
1414 #include <asm/spr_defs.h>
1515 #include <asm/cache.h>
1616 #include <asm/cacheflush.h>
17+#include <asm/cpuinfo.h>
1718 #include <asm/tlbflush.h>
1819
19−static __always_inline void cache_loop(struct page *page, const unsigned int reg)
20+/*
21+ * Check if the cache component exists.
22+ */
23+bool cpu_cache_is_present(const unsigned int cache_type)
2024 {
21− unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT;
22− unsigned long line = paddr & ~(L1_CACHE_BYTES - 1);
25+ unsigned long upr = mfspr(SPR_UPR);
26+ unsigned long mask = SPR_UPR_UP | cache_type;
27+
28+ return !((upr & mask) ^ mask);
29+}
30+
31+static __always_inline void cache_loop(unsigned long paddr, unsigned long end,
32+ const unsigned short reg, const unsigned int cache_type)
33+{
34+ if (!cpu_cache_is_present(cache_type))
35+ return;
2336
24− while (line < paddr + PAGE_SIZE) {
25− mtspr(reg, line);
26− line += L1_CACHE_BYTES;
37+ while (paddr < end) {
38+ mtspr(reg, paddr);
39+ paddr += L1_CACHE_BYTES;
2740 }
2841 }
2942
43+static __always_inline void cache_loop_page(struct page *page, const unsigned short reg,
44+ const unsigned int cache_type)
45+{
46+ unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT;
47+ unsigned long end = paddr + PAGE_SIZE;
48+
49+ paddr &= ~(L1_CACHE_BYTES - 1);
50+
51+ cache_loop(paddr, end, reg, cache_type);
52+}
53+
3054 void local_dcache_page_flush(struct page *page)
3155 {
32− cache_loop(page, SPR_DCBFR);
56+ cache_loop_page(page, SPR_DCBFR, SPR_UPR_DCP);
3357 }
3458 EXPORT_SYMBOL(local_dcache_page_flush);
3559
3660 void local_icache_page_inv(struct page *page)
3761 {
38− cache_loop(page, SPR_ICBIR);
62+ cache_loop_page(page, SPR_ICBIR, SPR_UPR_ICP);
3963 }
4064 EXPORT_SYMBOL(local_icache_page_inv);
4165
66+void local_dcache_range_flush(unsigned long start, unsigned long end)
67+{
68+ cache_loop(start, end, SPR_DCBFR, SPR_UPR_DCP);
69+}
70+
71+void local_dcache_range_inv(unsigned long start, unsigned long end)
72+{
73+ cache_loop(start, end, SPR_DCBIR, SPR_UPR_DCP);
74+}
75+
76+void local_icache_range_inv(unsigned long start, unsigned long end)
77+{
78+ cache_loop(start, end, SPR_ICBIR, SPR_UPR_ICP);
79+}
80+
4281 void update_cache(struct vm_area_struct *vma, unsigned long address,
4382 pte_t *pte)
4483 {
@@ -58,4 +97,3 @@ void update_cache(struct vm_area_struct *vma, unsigned long address, · 13 unmodified lines
5897 sync_icache_dcache(folio_page(folio, nr));
5998 }
6099 }
61−
arch/openrisc/mm/init.c+3−2
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include <asm/fixmap.h>
3636 #include <asm/tlbflush.h>
3737 #include <asm/sections.h>
38+#include <asm/cacheflush.h>
3839
3940 int mem_init_done;
4041
@@ -176,8 +177,8 @@ void __init paging_init(void) · 135 unmodified lines
176177 barrier();
177178
178179 /* Invalidate instruction caches after code modification */
179− mtspr(SPR_ICBIR, 0x900);
180− mtspr(SPR_ICBIR, 0xa00);
180+ local_icache_block_inv(0x900);
181+ local_icache_block_inv(0xa00);
181182
182183 /* New TLB miss handlers and kernel page tables are in now place.
183184 * Make sure that page flags get updated for all pages in TLB by
arch/parisc/configs/generic-32bit_defconfig+0−2
@@ -264,8 +264,6 @@ CONFIG_CRYPTO_MICHAEL_MIC=m · 263 unmodified lines
264264 CONFIG_CRYPTO_SHA1=y
265265 CONFIG_CRYPTO_WP512=m
266266 CONFIG_CRYPTO_DEFLATE=y
267−CONFIG_CRC_CCITT=m
268−CONFIG_CRC_T10DIF=y
269267 CONFIG_FONTS=y
270268 CONFIG_PRINTK_TIME=y
271269 CONFIG_MAGIC_SYSRQ=y
arch/parisc/configs/generic-64bit_defconfig+0−1
@@ -292,7 +292,6 @@ CONFIG_CRYPTO_MD5=y · 291 unmodified lines
292292 CONFIG_CRYPTO_MICHAEL_MIC=m
293293 CONFIG_CRYPTO_DEFLATE=m
294294 # CONFIG_CRYPTO_HW is not set
295−CONFIG_CRC_CCITT=m
296295 CONFIG_PRINTK_TIME=y
297296 CONFIG_DEBUG_KERNEL=y
298297 CONFIG_STRIP_ASM_SYMS=y
arch/parisc/math-emu/driver.c+13−3
@@ -97,9 +97,19 @@ handle_fpe(struct pt_regs *regs) · 96 unmodified lines
9797
9898 memcpy(regs->fr, frcopy, sizeof regs->fr);
9999 if (signalcode != 0) {
100− force_sig_fault(signalcode >> 24, signalcode & 0xffffff,
101− (void __user *) regs->iaoq[0]);
102− return -1;
100+ int sig = signalcode >> 24;
101+
102+ if (sig == SIGFPE) {
103+ /*
104+ * Clear floating point trap bit to avoid trapping
105+ * again on the first floating-point instruction in
106+ * the userspace signal handler.
107+ */
108+ regs->fr[0] &= ~(1ULL << 38);
109+ }
110+ force_sig_fault(sig, signalcode & 0xffffff,
111+ (void __user *) regs->iaoq[0]);
112+ return -1;
103113 }
104114
105115 return signalcode ? -1 : 0;
arch/powerpc/boot/wrapper+2−4
@@ -234,10 +234,8 @@ fi · 233 unmodified lines
234234
235235 # suppress some warnings in recent ld versions
236236 nowarn="-z noexecstack"
237−if ! ld_is_lld; then
238− if [ "$LD_VERSION" -ge "$(echo 2.39 | ld_version)" ]; then
239− nowarn="$nowarn --no-warn-rwx-segments"
240− fi
237+if "${CROSS}ld" -v --no-warn-rwx-segments >/dev/null 2>&1; then
238+ nowarn="$nowarn --no-warn-rwx-segments"
241239 fi
242240
243241 platformo=$object/"$platform".o
arch/powerpc/configs/44x/sam440ep_defconfig+0−1
@@ -91,5 +91,4 @@ CONFIG_AFFS_FS=m · 90 unmodified lines
9191 # CONFIG_NETWORK_FILESYSTEMS is not set
9292 CONFIG_NLS_CODEPAGE_437=y
9393 CONFIG_NLS_ISO8859_1=y
94−CONFIG_CRC_T10DIF=y
9594 CONFIG_MAGIC_SYSRQ=y
arch/powerpc/configs/44x/warp_defconfig+0−2
@@ -85,8 +85,6 @@ CONFIG_NLS_ASCII=y · 84 unmodified lines
8585 CONFIG_NLS_ISO8859_1=y
8686 CONFIG_NLS_ISO8859_15=y
8787 CONFIG_NLS_UTF8=y
88−CONFIG_CRC_CCITT=y
89−CONFIG_CRC_T10DIF=y
9088 CONFIG_PRINTK_TIME=y
9189 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
9290 CONFIG_DEBUG_FS=y
arch/powerpc/configs/83xx/mpc832x_rdb_defconfig+0−1
@@ -73,6 +73,5 @@ CONFIG_NLS_CODEPAGE_437=y · 72 unmodified lines
7373 CONFIG_NLS_CODEPAGE_932=y
7474 CONFIG_NLS_ISO8859_8=y
7575 CONFIG_NLS_ISO8859_1=y
76−CONFIG_CRC_T10DIF=y
7776 CONFIG_CRYPTO_ECB=m
7877 CONFIG_CRYPTO_PCBC=m
arch/powerpc/configs/83xx/mpc834x_itx_defconfig+0−1
@@ -80,5 +80,4 @@ CONFIG_TMPFS=y · 79 unmodified lines
8080 CONFIG_NFS_FS=y
8181 CONFIG_NFS_V4=y
8282 CONFIG_ROOT_NFS=y
83−CONFIG_CRC_T10DIF=y
8483 CONFIG_CRYPTO_PCBC=m
arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig+0−1
@@ -72,5 +72,4 @@ CONFIG_TMPFS=y · 71 unmodified lines
7272 CONFIG_NFS_FS=y
7373 CONFIG_NFS_V4=y
7474 CONFIG_ROOT_NFS=y
75−CONFIG_CRC_T10DIF=y
7675 CONFIG_CRYPTO_PCBC=m
arch/powerpc/configs/83xx/mpc837x_rdb_defconfig+0−1
@@ -75,6 +75,5 @@ CONFIG_TMPFS=y · 74 unmodified lines
7575 CONFIG_NFS_FS=y
7676 CONFIG_NFS_V4=y
7777 CONFIG_ROOT_NFS=y
78−CONFIG_CRC_T10DIF=y
7978 CONFIG_CRYPTO_ECB=m
8079 CONFIG_CRYPTO_PCBC=m
arch/powerpc/configs/85xx/ge_imp3a_defconfig+0−2
@@ -221,8 +221,6 @@ CONFIG_NLS_ISO8859_15=y · 220 unmodified lines
221221 CONFIG_NLS_KOI8_R=m
222222 CONFIG_NLS_KOI8_U=m
223223 CONFIG_NLS_UTF8=y
224−CONFIG_CRC_CCITT=y
225−CONFIG_CRC_T10DIF=y
226224 CONFIG_MAGIC_SYSRQ=y
227225 CONFIG_CRYPTO_CBC=y
228226 CONFIG_CRYPTO_MD5=y
arch/powerpc/configs/85xx/stx_gp3_defconfig+0−2
@@ -60,8 +60,6 @@ CONFIG_CRAMFS=m · 59 unmodified lines
6060 CONFIG_NFS_FS=y
6161 CONFIG_ROOT_NFS=y
6262 CONFIG_NLS=y
63−CONFIG_CRC_CCITT=y
64−CONFIG_CRC_T10DIF=m
6563 CONFIG_DETECT_HUNG_TASK=y
6664 # CONFIG_DEBUG_BUGVERBOSE is not set
6765 CONFIG_BDI_SWITCH=y
arch/powerpc/configs/85xx/xes_mpc85xx_defconfig+0−1
@@ -132,7 +132,6 @@ CONFIG_ROOT_NFS=y · 131 unmodified lines
132132 CONFIG_NFSD=y
133133 CONFIG_NLS_CODEPAGE_437=y
134134 CONFIG_NLS_ISO8859_1=y
135−CONFIG_CRC_T10DIF=y
136135 CONFIG_DETECT_HUNG_TASK=y
137136 # CONFIG_DEBUG_BUGVERBOSE is not set
138137 CONFIG_CRYPTO_HMAC=y
arch/powerpc/configs/86xx-hw.config+0−1
@@ -5,7 +5,6 @@ CONFIG_BROADCOM_PHY=y · 4 unmodified lines
55 # CONFIG_CARDBUS is not set
66 CONFIG_CHR_DEV_SG=y
77 CONFIG_CHR_DEV_ST=y
8−CONFIG_CRC_T10DIF=y
98 CONFIG_CRYPTO_HMAC=y
109 CONFIG_DS1682=y
1110 CONFIG_EEPROM_LEGACY=y
arch/powerpc/configs/amigaone_defconfig+0−1
@@ -106,7 +106,6 @@ CONFIG_TMPFS=y · 105 unmodified lines
106106 CONFIG_AFFS_FS=m
107107 CONFIG_NLS_ASCII=y
108108 CONFIG_NLS_ISO8859_1=m
109−CONFIG_CRC_T10DIF=y
110109 CONFIG_MAGIC_SYSRQ=y
111110 CONFIG_DEBUG_KERNEL=y
112111 CONFIG_DEBUG_MUTEXES=y
arch/powerpc/configs/chrp32_defconfig+0−1
@@ -110,7 +110,6 @@ CONFIG_PROC_KCORE=y · 109 unmodified lines
110110 CONFIG_TMPFS=y
111111 CONFIG_NLS_ASCII=y
112112 CONFIG_NLS_ISO8859_1=m
113−CONFIG_CRC_T10DIF=y
114113 CONFIG_MAGIC_SYSRQ=y
115114 CONFIG_DEBUG_KERNEL=y
116115 CONFIG_DEBUG_MUTEXES=y
arch/powerpc/configs/fsl-emb-nonhw.config+0−1
@@ -15,7 +15,6 @@ CONFIG_CGROUP_CPUACCT=y · 14 unmodified lines
1515 CONFIG_CGROUP_SCHED=y
1616 CONFIG_CGROUPS=y
1717 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
18−CONFIG_CRC_T10DIF=y
1918 CONFIG_CPUSETS=y
2019 CONFIG_CRAMFS=y
2120 CONFIG_CRYPTO_MD4=y
arch/powerpc/configs/g5_defconfig+0−1
@@ -231,7 +231,6 @@ CONFIG_NLS_ASCII=y · 230 unmodified lines
231231 CONFIG_NLS_ISO8859_1=y
232232 CONFIG_NLS_ISO8859_15=y
233233 CONFIG_NLS_UTF8=y
234−CONFIG_CRC_T10DIF=y
235234 CONFIG_MAGIC_SYSRQ=y
236235 CONFIG_DEBUG_KERNEL=y
237236 CONFIG_DEBUG_MUTEXES=y
arch/powerpc/configs/gamecube_defconfig+0−1
@@ -82,7 +82,6 @@ CONFIG_ROOT_NFS=y · 81 unmodified lines
8282 CONFIG_CIFS=y
8383 CONFIG_NLS_CODEPAGE_437=y
8484 CONFIG_NLS_ISO8859_1=y
85−CONFIG_CRC_CCITT=y
8685 CONFIG_PRINTK_TIME=y
8786 CONFIG_DEBUG_SPINLOCK=y
8887 CONFIG_DEBUG_MUTEXES=y
arch/powerpc/configs/linkstation_defconfig+0−2
@@ -125,8 +125,6 @@ CONFIG_NLS_CODEPAGE_437=m · 124 unmodified lines
125125 CONFIG_NLS_CODEPAGE_932=m
126126 CONFIG_NLS_ISO8859_1=m
127127 CONFIG_NLS_UTF8=m
128−CONFIG_CRC_CCITT=m
129−CONFIG_CRC_T10DIF=y
130128 CONFIG_MAGIC_SYSRQ=y
131129 CONFIG_DEBUG_KERNEL=y
132130 CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/mpc83xx_defconfig+0−1
@@ -97,7 +97,6 @@ CONFIG_TMPFS=y · 96 unmodified lines
9797 CONFIG_NFS_FS=y
9898 CONFIG_NFS_V4=y
9999 CONFIG_ROOT_NFS=y
100−CONFIG_CRC_T10DIF=y
101100 CONFIG_CRYPTO_ECB=m
102101 CONFIG_CRYPTO_PCBC=m
103102 CONFIG_CRYPTO_SHA512=y
arch/powerpc/configs/mpc866_ads_defconfig+0−1
@@ -38,4 +38,3 @@ CONFIG_TMPFS=y · 37 unmodified lines
3838 CONFIG_CRAMFS=y
3939 CONFIG_NFS_FS=y
4040 CONFIG_ROOT_NFS=y
41−CONFIG_CRC_CCITT=y
arch/powerpc/configs/mvme5100_defconfig+0−2
@@ -107,8 +107,6 @@ CONFIG_NLS_CODEPAGE_437=m · 106 unmodified lines
107107 CONFIG_NLS_CODEPAGE_932=m
108108 CONFIG_NLS_ISO8859_1=m
109109 CONFIG_NLS_UTF8=m
110−CONFIG_CRC_CCITT=m
111−CONFIG_CRC_T10DIF=y
112110 CONFIG_XZ_DEC=y
113111 CONFIG_MAGIC_SYSRQ=y
114112 CONFIG_DEBUG_KERNEL=y
arch/powerpc/configs/pasemi_defconfig+0−1
@@ -159,7 +159,6 @@ CONFIG_NFSD=y · 158 unmodified lines
159159 CONFIG_NFSD_V4=y
160160 CONFIG_NLS_CODEPAGE_437=y
161161 CONFIG_NLS_ISO8859_1=y
162−CONFIG_CRC_CCITT=y
163162 CONFIG_PRINTK_TIME=y
164163 CONFIG_MAGIC_SYSRQ=y
165164 CONFIG_DEBUG_KERNEL=y
arch/powerpc/configs/pmac32_defconfig+0−1
@@ -276,7 +276,6 @@ CONFIG_NFSD_V3_ACL=y · 275 unmodified lines
276276 CONFIG_NFSD_V4=y
277277 CONFIG_NLS_CODEPAGE_437=m
278278 CONFIG_NLS_ISO8859_1=m
279−CONFIG_CRC_T10DIF=y
280279 CONFIG_MAGIC_SYSRQ=y
281280 CONFIG_DEBUG_KERNEL=y
282281 CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/ppc44x_defconfig+0−1
@@ -90,7 +90,6 @@ CONFIG_NFS_FS=y · 89 unmodified lines
9090 CONFIG_ROOT_NFS=y
9191 CONFIG_NLS_CODEPAGE_437=m
9292 CONFIG_NLS_ISO8859_1=m
93−CONFIG_CRC_T10DIF=m
9493 CONFIG_MAGIC_SYSRQ=y
9594 CONFIG_DETECT_HUNG_TASK=y
9695 CONFIG_CRYPTO_ECB=y
arch/powerpc/configs/ppc64e_defconfig+0−1
@@ -207,7 +207,6 @@ CONFIG_NLS_CODEPAGE_437=y · 206 unmodified lines
207207 CONFIG_NLS_ASCII=y
208208 CONFIG_NLS_ISO8859_1=y
209209 CONFIG_NLS_UTF8=y
210−CONFIG_CRC_T10DIF=y
211210 CONFIG_MAGIC_SYSRQ=y
212211 CONFIG_DEBUG_KERNEL=y
213212 CONFIG_DEBUG_STACK_USAGE=y
arch/powerpc/configs/ps3_defconfig+0−2
@@ -148,8 +148,6 @@ CONFIG_NLS_ISO8859_1=y · 147 unmodified lines
148148 CONFIG_CRYPTO_PCBC=m
149149 CONFIG_CRYPTO_MICHAEL_MIC=m
150150 CONFIG_CRYPTO_LZO=m
151−CONFIG_CRC_CCITT=m
152−CONFIG_CRC_T10DIF=y
153151 CONFIG_PRINTK_TIME=y
154152 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
155153 CONFIG_MAGIC_SYSRQ=y
arch/powerpc/configs/skiroot_defconfig+0−2
@@ -278,8 +278,6 @@ CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY=y · 277 unmodified lines
278278 # CONFIG_INTEGRITY is not set
279279 CONFIG_LSM="yama,loadpin,safesetid,integrity"
280280 # CONFIG_CRYPTO_HW is not set
281−CONFIG_CRC16=y
282−CONFIG_CRC_ITU_T=y
283281 # CONFIG_XZ_DEC_X86 is not set
284282 # CONFIG_XZ_DEC_IA64 is not set
285283 # CONFIG_XZ_DEC_ARM is not set
arch/powerpc/configs/storcenter_defconfig+0−1
@@ -75,4 +75,3 @@ CONFIG_NLS_DEFAULT="utf8" · 74 unmodified lines
7575 CONFIG_NLS_CODEPAGE_437=y
7676 CONFIG_NLS_ISO8859_1=y
7777 CONFIG_NLS_UTF8=y
78−CONFIG_CRC_T10DIF=y
arch/powerpc/configs/wii_defconfig+0−1
@@ -114,7 +114,6 @@ CONFIG_ROOT_NFS=y · 113 unmodified lines
114114 CONFIG_CIFS=m
115115 CONFIG_NLS_CODEPAGE_437=y
116116 CONFIG_NLS_ISO8859_1=y
117−CONFIG_CRC_CCITT=y
118117 CONFIG_PRINTK_TIME=y
119118 CONFIG_MAGIC_SYSRQ=y
120119 CONFIG_DEBUG_SPINLOCK=y
arch/powerpc/kernel/module_64.c+0−4
@@ -258,10 +258,6 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr, · 257 unmodified lines
258258 break;
259259 }
260260 }
261− if (i == hdr->e_shnum) {
262− pr_err("%s: doesn't contain __patchable_function_entries.\n", me->name);
263− return -ENOEXEC;
264− }
265261 #endif
266262
267263 pr_debug("Looks like a total of %lu stubs, max\n", relocs);
arch/powerpc/mm/book3s64/radix_pgtable.c+17−3
@@ -976,7 +976,7 @@ int __meminit radix__vmemmap_create_mapping(unsigned long start, · 975 unmodified lines
976976 return 0;
977977 }
978978
979−
979+#ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
980980 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
981981 {
982982 if (radix_enabled())
@@ -984,6 +984,7 @@ bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap) · 1 unmodified line
984984
985985 return false;
986986 }
987+#endif
987988
988989 int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
989990 unsigned long addr, unsigned long next)
@@ -1120,6 +1121,19 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in · 130 unmodified lines
11201121 pmd_t *pmd;
11211122 pte_t *pte;
11221123
1124+ /*
1125+ * Make sure we align the start vmemmap addr so that we calculate
1126+ * the correct start_pfn in altmap boundary check to decided whether
1127+ * we should use altmap or RAM based backing memory allocation. Also
1128+ * the address need to be aligned for set_pte operation.
1129+
1130+ * If the start addr is already PMD_SIZE aligned we will try to use
1131+ * a pmd mapping. We don't want to be too aggressive here beacause
1132+ * that will cause more allocations in RAM. So only if the namespace
1133+ * vmemmap start addr is PMD_SIZE aligned we will use PMD mapping.
1134+ */
1135+
1136+ start = ALIGN_DOWN(start, PAGE_SIZE);
11231137 for (addr = start; addr < end; addr = next) {
11241138 next = pmd_addr_end(addr, end);
11251139
@@ -1145,8 +1159,8 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in · 19 unmodified lines
11451159 * in altmap block allocation failures, in which case
11461160 * we fallback to RAM for vmemmap allocation.
11471161 */
1148− if (altmap && (!IS_ALIGNED(addr, PMD_SIZE) ||
1149− altmap_cross_boundary(altmap, addr, PMD_SIZE))) {
1162+ if (!IS_ALIGNED(addr, PMD_SIZE) || (altmap &&
1163+ altmap_cross_boundary(altmap, addr, PMD_SIZE))) {
11501164 /*
11511165 * make sure we don't create altmap mappings
11521166 * covering things outside the device.
arch/powerpc/platforms/powernv/Kconfig+1−1
@@ -17,7 +17,7 @@ config PPC_POWERNV · 16 unmodified lines
1717 select MMU_NOTIFIER
1818 select FORCE_SMP
1919 select ARCH_SUPPORTS_PER_VMA_LOCK
20− select PPC_RADIX_BROADCAST_TLBIE
20+ select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
2121 default y
2222
2323 config OPAL_PRD
arch/powerpc/platforms/pseries/Kconfig+1−1
@@ -23,7 +23,7 @@ config PPC_PSERIES · 22 unmodified lines
2323 select FORCE_SMP
2424 select SWIOTLB
2525 select ARCH_SUPPORTS_PER_VMA_LOCK
26− select PPC_RADIX_BROADCAST_TLBIE
26+ select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
2727 default y
2828
2929 config PARAVIRT
arch/riscv/boot/dts/sophgo/cv18xx.dtsi+1−1
@@ -341,7 +341,7 @@ · 340 unmodified lines
341341 1024 1024 1024 1024>;
342342 snps,priority = <0 1 2 3 4 5 6 7>;
343343 snps,dma-masters = <2>;
344− snps,data-width = <4>;
344+ snps,data-width = <2>;
345345 status = "disabled";
346346 };
347347
arch/riscv/include/asm/alternative-macros.h+7−12
@@ -115,24 +115,19 @@ · 114 unmodified lines
115115 \old_c
116116 .endm
117117
118−#define _ALTERNATIVE_CFG(old_c, ...) \
119− ALTERNATIVE_CFG old_c
120−
121−#define _ALTERNATIVE_CFG_2(old_c, ...) \
122− ALTERNATIVE_CFG old_c
118+#define __ALTERNATIVE_CFG(old_c, ...) ALTERNATIVE_CFG old_c
119+#define __ALTERNATIVE_CFG_2(old_c, ...) ALTERNATIVE_CFG old_c
123120
124121 #else /* !__ASSEMBLY__ */
125122
126−#define __ALTERNATIVE_CFG(old_c) \
127− old_c "\n"
123+#define __ALTERNATIVE_CFG(old_c, ...) old_c "\n"
124+#define __ALTERNATIVE_CFG_2(old_c, ...) old_c "\n"
128125
129−#define _ALTERNATIVE_CFG(old_c, ...) \
130− __ALTERNATIVE_CFG(old_c)
126+#endif /* __ASSEMBLY__ */
131127
132−#define _ALTERNATIVE_CFG_2(old_c, ...) \
133− __ALTERNATIVE_CFG(old_c)
128+#define _ALTERNATIVE_CFG(old_c, ...) __ALTERNATIVE_CFG(old_c)
129+#define _ALTERNATIVE_CFG_2(old_c, ...) __ALTERNATIVE_CFG_2(old_c)
134130
135−#endif /* __ASSEMBLY__ */
136131 #endif /* CONFIG_RISCV_ALTERNATIVE */
137132
138133 /*
arch/riscv/include/asm/cacheflush.h+10−5
@@ -34,11 +34,6 @@ static inline void flush_dcache_page(struct page *page) · 33 unmodified lines
3434 flush_dcache_folio(page_folio(page));
3535 }
3636
37−/*
38− * RISC-V doesn't have an instruction to flush parts of the instruction cache,
39− * so instead we just flush the whole thing.
40− */
41−#define flush_icache_range(start, end) flush_icache_all()
4237 #define flush_icache_user_page(vma, pg, addr, len) \
4338 do { \
4439 if (vma->vm_flags & VM_EXEC) \
@@ -78,6 +73,16 @@ void flush_icache_mm(struct mm_struct *mm, bool local); · 33 unmodified lines
7873
7974 #endif /* CONFIG_SMP */
8075
76+/*
77+ * RISC-V doesn't have an instruction to flush parts of the instruction cache,
78+ * so instead we just flush the whole thing.
79+ */
80+#define flush_icache_range flush_icache_range
81+static inline void flush_icache_range(unsigned long start, unsigned long end)
82+{
83+ flush_icache_all();
84+}
85+
8186 extern unsigned int riscv_cbom_block_size;
8287 extern unsigned int riscv_cboz_block_size;
8388 void riscv_init_cbo_blocksizes(void);
arch/riscv/include/asm/kgdb.h+1−8
@@ -19,16 +19,9 @@ · 18 unmodified lines
1919
2020 #ifndef __ASSEMBLY__
2121
22+void arch_kgdb_breakpoint(void);
2223 extern unsigned long kgdb_compiled_break;
2324
24−static inline void arch_kgdb_breakpoint(void)
25−{
26− asm(".global kgdb_compiled_break\n"
27− ".option norvc\n"
28− "kgdb_compiled_break: ebreak\n"
29− ".option rvc\n");
30−}
31−
3225 #endif /* !__ASSEMBLY__ */
3326
3427 #define DBG_REG_ZERO "zero"
arch/riscv/include/asm/syscall.h+5−2
@@ -62,8 +62,11 @@ static inline void syscall_get_arguments(struct task_struct *task, · 61 unmodified lines
6262 unsigned long *args)
6363 {
6464 args[0] = regs->orig_a0;
65− args++;
66− memcpy(args, &regs->a1, 5 * sizeof(args[0]));
65+ args[1] = regs->a1;
66+ args[2] = regs->a2;
67+ args[3] = regs->a3;
68+ args[4] = regs->a4;
69+ args[5] = regs->a5;
6770 }
6871
6972 static inline int syscall_get_arch(struct task_struct *task)
arch/riscv/kernel/Makefile+2−2
@@ -9,8 +9,8 @@ CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE) · 8 unmodified lines
99 CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
1010 CFLAGS_REMOVE_return_address.o = $(CC_FLAGS_FTRACE)
1111 endif
12−CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,)
13−CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,)
12+CFLAGS_syscall_table.o += $(call cc-disable-warning, override-init)
13+CFLAGS_compat_syscall_table.o += $(call cc-disable-warning, override-init)
1414
1515 ifdef CONFIG_KEXEC_CORE
1616 AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
arch/riscv/kernel/kgdb.c+6−0
@@ -254,6 +254,12 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) · 253 unmodified lines
254254 regs->epc = pc;
255255 }
256256
257+noinline void arch_kgdb_breakpoint(void)
258+{
259+ asm(".global kgdb_compiled_break\n"
260+ "kgdb_compiled_break: ebreak\n");
261+}
262+
257263 void kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffer,
258264 char *remcom_out_buffer)
259265 {
arch/riscv/kernel/module-sections.c+7−6
@@ -73,16 +73,17 @@ static bool duplicate_rela(const Elf_Rela *rela, int idx) · 72 unmodified lines
7373 static void count_max_entries(Elf_Rela *relas, int num,
7474 unsigned int *plts, unsigned int *gots)
7575 {
76− unsigned int type, i;
77−
78− for (i = 0; i < num; i++) {
79− type = ELF_RISCV_R_TYPE(relas[i].r_info);
80− if (type == R_RISCV_CALL_PLT) {
76+ for (int i = 0; i < num; i++) {
77+ switch (ELF_R_TYPE(relas[i].r_info)) {
78+ case R_RISCV_CALL_PLT:
79+ case R_RISCV_PLT32:
8180 if (!duplicate_rela(relas, i))
8281 (*plts)++;
83− } else if (type == R_RISCV_GOT_HI20) {
82+ break;
83+ case R_RISCV_GOT_HI20:
8484 if (!duplicate_rela(relas, i))
8585 (*gots)++;
86+ break;
8687 }
8788 }
8889 }
arch/riscv/kernel/module.c+6−5
@@ -648,7 +648,7 @@ process_accumulated_relocations(struct module *me, · 647 unmodified lines
648648 kfree(bucket_iter);
649649 }
650650
651− kfree(*relocation_hashtable);
651+ kvfree(*relocation_hashtable);
652652 }
653653
654654 static int add_relocation_to_accumulate(struct module *me, int type,
@@ -752,9 +752,10 @@ initialize_relocation_hashtable(unsigned int num_relocations, · 97 unmodified lines
752752
753753 hashtable_size <<= should_double_size;
754754
755− *relocation_hashtable = kmalloc_array(hashtable_size,
756− sizeof(**relocation_hashtable),
757− GFP_KERNEL);
755+ /* Number of relocations may be large, so kvmalloc it */
756+ *relocation_hashtable = kvmalloc_array(hashtable_size,
757+ sizeof(**relocation_hashtable),
758+ GFP_KERNEL);
758759 if (!*relocation_hashtable)
759760 return 0;
760761
@@ -859,7 +860,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, · 98 unmodified lines
859860 }
860861
861862 j++;
862− if (j > sechdrs[relsec].sh_size / sizeof(*rel))
863+ if (j == num_relocations)
863864 j = 0;
864865
865866 } while (j_idx != j);
arch/riscv/kernel/probes/uprobes.c+2−8
@@ -167,6 +167,7 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, · 166 unmodified lines
167167 /* Initialize the slot */
168168 void *kaddr = kmap_atomic(page);
169169 void *dst = kaddr + (vaddr & ~PAGE_MASK);
170+ unsigned long start = (unsigned long)dst;
170171
171172 memcpy(dst, src, len);
172173
@@ -176,13 +177,6 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, · 3 unmodified lines
176177 *(uprobe_opcode_t *)dst = __BUG_INSN_32;
177178 }
178179
180+ flush_icache_range(start, start + len);
179181 kunmap_atomic(kaddr);
180−
181− /*
182− * We probably need flush_icache_user_page() but it needs vma.
183− * This should work on most of architectures by default. If
184− * architecture needs to do something different it can define
185− * its own version of the function.
186− */
187− flush_dcache_page(page);
188182 }
arch/riscv/kernel/process.c+6−0
@@ -275,6 +275,9 @@ long set_tagged_addr_ctrl(struct task_struct *task, unsigned long arg) · 274 unmodified lines
275275 unsigned long pmm;
276276 u8 pmlen;
277277
278+ if (!riscv_has_extension_unlikely(RISCV_ISA_EXT_SUPM))
279+ return -EINVAL;
280+
278281 if (is_compat_thread(ti))
279282 return -EINVAL;
280283
@@ -330,6 +333,9 @@ long get_tagged_addr_ctrl(struct task_struct *task) · 49 unmodified lines
330333 struct thread_info *ti = task_thread_info(task);
331334 long ret = 0;
332335
336+ if (!riscv_has_extension_unlikely(RISCV_ISA_EXT_SUPM))
337+ return -EINVAL;
338+
333339 if (is_compat_thread(ti))
334340 return -EINVAL;
335341
arch/riscv/kernel/setup.c+35−1
@@ -66,6 +66,9 @@ static struct resource bss_res = { .name = "Kernel bss", }; · 65 unmodified lines
6666 static struct resource elfcorehdr_res = { .name = "ELF Core hdr", };
6767 #endif
6868
69+static int num_standard_resources;
70+static struct resource *standard_resources;
71+
6972 static int __init add_resource(struct resource *parent,
7073 struct resource *res)
7174 {
@@ -139,7 +142,7 @@ static void __init init_resources(void) · 67 unmodified lines
139142 struct resource *res = NULL;
140143 struct resource *mem_res = NULL;
141144 size_t mem_res_sz = 0;
142− int num_resources = 0, res_idx = 0;
145+ int num_resources = 0, res_idx = 0, non_resv_res = 0;
143146 int ret = 0;
144147
145148 /* + 1 as memblock_alloc() might increase memblock.reserved.cnt */
@@ -193,6 +196,7 @@ static void __init init_resources(void) · 47 unmodified lines
193196 /* Add /memory regions to the resource tree */
194197 for_each_mem_region(region) {
195198 res = &mem_res[res_idx--];
199+ non_resv_res++;
196200
197201 if (unlikely(memblock_is_nomap(region))) {
198202 res->name = "Reserved";
@@ -210,6 +214,9 @@ static void __init init_resources(void) · 11 unmodified lines
210214 goto error;
211215 }
212216
217+ num_standard_resources = non_resv_res;
218+ standard_resources = &mem_res[res_idx + 1];
219+
213220 /* Clean-up any unused pre-allocated resources */
214221 if (res_idx >= 0)
215222 memblock_free(mem_res, (res_idx + 1) * sizeof(*mem_res));
@@ -221,6 +228,33 @@ static void __init init_resources(void) · 5 unmodified lines
221228 memblock_free(mem_res, mem_res_sz);
222229 }
223230
231+static int __init reserve_memblock_reserved_regions(void)
232+{
233+ u64 i, j;
234+
235+ for (i = 0; i < num_standard_resources; i++) {
236+ struct resource *mem = &standard_resources[i];
237+ phys_addr_t r_start, r_end, mem_size = resource_size(mem);
238+
239+ if (!memblock_is_region_reserved(mem->start, mem_size))
240+ continue;
241+
242+ for_each_reserved_mem_range(j, &r_start, &r_end) {
243+ resource_size_t start, end;
244+
245+ start = max(PFN_PHYS(PFN_DOWN(r_start)), mem->start);
246+ end = min(PFN_PHYS(PFN_UP(r_end)) - 1, mem->end);
247+
248+ if (start > mem->end || end < mem->start)
249+ continue;
250+
251+ reserve_region_with_split(mem, start, end, "Reserved");
252+ }
253+ }
254+
255+ return 0;
256+}
257+arch_initcall(reserve_memblock_reserved_regions);
224258
225259 static void __init parse_dtb(void)
226260 {
arch/riscv/kernel/traps.c+37−27
@@ -198,47 +198,57 @@ asmlinkage __visible __trap_section void do_trap_insn_illegal(struct pt_regs *re · 197 unmodified lines
198198 DO_ERROR_INFO(do_trap_load_fault,
199199 SIGSEGV, SEGV_ACCERR, "load access fault");
200200
201−asmlinkage __visible __trap_section void do_trap_load_misaligned(struct pt_regs *regs)
201+enum misaligned_access_type {
202+ MISALIGNED_STORE,
203+ MISALIGNED_LOAD,
204+};
205+static const struct {
206+ const char *type_str;
207+ int (*handler)(struct pt_regs *regs);
208+} misaligned_handler[] = {
209+ [MISALIGNED_STORE] = {
210+ .type_str = "Oops - store (or AMO) address misaligned",
211+ .handler = handle_misaligned_store,
212+ },
213+ [MISALIGNED_LOAD] = {
214+ .type_str = "Oops - load address misaligned",
215+ .handler = handle_misaligned_load,
216+ },
217+};
218+
219+static void do_trap_misaligned(struct pt_regs *regs, enum misaligned_access_type type)
202220 {
221+ irqentry_state_t state;
222+
203223 if (user_mode(regs)) {
204224 irqentry_enter_from_user_mode(regs);
225+ local_irq_enable();
226+ } else {
227+ state = irqentry_nmi_enter(regs);
228+ }
205229
206− if (handle_misaligned_load(regs))
207− do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->epc,
208− "Oops - load address misaligned");
230+ if (misaligned_handler[type].handler(regs))
231+ do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->epc,
232+ misaligned_handler[type].type_str);
209233
234+ if (user_mode(regs)) {
235+ local_irq_disable();
210236 irqentry_exit_to_user_mode(regs);
211237 } else {
212− irqentry_state_t state = irqentry_nmi_enter(regs);
213−
214− if (handle_misaligned_load(regs))
215− do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->epc,
216− "Oops - load address misaligned");
217−
218238 irqentry_nmi_exit(regs, state);
219239 }
220240 }
221241
222−asmlinkage __visible __trap_section void do_trap_store_misaligned(struct pt_regs *regs)
242+asmlinkage __visible __trap_section void do_trap_load_misaligned(struct pt_regs *regs)
223243 {
224− if (user_mode(regs)) {
225− irqentry_enter_from_user_mode(regs);
226−
227− if (handle_misaligned_store(regs))
228− do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->epc,
229− "Oops - store (or AMO) address misaligned");
230−
231− irqentry_exit_to_user_mode(regs);
232− } else {
233− irqentry_state_t state = irqentry_nmi_enter(regs);
234−
235− if (handle_misaligned_store(regs))
236− do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->epc,
237− "Oops - store (or AMO) address misaligned");
244+ do_trap_misaligned(regs, MISALIGNED_LOAD);
245+}
238246
239− irqentry_nmi_exit(regs, state);
240− }
247+asmlinkage __visible __trap_section void do_trap_store_misaligned(struct pt_regs *regs)
248+{
249+ do_trap_misaligned(regs, MISALIGNED_STORE);
241250 }
251+
242252 DO_ERROR_INFO(do_trap_store_fault,
243253 SIGSEGV, SEGV_ACCERR, "store (or AMO) access fault");
244254 DO_ERROR_INFO(do_trap_ecall_s,
arch/riscv/kernel/traps_misaligned.c+18−1
@@ -88,6 +88,13 @@ · 87 unmodified lines
8888 #define INSN_MATCH_C_FSWSP 0xe002
8989 #define INSN_MASK_C_FSWSP 0xe003
9090
91+#define INSN_MATCH_C_LHU 0x8400
92+#define INSN_MASK_C_LHU 0xfc43
93+#define INSN_MATCH_C_LH 0x8440
94+#define INSN_MASK_C_LH 0xfc43
95+#define INSN_MATCH_C_SH 0x8c00
96+#define INSN_MASK_C_SH 0xfc43
97+
9198 #define INSN_LEN(insn) ((((insn) & 0x3) < 0x3) ? 2 : 4)
9299
93100 #if defined(CONFIG_64BIT)
@@ -268,7 +275,7 @@ static unsigned long get_f32_rs(unsigned long insn, u8 fp_reg_offset, · 174 unmodified lines
268275 int __ret; \
269276 \
270277 if (user_mode(regs)) { \
271− __ret = __get_user(insn, (type __user *) insn_addr); \
278+ __ret = get_user(insn, (type __user *) insn_addr); \
272279 } else { \
273280 insn = *(type *)insn_addr; \
274281 __ret = 0; \
@@ -431,6 +438,13 @@ static int handle_scalar_misaligned_load(struct pt_regs *regs) · 156 unmodified lines
431438 fp = 1;
432439 len = 4;
433440 #endif
441+ } else if ((insn & INSN_MASK_C_LHU) == INSN_MATCH_C_LHU) {
442+ len = 2;
443+ insn = RVC_RS2S(insn) << SH_RD;
444+ } else if ((insn & INSN_MASK_C_LH) == INSN_MATCH_C_LH) {
445+ len = 2;
446+ shift = 8 * (sizeof(ulong) - len);
447+ insn = RVC_RS2S(insn) << SH_RD;
434448 } else {
435449 regs->epc = epc;
436450 return -1;
@@ -530,6 +544,9 @@ static int handle_scalar_misaligned_store(struct pt_regs *regs) · 93 unmodified lines
530544 len = 4;
531545 val.data_ulong = GET_F32_RS2C(insn, regs);
532546 #endif
547+ } else if ((insn & INSN_MASK_C_SH) == INSN_MATCH_C_SH) {
548+ len = 2;
549+ val.data_ulong = GET_RS2S(insn, regs);
533550 } else {
534551 regs->epc = epc;
535552 return -1;
arch/riscv/kernel/unaligned_access_speed.c+21−14
@@ -439,29 +439,36 @@ static int __init check_unaligned_access_all_cpus(void) · 438 unmodified lines
439439 {
440440 int cpu;
441441
442− if (unaligned_scalar_speed_param == RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN &&
443− !check_unaligned_access_emulated_all_cpus()) {
444− check_unaligned_access_speed_all_cpus();
445− } else {
446− pr_info("scalar unaligned access speed set to '%s' by command line\n",
447− speed_str[unaligned_scalar_speed_param]);
442+ if (unaligned_scalar_speed_param != RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN) {
443+ pr_info("scalar unaligned access speed set to '%s' (%lu) by command line\n",
444+ speed_str[unaligned_scalar_speed_param], unaligned_scalar_speed_param);
448445 for_each_online_cpu(cpu)
449446 per_cpu(misaligned_access_speed, cpu) = unaligned_scalar_speed_param;
447+ } else if (!check_unaligned_access_emulated_all_cpus()) {
448+ check_unaligned_access_speed_all_cpus();
449+ }
450+
451+ if (unaligned_vector_speed_param != RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN) {
452+ if (!has_vector() &&
453+ unaligned_vector_speed_param != RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED) {
454+ pr_warn("vector support is not available, ignoring unaligned_vector_speed=%s\n",
455+ speed_str[unaligned_vector_speed_param]);
456+ } else {
457+ pr_info("vector unaligned access speed set to '%s' (%lu) by command line\n",
458+ speed_str[unaligned_vector_speed_param], unaligned_vector_speed_param);
459+ }
450460 }
451461
452462 if (!has_vector())
453463 unaligned_vector_speed_param = RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED;
454464
455− if (unaligned_vector_speed_param == RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN &&
456− !check_vector_unaligned_access_emulated_all_cpus() &&
457− IS_ENABLED(CONFIG_RISCV_PROBE_VECTOR_UNALIGNED_ACCESS)) {
458− kthread_run(vec_check_unaligned_access_speed_all_cpus,
459− NULL, "vec_check_unaligned_access_speed_all_cpus");
460− } else {
461− pr_info("vector unaligned access speed set to '%s' by command line\n",
462− speed_str[unaligned_vector_speed_param]);
465+ if (unaligned_vector_speed_param != RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN) {
463466 for_each_online_cpu(cpu)
464467 per_cpu(vector_misaligned_access, cpu) = unaligned_vector_speed_param;
468+ } else if (!check_vector_unaligned_access_emulated_all_cpus() &&
469+ IS_ENABLED(CONFIG_RISCV_PROBE_VECTOR_UNALIGNED_ACCESS)) {
470+ kthread_run(vec_check_unaligned_access_speed_all_cpus,
471+ NULL, "vec_check_unaligned_access_speed_all_cpus");
465472 }
466473
467474 /*
arch/riscv/kvm/vcpu.c+2−0
@@ -77,6 +77,8 @@ static void kvm_riscv_reset_vcpu(struct kvm_vcpu *vcpu) · 76 unmodified lines
7777 memcpy(cntx, reset_cntx, sizeof(*cntx));
7878 spin_unlock(&vcpu->arch.reset_cntx_lock);
7979
80+ memset(&vcpu->arch.smstateen_csr, 0, sizeof(vcpu->arch.smstateen_csr));
81+
8082 kvm_riscv_vcpu_fp_reset(vcpu);
8183
8284 kvm_riscv_vcpu_vector_reset(vcpu);
arch/s390/Kconfig+19−0
@@ -332,6 +332,10 @@ config HAVE_MARCH_Z16_FEATURES · 331 unmodified lines
332332 def_bool n
333333 select HAVE_MARCH_Z15_FEATURES
334334
335+config HAVE_MARCH_Z17_FEATURES
336+ def_bool n
337+ select HAVE_MARCH_Z16_FEATURES
338+
335339 choice
336340 prompt "Processor type"
337341 default MARCH_Z196
@@ -397,6 +401,14 @@ config MARCH_Z16 · 59 unmodified lines
397401 Select this to enable optimizations for IBM z16 (3931 and
398402 3932 series).
399403
404+config MARCH_Z17
405+ bool "IBM z17"
406+ select HAVE_MARCH_Z17_FEATURES
407+ depends on $(cc-option,-march=z17)
408+ help
409+ Select this to enable optimizations for IBM z17 (9175 and
410+ 9176 series).
411+
400412 endchoice
401413
402414 config MARCH_Z10_TUNE
@@ -420,6 +432,9 @@ config MARCH_Z15_TUNE · 17 unmodified lines
420432 config MARCH_Z16_TUNE
421433 def_bool TUNE_Z16 || MARCH_Z16 && TUNE_DEFAULT
422434
435+config MARCH_Z17_TUNE
436+ def_bool TUNE_Z17 || MARCH_Z17 && TUNE_DEFAULT
437+
423438 choice
424439 prompt "Tune code generation"
425440 default TUNE_DEFAULT
@@ -464,6 +479,10 @@ config TUNE_Z16 · 38 unmodified lines
464479 bool "IBM z16"
465480 depends on $(cc-option,-mtune=z16)
466481
482+config TUNE_Z17
483+ bool "IBM z17"
484+ depends on $(cc-option,-mtune=z17)
485+
467486 endchoice
468487
469488 config 64BIT
arch/s390/Makefile+2−0
@@ -48,6 +48,7 @@ mflags-$(CONFIG_MARCH_Z13) := -march=z13 · 47 unmodified lines
4848 mflags-$(CONFIG_MARCH_Z14) := -march=z14
4949 mflags-$(CONFIG_MARCH_Z15) := -march=z15
5050 mflags-$(CONFIG_MARCH_Z16) := -march=z16
51+mflags-$(CONFIG_MARCH_Z17) := -march=z17
5152
5253 export CC_FLAGS_MARCH := $(mflags-y)
5354
@@ -61,6 +62,7 @@ cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13 · 7 unmodified lines
6162 cflags-$(CONFIG_MARCH_Z14_TUNE) += -mtune=z14
6263 cflags-$(CONFIG_MARCH_Z15_TUNE) += -mtune=z15
6364 cflags-$(CONFIG_MARCH_Z16_TUNE) += -mtune=z16
65+cflags-$(CONFIG_MARCH_Z17_TUNE) += -mtune=z17
6466
6567 cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include
6668
arch/s390/configs/debug_defconfig+19−9
@@ -38,7 +38,6 @@ CONFIG_USER_NS=y · 37 unmodified lines
3838 CONFIG_CHECKPOINT_RESTORE=y
3939 CONFIG_SCHED_AUTOGROUP=y
4040 CONFIG_EXPERT=y
41−# CONFIG_SYSFS_SYSCALL is not set
4241 CONFIG_PROFILING=y
4342 CONFIG_KEXEC=y
4443 CONFIG_KEXEC_FILE=y
@@ -92,7 +91,6 @@ CONFIG_UNIXWARE_DISKLABEL=y · 47 unmodified lines
9291 CONFIG_IOSCHED_BFQ=y
9392 CONFIG_BINFMT_MISC=m
9493 CONFIG_ZSWAP=y
95−CONFIG_ZSMALLOC=y
9694 CONFIG_ZSMALLOC_STAT=y
9795 CONFIG_SLAB_BUCKETS=y
9896 CONFIG_SLUB_STATS=y
@@ -395,6 +393,9 @@ CONFIG_CLS_U32_MARK=y · 296 unmodified lines
395393 CONFIG_NET_CLS_FLOW=m
396394 CONFIG_NET_CLS_CGROUP=y
397395 CONFIG_NET_CLS_BPF=m
396+CONFIG_NET_CLS_FLOWER=m
397+CONFIG_NET_CLS_MATCHALL=m
398+CONFIG_NET_EMATCH=y
398399 CONFIG_NET_CLS_ACT=y
399400 CONFIG_NET_ACT_POLICE=m
400401 CONFIG_NET_ACT_GACT=m
@@ -405,6 +406,9 @@ CONFIG_NET_ACT_PEDIT=m · 4 unmodified lines
405406 CONFIG_NET_ACT_SIMP=m
406407 CONFIG_NET_ACT_SKBEDIT=m
407408 CONFIG_NET_ACT_CSUM=m
409+CONFIG_NET_ACT_VLAN=m
410+CONFIG_NET_ACT_TUNNEL_KEY=m
411+CONFIG_NET_ACT_CT=m
408412 CONFIG_NET_ACT_GATE=m
409413 CONFIG_NET_TC_SKB_EXT=y
410414 CONFIG_DNS_RESOLVER=y
@@ -628,8 +632,16 @@ CONFIG_VIRTIO_PCI=m · 217 unmodified lines
628632 CONFIG_VIRTIO_BALLOON=m
629633 CONFIG_VIRTIO_MEM=m
630634 CONFIG_VIRTIO_INPUT=y
635+CONFIG_VDPA=m
636+CONFIG_VDPA_SIM=m
637+CONFIG_VDPA_SIM_NET=m
638+CONFIG_VDPA_SIM_BLOCK=m
639+CONFIG_VDPA_USER=m
640+CONFIG_MLX5_VDPA_NET=m
641+CONFIG_VP_VDPA=m
631642 CONFIG_VHOST_NET=m
632643 CONFIG_VHOST_VSOCK=m
644+CONFIG_VHOST_VDPA=m
633645 CONFIG_EXT4_FS=y
634646 CONFIG_EXT4_FS_POSIX_ACL=y
635647 CONFIG_EXT4_FS_SECURITY=y
@@ -654,7 +666,6 @@ CONFIG_NILFS2_FS=m · 18 unmodified lines
654666 CONFIG_BCACHEFS_FS=y
655667 CONFIG_BCACHEFS_QUOTA=y
656668 CONFIG_BCACHEFS_POSIX_ACL=y
657−CONFIG_FS_DAX=y
658669 CONFIG_EXPORTFS_BLOCK_OPS=y
659670 CONFIG_FS_ENCRYPTION=y
660671 CONFIG_FS_VERITY=y
@@ -724,11 +735,10 @@ CONFIG_NLS_UTF8=m · 63 unmodified lines
724735 CONFIG_DLM=m
725736 CONFIG_UNICODE=y
726737 CONFIG_PERSISTENT_KEYRINGS=y
738+CONFIG_BIG_KEYS=y
727739 CONFIG_ENCRYPTED_KEYS=m
728740 CONFIG_KEY_NOTIFICATIONS=y
729741 CONFIG_SECURITY=y
730−CONFIG_HARDENED_USERCOPY=y
731−CONFIG_FORTIFY_SOURCE=y
732742 CONFIG_SECURITY_SELINUX=y
733743 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
734744 CONFIG_SECURITY_LOCKDOWN_LSM=y
@@ -741,6 +751,8 @@ CONFIG_IMA=y · 6 unmodified lines
741751 CONFIG_IMA_DEFAULT_HASH_SHA256=y
742752 CONFIG_IMA_WRITE_POLICY=y
743753 CONFIG_IMA_APPRAISE=y
754+CONFIG_FORTIFY_SOURCE=y
755+CONFIG_HARDENED_USERCOPY=y
744756 CONFIG_BUG_ON_DATA_CORRUPTION=y
745757 CONFIG_CRYPTO_USER=m
746758 # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
@@ -756,7 +768,6 @@ CONFIG_CRYPTO_AES_TI=m · 9 unmodified lines
756768 CONFIG_CRYPTO_ANUBIS=m
757769 CONFIG_CRYPTO_ARIA=m
758770 CONFIG_CRYPTO_BLOWFISH=m
759−CONFIG_CRYPTO_CAMELLIA=m
760771 CONFIG_CRYPTO_CAST5=m
761772 CONFIG_CRYPTO_CAST6=m
762773 CONFIG_CRYPTO_DES=m
@@ -801,7 +812,6 @@ CONFIG_CRYPTO_SHA3_512_S390=m · 38 unmodified lines
801812 CONFIG_CRYPTO_GHASH_S390=m
802813 CONFIG_CRYPTO_AES_S390=m
803814 CONFIG_CRYPTO_DES_S390=m
804−CONFIG_CRYPTO_CHACHA_S390=m
805815 CONFIG_CRYPTO_HMAC_S390=m
806816 CONFIG_ZCRYPT=m
807817 CONFIG_PKEY=m
@@ -812,9 +822,9 @@ CONFIG_PKEY_UV=m · 4 unmodified lines
812822 CONFIG_CRYPTO_PAES_S390=m
813823 CONFIG_CRYPTO_DEV_VIRTIO=m
814824 CONFIG_SYSTEM_BLACKLIST_KEYRING=y
825+CONFIG_CRYPTO_KRB5=m
826+CONFIG_CRYPTO_KRB5_SELFTESTS=y
815827 CONFIG_CORDIC=m
816−CONFIG_CRYPTO_LIB_CURVE25519=m
817−CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
818828 CONFIG_RANDOM32_SELFTEST=y
819829 CONFIG_XZ_DEC_MICROLZMA=y
820830 CONFIG_DMA_CMA=y
arch/s390/configs/defconfig+17−7
@@ -36,7 +36,6 @@ CONFIG_USER_NS=y · 35 unmodified lines
3636 CONFIG_CHECKPOINT_RESTORE=y
3737 CONFIG_SCHED_AUTOGROUP=y
3838 CONFIG_EXPERT=y
39−# CONFIG_SYSFS_SYSCALL is not set
4039 CONFIG_PROFILING=y
4140 CONFIG_KEXEC=y
4241 CONFIG_KEXEC_FILE=y
@@ -86,7 +85,6 @@ CONFIG_UNIXWARE_DISKLABEL=y · 43 unmodified lines
8685 CONFIG_IOSCHED_BFQ=y
8786 CONFIG_BINFMT_MISC=m
8887 CONFIG_ZSWAP=y
89−CONFIG_ZSMALLOC=y
9088 CONFIG_ZSMALLOC_STAT=y
9189 CONFIG_SLAB_BUCKETS=y
9290 # CONFIG_COMPAT_BRK is not set
@@ -385,6 +383,9 @@ CONFIG_CLS_U32_MARK=y · 292 unmodified lines
385383 CONFIG_NET_CLS_FLOW=m
386384 CONFIG_NET_CLS_CGROUP=y
387385 CONFIG_NET_CLS_BPF=m
386+CONFIG_NET_CLS_FLOWER=m
387+CONFIG_NET_CLS_MATCHALL=m
388+CONFIG_NET_EMATCH=y
388389 CONFIG_NET_CLS_ACT=y
389390 CONFIG_NET_ACT_POLICE=m
390391 CONFIG_NET_ACT_GACT=m
@@ -395,6 +396,9 @@ CONFIG_NET_ACT_PEDIT=m · 4 unmodified lines
395396 CONFIG_NET_ACT_SIMP=m
396397 CONFIG_NET_ACT_SKBEDIT=m
397398 CONFIG_NET_ACT_CSUM=m
399+CONFIG_NET_ACT_VLAN=m
400+CONFIG_NET_ACT_TUNNEL_KEY=m
401+CONFIG_NET_ACT_CT=m
398402 CONFIG_NET_ACT_GATE=m
399403 CONFIG_NET_TC_SKB_EXT=y
400404 CONFIG_DNS_RESOLVER=y
@@ -618,8 +622,16 @@ CONFIG_VIRTIO_PCI=m · 217 unmodified lines
618622 CONFIG_VIRTIO_BALLOON=m
619623 CONFIG_VIRTIO_MEM=m
620624 CONFIG_VIRTIO_INPUT=y
625+CONFIG_VDPA=m
626+CONFIG_VDPA_SIM=m
627+CONFIG_VDPA_SIM_NET=m
628+CONFIG_VDPA_SIM_BLOCK=m
629+CONFIG_VDPA_USER=m
630+CONFIG_MLX5_VDPA_NET=m
631+CONFIG_VP_VDPA=m
621632 CONFIG_VHOST_NET=m
622633 CONFIG_VHOST_VSOCK=m
634+CONFIG_VHOST_VDPA=m
623635 CONFIG_EXT4_FS=y
624636 CONFIG_EXT4_FS_POSIX_ACL=y
625637 CONFIG_EXT4_FS_SECURITY=y
@@ -641,7 +653,6 @@ CONFIG_NILFS2_FS=m · 15 unmodified lines
641653 CONFIG_BCACHEFS_FS=m
642654 CONFIG_BCACHEFS_QUOTA=y
643655 CONFIG_BCACHEFS_POSIX_ACL=y
644−CONFIG_FS_DAX=y
645656 CONFIG_EXPORTFS_BLOCK_OPS=y
646657 CONFIG_FS_ENCRYPTION=y
647658 CONFIG_FS_VERITY=y
@@ -711,6 +722,7 @@ CONFIG_NLS_UTF8=m · 63 unmodified lines
711722 CONFIG_DLM=m
712723 CONFIG_UNICODE=y
713724 CONFIG_PERSISTENT_KEYRINGS=y
725+CONFIG_BIG_KEYS=y
714726 CONFIG_ENCRYPTED_KEYS=m
715727 CONFIG_KEY_NOTIFICATIONS=y
716728 CONFIG_SECURITY=y
@@ -742,7 +754,6 @@ CONFIG_CRYPTO_AES_TI=m · 25 unmodified lines
742754 CONFIG_CRYPTO_ANUBIS=m
743755 CONFIG_CRYPTO_ARIA=m
744756 CONFIG_CRYPTO_BLOWFISH=m
745−CONFIG_CRYPTO_CAMELLIA=m
746757 CONFIG_CRYPTO_CAST5=m
747758 CONFIG_CRYPTO_CAST6=m
748759 CONFIG_CRYPTO_DES=m
@@ -788,7 +799,6 @@ CONFIG_CRYPTO_SHA3_512_S390=m · 39 unmodified lines
788799 CONFIG_CRYPTO_GHASH_S390=m
789800 CONFIG_CRYPTO_AES_S390=m
790801 CONFIG_CRYPTO_DES_S390=m
791−CONFIG_CRYPTO_CHACHA_S390=m
792802 CONFIG_CRYPTO_HMAC_S390=m
793803 CONFIG_ZCRYPT=m
794804 CONFIG_PKEY=m
@@ -799,10 +809,10 @@ CONFIG_PKEY_UV=m · 4 unmodified lines
799809 CONFIG_CRYPTO_PAES_S390=m
800810 CONFIG_CRYPTO_DEV_VIRTIO=m
801811 CONFIG_SYSTEM_BLACKLIST_KEYRING=y
812+CONFIG_CRYPTO_KRB5=m
813+CONFIG_CRYPTO_KRB5_SELFTESTS=y
802814 CONFIG_CORDIC=m
803815 CONFIG_PRIME_NUMBERS=m
804−CONFIG_CRYPTO_LIB_CURVE25519=m
805−CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
806816 CONFIG_XZ_DEC_MICROLZMA=y
807817 CONFIG_DMA_CMA=y
808818 CONFIG_CMA_SIZE_MBYTES=0
arch/s390/configs/zfcpdump_defconfig+0−1
@@ -70,7 +70,6 @@ CONFIG_DEBUG_KERNEL=y · 69 unmodified lines
7070 CONFIG_DEBUG_INFO_DWARF4=y
7171 CONFIG_DEBUG_FS=y
7272 CONFIG_PANIC_ON_OOPS=y
73−# CONFIG_SCHED_DEBUG is not set
7473 CONFIG_RCU_CPU_STALL_TIMEOUT=60
7574 # CONFIG_RCU_TRACE is not set
7675 # CONFIG_FTRACE is not set
arch/s390/include/asm/march.h+4−0
@@ -33,6 +33,10 @@ · 32 unmodified lines
3333 #define MARCH_HAS_Z16_FEATURES 1
3434 #endif
3535
36+#ifdef CONFIG_HAVE_MARCH_Z17_FEATURES
37+#define MARCH_HAS_Z17_FEATURES 1
38+#endif
39+
3640 #endif /* __DECOMPRESSOR */
3741
3842 #endif /* __ASM_S390_MARCH_H */
arch/s390/kernel/entry.S+2−1
@@ -602,7 +602,8 @@ SYM_CODE_START(stack_invalid) · 601 unmodified lines
602602 stmg %r0,%r7,__PT_R0(%r11)
603603 stmg %r8,%r9,__PT_PSW(%r11)
604604 mvc __PT_R8(64,%r11),0(%r14)
605− stg %r10,__PT_ORIG_GPR2(%r11) # store last break to orig_gpr2
605+ GET_LC %r2
606+ mvc __PT_ORIG_GPR2(8,%r11),__LC_PGM_LAST_BREAK(%r2)
606607 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
607608 lgr %r2,%r11 # pass pointer to pt_regs
608609 jg kernel_stack_invalid
arch/s390/kernel/perf_cpum_cf.c+2−9
@@ -442,7 +442,7 @@ static void cpum_cf_make_setsize(enum cpumf_ctr_set ctrset) · 441 unmodified lines
442442 ctrset_size = 48;
443443 else if (cpumf_ctr_info.csvn >= 3 && cpumf_ctr_info.csvn <= 5)
444444 ctrset_size = 128;
445− else if (cpumf_ctr_info.csvn == 6 || cpumf_ctr_info.csvn == 7)
445+ else if (cpumf_ctr_info.csvn >= 6 && cpumf_ctr_info.csvn <= 8)
446446 ctrset_size = 160;
447447 break;
448448 case CPUMF_CTR_SET_MT_DIAG:
@@ -858,18 +858,13 @@ static int cpumf_pmu_event_type(struct perf_event *event) · 409 unmodified lines
858858 static int cpumf_pmu_event_init(struct perf_event *event)
859859 {
860860 unsigned int type = event->attr.type;
861− int err;
861+ int err = -ENOENT;
862862
863863 if (type == PERF_TYPE_HARDWARE || type == PERF_TYPE_RAW)
864864 err = __hw_perf_event_init(event, type);
865865 else if (event->pmu->type == type)
866866 /* Registered as unknown PMU */
867867 err = __hw_perf_event_init(event, cpumf_pmu_event_type(event));
868− else
869− return -ENOENT;
870−
871− if (unlikely(err) && event->destroy)
872− event->destroy(event);
873868
874869 return err;
875870 }
@@ -1819,8 +1814,6 @@ static int cfdiag_event_init(struct perf_event *event) · 943 unmodified lines
18191814 event->destroy = hw_perf_event_destroy;
18201815
18211816 err = cfdiag_event_init2(event);
1822− if (unlikely(err))
1823− event->destroy(event);
18241817 out:
18251818 return err;
18261819 }
arch/s390/kernel/perf_cpum_cf_events.c+164−3
@@ -237,7 +237,6 @@ CPUMF_EVENT_ATTR(cf_z14, TX_C_TABORT_NO_SPECIAL, 0x00f4); · 236 unmodified lines
237237 CPUMF_EVENT_ATTR(cf_z14, TX_C_TABORT_SPECIAL, 0x00f5);
238238 CPUMF_EVENT_ATTR(cf_z14, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
239239 CPUMF_EVENT_ATTR(cf_z14, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
240−
241240 CPUMF_EVENT_ATTR(cf_z15, L1D_RO_EXCL_WRITES, 0x0080);
242241 CPUMF_EVENT_ATTR(cf_z15, DTLB2_WRITES, 0x0081);
243242 CPUMF_EVENT_ATTR(cf_z15, DTLB2_MISSES, 0x0082);
@@ -365,6 +364,83 @@ CPUMF_EVENT_ATTR(cf_z16, NNPA_WAIT_LOCK, 0x010d); · 121 unmodified lines
365364 CPUMF_EVENT_ATTR(cf_z16, NNPA_HOLD_LOCK, 0x010e);
366365 CPUMF_EVENT_ATTR(cf_z16, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
367366 CPUMF_EVENT_ATTR(cf_z16, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
367+CPUMF_EVENT_ATTR(cf_z17, L1D_RO_EXCL_WRITES, 0x0080);
368+CPUMF_EVENT_ATTR(cf_z17, DTLB2_WRITES, 0x0081);
369+CPUMF_EVENT_ATTR(cf_z17, DTLB2_MISSES, 0x0082);
370+CPUMF_EVENT_ATTR(cf_z17, CRSTE_1MB_WRITES, 0x0083);
371+CPUMF_EVENT_ATTR(cf_z17, DTLB2_GPAGE_WRITES, 0x0084);
372+CPUMF_EVENT_ATTR(cf_z17, ITLB2_WRITES, 0x0086);
373+CPUMF_EVENT_ATTR(cf_z17, ITLB2_MISSES, 0x0087);
374+CPUMF_EVENT_ATTR(cf_z17, TLB2_PTE_WRITES, 0x0089);
375+CPUMF_EVENT_ATTR(cf_z17, TLB2_CRSTE_WRITES, 0x008a);
376+CPUMF_EVENT_ATTR(cf_z17, TLB2_ENGINES_BUSY, 0x008b);
377+CPUMF_EVENT_ATTR(cf_z17, TX_C_TEND, 0x008c);
378+CPUMF_EVENT_ATTR(cf_z17, TX_NC_TEND, 0x008d);
379+CPUMF_EVENT_ATTR(cf_z17, L1C_TLB2_MISSES, 0x008f);
380+CPUMF_EVENT_ATTR(cf_z17, DCW_REQ, 0x0091);
381+CPUMF_EVENT_ATTR(cf_z17, DCW_REQ_IV, 0x0092);
382+CPUMF_EVENT_ATTR(cf_z17, DCW_REQ_CHIP_HIT, 0x0093);
383+CPUMF_EVENT_ATTR(cf_z17, DCW_REQ_DRAWER_HIT, 0x0094);
384+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_CHIP, 0x0095);
385+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_CHIP_IV, 0x0096);
386+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_CHIP_CHIP_HIT, 0x0097);
387+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_CHIP_DRAWER_HIT, 0x0098);
388+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_MODULE, 0x0099);
389+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_DRAWER, 0x009a);
390+CPUMF_EVENT_ATTR(cf_z17, DCW_OFF_DRAWER, 0x009b);
391+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_CHIP_MEMORY, 0x009c);
392+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_MODULE_MEMORY, 0x009d);
393+CPUMF_EVENT_ATTR(cf_z17, DCW_ON_DRAWER_MEMORY, 0x009e);
394+CPUMF_EVENT_ATTR(cf_z17, DCW_OFF_DRAWER_MEMORY, 0x009f);
395+CPUMF_EVENT_ATTR(cf_z17, IDCW_ON_MODULE_IV, 0x00a0);
396+CPUMF_EVENT_ATTR(cf_z17, IDCW_ON_MODULE_CHIP_HIT, 0x00a1);
397+CPUMF_EVENT_ATTR(cf_z17, IDCW_ON_MODULE_DRAWER_HIT, 0x00a2);
398+CPUMF_EVENT_ATTR(cf_z17, IDCW_ON_DRAWER_IV, 0x00a3);
399+CPUMF_EVENT_ATTR(cf_z17, IDCW_ON_DRAWER_CHIP_HIT, 0x00a4);
400+CPUMF_EVENT_ATTR(cf_z17, IDCW_ON_DRAWER_DRAWER_HIT, 0x00a5);
401+CPUMF_EVENT_ATTR(cf_z17, IDCW_OFF_DRAWER_IV, 0x00a6);
402+CPUMF_EVENT_ATTR(cf_z17, IDCW_OFF_DRAWER_CHIP_HIT, 0x00a7);
403+CPUMF_EVENT_ATTR(cf_z17, IDCW_OFF_DRAWER_DRAWER_HIT, 0x00a8);
404+CPUMF_EVENT_ATTR(cf_z17, ICW_REQ, 0x00a9);
405+CPUMF_EVENT_ATTR(cf_z17, ICW_REQ_IV, 0x00aa);
406+CPUMF_EVENT_ATTR(cf_z17, ICW_REQ_CHIP_HIT, 0x00ab);
407+CPUMF_EVENT_ATTR(cf_z17, ICW_REQ_DRAWER_HIT, 0x00ac);
408+CPUMF_EVENT_ATTR(cf_z17, ICW_ON_CHIP, 0x00ad);
409+CPUMF_EVENT_ATTR(cf_z17, ICW_ON_CHIP_IV, 0x00ae);
410+CPUMF_EVENT_ATTR(cf_z17, ICW_ON_CHIP_CHIP_HIT, 0x00af);
411+CPUMF_EVENT_ATTR(cf_z17, ICW_ON_CHIP_DRAWER_HIT, 0x00b0);
412+CPUMF_EVENT_ATTR(cf_z17, ICW_ON_MODULE, 0x00b1);
413+CPUMF_EVENT_ATTR(cf_z17, ICW_ON_DRAWER, 0x00b2);
414+CPUMF_EVENT_ATTR(cf_z17, ICW_OFF_DRAWER, 0x00b3);
415+CPUMF_EVENT_ATTR(cf_z17, CYCLES_SAMETHRD, 0x00ca);
416+CPUMF_EVENT_ATTR(cf_z17, CYCLES_DIFFTHRD, 0x00cb);
417+CPUMF_EVENT_ATTR(cf_z17, INST_SAMETHRD, 0x00cc);
418+CPUMF_EVENT_ATTR(cf_z17, INST_DIFFTHRD, 0x00cd);
419+CPUMF_EVENT_ATTR(cf_z17, WRONG_BRANCH_PREDICTION, 0x00ce);
420+CPUMF_EVENT_ATTR(cf_z17, VX_BCD_EXECUTION_SLOTS, 0x00e1);
421+CPUMF_EVENT_ATTR(cf_z17, DECIMAL_INSTRUCTIONS, 0x00e2);
422+CPUMF_EVENT_ATTR(cf_z17, LAST_HOST_TRANSLATIONS, 0x00e8);
423+CPUMF_EVENT_ATTR(cf_z17, TX_NC_TABORT, 0x00f4);
424+CPUMF_EVENT_ATTR(cf_z17, TX_C_TABORT_NO_SPECIAL, 0x00f5);
425+CPUMF_EVENT_ATTR(cf_z17, TX_C_TABORT_SPECIAL, 0x00f6);
426+CPUMF_EVENT_ATTR(cf_z17, DFLT_ACCESS, 0x00f8);
427+CPUMF_EVENT_ATTR(cf_z17, DFLT_CYCLES, 0x00fd);
428+CPUMF_EVENT_ATTR(cf_z17, SORTL, 0x0100);
429+CPUMF_EVENT_ATTR(cf_z17, DFLT_CC, 0x0109);
430+CPUMF_EVENT_ATTR(cf_z17, DFLT_CCFINISH, 0x010a);
431+CPUMF_EVENT_ATTR(cf_z17, NNPA_INVOCATIONS, 0x010b);
432+CPUMF_EVENT_ATTR(cf_z17, NNPA_COMPLETIONS, 0x010c);
433+CPUMF_EVENT_ATTR(cf_z17, NNPA_WAIT_LOCK, 0x010d);
434+CPUMF_EVENT_ATTR(cf_z17, NNPA_HOLD_LOCK, 0x010e);
435+CPUMF_EVENT_ATTR(cf_z17, NNPA_INST_ONCHIP, 0x0110);
436+CPUMF_EVENT_ATTR(cf_z17, NNPA_INST_OFFCHIP, 0x0111);
437+CPUMF_EVENT_ATTR(cf_z17, NNPA_INST_DIFF, 0x0112);
438+CPUMF_EVENT_ATTR(cf_z17, NNPA_4K_PREFETCH, 0x0114);
439+CPUMF_EVENT_ATTR(cf_z17, NNPA_COMPL_LOCK, 0x0115);
440+CPUMF_EVENT_ATTR(cf_z17, NNPA_RETRY_LOCK, 0x0116);
441+CPUMF_EVENT_ATTR(cf_z17, NNPA_RETRY_LOCK_WITH_PLO, 0x0117);
442+CPUMF_EVENT_ATTR(cf_z17, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
443+CPUMF_EVENT_ATTR(cf_z17, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
368444
369445 static struct attribute *cpumcf_fvn1_pmu_event_attr[] __initdata = {
370446 CPUMF_EVENT_PTR(cf_fvn1, CPU_CYCLES),
@@ -414,7 +490,7 @@ static struct attribute *cpumcf_svn_12345_pmu_event_attr[] __initdata = { · 43 unmodified lines
414490 NULL,
415491 };
416492
417−static struct attribute *cpumcf_svn_67_pmu_event_attr[] __initdata = {
493+static struct attribute *cpumcf_svn_678_pmu_event_attr[] __initdata = {
418494 CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
419495 CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
420496 CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
@@ -779,6 +855,87 @@ static struct attribute *cpumcf_z16_pmu_event_attr[] __initdata = { · 358 unmodified lines
779855 NULL,
780856 };
781857
858+static struct attribute *cpumcf_z17_pmu_event_attr[] __initdata = {
859+ CPUMF_EVENT_PTR(cf_z17, L1D_RO_EXCL_WRITES),
860+ CPUMF_EVENT_PTR(cf_z17, DTLB2_WRITES),
861+ CPUMF_EVENT_PTR(cf_z17, DTLB2_MISSES),
862+ CPUMF_EVENT_PTR(cf_z17, CRSTE_1MB_WRITES),
863+ CPUMF_EVENT_PTR(cf_z17, DTLB2_GPAGE_WRITES),
864+ CPUMF_EVENT_PTR(cf_z17, ITLB2_WRITES),
865+ CPUMF_EVENT_PTR(cf_z17, ITLB2_MISSES),
866+ CPUMF_EVENT_PTR(cf_z17, TLB2_PTE_WRITES),
867+ CPUMF_EVENT_PTR(cf_z17, TLB2_CRSTE_WRITES),
868+ CPUMF_EVENT_PTR(cf_z17, TLB2_ENGINES_BUSY),
869+ CPUMF_EVENT_PTR(cf_z17, TX_C_TEND),
870+ CPUMF_EVENT_PTR(cf_z17, TX_NC_TEND),
871+ CPUMF_EVENT_PTR(cf_z17, L1C_TLB2_MISSES),
872+ CPUMF_EVENT_PTR(cf_z17, DCW_REQ),
873+ CPUMF_EVENT_PTR(cf_z17, DCW_REQ_IV),
874+ CPUMF_EVENT_PTR(cf_z17, DCW_REQ_CHIP_HIT),
875+ CPUMF_EVENT_PTR(cf_z17, DCW_REQ_DRAWER_HIT),
876+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_CHIP),
877+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_CHIP_IV),
878+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_CHIP_CHIP_HIT),
879+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_CHIP_DRAWER_HIT),
880+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_MODULE),
881+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_DRAWER),
882+ CPUMF_EVENT_PTR(cf_z17, DCW_OFF_DRAWER),
883+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_CHIP_MEMORY),
884+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_MODULE_MEMORY),
885+ CPUMF_EVENT_PTR(cf_z17, DCW_ON_DRAWER_MEMORY),
886+ CPUMF_EVENT_PTR(cf_z17, DCW_OFF_DRAWER_MEMORY),
887+ CPUMF_EVENT_PTR(cf_z17, IDCW_ON_MODULE_IV),
888+ CPUMF_EVENT_PTR(cf_z17, IDCW_ON_MODULE_CHIP_HIT),
889+ CPUMF_EVENT_PTR(cf_z17, IDCW_ON_MODULE_DRAWER_HIT),
890+ CPUMF_EVENT_PTR(cf_z17, IDCW_ON_DRAWER_IV),
891+ CPUMF_EVENT_PTR(cf_z17, IDCW_ON_DRAWER_CHIP_HIT),
892+ CPUMF_EVENT_PTR(cf_z17, IDCW_ON_DRAWER_DRAWER_HIT),
893+ CPUMF_EVENT_PTR(cf_z17, IDCW_OFF_DRAWER_IV),
894+ CPUMF_EVENT_PTR(cf_z17, IDCW_OFF_DRAWER_CHIP_HIT),
895+ CPUMF_EVENT_PTR(cf_z17, IDCW_OFF_DRAWER_DRAWER_HIT),
896+ CPUMF_EVENT_PTR(cf_z17, ICW_REQ),
897+ CPUMF_EVENT_PTR(cf_z17, ICW_REQ_IV),
898+ CPUMF_EVENT_PTR(cf_z17, ICW_REQ_CHIP_HIT),
899+ CPUMF_EVENT_PTR(cf_z17, ICW_REQ_DRAWER_HIT),
900+ CPUMF_EVENT_PTR(cf_z17, ICW_ON_CHIP),
901+ CPUMF_EVENT_PTR(cf_z17, ICW_ON_CHIP_IV),
902+ CPUMF_EVENT_PTR(cf_z17, ICW_ON_CHIP_CHIP_HIT),
903+ CPUMF_EVENT_PTR(cf_z17, ICW_ON_CHIP_DRAWER_HIT),
904+ CPUMF_EVENT_PTR(cf_z17, ICW_ON_MODULE),
905+ CPUMF_EVENT_PTR(cf_z17, ICW_ON_DRAWER),
906+ CPUMF_EVENT_PTR(cf_z17, ICW_OFF_DRAWER),
907+ CPUMF_EVENT_PTR(cf_z17, CYCLES_SAMETHRD),
908+ CPUMF_EVENT_PTR(cf_z17, CYCLES_DIFFTHRD),
909+ CPUMF_EVENT_PTR(cf_z17, INST_SAMETHRD),
910+ CPUMF_EVENT_PTR(cf_z17, INST_DIFFTHRD),
911+ CPUMF_EVENT_PTR(cf_z17, WRONG_BRANCH_PREDICTION),
912+ CPUMF_EVENT_PTR(cf_z17, VX_BCD_EXECUTION_SLOTS),
913+ CPUMF_EVENT_PTR(cf_z17, DECIMAL_INSTRUCTIONS),
914+ CPUMF_EVENT_PTR(cf_z17, LAST_HOST_TRANSLATIONS),
915+ CPUMF_EVENT_PTR(cf_z17, TX_NC_TABORT),
916+ CPUMF_EVENT_PTR(cf_z17, TX_C_TABORT_NO_SPECIAL),
917+ CPUMF_EVENT_PTR(cf_z17, TX_C_TABORT_SPECIAL),
918+ CPUMF_EVENT_PTR(cf_z17, DFLT_ACCESS),
919+ CPUMF_EVENT_PTR(cf_z17, DFLT_CYCLES),
920+ CPUMF_EVENT_PTR(cf_z17, SORTL),
921+ CPUMF_EVENT_PTR(cf_z17, DFLT_CC),
922+ CPUMF_EVENT_PTR(cf_z17, DFLT_CCFINISH),
923+ CPUMF_EVENT_PTR(cf_z17, NNPA_INVOCATIONS),
924+ CPUMF_EVENT_PTR(cf_z17, NNPA_COMPLETIONS),
925+ CPUMF_EVENT_PTR(cf_z17, NNPA_WAIT_LOCK),
926+ CPUMF_EVENT_PTR(cf_z17, NNPA_HOLD_LOCK),
927+ CPUMF_EVENT_PTR(cf_z17, NNPA_INST_ONCHIP),
928+ CPUMF_EVENT_PTR(cf_z17, NNPA_INST_OFFCHIP),
929+ CPUMF_EVENT_PTR(cf_z17, NNPA_INST_DIFF),
930+ CPUMF_EVENT_PTR(cf_z17, NNPA_4K_PREFETCH),
931+ CPUMF_EVENT_PTR(cf_z17, NNPA_COMPL_LOCK),
932+ CPUMF_EVENT_PTR(cf_z17, NNPA_RETRY_LOCK),
933+ CPUMF_EVENT_PTR(cf_z17, NNPA_RETRY_LOCK_WITH_PLO),
934+ CPUMF_EVENT_PTR(cf_z17, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
935+ CPUMF_EVENT_PTR(cf_z17, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
936+ NULL,
937+};
938+
782939 /* END: CPUM_CF COUNTER DEFINITIONS ===================================== */
783940
784941 static struct attribute_group cpumcf_pmu_events_group = {
@@ -859,7 +1016,7 @@ __init const struct attribute_group **cpumf_cf_event_group(void) · 74 unmodified lines
8591016 if (ci.csvn >= 1 && ci.csvn <= 5)
8601017 csvn = cpumcf_svn_12345_pmu_event_attr;
8611018 else if (ci.csvn >= 6)
862− csvn = cpumcf_svn_67_pmu_event_attr;
1019+ csvn = cpumcf_svn_678_pmu_event_attr;
8631020
8641021 /* Determine model-specific counter set(s) */
8651022 get_cpu_id(&cpu_id);
@@ -892,6 +1049,10 @@ __init const struct attribute_group **cpumf_cf_event_group(void) · 26 unmodified lines
8921049 case 0x3932:
8931050 model = cpumcf_z16_pmu_event_attr;
8941051 break;
1052+ case 0x9175:
1053+ case 0x9176:
1054+ model = cpumcf_z17_pmu_event_attr;
1055+ break;
8951056 default:
8961057 model = none;
8971058 break;
arch/s390/kernel/perf_cpum_sf.c+0−3
@@ -885,9 +885,6 @@ static int cpumsf_pmu_event_init(struct perf_event *event) · 884 unmodified lines
885885 event->attr.exclude_idle = 0;
886886
887887 err = __hw_perf_event_init(event);
888− if (unlikely(err))
889− if (event->destroy)
890− event->destroy(event);
891888 return err;
892889 }
893890
arch/s390/kernel/processor.c+4−0
@@ -294,6 +294,10 @@ static int __init setup_elf_platform(void) · 293 unmodified lines
294294 case 0x3932:
295295 strcpy(elf_platform, "z16");
296296 break;
297+ case 0x9175:
298+ case 0x9176:
299+ strcpy(elf_platform, "z17");
300+ break;
297301 }
298302 return 0;
299303 }
arch/s390/kvm/intercept.c+1−1
@@ -95,7 +95,7 @@ static int handle_validity(struct kvm_vcpu *vcpu) · 94 unmodified lines
9595
9696 vcpu->stat.exit_validity++;
9797 trace_kvm_s390_intercept_validity(vcpu, viwhy);
98− KVM_EVENT(3, "validity intercept 0x%x for pid %u (kvm 0x%pK)", viwhy,
98+ KVM_EVENT(3, "validity intercept 0x%x for pid %u (kvm 0x%p)", viwhy,
9999 current->pid, vcpu->kvm);
100100
101101 /* do not warn on invalid runtime instrumentation mode */
arch/s390/kvm/interrupt.c+4−4
@@ -3161,7 +3161,7 @@ void kvm_s390_gisa_clear(struct kvm *kvm) · 3160 unmodified lines
31613161 if (!gi->origin)
31623162 return;
31633163 gisa_clear_ipm(gi->origin);
3164− VM_EVENT(kvm, 3, "gisa 0x%pK cleared", gi->origin);
3164+ VM_EVENT(kvm, 3, "gisa 0x%p cleared", gi->origin);
31653165 }
31663166
31673167 void kvm_s390_gisa_init(struct kvm *kvm)
@@ -3177,7 +3177,7 @@ void kvm_s390_gisa_init(struct kvm *kvm) · 9 unmodified lines
31773177 hrtimer_setup(&gi->timer, gisa_vcpu_kicker, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
31783178 memset(gi->origin, 0, sizeof(struct kvm_s390_gisa));
31793179 gi->origin->next_alert = (u32)virt_to_phys(gi->origin);
3180− VM_EVENT(kvm, 3, "gisa 0x%pK initialized", gi->origin);
3180+ VM_EVENT(kvm, 3, "gisa 0x%p initialized", gi->origin);
31813181 }
31823182
31833183 void kvm_s390_gisa_enable(struct kvm *kvm)
@@ -3218,7 +3218,7 @@ void kvm_s390_gisa_destroy(struct kvm *kvm) · 34 unmodified lines
32183218 process_gib_alert_list();
32193219 hrtimer_cancel(&gi->timer);
32203220 gi->origin = NULL;
3221− VM_EVENT(kvm, 3, "gisa 0x%pK destroyed", gisa);
3221+ VM_EVENT(kvm, 3, "gisa 0x%p destroyed", gisa);
32223222 }
32233223
32243224 void kvm_s390_gisa_disable(struct kvm *kvm)
@@ -3467,7 +3467,7 @@ int __init kvm_s390_gib_init(u8 nisc) · 242 unmodified lines
34673467 }
34683468 }
34693469
3470− KVM_EVENT(3, "gib 0x%pK (nisc=%d) initialized", gib, gib->nisc);
3470+ KVM_EVENT(3, "gib 0x%p (nisc=%d) initialized", gib, gib->nisc);
34713471 goto out;
34723472
34733473 out_unreg_gal:
arch/s390/kvm/kvm-s390.c+5−5
@@ -1022,7 +1022,7 @@ static int kvm_s390_set_mem_control(struct kvm *kvm, struct kvm_device_attr *att · 1021 unmodified lines
10221022 }
10231023 mutex_unlock(&kvm->lock);
10241024 VM_EVENT(kvm, 3, "SET: max guest address: %lu", new_limit);
1025− VM_EVENT(kvm, 3, "New guest asce: 0x%pK",
1025+ VM_EVENT(kvm, 3, "New guest asce: 0x%p",
10261026 (void *) kvm->arch.gmap->asce);
10271027 break;
10281028 }
@@ -3466,7 +3466,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) · 2437 unmodified lines
34663466 kvm_s390_gisa_init(kvm);
34673467 INIT_LIST_HEAD(&kvm->arch.pv.need_cleanup);
34683468 kvm->arch.pv.set_aside = NULL;
3469− KVM_EVENT(3, "vm 0x%pK created by pid %u", kvm, current->pid);
3469+ KVM_EVENT(3, "vm 0x%p created by pid %u", kvm, current->pid);
34703470
34713471 return 0;
34723472 out_err:
@@ -3529,7 +3529,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) · 56 unmodified lines
35293529 kvm_s390_destroy_adapters(kvm);
35303530 kvm_s390_clear_float_irqs(kvm);
35313531 kvm_s390_vsie_destroy(kvm);
3532− KVM_EVENT(3, "vm 0x%pK destroyed", kvm);
3532+ KVM_EVENT(3, "vm 0x%p destroyed", kvm);
35333533 }
35343534
35353535 /* Section: vcpu related */
@@ -3650,7 +3650,7 @@ static int sca_switch_to_extended(struct kvm *kvm) · 114 unmodified lines
36503650
36513651 free_page((unsigned long)old_sca);
36523652
3653− VM_EVENT(kvm, 2, "Switched to ESCA (0x%pK -> 0x%pK)",
3653+ VM_EVENT(kvm, 2, "Switched to ESCA (0x%p -> 0x%p)",
36543654 old_sca, kvm->arch.sca);
36553655 return 0;
36563656 }
@@ -4027,7 +4027,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) · 370 unmodified lines
40274027 goto out_free_sie_block;
40284028 }
40294029
4030− VM_EVENT(vcpu->kvm, 3, "create cpu %d at 0x%pK, sie block at 0x%pK",
4030+ VM_EVENT(vcpu->kvm, 3, "create cpu %d at 0x%p, sie block at 0x%p",
40314031 vcpu->vcpu_id, vcpu, vcpu->arch.sie_block);
40324032 trace_kvm_s390_create_vcpu(vcpu->vcpu_id, vcpu, vcpu->arch.sie_block);
40334033
arch/s390/kvm/trace-s390.h+2−2
@@ -56,7 +56,7 @@ TRACE_EVENT(kvm_s390_create_vcpu, · 55 unmodified lines
5656 __entry->sie_block = sie_block;
5757 ),
5858
59− TP_printk("create cpu %d at 0x%pK, sie block at 0x%pK",
59+ TP_printk("create cpu %d at 0x%p, sie block at 0x%p",
6060 __entry->id, __entry->vcpu, __entry->sie_block)
6161 );
6262
@@ -255,7 +255,7 @@ TRACE_EVENT(kvm_s390_enable_css, · 192 unmodified lines
255255 __entry->kvm = kvm;
256256 ),
257257
258− TP_printk("enabling channel I/O support (kvm @ %pK)\n",
258+ TP_printk("enabling channel I/O support (kvm @ %p)\n",
259259 __entry->kvm)
260260 );
261261
arch/s390/pci/pci_clp.c+2−0
@@ -428,6 +428,8 @@ static void __clp_add(struct clp_fh_list_entry *entry, void *data) · 427 unmodified lines
428428 return;
429429 }
430430 zdev = zpci_create_device(entry->fid, entry->fh, entry->config_state);
431+ if (IS_ERR(zdev))
432+ return;
431433 list_add_tail(&zdev->entry, scan_list);
432434 }
433435
arch/s390/tools/gen_facilities.c+3−0
@@ -53,6 +53,9 @@ static struct facility_def facility_defs[] = { · 52 unmodified lines
5353 #endif
5454 #ifdef CONFIG_HAVE_MARCH_Z15_FEATURES
5555 61, /* miscellaneous-instruction-extension 3 */
56+#endif
57+#ifdef CONFIG_HAVE_MARCH_Z17_FEATURES
58+ 84, /* miscellaneous-instruction-extension 4 */
5659 #endif
5760 -1 /* END */
5861 }
arch/sh/configs/ap325rxa_defconfig+0−1
@@ -99,4 +99,3 @@ CONFIG_NLS_ISO8859_1=y · 98 unmodified lines
9999 CONFIG_CRYPTO=y
100100 CONFIG_CRYPTO_CBC=y
101101 # CONFIG_CRYPTO_ANSI_CPRNG is not set
102−CONFIG_CRC_T10DIF=y
arch/sh/configs/ecovec24_defconfig+0−1
@@ -128,4 +128,3 @@ CONFIG_DEBUG_FS=y · 127 unmodified lines
128128 CONFIG_CRYPTO=y
129129 CONFIG_CRYPTO_CBC=y
130130 # CONFIG_CRYPTO_ANSI_CPRNG is not set
131−CONFIG_CRC_T10DIF=y
arch/sh/configs/edosk7705_defconfig+0−1
@@ -33,4 +33,3 @@ CONFIG_CMDLINE_FROM_BOOTLOADER=y · 32 unmodified lines
3333 # CONFIG_PROC_FS is not set
3434 # CONFIG_SYSFS is not set
3535 # CONFIG_ENABLE_MUST_CHECK is not set
36−# CONFIG_CRC32 is not set
arch/sh/configs/espt_defconfig+0−1
@@ -110,4 +110,3 @@ CONFIG_NLS_UTF8=y · 109 unmodified lines
110110 # CONFIG_ENABLE_MUST_CHECK is not set
111111 CONFIG_DEBUG_FS=y
112112 # CONFIG_CRYPTO_ANSI_CPRNG is not set
113−CONFIG_CRC_T10DIF=y
arch/sh/configs/hp6xx_defconfig+0−2
@@ -56,5 +56,3 @@ CONFIG_CRYPTO_PCBC=y · 55 unmodified lines
5656 CONFIG_CRYPTO_MD5=y
5757 # CONFIG_CRYPTO_ANSI_CPRNG is not set
5858 # CONFIG_CRYPTO_HW is not set
59−CONFIG_CRC16=y
60−CONFIG_CRC_T10DIF=y
arch/sh/configs/kfr2r09-romimage_defconfig+0−1
@@ -49,4 +49,3 @@ CONFIG_TMPFS=y · 48 unmodified lines
4949 # CONFIG_NETWORK_FILESYSTEMS is not set
5050 # CONFIG_ENABLE_MUST_CHECK is not set
5151 CONFIG_DEBUG_FS=y
52−# CONFIG_CRC32 is not set
arch/sh/configs/landisk_defconfig+0−1
@@ -111,4 +111,3 @@ CONFIG_NLS_CODEPAGE_437=y · 110 unmodified lines
111111 CONFIG_NLS_CODEPAGE_932=y
112112 CONFIG_SH_STANDARD_BIOS=y
113113 # CONFIG_CRYPTO_ANSI_CPRNG is not set
114−CONFIG_CRC_T10DIF=y
arch/sh/configs/lboxre2_defconfig+0−1
@@ -58,4 +58,3 @@ CONFIG_ROMFS_FS=y · 57 unmodified lines
5858 CONFIG_NLS_CODEPAGE_437=y
5959 CONFIG_SH_STANDARD_BIOS=y
6060 # CONFIG_CRYPTO_ANSI_CPRNG is not set
61−CONFIG_CRC_T10DIF=y
arch/sh/configs/magicpanelr2_defconfig+0−2
@@ -86,5 +86,3 @@ CONFIG_DEBUG_KERNEL=y · 85 unmodified lines
8686 CONFIG_DEBUG_KOBJECT=y
8787 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
8888 CONFIG_FRAME_POINTER=y
89−CONFIG_CRC_CCITT=m
90−CONFIG_CRC16=m
arch/sh/configs/migor_defconfig+0−1
@@ -90,4 +90,3 @@ CONFIG_DEBUG_FS=y · 89 unmodified lines
9090 CONFIG_CRYPTO_MANAGER=y
9191 # CONFIG_CRYPTO_ANSI_CPRNG is not set
9292 # CONFIG_CRYPTO_HW is not set
93−CONFIG_CRC_T10DIF=y
arch/sh/configs/r7780mp_defconfig+0−1
@@ -105,4 +105,3 @@ CONFIG_CRYPTO_ECB=m · 104 unmodified lines
105105 CONFIG_CRYPTO_PCBC=m
106106 CONFIG_CRYPTO_HMAC=y
107107 # CONFIG_CRYPTO_ANSI_CPRNG is not set
108−CONFIG_CRC_T10DIF=y
arch/sh/configs/r7785rp_defconfig+0−1
@@ -103,4 +103,3 @@ CONFIG_CRYPTO_ECB=m · 102 unmodified lines
103103 CONFIG_CRYPTO_PCBC=m
104104 CONFIG_CRYPTO_HMAC=y
105105 # CONFIG_CRYPTO_ANSI_CPRNG is not set
106−CONFIG_CRC_T10DIF=y
arch/sh/configs/rts7751r2d1_defconfig+0−1
@@ -87,4 +87,3 @@ CONFIG_MINIX_FS=y · 86 unmodified lines
8787 CONFIG_NLS_CODEPAGE_932=y
8888 CONFIG_DEBUG_FS=y
8989 # CONFIG_CRYPTO_ANSI_CPRNG is not set
90−CONFIG_CRC_T10DIF=y
arch/sh/configs/rts7751r2dplus_defconfig+0−1
@@ -92,4 +92,3 @@ CONFIG_MINIX_FS=y · 91 unmodified lines
9292 CONFIG_NLS_CODEPAGE_932=y
9393 CONFIG_DEBUG_FS=y
9494 # CONFIG_CRYPTO_ANSI_CPRNG is not set
95−CONFIG_CRC_T10DIF=y
arch/sh/configs/sdk7780_defconfig+0−1
@@ -136,4 +136,3 @@ CONFIG_SH_STANDARD_BIOS=y · 135 unmodified lines
136136 CONFIG_CRYPTO_MD5=y
137137 CONFIG_CRYPTO_DES=y
138138 # CONFIG_CRYPTO_ANSI_CPRNG is not set
139−CONFIG_CRC_T10DIF=y
arch/sh/configs/se7206_defconfig+0−3
@@ -101,6 +101,3 @@ CONFIG_CRYPTO_DEFLATE=y · 100 unmodified lines
101101 CONFIG_CRYPTO_LZO=y
102102 # CONFIG_CRYPTO_ANSI_CPRNG is not set
103103 # CONFIG_CRYPTO_HW is not set
104−CONFIG_CRC_CCITT=y
105−CONFIG_CRC16=y
106−CONFIG_CRC_ITU_T=y
arch/sh/configs/se7712_defconfig+0−1
@@ -96,4 +96,3 @@ CONFIG_FRAME_POINTER=y · 95 unmodified lines
9696 CONFIG_CRYPTO_ECB=m
9797 CONFIG_CRYPTO_PCBC=m
9898 # CONFIG_CRYPTO_ANSI_CPRNG is not set
99−CONFIG_CRC_CCITT=y
arch/sh/configs/se7721_defconfig+0−1
@@ -122,4 +122,3 @@ CONFIG_DEBUG_KERNEL=y · 121 unmodified lines
122122 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
123123 CONFIG_FRAME_POINTER=y
124124 # CONFIG_CRYPTO_ANSI_CPRNG is not set
125−CONFIG_CRC_CCITT=y
arch/sh/configs/se7724_defconfig+0−1
@@ -128,4 +128,3 @@ CONFIG_NLS_ISO8859_1=y · 127 unmodified lines
128128 CONFIG_CRYPTO=y
129129 CONFIG_CRYPTO_CBC=y
130130 # CONFIG_CRYPTO_ANSI_CPRNG is not set
131−CONFIG_CRC_T10DIF=y
arch/sh/configs/sh03_defconfig+0−1
@@ -120,6 +120,5 @@ CONFIG_CRYPTO_HMAC=y · 119 unmodified lines
120120 CONFIG_CRYPTO_SHA1=y
121121 CONFIG_CRYPTO_DEFLATE=y
122122 # CONFIG_CRYPTO_ANSI_CPRNG is not set
123−CONFIG_CRC_CCITT=y
124123 CONFIG_RTC_CLASS=y
125124 CONFIG_RTC_DRV_GENERIC=y
arch/sh/configs/sh2007_defconfig+0−2
@@ -193,5 +193,3 @@ CONFIG_CRYPTO_DEFLATE=y · 192 unmodified lines
193193 CONFIG_CRYPTO_LZO=y
194194 # CONFIG_CRYPTO_ANSI_CPRNG is not set
195195 # CONFIG_CRYPTO_HW is not set
196−CONFIG_CRC_CCITT=y
197−CONFIG_CRC16=y
arch/sh/configs/sh7724_generic_defconfig+0−1
@@ -39,4 +39,3 @@ CONFIG_UIO_PDRV_GENIRQ=y · 38 unmodified lines
3939 # CONFIG_SYSFS is not set
4040 # CONFIG_MISC_FILESYSTEMS is not set
4141 # CONFIG_ENABLE_MUST_CHECK is not set
42−# CONFIG_CRC32 is not set
arch/sh/configs/sh7763rdp_defconfig+0−1
@@ -112,4 +112,3 @@ CONFIG_NLS_UTF8=y · 111 unmodified lines
112112 # CONFIG_ENABLE_MUST_CHECK is not set
113113 CONFIG_DEBUG_FS=y
114114 # CONFIG_CRYPTO_ANSI_CPRNG is not set
115−CONFIG_CRC_T10DIF=y
arch/sh/configs/sh7770_generic_defconfig+0−1
@@ -41,4 +41,3 @@ CONFIG_UIO_PDRV_GENIRQ=y · 40 unmodified lines
4141 # CONFIG_SYSFS is not set
4242 # CONFIG_MISC_FILESYSTEMS is not set
4343 # CONFIG_ENABLE_MUST_CHECK is not set
44−# CONFIG_CRC32 is not set
arch/sh/configs/titan_defconfig+0−1
@@ -264,4 +264,3 @@ CONFIG_CRYPTO_SERPENT=m · 263 unmodified lines
264264 CONFIG_CRYPTO_TEA=m
265265 CONFIG_CRYPTO_TWOFISH=m
266266 # CONFIG_CRYPTO_ANSI_CPRNG is not set
267−CONFIG_CRC16=m
arch/sparc/configs/sparc64_defconfig+0−1
@@ -229,7 +229,6 @@ CONFIG_CRYPTO_SERPENT=m · 228 unmodified lines
229229 CONFIG_CRYPTO_TEA=m
230230 CONFIG_CRYPTO_TWOFISH=m
231231 # CONFIG_CRYPTO_ANSI_CPRNG is not set
232−CONFIG_CRC16=m
233232 CONFIG_VCC=m
234233 CONFIG_PATA_CMD64X=y
235234 CONFIG_IP_PNP=y
arch/um/Makefile+1−0
@@ -154,5 +154,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated · 153 unmodified lines
154154 archclean:
155155 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
156156 -o -name '*.gcov' \) -type f -print | xargs rm -f
157+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
157158
158159 export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH
arch/um/include/asm/uaccess.h+2−0
@@ -55,6 +55,7 @@ do { \ · 54 unmodified lines
5555 goto err_label; \
5656 } \
5757 *((type *)dst) = get_unaligned((type *)(src)); \
58+ barrier(); \
5859 current->thread.segv_continue = NULL; \
5960 } while (0)
6061
@@ -66,6 +67,7 @@ do { \ · 5 unmodified lines
6667 if (__faulted) \
6768 goto err_label; \
6869 put_unaligned(*((type *)src), (type *)(dst)); \
70+ barrier(); \
6971 current->thread.segv_continue = NULL; \
7072 } while (0)
7173
arch/um/kernel/trap.c+13−13
@@ -225,20 +225,20 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, · 224 unmodified lines
225225 panic("Failed to sync kernel TLBs: %d", err);
226226 goto out;
227227 }
228− else if (current->mm == NULL) {
229− if (current->pagefault_disabled) {
230− if (!mc) {
231− show_regs(container_of(regs, struct pt_regs, regs));
232− panic("Segfault with pagefaults disabled but no mcontext");
233− }
234− if (!current->thread.segv_continue) {
235− show_regs(container_of(regs, struct pt_regs, regs));
236− panic("Segfault without recovery target");
237− }
238− mc_set_rip(mc, current->thread.segv_continue);
239− current->thread.segv_continue = NULL;
240− goto out;
228+ else if (current->pagefault_disabled) {
229+ if (!mc) {
230+ show_regs(container_of(regs, struct pt_regs, regs));
231+ panic("Segfault with pagefaults disabled but no mcontext");
241232 }
233+ if (!current->thread.segv_continue) {
234+ show_regs(container_of(regs, struct pt_regs, regs));
235+ panic("Segfault without recovery target");
236+ }
237+ mc_set_rip(mc, current->thread.segv_continue);
238+ current->thread.segv_continue = NULL;
239+ goto out;
240+ }
241+ else if (current->mm == NULL) {
242242 show_regs(container_of(regs, struct pt_regs, regs));
243243 panic("Segfault with no mm");
244244 }
arch/x86/Kconfig+13−0
@@ -2368,6 +2368,7 @@ config STRICT_SIGALTSTACK_SIZE · 2367 unmodified lines
23682368 config CFI_AUTO_DEFAULT
23692369 bool "Attempt to use FineIBT by default at boot time"
23702370 depends on FINEIBT
2371+ depends on !RUST || RUSTC_VERSION >= 108800
23712372 default y
23722373 help
23732374 Attempt to use FineIBT by default at boot time. If enabled,
@@ -2710,6 +2711,18 @@ config MITIGATION_SSB · 336 unmodified lines
27102711 of speculative execution in a similar way to the Meltdown and Spectre
27112712 security vulnerabilities.
27122713
2714+config MITIGATION_ITS
2715+ bool "Enable Indirect Target Selection mitigation"
2716+ depends on CPU_SUP_INTEL && X86_64
2717+ depends on MITIGATION_RETPOLINE && MITIGATION_RETHUNK
2718+ select EXECMEM
2719+ default y
2720+ help
2721+ Enable Indirect Target Selection (ITS) mitigation. ITS is a bug in
2722+ BPU on some Intel CPUs that may allow Spectre V2 style attacks. If
2723+ disabled, mitigation cannot be enabled via cmdline.
2724+ See <file:Documentation/admin-guide/hw-vuln/indirect-target-selection.rst>
2725+
27132726 endif
27142727
27152728 config ARCH_HAS_ADD_PAGES
arch/x86/boot/Makefile+1−1
@@ -59,7 +59,7 @@ KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH) · 58 unmodified lines
5959 $(obj)/bzImage: asflags-y := $(SVGA_MODE)
6060
6161 quiet_cmd_image = BUILD $@
62− cmd_image = cp $< $@; truncate -s %4K $@; cat $(obj)/vmlinux.bin >>$@
62+ cmd_image = (dd if=$< bs=4k conv=sync status=none; cat $(filter-out $<,$(real-prereqs))) >$@
6363
6464 $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin FORCE
6565 $(call if_changed,image)
arch/x86/boot/compressed/mem.c+1−1
@@ -38,7 +38,7 @@ void arch_accept_memory(phys_addr_t start, phys_addr_t end) · 37 unmodified lines
3838 if (early_is_tdx_guest()) {
3939 if (!tdx_accept_memory(start, end))
4040 panic("TDX: Failed to accept memory\n");
41− } else if (sev_snp_enabled()) {
41+ } else if (early_is_sevsnp_guest()) {
4242 snp_accept_memory(start, end);
4343 } else {
4444 error("Cannot accept memory: unknown platform\n");
arch/x86/boot/compressed/sev.c+55−52
@@ -164,10 +164,7 @@ bool sev_snp_enabled(void) · 163 unmodified lines
164164
165165 static void __page_state_change(unsigned long paddr, enum psc_op op)
166166 {
167− u64 val;
168−
169− if (!sev_snp_enabled())
170− return;
167+ u64 val, msr;
171168
172169 /*
173170 * If private -> shared then invalidate the page before requesting the
@@ -176,6 +173,9 @@ static void __page_state_change(unsigned long paddr, enum psc_op op) · 2 unmodified lines
176173 if (op == SNP_PAGE_STATE_SHARED)
177174 pvalidate_4k_page(paddr, paddr, false);
178175
176+ /* Save the current GHCB MSR value */
177+ msr = sev_es_rd_ghcb_msr();
178+
179179 /* Issue VMGEXIT to change the page state in RMP table. */
180180 sev_es_wr_ghcb_msr(GHCB_MSR_PSC_REQ_GFN(paddr >> PAGE_SHIFT, op));
181181 VMGEXIT();
@@ -185,6 +185,9 @@ static void __page_state_change(unsigned long paddr, enum psc_op op) · 3 unmodified lines
185185 if ((GHCB_RESP_CODE(val) != GHCB_MSR_PSC_RESP) || GHCB_MSR_PSC_RESP_VAL(val))
186186 sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PSC);
187187
188+ /* Restore the GHCB MSR value */
189+ sev_es_wr_ghcb_msr(msr);
190+
188191 /*
189192 * Now that page state is changed in the RMP table, validate it so that it is
190193 * consistent with the RMP entry.
@@ -195,11 +198,17 @@ static void __page_state_change(unsigned long paddr, enum psc_op op) · 4 unmodified lines
195198
196199 void snp_set_page_private(unsigned long paddr)
197200 {
201+ if (!sev_snp_enabled())
202+ return;
203+
198204 __page_state_change(paddr, SNP_PAGE_STATE_PRIVATE);
199205 }
200206
201207 void snp_set_page_shared(unsigned long paddr)
202208 {
209+ if (!sev_snp_enabled())
210+ return;
211+
203212 __page_state_change(paddr, SNP_PAGE_STATE_SHARED);
204213 }
205214
@@ -223,56 +232,10 @@ static bool early_setup_ghcb(void) · 17 unmodified lines
223232 return true;
224233 }
225234
226−static phys_addr_t __snp_accept_memory(struct snp_psc_desc *desc,
227− phys_addr_t pa, phys_addr_t pa_end)
228−{
229− struct psc_hdr *hdr;
230− struct psc_entry *e;
231− unsigned int i;
232−
233− hdr = &desc->hdr;
234− memset(hdr, 0, sizeof(*hdr));
235−
236− e = desc->entries;
237−
238− i = 0;
239− while (pa < pa_end && i < VMGEXIT_PSC_MAX_ENTRY) {
240− hdr->end_entry = i;
241−
242− e->gfn = pa >> PAGE_SHIFT;
243− e->operation = SNP_PAGE_STATE_PRIVATE;
244− if (IS_ALIGNED(pa, PMD_SIZE) && (pa_end - pa) >= PMD_SIZE) {
245− e->pagesize = RMP_PG_SIZE_2M;
246− pa += PMD_SIZE;
247− } else {
248− e->pagesize = RMP_PG_SIZE_4K;
249− pa += PAGE_SIZE;
250− }
251−
252− e++;
253− i++;
254− }
255−
256− if (vmgexit_psc(boot_ghcb, desc))
257− sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PSC);
258−
259− pvalidate_pages(desc);
260−
261− return pa;
262−}
263−
264235 void snp_accept_memory(phys_addr_t start, phys_addr_t end)
265236 {
266− struct snp_psc_desc desc = {};
267− unsigned int i;
268− phys_addr_t pa;
269−
270− if (!boot_ghcb && !early_setup_ghcb())
271− sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PSC);
272−
273− pa = start;
274− while (pa < end)
275− pa = __snp_accept_memory(&desc, pa, end);
237+ for (phys_addr_t pa = start; pa < end; pa += PAGE_SIZE)
238+ __page_state_change(pa, SNP_PAGE_STATE_PRIVATE);
276239 }
277240
278241 void sev_es_shutdown_ghcb(void)
@@ -682,3 +645,43 @@ void sev_prep_identity_maps(unsigned long top_level_pgt) · 403 unmodified lines
682645
683646 sev_verify_cbit(top_level_pgt);
684647 }
648+
649+bool early_is_sevsnp_guest(void)
650+{
651+ static bool sevsnp;
652+
653+ if (sevsnp)
654+ return true;
655+
656+ if (!(sev_get_status() & MSR_AMD64_SEV_SNP_ENABLED))
657+ return false;
658+
659+ sevsnp = true;
660+
661+ if (!snp_vmpl) {
662+ unsigned int eax, ebx, ecx, edx;
663+
664+ /*
665+ * CPUID Fn8000_001F_EAX[28] - SVSM support
666+ */
667+ eax = 0x8000001f;
668+ ecx = 0;
669+ native_cpuid(&eax, &ebx, &ecx, &edx);
670+ if (eax & BIT(28)) {
671+ struct msr m;
672+
673+ /* Obtain the address of the calling area to use */
674+ boot_rdmsr(MSR_SVSM_CAA, &m);
675+ boot_svsm_caa = (void *)m.q;
676+ boot_svsm_caa_pa = m.q;
677+
678+ /*
679+ * The real VMPL level cannot be discovered, but the
680+ * memory acceptance routines make no use of that so
681+ * any non-zero value suffices here.
682+ */
683+ snp_vmpl = U8_MAX;
684+ }
685+ }
686+ return true;
687+}
arch/x86/boot/compressed/sev.h+4−0
@@ -12,11 +12,15 @@ · 11 unmodified lines
1212
1313 bool sev_snp_enabled(void);
1414 void snp_accept_memory(phys_addr_t start, phys_addr_t end);
15+u64 sev_get_status(void);
16+bool early_is_sevsnp_guest(void);
1517
1618 #else
1719
1820 static inline bool sev_snp_enabled(void) { return false; }
1921 static inline void snp_accept_memory(phys_addr_t start, phys_addr_t end) { }
22+static inline u64 sev_get_status(void) { return 0; }
23+static inline bool early_is_sevsnp_guest(void) { return false; }
2024
2125 #endif
2226
arch/x86/coco/sev/core.c+165−90
@@ -959,6 +959,102 @@ void snp_accept_memory(phys_addr_t start, phys_addr_t end) · 958 unmodified lines
959959 set_pages_state(vaddr, npages, SNP_PAGE_STATE_PRIVATE);
960960 }
961961
962+static int vmgexit_ap_control(u64 event, struct sev_es_save_area *vmsa, u32 apic_id)
963+{
964+ bool create = event != SVM_VMGEXIT_AP_DESTROY;
965+ struct ghcb_state state;
966+ unsigned long flags;
967+ struct ghcb *ghcb;
968+ int ret = 0;
969+
970+ local_irq_save(flags);
971+
972+ ghcb = __sev_get_ghcb(&state);
973+
974+ vc_ghcb_invalidate(ghcb);
975+
976+ if (create)
977+ ghcb_set_rax(ghcb, vmsa->sev_features);
978+
979+ ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_AP_CREATION);
980+ ghcb_set_sw_exit_info_1(ghcb,
981+ ((u64)apic_id << 32) |
982+ ((u64)snp_vmpl << 16) |
983+ event);
984+ ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa));
985+
986+ sev_es_wr_ghcb_msr(__pa(ghcb));
987+ VMGEXIT();
988+
989+ if (!ghcb_sw_exit_info_1_is_valid(ghcb) ||
990+ lower_32_bits(ghcb->save.sw_exit_info_1)) {
991+ pr_err("SNP AP %s error\n", (create ? "CREATE" : "DESTROY"));
992+ ret = -EINVAL;
993+ }
994+
995+ __sev_put_ghcb(&state);
996+
997+ local_irq_restore(flags);
998+
999+ return ret;
1000+}
1001+
1002+static int snp_set_vmsa(void *va, void *caa, int apic_id, bool make_vmsa)
1003+{
1004+ int ret;
1005+
1006+ if (snp_vmpl) {
1007+ struct svsm_call call = {};
1008+ unsigned long flags;
1009+
1010+ local_irq_save(flags);
1011+
1012+ call.caa = this_cpu_read(svsm_caa);
1013+ call.rcx = __pa(va);
1014+
1015+ if (make_vmsa) {
1016+ /* Protocol 0, Call ID 2 */
1017+ call.rax = SVSM_CORE_CALL(SVSM_CORE_CREATE_VCPU);
1018+ call.rdx = __pa(caa);
1019+ call.r8 = apic_id;
1020+ } else {
1021+ /* Protocol 0, Call ID 3 */
1022+ call.rax = SVSM_CORE_CALL(SVSM_CORE_DELETE_VCPU);
1023+ }
1024+
1025+ ret = svsm_perform_call_protocol(&call);
1026+
1027+ local_irq_restore(flags);
1028+ } else {
1029+ /*
1030+ * If the kernel runs at VMPL0, it can change the VMSA
1031+ * bit for a page using the RMPADJUST instruction.
1032+ * However, for the instruction to succeed it must
1033+ * target the permissions of a lesser privileged (higher
1034+ * numbered) VMPL level, so use VMPL1.
1035+ */
1036+ u64 attrs = 1;
1037+
1038+ if (make_vmsa)
1039+ attrs |= RMPADJUST_VMSA_PAGE_BIT;
1040+
1041+ ret = rmpadjust((unsigned long)va, RMP_PG_SIZE_4K, attrs);
1042+ }
1043+
1044+ return ret;
1045+}
1046+
1047+static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa, int apic_id)
1048+{
1049+ int err;
1050+
1051+ err = snp_set_vmsa(vmsa, NULL, apic_id, false);
1052+ if (err)
1053+ pr_err("clear VMSA page failed (%u), leaking page\n", err);
1054+ else
1055+ free_page((unsigned long)vmsa);
1056+}
1057+
9621058 static void set_pte_enc(pte_t *kpte, int level, void *va)
9631059 {
9641060 struct pte_enc_desc d = {
@@ -1005,7 +1101,8 @@ static void unshare_all_memory(void) · 40 unmodified lines
10051101 data = per_cpu(runtime_data, cpu);
10061102 ghcb = (unsigned long)&data->ghcb_page;
10071103
1008− if (addr <= ghcb && ghcb <= addr + size) {
1104+ /* Handle the case of a huge page containing the GHCB page */
1105+ if (addr <= ghcb && ghcb < addr + size) {
10091106 skipped_addr = true;
10101107 break;
10111108 }
@@ -1055,11 +1152,70 @@ void snp_kexec_begin(void) · 43 unmodified lines
10551152 pr_warn("Failed to stop shared<->private conversions\n");
10561153 }
10571154
1155+/*
1156+ * Shutdown all APs except the one handling kexec/kdump and clearing
1157+ * the VMSA tag on AP's VMSA pages as they are not being used as
1158+ * VMSA page anymore.
1159+ */
1160+static void shutdown_all_aps(void)
1161+{
1162+ struct sev_es_save_area *vmsa;
1163+ int apic_id, this_cpu, cpu;
1164+
1165+ this_cpu = get_cpu();
1166+
1167+ /*
1168+ * APs are already in HLT loop when enc_kexec_finish() callback
1169+ * is invoked.
1170+ */
1171+ for_each_present_cpu(cpu) {
1172+ vmsa = per_cpu(sev_vmsa, cpu);
1173+
1174+ /*
1175+ * The BSP or offlined APs do not have guest allocated VMSA
1176+ * and there is no need to clear the VMSA tag for this page.
1177+ */
1178+ if (!vmsa)
1179+ continue;
1180+
1181+ /*
1182+ * Cannot clear the VMSA tag for the currently running vCPU.
1183+ */
1184+ if (this_cpu == cpu) {
1185+ unsigned long pa;
1186+ struct page *p;
1187+
1188+ pa = __pa(vmsa);
1189+ /*
1190+ * Mark the VMSA page of the running vCPU as offline
1191+ * so that is excluded and not touched by makedumpfile
1192+ * while generating vmcore during kdump.
1193+ */
1194+ p = pfn_to_online_page(pa >> PAGE_SHIFT);
1195+ if (p)
1196+ __SetPageOffline(p);
1197+ continue;
1198+ }
1199+
1200+ apic_id = cpuid_to_apicid[cpu];
1201+
1202+ /*
1203+ * Issue AP destroy to ensure AP gets kicked out of guest mode
1204+ * to allow using RMPADJUST to remove the VMSA tag on it's
1205+ * VMSA page.
1206+ */
1207+ vmgexit_ap_control(SVM_VMGEXIT_AP_DESTROY, vmsa, apic_id);
1208+ snp_cleanup_vmsa(vmsa, apic_id);
1209+ }
1210+
1211+ put_cpu();
1212+}
1213+
10581214 void snp_kexec_finish(void)
10591215 {
10601216 struct sev_es_runtime_data *data;
1217+ unsigned long size, addr;
10611218 unsigned int level, cpu;
1062− unsigned long size;
10631219 struct ghcb *ghcb;
10641220 pte_t *pte;
10651221
@@ -1069,6 +1225,8 @@ void snp_kexec_finish(void) · 3 unmodified lines
10691225 if (!IS_ENABLED(CONFIG_KEXEC_CORE))
10701226 return;
10711227
1228+ shutdown_all_aps();
1229+
10721230 unshare_all_memory();
10731231
10741232 /*
@@ -1085,54 +1243,11 @@ void snp_kexec_finish(void) · 10 unmodified lines
10851243 ghcb = &data->ghcb_page;
10861244 pte = lookup_address((unsigned long)ghcb, &level);
10871245 size = page_level_size(level);
1088− set_pte_enc(pte, level, (void *)ghcb);
1089− snp_set_memory_private((unsigned long)ghcb, (size / PAGE_SIZE));
1090− }
1091−}
1092−
1093−static int snp_set_vmsa(void *va, void *caa, int apic_id, bool make_vmsa)
1094−{
1095− int ret;
1096−
1097− if (snp_vmpl) {
1098− struct svsm_call call = {};
1099− unsigned long flags;
1100−
1101− local_irq_save(flags);
1102−
1103− call.caa = this_cpu_read(svsm_caa);
1104− call.rcx = __pa(va);
1105−
1106− if (make_vmsa) {
1107− /* Protocol 0, Call ID 2 */
1108− call.rax = SVSM_CORE_CALL(SVSM_CORE_CREATE_VCPU);
1109− call.rdx = __pa(caa);
1110− call.r8 = apic_id;
1111− } else {
1112− /* Protocol 0, Call ID 3 */
1113− call.rax = SVSM_CORE_CALL(SVSM_CORE_DELETE_VCPU);
1114− }
1115−
1116− ret = svsm_perform_call_protocol(&call);
1117−
1118− local_irq_restore(flags);
1119− } else {
1120− /*
1121− * If the kernel runs at VMPL0, it can change the VMSA
1122− * bit for a page using the RMPADJUST instruction.
1123− * However, for the instruction to succeed it must
1124− * target the permissions of a lesser privileged (higher
1125− * numbered) VMPL level, so use VMPL1.
1126− */
1127− u64 attrs = 1;
1128−
1129− if (make_vmsa)
1130− attrs |= RMPADJUST_VMSA_PAGE_BIT;
1131−
1132− ret = rmpadjust((unsigned long)va, RMP_PG_SIZE_4K, attrs);
1246+ /* Handle the case of a huge page containing the GHCB page */
1247+ addr = (unsigned long)ghcb & page_level_mask(level);
1248+ set_pte_enc(pte, level, (void *)addr);
1249+ snp_set_memory_private(addr, (size / PAGE_SIZE));
11331250 }
1134−
1135− return ret;
11361251 }
11371252
11381253 #define __ATTR_BASE (SVM_SELECTOR_P_MASK | SVM_SELECTOR_S_MASK)
@@ -1166,24 +1281,10 @@ static void *snp_alloc_vmsa_page(int cpu) · 27 unmodified lines
11661281 return page_address(p + 1);
11671282 }
11681283
1169−static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa, int apic_id)
1170−{
1171− int err;
1172−
1173− err = snp_set_vmsa(vmsa, NULL, apic_id, false);
1174− if (err)
1175− pr_err("clear VMSA page failed (%u), leaking page\n", err);
1176− else
1177− free_page((unsigned long)vmsa);
1178−}
1179−
11801284 static int wakeup_cpu_via_vmgexit(u32 apic_id, unsigned long start_ip)
11811285 {
11821286 struct sev_es_save_area *cur_vmsa, *vmsa;
1183− struct ghcb_state state;
11841287 struct svsm_ca *caa;
1185− unsigned long flags;
1186− struct ghcb *ghcb;
11871288 u8 sipi_vector;
11881289 int cpu, ret;
11891290 u64 cr4;
@@ -1297,33 +1398,7 @@ static int wakeup_cpu_via_vmgexit(u32 apic_id, unsigned long start_ip) · 107 unmodified lines
12971398 }
12981399
12991400 /* Issue VMGEXIT AP Creation NAE event */
1300− local_irq_save(flags);
1301−
1302− ghcb = __sev_get_ghcb(&state);
1303−
1304− vc_ghcb_invalidate(ghcb);
1305− ghcb_set_rax(ghcb, vmsa->sev_features);
1306− ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_AP_CREATION);
1307− ghcb_set_sw_exit_info_1(ghcb,
1308− ((u64)apic_id << 32) |
1309− ((u64)snp_vmpl << 16) |
1310− SVM_VMGEXIT_AP_CREATE);
1311− ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa));
1312−
1313− sev_es_wr_ghcb_msr(__pa(ghcb));
1314− VMGEXIT();
1315−
1316− if (!ghcb_sw_exit_info_1_is_valid(ghcb) ||
1317− lower_32_bits(ghcb->save.sw_exit_info_1)) {
1318− pr_err("SNP AP Creation error\n");
1319− ret = -EINVAL;
1320− }
1321−
1322− __sev_put_ghcb(&state);
1323−
1324− local_irq_restore(flags);
1325−
1326− /* Perform cleanup if there was an error */
1401+ ret = vmgexit_ap_control(SVM_VMGEXIT_AP_CREATE, vmsa, apic_id);
13271402 if (ret) {
13281403 snp_cleanup_vmsa(vmsa, apic_id);
13291404 vmsa = NULL;
arch/x86/entry/entry.S+5−4
@@ -17,19 +17,20 @@ · 16 unmodified lines
1717
1818 .pushsection .noinstr.text, "ax"
1919
20−SYM_FUNC_START(entry_ibpb)
20+/* Clobbers AX, CX, DX */
21+SYM_FUNC_START(write_ibpb)
2122 ANNOTATE_NOENDBR
2223 movl $MSR_IA32_PRED_CMD, %ecx
23− movl $PRED_CMD_IBPB, %eax
24+ movl _ASM_RIP(x86_pred_cmd), %eax
2425 xorl %edx, %edx
2526 wrmsr
2627
2728 /* Make sure IBPB clears return stack preductions too. */
2829 FILL_RETURN_BUFFER %rax, RSB_CLEAR_LOOPS, X86_BUG_IBPB_NO_RET
2930 RET
30−SYM_FUNC_END(entry_ibpb)
31+SYM_FUNC_END(write_ibpb)
3132 /* For KVM */
32−EXPORT_SYMBOL_GPL(entry_ibpb);
33+EXPORT_SYMBOL_GPL(write_ibpb);
3334
3435 .popsection
3536
arch/x86/entry/entry_64.S+17−3
@@ -1525,7 +1525,9 @@ SYM_CODE_END(rewind_stack_and_make_dead) · 1524 unmodified lines
15251525 * ORC to unwind properly.
15261526 *
15271527 * The alignment is for performance and not for safety, and may be safely
1528− * refactored in the future if needed.
1528+ * refactored in the future if needed. The .skips are for safety, to ensure
1529+ * that all RETs are in the second half of a cacheline to mitigate Indirect
1530+ * Target Selection, rather than taking the slowpath via its_return_thunk.
15291531 */
15301532 SYM_FUNC_START(clear_bhb_loop)
15311533 ANNOTATE_NOENDBR
@@ -1536,10 +1538,22 @@ SYM_FUNC_START(clear_bhb_loop) · 4 unmodified lines
15361538 call 1f
15371539 jmp 5f
15381540 .align 64, 0xcc
1541+ /*
1542+ * Shift instructions so that the RET is in the upper half of the
1543+ * cacheline and don't take the slowpath to its_return_thunk.
1544+ */
1545+ .skip 32 - (.Lret1 - 1f), 0xcc
15391546 ANNOTATE_INTRA_FUNCTION_CALL
15401547 1: call 2f
1541− RET
1548+.Lret1: RET
15421549 .align 64, 0xcc
1550+ /*
1551+ * As above shift instructions for RET at .Lret2 as well.
1552+ *
1553+ * This should be ideally be: .skip 32 - (.Lret2 - 2f), 0xcc
1554+ * but some Clang versions (e.g. 18) don't like this.
1555+ */
1556+ .skip 32 - 18, 0xcc
15431557 2: movl $5, %eax
15441558 3: jmp 4f
15451559 nop
@@ -1547,7 +1561,7 @@ SYM_FUNC_START(clear_bhb_loop) · 1 unmodified line
15471561 jnz 3b
15481562 sub $1, %ecx
15491563 jnz 1b
1550− RET
1564+.Lret2: RET
15511565 5: lfence
15521566 pop %rbp
15531567 RET
arch/x86/events/core.c+2−2
@@ -629,7 +629,7 @@ int x86_pmu_hw_config(struct perf_event *event) · 628 unmodified lines
629629 if (event->attr.type == event->pmu->type)
630630 event->hw.config |= x86_pmu_get_event_config(event);
631631
632− if (!event->attr.freq && x86_pmu.limit_period) {
632+ if (is_sampling_event(event) && !event->attr.freq && x86_pmu.limit_period) {
633633 s64 left = event->attr.sample_period;
634634 x86_pmu.limit_period(event, &left);
635635 if (left > event->attr.sample_period)
@@ -754,7 +754,7 @@ void x86_pmu_enable_all(int added) · 118 unmodified lines
754754 }
755755 }
756756
757−static inline int is_x86_event(struct perf_event *event)
757+int is_x86_event(struct perf_event *event)
758758 {
759759 int i;
760760
arch/x86/events/intel/core.c+21−5
@@ -3049,7 +3049,6 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status) · 3048 unmodified lines
30493049 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
30503050 int bit;
30513051 int handled = 0;
3052− u64 intel_ctrl = hybrid(cpuc->pmu, intel_ctrl);
30533052
30543053 inc_irq_stat(apic_perf_irqs);
30553054
@@ -3093,7 +3092,6 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status) · 37 unmodified lines
30933092 handled++;
30943093 x86_pmu_handle_guest_pebs(regs, &data);
30953094 static_call(x86_pmu_drain_pebs)(regs, &data);
3096− status &= intel_ctrl | GLOBAL_STATUS_TRACE_TOPAPMI;
30973095
30983096 /*
30993097 * PMI throttle may be triggered, which stops the PEBS event.
@@ -3104,6 +3102,15 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status) · 4 unmodified lines
31043102 */
31053103 if (pebs_enabled != cpuc->pebs_enabled)
31063104 wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled);
3105+
3106+ /*
3107+ * Above PEBS handler (PEBS counters snapshotting) has updated fixed
3108+ * counter 3 and perf metrics counts if they are in counter group,
3109+ * unnecessary to update again.
3110+ */
3111+ if (cpuc->events[INTEL_PMC_IDX_FIXED_SLOTS] &&
3112+ is_pebs_counter_event_group(cpuc->events[INTEL_PMC_IDX_FIXED_SLOTS]))
3113+ status &= ~GLOBAL_STATUS_PERF_METRICS_OVF_BIT;
31073114 }
31083115
31093116 /*
@@ -3123,6 +3130,8 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status) · 13 unmodified lines
31233130 static_call(intel_pmu_update_topdown_event)(NULL, NULL);
31243131 }
31253132
3133+ status &= hybrid(cpuc->pmu, intel_ctrl);
3134+
31263135 /*
31273136 * Checkpointed counters can lead to 'spurious' PMIs because the
31283137 * rollback caused by the PMI will have cleared the overflow status
@@ -4386,7 +4395,7 @@ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data) · 1257 unmodified lines
43864395 arr[pebs_enable] = (struct perf_guest_switch_msr){
43874396 .msr = MSR_IA32_PEBS_ENABLE,
43884397 .host = cpuc->pebs_enabled & ~cpuc->intel_ctrl_guest_mask,
4389− .guest = pebs_mask & ~cpuc->intel_ctrl_host_mask,
4398+ .guest = pebs_mask & ~cpuc->intel_ctrl_host_mask & kvm_pmu->pebs_enable,
43904399 };
43914400
43924401 if (arr[pebs_enable].host) {
@@ -7305,8 +7314,17 @@ __init int intel_pmu_init(void) · 2912 unmodified lines
73057314 name = "meteorlake_hybrid";
73067315 break;
73077316
7317+ case INTEL_PANTHERLAKE_L:
7318+ pr_cont("Pantherlake Hybrid events, ");
7319+ name = "pantherlake_hybrid";
7320+ goto lnl_common;
7321+
73087322 case INTEL_LUNARLAKE_M:
73097323 case INTEL_ARROWLAKE:
7324+ pr_cont("Lunarlake Hybrid events, ");
7325+ name = "lunarlake_hybrid";
7326+
7327+ lnl_common:
73107328 intel_pmu_init_hybrid(hybrid_big_small);
73117329
73127330 x86_pmu.pebs_latency_data = lnl_latency_data;
@@ -7328,8 +7346,6 @@ __init int intel_pmu_init(void) · 15 unmodified lines
73287346 intel_pmu_init_skt(&pmu->pmu);
73297347
73307348 intel_pmu_pebs_data_source_lnl();
7331− pr_cont("Lunarlake Hybrid events, ");
7332− name = "lunarlake_hybrid";
73337349 break;
73347350
73357351 case INTEL_ARROWLAKE_H:
arch/x86/events/intel/ds.c+29−9
@@ -1399,8 +1399,10 @@ static u64 pebs_update_adaptive_cfg(struct perf_event *event) · 1398 unmodified lines
13991399 * + precise_ip < 2 for the non event IP
14001400 * + For RTM TSX weight we need GPRs for the abort code.
14011401 */
1402− gprs = (sample_type & PERF_SAMPLE_REGS_INTR) &&
1403− (attr->sample_regs_intr & PEBS_GP_REGS);
1402+ gprs = ((sample_type & PERF_SAMPLE_REGS_INTR) &&
1403+ (attr->sample_regs_intr & PEBS_GP_REGS)) ||
1404+ ((sample_type & PERF_SAMPLE_REGS_USER) &&
1405+ (attr->sample_regs_user & PEBS_GP_REGS));
14041406
14051407 tsx_weight = (sample_type & PERF_SAMPLE_WEIGHT_TYPE) &&
14061408 ((attr->config & INTEL_ARCH_EVENT_MASK) ==
@@ -2123,7 +2125,7 @@ static void setup_pebs_adaptive_sample_data(struct perf_event *event, · 716 unmodified lines
21232125 regs->flags &= ~PERF_EFLAGS_EXACT;
21242126 }
21252127
2126− if (sample_type & PERF_SAMPLE_REGS_INTR)
2128+ if (sample_type & (PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER))
21272129 adaptive_pebs_save_regs(regs, gprs);
21282130 }
21292131
@@ -2377,8 +2379,25 @@ __intel_pmu_pebs_last_event(struct perf_event *event, · 247 unmodified lines
23772379 */
23782380 intel_pmu_save_and_restart_reload(event, count);
23792381 }
2380− } else
2381− intel_pmu_save_and_restart(event);
2382+ } else {
2383+ /*
2384+ * For a non-precise event, it's possible the
2385+ * counters-snapshotting records a positive value for the
2386+ * overflowed event. Then the HW auto-reload mechanism
2387+ * reset the counter to 0 immediately, because the
2388+ * pebs_event_reset is cleared if the PERF_X86_EVENT_AUTO_RELOAD
2389+ * is not set. The counter backwards may be observed in a
2390+ * PMI handler.
2391+ *
2392+ * Since the event value has been updated when processing the
2393+ * counters-snapshotting record, only needs to set the new
2394+ * period for the counter.
2395+ */
2396+ if (is_pebs_counter_event_group(event))
2397+ static_call(x86_pmu_set_period)(event);
2398+ else
2399+ intel_pmu_save_and_restart(event);
2400+ }
23822401 }
23832402
23842403 static __always_inline void
@@ -2446,8 +2465,9 @@ static void intel_pmu_drain_pebs_core(struct pt_regs *iregs, struct perf_sample_ · 61 unmodified lines
24462465 setup_pebs_fixed_sample_data);
24472466 }
24482467
2449−static void intel_pmu_pebs_event_update_no_drain(struct cpu_hw_events *cpuc, int size)
2468+static void intel_pmu_pebs_event_update_no_drain(struct cpu_hw_events *cpuc, u64 mask)
24502469 {
2470+ u64 pebs_enabled = cpuc->pebs_enabled & mask;
24512471 struct perf_event *event;
24522472 int bit;
24532473
@@ -2458,7 +2478,7 @@ static void intel_pmu_pebs_event_update_no_drain(struct cpu_hw_events *cpuc, int · 4 unmodified lines
24582478 * It needs to call intel_pmu_save_and_restart_reload() to
24592479 * update the event->count for this case.
24602480 */
2461− for_each_set_bit(bit, (unsigned long *)&cpuc->pebs_enabled, size) {
2481+ for_each_set_bit(bit, (unsigned long *)&pebs_enabled, X86_PMC_IDX_MAX) {
24622482 event = cpuc->events[bit];
24632483 if (event->hw.flags & PERF_X86_EVENT_AUTO_RELOAD)
24642484 intel_pmu_save_and_restart_reload(event, 0);
@@ -2493,7 +2513,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs, struct perf_sample_d · 28 unmodified lines
24932513 }
24942514
24952515 if (unlikely(base >= top)) {
2496− intel_pmu_pebs_event_update_no_drain(cpuc, size);
2516+ intel_pmu_pebs_event_update_no_drain(cpuc, mask);
24972517 return;
24982518 }
24992519
@@ -2607,7 +2627,7 @@ static void intel_pmu_drain_pebs_icl(struct pt_regs *iregs, struct perf_sample_d · 107 unmodified lines
26072627 (hybrid(cpuc->pmu, fixed_cntr_mask64) << INTEL_PMC_IDX_FIXED);
26082628
26092629 if (unlikely(base >= top)) {
2610− intel_pmu_pebs_event_update_no_drain(cpuc, X86_PMC_IDX_MAX);
2630+ intel_pmu_pebs_event_update_no_drain(cpuc, mask);
26112631 return;
26122632 }
26132633
arch/x86/events/intel/uncore_snbep.c+10−97
@@ -4891,28 +4891,28 @@ static struct uncore_event_desc snr_uncore_iio_freerunning_events[] = { · 4890 unmodified lines
48914891 INTEL_UNCORE_EVENT_DESC(ioclk, "event=0xff,umask=0x10"),
48924892 /* Free-Running IIO BANDWIDTH IN Counters */
48934893 INTEL_UNCORE_EVENT_DESC(bw_in_port0, "event=0xff,umask=0x20"),
4894− INTEL_UNCORE_EVENT_DESC(bw_in_port0.scale, "3.814697266e-6"),
4894+ INTEL_UNCORE_EVENT_DESC(bw_in_port0.scale, "3.0517578125e-5"),
48954895 INTEL_UNCORE_EVENT_DESC(bw_in_port0.unit, "MiB"),
48964896 INTEL_UNCORE_EVENT_DESC(bw_in_port1, "event=0xff,umask=0x21"),
4897− INTEL_UNCORE_EVENT_DESC(bw_in_port1.scale, "3.814697266e-6"),
4897+ INTEL_UNCORE_EVENT_DESC(bw_in_port1.scale, "3.0517578125e-5"),
48984898 INTEL_UNCORE_EVENT_DESC(bw_in_port1.unit, "MiB"),
48994899 INTEL_UNCORE_EVENT_DESC(bw_in_port2, "event=0xff,umask=0x22"),
4900− INTEL_UNCORE_EVENT_DESC(bw_in_port2.scale, "3.814697266e-6"),
4900+ INTEL_UNCORE_EVENT_DESC(bw_in_port2.scale, "3.0517578125e-5"),
49014901 INTEL_UNCORE_EVENT_DESC(bw_in_port2.unit, "MiB"),
49024902 INTEL_UNCORE_EVENT_DESC(bw_in_port3, "event=0xff,umask=0x23"),
4903− INTEL_UNCORE_EVENT_DESC(bw_in_port3.scale, "3.814697266e-6"),
4903+ INTEL_UNCORE_EVENT_DESC(bw_in_port3.scale, "3.0517578125e-5"),
49044904 INTEL_UNCORE_EVENT_DESC(bw_in_port3.unit, "MiB"),
49054905 INTEL_UNCORE_EVENT_DESC(bw_in_port4, "event=0xff,umask=0x24"),
4906− INTEL_UNCORE_EVENT_DESC(bw_in_port4.scale, "3.814697266e-6"),
4906+ INTEL_UNCORE_EVENT_DESC(bw_in_port4.scale, "3.0517578125e-5"),
49074907 INTEL_UNCORE_EVENT_DESC(bw_in_port4.unit, "MiB"),
49084908 INTEL_UNCORE_EVENT_DESC(bw_in_port5, "event=0xff,umask=0x25"),
4909− INTEL_UNCORE_EVENT_DESC(bw_in_port5.scale, "3.814697266e-6"),
4909+ INTEL_UNCORE_EVENT_DESC(bw_in_port5.scale, "3.0517578125e-5"),
49104910 INTEL_UNCORE_EVENT_DESC(bw_in_port5.unit, "MiB"),
49114911 INTEL_UNCORE_EVENT_DESC(bw_in_port6, "event=0xff,umask=0x26"),
4912− INTEL_UNCORE_EVENT_DESC(bw_in_port6.scale, "3.814697266e-6"),
4912+ INTEL_UNCORE_EVENT_DESC(bw_in_port6.scale, "3.0517578125e-5"),
49134913 INTEL_UNCORE_EVENT_DESC(bw_in_port6.unit, "MiB"),
49144914 INTEL_UNCORE_EVENT_DESC(bw_in_port7, "event=0xff,umask=0x27"),
4915− INTEL_UNCORE_EVENT_DESC(bw_in_port7.scale, "3.814697266e-6"),
4915+ INTEL_UNCORE_EVENT_DESC(bw_in_port7.scale, "3.0517578125e-5"),
49164916 INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"),
49174917 { /* end: all zeroes */ },
49184918 };
@@ -5485,37 +5485,6 @@ static struct freerunning_counters icx_iio_freerunning[] = { · 566 unmodified lines
54855485 [ICX_IIO_MSR_BW_IN] = { 0xaa0, 0x1, 0x10, 8, 48, icx_iio_bw_freerunning_box_offsets },
54865486 };
54875487
5488−static struct uncore_event_desc icx_uncore_iio_freerunning_events[] = {
5489− /* Free-Running IIO CLOCKS Counter */
5490− INTEL_UNCORE_EVENT_DESC(ioclk, "event=0xff,umask=0x10"),
5491− /* Free-Running IIO BANDWIDTH IN Counters */
5492− INTEL_UNCORE_EVENT_DESC(bw_in_port0, "event=0xff,umask=0x20"),
5493− INTEL_UNCORE_EVENT_DESC(bw_in_port0.scale, "3.814697266e-6"),
5494− INTEL_UNCORE_EVENT_DESC(bw_in_port0.unit, "MiB"),
5495− INTEL_UNCORE_EVENT_DESC(bw_in_port1, "event=0xff,umask=0x21"),
5496− INTEL_UNCORE_EVENT_DESC(bw_in_port1.scale, "3.814697266e-6"),
5497− INTEL_UNCORE_EVENT_DESC(bw_in_port1.unit, "MiB"),
5498− INTEL_UNCORE_EVENT_DESC(bw_in_port2, "event=0xff,umask=0x22"),
5499− INTEL_UNCORE_EVENT_DESC(bw_in_port2.scale, "3.814697266e-6"),
5500− INTEL_UNCORE_EVENT_DESC(bw_in_port2.unit, "MiB"),
5501− INTEL_UNCORE_EVENT_DESC(bw_in_port3, "event=0xff,umask=0x23"),
5502− INTEL_UNCORE_EVENT_DESC(bw_in_port3.scale, "3.814697266e-6"),
5503− INTEL_UNCORE_EVENT_DESC(bw_in_port3.unit, "MiB"),
5504− INTEL_UNCORE_EVENT_DESC(bw_in_port4, "event=0xff,umask=0x24"),
5505− INTEL_UNCORE_EVENT_DESC(bw_in_port4.scale, "3.814697266e-6"),
5506− INTEL_UNCORE_EVENT_DESC(bw_in_port4.unit, "MiB"),
5507− INTEL_UNCORE_EVENT_DESC(bw_in_port5, "event=0xff,umask=0x25"),
5508− INTEL_UNCORE_EVENT_DESC(bw_in_port5.scale, "3.814697266e-6"),
5509− INTEL_UNCORE_EVENT_DESC(bw_in_port5.unit, "MiB"),
5510− INTEL_UNCORE_EVENT_DESC(bw_in_port6, "event=0xff,umask=0x26"),
5511− INTEL_UNCORE_EVENT_DESC(bw_in_port6.scale, "3.814697266e-6"),
5512− INTEL_UNCORE_EVENT_DESC(bw_in_port6.unit, "MiB"),
5513− INTEL_UNCORE_EVENT_DESC(bw_in_port7, "event=0xff,umask=0x27"),
5514− INTEL_UNCORE_EVENT_DESC(bw_in_port7.scale, "3.814697266e-6"),
5515− INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"),
5516− { /* end: all zeroes */ },
5517−};
5518−
55195488 static struct intel_uncore_type icx_uncore_iio_free_running = {
55205489 .name = "iio_free_running",
55215490 .num_counters = 9,
@@ -5523,7 +5492,7 @@ static struct intel_uncore_type icx_uncore_iio_free_running = { · 1 unmodified line
55235492 .num_freerunning_types = ICX_IIO_FREERUNNING_TYPE_MAX,
55245493 .freerunning = icx_iio_freerunning,
55255494 .ops = &skx_uncore_iio_freerunning_ops,
5526− .event_descs = icx_uncore_iio_freerunning_events,
5495+ .event_descs = snr_uncore_iio_freerunning_events,
55275496 .format_group = &skx_uncore_iio_freerunning_format_group,
55285497 };
55295498
@@ -6320,69 +6289,13 @@ static struct freerunning_counters spr_iio_freerunning[] = { · 790 unmodified lines
63206289 [SPR_IIO_MSR_BW_OUT] = { 0x3808, 0x1, 0x10, 8, 48 },
63216290 };
63226291
6323−static struct uncore_event_desc spr_uncore_iio_freerunning_events[] = {
6324− /* Free-Running IIO CLOCKS Counter */
6325− INTEL_UNCORE_EVENT_DESC(ioclk, "event=0xff,umask=0x10"),
6326− /* Free-Running IIO BANDWIDTH IN Counters */
6327− INTEL_UNCORE_EVENT_DESC(bw_in_port0, "event=0xff,umask=0x20"),
6328− INTEL_UNCORE_EVENT_DESC(bw_in_port0.scale, "3.814697266e-6"),
6329− INTEL_UNCORE_EVENT_DESC(bw_in_port0.unit, "MiB"),
6330− INTEL_UNCORE_EVENT_DESC(bw_in_port1, "event=0xff,umask=0x21"),
6331− INTEL_UNCORE_EVENT_DESC(bw_in_port1.scale, "3.814697266e-6"),
6332− INTEL_UNCORE_EVENT_DESC(bw_in_port1.unit, "MiB"),
6333− INTEL_UNCORE_EVENT_DESC(bw_in_port2, "event=0xff,umask=0x22"),
6334− INTEL_UNCORE_EVENT_DESC(bw_in_port2.scale, "3.814697266e-6"),
6335− INTEL_UNCORE_EVENT_DESC(bw_in_port2.unit, "MiB"),
6336− INTEL_UNCORE_EVENT_DESC(bw_in_port3, "event=0xff,umask=0x23"),
6337− INTEL_UNCORE_EVENT_DESC(bw_in_port3.scale, "3.814697266e-6"),
6338− INTEL_UNCORE_EVENT_DESC(bw_in_port3.unit, "MiB"),
6339− INTEL_UNCORE_EVENT_DESC(bw_in_port4, "event=0xff,umask=0x24"),
6340− INTEL_UNCORE_EVENT_DESC(bw_in_port4.scale, "3.814697266e-6"),
6341− INTEL_UNCORE_EVENT_DESC(bw_in_port4.unit, "MiB"),
6342− INTEL_UNCORE_EVENT_DESC(bw_in_port5, "event=0xff,umask=0x25"),
6343− INTEL_UNCORE_EVENT_DESC(bw_in_port5.scale, "3.814697266e-6"),
6344− INTEL_UNCORE_EVENT_DESC(bw_in_port5.unit, "MiB"),
6345− INTEL_UNCORE_EVENT_DESC(bw_in_port6, "event=0xff,umask=0x26"),
6346− INTEL_UNCORE_EVENT_DESC(bw_in_port6.scale, "3.814697266e-6"),
6347− INTEL_UNCORE_EVENT_DESC(bw_in_port6.unit, "MiB"),
6348− INTEL_UNCORE_EVENT_DESC(bw_in_port7, "event=0xff,umask=0x27"),
6349− INTEL_UNCORE_EVENT_DESC(bw_in_port7.scale, "3.814697266e-6"),
6350− INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"),
6351− /* Free-Running IIO BANDWIDTH OUT Counters */
6352− INTEL_UNCORE_EVENT_DESC(bw_out_port0, "event=0xff,umask=0x30"),
6353− INTEL_UNCORE_EVENT_DESC(bw_out_port0.scale, "3.814697266e-6"),
6354− INTEL_UNCORE_EVENT_DESC(bw_out_port0.unit, "MiB"),
6355− INTEL_UNCORE_EVENT_DESC(bw_out_port1, "event=0xff,umask=0x31"),
6356− INTEL_UNCORE_EVENT_DESC(bw_out_port1.scale, "3.814697266e-6"),
6357− INTEL_UNCORE_EVENT_DESC(bw_out_port1.unit, "MiB"),
6358− INTEL_UNCORE_EVENT_DESC(bw_out_port2, "event=0xff,umask=0x32"),
6359− INTEL_UNCORE_EVENT_DESC(bw_out_port2.scale, "3.814697266e-6"),
6360− INTEL_UNCORE_EVENT_DESC(bw_out_port2.unit, "MiB"),
6361− INTEL_UNCORE_EVENT_DESC(bw_out_port3, "event=0xff,umask=0x33"),
6362− INTEL_UNCORE_EVENT_DESC(bw_out_port3.scale, "3.814697266e-6"),
6363− INTEL_UNCORE_EVENT_DESC(bw_out_port3.unit, "MiB"),
6364− INTEL_UNCORE_EVENT_DESC(bw_out_port4, "event=0xff,umask=0x34"),
6365− INTEL_UNCORE_EVENT_DESC(bw_out_port4.scale, "3.814697266e-6"),
6366− INTEL_UNCORE_EVENT_DESC(bw_out_port4.unit, "MiB"),
6367− INTEL_UNCORE_EVENT_DESC(bw_out_port5, "event=0xff,umask=0x35"),
6368− INTEL_UNCORE_EVENT_DESC(bw_out_port5.scale, "3.814697266e-6"),
6369− INTEL_UNCORE_EVENT_DESC(bw_out_port5.unit, "MiB"),
6370− INTEL_UNCORE_EVENT_DESC(bw_out_port6, "event=0xff,umask=0x36"),
6371− INTEL_UNCORE_EVENT_DESC(bw_out_port6.scale, "3.814697266e-6"),
6372− INTEL_UNCORE_EVENT_DESC(bw_out_port6.unit, "MiB"),
6373− INTEL_UNCORE_EVENT_DESC(bw_out_port7, "event=0xff,umask=0x37"),
6374− INTEL_UNCORE_EVENT_DESC(bw_out_port7.scale, "3.814697266e-6"),
6375− INTEL_UNCORE_EVENT_DESC(bw_out_port7.unit, "MiB"),
6376− { /* end: all zeroes */ },
6377−};
6378−
63796292 static struct intel_uncore_type spr_uncore_iio_free_running = {
63806293 .name = "iio_free_running",
63816294 .num_counters = 17,
63826295 .num_freerunning_types = SPR_IIO_FREERUNNING_TYPE_MAX,
63836296 .freerunning = spr_iio_freerunning,
63846297 .ops = &skx_uncore_iio_freerunning_ops,
6385− .event_descs = spr_uncore_iio_freerunning_events,
6298+ .event_descs = snr_uncore_iio_freerunning_events,
63866299 .format_group = &skx_uncore_iio_freerunning_format_group,
63876300 };
63886301
arch/x86/events/perf_event.h+9−2
@@ -110,14 +110,21 @@ static inline bool is_topdown_event(struct perf_event *event) · 109 unmodified lines
110110 return is_metric_event(event) || is_slots_event(event);
111111 }
112112
113+int is_x86_event(struct perf_event *event);
114+
115+static inline bool check_leader_group(struct perf_event *leader, int flags)
116+{
117+ return is_x86_event(leader) ? !!(leader->hw.flags & flags) : false;
118+}
119+
113120 static inline bool is_branch_counters_group(struct perf_event *event)
114121 {
115− return event->group_leader->hw.flags & PERF_X86_EVENT_BRANCH_COUNTERS;
122+ return check_leader_group(event->group_leader, PERF_X86_EVENT_BRANCH_COUNTERS);
116123 }
117124
118125 static inline bool is_pebs_counter_event_group(struct perf_event *event)
119126 {
120− return event->group_leader->hw.flags & PERF_X86_EVENT_PEBS_CNTR;
127+ return check_leader_group(event->group_leader, PERF_X86_EVENT_PEBS_CNTR);
121128 }
122129
123130 struct amd_nb {
arch/x86/include/asm/alternative.h+32−0
@@ -6,6 +6,7 @@ · 5 unmodified lines
66 #include <linux/stringify.h>
77 #include <linux/objtool.h>
88 #include <asm/asm.h>
9+#include <asm/bug.h>
910
1011 #define ALT_FLAGS_SHIFT 16
1112
@@ -124,6 +125,37 @@ static __always_inline int x86_call_depth_emit_accounting(u8 **pprog, · 112 unmodified lines
124125 }
125126 #endif
126127
128+#ifdef CONFIG_MITIGATION_ITS
129+extern void its_init_mod(struct module *mod);
130+extern void its_fini_mod(struct module *mod);
131+extern void its_free_mod(struct module *mod);
132+extern u8 *its_static_thunk(int reg);
133+#else /* CONFIG_MITIGATION_ITS */
134+static inline void its_init_mod(struct module *mod) { }
135+static inline void its_fini_mod(struct module *mod) { }
136+static inline void its_free_mod(struct module *mod) { }
137+static inline u8 *its_static_thunk(int reg)
138+{
139+ WARN_ONCE(1, "ITS not compiled in");
140+
141+ return NULL;
142+}
143+#endif
144+
145+#if defined(CONFIG_MITIGATION_RETHUNK) && defined(CONFIG_OBJTOOL)
146+extern bool cpu_wants_rethunk(void);
147+extern bool cpu_wants_rethunk_at(void *addr);
148+#else
149+static __always_inline bool cpu_wants_rethunk(void)
150+{
151+ return false;
152+}
153+static __always_inline bool cpu_wants_rethunk_at(void *addr)
154+{
155+ return false;
156+}
157+#endif
158+
127159 #ifdef CONFIG_SMP
128160 extern void alternatives_smp_module_add(struct module *mod, char *name,
129161 void *locks, void *locks_end,
arch/x86/include/asm/cpufeatures.h+4−1
@@ -75,7 +75,7 @@ · 74 unmodified lines
7575 #define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* "centaur_mcr" Centaur MCRs (= MTRRs) */
7676 #define X86_FEATURE_K8 ( 3*32+ 4) /* Opteron, Athlon64 */
7777 #define X86_FEATURE_ZEN5 ( 3*32+ 5) /* CPU based on Zen5 microarchitecture */
78−/* Free ( 3*32+ 6) */
78+#define X86_FEATURE_ZEN6 ( 3*32+ 6) /* CPU based on Zen6 microarchitecture */
7979 /* Free ( 3*32+ 7) */
8080 #define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* "constant_tsc" TSC ticks at a constant rate */
8181 #define X86_FEATURE_UP ( 3*32+ 9) /* "up" SMP kernel running on UP */
@@ -481,6 +481,7 @@ · 399 unmodified lines
481481 #define X86_FEATURE_AMD_HETEROGENEOUS_CORES (21*32 + 6) /* Heterogeneous Core Topology */
482482 #define X86_FEATURE_AMD_WORKLOAD_CLASS (21*32 + 7) /* Workload Classification */
483483 #define X86_FEATURE_PREFER_YMM (21*32 + 8) /* Avoid ZMM registers due to downclocking */
484+#define X86_FEATURE_INDIRECT_THUNK_ITS (21*32 + 9) /* Use thunk for indirect branches in lower half of cacheline */
484485
485486 /*
486487 * BUG word(s)
@@ -533,4 +534,6 @@ · 46 unmodified lines
533534 #define X86_BUG_BHI X86_BUG(1*32 + 3) /* "bhi" CPU is affected by Branch History Injection */
534535 #define X86_BUG_IBPB_NO_RET X86_BUG(1*32 + 4) /* "ibpb_no_ret" IBPB omits return target predictions */
535536 #define X86_BUG_SPECTRE_V2_USER X86_BUG(1*32 + 5) /* "spectre_v2_user" CPU is affected by Spectre variant 2 attack between user processes */
537+#define X86_BUG_ITS X86_BUG(1*32 + 6) /* "its" CPU is affected by Indirect Target Selection */
538+#define X86_BUG_ITS_NATIVE_ONLY X86_BUG(1*32 + 7) /* "its_native_only" CPU is affected by ITS, VMX is not affected */
536539 #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/intel-family.h+2−0
@@ -126,6 +126,8 @@ · 125 unmodified lines
126126 #define INTEL_GRANITERAPIDS_X IFM(6, 0xAD) /* Redwood Cove */
127127 #define INTEL_GRANITERAPIDS_D IFM(6, 0xAE)
128128
129+#define INTEL_BARTLETTLAKE IFM(6, 0xD7) /* Raptor Cove */
130+
129131 /* "Hybrid" Processors (P-Core/E-Core) */
130132
131133 #define INTEL_LAKEFIELD IFM(6, 0x8A) /* Sunny Cove / Tremont */
arch/x86/include/asm/kvm_host.h+12−1
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include <asm/mtrr.h>
3636 #include <asm/msr-index.h>
3737 #include <asm/asm.h>
38+#include <asm/irq_remapping.h>
3839 #include <asm/kvm_page_track.h>
3940 #include <asm/kvm_vcpu_regs.h>
4041 #include <asm/reboot.h>
@@ -1472,8 +1473,13 @@ struct kvm_arch { · 1431 unmodified lines
14721473 struct once nx_once;
14731474
14741475 #ifdef CONFIG_X86_64
1475− /* The number of TDP MMU pages across all roots. */
1476+#ifdef CONFIG_KVM_PROVE_MMU
1477+ /*
1478+ * The number of TDP MMU pages across all roots. Used only to sanity
1479+ * check that KVM isn't leaking TDP MMU pages.
1480+ */
14761481 atomic64_t tdp_mmu_pages;
1482+#endif
14771483
14781484 /*
14791485 * List of struct kvm_mmu_pages being used as roots.
@@ -2418,4 +2424,9 @@ int memslot_rmap_alloc(struct kvm_memory_slot *slot, unsigned long npages); · 938 unmodified lines
24182424 */
24192425 #define KVM_EXIT_HYPERCALL_MBZ GENMASK_ULL(31, 1)
24202426
2427+static inline bool kvm_arch_has_irq_bypass(void)
2428+{
2429+ return enable_apicv && irq_remapping_cap(IRQ_POSTING_CAP);
2430+}
2431+
24212432 #endif /* _ASM_X86_KVM_HOST_H */
arch/x86/include/asm/microcode.h+2−0
@@ -17,10 +17,12 @@ struct ucode_cpu_info { · 16 unmodified lines
1717 void load_ucode_bsp(void);
1818 void load_ucode_ap(void);
1919 void microcode_bsp_resume(void);
20+bool __init microcode_loader_disabled(void);
2021 #else
2122 static inline void load_ucode_bsp(void) { }
2223 static inline void load_ucode_ap(void) { }
2324 static inline void microcode_bsp_resume(void) { }
25+static inline bool __init microcode_loader_disabled(void) { return false; }
2426 #endif
2527
2628 extern unsigned long initrd_start_early;
arch/x86/include/asm/msr-index.h+8−0
@@ -211,6 +211,14 @@ · 210 unmodified lines
211211 * VERW clears CPU Register
212212 * File.
213213 */
214+#define ARCH_CAP_ITS_NO BIT_ULL(62) /*
215+ * Not susceptible to
216+ * Indirect Target Selection.
217+ * This bit is not set by
218+ * HW, but is synthesized by
219+ * VMMs for guests to know
220+ * their affected status.
221+ */
214222
215223 #define MSR_IA32_FLUSH_CMD 0x0000010b
216224 #define L1D_FLUSH BIT(0) /*
arch/x86/include/asm/nospec-branch.h+16−6
@@ -269,7 +269,7 @@ · 268 unmodified lines
269269 * typically has NO_MELTDOWN).
270270 *
271271 * While retbleed_untrain_ret() doesn't clobber anything but requires stack,
272− * entry_ibpb() will clobber AX, CX, DX.
272+ * write_ibpb() will clobber AX, CX, DX.
273273 *
274274 * As such, this must be placed after every *SWITCH_TO_KERNEL_CR3 at a point
275275 * where we have a stack but before any RET instruction.
@@ -279,7 +279,7 @@ · 3 unmodified lines
279279 VALIDATE_UNRET_END
280280 CALL_UNTRAIN_RET
281281 ALTERNATIVE_2 "", \
282− "call entry_ibpb", \ibpb_feature, \
282+ "call write_ibpb", \ibpb_feature, \
283283 __stringify(\call_depth_insns), X86_FEATURE_CALL_DEPTH
284284 #endif
285285 .endm
@@ -336,10 +336,14 @@ · 50 unmodified lines
336336
337337 #else /* __ASSEMBLER__ */
338338
339+#define ITS_THUNK_SIZE 64
340+
339341 typedef u8 retpoline_thunk_t[RETPOLINE_THUNK_SIZE];
342+typedef u8 its_thunk_t[ITS_THUNK_SIZE];
340343 extern retpoline_thunk_t __x86_indirect_thunk_array[];
341344 extern retpoline_thunk_t __x86_indirect_call_thunk_array[];
342345 extern retpoline_thunk_t __x86_indirect_jump_thunk_array[];
346+extern its_thunk_t __x86_indirect_its_thunk_array[];
343347
344348 #ifdef CONFIG_MITIGATION_RETHUNK
345349 extern void __x86_return_thunk(void);
@@ -363,12 +367,18 @@ static inline void srso_return_thunk(void) {} · 17 unmodified lines
363367 static inline void srso_alias_return_thunk(void) {}
364368 #endif
365369
370+#ifdef CONFIG_MITIGATION_ITS
371+extern void its_return_thunk(void);
372+#else
373+static inline void its_return_thunk(void) {}
374+#endif
375+
366376 extern void retbleed_return_thunk(void);
367377 extern void srso_return_thunk(void);
368378 extern void srso_alias_return_thunk(void);
369379
370380 extern void entry_untrain_ret(void);
371−extern void entry_ibpb(void);
381+extern void write_ibpb(void);
372382
373383 #ifdef CONFIG_X86_64
374384 extern void clear_bhb_loop(void);
@@ -514,11 +524,11 @@ void alternative_msr_write(unsigned int msr, u64 val, unsigned int feature) · 139 unmodified lines
514524 : "memory");
515525 }
516526
517−extern u64 x86_pred_cmd;
518−
519527 static inline void indirect_branch_prediction_barrier(void)
520528 {
521− alternative_msr_write(MSR_IA32_PRED_CMD, x86_pred_cmd, X86_FEATURE_IBPB);
529+ asm_inline volatile(ALTERNATIVE("", "call write_ibpb", X86_FEATURE_IBPB)
530+ : ASM_CALL_CONSTRAINT
531+ :: "rax", "rcx", "rdx", "memory");
522532 }
523533
524534 /* The Intel SPEC CTRL MSR base value cache */
arch/x86/include/asm/pgalloc.h+11−8
@@ -6,6 +6,8 @@ · 5 unmodified lines
66 #include <linux/mm.h> /* for struct page */
77 #include <linux/pagemap.h>
88
9+#include <asm/cpufeature.h>
10+
911 #define __HAVE_ARCH_PTE_ALLOC_ONE
1012 #define __HAVE_ARCH_PGD_FREE
1113 #include <asm-generic/pgalloc.h>
@@ -29,16 +31,17 @@ static inline void paravirt_release_pud(unsigned long pfn) {} · 17 unmodified lines
2931 static inline void paravirt_release_p4d(unsigned long pfn) {}
3032 #endif
3133
32−#ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
3334 /*
34− * Instead of one PGD, we acquire two PGDs. Being order-1, it is
35− * both 8k in size and 8k-aligned. That lets us just flip bit 12
36− * in a pointer to swap between the two 4k halves.
35+ * In case of Page Table Isolation active, we acquire two PGDs instead of one.
36+ * Being order-1, it is both 8k in size and 8k-aligned. That lets us just
37+ * flip bit 12 in a pointer to swap between the two 4k halves.
3738 */
38−#define PGD_ALLOCATION_ORDER 1
39−#else
40−#define PGD_ALLOCATION_ORDER 0
41−#endif
39+static inline unsigned int pgd_allocation_order(void)
40+{
41+ if (cpu_feature_enabled(X86_FEATURE_PTI))
42+ return 1;
43+ return 0;
44+}
4245
4346 /*
4447 * Allocate and free page tables.
arch/x86/include/asm/sev-common.h+1−1
@@ -116,7 +116,7 @@ enum psc_op { · 115 unmodified lines
116116 #define GHCB_MSR_VMPL_REQ 0x016
117117 #define GHCB_MSR_VMPL_REQ_LEVEL(v) \
118118 /* GHCBData[39:32] */ \
119− (((u64)(v) & GENMASK_ULL(7, 0) << 32) | \
119+ ((((u64)(v) & GENMASK_ULL(7, 0)) << 32) | \
120120 /* GHCBDdata[11:0] */ \
121121 GHCB_MSR_VMPL_REQ)
122122
arch/x86/include/asm/smap.h+6−6
@@ -16,23 +16,23 @@ · 15 unmodified lines
1616 #ifdef __ASSEMBLER__
1717
1818 #define ASM_CLAC \
19− ALTERNATIVE __stringify(ANNOTATE_IGNORE_ALTERNATIVE), "clac", X86_FEATURE_SMAP
19+ ALTERNATIVE "", "clac", X86_FEATURE_SMAP
2020
2121 #define ASM_STAC \
22− ALTERNATIVE __stringify(ANNOTATE_IGNORE_ALTERNATIVE), "stac", X86_FEATURE_SMAP
22+ ALTERNATIVE "", "stac", X86_FEATURE_SMAP
2323
2424 #else /* __ASSEMBLER__ */
2525
2626 static __always_inline void clac(void)
2727 {
2828 /* Note: a barrier is implicit in alternative() */
29− alternative(ANNOTATE_IGNORE_ALTERNATIVE "", "clac", X86_FEATURE_SMAP);
29+ alternative("", "clac", X86_FEATURE_SMAP);
3030 }
3131
3232 static __always_inline void stac(void)
3333 {
3434 /* Note: a barrier is implicit in alternative() */
35− alternative(ANNOTATE_IGNORE_ALTERNATIVE "", "stac", X86_FEATURE_SMAP);
35+ alternative("", "stac", X86_FEATURE_SMAP);
3636 }
3737
3838 static __always_inline unsigned long smap_save(void)
@@ -59,9 +59,9 @@ static __always_inline void smap_restore(unsigned long flags) · 20 unmodified lines
5959
6060 /* These macros can be used in asm() statements */
6161 #define ASM_CLAC \
62− ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "", "clac", X86_FEATURE_SMAP)
62+ ALTERNATIVE("", "clac", X86_FEATURE_SMAP)
6363 #define ASM_STAC \
64− ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "", "stac", X86_FEATURE_SMAP)
64+ ALTERNATIVE("", "stac", X86_FEATURE_SMAP)
6565
6666 #define ASM_CLAC_UNSAFE \
6767 ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "clac", X86_FEATURE_SMAP)
arch/x86/kernel/acpi/boot.c+11−0
@@ -23,6 +23,8 @@ · 22 unmodified lines
2323 #include <linux/serial_core.h>
2424 #include <linux/pgtable.h>
2525
26+#include <xen/xen.h>
27+
2628 #include <asm/e820/api.h>
2729 #include <asm/irqdomain.h>
2830 #include <asm/pci_x86.h>
@@ -1729,6 +1731,15 @@ int __init acpi_mps_check(void) · 1700 unmodified lines
17291731 {
17301732 #if defined(CONFIG_X86_LOCAL_APIC) && !defined(CONFIG_X86_MPPARSE)
17311733 /* mptable code is not built-in*/
1734+
1735+ /*
1736+ * Xen disables ACPI in PV DomU guests but it still emulates APIC and
1737+ * supports SMP. Returning early here ensures that APIC is not disabled
1738+ * unnecessarily and the guest is not limited to a single vCPU.
1739+ */
1740+ if (xen_pv_domain() && !xen_initial_domain())
1741+ return 0;
1742+
17321743 if (acpi_disabled || acpi_noirq) {
17331744 pr_warn("MPS support code is not built-in, using acpi=off or acpi=noirq or pci=noacpi may have problem\n");
17341745 return 1;
arch/x86/kernel/alternative.c+322−20
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 #include <linux/mmu_context.h>
1919 #include <linux/bsearch.h>
2020 #include <linux/sync_core.h>
21+#include <linux/execmem.h>
2122 #include <asm/text-patching.h>
2223 #include <asm/alternative.h>
2324 #include <asm/sections.h>
@@ -31,6 +32,8 @@ · 7 unmodified lines
3132 #include <asm/paravirt.h>
3233 #include <asm/asm-prototypes.h>
3334 #include <asm/cfi.h>
35+#include <asm/ibt.h>
36+#include <asm/set_memory.h>
3437
3538 int __read_mostly alternatives_patched;
3639
@@ -124,6 +127,171 @@ const unsigned char * const x86_nops[ASM_NOP_MAX+1] = · 87 unmodified lines
124127 #endif
125128 };
126129
130+#ifdef CONFIG_FINEIBT
131+static bool cfi_paranoid __ro_after_init;
132+#endif
133+
134+#ifdef CONFIG_MITIGATION_ITS
135+
136+#ifdef CONFIG_MODULES
137+static struct module *its_mod;
138+#endif
139+static void *its_page;
140+static unsigned int its_offset;
141+
142+/* Initialize a thunk with the "jmp *reg; int3" instructions. */
143+static void *its_init_thunk(void *thunk, int reg)
144+{
145+ u8 *bytes = thunk;
146+ int offset = 0;
147+ int i = 0;
148+
149+#ifdef CONFIG_FINEIBT
150+ if (cfi_paranoid) {
151+ /*
152+ * When ITS uses indirect branch thunk the fineibt_paranoid
153+ * caller sequence doesn't fit in the caller site. So put the
154+ * remaining part of the sequence (<ea> + JNE) into the ITS
155+ * thunk.
156+ */
157+ bytes[i++] = 0xea; /* invalid instruction */
158+ bytes[i++] = 0x75; /* JNE */
159+ bytes[i++] = 0xfd;
160+
161+ offset = 1;
162+ }
163+#endif
164+
165+ if (reg >= 8) {
166+ bytes[i++] = 0x41; /* REX.B prefix */
167+ reg -= 8;
168+ }
169+ bytes[i++] = 0xff;
170+ bytes[i++] = 0xe0 + reg; /* jmp *reg */
171+ bytes[i++] = 0xcc;
172+
173+ return thunk + offset;
174+}
175+
176+#ifdef CONFIG_MODULES
177+void its_init_mod(struct module *mod)
178+{
179+ if (!cpu_feature_enabled(X86_FEATURE_INDIRECT_THUNK_ITS))
180+ return;
181+
182+ mutex_lock(&text_mutex);
183+ its_mod = mod;
184+ its_page = NULL;
185+}
186+
187+void its_fini_mod(struct module *mod)
188+{
189+ if (!cpu_feature_enabled(X86_FEATURE_INDIRECT_THUNK_ITS))
190+ return;
191+
192+ WARN_ON_ONCE(its_mod != mod);
193+
194+ its_mod = NULL;
195+ its_page = NULL;
196+ mutex_unlock(&text_mutex);
197+
198+ for (int i = 0; i < mod->its_num_pages; i++) {
199+ void *page = mod->its_page_array[i];
200+ execmem_restore_rox(page, PAGE_SIZE);
201+ }
202+}
203+
204+void its_free_mod(struct module *mod)
205+{
206+ if (!cpu_feature_enabled(X86_FEATURE_INDIRECT_THUNK_ITS))
207+ return;
208+
209+ for (int i = 0; i < mod->its_num_pages; i++) {
210+ void *page = mod->its_page_array[i];
211+ execmem_free(page);
212+ }
213+ kfree(mod->its_page_array);
214+}
215+#endif /* CONFIG_MODULES */
216+
217+static void *its_alloc(void)
218+{
219+ void *page __free(execmem) = execmem_alloc(EXECMEM_MODULE_TEXT, PAGE_SIZE);
220+
221+ if (!page)
222+ return NULL;
223+
224+#ifdef CONFIG_MODULES
225+ if (its_mod) {
226+ void *tmp = krealloc(its_mod->its_page_array,
227+ (its_mod->its_num_pages+1) * sizeof(void *),
228+ GFP_KERNEL);
229+ if (!tmp)
230+ return NULL;
231+
232+ its_mod->its_page_array = tmp;
233+ its_mod->its_page_array[its_mod->its_num_pages++] = page;
234+
235+ execmem_make_temp_rw(page, PAGE_SIZE);
236+ }
237+#endif /* CONFIG_MODULES */
238+
239+ return no_free_ptr(page);
240+}
241+
242+static void *its_allocate_thunk(int reg)
243+{
244+ int size = 3 + (reg / 8);
245+ void *thunk;
246+
247+#ifdef CONFIG_FINEIBT
248+ /*
249+ * The ITS thunk contains an indirect jump and an int3 instruction so
250+ * its size is 3 or 4 bytes depending on the register used. If CFI
251+ * paranoid is used then 3 extra bytes are added in the ITS thunk to
252+ * complete the fineibt_paranoid caller sequence.
253+ */
254+ if (cfi_paranoid)
255+ size += 3;
256+#endif
257+
258+ if (!its_page || (its_offset + size - 1) >= PAGE_SIZE) {
259+ its_page = its_alloc();
260+ if (!its_page) {
261+ pr_err("ITS page allocation failed\n");
262+ return NULL;
263+ }
264+ memset(its_page, INT3_INSN_OPCODE, PAGE_SIZE);
265+ its_offset = 32;
266+ }
267+
268+ /*
269+ * If the indirect branch instruction will be in the lower half
270+ * of a cacheline, then update the offset to reach the upper half.
271+ */
272+ if ((its_offset + size - 1) % 64 < 32)
273+ its_offset = ((its_offset - 1) | 0x3F) + 33;
274+
275+ thunk = its_page + its_offset;
276+ its_offset += size;
277+
278+ return its_init_thunk(thunk, reg);
279+}
280+
281+u8 *its_static_thunk(int reg)
282+{
283+ u8 *thunk = __x86_indirect_its_thunk_array[reg];
284+
285+#ifdef CONFIG_FINEIBT
286+ /* Paranoid thunk starts 2 bytes before */
287+ if (cfi_paranoid)
288+ return thunk - 2;
289+#endif
290+ return thunk;
291+}
292+
293+#endif
294+
127295 /*
128296 * Nomenclature for variable names to simplify and clarify this code and ease
129297 * any potential staring at it:
@@ -581,7 +749,8 @@ static int emit_indirect(int op, int reg, u8 *bytes) · 451 unmodified lines
581749 return i;
582750 }
583751
584−static int emit_call_track_retpoline(void *addr, struct insn *insn, int reg, u8 *bytes)
752+static int __emit_trampoline(void *addr, struct insn *insn, u8 *bytes,
753+ void *call_dest, void *jmp_dest)
585754 {
586755 u8 op = insn->opcode.bytes[0];
587756 int i = 0;
@@ -602,7 +771,7 @@ static int emit_call_track_retpoline(void *addr, struct insn *insn, int reg, u8 · 14 unmodified lines
602771 switch (op) {
603772 case CALL_INSN_OPCODE:
604773 __text_gen_insn(bytes+i, op, addr+i,
605− __x86_indirect_call_thunk_array[reg],
774+ call_dest,
606775 CALL_INSN_SIZE);
607776 i += CALL_INSN_SIZE;
608777 break;
@@ -610,7 +779,7 @@ static int emit_call_track_retpoline(void *addr, struct insn *insn, int reg, u8 · 1 unmodified line
610779 case JMP32_INSN_OPCODE:
611780 clang_jcc:
612781 __text_gen_insn(bytes+i, op, addr+i,
613− __x86_indirect_jump_thunk_array[reg],
782+ jmp_dest,
614783 JMP32_INSN_SIZE);
615784 i += JMP32_INSN_SIZE;
616785 break;
@@ -625,6 +794,48 @@ clang_jcc: · 8 unmodified lines
625794 return i;
626795 }
627796
797+static int emit_call_track_retpoline(void *addr, struct insn *insn, int reg, u8 *bytes)
798+{
799+ return __emit_trampoline(addr, insn, bytes,
800+ __x86_indirect_call_thunk_array[reg],
801+ __x86_indirect_jump_thunk_array[reg]);
802+}
803+
804+#ifdef CONFIG_MITIGATION_ITS
805+static int emit_its_trampoline(void *addr, struct insn *insn, int reg, u8 *bytes)
806+{
807+ u8 *thunk = __x86_indirect_its_thunk_array[reg];
808+ u8 *tmp = its_allocate_thunk(reg);
809+
810+ if (tmp)
811+ thunk = tmp;
812+
813+ return __emit_trampoline(addr, insn, bytes, thunk, thunk);
814+}
815+
816+/* Check if an indirect branch is at ITS-unsafe address */
817+static bool cpu_wants_indirect_its_thunk_at(unsigned long addr, int reg)
818+{
819+ if (!cpu_feature_enabled(X86_FEATURE_INDIRECT_THUNK_ITS))
820+ return false;
821+
822+ /* Indirect branch opcode is 2 or 3 bytes depending on reg */
823+ addr += 1 + reg / 8;
824+
825+ /* Lower-half of the cacheline? */
826+ return !(addr & 0x20);
827+}
828+#else /* CONFIG_MITIGATION_ITS */
829+
830+#ifdef CONFIG_FINEIBT
831+static bool cpu_wants_indirect_its_thunk_at(unsigned long addr, int reg)
832+{
833+ return false;
834+}
835+#endif
836+
837+#endif /* CONFIG_MITIGATION_ITS */
838+
628839 /*
629840 * Rewrite the compiler generated retpoline thunk calls.
630841 *
@@ -699,6 +910,15 @@ static int patch_retpoline(void *addr, struct insn *insn, u8 *bytes) · 68 unmodified lines
699910 bytes[i++] = 0xe8; /* LFENCE */
700911 }
701912
913+#ifdef CONFIG_MITIGATION_ITS
914+ /*
915+ * Check if the address of last byte of emitted-indirect is in
916+ * lower-half of the cacheline. Such branches need ITS mitigation.
917+ */
918+ if (cpu_wants_indirect_its_thunk_at((unsigned long)addr + i, reg))
919+ return emit_its_trampoline(addr, insn, reg, bytes);
920+#endif
921+
702922 ret = emit_indirect(op, reg, bytes + i);
703923 if (ret < 0)
704924 return ret;
@@ -732,6 +952,7 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end) · 27 unmodified lines
732952 int len, ret;
733953 u8 bytes[16];
734954 u8 op1, op2;
955+ u8 *dest;
735956
736957 ret = insn_decode_kernel(&insn, addr);
737958 if (WARN_ON_ONCE(ret < 0))
@@ -748,6 +969,12 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end) · 10 unmodified lines
748969
749970 case CALL_INSN_OPCODE:
750971 case JMP32_INSN_OPCODE:
972+ /* Check for cfi_paranoid + ITS */
973+ dest = addr + insn.length + insn.immediate.value;
974+ if (dest[-1] == 0xea && (dest[0] & 0xf0) == 0x70) {
975+ WARN_ON_ONCE(cfi_mode != CFI_FINEIBT);
976+ continue;
977+ }
751978 break;
752979
753980 case 0x0f: /* escape */
@@ -775,6 +1002,21 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end) · 21 unmodified lines
7751002
7761003 #ifdef CONFIG_MITIGATION_RETHUNK
7771004
1005+bool cpu_wants_rethunk(void)
1006+{
1007+ return cpu_feature_enabled(X86_FEATURE_RETHUNK);
1008+}
1009+
1010+bool cpu_wants_rethunk_at(void *addr)
1011+{
1012+ if (!cpu_feature_enabled(X86_FEATURE_RETHUNK))
1013+ return false;
1014+ if (x86_return_thunk != its_return_thunk)
1015+ return true;
1016+
1017+ return !((unsigned long)addr & 0x20);
1018+}
1019+
7781020 /*
7791021 * Rewrite the compiler generated return thunk tail-calls.
7801022 *
@@ -791,7 +1033,7 @@ static int patch_return(void *addr, struct insn *insn, u8 *bytes) · 10 unmodified lines
7911033 int i = 0;
7921034
7931035 /* Patch the custom return thunks... */
794− if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
1036+ if (cpu_wants_rethunk_at(addr)) {
7951037 i = JMP32_INSN_SIZE;
7961038 __text_gen_insn(bytes, JMP32_INSN_OPCODE, addr, x86_return_thunk, i);
7971039 } else {
@@ -808,7 +1050,7 @@ void __init_or_module noinline apply_returns(s32 *start, s32 *end) · 10 unmodified lines
8081050 {
8091051 s32 *s;
8101052
811− if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
1053+ if (cpu_wants_rethunk())
8121054 static_call_force_reinit();
8131055
8141056 for (s = start; s < end; s++) {
@@ -1022,8 +1264,6 @@ int cfi_get_func_arity(void *func) · 207 unmodified lines
10221264 static bool cfi_rand __ro_after_init = true;
10231265 static u32 cfi_seed __ro_after_init;
10241266
1025−static bool cfi_paranoid __ro_after_init = false;
1026−
10271267 /*
10281268 * Re-hash the CFI hash with a boot-time seed while making sure the result is
10291269 * not a valid ENDBR instruction.
@@ -1436,6 +1676,19 @@ static int cfi_rand_callers(s32 *start, s32 *end) · 406 unmodified lines
14361676 return 0;
14371677 }
14381678
1679+static int emit_paranoid_trampoline(void *addr, struct insn *insn, int reg, u8 *bytes)
1680+{
1681+ u8 *thunk = (void *)__x86_indirect_its_thunk_array[reg] - 2;
1682+
1683+#ifdef CONFIG_MITIGATION_ITS
1684+ u8 *tmp = its_allocate_thunk(reg);
1685+ if (tmp)
1686+ thunk = tmp;
1687+#endif
1688+
1689+ return __emit_trampoline(addr, insn, bytes, thunk, thunk);
1690+}
1691+
14391692 static int cfi_rewrite_callers(s32 *start, s32 *end)
14401693 {
14411694 s32 *s;
@@ -1477,9 +1730,14 @@ static int cfi_rewrite_callers(s32 *start, s32 *end) · 35 unmodified lines
14771730 memcpy(bytes, fineibt_paranoid_start, fineibt_paranoid_size);
14781731 memcpy(bytes + fineibt_caller_hash, &hash, 4);
14791732
1480− ret = emit_indirect(op, 11, bytes + fineibt_paranoid_ind);
1481− if (WARN_ON_ONCE(ret != 3))
1482− continue;
1733+ if (cpu_wants_indirect_its_thunk_at((unsigned long)addr + fineibt_paranoid_ind, 11)) {
1734+ emit_paranoid_trampoline(addr + fineibt_caller_size,
1735+ &insn, 11, bytes + fineibt_caller_size);
1736+ } else {
1737+ ret = emit_indirect(op, 11, bytes + fineibt_paranoid_ind);
1738+ if (WARN_ON_ONCE(ret != 3))
1739+ continue;
1740+ }
14831741
14841742 text_poke_early(addr, bytes, fineibt_paranoid_size);
14851743 }
@@ -1706,29 +1964,66 @@ Efault: · 220 unmodified lines
17061964 return false;
17071965 }
17081966
1967+static bool is_paranoid_thunk(unsigned long addr)
1968+{
1969+ u32 thunk;
1970+
1971+ __get_kernel_nofault(&thunk, (u32 *)addr, u32, Efault);
1972+ return (thunk & 0x00FFFFFF) == 0xfd75ea;
1973+
1974+Efault:
1975+ return false;
1976+}
1977+
17091978 /*
17101979 * regs->ip points to a LOCK Jcc.d8 instruction from the fineibt_paranoid_start[]
1711− * sequence.
1980+ * sequence, or to an invalid instruction (0xea) + Jcc.d8 for cfi_paranoid + ITS
1981+ * thunk.
17121982 */
17131983 static bool decode_fineibt_paranoid(struct pt_regs *regs, unsigned long *target, u32 *type)
17141984 {
17151985 unsigned long addr = regs->ip - fineibt_paranoid_ud;
1716− u32 hash;
17171986
1718− if (!cfi_paranoid || !is_cfi_trap(addr + fineibt_caller_size - LEN_UD2))
1987+ if (!cfi_paranoid)
17191988 return false;
17201989
1721− __get_kernel_nofault(&hash, addr + fineibt_caller_hash, u32, Efault);
1722− *target = regs->r11 + fineibt_preamble_size;
1723− *type = regs->r10;
1990+ if (is_cfi_trap(addr + fineibt_caller_size - LEN_UD2)) {
1991+ *target = regs->r11 + fineibt_preamble_size;
1992+ *type = regs->r10;
1993+
1994+ /*
1995+ * Since the trapping instruction is the exact, but LOCK prefixed,
1996+ * Jcc.d8 that got us here, the normal fixup will work.
1997+ */
1998+ return true;
1999+ }
17242000
17252001 /*
1726− * Since the trapping instruction is the exact, but LOCK prefixed,
1727− * Jcc.d8 that got us here, the normal fixup will work.
2002+ * The cfi_paranoid + ITS thunk combination results in:
2003+ *
2004+ * 0: 41 ba 78 56 34 12 mov $0x12345678, %r10d
2005+ * 6: 45 3b 53 f7 cmp -0x9(%r11), %r10d
2006+ * a: 4d 8d 5b f0 lea -0x10(%r11), %r11
2007+ * e: 2e e8 XX XX XX XX cs call __x86_indirect_paranoid_thunk_r11
2008+ *
2009+ * Where the paranoid_thunk looks like:
2010+ *
2011+ * 1d: <ea> (bad)
2012+ * __x86_indirect_paranoid_thunk_r11:
2013+ * 1e: 75 fd jne 1d
2014+ * __x86_indirect_its_thunk_r11:
2015+ * 20: 41 ff eb jmp *%r11
2016+ * 23: cc int3
2017+ *
17282018 */
1729− return true;
2019+ if (is_paranoid_thunk(regs->ip)) {
2020+ *target = regs->r11 + fineibt_preamble_size;
2021+ *type = regs->r10;
2022+
2023+ regs->ip = *target;
2024+ return true;
2025+ }
17302026
1731−Efault:
17322027 return false;
17332028 }
17342029
@@ -2031,6 +2326,8 @@ static noinline void __init alt_reloc_selftest(void) · 296 unmodified lines
20312326
20322327 void __init alternative_instructions(void)
20332328 {
2329+ u64 ibt;
2330+
20342331 int3_selftest();
20352332
20362333 /*
@@ -2057,6 +2354,9 @@ void __init alternative_instructions(void) · 20 unmodified lines
20572354 */
20582355 paravirt_set_cap();
20592356
2357+ /* Keep CET-IBT disabled until caller/callee are patched */
2358+ ibt = ibt_save(/*disable*/ true);
2359+
20602360 __apply_fineibt(__retpoline_sites, __retpoline_sites_end,
20612361 __cfi_sites, __cfi_sites_end, true);
20622362
@@ -2080,6 +2380,8 @@ void __init alternative_instructions(void) · 17 unmodified lines
20802380 */
20812381 apply_seal_endbr(__ibt_endbr_seal, __ibt_endbr_seal_end);
20822382
2383+ ibt_restore(ibt);
2384+
20832385 #ifdef CONFIG_SMP
20842386 /* Patch to UP if other cpus not imminent. */
20852387 if (!noreplace_smp && (num_present_cpus() == 1 || setup_max_cpus <= 1)) {
arch/x86/kernel/cpu/amd.c+18−7
@@ -472,6 +472,11 @@ static void bsp_init_amd(struct cpuinfo_x86 *c) · 471 unmodified lines
472472 case 0x60 ... 0x7f:
473473 setup_force_cpu_cap(X86_FEATURE_ZEN5);
474474 break;
475+ case 0x50 ... 0x5f:
476+ case 0x90 ... 0xaf:
477+ case 0xc0 ... 0xcf:
478+ setup_force_cpu_cap(X86_FEATURE_ZEN6);
479+ break;
475480 default:
476481 goto warn;
477482 }
@@ -805,6 +810,7 @@ static void init_amd_bd(struct cpuinfo_x86 *c) · 327 unmodified lines
805810 static const struct x86_cpu_id erratum_1386_microcode[] = {
806811 X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x01), 0x2, 0x2, 0x0800126e),
807812 X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x31), 0x0, 0x0, 0x08301052),
813+ {}
808814 };
809815
810816 static void fix_erratum_1386(struct cpuinfo_x86 *c)
@@ -868,6 +874,16 @@ static void init_amd_zen1(struct cpuinfo_x86 *c) · 57 unmodified lines
868874
869875 pr_notice_once("AMD Zen1 DIV0 bug detected. Disable SMT for full protection.\n");
870876 setup_force_cpu_bug(X86_BUG_DIV0);
877+
878+ /*
879+ * Turn off the Instructions Retired free counter on machines that are
880+ * susceptible to erratum #1054 "Instructions Retired Performance
881+ * Counter May Be Inaccurate".
882+ */
883+ if (c->x86_model < 0x30) {
884+ msr_clear_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT);
885+ clear_cpu_cap(c, X86_FEATURE_IRPERF);
886+ }
871887 }
872888
873889 static bool cpu_has_zenbleed_microcode(void)
@@ -1051,13 +1067,8 @@ static void init_amd(struct cpuinfo_x86 *c) · 177 unmodified lines
10511067 if (!cpu_feature_enabled(X86_FEATURE_XENPV))
10521068 set_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS);
10531069
1054− /*
1055− * Turn on the Instructions Retired free counter on machines not
1056− * susceptible to erratum #1054 "Instructions Retired Performance
1057− * Counter May Be Inaccurate".
1058− */
1059− if (cpu_has(c, X86_FEATURE_IRPERF) &&
1060− (boot_cpu_has(X86_FEATURE_ZEN1) && c->x86_model > 0x2f))
1070+ /* Enable the Instructions Retired free counter */
1071+ if (cpu_has(c, X86_FEATURE_IRPERF))
10611072 msr_set_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT);
10621073
10631074 check_null_seg_clears_base(c);
arch/x86/kernel/cpu/bugs.c+200−77
@@ -49,6 +49,7 @@ static void __init srbds_select_mitigation(void); · 48 unmodified lines
4949 static void __init l1d_flush_select_mitigation(void);
5050 static void __init srso_select_mitigation(void);
5151 static void __init gds_select_mitigation(void);
52+static void __init its_select_mitigation(void);
5253
5354 /* The base value of the SPEC_CTRL MSR without task-specific bits set */
5455 u64 x86_spec_ctrl_base;
@@ -59,7 +60,6 @@ DEFINE_PER_CPU(u64, x86_spec_ctrl_current); · 4 unmodified lines
5960 EXPORT_PER_CPU_SYMBOL_GPL(x86_spec_ctrl_current);
6061
6162 u64 x86_pred_cmd __ro_after_init = PRED_CMD_IBPB;
62−EXPORT_SYMBOL_GPL(x86_pred_cmd);
6363
6464 static u64 __ro_after_init x86_arch_cap_msr;
6565
@@ -67,6 +67,14 @@ static DEFINE_MUTEX(spec_ctrl_mutex); · 1 unmodified line
6767
6868 void (*x86_return_thunk)(void) __ro_after_init = __x86_return_thunk;
6969
70+static void __init set_return_thunk(void *thunk)
71+{
72+ if (x86_return_thunk != __x86_return_thunk)
73+ pr_warn("x86/bugs: return thunk changed\n");
74+
75+ x86_return_thunk = thunk;
76+}
77+
7078 /* Update SPEC_CTRL MSR and its cached copy unconditionally */
7179 static void update_spec_ctrl(u64 val)
7280 {
@@ -179,6 +187,7 @@ void __init cpu_select_mitigations(void) · 106 unmodified lines
179187 */
180188 srso_select_mitigation();
181189 gds_select_mitigation();
190+ its_select_mitigation();
182191 }
183192
184193 /*
@@ -1119,7 +1128,7 @@ do_cmd_auto: · 934 unmodified lines
11191128 setup_force_cpu_cap(X86_FEATURE_RETHUNK);
11201129 setup_force_cpu_cap(X86_FEATURE_UNRET);
11211130
1122− x86_return_thunk = retbleed_return_thunk;
1131+ set_return_thunk(retbleed_return_thunk);
11231132
11241133 if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
11251134 boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
@@ -1142,7 +1151,7 @@ do_cmd_auto: · 16 unmodified lines
11421151 setup_clear_cpu_cap(X86_FEATURE_RETHUNK);
11431152
11441153 /*
1145− * There is no need for RSB filling: entry_ibpb() ensures
1154+ * There is no need for RSB filling: write_ibpb() ensures
11461155 * all predictions, including the RSB, are invalidated,
11471156 * regardless of IBPB implementation.
11481157 */
@@ -1154,7 +1163,7 @@ do_cmd_auto: · 5 unmodified lines
11541163 setup_force_cpu_cap(X86_FEATURE_RETHUNK);
11551164 setup_force_cpu_cap(X86_FEATURE_CALL_DEPTH);
11561165
1157− x86_return_thunk = call_depth_return_thunk;
1166+ set_return_thunk(call_depth_return_thunk);
11581167 break;
11591168
11601169 default:
@@ -1188,6 +1197,145 @@ do_cmd_auto: · 27 unmodified lines
11881197 pr_info("%s\n", retbleed_strings[retbleed_mitigation]);
11891198 }
11901199
1200+#undef pr_fmt
1201+#define pr_fmt(fmt) "ITS: " fmt
1202+
1203+enum its_mitigation_cmd {
1204+ ITS_CMD_OFF,
1205+ ITS_CMD_ON,
1206+ ITS_CMD_VMEXIT,
1207+ ITS_CMD_RSB_STUFF,
1208+};
1209+
1210+enum its_mitigation {
1211+ ITS_MITIGATION_OFF,
1212+ ITS_MITIGATION_VMEXIT_ONLY,
1213+ ITS_MITIGATION_ALIGNED_THUNKS,
1214+ ITS_MITIGATION_RETPOLINE_STUFF,
1215+};
1216+
1217+static const char * const its_strings[] = {
1218+ [ITS_MITIGATION_OFF] = "Vulnerable",
1219+ [ITS_MITIGATION_VMEXIT_ONLY] = "Mitigation: Vulnerable, KVM: Not affected",
1220+ [ITS_MITIGATION_ALIGNED_THUNKS] = "Mitigation: Aligned branch/return thunks",
1221+ [ITS_MITIGATION_RETPOLINE_STUFF] = "Mitigation: Retpolines, Stuffing RSB",
1222+};
1223+
1224+static enum its_mitigation its_mitigation __ro_after_init = ITS_MITIGATION_ALIGNED_THUNKS;
1225+
1226+static enum its_mitigation_cmd its_cmd __ro_after_init =
1227+ IS_ENABLED(CONFIG_MITIGATION_ITS) ? ITS_CMD_ON : ITS_CMD_OFF;
1228+
1229+static int __init its_parse_cmdline(char *str)
1230+{
1231+ if (!str)
1232+ return -EINVAL;
1233+
1234+ if (!IS_ENABLED(CONFIG_MITIGATION_ITS)) {
1235+ pr_err("Mitigation disabled at compile time, ignoring option (%s)", str);
1236+ return 0;
1237+ }
1238+
1239+ if (!strcmp(str, "off")) {
1240+ its_cmd = ITS_CMD_OFF;
1241+ } else if (!strcmp(str, "on")) {
1242+ its_cmd = ITS_CMD_ON;
1243+ } else if (!strcmp(str, "force")) {
1244+ its_cmd = ITS_CMD_ON;
1245+ setup_force_cpu_bug(X86_BUG_ITS);
1246+ } else if (!strcmp(str, "vmexit")) {
1247+ its_cmd = ITS_CMD_VMEXIT;
1248+ } else if (!strcmp(str, "stuff")) {
1249+ its_cmd = ITS_CMD_RSB_STUFF;
1250+ } else {
1251+ pr_err("Ignoring unknown indirect_target_selection option (%s).", str);
1252+ }
1253+
1254+ return 0;
1255+}
1256+early_param("indirect_target_selection", its_parse_cmdline);
1257+
1258+static void __init its_select_mitigation(void)
1259+{
1260+ enum its_mitigation_cmd cmd = its_cmd;
1261+
1262+ if (!boot_cpu_has_bug(X86_BUG_ITS) || cpu_mitigations_off()) {
1263+ its_mitigation = ITS_MITIGATION_OFF;
1264+ return;
1265+ }
1266+
1267+ /* Retpoline+CDT mitigates ITS, bail out */
1268+ if (boot_cpu_has(X86_FEATURE_RETPOLINE) &&
1269+ boot_cpu_has(X86_FEATURE_CALL_DEPTH)) {
1270+ its_mitigation = ITS_MITIGATION_RETPOLINE_STUFF;
1271+ goto out;
1272+ }
1273+
1274+ /* Exit early to avoid irrelevant warnings */
1275+ if (cmd == ITS_CMD_OFF) {
1276+ its_mitigation = ITS_MITIGATION_OFF;
1277+ goto out;
1278+ }
1279+ if (spectre_v2_enabled == SPECTRE_V2_NONE) {
1280+ pr_err("WARNING: Spectre-v2 mitigation is off, disabling ITS\n");
1281+ its_mitigation = ITS_MITIGATION_OFF;
1282+ goto out;
1283+ }
1284+ if (!IS_ENABLED(CONFIG_MITIGATION_RETPOLINE) ||
1285+ !IS_ENABLED(CONFIG_MITIGATION_RETHUNK)) {
1286+ pr_err("WARNING: ITS mitigation depends on retpoline and rethunk support\n");
1287+ its_mitigation = ITS_MITIGATION_OFF;
1288+ goto out;
1289+ }
1290+ if (IS_ENABLED(CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B)) {
1291+ pr_err("WARNING: ITS mitigation is not compatible with CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B\n");
1292+ its_mitigation = ITS_MITIGATION_OFF;
1293+ goto out;
1294+ }
1295+ if (boot_cpu_has(X86_FEATURE_RETPOLINE_LFENCE)) {
1296+ pr_err("WARNING: ITS mitigation is not compatible with lfence mitigation\n");
1297+ its_mitigation = ITS_MITIGATION_OFF;
1298+ goto out;
1299+ }
1300+
1301+ if (cmd == ITS_CMD_RSB_STUFF &&
1302+ (!boot_cpu_has(X86_FEATURE_RETPOLINE) || !IS_ENABLED(CONFIG_MITIGATION_CALL_DEPTH_TRACKING))) {
1303+ pr_err("RSB stuff mitigation not supported, using default\n");
1304+ cmd = ITS_CMD_ON;
1305+ }
1306+
1307+ switch (cmd) {
1308+ case ITS_CMD_OFF:
1309+ its_mitigation = ITS_MITIGATION_OFF;
1310+ break;
1311+ case ITS_CMD_VMEXIT:
1312+ if (boot_cpu_has_bug(X86_BUG_ITS_NATIVE_ONLY)) {
1313+ its_mitigation = ITS_MITIGATION_VMEXIT_ONLY;
1314+ goto out;
1315+ }
1316+ fallthrough;
1317+ case ITS_CMD_ON:
1318+ its_mitigation = ITS_MITIGATION_ALIGNED_THUNKS;
1319+ if (!boot_cpu_has(X86_FEATURE_RETPOLINE))
1320+ setup_force_cpu_cap(X86_FEATURE_INDIRECT_THUNK_ITS);
1321+ setup_force_cpu_cap(X86_FEATURE_RETHUNK);
1322+ set_return_thunk(its_return_thunk);
1323+ break;
1324+ case ITS_CMD_RSB_STUFF:
1325+ its_mitigation = ITS_MITIGATION_RETPOLINE_STUFF;
1326+ setup_force_cpu_cap(X86_FEATURE_RETHUNK);
1327+ setup_force_cpu_cap(X86_FEATURE_CALL_DEPTH);
1328+ set_return_thunk(call_depth_return_thunk);
1329+ if (retbleed_mitigation == RETBLEED_MITIGATION_NONE) {
1330+ retbleed_mitigation = RETBLEED_MITIGATION_STUFF;
1331+ pr_info("Retbleed mitigation updated to stuffing\n");
1332+ }
1333+ break;
1334+ }
1335+out:
1336+ pr_info("%s\n", its_strings[its_mitigation]);
1337+}
1338+
11911339 #undef pr_fmt
11921340 #define pr_fmt(fmt) "Spectre V2 : " fmt
11931341
@@ -1592,51 +1740,54 @@ static void __init spec_ctrl_disable_kernel_rrsba(void) · 398 unmodified lines
15921740 rrsba_disabled = true;
15931741 }
15941742
1595−static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_mitigation mode)
1743+static void __init spectre_v2_select_rsb_mitigation(enum spectre_v2_mitigation mode)
15961744 {
15971745 /*
1598− * Similar to context switches, there are two types of RSB attacks
1599− * after VM exit:
1746+ * WARNING! There are many subtleties to consider when changing *any*
1747+ * code related to RSB-related mitigations. Before doing so, carefully
1748+ * read the following document, and update if necessary:
16001749 *
1601− * 1) RSB underflow
1750+ * Documentation/admin-guide/hw-vuln/rsb.rst
16021751 *
1603− * 2) Poisoned RSB entry
1752+ * In an overly simplified nutshell:
16041753 *
1605− * When retpoline is enabled, both are mitigated by filling/clearing
1606− * the RSB.
1754+ * - User->user RSB attacks are conditionally mitigated during
1755+ * context switches by cond_mitigation -> write_ibpb().
16071756 *
1608− * When IBRS is enabled, while #1 would be mitigated by the IBRS branch
1609− * prediction isolation protections, RSB still needs to be cleared
1610− * because of #2. Note that SMEP provides no protection here, unlike
1611− * user-space-poisoned RSB entries.
1757+ * - User->kernel and guest->host attacks are mitigated by eIBRS or
1758+ * RSB filling.
16121759 *
1613− * eIBRS should protect against RSB poisoning, but if the EIBRS_PBRSB
1614− * bug is present then a LITE version of RSB protection is required,
1615− * just a single call needs to retire before a RET is executed.
1760+ * Though, depending on config, note that other alternative
1761+ * mitigations may end up getting used instead, e.g., IBPB on
1762+ * entry/vmexit, call depth tracking, or return thunks.
16161763 */
1764+
16171765 switch (mode) {
16181766 case SPECTRE_V2_NONE:
1619− return;
1767+ break;
16201768
1621− case SPECTRE_V2_EIBRS_LFENCE:
16221769 case SPECTRE_V2_EIBRS:
1770+ case SPECTRE_V2_EIBRS_LFENCE:
1771+ case SPECTRE_V2_EIBRS_RETPOLINE:
16231772 if (boot_cpu_has_bug(X86_BUG_EIBRS_PBRSB)) {
1624− setup_force_cpu_cap(X86_FEATURE_RSB_VMEXIT_LITE);
16251773 pr_info("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n");
1774+ setup_force_cpu_cap(X86_FEATURE_RSB_VMEXIT_LITE);
16261775 }
1627− return;
1776+ break;
16281777
1629− case SPECTRE_V2_EIBRS_RETPOLINE:
16301778 case SPECTRE_V2_RETPOLINE:
16311779 case SPECTRE_V2_LFENCE:
16321780 case SPECTRE_V2_IBRS:
1781+ pr_info("Spectre v2 / SpectreRSB: Filling RSB on context switch and VMEXIT\n");
1782+ setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW);
16331783 setup_force_cpu_cap(X86_FEATURE_RSB_VMEXIT);
1634− pr_info("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n");
1635− return;
1636− }
1784+ break;
16371785
1638− pr_warn_once("Unknown Spectre v2 mode, disabling RSB mitigation at VM exit");
1639− dump_stack();
1786+ default:
1787+ pr_warn_once("Unknown Spectre v2 mode, disabling RSB mitigation\n");
1788+ dump_stack();
1789+ break;
1790+ }
16401791 }
16411792
16421793 /*
@@ -1695,11 +1846,11 @@ static void __init bhi_select_mitigation(void) · 52 unmodified lines
16951846 return;
16961847 }
16971848
1698− /* Mitigate in hardware if supported */
1699− if (spec_ctrl_bhi_dis())
1849+ if (!IS_ENABLED(CONFIG_X86_64))
17001850 return;
17011851
1702− if (!IS_ENABLED(CONFIG_X86_64))
1852+ /* Mitigate in hardware if supported */
1853+ if (spec_ctrl_bhi_dis())
17031854 return;
17041855
17051856 if (bhi_mitigation == BHI_MITIGATION_VMEXIT_ONLY) {
@@ -1830,48 +1981,7 @@ static void __init spectre_v2_select_mitigation(void) · 124 unmodified lines
18301981 spectre_v2_enabled = mode;
18311982 pr_info("%s\n", spectre_v2_strings[mode]);
18321983
1833− /*
1834− * If Spectre v2 protection has been enabled, fill the RSB during a
1835− * context switch. In general there are two types of RSB attacks
1836− * across context switches, for which the CALLs/RETs may be unbalanced.
1837− *
1838− * 1) RSB underflow
1839− *
1840− * Some Intel parts have "bottomless RSB". When the RSB is empty,
1841− * speculated return targets may come from the branch predictor,
1842− * which could have a user-poisoned BTB or BHB entry.
1843− *
1844− * AMD has it even worse: *all* returns are speculated from the BTB,
1845− * regardless of the state of the RSB.
1846− *
1847− * When IBRS or eIBRS is enabled, the "user -> kernel" attack
1848− * scenario is mitigated by the IBRS branch prediction isolation
1849− * properties, so the RSB buffer filling wouldn't be necessary to
1850− * protect against this type of attack.
1851− *
1852− * The "user -> user" attack scenario is mitigated by RSB filling.
1853− *
1854− * 2) Poisoned RSB entry
1855− *
1856− * If the 'next' in-kernel return stack is shorter than 'prev',
1857− * 'next' could be tricked into speculating with a user-poisoned RSB
1858− * entry.
1859− *
1860− * The "user -> kernel" attack scenario is mitigated by SMEP and
1861− * eIBRS.
1862− *
1863− * The "user -> user" scenario, also known as SpectreBHB, requires
1864− * RSB clearing.
1865− *
1866− * So to mitigate all cases, unconditionally fill RSB on context
1867− * switches.
1868− *
1869− * FIXME: Is this pointless for retbleed-affected AMD?
1870− */
1871− setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW);
1872− pr_info("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n");
1873−
1874− spectre_v2_determine_rsb_fill_type_at_vmexit(mode);
1984+ spectre_v2_select_rsb_mitigation(mode);
18751985
18761986 /*
18771987 * Retpoline protects the kernel, but doesn't protect firmware. IBRS
@@ -2646,10 +2756,10 @@ static void __init srso_select_mitigation(void) · 768 unmodified lines
26462756
26472757 if (boot_cpu_data.x86 == 0x19) {
26482758 setup_force_cpu_cap(X86_FEATURE_SRSO_ALIAS);
2649− x86_return_thunk = srso_alias_return_thunk;
2759+ set_return_thunk(srso_alias_return_thunk);
26502760 } else {
26512761 setup_force_cpu_cap(X86_FEATURE_SRSO);
2652− x86_return_thunk = srso_return_thunk;
2762+ set_return_thunk(srso_return_thunk);
26532763 }
26542764 if (has_microcode)
26552765 srso_mitigation = SRSO_MITIGATION_SAFE_RET;
@@ -2676,7 +2786,7 @@ static void __init srso_select_mitigation(void) · 20 unmodified lines
26762786 setup_clear_cpu_cap(X86_FEATURE_RETHUNK);
26772787
26782788 /*
2679− * There is no need for RSB filling: entry_ibpb() ensures
2789+ * There is no need for RSB filling: write_ibpb() ensures
26802790 * all predictions, including the RSB, are invalidated,
26812791 * regardless of IBPB implementation.
26822792 */
@@ -2701,7 +2811,7 @@ ibpb_on_vmexit: · 18 unmodified lines
27012811 srso_mitigation = SRSO_MITIGATION_IBPB_ON_VMEXIT;
27022812
27032813 /*
2704− * There is no need for RSB filling: entry_ibpb() ensures
2814+ * There is no need for RSB filling: write_ibpb() ensures
27052815 * all predictions, including the RSB, are invalidated,
27062816 * regardless of IBPB implementation.
27072817 */
@@ -2839,6 +2949,11 @@ static ssize_t rfds_show_state(char *buf) · 131 unmodified lines
28392949 return sysfs_emit(buf, "%s\n", rfds_strings[rfds_mitigation]);
28402950 }
28412951
2952+static ssize_t its_show_state(char *buf)
2953+{
2954+ return sysfs_emit(buf, "%s\n", its_strings[its_mitigation]);
2955+}
2956+
28422957 static char *stibp_state(void)
28432958 {
28442959 if (spectre_v2_in_eibrs_mode(spectre_v2_enabled) &&
@@ -3021,6 +3136,9 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr · 176 unmodified lines
30213136 case X86_BUG_RFDS:
30223137 return rfds_show_state(buf);
30233138
3139+ case X86_BUG_ITS:
3140+ return its_show_state(buf);
3141+
30243142 default:
30253143 break;
30263144 }
@@ -3100,6 +3218,11 @@ ssize_t cpu_show_reg_file_data_sampling(struct device *dev, struct device_attrib · 73 unmodified lines
31003218 {
31013219 return cpu_show_common(dev, attr, buf, X86_BUG_RFDS);
31023220 }
3221+
3222+ssize_t cpu_show_indirect_target_selection(struct device *dev, struct device_attribute *attr, char *buf)
3223+{
3224+ return cpu_show_common(dev, attr, buf, X86_BUG_ITS);
3225+}
31033226 #endif
31043227
31053228 void __warn_thunk(void)
arch/x86/kernel/cpu/common.c+57−15
@@ -1227,6 +1227,10 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = { · 1226 unmodified lines
12271227 #define GDS BIT(6)
12281228 /* CPU is affected by Register File Data Sampling */
12291229 #define RFDS BIT(7)
1230+/* CPU is affected by Indirect Target Selection */
1231+#define ITS BIT(8)
1232+/* CPU is affected by Indirect Target Selection, but guest-host isolation is not affected */
1233+#define ITS_NATIVE_ONLY BIT(9)
12301234
12311235 static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = {
12321236 VULNBL_INTEL_STEPS(INTEL_IVYBRIDGE, X86_STEP_MAX, SRBDS),
@@ -1238,22 +1242,25 @@ static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = { · 5 unmodified lines
12381242 VULNBL_INTEL_STEPS(INTEL_BROADWELL_G, X86_STEP_MAX, SRBDS),
12391243 VULNBL_INTEL_STEPS(INTEL_BROADWELL_X, X86_STEP_MAX, MMIO),
12401244 VULNBL_INTEL_STEPS(INTEL_BROADWELL, X86_STEP_MAX, SRBDS),
1241− VULNBL_INTEL_STEPS(INTEL_SKYLAKE_X, X86_STEP_MAX, MMIO | RETBLEED | GDS),
1245+ VULNBL_INTEL_STEPS(INTEL_SKYLAKE_X, 0x5, MMIO | RETBLEED | GDS),
1246+ VULNBL_INTEL_STEPS(INTEL_SKYLAKE_X, X86_STEP_MAX, MMIO | RETBLEED | GDS | ITS),
12421247 VULNBL_INTEL_STEPS(INTEL_SKYLAKE_L, X86_STEP_MAX, MMIO | RETBLEED | GDS | SRBDS),
12431248 VULNBL_INTEL_STEPS(INTEL_SKYLAKE, X86_STEP_MAX, MMIO | RETBLEED | GDS | SRBDS),
1244− VULNBL_INTEL_STEPS(INTEL_KABYLAKE_L, X86_STEP_MAX, MMIO | RETBLEED | GDS | SRBDS),
1245− VULNBL_INTEL_STEPS(INTEL_KABYLAKE, X86_STEP_MAX, MMIO | RETBLEED | GDS | SRBDS),
1249+ VULNBL_INTEL_STEPS(INTEL_KABYLAKE_L, 0xb, MMIO | RETBLEED | GDS | SRBDS),
1250+ VULNBL_INTEL_STEPS(INTEL_KABYLAKE_L, X86_STEP_MAX, MMIO | RETBLEED | GDS | SRBDS | ITS),
1251+ VULNBL_INTEL_STEPS(INTEL_KABYLAKE, 0xc, MMIO | RETBLEED | GDS | SRBDS),
1252+ VULNBL_INTEL_STEPS(INTEL_KABYLAKE, X86_STEP_MAX, MMIO | RETBLEED | GDS | SRBDS | ITS),
12461253 VULNBL_INTEL_STEPS(INTEL_CANNONLAKE_L, X86_STEP_MAX, RETBLEED),
1247− VULNBL_INTEL_STEPS(INTEL_ICELAKE_L, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED | GDS),
1248− VULNBL_INTEL_STEPS(INTEL_ICELAKE_D, X86_STEP_MAX, MMIO | GDS),
1249− VULNBL_INTEL_STEPS(INTEL_ICELAKE_X, X86_STEP_MAX, MMIO | GDS),
1250− VULNBL_INTEL_STEPS(INTEL_COMETLAKE, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED | GDS),
1251− VULNBL_INTEL_STEPS(INTEL_COMETLAKE_L, 0x0, MMIO | RETBLEED),
1252− VULNBL_INTEL_STEPS(INTEL_COMETLAKE_L, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED | GDS),
1253− VULNBL_INTEL_STEPS(INTEL_TIGERLAKE_L, X86_STEP_MAX, GDS),
1254− VULNBL_INTEL_STEPS(INTEL_TIGERLAKE, X86_STEP_MAX, GDS),
1254+ VULNBL_INTEL_STEPS(INTEL_ICELAKE_L, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED | GDS | ITS | ITS_NATIVE_ONLY),
1255+ VULNBL_INTEL_STEPS(INTEL_ICELAKE_D, X86_STEP_MAX, MMIO | GDS | ITS | ITS_NATIVE_ONLY),
1256+ VULNBL_INTEL_STEPS(INTEL_ICELAKE_X, X86_STEP_MAX, MMIO | GDS | ITS | ITS_NATIVE_ONLY),
1257+ VULNBL_INTEL_STEPS(INTEL_COMETLAKE, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED | GDS | ITS),
1258+ VULNBL_INTEL_STEPS(INTEL_COMETLAKE_L, 0x0, MMIO | RETBLEED | ITS),
1259+ VULNBL_INTEL_STEPS(INTEL_COMETLAKE_L, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED | GDS | ITS),
1260+ VULNBL_INTEL_STEPS(INTEL_TIGERLAKE_L, X86_STEP_MAX, GDS | ITS | ITS_NATIVE_ONLY),
1261+ VULNBL_INTEL_STEPS(INTEL_TIGERLAKE, X86_STEP_MAX, GDS | ITS | ITS_NATIVE_ONLY),
12551262 VULNBL_INTEL_STEPS(INTEL_LAKEFIELD, X86_STEP_MAX, MMIO | MMIO_SBDS | RETBLEED),
1256− VULNBL_INTEL_STEPS(INTEL_ROCKETLAKE, X86_STEP_MAX, MMIO | RETBLEED | GDS),
1263+ VULNBL_INTEL_STEPS(INTEL_ROCKETLAKE, X86_STEP_MAX, MMIO | RETBLEED | GDS | ITS | ITS_NATIVE_ONLY),
12571264 VULNBL_INTEL_TYPE(INTEL_ALDERLAKE, ATOM, RFDS),
12581265 VULNBL_INTEL_STEPS(INTEL_ALDERLAKE_L, X86_STEP_MAX, RFDS),
12591266 VULNBL_INTEL_TYPE(INTEL_RAPTORLAKE, ATOM, RFDS),
@@ -1318,6 +1325,32 @@ static bool __init vulnerable_to_rfds(u64 x86_arch_cap_msr) · 58 unmodified lines
13181325 return cpu_matches(cpu_vuln_blacklist, RFDS);
13191326 }
13201327
1328+static bool __init vulnerable_to_its(u64 x86_arch_cap_msr)
1329+{
1330+ /* The "immunity" bit trumps everything else: */
1331+ if (x86_arch_cap_msr & ARCH_CAP_ITS_NO)
1332+ return false;
1333+ if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
1334+ return false;
1335+
1336+ /* None of the affected CPUs have BHI_CTRL */
1337+ if (boot_cpu_has(X86_FEATURE_BHI_CTRL))
1338+ return false;
1339+
1340+ /*
1341+ * If a VMM did not expose ITS_NO, assume that a guest could
1342+ * be running on a vulnerable hardware or may migrate to such
1343+ * hardware.
1344+ */
1345+ if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
1346+ return true;
1347+
1348+ if (cpu_matches(cpu_vuln_blacklist, ITS))
1349+ return true;
1350+
1351+ return false;
1352+}
1353+
13211354 static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)
13221355 {
13231356 u64 x86_arch_cap_msr = x86_read_arch_cap_msr();
@@ -1439,9 +1472,12 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c) · 115 unmodified lines
14391472 if (vulnerable_to_rfds(x86_arch_cap_msr))
14401473 setup_force_cpu_bug(X86_BUG_RFDS);
14411474
1442− /* When virtualized, eIBRS could be hidden, assume vulnerable */
1443− if (!(x86_arch_cap_msr & ARCH_CAP_BHI_NO) &&
1444− !cpu_matches(cpu_vuln_whitelist, NO_BHI) &&
1475+ /*
1476+ * Intel parts with eIBRS are vulnerable to BHI attacks. Parts with
1477+ * BHI_NO still need to use the BHI mitigation to prevent Intra-mode
1478+ * attacks. When virtualized, eIBRS could be hidden, assume vulnerable.
1479+ */
1480+ if (!cpu_matches(cpu_vuln_whitelist, NO_BHI) &&
14451481 (boot_cpu_has(X86_FEATURE_IBRS_ENHANCED) ||
14461482 boot_cpu_has(X86_FEATURE_HYPERVISOR)))
14471483 setup_force_cpu_bug(X86_BUG_BHI);
@@ -1449,6 +1485,12 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c) · 1 unmodified line
14491485 if (cpu_has(c, X86_FEATURE_AMD_IBPB) && !cpu_has(c, X86_FEATURE_AMD_IBPB_RET))
14501486 setup_force_cpu_bug(X86_BUG_IBPB_NO_RET);
14511487
1488+ if (vulnerable_to_its(x86_arch_cap_msr)) {
1489+ setup_force_cpu_bug(X86_BUG_ITS);
1490+ if (cpu_matches(cpu_vuln_blacklist, ITS_NATIVE_ONLY))
1491+ setup_force_cpu_bug(X86_BUG_ITS_NATIVE_ONLY);
1492+ }
1493+
14521494 if (cpu_matches(cpu_vuln_whitelist, NO_MELTDOWN))
14531495 return;
14541496
arch/x86/kernel/cpu/microcode/amd.c+11−4
@@ -199,6 +199,12 @@ static bool need_sha_check(u32 cur_rev) · 198 unmodified lines
199199 case 0xa70c0: return cur_rev <= 0xa70C009; break;
200200 case 0xaa001: return cur_rev <= 0xaa00116; break;
201201 case 0xaa002: return cur_rev <= 0xaa00218; break;
202+ case 0xb0021: return cur_rev <= 0xb002146; break;
203+ case 0xb1010: return cur_rev <= 0xb101046; break;
204+ case 0xb2040: return cur_rev <= 0xb204031; break;
205+ case 0xb4040: return cur_rev <= 0xb404031; break;
206+ case 0xb6000: return cur_rev <= 0xb600031; break;
207+ case 0xb7000: return cur_rev <= 0xb700031; break;
202208 default: break;
203209 }
204210
@@ -214,8 +220,7 @@ static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsi · 9 unmodified lines
214220 struct sha256_state s;
215221 int i;
216222
217− if (x86_family(bsp_cpuid_1_eax) < 0x17 ||
218− x86_family(bsp_cpuid_1_eax) > 0x19)
223+ if (x86_family(bsp_cpuid_1_eax) < 0x17)
219224 return true;
220225
221226 if (!need_sha_check(cur_rev))
@@ -1093,15 +1098,17 @@ static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t siz · 871 unmodified lines
10931098
10941099 static int __init save_microcode_in_initrd(void)
10951100 {
1096− unsigned int cpuid_1_eax = native_cpuid_eax(1);
10971101 struct cpuinfo_x86 *c = &boot_cpu_data;
10981102 struct cont_desc desc = { 0 };
1103+ unsigned int cpuid_1_eax;
10991104 enum ucode_state ret;
11001105 struct cpio_data cp;
11011106
1102− if (dis_ucode_ldr || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
1107+ if (microcode_loader_disabled() || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
11031108 return 0;
11041109
1110+ cpuid_1_eax = native_cpuid_eax(1);
1111+
11051112 if (!find_blobs_in_containers(&cp))
11061113 return -EINVAL;
11071114
arch/x86/kernel/cpu/microcode/core.c+34−24
@@ -41,8 +41,8 @@ · 40 unmodified lines
4141
4242 #include "internal.h"
4343
44−static struct microcode_ops *microcode_ops;
45−bool dis_ucode_ldr = true;
44+static struct microcode_ops *microcode_ops;
45+static bool dis_ucode_ldr = false;
4646
4747 bool force_minrev = IS_ENABLED(CONFIG_MICROCODE_LATE_FORCE_MINREV);
4848 module_param(force_minrev, bool, S_IRUSR | S_IWUSR);
@@ -84,6 +84,9 @@ static bool amd_check_current_patch_level(void) · 35 unmodified lines
8484 u32 lvl, dummy, i;
8585 u32 *levels;
8686
87+ if (x86_cpuid_vendor() != X86_VENDOR_AMD)
88+ return false;
89+
8790 native_rdmsr(MSR_AMD64_PATCH_LEVEL, lvl, dummy);
8891
8992 levels = final_levels;
@@ -95,27 +98,29 @@ static bool amd_check_current_patch_level(void) · 5 unmodified lines
9598 return false;
9699 }
97100
98−static bool __init check_loader_disabled_bsp(void)
101+bool __init microcode_loader_disabled(void)
99102 {
100− static const char *__dis_opt_str = "dis_ucode_ldr";
101− const char *cmdline = boot_command_line;
102− const char *option = __dis_opt_str;
103+ if (dis_ucode_ldr)
104+ return true;
103105
104106 /*
105− * CPUID(1).ECX[31]: reserved for hypervisor use. This is still not
106− * completely accurate as xen pv guests don't see that CPUID bit set but
107− * that's good enough as they don't land on the BSP path anyway.
107+ * Disable when:
108+ *
109+ * 1) The CPU does not support CPUID.
110+ *
111+ * 2) Bit 31 in CPUID[1]:ECX is clear
112+ * The bit is reserved for hypervisor use. This is still not
113+ * completely accurate as XEN PV guests don't see that CPUID bit
114+ * set, but that's good enough as they don't land on the BSP
115+ * path anyway.
116+ *
117+ * 3) Certain AMD patch levels are not allowed to be
118+ * overwritten.
108119 */
109− if (native_cpuid_ecx(1) & BIT(31))
110− return true;
111−
112− if (x86_cpuid_vendor() == X86_VENDOR_AMD) {
113− if (amd_check_current_patch_level())
114− return true;
115− }
116−
117− if (cmdline_find_option_bool(cmdline, option) <= 0)
118− dis_ucode_ldr = false;
120+ if (!have_cpuid_p() ||
121+ native_cpuid_ecx(1) & BIT(31) ||
122+ amd_check_current_patch_level())
123+ dis_ucode_ldr = true;
119124
120125 return dis_ucode_ldr;
121126 }
@@ -125,7 +130,10 @@ void __init load_ucode_bsp(void) · 3 unmodified lines
125130 unsigned int cpuid_1_eax;
126131 bool intel = true;
127132
128− if (!have_cpuid_p())
133+ if (cmdline_find_option_bool(boot_command_line, "dis_ucode_ldr") > 0)
134+ dis_ucode_ldr = true;
135+
136+ if (microcode_loader_disabled())
129137 return;
130138
131139 cpuid_1_eax = native_cpuid_eax(1);
@@ -146,9 +154,6 @@ void __init load_ucode_bsp(void) · 14 unmodified lines
146154 return;
147155 }
148156
149− if (check_loader_disabled_bsp())
150− return;
151−
152157 if (intel)
153158 load_ucode_intel_bsp(&early_data);
154159 else
@@ -159,6 +164,11 @@ void load_ucode_ap(void) · 4 unmodified lines
159164 {
160165 unsigned int cpuid_1_eax;
161166
167+ /*
168+ * Can't use microcode_loader_disabled() here - .init section
169+ * hell. It doesn't have to either - the BSP variant must've
170+ * parsed cmdline already anyway.
171+ */
162172 if (dis_ucode_ldr)
163173 return;
164174
@@ -810,7 +820,7 @@ static int __init microcode_init(void) · 645 unmodified lines
810820 struct cpuinfo_x86 *c = &boot_cpu_data;
811821 int error;
812822
813− if (dis_ucode_ldr)
823+ if (microcode_loader_disabled())
814824 return -EINVAL;
815825
816826 if (c->x86_vendor == X86_VENDOR_INTEL)
arch/x86/kernel/cpu/microcode/intel.c+1−1
@@ -389,7 +389,7 @@ static int __init save_builtin_microcode(void) · 388 unmodified lines
389389 if (xchg(&ucode_patch_va, NULL) != UCODE_BSP_LOADED)
390390 return 0;
391391
392− if (dis_ucode_ldr || boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
392+ if (microcode_loader_disabled() || boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
393393 return 0;
394394
395395 uci.mc = get_microcode_blob(&uci, true);
arch/x86/kernel/cpu/microcode/internal.h+0−1
@@ -94,7 +94,6 @@ static inline unsigned int x86_cpuid_family(void) · 93 unmodified lines
9494 return x86_family(eax);
9595 }
9696
97−extern bool dis_ucode_ldr;
9897 extern bool force_minrev;
9998
10099 #ifdef CONFIG_CPU_SUP_AMD
arch/x86/kernel/cpu/resctrl/rdtgroup.c+27−21
@@ -3553,6 +3553,22 @@ static void mkdir_rdt_prepare_rmid_free(struct rdtgroup *rgrp) · 3552 unmodified lines
35533553 free_rmid(rgrp->closid, rgrp->mon.rmid);
35543554 }
35553555
3556+/*
3557+ * We allow creating mon groups only with in a directory called "mon_groups"
3558+ * which is present in every ctrl_mon group. Check if this is a valid
3559+ * "mon_groups" directory.
3560+ *
3561+ * 1. The directory should be named "mon_groups".
3562+ * 2. The mon group itself should "not" be named "mon_groups".
3563+ * This makes sure "mon_groups" directory always has a ctrl_mon group
3564+ * as parent.
3565+ */
3566+static bool is_mon_groups(struct kernfs_node *kn, const char *name)
3567+{
3568+ return (!strcmp(rdt_kn_name(kn), "mon_groups") &&
3569+ strcmp(name, "mon_groups"));
3570+}
3571+
35563572 static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
35573573 const char *name, umode_t mode,
35583574 enum rdt_group_type rtype, struct rdtgroup **r)
@@ -3568,6 +3584,15 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, · 9 unmodified lines
35683584 goto out_unlock;
35693585 }
35703586
3587+ /*
3588+ * Check that the parent directory for a monitor group is a "mon_groups"
3589+ * directory.
3590+ */
3591+ if (rtype == RDTMON_GROUP && !is_mon_groups(parent_kn, name)) {
3592+ ret = -EPERM;
3593+ goto out_unlock;
3594+ }
3595+
35713596 if (rtype == RDTMON_GROUP &&
35723597 (prdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP ||
35733598 prdtgrp->mode == RDT_MODE_PSEUDO_LOCKED)) {
@@ -3751,22 +3776,6 @@ out_unlock: · 177 unmodified lines
37513776 return ret;
37523777 }
37533778
3754−/*
3755− * We allow creating mon groups only with in a directory called "mon_groups"
3756− * which is present in every ctrl_mon group. Check if this is a valid
3757− * "mon_groups" directory.
3758− *
3759− * 1. The directory should be named "mon_groups".
3760− * 2. The mon group itself should "not" be named "mon_groups".
3761− * This makes sure "mon_groups" directory always has a ctrl_mon group
3762− * as parent.
3763− */
3764−static bool is_mon_groups(struct kernfs_node *kn, const char *name)
3765−{
3766− return (!strcmp(rdt_kn_name(kn), "mon_groups") &&
3767− strcmp(name, "mon_groups"));
3768−}
3769−
37703779 static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name,
37713780 umode_t mode)
37723781 {
@@ -3782,11 +3791,8 @@ static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name, · 9 unmodified lines
37823791 if (resctrl_arch_alloc_capable() && parent_kn == rdtgroup_default.kn)
37833792 return rdtgroup_mkdir_ctrl_mon(parent_kn, name, mode);
37843793
3785− /*
3786− * If RDT monitoring is supported and the parent directory is a valid
3787− * "mon_groups" directory, add a monitoring subdirectory.
3788− */
3789− if (resctrl_arch_mon_capable() && is_mon_groups(parent_kn, name))
3794+ /* Else, attempt to add a monitoring subdirectory. */
3795+ if (resctrl_arch_mon_capable())
37903796 return rdtgroup_mkdir_mon(parent_kn, name, mode);
37913797
37923798 return -EPERM;
arch/x86/kernel/e820.c+16−9
@@ -753,22 +753,21 @@ void __init e820__memory_setup_extended(u64 phys_addr, u32 data_len) · 752 unmodified lines
753753 void __init e820__register_nosave_regions(unsigned long limit_pfn)
754754 {
755755 int i;
756− unsigned long pfn = 0;
756+ u64 last_addr = 0;
757757
758758 for (i = 0; i < e820_table->nr_entries; i++) {
759759 struct e820_entry *entry = &e820_table->entries[i];
760760
761− if (pfn < PFN_UP(entry->addr))
762− register_nosave_region(pfn, PFN_UP(entry->addr));
763−
764− pfn = PFN_DOWN(entry->addr + entry->size);
765−
766761 if (entry->type != E820_TYPE_RAM)
767− register_nosave_region(PFN_UP(entry->addr), pfn);
762+ continue;
768763
769− if (pfn >= limit_pfn)
770− break;
764+ if (last_addr < entry->addr)
765+ register_nosave_region(PFN_DOWN(last_addr), PFN_UP(entry->addr));
766+
767+ last_addr = entry->addr + entry->size;
771768 }
769+
770+ register_nosave_region(PFN_DOWN(last_addr), limit_pfn);
772771 }
773772
774773 #ifdef CONFIG_ACPI
@@ -1300,6 +1299,14 @@ void __init e820__memblock_setup(void) · 525 unmodified lines
13001299 memblock_add(entry->addr, entry->size);
13011300 }
13021301
1302+ /*
1303+ * 32-bit systems are limited to 4BG of memory even with HIGHMEM and
1304+ * to even less without it.
1305+ * Discard memory after max_pfn - the actual limit detected at runtime.
1306+ */
1307+ if (IS_ENABLED(CONFIG_X86_32))
1308+ memblock_remove(PFN_PHYS(max_pfn), -1);
1309+
13031310 /* Throw away partial pages: */
13041311 memblock_trim_memory(PAGE_SIZE);
13051312
arch/x86/kernel/early_printk.c+5−5
@@ -389,10 +389,10 @@ static int __init setup_early_printk(char *buf) · 388 unmodified lines
389389 keep = (strstr(buf, "keep") != NULL);
390390
391391 while (*buf != '\0') {
392− if (!strncmp(buf, "mmio", 4)) {
393− early_mmio_serial_init(buf + 4);
392+ if (!strncmp(buf, "mmio32", 6)) {
393+ buf += 6;
394+ early_mmio_serial_init(buf);
394395 early_console_register(&early_serial_console, keep);
395− buf += 4;
396396 }
397397 if (!strncmp(buf, "serial", 6)) {
398398 buf += 6;
@@ -407,9 +407,9 @@ static int __init setup_early_printk(char *buf) · 8 unmodified lines
407407 }
408408 #ifdef CONFIG_PCI
409409 if (!strncmp(buf, "pciserial", 9)) {
410− early_pci_serial_init(buf + 9);
410+ buf += 9; /* Keep from match the above "pciserial" */
411+ early_pci_serial_init(buf);
411412 early_console_register(&early_serial_console, keep);
412− buf += 9; /* Keep from match the above "serial" */
413413 }
414414 #endif
415415 if (!strncmp(buf, "vga", 3) &&
arch/x86/kernel/ftrace.c+1−1
@@ -354,7 +354,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) · 353 unmodified lines
354354 goto fail;
355355
356356 ip = trampoline + size;
357− if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
357+ if (cpu_wants_rethunk_at(ip))
358358 __text_gen_insn(ip, JMP32_INSN_OPCODE, ip, x86_return_thunk, JMP32_INSN_SIZE);
359359 else
360360 memcpy(ip, retq, sizeof(retq));
arch/x86/kernel/head32.c+0−4
@@ -145,10 +145,6 @@ void __init __no_stack_protector mk_early_pgtbl_32(void) · 144 unmodified lines
145145 *ptr = (unsigned long)ptep + PAGE_OFFSET;
146146
147147 #ifdef CONFIG_MICROCODE_INITRD32
148− /* Running on a hypervisor? */
149− if (native_cpuid_ecx(1) & BIT(31))
150− return;
151−
152148 params = (struct boot_params *)__pa_nodebug(&boot_params);
153149 if (!params->hdr.ramdisk_size || !params->hdr.ramdisk_image)
154150 return;
arch/x86/kernel/i8253.c+2−1
@@ -46,7 +46,8 @@ bool __init pit_timer_init(void) · 45 unmodified lines
4646 * VMMs otherwise steal CPU time just to pointlessly waggle
4747 * the (masked) IRQ.
4848 */
49− clockevent_i8253_disable();
49+ scoped_guard(irq)
50+ clockevent_i8253_disable();
5051 return false;
5152 }
5253 clockevent_i8253_init(true);
arch/x86/kernel/machine_kexec_32.c+2−2
@@ -42,7 +42,7 @@ static void load_segments(void) · 41 unmodified lines
4242
4343 static void machine_kexec_free_page_tables(struct kimage *image)
4444 {
45− free_pages((unsigned long)image->arch.pgd, PGD_ALLOCATION_ORDER);
45+ free_pages((unsigned long)image->arch.pgd, pgd_allocation_order());
4646 image->arch.pgd = NULL;
4747 #ifdef CONFIG_X86_PAE
4848 free_page((unsigned long)image->arch.pmd0);
@@ -59,7 +59,7 @@ static void machine_kexec_free_page_tables(struct kimage *image) · 10 unmodified lines
5959 static int machine_kexec_alloc_page_tables(struct kimage *image)
6060 {
6161 image->arch.pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
62− PGD_ALLOCATION_ORDER);
62+ pgd_allocation_order());
6363 #ifdef CONFIG_X86_PAE
6464 image->arch.pmd0 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
6565 image->arch.pmd1 = (pmd_t *)get_zeroed_page(GFP_KERNEL);
arch/x86/kernel/module.c+6−0
@@ -266,6 +266,8 @@ int module_finalize(const Elf_Ehdr *hdr, · 265 unmodified lines
266266 ibt_endbr = s;
267267 }
268268
269+ its_init_mod(me);
270+
269271 if (retpolines || cfi) {
270272 void *rseg = NULL, *cseg = NULL;
271273 unsigned int rsize = 0, csize = 0;
@@ -286,6 +288,9 @@ int module_finalize(const Elf_Ehdr *hdr, · 14 unmodified lines
286288 void *rseg = (void *)retpolines->sh_addr;
287289 apply_retpolines(rseg, rseg + retpolines->sh_size);
288290 }
291+
292+ its_fini_mod(me);
293+
289294 if (returns) {
290295 void *rseg = (void *)returns->sh_addr;
291296 apply_returns(rseg, rseg + returns->sh_size);
@@ -326,4 +331,5 @@ int module_finalize(const Elf_Ehdr *hdr, · 34 unmodified lines
326331 void module_arch_cleanup(struct module *mod)
327332 {
328333 alternatives_smp_module_del(mod);
334+ its_free_mod(mod);
329335 }
arch/x86/kernel/static_call.c+2−2
@@ -81,7 +81,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type, · 80 unmodified lines
8181 break;
8282
8383 case RET:
84− if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
84+ if (cpu_wants_rethunk_at(insn))
8585 code = text_gen_insn(JMP32_INSN_OPCODE, insn, x86_return_thunk);
8686 else
8787 code = &retinsn;
@@ -90,7 +90,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type, · 2 unmodified lines
9090 case JCC:
9191 if (!func) {
9292 func = __static_call_return;
93− if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
93+ if (cpu_wants_rethunk())
9494 func = x86_return_thunk;
9595 }
9696
arch/x86/kernel/vmlinux.lds.S+19−1
@@ -466,10 +466,18 @@ SECTIONS · 465 unmodified lines
466466 }
467467
468468 /*
469− * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
469+ * COMPILE_TEST kernels can be large - CONFIG_KASAN, for example, can cause
470+ * this. Let's assume that nobody will be running a COMPILE_TEST kernel and
471+ * let's assert that fuller build coverage is more valuable than being able to
472+ * run a COMPILE_TEST kernel.
473+ */
474+#ifndef CONFIG_COMPILE_TEST
475+/*
476+ * The ASSERT() sync to . is intentional, for binutils 2.14 compatibility:
470477 */
471478 . = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
472479 "kernel image bigger than KERNEL_IMAGE_SIZE");
480+#endif
473481
474482 /* needed for Clang - see arch/x86/entry/entry.S */
475483 PROVIDE(__ref_stack_chk_guard = __stack_chk_guard);
@@ -497,6 +505,16 @@ PROVIDE(__ref_stack_chk_guard = __stack_chk_guard); · 21 unmodified lines
497505 "SRSO function pair won't alias");
498506 #endif
499507
508+#if defined(CONFIG_MITIGATION_ITS) && !defined(CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B)
509+. = ASSERT(__x86_indirect_its_thunk_rax & 0x20, "__x86_indirect_thunk_rax not in second half of cacheline");
510+. = ASSERT(((__x86_indirect_its_thunk_rcx - __x86_indirect_its_thunk_rax) % 64) == 0, "Indirect thunks are not cacheline apart");
511+. = ASSERT(__x86_indirect_its_thunk_array == __x86_indirect_its_thunk_rax, "Gap in ITS thunk array");
512+#endif
513+
514+#if defined(CONFIG_MITIGATION_ITS) && !defined(CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B)
515+. = ASSERT(its_return_thunk & 0x20, "its_return_thunk not in second half of cacheline");
516+#endif
517+
500518 #endif /* CONFIG_X86_64 */
501519
502520 /*
arch/x86/kvm/cpuid.c+3−5
@@ -1427,8 +1427,8 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) · 1426 unmodified lines
14271427 }
14281428 break;
14291429 case 0xa: { /* Architectural Performance Monitoring */
1430− union cpuid10_eax eax;
1431− union cpuid10_edx edx;
1430+ union cpuid10_eax eax = { };
1431+ union cpuid10_edx edx = { };
14321432
14331433 if (!enable_pmu || !static_cpu_has(X86_FEATURE_ARCH_PERFMON)) {
14341434 entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
@@ -1444,8 +1444,6 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) · 9 unmodified lines
14441444
14451445 if (kvm_pmu_cap.version)
14461446 edx.split.anythread_deprecated = 1;
1447− edx.split.reserved1 = 0;
1448− edx.split.reserved2 = 0;
14491447
14501448 entry->eax = eax.full;
14511449 entry->ebx = kvm_pmu_cap.events_mask;
@@ -1763,7 +1761,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) · 311 unmodified lines
17631761 break;
17641762 /* AMD Extended Performance Monitoring and Debug */
17651763 case 0x80000022: {
1766− union cpuid_0x80000022_ebx ebx;
1764+ union cpuid_0x80000022_ebx ebx = { };
17671765
17681766 entry->ecx = entry->edx = 0;
17691767 if (!enable_pmu || !kvm_cpu_cap_has(X86_FEATURE_PERFMON_V2)) {
arch/x86/kvm/mmu.h+3−0
@@ -104,6 +104,9 @@ void kvm_mmu_track_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new, · 103 unmodified lines
104104
105105 static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu)
106106 {
107+ if (kvm_check_request(KVM_REQ_MMU_FREE_OBSOLETE_ROOTS, vcpu))
108+ kvm_mmu_free_obsolete_roots(vcpu);
109+
107110 /*
108111 * Checking root.hpa is sufficient even when KVM has mirror root.
109112 * We can have either:
arch/x86/kvm/mmu/mmu.c+54−16
@@ -5974,6 +5974,7 @@ void kvm_mmu_free_obsolete_roots(struct kvm_vcpu *vcpu) · 5973 unmodified lines
59745974 __kvm_mmu_free_obsolete_roots(vcpu->kvm, &vcpu->arch.root_mmu);
59755975 __kvm_mmu_free_obsolete_roots(vcpu->kvm, &vcpu->arch.guest_mmu);
59765976 }
5977+EXPORT_SYMBOL_GPL(kvm_mmu_free_obsolete_roots);
59775978
59785979 static u64 mmu_pte_write_fetch_gpte(struct kvm_vcpu *vcpu, gpa_t *gpa,
59795980 int *bytes)
@@ -7669,9 +7670,30 @@ void kvm_mmu_pre_destroy_vm(struct kvm *kvm) · 1689 unmodified lines
76697670 }
76707671
76717672 #ifdef CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES
7673+static bool hugepage_test_mixed(struct kvm_memory_slot *slot, gfn_t gfn,
7674+ int level)
7675+{
7676+ return lpage_info_slot(gfn, slot, level)->disallow_lpage & KVM_LPAGE_MIXED_FLAG;
7677+}
7678+
7679+static void hugepage_clear_mixed(struct kvm_memory_slot *slot, gfn_t gfn,
7680+ int level)
7681+{
7682+ lpage_info_slot(gfn, slot, level)->disallow_lpage &= ~KVM_LPAGE_MIXED_FLAG;
7683+}
7684+
7685+static void hugepage_set_mixed(struct kvm_memory_slot *slot, gfn_t gfn,
7686+ int level)
7687+{
7688+ lpage_info_slot(gfn, slot, level)->disallow_lpage |= KVM_LPAGE_MIXED_FLAG;
7689+}
7690+
76727691 bool kvm_arch_pre_set_memory_attributes(struct kvm *kvm,
76737692 struct kvm_gfn_range *range)
76747693 {
7694+ struct kvm_memory_slot *slot = range->slot;
7695+ int level;
7696+
76757697 /*
76767698 * Zap SPTEs even if the slot can't be mapped PRIVATE. KVM x86 only
76777699 * supports KVM_MEMORY_ATTRIBUTE_PRIVATE, and so it *seems* like KVM
@@ -7686,6 +7708,38 @@ bool kvm_arch_pre_set_memory_attributes(struct kvm *kvm, · 8 unmodified lines
76867708 if (WARN_ON_ONCE(!kvm_arch_has_private_mem(kvm)))
76877709 return false;
76887710
7711+ if (WARN_ON_ONCE(range->end <= range->start))
7712+ return false;
7713+
7714+ /*
7715+ * If the head and tail pages of the range currently allow a hugepage,
7716+ * i.e. reside fully in the slot and don't have mixed attributes, then
7717+ * add each corresponding hugepage range to the ongoing invalidation,
7718+ * e.g. to prevent KVM from creating a hugepage in response to a fault
7719+ * for a gfn whose attributes aren't changing. Note, only the range
7720+ * of gfns whose attributes are being modified needs to be explicitly
7721+ * unmapped, as that will unmap any existing hugepages.
7722+ */
7723+ for (level = PG_LEVEL_2M; level <= KVM_MAX_HUGEPAGE_LEVEL; level++) {
7724+ gfn_t start = gfn_round_for_level(range->start, level);
7725+ gfn_t end = gfn_round_for_level(range->end - 1, level);
7726+ gfn_t nr_pages = KVM_PAGES_PER_HPAGE(level);
7727+
7728+ if ((start != range->start || start + nr_pages > range->end) &&
7729+ start >= slot->base_gfn &&
7730+ start + nr_pages <= slot->base_gfn + slot->npages &&
7731+ !hugepage_test_mixed(slot, start, level))
7732+ kvm_mmu_invalidate_range_add(kvm, start, start + nr_pages);
7733+
7734+ if (end == start)
7735+ continue;
7736+
7737+ if ((end + nr_pages) > range->end &&
7738+ (end + nr_pages) <= (slot->base_gfn + slot->npages) &&
7739+ !hugepage_test_mixed(slot, end, level))
7740+ kvm_mmu_invalidate_range_add(kvm, end, end + nr_pages);
7741+ }
7742+
76897743 /* Unmap the old attribute page. */
76907744 if (range->arg.attributes & KVM_MEMORY_ATTRIBUTE_PRIVATE)
76917745 range->attr_filter = KVM_FILTER_SHARED;
@@ -7695,23 +7749,7 @@ bool kvm_arch_pre_set_memory_attributes(struct kvm *kvm, · 3 unmodified lines
76957749 return kvm_unmap_gfn_range(kvm, range);
76967750 }
76977751
7698−static bool hugepage_test_mixed(struct kvm_memory_slot *slot, gfn_t gfn,
7699− int level)
7700−{
7701− return lpage_info_slot(gfn, slot, level)->disallow_lpage & KVM_LPAGE_MIXED_FLAG;
7702−}
7703−
7704−static void hugepage_clear_mixed(struct kvm_memory_slot *slot, gfn_t gfn,
7705− int level)
7706−{
7707− lpage_info_slot(gfn, slot, level)->disallow_lpage &= ~KVM_LPAGE_MIXED_FLAG;
7708−}
77097752
7710−static void hugepage_set_mixed(struct kvm_memory_slot *slot, gfn_t gfn,
7711− int level)
7712−{
7713− lpage_info_slot(gfn, slot, level)->disallow_lpage |= KVM_LPAGE_MIXED_FLAG;
7714−}
77157753
77167754 static bool hugepage_has_attrs(struct kvm *kvm, struct kvm_memory_slot *slot,
77177755 gfn_t gfn, int level, unsigned long attrs)
arch/x86/kvm/mmu/tdp_mmu.c+7−1
@@ -40,7 +40,9 @@ void kvm_mmu_uninit_tdp_mmu(struct kvm *kvm) · 39 unmodified lines
4040 kvm_tdp_mmu_invalidate_roots(kvm, KVM_VALID_ROOTS);
4141 kvm_tdp_mmu_zap_invalidated_roots(kvm, false);
4242
43− WARN_ON(atomic64_read(&kvm->arch.tdp_mmu_pages));
43+#ifdef CONFIG_KVM_PROVE_MMU
44+ KVM_MMU_WARN_ON(atomic64_read(&kvm->arch.tdp_mmu_pages));
45+#endif
4446 WARN_ON(!list_empty(&kvm->arch.tdp_mmu_roots));
4547
4648 /*
@@ -325,13 +327,17 @@ static void handle_changed_spte(struct kvm *kvm, int as_id, gfn_t gfn, · 278 unmodified lines
325327 static void tdp_account_mmu_page(struct kvm *kvm, struct kvm_mmu_page *sp)
326328 {
327329 kvm_account_pgtable_pages((void *)sp->spt, +1);
330+#ifdef CONFIG_KVM_PROVE_MMU
328331 atomic64_inc(&kvm->arch.tdp_mmu_pages);
332+#endif
329333 }
330334
331335 static void tdp_unaccount_mmu_page(struct kvm *kvm, struct kvm_mmu_page *sp)
332336 {
333337 kvm_account_pgtable_pages((void *)sp->spt, -1);
338+#ifdef CONFIG_KVM_PROVE_MMU
334339 atomic64_dec(&kvm->arch.tdp_mmu_pages);
340+#endif
335341 }
336342
337343 /**
arch/x86/kvm/smm.c+1−0
@@ -131,6 +131,7 @@ void kvm_smm_changed(struct kvm_vcpu *vcpu, bool entering_smm) · 130 unmodified lines
131131
132132 kvm_mmu_reset_context(vcpu);
133133 }
134+EXPORT_SYMBOL_GPL(kvm_smm_changed);
134135
135136 void process_smi(struct kvm_vcpu *vcpu)
136137 {
arch/x86/kvm/svm/avic.c+37−31
@@ -796,12 +796,15 @@ static int svm_ir_list_add(struct vcpu_svm *svm, struct amd_iommu_pi_data *pi) · 795 unmodified lines
796796 struct amd_svm_iommu_ir *ir;
797797 u64 entry;
798798
799+ if (WARN_ON_ONCE(!pi->ir_data))
800+ return -EINVAL;
801+
799802 /**
800803 * In some cases, the existing irte is updated and re-set,
801804 * so we need to check here if it's already been * added
802805 * to the ir_list.
803806 */
804− if (pi->ir_data && (pi->prev_ga_tag != 0)) {
807+ if (pi->prev_ga_tag) {
805808 struct kvm *kvm = svm->vcpu.kvm;
806809 u32 vcpu_id = AVIC_GATAG_TO_VCPUID(pi->prev_ga_tag);
807810 struct kvm_vcpu *prev_vcpu = kvm_get_vcpu_by_id(kvm, vcpu_id);
@@ -820,7 +823,7 @@ static int svm_ir_list_add(struct vcpu_svm *svm, struct amd_iommu_pi_data *pi) · 12 unmodified lines
820823 * Allocating new amd_iommu_pi_data, which will get
821824 * add to the per-vcpu ir_list.
822825 */
823− ir = kzalloc(sizeof(struct amd_svm_iommu_ir), GFP_KERNEL_ACCOUNT);
826+ ir = kzalloc(sizeof(struct amd_svm_iommu_ir), GFP_ATOMIC | __GFP_ACCOUNT);
824827 if (!ir) {
825828 ret = -ENOMEM;
826829 goto out;
@@ -896,10 +899,10 @@ int avic_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 69 unmodified lines
896899 {
897900 struct kvm_kernel_irq_routing_entry *e;
898901 struct kvm_irq_routing_table *irq_rt;
902+ bool enable_remapped_mode = true;
899903 int idx, ret = 0;
900904
901− if (!kvm_arch_has_assigned_device(kvm) ||
902− !irq_remapping_cap(IRQ_POSTING_CAP))
905+ if (!kvm_arch_has_assigned_device(kvm) || !kvm_arch_has_irq_bypass())
903906 return 0;
904907
905908 pr_debug("SVM: %s: host_irq=%#x, guest_irq=%#x, set=%#x\n",
@@ -933,6 +936,8 @@ int avic_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 27 unmodified lines
933936 kvm_vcpu_apicv_active(&svm->vcpu)) {
934937 struct amd_iommu_pi_data pi;
935938
939+ enable_remapped_mode = false;
940+
936941 /* Try to enable guest_mode in IRTE */
937942 pi.base = __sme_set(page_to_phys(svm->avic_backing_page) &
938943 AVIC_HPA_MASK);
@@ -951,33 +956,6 @@ int avic_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 12 unmodified lines
951956 */
952957 if (!ret && pi.is_guest_mode)
953958 svm_ir_list_add(svm, &pi);
954− } else {
955− /* Use legacy mode in IRTE */
956− struct amd_iommu_pi_data pi;
957−
958− /**
959− * Here, pi is used to:
960− * - Tell IOMMU to use legacy mode for this interrupt.
961− * - Retrieve ga_tag of prior interrupt remapping data.
962− */
963− pi.prev_ga_tag = 0;
964− pi.is_guest_mode = false;
965− ret = irq_set_vcpu_affinity(host_irq, &pi);
966−
967− /**
968− * Check if the posted interrupt was previously
969− * setup with the guest_mode by checking if the ga_tag
970− * was cached. If so, we need to clean up the per-vcpu
971− * ir_list.
972− */
973− if (!ret && pi.prev_ga_tag) {
974− int id = AVIC_GATAG_TO_VCPUID(pi.prev_ga_tag);
975− struct kvm_vcpu *vcpu;
976−
977− vcpu = kvm_get_vcpu_by_id(kvm, id);
978− if (vcpu)
979− svm_ir_list_del(to_svm(vcpu), &pi);
980− }
981959 }
982960
983961 if (!ret && svm) {
@@ -993,6 +971,34 @@ int avic_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 9 unmodified lines
993971 }
994972
995973 ret = 0;
974+ if (enable_remapped_mode) {
975+ /* Use legacy mode in IRTE */
976+ struct amd_iommu_pi_data pi;
977+
978+ /**
979+ * Here, pi is used to:
980+ * - Tell IOMMU to use legacy mode for this interrupt.
981+ * - Retrieve ga_tag of prior interrupt remapping data.
982+ */
983+ pi.prev_ga_tag = 0;
984+ pi.is_guest_mode = false;
985+ ret = irq_set_vcpu_affinity(host_irq, &pi);
986+
987+ /**
988+ * Check if the posted interrupt was previously
989+ * setup with the guest_mode by checking if the ga_tag
990+ * was cached. If so, we need to clean up the per-vcpu
991+ * ir_list.
992+ */
993+ if (!ret && pi.prev_ga_tag) {
994+ int id = AVIC_GATAG_TO_VCPUID(pi.prev_ga_tag);
995+ struct kvm_vcpu *vcpu;
996+
997+ vcpu = kvm_get_vcpu_by_id(kvm, id);
998+ if (vcpu)
999+ svm_ir_list_del(to_svm(vcpu), &pi);
1000+ }
1001+ }
9961002 out:
9971003 srcu_read_unlock(&kvm->irq_srcu, idx);
9981004 return ret;
arch/x86/kvm/svm/sev.c+19−13
@@ -3173,9 +3173,14 @@ skip_vmsa_free: · 3172 unmodified lines
31733173 kvfree(svm->sev_es.ghcb_sa);
31743174 }
31753175
3176+static u64 kvm_ghcb_get_sw_exit_code(struct vmcb_control_area *control)
3177+{
3178+ return (((u64)control->exit_code_hi) << 32) | control->exit_code;
3179+}
3180+
31763181 static void dump_ghcb(struct vcpu_svm *svm)
31773182 {
3178− struct ghcb *ghcb = svm->sev_es.ghcb;
3183+ struct vmcb_control_area *control = &svm->vmcb->control;
31793184 unsigned int nbits;
31803185
31813186 /* Re-use the dump_invalid_vmcb module parameter */
@@ -3184,18 +3189,24 @@ static void dump_ghcb(struct vcpu_svm *svm) · 2 unmodified lines
31843189 return;
31853190 }
31863191
3187− nbits = sizeof(ghcb->save.valid_bitmap) * 8;
3192+ nbits = sizeof(svm->sev_es.valid_bitmap) * 8;
31883193
3189− pr_err("GHCB (GPA=%016llx):\n", svm->vmcb->control.ghcb_gpa);
3194+ /*
3195+ * Print KVM's snapshot of the GHCB values that were (unsuccessfully)
3196+ * used to handle the exit. If the guest has since modified the GHCB
3197+ * itself, dumping the raw GHCB won't help debug why KVM was unable to
3198+ * handle the VMGEXIT that KVM observed.
3199+ */
3200+ pr_err("GHCB (GPA=%016llx) snapshot:\n", svm->vmcb->control.ghcb_gpa);
31903201 pr_err("%-20s%016llx is_valid: %u\n", "sw_exit_code",
3191− ghcb->save.sw_exit_code, ghcb_sw_exit_code_is_valid(ghcb));
3202+ kvm_ghcb_get_sw_exit_code(control), kvm_ghcb_sw_exit_code_is_valid(svm));
31923203 pr_err("%-20s%016llx is_valid: %u\n", "sw_exit_info_1",
3193− ghcb->save.sw_exit_info_1, ghcb_sw_exit_info_1_is_valid(ghcb));
3204+ control->exit_info_1, kvm_ghcb_sw_exit_info_1_is_valid(svm));
31943205 pr_err("%-20s%016llx is_valid: %u\n", "sw_exit_info_2",
3195− ghcb->save.sw_exit_info_2, ghcb_sw_exit_info_2_is_valid(ghcb));
3206+ control->exit_info_2, kvm_ghcb_sw_exit_info_2_is_valid(svm));
31963207 pr_err("%-20s%016llx is_valid: %u\n", "sw_scratch",
3197− ghcb->save.sw_scratch, ghcb_sw_scratch_is_valid(ghcb));
3198− pr_err("%-20s%*pb\n", "valid_bitmap", nbits, ghcb->save.valid_bitmap);
3208+ svm->sev_es.sw_scratch, kvm_ghcb_sw_scratch_is_valid(svm));
3209+ pr_err("%-20s%*pb\n", "valid_bitmap", nbits, svm->sev_es.valid_bitmap);
31993210 }
32003211
32013212 static void sev_es_sync_to_ghcb(struct vcpu_svm *svm)
@@ -3266,11 +3277,6 @@ static void sev_es_sync_from_ghcb(struct vcpu_svm *svm) · 64 unmodified lines
32663277 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap));
32673278 }
32683279
3269−static u64 kvm_ghcb_get_sw_exit_code(struct vmcb_control_area *control)
3270−{
3271− return (((u64)control->exit_code_hi) << 32) | control->exit_code;
3272−}
3273−
32743280 static int sev_es_validate_vmgexit(struct vcpu_svm *svm)
32753281 {
32763282 struct vmcb_control_area *control = &svm->vmcb->control;
arch/x86/kvm/svm/svm.c+69−6
@@ -607,9 +607,6 @@ static void svm_disable_virtualization_cpu(void) · 606 unmodified lines
607607 kvm_cpu_svm_disable();
608608
609609 amd_pmu_disable_virt();
610−
611− if (cpu_feature_enabled(X86_FEATURE_SRSO_BP_SPEC_REDUCE))
612− msr_clear_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT);
613610 }
614611
615612 static int svm_enable_virtualization_cpu(void)
@@ -687,9 +684,6 @@ static int svm_enable_virtualization_cpu(void) · 71 unmodified lines
687684 rdmsr(MSR_TSC_AUX, sev_es_host_save_area(sd)->tsc_aux, msr_hi);
688685 }
689686
690− if (cpu_feature_enabled(X86_FEATURE_SRSO_BP_SPEC_REDUCE))
691− msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT);
692−
693687 return 0;
694688 }
695689
@@ -1518,6 +1512,63 @@ static void svm_vcpu_free(struct kvm_vcpu *vcpu) · 822 unmodified lines
15181512 __free_pages(virt_to_page(svm->msrpm), get_order(MSRPM_SIZE));
15191513 }
15201514
1515+#ifdef CONFIG_CPU_MITIGATIONS
1516+static DEFINE_SPINLOCK(srso_lock);
1517+static atomic_t srso_nr_vms;
1518+
1519+static void svm_srso_clear_bp_spec_reduce(void *ign)
1520+{
1521+ struct svm_cpu_data *sd = this_cpu_ptr(&svm_data);
1522+
1523+ if (!sd->bp_spec_reduce_set)
1524+ return;
1525+
1526+ msr_clear_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT);
1527+ sd->bp_spec_reduce_set = false;
1528+}
1529+
1530+static void svm_srso_vm_destroy(void)
1531+{
1532+ if (!cpu_feature_enabled(X86_FEATURE_SRSO_BP_SPEC_REDUCE))
1533+ return;
1534+
1535+ if (atomic_dec_return(&srso_nr_vms))
1536+ return;
1537+
1538+ guard(spinlock)(&srso_lock);
1539+
1540+ /*
1541+ * Verify a new VM didn't come along, acquire the lock, and increment
1542+ * the count before this task acquired the lock.
1543+ */
1544+ if (atomic_read(&srso_nr_vms))
1545+ return;
1546+
1547+ on_each_cpu(svm_srso_clear_bp_spec_reduce, NULL, 1);
1548+}
1549+
1550+static void svm_srso_vm_init(void)
1551+{
1552+ if (!cpu_feature_enabled(X86_FEATURE_SRSO_BP_SPEC_REDUCE))
1553+ return;
1554+
1555+ /*
1556+ * Acquire the lock on 0 => 1 transitions to ensure a potential 1 => 0
1557+ * transition, i.e. destroying the last VM, is fully complete, e.g. so
1558+ * that a delayed IPI doesn't clear BP_SPEC_REDUCE after a vCPU runs.
1559+ */
1560+ if (atomic_inc_not_zero(&srso_nr_vms))
1561+ return;
1562+
1563+ guard(spinlock)(&srso_lock);
1564+
1565+ atomic_inc(&srso_nr_vms);
1566+}
1567+#else
1568+static void svm_srso_vm_init(void) { }
1569+static void svm_srso_vm_destroy(void) { }
1570+#endif
1571+
15211572 static void svm_prepare_switch_to_guest(struct kvm_vcpu *vcpu)
15221573 {
15231574 struct vcpu_svm *svm = to_svm(vcpu);
@@ -1550,6 +1601,11 @@ static void svm_prepare_switch_to_guest(struct kvm_vcpu *vcpu) · 26 unmodified lines
15501601 (!boot_cpu_has(X86_FEATURE_V_TSC_AUX) || !sev_es_guest(vcpu->kvm)))
15511602 kvm_set_user_return_msr(tsc_aux_uret_slot, svm->tsc_aux, -1ull);
15521603
1604+ if (cpu_feature_enabled(X86_FEATURE_SRSO_BP_SPEC_REDUCE) &&
1605+ !sd->bp_spec_reduce_set) {
1606+ sd->bp_spec_reduce_set = true;
1607+ msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT);
1608+ }
15531609 svm->guest_state_loaded = true;
15541610 }
15551611
@@ -2231,6 +2287,10 @@ static int shutdown_interception(struct kvm_vcpu *vcpu) · 675 unmodified lines
22312287 */
22322288 if (!sev_es_guest(vcpu->kvm)) {
22332289 clear_page(svm->vmcb);
2290+#ifdef CONFIG_KVM_SMM
2291+ if (is_smm(vcpu))
2292+ kvm_smm_changed(vcpu, false);
2293+#endif
22342294 kvm_vcpu_reset(vcpu, true);
22352295 }
22362296
@@ -5036,6 +5096,8 @@ static void svm_vm_destroy(struct kvm *kvm) · 2799 unmodified lines
50365096 {
50375097 avic_vm_destroy(kvm);
50385098 sev_vm_destroy(kvm);
5099+
5100+ svm_srso_vm_destroy();
50395101 }
50405102
50415103 static int svm_vm_init(struct kvm *kvm)
@@ -5061,6 +5123,7 @@ static int svm_vm_init(struct kvm *kvm) · 19 unmodified lines
50615123 return ret;
50625124 }
50635125
5126+ svm_srso_vm_init();
50645127 return 0;
50655128 }
50665129
arch/x86/kvm/svm/svm.h+2−0
@@ -335,6 +335,8 @@ struct svm_cpu_data { · 334 unmodified lines
335335 u32 next_asid;
336336 u32 min_asid;
337337
338+ bool bp_spec_reduce_set;
339+
338340 struct vmcb *save_area;
339341 unsigned long save_area_pa;
340342
arch/x86/kvm/trace.h+10−3
@@ -11,6 +11,13 @@ · 10 unmodified lines
1111 #undef TRACE_SYSTEM
1212 #define TRACE_SYSTEM kvm
1313
14+#ifdef CREATE_TRACE_POINTS
15+#define tracing_kvm_rip_read(vcpu) ({ \
16+ typeof(vcpu) __vcpu = vcpu; \
17+ __vcpu->arch.guest_state_protected ? 0 : kvm_rip_read(__vcpu); \
18+ })
19+#endif
20+
1421 /*
1522 * Tracepoint for guest mode entry.
1623 */
@@ -28,7 +35,7 @@ TRACE_EVENT(kvm_entry, · 11 unmodified lines
2835
2936 TP_fast_assign(
3037 __entry->vcpu_id = vcpu->vcpu_id;
31− __entry->rip = kvm_rip_read(vcpu);
38+ __entry->rip = tracing_kvm_rip_read(vcpu);
3239 __entry->immediate_exit = force_immediate_exit;
3340
3441 kvm_x86_call(get_entry_info)(vcpu, &__entry->intr_info,
@@ -319,7 +326,7 @@ TRACE_EVENT(name, \ · 284 unmodified lines
319326 ), \
320327 \
321328 TP_fast_assign( \
322− __entry->guest_rip = kvm_rip_read(vcpu); \
329+ __entry->guest_rip = tracing_kvm_rip_read(vcpu); \
323330 __entry->isa = isa; \
324331 __entry->vcpu_id = vcpu->vcpu_id; \
325332 __entry->requests = READ_ONCE(vcpu->requests); \
@@ -423,7 +430,7 @@ TRACE_EVENT(kvm_page_fault, · 97 unmodified lines
423430
424431 TP_fast_assign(
425432 __entry->vcpu_id = vcpu->vcpu_id;
426− __entry->guest_rip = kvm_rip_read(vcpu);
433+ __entry->guest_rip = tracing_kvm_rip_read(vcpu);
427434 __entry->fault_address = fault_address;
428435 __entry->error_code = error_code;
429436 ),
arch/x86/kvm/vmx/posted_intr.c+40−25
@@ -31,6 +31,8 @@ static DEFINE_PER_CPU(struct list_head, wakeup_vcpus_on_cpu); · 30 unmodified lines
3131 */
3232 static DEFINE_PER_CPU(raw_spinlock_t, wakeup_vcpus_on_cpu_lock);
3333
34+#define PI_LOCK_SCHED_OUT SINGLE_DEPTH_NESTING
35+
3436 static inline struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu)
3537 {
3638 return &(to_vmx(vcpu)->pi_desc);
@@ -89,9 +91,20 @@ void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu) · 52 unmodified lines
8991 * current pCPU if the task was migrated.
9092 */
9193 if (pi_desc->nv == POSTED_INTR_WAKEUP_VECTOR) {
92− raw_spin_lock(&per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu));
94+ raw_spinlock_t *spinlock = &per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu);
95+
96+ /*
97+ * In addition to taking the wakeup lock for the regular/IRQ
98+ * context, tell lockdep it is being taken for the "sched out"
99+ * context as well. vCPU loads happens in task context, and
100+ * this is taking the lock of the *previous* CPU, i.e. can race
101+ * with both the scheduler and the wakeup handler.
102+ */
103+ raw_spin_lock(spinlock);
104+ spin_acquire(&spinlock->dep_map, PI_LOCK_SCHED_OUT, 0, _RET_IP_);
93105 list_del(&vmx->pi_wakeup_list);
94− raw_spin_unlock(&per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu));
106+ spin_release(&spinlock->dep_map, _RET_IP_);
107+ raw_spin_unlock(spinlock);
95108 }
96109
97110 dest = cpu_physical_id(cpu);
@@ -148,11 +161,23 @@ static void pi_enable_wakeup_handler(struct kvm_vcpu *vcpu) · 50 unmodified lines
148161 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
149162 struct vcpu_vmx *vmx = to_vmx(vcpu);
150163 struct pi_desc old, new;
151− unsigned long flags;
152164
153− local_irq_save(flags);
165+ lockdep_assert_irqs_disabled();
154166
155− raw_spin_lock(&per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu));
167+ /*
168+ * Acquire the wakeup lock using the "sched out" context to workaround
169+ * a lockdep false positive. When this is called, schedule() holds
170+ * various per-CPU scheduler locks. When the wakeup handler runs, it
171+ * holds this CPU's wakeup lock while calling try_to_wake_up(), which
172+ * can eventually take the aforementioned scheduler locks, which causes
173+ * lockdep to assume there is deadlock.
174+ *
175+ * Deadlock can't actually occur because IRQs are disabled for the
176+ * entirety of the sched_out critical section, i.e. the wakeup handler
177+ * can't run while the scheduler locks are held.
178+ */
179+ raw_spin_lock_nested(&per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu),
180+ PI_LOCK_SCHED_OUT);
156181 list_add_tail(&vmx->pi_wakeup_list,
157182 &per_cpu(wakeup_vcpus_on_cpu, vcpu->cpu));
158183 raw_spin_unlock(&per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu));
@@ -176,8 +201,6 @@ static void pi_enable_wakeup_handler(struct kvm_vcpu *vcpu) · 17 unmodified lines
176201 */
177202 if (pi_test_on(&new))
178203 __apic_send_IPI_self(POSTED_INTR_WAKEUP_VECTOR);
179−
180− local_irq_restore(flags);
181204 }
182205
183206 static bool vmx_needs_pi_wakeup(struct kvm_vcpu *vcpu)
@@ -274,6 +297,7 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 90 unmodified lines
274297 {
275298 struct kvm_kernel_irq_routing_entry *e;
276299 struct kvm_irq_routing_table *irq_rt;
300+ bool enable_remapped_mode = true;
277301 struct kvm_lapic_irq irq;
278302 struct kvm_vcpu *vcpu;
279303 struct vcpu_data vcpu_info;
@@ -312,21 +336,8 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 32 unmodified lines
312336
313337 kvm_set_msi_irq(kvm, e, &irq);
314338 if (!kvm_intr_is_single_vcpu(kvm, &irq, &vcpu) ||
315− !kvm_irq_is_postable(&irq)) {
316− /*
317− * Make sure the IRTE is in remapped mode if
318− * we don't handle it in posted mode.
319− */
320− ret = irq_set_vcpu_affinity(host_irq, NULL);
321− if (ret < 0) {
322− printk(KERN_INFO
323− "failed to back to remapped mode, irq: %u\n",
324− host_irq);
325− goto out;
326− }
327−
339+ !kvm_irq_is_postable(&irq))
328340 continue;
329− }
330341
331342 vcpu_info.pi_desc_addr = __pa(vcpu_to_pi_desc(vcpu));
332343 vcpu_info.vector = irq.vector;
@@ -334,11 +345,12 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 1 unmodified line
334345 trace_kvm_pi_irte_update(host_irq, vcpu->vcpu_id, e->gsi,
335346 vcpu_info.vector, vcpu_info.pi_desc_addr, set);
336347
337− if (set)
338− ret = irq_set_vcpu_affinity(host_irq, &vcpu_info);
339− else
340− ret = irq_set_vcpu_affinity(host_irq, NULL);
348+ if (!set)
349+ continue;
350+
351+ enable_remapped_mode = false;
341352
353+ ret = irq_set_vcpu_affinity(host_irq, &vcpu_info);
342354 if (ret < 0) {
343355 printk(KERN_INFO "%s: failed to update PI IRTE\n",
344356 __func__);
@@ -346,6 +358,9 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, · 1 unmodified line
346358 }
347359 }
348360
361+ if (enable_remapped_mode)
362+ ret = irq_set_vcpu_affinity(host_irq, NULL);
363+
349364 ret = 0;
350365 out:
351366 srcu_read_unlock(&kvm->irq_srcu, idx);
arch/x86/kvm/x86.c+28−12
@@ -1584,7 +1584,7 @@ EXPORT_SYMBOL_GPL(kvm_emulate_rdpmc); · 1583 unmodified lines
15841584 ARCH_CAP_PSCHANGE_MC_NO | ARCH_CAP_TSX_CTRL_MSR | ARCH_CAP_TAA_NO | \
15851585 ARCH_CAP_SBDR_SSDP_NO | ARCH_CAP_FBSDP_NO | ARCH_CAP_PSDP_NO | \
15861586 ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO | \
1587− ARCH_CAP_RFDS_NO | ARCH_CAP_RFDS_CLEAR | ARCH_CAP_BHI_NO)
1587+ ARCH_CAP_RFDS_NO | ARCH_CAP_RFDS_CLEAR | ARCH_CAP_BHI_NO | ARCH_CAP_ITS_NO)
15881588
15891589 static u64 kvm_get_arch_capabilities(void)
15901590 {
@@ -1618,6 +1618,8 @@ static u64 kvm_get_arch_capabilities(void) · 27 unmodified lines
16181618 data |= ARCH_CAP_MDS_NO;
16191619 if (!boot_cpu_has_bug(X86_BUG_RFDS))
16201620 data |= ARCH_CAP_RFDS_NO;
1621+ if (!boot_cpu_has_bug(X86_BUG_ITS))
1622+ data |= ARCH_CAP_ITS_NO;
16211623
16221624 if (!boot_cpu_has(X86_FEATURE_RTM)) {
16231625 /*
@@ -4597,7 +4599,7 @@ static bool kvm_is_vm_type_supported(unsigned long type) · 2973 unmodified lines
45974599 return type < 32 && (kvm_caps.supported_vm_types & BIT(type));
45984600 }
45994601
4600−static inline u32 kvm_sync_valid_fields(struct kvm *kvm)
4602+static inline u64 kvm_sync_valid_fields(struct kvm *kvm)
46014603 {
46024604 return kvm && kvm->arch.has_protected_state ? 0 : KVM_SYNC_X86_VALID_FIELDS;
46034605 }
@@ -11098,7 +11100,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) · 6494 unmodified lines
1109811100 /*
1109911101 * Profile KVM exit RIPs:
1110011102 */
11101− if (unlikely(prof_on == KVM_PROFILING)) {
11103+ if (unlikely(prof_on == KVM_PROFILING &&
11104+ !vcpu->arch.guest_state_protected)) {
1110211105 unsigned long rip = kvm_rip_read(vcpu);
1110311106 profile_hit(KVM_PROFILING, (void *)rip);
1110411107 }
@@ -11492,7 +11495,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 387 unmodified lines
1149211495 {
1149311496 struct kvm_queued_exception *ex = &vcpu->arch.exception;
1149411497 struct kvm_run *kvm_run = vcpu->run;
11495− u32 sync_valid_fields;
11498+ u64 sync_valid_fields;
1149611499 int r;
1149711500
1149811501 r = kvm_mmu_post_init_vm(vcpu->kvm);
@@ -11786,6 +11789,8 @@ int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, · 287 unmodified lines
1178611789 if (kvm_mpx_supported())
1178711790 kvm_load_guest_fpu(vcpu);
1178811791
11792+ kvm_vcpu_srcu_read_lock(vcpu);
11793+
1178911794 r = kvm_apic_accept_events(vcpu);
1179011795 if (r < 0)
1179111796 goto out;
@@ -11799,6 +11804,8 @@ int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, · 7 unmodified lines
1179911804 mp_state->mp_state = vcpu->arch.mp_state;
1180011805
1180111806 out:
11807+ kvm_vcpu_srcu_read_unlock(vcpu);
11808+
1180211809 if (kvm_mpx_supported())
1180311810 kvm_put_guest_fpu(vcpu);
1180411811 vcpu_put(vcpu);
@@ -13552,25 +13559,27 @@ bool kvm_arch_has_noncoherent_dma(struct kvm *kvm) · 1747 unmodified lines
1355213559 }
1355313560 EXPORT_SYMBOL_GPL(kvm_arch_has_noncoherent_dma);
1355413561
13555−bool kvm_arch_has_irq_bypass(void)
13556−{
13557− return enable_apicv && irq_remapping_cap(IRQ_POSTING_CAP);
13558−}
13559−
1356013562 int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
1356113563 struct irq_bypass_producer *prod)
1356213564 {
1356313565 struct kvm_kernel_irqfd *irqfd =
1356413566 container_of(cons, struct kvm_kernel_irqfd, consumer);
13567+ struct kvm *kvm = irqfd->kvm;
1356513568 int ret;
1356613569
13567− irqfd->producer = prod;
1356813570 kvm_arch_start_assignment(irqfd->kvm);
13571+
13572+ spin_lock_irq(&kvm->irqfds.lock);
13573+ irqfd->producer = prod;
13574+
1356913575 ret = kvm_x86_call(pi_update_irte)(irqfd->kvm,
1357013576 prod->irq, irqfd->gsi, 1);
1357113577 if (ret)
1357213578 kvm_arch_end_assignment(irqfd->kvm);
1357313579
13580+ spin_unlock_irq(&kvm->irqfds.lock);
13581+
13582+
1357413583 return ret;
1357513584 }
1357613585
@@ -13580,9 +13589,9 @@ void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons, · 3 unmodified lines
1358013589 int ret;
1358113590 struct kvm_kernel_irqfd *irqfd =
1358213591 container_of(cons, struct kvm_kernel_irqfd, consumer);
13592+ struct kvm *kvm = irqfd->kvm;
1358313593
1358413594 WARN_ON(irqfd->producer != prod);
13585− irqfd->producer = NULL;
1358613595
1358713596 /*
1358813597 * When producer of consumer is unregistered, we change back to
@@ -13590,12 +13599,18 @@ void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons, · 1 unmodified line
1359013599 * when the irq is masked/disabled or the consumer side (KVM
1359113600 * int this case doesn't want to receive the interrupts.
1359213601 */
13602+ spin_lock_irq(&kvm->irqfds.lock);
13603+ irqfd->producer = NULL;
13604+
1359313605 ret = kvm_x86_call(pi_update_irte)(irqfd->kvm,
1359413606 prod->irq, irqfd->gsi, 0);
1359513607 if (ret)
1359613608 printk(KERN_INFO "irq bypass consumer (token %p) unregistration"
1359713609 " fails: %d\n", irqfd->consumer.token, ret);
1359813610
13611+ spin_unlock_irq(&kvm->irqfds.lock);
13612+
13613+
1359913614 kvm_arch_end_assignment(irqfd->kvm);
1360013615 }
1360113616
@@ -13608,7 +13623,8 @@ int kvm_arch_update_irqfd_routing(struct kvm *kvm, unsigned int host_irq, · 6 unmodified lines
1360813623 bool kvm_arch_irqfd_route_changed(struct kvm_kernel_irq_routing_entry *old,
1360913624 struct kvm_kernel_irq_routing_entry *new)
1361013625 {
13611− if (new->type != KVM_IRQ_ROUTING_MSI)
13626+ if (old->type != KVM_IRQ_ROUTING_MSI ||
13627+ new->type != KVM_IRQ_ROUTING_MSI)
1361213628 return true;
1361313629
1361413630 return !!memcmp(&old->msi, &new->msi, sizeof(new->msi));
arch/x86/lib/retpoline.S+48−0
@@ -367,6 +367,54 @@ SYM_FUNC_END(call_depth_return_thunk) · 366 unmodified lines
367367
368368 #endif /* CONFIG_MITIGATION_CALL_DEPTH_TRACKING */
369369
370+#ifdef CONFIG_MITIGATION_ITS
371+
372+.macro ITS_THUNK reg
373+
374+/*
375+ * If CFI paranoid is used then the ITS thunk starts with opcodes (0xea; jne 1b)
376+ * that complete the fineibt_paranoid caller sequence.
377+ */
378+1: .byte 0xea
379+SYM_INNER_LABEL(__x86_indirect_paranoid_thunk_\reg, SYM_L_GLOBAL)
380+ UNWIND_HINT_UNDEFINED
381+ ANNOTATE_NOENDBR
382+ jne 1b
383+SYM_INNER_LABEL(__x86_indirect_its_thunk_\reg, SYM_L_GLOBAL)
384+ UNWIND_HINT_UNDEFINED
385+ ANNOTATE_NOENDBR
386+ ANNOTATE_RETPOLINE_SAFE
387+ jmp *%\reg
388+ int3
389+ .align 32, 0xcc /* fill to the end of the line */
390+ .skip 32 - (__x86_indirect_its_thunk_\reg - 1b), 0xcc /* skip to the next upper half */
391+.endm
392+
393+/* ITS mitigation requires thunks be aligned to upper half of cacheline */
394+.align 64, 0xcc
395+.skip 29, 0xcc
396+
397+#define GEN(reg) ITS_THUNK reg
398+#include <asm/GEN-for-each-reg.h>
399+#undef GEN
400+
401+ .align 64, 0xcc
402+SYM_FUNC_ALIAS(__x86_indirect_its_thunk_array, __x86_indirect_its_thunk_rax)
403+SYM_CODE_END(__x86_indirect_its_thunk_array)
404+
405+.align 64, 0xcc
406+.skip 32, 0xcc
407+SYM_CODE_START(its_return_thunk)
408+ UNWIND_HINT_FUNC
409+ ANNOTATE_NOENDBR
410+ ANNOTATE_UNRET_SAFE
411+ ret
412+ int3
413+SYM_CODE_END(its_return_thunk)
414+EXPORT_SYMBOL(its_return_thunk)
415+
416+#endif /* CONFIG_MITIGATION_ITS */
417+
370418 /*
371419 * This function name is magical and is used by -mfunction-return=thunk-extern
372420 * for the compiler to generate JMPs to it.
arch/x86/lib/x86-opcode-map.txt+2−2
@@ -996,8 +996,8 @@ AVXcode: 4 · 995 unmodified lines
996996 83: Grp1 Ev,Ib (1A),(es)
997997 # CTESTSCC instructions are: CTESTB, CTESTBE, CTESTF, CTESTL, CTESTLE, CTESTNB, CTESTNBE, CTESTNL,
998998 # CTESTNLE, CTESTNO, CTESTNS, CTESTNZ, CTESTO, CTESTS, CTESTT, CTESTZ
999−84: CTESTSCC (ev)
1000−85: CTESTSCC (es) | CTESTSCC (66),(es)
999+84: CTESTSCC Eb,Gb (ev)
1000+85: CTESTSCC Ev,Gv (es) | CTESTSCC Ev,Gv (66),(es)
10011001 88: POPCNT Gv,Ev (es) | POPCNT Gv,Ev (66),(es)
10021002 8f: POP2 Bq,Rq (000),(11B),(ev)
10031003 a5: SHLD Ev,Gv,CL (es) | SHLD Ev,Gv,CL (66),(es)
arch/x86/mm/init_32.c+4−1
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include <linux/initrd.h>
3131 #include <linux/cpumask.h>
3232 #include <linux/gfp.h>
33+#include <linux/execmem.h>
3334
3435 #include <asm/asm.h>
3536 #include <asm/bios_ebda.h>
@@ -565,7 +566,7 @@ static void __init lowmem_pfn_init(void) · 529 unmodified lines
565566 "only %luMB highmem pages available, ignoring highmem size of %luMB!\n"
566567
567568 #define MSG_HIGHMEM_TRIMMED \
568− "Warning: only 4GB will be used. Support for for CONFIG_HIGHMEM64G was removed!\n"
569+ "Warning: only 4GB will be used. Support for CONFIG_HIGHMEM64G was removed!\n"
569570 /*
570571 * We have more RAM than fits into lowmem - we try to put it into
571572 * highmem, also taking the highmem=x boot parameter into account:
@@ -755,6 +756,8 @@ void mark_rodata_ro(void) · 183 unmodified lines
755756 pr_info("Write protecting kernel text and read-only data: %luk\n",
756757 size >> 10);
757758
759+ execmem_cache_make_ro();
760+
758761 kernel_set_to_readonly = 1;
759762
760763 #ifdef CONFIG_CPA_DEBUG
arch/x86/mm/init_64.c+3−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #include <linux/gfp.h>
3535 #include <linux/kcore.h>
3636 #include <linux/bootmem_info.h>
37+#include <linux/execmem.h>
3738
3839 #include <asm/processor.h>
3940 #include <asm/bios_ebda.h>
@@ -1391,6 +1392,8 @@ void mark_rodata_ro(void) · 1351 unmodified lines
13911392 (end - start) >> 10);
13921393 set_memory_ro(start, (end - start) >> PAGE_SHIFT);
13931394
1395+ execmem_cache_make_ro();
1396+
13941397 kernel_set_to_readonly = 1;
13951398
13961399 /*
arch/x86/mm/pgtable.c+2−2
@@ -360,7 +360,7 @@ static inline pgd_t *_pgd_alloc(struct mm_struct *mm) · 359 unmodified lines
360360 * We allocate one page for pgd.
361361 */
362362 if (!SHARED_KERNEL_PMD)
363− return __pgd_alloc(mm, PGD_ALLOCATION_ORDER);
363+ return __pgd_alloc(mm, pgd_allocation_order());
364364
365365 /*
366366 * Now PAE kernel is not running as a Xen domain. We can allocate
@@ -380,7 +380,7 @@ static inline void _pgd_free(struct mm_struct *mm, pgd_t *pgd) · 13 unmodified lines
380380
381381 static inline pgd_t *_pgd_alloc(struct mm_struct *mm)
382382 {
383− return __pgd_alloc(mm, PGD_ALLOCATION_ORDER);
383+ return __pgd_alloc(mm, pgd_allocation_order());
384384 }
385385
386386 static inline void _pgd_free(struct mm_struct *mm, pgd_t *pgd)
arch/x86/mm/tlb.c+22−6
@@ -667,9 +667,9 @@ static void cond_mitigation(struct task_struct *next) · 666 unmodified lines
667667 prev_mm = this_cpu_read(cpu_tlbstate.last_user_mm_spec);
668668
669669 /*
670− * Avoid user/user BTB poisoning by flushing the branch predictor
671− * when switching between processes. This stops one process from
672− * doing Spectre-v2 attacks on another.
670+ * Avoid user->user BTB/RSB poisoning by flushing them when switching
671+ * between processes. This stops one process from doing Spectre-v2
672+ * attacks on another.
673673 *
674674 * Both, the conditional and the always IBPB mode use the mm
675675 * pointer to avoid the IBPB when switching between tasks of the
@@ -899,8 +899,9 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct mm_struct *next, · 223 unmodified lines
899899 cond_mitigation(tsk);
900900
901901 /*
902− * Let nmi_uaccess_okay() and finish_asid_transition()
903− * know that CR3 is changing.
902+ * Indicate that CR3 is about to change. nmi_uaccess_okay()
903+ * and others are sensitive to the window where mm_cpumask(),
904+ * CR3 and cpu_tlbstate.loaded_mm are not all in sync.
904905 */
905906 this_cpu_write(cpu_tlbstate.loaded_mm, LOADED_MM_SWITCHING);
906907 barrier();
@@ -1204,8 +1205,16 @@ done: · 297 unmodified lines
12041205
12051206 static bool should_flush_tlb(int cpu, void *data)
12061207 {
1208+ struct mm_struct *loaded_mm = per_cpu(cpu_tlbstate.loaded_mm, cpu);
12071209 struct flush_tlb_info *info = data;
12081210
1211+ /*
1212+ * Order the 'loaded_mm' and 'is_lazy' against their
1213+ * write ordering in switch_mm_irqs_off(). Ensure
1214+ * 'is_lazy' is at least as new as 'loaded_mm'.
1215+ */
1216+ smp_rmb();
1217+
12091218 /* Lazy TLB will get flushed at the next context switch. */
12101219 if (per_cpu(cpu_tlbstate_shared.is_lazy, cpu))
12111220 return false;
@@ -1214,8 +1223,15 @@ static bool should_flush_tlb(int cpu, void *data) · 2 unmodified lines
12141223 if (!info->mm)
12151224 return true;
12161225
1226+ /*
1227+ * While switching, the remote CPU could have state from
1228+ * either the prev or next mm. Assume the worst and flush.
1229+ */
1230+ if (loaded_mm == LOADED_MM_SWITCHING)
1231+ return true;
1232+
12171233 /* The target mm is loaded, and the CPU is not lazy. */
1218− if (per_cpu(cpu_tlbstate.loaded_mm, cpu) == info->mm)
1234+ if (loaded_mm == info->mm)
12191235 return true;
12201236
12211237 /* In cpumask, but not the loaded mm? Periodically remove by flushing. */
arch/x86/net/bpf_jit_comp.c+56−2
@@ -41,6 +41,8 @@ static u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len) · 40 unmodified lines
4141 #define EMIT2(b1, b2) EMIT((b1) + ((b2) << 8), 2)
4242 #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
4343 #define EMIT4(b1, b2, b3, b4) EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4)
44+#define EMIT5(b1, b2, b3, b4, b5) \
45+ do { EMIT1(b1); EMIT4(b2, b3, b4, b5); } while (0)
4446
4547 #define EMIT1_off32(b1, off) \
4648 do { EMIT1(b1); EMIT(off, 4); } while (0)
@@ -661,7 +663,10 @@ static void emit_indirect_jump(u8 **pprog, int reg, u8 *ip) · 614 unmodified lines
661663 {
662664 u8 *prog = *pprog;
663665
664− if (cpu_feature_enabled(X86_FEATURE_RETPOLINE_LFENCE)) {
666+ if (cpu_feature_enabled(X86_FEATURE_INDIRECT_THUNK_ITS)) {
667+ OPTIMIZER_HIDE_VAR(reg);
668+ emit_jump(&prog, its_static_thunk(reg), ip);
669+ } else if (cpu_feature_enabled(X86_FEATURE_RETPOLINE_LFENCE)) {
665670 EMIT_LFENCE();
666671 EMIT2(0xFF, 0xE0 + reg);
667672 } else if (cpu_feature_enabled(X86_FEATURE_RETPOLINE)) {
@@ -683,7 +688,7 @@ static void emit_return(u8 **pprog, u8 *ip) · 15 unmodified lines
683688 {
684689 u8 *prog = *pprog;
685690
686− if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
691+ if (cpu_wants_rethunk()) {
687692 emit_jump(&prog, x86_return_thunk, ip);
688693 } else {
689694 EMIT1(0xC3); /* ret */
@@ -1502,6 +1507,48 @@ static void emit_priv_frame_ptr(u8 **pprog, void __percpu *priv_frame_ptr) · 812 unmodified lines
15021507 #define PRIV_STACK_GUARD_SZ 8
15031508 #define PRIV_STACK_GUARD_VAL 0xEB9F12345678eb9fULL
15041509
1510+static int emit_spectre_bhb_barrier(u8 **pprog, u8 *ip,
1511+ struct bpf_prog *bpf_prog)
1512+{
1513+ u8 *prog = *pprog;
1514+ u8 *func;
1515+
1516+ if (cpu_feature_enabled(X86_FEATURE_CLEAR_BHB_LOOP)) {
1517+ /* The clearing sequence clobbers eax and ecx. */
1518+ EMIT1(0x50); /* push rax */
1519+ EMIT1(0x51); /* push rcx */
1520+ ip += 2;
1521+
1522+ func = (u8 *)clear_bhb_loop;
1523+ ip += x86_call_depth_emit_accounting(&prog, func, ip);
1524+
1525+ if (emit_call(&prog, func, ip))
1526+ return -EINVAL;
1527+ EMIT1(0x59); /* pop rcx */
1528+ EMIT1(0x58); /* pop rax */
1529+ }
1530+ /* Insert IBHF instruction */
1531+ if ((cpu_feature_enabled(X86_FEATURE_CLEAR_BHB_LOOP) &&
1532+ cpu_feature_enabled(X86_FEATURE_HYPERVISOR)) ||
1533+ cpu_feature_enabled(X86_FEATURE_CLEAR_BHB_HW)) {
1534+ /*
1535+ * Add an Indirect Branch History Fence (IBHF). IBHF acts as a
1536+ * fence preventing branch history from before the fence from
1537+ * affecting indirect branches after the fence. This is
1538+ * specifically used in cBPF jitted code to prevent Intra-mode
1539+ * BHI attacks. The IBHF instruction is designed to be a NOP on
1540+ * hardware that doesn't need or support it. The REP and REX.W
1541+ * prefixes are required by the microcode, and they also ensure
1542+ * that the NOP is unlikely to be used in existing code.
1543+ *
1544+ * IBHF is not a valid instruction in 32-bit mode.
1545+ */
1546+ EMIT5(0xF3, 0x48, 0x0F, 0x1E, 0xF8); /* ibhf */
1547+ }
1548+ *pprog = prog;
1549+ return 0;
1550+}
1551+
15051552 static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, u8 *rw_image,
15061553 int oldproglen, struct jit_context *ctx, bool jmp_padding)
15071554 {
@@ -2544,6 +2591,13 @@ emit_jmp: · 1036 unmodified lines
25442591 seen_exit = true;
25452592 /* Update cleanup_addr */
25462593 ctx->cleanup_addr = proglen;
2594+ if (bpf_prog_was_classic(bpf_prog) &&
2595+ !capable(CAP_SYS_ADMIN)) {
2596+ u8 *ip = image + addrs[i - 1];
2597+
2598+ if (emit_spectre_bhb_barrier(&prog, ip, bpf_prog))
2599+ return -EINVAL;
2600+ }
25472601 if (bpf_prog->aux->exception_boundary) {
25482602 pop_callee_regs(&prog, all_callee_regs_used);
25492603 pop_r12(&prog);
arch/x86/platform/efi/efi_64.c+2−2
@@ -73,7 +73,7 @@ int __init efi_alloc_page_tables(void) · 72 unmodified lines
7373 gfp_t gfp_mask;
7474
7575 gfp_mask = GFP_KERNEL | __GFP_ZERO;
76− efi_pgd = (pgd_t *)__get_free_pages(gfp_mask, PGD_ALLOCATION_ORDER);
76+ efi_pgd = (pgd_t *)__get_free_pages(gfp_mask, pgd_allocation_order());
7777 if (!efi_pgd)
7878 goto fail;
7979
@@ -96,7 +96,7 @@ free_p4d: · 16 unmodified lines
9696 if (pgtable_l5_enabled())
9797 free_page((unsigned long)pgd_page_vaddr(*pgd));
9898 free_pgd:
99− free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER);
99+ free_pages((unsigned long)efi_pgd, pgd_allocation_order());
100100 fail:
101101 return -ENOMEM;
102102 }
arch/x86/power/hibernate_asm_64.S+2−2
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 /* code below belongs to the image kernel */
2727 .align PAGE_SIZE
2828 SYM_FUNC_START(restore_registers)
29− ANNOTATE_NOENDBR
29+ ENDBR
3030 /* go back to the original page tables */
3131 movq %r9, %cr3
3232
@@ -120,7 +120,7 @@ SYM_FUNC_END(restore_image) · 87 unmodified lines
120120
121121 /* code below has been relocated to a safe page */
122122 SYM_FUNC_START(core_restore_code)
123− ANNOTATE_NOENDBR
123+ ENDBR
124124 /* switch to temporary page tables */
125125 movq %rax, %cr3
126126 /* flush TLB */
arch/x86/um/shared/sysdep/faultinfo_32.h+1−1
@@ -31,8 +31,8 @@ struct faultinfo { · 30 unmodified lines
3131
3232 #define ___backtrack_faulted(_faulted) \
3333 asm volatile ( \
34− "mov $0, %0\n" \
3534 "movl $__get_kernel_nofault_faulted_%=,%1\n" \
35+ "mov $0, %0\n" \
3636 "jmp _end_%=\n" \
3737 "__get_kernel_nofault_faulted_%=:\n" \
3838 "mov $1, %0;" \
arch/x86/um/shared/sysdep/faultinfo_64.h+1−1
@@ -31,8 +31,8 @@ struct faultinfo { · 30 unmodified lines
3131
3232 #define ___backtrack_faulted(_faulted) \
3333 asm volatile ( \
34− "mov $0, %0\n" \
3534 "movq $__get_kernel_nofault_faulted_%=,%1\n" \
35+ "mov $0, %0\n" \
3636 "jmp _end_%=\n" \
3737 "__get_kernel_nofault_faulted_%=:\n" \
3838 "mov $1, %0;" \
arch/x86/xen/enlighten.c+11−6
@@ -70,6 +70,9 @@ EXPORT_SYMBOL(xen_start_flags); · 69 unmodified lines
7070 */
7171 struct shared_info *HYPERVISOR_shared_info = &xen_dummy_shared_info;
7272
73+/* Number of pages released from the initial allocation. */
74+unsigned long xen_released_pages;
75+
7376 static __ref void xen_get_vendor(void)
7477 {
7578 init_cpu_devs();
@@ -100,10 +103,6 @@ noinstr void *__xen_hypercall_setfunc(void) · 24 unmodified lines
100103 void (*func)(void);
101104
102105 /*
103− * Xen is supported only on CPUs with CPUID, so testing for
104− * X86_FEATURE_CPUID is a test for early_cpu_init() having been
105− * run.
106− *
107106 * Note that __xen_hypercall_setfunc() is noinstr only due to a nasty
108107 * dependency chain: it is being called via the xen_hypercall static
109108 * call when running as a PVH or HVM guest. Hypercalls need to be
@@ -115,8 +114,7 @@ noinstr void *__xen_hypercall_setfunc(void) · 5 unmodified lines
115114 */
116115 instrumentation_begin();
117116
118− if (!boot_cpu_has(X86_FEATURE_CPUID))
119− xen_get_vendor();
117+ xen_get_vendor();
120118
121119 if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
122120 boot_cpu_data.x86_vendor == X86_VENDOR_HYGON))
@@ -466,6 +464,13 @@ int __init arch_xen_unpopulated_init(struct resource **res) · 343 unmodified lines
466464 xen_free_unpopulated_pages(1, &pg);
467465 }
468466
467+ /*
468+ * Account for the region being in the physmap but unpopulated.
469+ * The value in xen_released_pages is used by the balloon
470+ * driver to know how much of the physmap is unpopulated and
471+ * set an accurate initial memory target.
472+ */
473+ xen_released_pages += xen_extra_mem[i].n_pfns;
469474 /* Zero so region is not also added to the balloon driver. */
470475 xen_extra_mem[i].n_pfns = 0;
471476 }
arch/x86/xen/enlighten_pvh.c+18−1
@@ -1,5 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0
22 #include <linux/acpi.h>
3+#include <linux/cpufreq.h>
4+#include <linux/cpuidle.h>
35 #include <linux/export.h>
46 #include <linux/mm.h>
57
@@ -123,8 +125,23 @@ static void __init pvh_arch_setup(void) · 117 unmodified lines
123125 {
124126 pvh_reserve_extra_memory();
125127
126− if (xen_initial_domain())
128+ if (xen_initial_domain()) {
127129 xen_add_preferred_consoles();
130+
131+ /*
132+ * Disable usage of CPU idle and frequency drivers: when
133+ * running as hardware domain the exposed native ACPI tables
134+ * causes idle and/or frequency drivers to attach and
135+ * malfunction. It's Xen the entity that controls the idle and
136+ * frequency states.
137+ *
138+ * For unprivileged domains the exposed ACPI tables are
139+ * fabricated and don't contain such data.
140+ */
141+ disable_cpuidle();
142+ disable_cpufreq();
143+ WARN_ON(xen_set_default_idle());
144+ }
128145 }
129146
130147 void __init xen_pvh_init(struct boot_params *boot_params)
arch/x86/xen/multicalls.c+14−12
@@ -54,14 +54,20 @@ struct mc_debug_data { · 53 unmodified lines
5454
5555 static DEFINE_PER_CPU(struct mc_buffer, mc_buffer);
5656 static struct mc_debug_data mc_debug_data_early __initdata;
57−static DEFINE_PER_CPU(struct mc_debug_data *, mc_debug_data) =
58− &mc_debug_data_early;
5957 static struct mc_debug_data __percpu *mc_debug_data_ptr;
6058 DEFINE_PER_CPU(unsigned long, xen_mc_irq_flags);
6159
6260 static struct static_key mc_debug __ro_after_init;
6361 static bool mc_debug_enabled __initdata;
6462
63+static struct mc_debug_data * __ref get_mc_debug(void)
64+{
65+ if (!mc_debug_data_ptr)
66+ return &mc_debug_data_early;
67+
68+ return this_cpu_ptr(mc_debug_data_ptr);
69+}
70+
6571 static int __init xen_parse_mc_debug(char *arg)
6672 {
6773 mc_debug_enabled = true;
@@ -71,20 +77,16 @@ static int __init xen_parse_mc_debug(char *arg) · 3 unmodified lines
7177 }
7278 early_param("xen_mc_debug", xen_parse_mc_debug);
7379
74−void mc_percpu_init(unsigned int cpu)
75−{
76− per_cpu(mc_debug_data, cpu) = per_cpu_ptr(mc_debug_data_ptr, cpu);
77−}
78−
7980 static int __init mc_debug_enable(void)
8081 {
8182 unsigned long flags;
83+ struct mc_debug_data __percpu *mcdb;
8284
8385 if (!mc_debug_enabled)
8486 return 0;
8587
86− mc_debug_data_ptr = alloc_percpu(struct mc_debug_data);
87− if (!mc_debug_data_ptr) {
88+ mcdb = alloc_percpu(struct mc_debug_data);
89+ if (!mcdb) {
8890 pr_err("xen_mc_debug inactive\n");
8991 static_key_slow_dec(&mc_debug);
9092 return -ENOMEM;
@@ -93,7 +95,7 @@ static int __init mc_debug_enable(void) · 2 unmodified lines
9395 /* Be careful when switching to percpu debug data. */
9496 local_irq_save(flags);
9597 xen_mc_flush();
96− mc_percpu_init(0);
98+ mc_debug_data_ptr = mcdb;
9799 local_irq_restore(flags);
98100
99101 pr_info("xen_mc_debug active\n");
@@ -155,7 +157,7 @@ void xen_mc_flush(void) · 55 unmodified lines
155157 trace_xen_mc_flush(b->mcidx, b->argidx, b->cbidx);
156158
157159 if (static_key_false(&mc_debug)) {
158− mcdb = __this_cpu_read(mc_debug_data);
160+ mcdb = get_mc_debug();
159161 memcpy(mcdb->entries, b->entries,
160162 b->mcidx * sizeof(struct multicall_entry));
161163 }
@@ -235,7 +237,7 @@ struct multicall_space __xen_mc_entry(size_t args) · 73 unmodified lines
235237
236238 ret.mc = &b->entries[b->mcidx];
237239 if (static_key_false(&mc_debug)) {
238− struct mc_debug_data *mcdb = __this_cpu_read(mc_debug_data);
240+ struct mc_debug_data *mcdb = get_mc_debug();
239241
240242 mcdb->caller[b->mcidx] = __builtin_return_address(0);
241243 mcdb->argsz[b->mcidx] = args;
arch/x86/xen/setup.c+0−3
@@ -37,9 +37,6 @@ · 36 unmodified lines
3737
3838 #define GB(x) ((uint64_t)(x) * 1024 * 1024 * 1024)
3939
40−/* Number of pages released from the initial allocation. */
41−unsigned long xen_released_pages;
42−
4340 /* Memory map would allow PCI passthrough. */
4441 bool xen_pv_pci_possible;
4542
arch/x86/xen/smp_pv.c+0−1
@@ -305,7 +305,6 @@ static int xen_pv_kick_ap(unsigned int cpu, struct task_struct *idle) · 304 unmodified lines
305305 return rc;
306306
307307 xen_pmu_init(cpu);
308− mc_percpu_init(cpu);
309308
310309 /*
311310 * Why is this a BUG? If the hypercall fails then everything can be
arch/x86/xen/xen-asm.S+1−3
@@ -226,9 +226,7 @@ SYM_CODE_END(xen_early_idt_handler_array) · 225 unmodified lines
226226 push %rax
227227 mov $__HYPERVISOR_iret, %eax
228228 syscall /* Do the IRET. */
229−#ifdef CONFIG_MITIGATION_SLS
230− int3
231−#endif
229+ ud2 /* The SYSCALL should never return. */
232230 .endm
233231
234232 SYM_CODE_START(xen_iret)
arch/x86/xen/xen-ops.h+0−3
@@ -261,9 +261,6 @@ void xen_mc_callback(void (*fn)(void *), void *data); · 260 unmodified lines
261261 */
262262 struct multicall_space xen_mc_extend_args(unsigned long op, size_t arg_size);
263263
264−/* Do percpu data initialization for multicalls. */
265−void mc_percpu_init(unsigned int cpu);
266−
267264 extern bool is_xen_pmu;
268265
269266 irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
block/bdev.c+52−18
@@ -152,27 +152,65 @@ static void set_init_blocksize(struct block_device *bdev) · 151 unmodified lines
152152 get_order(bsize));
153153 }
154154
155−int set_blocksize(struct file *file, int size)
155+/**
156+ * bdev_validate_blocksize - check that this block size is acceptable
157+ * @bdev: blockdevice to check
158+ * @block_size: block size to check
159+ *
160+ * For block device users that do not use buffer heads or the block device
161+ * page cache, make sure that this block size can be used with the device.
162+ *
163+ * Return: On success zero is returned, negative error code on failure.
164+ */
165+int bdev_validate_blocksize(struct block_device *bdev, int block_size)
156166 {
157− struct inode *inode = file->f_mapping->host;
158− struct block_device *bdev = I_BDEV(inode);
159−
160− if (blk_validate_block_size(size))
167+ if (blk_validate_block_size(block_size))
161168 return -EINVAL;
162169
163170 /* Size cannot be smaller than the size supported by the device */
164− if (size < bdev_logical_block_size(bdev))
171+ if (block_size < bdev_logical_block_size(bdev))
165172 return -EINVAL;
166173
174+ return 0;
175+}
176+EXPORT_SYMBOL_GPL(bdev_validate_blocksize);
177+
178+int set_blocksize(struct file *file, int size)
179+{
180+ struct inode *inode = file->f_mapping->host;
181+ struct block_device *bdev = I_BDEV(inode);
182+ int ret;
183+
184+ ret = bdev_validate_blocksize(bdev, size);
185+ if (ret)
186+ return ret;
187+
167188 if (!file->private_data)
168189 return -EINVAL;
169190
170191 /* Don't change the size if it is same as current */
171192 if (inode->i_blkbits != blksize_bits(size)) {
193+ /*
194+ * Flush and truncate the pagecache before we reconfigure the
195+ * mapping geometry because folio sizes are variable now. If a
196+ * reader has already allocated a folio whose size is smaller
197+ * than the new min_order but invokes readahead after the new
198+ * min_order becomes visible, readahead will think there are
199+ * "zero" blocks per folio and crash. Take the inode and
200+ * invalidation locks to avoid racing with
201+ * read/write/fallocate.
202+ */
203+ inode_lock(inode);
204+ filemap_invalidate_lock(inode->i_mapping);
205+
172206 sync_blockdev(bdev);
207+ kill_bdev(bdev);
208+
173209 inode->i_blkbits = blksize_bits(size);
174210 mapping_set_folio_min_order(inode->i_mapping, get_order(size));
175211 kill_bdev(bdev);
212+ filemap_invalidate_unlock(inode->i_mapping);
213+ inode_unlock(inode);
176214 }
177215 return 0;
178216 }
@@ -777,13 +815,13 @@ static void blkdev_put_part(struct block_device *part) · 598 unmodified lines
777815 blkdev_put_whole(whole);
778816 }
779817
780−struct block_device *blkdev_get_no_open(dev_t dev)
818+struct block_device *blkdev_get_no_open(dev_t dev, bool autoload)
781819 {
782820 struct block_device *bdev;
783821 struct inode *inode;
784822
785823 inode = ilookup(blockdev_superblock, dev);
786− if (!inode && IS_ENABLED(CONFIG_BLOCK_LEGACY_AUTOLOAD)) {
824+ if (!inode && autoload && IS_ENABLED(CONFIG_BLOCK_LEGACY_AUTOLOAD)) {
787825 blk_request_module(dev);
788826 inode = ilookup(blockdev_superblock, dev);
789827 if (inode)
@@ -1005,7 +1043,7 @@ struct file *bdev_file_open_by_dev(dev_t dev, blk_mode_t mode, void *holder, · 215 unmodified lines
10051043 if (ret)
10061044 return ERR_PTR(ret);
10071045
1008− bdev = blkdev_get_no_open(dev);
1046+ bdev = blkdev_get_no_open(dev, true);
10091047 if (!bdev)
10101048 return ERR_PTR(-ENXIO);
10111049
@@ -1272,21 +1310,17 @@ void sync_bdevs(bool wait) · 260 unmodified lines
12721310 /*
12731311 * Handle STATX_{DIOALIGN, WRITE_ATOMIC} for block devices.
12741312 */
1275−void bdev_statx(struct path *path, struct kstat *stat,
1276− u32 request_mask)
1313+void bdev_statx(const struct path *path, struct kstat *stat, u32 request_mask)
12771314 {
1278− struct inode *backing_inode;
12791315 struct block_device *bdev;
12801316
1281− backing_inode = d_backing_inode(path->dentry);
1282−
12831317 /*
1284− * Note that backing_inode is the inode of a block device node file,
1285− * not the block device's internal inode. Therefore it is *not* valid
1286− * to use I_BDEV() here; the block device has to be looked up by i_rdev
1318+ * Note that d_backing_inode() returns the block device node inode, not
1319+ * the block device's internal inode. Therefore it is *not* valid to
1320+ * use I_BDEV() here; the block device has to be looked up by i_rdev
12871321 * instead.
12881322 */
1289− bdev = blkdev_get_no_open(backing_inode->i_rdev);
1323+ bdev = blkdev_get_no_open(d_backing_inode(path->dentry)->i_rdev, false);
12901324 if (!bdev)
12911325 return;
12921326
block/bio-integrity-auto.c+47−15
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 * not aware of PI.
1010 */
1111 #include <linux/blk-integrity.h>
12+#include <linux/t10-pi.h>
1213 #include <linux/workqueue.h>
1314 #include "blk.h"
1415
@@ -43,6 +44,29 @@ static void bio_integrity_verify_fn(struct work_struct *work) · 28 unmodified lines
4344 bio_endio(bio);
4445 }
4546
47+#define BIP_CHECK_FLAGS (BIP_CHECK_GUARD | BIP_CHECK_REFTAG | BIP_CHECK_APPTAG)
48+static bool bip_should_check(struct bio_integrity_payload *bip)
49+{
50+ return bip->bip_flags & BIP_CHECK_FLAGS;
51+}
52+
53+static bool bi_offload_capable(struct blk_integrity *bi)
54+{
55+ switch (bi->csum_type) {
56+ case BLK_INTEGRITY_CSUM_CRC64:
57+ return bi->tuple_size == sizeof(struct crc64_pi_tuple);
58+ case BLK_INTEGRITY_CSUM_CRC:
59+ case BLK_INTEGRITY_CSUM_IP:
60+ return bi->tuple_size == sizeof(struct t10_pi_tuple);
61+ default:
62+ pr_warn_once("%s: unknown integrity checksum type:%d\n",
63+ __func__, bi->csum_type);
64+ fallthrough;
65+ case BLK_INTEGRITY_CSUM_NONE:
66+ return false;
67+ }
68+}
69+
4670 /**
4771 * __bio_integrity_endio - Integrity I/O completion function
4872 * @bio: Protected bio
@@ -54,12 +78,12 @@ static void bio_integrity_verify_fn(struct work_struct *work) · 5 unmodified lines
5478 */
5579 bool __bio_integrity_endio(struct bio *bio)
5680 {
57− struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
5881 struct bio_integrity_payload *bip = bio_integrity(bio);
5982 struct bio_integrity_data *bid =
6083 container_of(bip, struct bio_integrity_data, bip);
6184
62− if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && bi->csum_type) {
85+ if (bio_op(bio) == REQ_OP_READ && !bio->bi_status &&
86+ bip_should_check(bip)) {
6387 INIT_WORK(&bid->work, bio_integrity_verify_fn);
6488 queue_work(kintegrityd_wq, &bid->work);
6589 return false;
@@ -84,6 +108,7 @@ bool bio_integrity_prep(struct bio *bio) · 18 unmodified lines
84108 {
85109 struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
86110 struct bio_integrity_data *bid;
111+ bool set_flags = true;
87112 gfp_t gfp = GFP_NOIO;
88113 unsigned int len;
89114 void *buf;
@@ -100,19 +125,24 @@ bool bio_integrity_prep(struct bio *bio) · 10 unmodified lines
100125
101126 switch (bio_op(bio)) {
102127 case REQ_OP_READ:
103− if (bi->flags & BLK_INTEGRITY_NOVERIFY)
104− return true;
128+ if (bi->flags & BLK_INTEGRITY_NOVERIFY) {
129+ if (bi_offload_capable(bi))
130+ return true;
131+ set_flags = false;
132+ }
105133 break;
106134 case REQ_OP_WRITE:
107− if (bi->flags & BLK_INTEGRITY_NOGENERATE)
108− return true;
109−
110135 /*
111136 * Zero the memory allocated to not leak uninitialized kernel
112137 * memory to disk for non-integrity metadata where nothing else
113138 * initializes the memory.
114139 */
115− if (bi->csum_type == BLK_INTEGRITY_CSUM_NONE)
140+ if (bi->flags & BLK_INTEGRITY_NOGENERATE) {
141+ if (bi_offload_capable(bi))
142+ return true;
143+ set_flags = false;
144+ gfp |= __GFP_ZERO;
145+ } else if (bi->csum_type == BLK_INTEGRITY_CSUM_NONE)
116146 gfp |= __GFP_ZERO;
117147 break;
118148 default:
@@ -137,19 +167,21 @@ bool bio_integrity_prep(struct bio *bio) · 18 unmodified lines
137167 bid->bip.bip_flags |= BIP_BLOCK_INTEGRITY;
138168 bip_set_seed(&bid->bip, bio->bi_iter.bi_sector);
139169
140− if (bi->csum_type == BLK_INTEGRITY_CSUM_IP)
141− bid->bip.bip_flags |= BIP_IP_CHECKSUM;
142− if (bi->csum_type)
143− bid->bip.bip_flags |= BIP_CHECK_GUARD;
144− if (bi->flags & BLK_INTEGRITY_REF_TAG)
145− bid->bip.bip_flags |= BIP_CHECK_REFTAG;
170+ if (set_flags) {
171+ if (bi->csum_type == BLK_INTEGRITY_CSUM_IP)
172+ bid->bip.bip_flags |= BIP_IP_CHECKSUM;
173+ if (bi->csum_type)
174+ bid->bip.bip_flags |= BIP_CHECK_GUARD;
175+ if (bi->flags & BLK_INTEGRITY_REF_TAG)
176+ bid->bip.bip_flags |= BIP_CHECK_REFTAG;
177+ }
146178
147179 if (bio_integrity_add_page(bio, virt_to_page(buf), len,
148180 offset_in_page(buf)) < len)
149181 goto err_end_io;
150182
151183 /* Auto-generate integrity metadata if this is a write */
152− if (bio_data_dir(bio) == WRITE)
184+ if (bio_data_dir(bio) == WRITE && bip_should_check(&bid->bip))
153185 blk_integrity_generate(bio);
154186 else
155187 bid->saved_bio_iter = bio->bi_iter;
block/bio-integrity.c+6−11
@@ -66,16 +66,12 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio, · 65 unmodified lines
6666 }
6767 EXPORT_SYMBOL(bio_integrity_alloc);
6868
69−static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs,
70− bool dirty)
69+static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs)
7170 {
7271 int i;
7372
74− for (i = 0; i < nr_vecs; i++) {
75− if (dirty && !PageCompound(bv[i].bv_page))
76− set_page_dirty_lock(bv[i].bv_page);
73+ for (i = 0; i < nr_vecs; i++)
7774 unpin_user_page(bv[i].bv_page);
78− }
7975 }
8076
8177 static void bio_integrity_uncopy_user(struct bio_integrity_payload *bip)
@@ -91,7 +87,7 @@ static void bio_integrity_uncopy_user(struct bio_integrity_payload *bip) · 9 unmodified lines
9187 ret = copy_to_iter(bvec_virt(bounce_bvec), bytes, &orig_iter);
9288 WARN_ON_ONCE(ret != bytes);
9389
94− bio_integrity_unpin_bvec(orig_bvecs, orig_nr_vecs, true);
90+ bio_integrity_unpin_bvec(orig_bvecs, orig_nr_vecs);
9591 }
9692
9793 /**
@@ -111,8 +107,7 @@ void bio_integrity_unmap_user(struct bio *bio) · 13 unmodified lines
111107 return;
112108 }
113109
114− bio_integrity_unpin_bvec(bip->bip_vec, bip->bip_max_vcnt,
115− bio_data_dir(bio) == READ);
110+ bio_integrity_unpin_bvec(bip->bip_vec, bip->bip_max_vcnt);
116111 }
117112
118113 /**
@@ -198,7 +193,7 @@ static int bio_integrity_copy_user(struct bio *bio, struct bio_vec *bvec, · 79 unmodified lines
198193 }
199194
200195 if (write)
201− bio_integrity_unpin_bvec(bvec, nr_vecs, false);
196+ bio_integrity_unpin_bvec(bvec, nr_vecs);
202197 else
203198 memcpy(&bip->bip_vec[1], bvec, nr_vecs * sizeof(*bvec));
204199
@@ -319,7 +314,7 @@ int bio_integrity_map_user(struct bio *bio, struct iov_iter *iter) · 114 unmodified lines
319314 return 0;
320315
321316 release_pages:
322− bio_integrity_unpin_bvec(bvec, nr_bvecs, false);
317+ bio_integrity_unpin_bvec(bvec, nr_bvecs);
323318 free_bvec:
324319 if (bvec != stack_vec)
325320 kfree(bvec);
block/bio.c+1−1
@@ -611,7 +611,7 @@ struct bio *bio_kmalloc(unsigned short nr_vecs, gfp_t gfp_mask) · 610 unmodified lines
611611 {
612612 struct bio *bio;
613613
614− if (nr_vecs > UIO_MAXIOV)
614+ if (nr_vecs > BIO_MAX_INLINE_VECS)
615615 return NULL;
616616 return kmalloc(struct_size(bio, bi_inline_vecs, nr_vecs), gfp_mask);
617617 }
block/blk-cgroup.c+1−1
@@ -797,7 +797,7 @@ int blkg_conf_open_bdev(struct blkg_conf_ctx *ctx) · 796 unmodified lines
797797 return -EINVAL;
798798 input = skip_spaces(input);
799799
800− bdev = blkdev_get_no_open(MKDEV(major, minor));
800+ bdev = blkdev_get_no_open(MKDEV(major, minor), false);
801801 if (!bdev)
802802 return -ENODEV;
803803 if (bdev_is_partition(bdev)) {
block/blk-settings.c+7−1
@@ -61,8 +61,14 @@ void blk_apply_bdi_limits(struct backing_dev_info *bdi, · 60 unmodified lines
6161 /*
6262 * For read-ahead of large files to be effective, we need to read ahead
6363 * at least twice the optimal I/O size.
64+ *
65+ * There is no hardware limitation for the read-ahead size and the user
66+ * might have increased the read-ahead size through sysfs, so don't ever
67+ * decrease it.
6468 */
65− bdi->ra_pages = max(lim->io_opt * 2 / PAGE_SIZE, VM_READAHEAD_PAGES);
69+ bdi->ra_pages = max3(bdi->ra_pages,
70+ lim->io_opt * 2 / PAGE_SIZE,
71+ VM_READAHEAD_PAGES);
6672 bdi->io_pages = lim->max_sectors >> PAGE_SECTORS_SHIFT;
6773 }
6874
block/blk-sysfs.c+2−0
@@ -909,6 +909,8 @@ out_unregister_ia_ranges: · 908 unmodified lines
909909 out_debugfs_remove:
910910 blk_debugfs_remove(disk);
911911 mutex_unlock(&q->sysfs_lock);
912+ if (queue_is_mq(q))
913+ blk_mq_sysfs_unregister(disk);
912914 out_put_queue_kobj:
913915 kobject_put(&disk->queue_kobj);
914916 return ret;
block/blk-throttle.h+1−0
@@ -1,3 +1,4 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
12 #ifndef BLK_THROTTLE_H
23 #define BLK_THROTTLE_H
34
block/blk-zoned.c+4−1
@@ -343,6 +343,7 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode, · 342 unmodified lines
343343 op = REQ_OP_ZONE_RESET;
344344
345345 /* Invalidate the page cache, including dirty pages. */
346+ inode_lock(bdev->bd_mapping->host);
346347 filemap_invalidate_lock(bdev->bd_mapping);
347348 ret = blkdev_truncate_zone_range(bdev, mode, &zrange);
348349 if (ret)
@@ -364,8 +365,10 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode, · 15 unmodified lines
364365 ret = blkdev_zone_mgmt(bdev, op, zrange.sector, zrange.nr_sectors);
365366
366367 fail:
367− if (cmd == BLKRESETZONE)
368+ if (cmd == BLKRESETZONE) {
368369 filemap_invalidate_unlock(bdev->bd_mapping);
370+ inode_unlock(bdev->bd_mapping->host);
371+ }
369372
370373 return ret;
371374 }
block/blk.h+5−1
@@ -94,6 +94,9 @@ static inline void blk_wait_io(struct completion *done) · 93 unmodified lines
9494 wait_for_completion_io(done);
9595 }
9696
97+struct block_device *blkdev_get_no_open(dev_t dev, bool autoload);
98+void blkdev_put_no_open(struct block_device *bdev);
99+
97100 #define BIO_INLINE_VECS 4
98101 struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs,
99102 gfp_t gfp_mask);
@@ -477,7 +480,8 @@ static inline void blk_zone_update_request_bio(struct request *rq, · 377 unmodified lines
477480 * the original BIO sector so that blk_zone_write_plug_bio_endio() can
478481 * lookup the zone write plug.
479482 */
480− if (req_op(rq) == REQ_OP_ZONE_APPEND || bio_zone_write_plugging(bio))
483+ if (req_op(rq) == REQ_OP_ZONE_APPEND ||
484+ bio_flagged(bio, BIO_EMULATES_ZONE_APPEND))
481485 bio->bi_iter.bi_sector = rq->__sector;
482486 }
483487 void blk_zone_write_plug_bio_endio(struct bio *bio);
block/fops.c+17−1
@@ -642,7 +642,7 @@ static int blkdev_open(struct inode *inode, struct file *filp) · 641 unmodified lines
642642 if (ret)
643643 return ret;
644644
645− bdev = blkdev_get_no_open(inode->i_rdev);
645+ bdev = blkdev_get_no_open(inode->i_rdev, true);
646646 if (!bdev)
647647 return -ENXIO;
648648
@@ -746,7 +746,14 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from) · 97 unmodified lines
746746 ret = direct_write_fallback(iocb, from, ret,
747747 blkdev_buffered_write(iocb, from));
748748 } else {
749+ /*
750+ * Take i_rwsem and invalidate_lock to avoid racing with
751+ * set_blocksize changing i_blkbits/folio order and punching
752+ * out the pagecache.
753+ */
754+ inode_lock_shared(bd_inode);
749755 ret = blkdev_buffered_write(iocb, from);
756+ inode_unlock_shared(bd_inode);
750757 }
751758
752759 if (ret > 0)
@@ -757,6 +764,7 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from) · 4 unmodified lines
757764
758765 static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
759766 {
767+ struct inode *bd_inode = bdev_file_inode(iocb->ki_filp);
760768 struct block_device *bdev = I_BDEV(iocb->ki_filp->f_mapping->host);
761769 loff_t size = bdev_nr_bytes(bdev);
762770 loff_t pos = iocb->ki_pos;
@@ -793,7 +801,13 @@ static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to) · 30 unmodified lines
793801 goto reexpand;
794802 }
795803
804+ /*
805+ * Take i_rwsem and invalidate_lock to avoid racing with set_blocksize
806+ * changing i_blkbits/folio order and punching out the pagecache.
807+ */
808+ inode_lock_shared(bd_inode);
796809 ret = filemap_read(iocb, to, ret);
810+ inode_unlock_shared(bd_inode);
797811
798812 reexpand:
799813 if (unlikely(shorted))
@@ -836,6 +850,7 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start, · 36 unmodified lines
836850 if ((start | len) & (bdev_logical_block_size(bdev) - 1))
837851 return -EINVAL;
838852
853+ inode_lock(inode);
839854 filemap_invalidate_lock(inode->i_mapping);
840855
841856 /*
@@ -868,6 +883,7 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start, · 26 unmodified lines
868883
869884 fail:
870885 filemap_invalidate_unlock(inode->i_mapping);
886+ inode_unlock(inode);
871887 return error;
872888 }
873889
block/ioctl.c+6−0
@@ -142,6 +142,7 @@ static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode, · 141 unmodified lines
142142 if (err)
143143 return err;
144144
145+ inode_lock(bdev->bd_mapping->host);
145146 filemap_invalidate_lock(bdev->bd_mapping);
146147 err = truncate_bdev_range(bdev, mode, start, start + len - 1);
147148 if (err)
@@ -174,6 +175,7 @@ out_unplug: · 26 unmodified lines
174175 blk_finish_plug(&plug);
175176 fail:
176177 filemap_invalidate_unlock(bdev->bd_mapping);
178+ inode_unlock(bdev->bd_mapping->host);
177179 return err;
178180 }
179181
@@ -199,12 +201,14 @@ static int blk_ioctl_secure_erase(struct block_device *bdev, blk_mode_t mode, · 19 unmodified lines
199201 end > bdev_nr_bytes(bdev))
200202 return -EINVAL;
201203
204+ inode_lock(bdev->bd_mapping->host);
202205 filemap_invalidate_lock(bdev->bd_mapping);
203206 err = truncate_bdev_range(bdev, mode, start, end - 1);
204207 if (!err)
205208 err = blkdev_issue_secure_erase(bdev, start >> 9, len >> 9,
206209 GFP_KERNEL);
207210 filemap_invalidate_unlock(bdev->bd_mapping);
211+ inode_unlock(bdev->bd_mapping->host);
208212 return err;
209213 }
210214
@@ -236,6 +240,7 @@ static int blk_ioctl_zeroout(struct block_device *bdev, blk_mode_t mode, · 25 unmodified lines
236240 return -EINVAL;
237241
238242 /* Invalidate the page cache, including dirty pages */
243+ inode_lock(bdev->bd_mapping->host);
239244 filemap_invalidate_lock(bdev->bd_mapping);
240245 err = truncate_bdev_range(bdev, mode, start, end);
241246 if (err)
@@ -246,6 +251,7 @@ static int blk_ioctl_zeroout(struct block_device *bdev, blk_mode_t mode, · 4 unmodified lines
246251
247252 fail:
248253 filemap_invalidate_unlock(bdev->bd_mapping);
254+ inode_unlock(bdev->bd_mapping->host);
249255 return err;
250256 }
251257
block/ioprio.c+1−5
@@ -46,12 +46,8 @@ int ioprio_check_cap(int ioprio) · 45 unmodified lines
4646 */
4747 if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_NICE))
4848 return -EPERM;
49− fallthrough;
50− /* rt has prio field too */
51− case IOPRIO_CLASS_BE:
52− if (level >= IOPRIO_NR_LEVELS)
53− return -EINVAL;
5449 break;
50+ case IOPRIO_CLASS_BE:
5551 case IOPRIO_CLASS_IDLE:
5652 break;
5753 case IOPRIO_CLASS_NONE:
crypto/ahash.c+1−75
@@ -315,16 +315,7 @@ EXPORT_SYMBOL_GPL(crypto_ahash_setkey); · 314 unmodified lines
315315
316316 static bool ahash_request_hasvirt(struct ahash_request *req)
317317 {
318− struct ahash_request *r2;
319−
320− if (ahash_request_isvirt(req))
321− return true;
322−
323− list_for_each_entry(r2, &req->base.list, base.list)
324− if (ahash_request_isvirt(r2))
325− return true;
326−
327− return false;
318+ return ahash_request_isvirt(req);
328319 }
329320
330321 static int ahash_reqchain_virt(struct ahash_save_req_state *state,
@@ -472,7 +463,6 @@ static int ahash_do_req_chain(struct ahash_request *req, · 141 unmodified lines
472463 bool update = op == crypto_ahash_alg(tfm)->update;
473464 struct ahash_save_req_state *state;
474465 struct ahash_save_req_state state0;
475− struct ahash_request *r2;
476466 u8 *page = NULL;
477467 int err;
478468
@@ -509,7 +499,6 @@ static int ahash_do_req_chain(struct ahash_request *req, · 30 unmodified lines
509499 state->offset = 0;
510500 state->nbytes = 0;
511501 INIT_LIST_HEAD(&state->head);
512− list_splice_init(&req->base.list, &state->head);
513502
514503 if (page)
515504 sg_init_one(&state->sg, page, PAGE_SIZE);
@@ -540,9 +529,6 @@ out_free_page: · 24 unmodified lines
540529
541530 out_set_chain:
542531 req->base.err = err;
543− list_for_each_entry(r2, &req->base.list, base.list)
544− r2->base.err = err;
545−
546532 return err;
547533 }
548534
@@ -551,19 +537,10 @@ int crypto_ahash_init(struct ahash_request *req) · 2 unmodified lines
551537 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
552538
553539 if (likely(tfm->using_shash)) {
554− struct ahash_request *r2;
555540 int err;
556541
557542 err = crypto_shash_init(prepare_shash_desc(req, tfm));
558543 req->base.err = err;
559−
560− list_for_each_entry(r2, &req->base.list, base.list) {
561− struct shash_desc *desc;
562−
563− desc = prepare_shash_desc(r2, tfm);
564− r2->base.err = crypto_shash_init(desc);
565− }
566−
567544 return err;
568545 }
569546
@@ -620,19 +597,10 @@ int crypto_ahash_update(struct ahash_request *req) · 50 unmodified lines
620597 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
621598
622599 if (likely(tfm->using_shash)) {
623− struct ahash_request *r2;
624600 int err;
625601
626602 err = shash_ahash_update(req, ahash_request_ctx(req));
627603 req->base.err = err;
628−
629− list_for_each_entry(r2, &req->base.list, base.list) {
630− struct shash_desc *desc;
631−
632− desc = ahash_request_ctx(r2);
633− r2->base.err = shash_ahash_update(r2, desc);
634− }
635−
636604 return err;
637605 }
638606
@@ -645,19 +613,10 @@ int crypto_ahash_final(struct ahash_request *req) · 6 unmodified lines
645613 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
646614
647615 if (likely(tfm->using_shash)) {
648− struct ahash_request *r2;
649616 int err;
650617
651618 err = crypto_shash_final(ahash_request_ctx(req), req->result);
652619 req->base.err = err;
653−
654− list_for_each_entry(r2, &req->base.list, base.list) {
655− struct shash_desc *desc;
656−
657− desc = ahash_request_ctx(r2);
658− r2->base.err = crypto_shash_final(desc, r2->result);
659− }
660−
661620 return err;
662621 }
663622
@@ -670,19 +629,10 @@ int crypto_ahash_finup(struct ahash_request *req) · 6 unmodified lines
670629 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
671630
672631 if (likely(tfm->using_shash)) {
673− struct ahash_request *r2;
674632 int err;
675633
676634 err = shash_ahash_finup(req, ahash_request_ctx(req));
677635 req->base.err = err;
678−
679− list_for_each_entry(r2, &req->base.list, base.list) {
680− struct shash_desc *desc;
681−
682− desc = ahash_request_ctx(r2);
683− r2->base.err = shash_ahash_finup(r2, desc);
684− }
685−
686636 return err;
687637 }
688638
@@ -757,19 +707,10 @@ int crypto_ahash_digest(struct ahash_request *req) · 68 unmodified lines
757707 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
758708
759709 if (likely(tfm->using_shash)) {
760− struct ahash_request *r2;
761710 int err;
762711
763712 err = shash_ahash_digest(req, prepare_shash_desc(req, tfm));
764713 req->base.err = err;
765−
766− list_for_each_entry(r2, &req->base.list, base.list) {
767− struct shash_desc *desc;
768−
769− desc = prepare_shash_desc(r2, tfm);
770− r2->base.err = shash_ahash_digest(r2, desc);
771− }
772−
773714 return err;
774715 }
775716
@@ -1133,20 +1074,5 @@ int ahash_register_instance(struct crypto_template *tmpl, · 357 unmodified lines
11331074 }
11341075 EXPORT_SYMBOL_GPL(ahash_register_instance);
11351076
1136−void ahash_request_free(struct ahash_request *req)
1137−{
1138− struct ahash_request *tmp;
1139− struct ahash_request *r2;
1140−
1141− if (unlikely(!req))
1142− return;
1143−
1144− list_for_each_entry_safe(r2, tmp, &req->base.list, base.list)
1145− kfree_sensitive(r2);
1146−
1147− kfree_sensitive(req);
1148−}
1149−EXPORT_SYMBOL_GPL(ahash_request_free);
1150−
11511077 MODULE_LICENSE("GPL");
11521078 MODULE_DESCRIPTION("Asynchronous cryptographic hash type");
crypto/algif_hash.c+0−4
@@ -265,10 +265,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, · 264 unmodified lines
265265 goto out_free_state;
266266
267267 err = crypto_ahash_import(&ctx2->req, state);
268− if (err) {
269− sock_orphan(sk2);
270− sock_put(sk2);
271− }
272268
273269 out_free_state:
274270 kfree_sensitive(state);
crypto/scompress.c+14−11
@@ -111,10 +111,14 @@ static void scomp_free_streams(struct scomp_alg *alg) · 110 unmodified lines
111111 struct crypto_acomp_stream __percpu *stream = alg->stream;
112112 int i;
113113
114+ alg->stream = NULL;
115+ if (!stream)
116+ return;
117+
114118 for_each_possible_cpu(i) {
115119 struct crypto_acomp_stream *ps = per_cpu_ptr(stream, i);
116120
117− if (!ps->ctx)
121+ if (IS_ERR_OR_NULL(ps->ctx))
118122 break;
119123
120124 alg->free_ctx(ps->ctx);
@@ -132,6 +136,8 @@ static int scomp_alloc_streams(struct scomp_alg *alg) · 11 unmodified lines
132136 if (!stream)
133137 return -ENOMEM;
134138
139+ alg->stream = stream;
140+
135141 for_each_possible_cpu(i) {
136142 struct crypto_acomp_stream *ps = per_cpu_ptr(stream, i);
137143
@@ -143,8 +149,6 @@ static int scomp_alloc_streams(struct scomp_alg *alg) · 5 unmodified lines
143149
144150 spin_lock_init(&ps->lock);
145151 }
146−
147− alg->stream = stream;
148152 return 0;
149153 }
150154
@@ -159,11 +163,10 @@ static int crypto_scomp_init_tfm(struct crypto_tfm *tfm) · 8 unmodified lines
159163 if (ret)
160164 goto unlock;
161165 }
162− if (!scomp_scratch_users) {
166+ if (!scomp_scratch_users++) {
163167 ret = crypto_scomp_alloc_scratches();
164168 if (ret)
165− goto unlock;
166− scomp_scratch_users++;
169+ scomp_scratch_users--;
167170 }
168171 unlock:
169172 mutex_unlock(&scomp_lock);
@@ -211,8 +214,8 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) · 41 unmodified lines
211214 spage = nth_page(spage, soff / PAGE_SIZE);
212215 soff = offset_in_page(soff);
213216
214− n = slen / PAGE_SIZE;
215− n += (offset_in_page(slen) + soff - 1) / PAGE_SIZE;
217+ n = (slen - 1) / PAGE_SIZE;
218+ n += (offset_in_page(slen - 1) + soff) / PAGE_SIZE;
216219 if (PageHighMem(nth_page(spage, n)) &&
217220 size_add(soff, slen) > PAGE_SIZE)
218221 break;
@@ -239,9 +242,9 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) · 20 unmodified lines
239242 dpage = nth_page(dpage, doff / PAGE_SIZE);
240243 doff = offset_in_page(doff);
241244
242− n = dlen / PAGE_SIZE;
243− n += (offset_in_page(dlen) + doff - 1) / PAGE_SIZE;
244− if (PageHighMem(dpage + n) &&
245+ n = (dlen - 1) / PAGE_SIZE;
246+ n += (offset_in_page(dlen - 1) + doff) / PAGE_SIZE;
247+ if (PageHighMem(nth_page(dpage, n)) &&
245248 size_add(doff, dlen) > PAGE_SIZE)
246249 break;
247250 dst = kmap_local_page(dpage) + doff;
crypto/testmgr.c+64−83
@@ -58,9 +58,6 @@ module_param(fuzz_iterations, uint, 0644); · 57 unmodified lines
5858 MODULE_PARM_DESC(fuzz_iterations, "number of fuzz test iterations");
5959 #endif
6060
61−/* Multibuffer is unlimited. Set arbitrary limit for testing. */
62−#define MAX_MB_MSGS 16
63−
6461 #ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
6562
6663 /* a perfect nop */
@@ -3329,48 +3326,27 @@ static int test_acomp(struct crypto_acomp *tfm, · 3262 unmodified lines
33293326 int ctcount, int dtcount)
33303327 {
33313328 const char *algo = crypto_tfm_alg_driver_name(crypto_acomp_tfm(tfm));
3332− struct scatterlist *src = NULL, *dst = NULL;
3333− struct acomp_req *reqs[MAX_MB_MSGS] = {};
3334− char *decomp_out[MAX_MB_MSGS] = {};
3335− char *output[MAX_MB_MSGS] = {};
3336− struct crypto_wait wait;
3337− struct acomp_req *req;
3338− int ret = -ENOMEM;
33393329 unsigned int i;
3330+ char *output, *decomp_out;
3331+ int ret;
3332+ struct scatterlist src, dst;
3333+ struct acomp_req *req;
3334+ struct crypto_wait wait;
33403335
3341− src = kmalloc_array(MAX_MB_MSGS, sizeof(*src), GFP_KERNEL);
3342− if (!src)
3343− goto out;
3344− dst = kmalloc_array(MAX_MB_MSGS, sizeof(*dst), GFP_KERNEL);
3345− if (!dst)
3346− goto out;
3347−
3348− for (i = 0; i < MAX_MB_MSGS; i++) {
3349− reqs[i] = acomp_request_alloc(tfm);
3350− if (!reqs[i])
3351− goto out;
3352−
3353− acomp_request_set_callback(reqs[i],
3354− CRYPTO_TFM_REQ_MAY_SLEEP |
3355− CRYPTO_TFM_REQ_MAY_BACKLOG,
3356− crypto_req_done, &wait);
3357− if (i)
3358− acomp_request_chain(reqs[i], reqs[0]);
3359−
3360− output[i] = kmalloc(COMP_BUF_SIZE, GFP_KERNEL);
3361− if (!output[i])
3362− goto out;
3336+ output = kmalloc(COMP_BUF_SIZE, GFP_KERNEL);
3337+ if (!output)
3338+ return -ENOMEM;
33633339
3364− decomp_out[i] = kmalloc(COMP_BUF_SIZE, GFP_KERNEL);
3365− if (!decomp_out[i])
3366− goto out;
3340+ decomp_out = kmalloc(COMP_BUF_SIZE, GFP_KERNEL);
3341+ if (!decomp_out) {
3342+ kfree(output);
3343+ return -ENOMEM;
33673344 }
33683345
33693346 for (i = 0; i < ctcount; i++) {
33703347 unsigned int dlen = COMP_BUF_SIZE;
33713348 int ilen = ctemplate[i].inlen;
33723349 void *input_vec;
3373− int j;
33743350
33753351 input_vec = kmemdup(ctemplate[i].input, ilen, GFP_KERNEL);
33763352 if (!input_vec) {
@@ -3378,61 +3354,70 @@ static int test_acomp(struct crypto_acomp *tfm, · 1 unmodified line
33783354 goto out;
33793355 }
33803356
3357+ memset(output, 0, dlen);
33813358 crypto_init_wait(&wait);
3382− sg_init_one(src, input_vec, ilen);
3359+ sg_init_one(&src, input_vec, ilen);
3360+ sg_init_one(&dst, output, dlen);
33833361
3384− for (j = 0; j < MAX_MB_MSGS; j++) {
3385− sg_init_one(dst + j, output[j], dlen);
3386− acomp_request_set_params(reqs[j], src, dst + j, ilen, dlen);
3362+ req = acomp_request_alloc(tfm);
3363+ if (!req) {
3364+ pr_err("alg: acomp: request alloc failed for %s\n",
3365+ algo);
3366+ kfree(input_vec);
3367+ ret = -ENOMEM;
3368+ goto out;
33873369 }
33883370
3389− req = reqs[0];
3371+ acomp_request_set_params(req, &src, &dst, ilen, dlen);
3372+ acomp_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
3373+ crypto_req_done, &wait);
3374+
33903375 ret = crypto_wait_req(crypto_acomp_compress(req), &wait);
33913376 if (ret) {
33923377 pr_err("alg: acomp: compression failed on test %d for %s: ret=%d\n",
33933378 i + 1, algo, -ret);
33943379 kfree(input_vec);
3380+ acomp_request_free(req);
33953381 goto out;
33963382 }
33973383
33983384 ilen = req->dlen;
33993385 dlen = COMP_BUF_SIZE;
3386+ sg_init_one(&src, output, ilen);
3387+ sg_init_one(&dst, decomp_out, dlen);
34003388 crypto_init_wait(&wait);
3401− for (j = 0; j < MAX_MB_MSGS; j++) {
3402− sg_init_one(src + j, output[j], ilen);
3403− sg_init_one(dst + j, decomp_out[j], dlen);
3404− acomp_request_set_params(reqs[j], src + j, dst + j, ilen, dlen);
3405− }
3406−
3407− crypto_wait_req(crypto_acomp_decompress(req), &wait);
3408− for (j = 0; j < MAX_MB_MSGS; j++) {
3409− ret = reqs[j]->base.err;
3410− if (ret) {
3411− pr_err("alg: acomp: compression failed on test %d (%d) for %s: ret=%d\n",
3412− i + 1, j, algo, -ret);
3413− kfree(input_vec);
3414− goto out;
3415− }
3389+ acomp_request_set_params(req, &src, &dst, ilen, dlen);
34163390
3417− if (reqs[j]->dlen != ctemplate[i].inlen) {
3418− pr_err("alg: acomp: Compression test %d (%d) failed for %s: output len = %d\n",
3419− i + 1, j, algo, reqs[j]->dlen);
3420− ret = -EINVAL;
3421− kfree(input_vec);
3422− goto out;
3423− }
3391+ ret = crypto_wait_req(crypto_acomp_decompress(req), &wait);
3392+ if (ret) {
3393+ pr_err("alg: acomp: compression failed on test %d for %s: ret=%d\n",
3394+ i + 1, algo, -ret);
3395+ kfree(input_vec);
3396+ acomp_request_free(req);
3397+ goto out;
3398+ }
34243399
3425− if (memcmp(input_vec, decomp_out[j], reqs[j]->dlen)) {
3426− pr_err("alg: acomp: Compression test %d (%d) failed for %s\n",
3427− i + 1, j, algo);
3428− hexdump(output[j], reqs[j]->dlen);
3429− ret = -EINVAL;
3430− kfree(input_vec);
3431− goto out;
3432− }
3400+ if (req->dlen != ctemplate[i].inlen) {
3401+ pr_err("alg: acomp: Compression test %d failed for %s: output len = %d\n",
3402+ i + 1, algo, req->dlen);
3403+ ret = -EINVAL;
3404+ kfree(input_vec);
3405+ acomp_request_free(req);
3406+ goto out;
3407+ }
3408+
3409+ if (memcmp(input_vec, decomp_out, req->dlen)) {
3410+ pr_err("alg: acomp: Compression test %d failed for %s\n",
3411+ i + 1, algo);
3412+ hexdump(output, req->dlen);
3413+ ret = -EINVAL;
3414+ kfree(input_vec);
3415+ acomp_request_free(req);
3416+ goto out;
34333417 }
34343418
34353419 kfree(input_vec);
3420+ acomp_request_free(req);
34363421 }
34373422
34383423 for (i = 0; i < dtcount; i++) {
@@ -3446,9 +3431,10 @@ static int test_acomp(struct crypto_acomp *tfm, · 7 unmodified lines
34463431 goto out;
34473432 }
34483433
3434+ memset(output, 0, dlen);
34493435 crypto_init_wait(&wait);
3450− sg_init_one(src, input_vec, ilen);
3451− sg_init_one(dst, output[0], dlen);
3436+ sg_init_one(&src, input_vec, ilen);
3437+ sg_init_one(&dst, output, dlen);
34523438
34533439 req = acomp_request_alloc(tfm);
34543440 if (!req) {
@@ -3459,7 +3445,7 @@ static int test_acomp(struct crypto_acomp *tfm, · 4 unmodified lines
34593445 goto out;
34603446 }
34613447
3462− acomp_request_set_params(req, src, dst, ilen, dlen);
3448+ acomp_request_set_params(req, &src, &dst, ilen, dlen);
34633449 acomp_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
34643450 crypto_req_done, &wait);
34653451
@@ -3481,10 +3467,10 @@ static int test_acomp(struct crypto_acomp *tfm, · 15 unmodified lines
34813467 goto out;
34823468 }
34833469
3484− if (memcmp(output[0], dtemplate[i].output, req->dlen)) {
3470+ if (memcmp(output, dtemplate[i].output, req->dlen)) {
34853471 pr_err("alg: acomp: Decompression test %d failed for %s\n",
34863472 i + 1, algo);
3487− hexdump(output[0], req->dlen);
3473+ hexdump(output, req->dlen);
34883474 ret = -EINVAL;
34893475 kfree(input_vec);
34903476 acomp_request_free(req);
@@ -3498,13 +3484,8 @@ static int test_acomp(struct crypto_acomp *tfm, · 7 unmodified lines
34983484 ret = 0;
34993485
35003486 out:
3501− acomp_request_free(reqs[0]);
3502− for (i = 0; i < MAX_MB_MSGS; i++) {
3503− kfree(output[i]);
3504− kfree(decomp_out[i]);
3505− }
3506− kfree(dst);
3507− kfree(src);
3487+ kfree(decomp_out);
3488+ kfree(output);
35083489 return ret;
35093490 }
35103491
drivers/accel/ivpu/ivpu_debugfs.c+3−3
@@ -332,7 +332,7 @@ ivpu_force_recovery_fn(struct file *file, const char __user *user_buf, size_t si · 331 unmodified lines
332332 return -EINVAL;
333333
334334 ret = ivpu_rpm_get(vdev);
335− if (ret)
335+ if (ret < 0)
336336 return ret;
337337
338338 ivpu_pm_trigger_recovery(vdev, "debugfs");
@@ -383,7 +383,7 @@ static int dct_active_set(void *data, u64 active_percent) · 44 unmodified lines
383383 return -EINVAL;
384384
385385 ret = ivpu_rpm_get(vdev);
386− if (ret)
386+ if (ret < 0)
387387 return ret;
388388
389389 if (active_percent)
@@ -455,7 +455,7 @@ priority_bands_fops_write(struct file *file, const char __user *user_buf, size_t · 65 unmodified lines
455455 if (ret < 0)
456456 return ret;
457457
458− buf[size] = '\0';
458+ buf[ret] = '\0';
459459 ret = sscanf(buf, "%u %u %u %u", &band, &grace_period, &process_grace_period,
460460 &process_quantum);
461461 if (ret != 4)
drivers/accel/ivpu/ivpu_drv.c+5−5
@@ -1,6 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2025 Intel Corporation
44 */
55
66 #include <linux/firmware.h>
@@ -164,7 +164,7 @@ static int ivpu_get_param_ioctl(struct drm_device *dev, void *data, struct drm_f · 157 unmodified lines
164164 args->value = vdev->platform;
165165 break;
166166 case DRM_IVPU_PARAM_CORE_CLOCK_RATE:
167− args->value = ivpu_hw_ratio_to_freq(vdev, vdev->hw->pll.max_ratio);
167+ args->value = ivpu_hw_dpu_max_freq_get(vdev);
168168 break;
169169 case DRM_IVPU_PARAM_NUM_CONTEXTS:
170170 args->value = ivpu_get_context_count(vdev);
@@ -421,9 +421,9 @@ void ivpu_prepare_for_reset(struct ivpu_device *vdev) · 250 unmodified lines
421421 {
422422 ivpu_hw_irq_disable(vdev);
423423 disable_irq(vdev->irq);
424− cancel_work_sync(&vdev->irq_ipc_work);
425− cancel_work_sync(&vdev->irq_dct_work);
426− cancel_work_sync(&vdev->context_abort_work);
424+ flush_work(&vdev->irq_ipc_work);
425+ flush_work(&vdev->irq_dct_work);
426+ flush_work(&vdev->context_abort_work);
427427 ivpu_ipc_disable(vdev);
428428 ivpu_mmu_disable(vdev);
429429 }
drivers/accel/ivpu/ivpu_fw.c+15−6
@@ -1,6 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2025 Intel Corporation
44 */
55
66 #include <linux/firmware.h>
@@ -233,10 +233,20 @@ static int ivpu_fw_parse(struct ivpu_device *vdev) · 226 unmodified lines
233233 fw->dvfs_mode = 0;
234234
235235 fw->sched_mode = ivpu_fw_sched_mode_select(vdev, fw_hdr);
236− fw->primary_preempt_buf_size = fw_hdr->preemption_buffer_1_size;
237− fw->secondary_preempt_buf_size = fw_hdr->preemption_buffer_2_size;
238236 ivpu_info(vdev, "Scheduler mode: %s\n", fw->sched_mode ? "HW" : "OS");
239237
238+ if (fw_hdr->preemption_buffer_1_max_size)
239+ fw->primary_preempt_buf_size = fw_hdr->preemption_buffer_1_max_size;
240+ else
241+ fw->primary_preempt_buf_size = fw_hdr->preemption_buffer_1_size;
242+
243+ if (fw_hdr->preemption_buffer_2_max_size)
244+ fw->secondary_preempt_buf_size = fw_hdr->preemption_buffer_2_max_size;
245+ else
246+ fw->secondary_preempt_buf_size = fw_hdr->preemption_buffer_2_size;
247+ ivpu_dbg(vdev, FW_BOOT, "Preemption buffer sizes: primary %u, secondary %u\n",
248+ fw->primary_preempt_buf_size, fw->secondary_preempt_buf_size);
249+
240250 if (fw_hdr->ro_section_start_address && !is_within_range(fw_hdr->ro_section_start_address,
241251 fw_hdr->ro_section_size,
242252 fw_hdr->image_load_address,
@@ -534,7 +544,7 @@ static void ivpu_fw_boot_params_print(struct ivpu_device *vdev, struct vpu_boot_ · 291 unmodified lines
534544 boot_params->d0i3_entry_vpu_ts);
535545 ivpu_dbg(vdev, FW_BOOT, "boot_params.system_time_us = %llu\n",
536546 boot_params->system_time_us);
537− ivpu_dbg(vdev, FW_BOOT, "boot_params.power_profile = %u\n",
547+ ivpu_dbg(vdev, FW_BOOT, "boot_params.power_profile = 0x%x\n",
538548 boot_params->power_profile);
539549 }
540550
@@ -566,7 +576,6 @@ void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params · 25 unmodified lines
566576
567577 boot_params->magic = VPU_BOOT_PARAMS_MAGIC;
568578 boot_params->vpu_id = to_pci_dev(vdev->drm.dev)->bus->number;
569− boot_params->frequency = ivpu_hw_pll_freq_get(vdev);
570579
571580 /*
572581 * This param is a debug firmware feature. It switches default clock
@@ -637,7 +646,7 @@ void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params · 64 unmodified lines
637646 boot_params->d0i3_residency_time_us = 0;
638647 boot_params->d0i3_entry_vpu_ts = 0;
639648 if (IVPU_WA(disable_d0i2))
640− boot_params->power_profile = 1;
649+ boot_params->power_profile |= BIT(1);
641650
642651 boot_params->system_time_us = ktime_to_us(ktime_get_real());
643652 wmb(); /* Flush WC buffers after writing bootparams */
drivers/accel/ivpu/ivpu_hw.c+1−1
@@ -119,7 +119,7 @@ static void timeouts_init(struct ivpu_device *vdev) · 118 unmodified lines
119119 else
120120 vdev->timeout.autosuspend = 100;
121121 vdev->timeout.d0i3_entry_msg = 5;
122− vdev->timeout.state_dump_msg = 10;
122+ vdev->timeout.state_dump_msg = 100;
123123 }
124124 }
125125
drivers/accel/ivpu/ivpu_hw.h+7−7
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0-only */
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2025 Intel Corporation
44 */
55
66 #ifndef __IVPU_HW_H__
@@ -82,19 +82,19 @@ static inline u64 ivpu_hw_range_size(const struct ivpu_addr_range *range) · 75 unmodified lines
8282 return range->end - range->start;
8383 }
8484
85−static inline u32 ivpu_hw_ratio_to_freq(struct ivpu_device *vdev, u32 ratio)
85+static inline u32 ivpu_hw_dpu_max_freq_get(struct ivpu_device *vdev)
8686 {
87− return ivpu_hw_btrs_ratio_to_freq(vdev, ratio);
87+ return ivpu_hw_btrs_dpu_max_freq_get(vdev);
8888 }
8989
90−static inline void ivpu_hw_irq_clear(struct ivpu_device *vdev)
90+static inline u32 ivpu_hw_dpu_freq_get(struct ivpu_device *vdev)
9191 {
92− ivpu_hw_ip_irq_clear(vdev);
92+ return ivpu_hw_btrs_dpu_freq_get(vdev);
9393 }
9494
95−static inline u32 ivpu_hw_pll_freq_get(struct ivpu_device *vdev)
95+static inline void ivpu_hw_irq_clear(struct ivpu_device *vdev)
9696 {
97− return ivpu_hw_btrs_pll_freq_get(vdev);
97+ ivpu_hw_ip_irq_clear(vdev);
9898 }
9999
100100 static inline u32 ivpu_hw_profiling_freq_get(struct ivpu_device *vdev)
drivers/accel/ivpu/ivpu_hw_btrs.c+64−70
@@ -1,8 +1,10 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2025 Intel Corporation
44 */
55
6+#include <linux/units.h>
7+
68 #include "ivpu_drv.h"
79 #include "ivpu_hw.h"
810 #include "ivpu_hw_btrs.h"
@@ -28,17 +30,13 @@ · 19 unmodified lines
2830
2931 #define BTRS_LNL_ALL_IRQ_MASK ((u32)-1)
3032
31−#define BTRS_MTL_WP_CONFIG_1_TILE_5_3_RATIO WP_CONFIG(MTL_CONFIG_1_TILE, MTL_PLL_RATIO_5_3)
32−#define BTRS_MTL_WP_CONFIG_1_TILE_4_3_RATIO WP_CONFIG(MTL_CONFIG_1_TILE, MTL_PLL_RATIO_4_3)
33−#define BTRS_MTL_WP_CONFIG_2_TILE_5_3_RATIO WP_CONFIG(MTL_CONFIG_2_TILE, MTL_PLL_RATIO_5_3)
34−#define BTRS_MTL_WP_CONFIG_2_TILE_4_3_RATIO WP_CONFIG(MTL_CONFIG_2_TILE, MTL_PLL_RATIO_4_3)
35−#define BTRS_MTL_WP_CONFIG_0_TILE_PLL_OFF WP_CONFIG(0, 0)
3633
3734 #define PLL_CDYN_DEFAULT 0x80
3835 #define PLL_EPP_DEFAULT 0x80
3936 #define PLL_CONFIG_DEFAULT 0x0
40−#define PLL_SIMULATION_FREQ 10000000
41−#define PLL_REF_CLK_FREQ 50000000
37+#define PLL_REF_CLK_FREQ 50000000ull
38+#define PLL_RATIO_TO_FREQ(x) ((x) * PLL_REF_CLK_FREQ)
39+
4240 #define PLL_TIMEOUT_US (1500 * USEC_PER_MSEC)
4341 #define IDLE_TIMEOUT_US (5 * USEC_PER_MSEC)
4442 #define TIMEOUT_US (150 * USEC_PER_MSEC)
@@ -62,6 +60,8 @@ · 17 unmodified lines
6260 #define DCT_ENABLE 0x1
6361 #define DCT_DISABLE 0x0
6462
63+static u32 pll_ratio_to_dpu_freq(struct ivpu_device *vdev, u32 ratio);
64+
6565 int ivpu_hw_btrs_irqs_clear_with_0_mtl(struct ivpu_device *vdev)
6666 {
6767 REGB_WR32(VPU_HW_BTRS_MTL_INTERRUPT_STAT, BTRS_MTL_ALL_IRQ_MASK);
@@ -156,7 +156,7 @@ static int info_init_mtl(struct ivpu_device *vdev) · 88 unmodified lines
156156
157157 hw->tile_fuse = BTRS_MTL_TILE_FUSE_ENABLE_BOTH;
158158 hw->sku = BTRS_MTL_TILE_SKU_BOTH;
159− hw->config = BTRS_MTL_WP_CONFIG_2_TILE_4_3_RATIO;
159+ hw->config = WP_CONFIG(MTL_CONFIG_2_TILE, MTL_PLL_RATIO_4_3);
160160
161161 return 0;
162162 }
@@ -334,8 +334,8 @@ int ivpu_hw_btrs_wp_drive(struct ivpu_device *vdev, bool enable) · 171 unmodified lines
334334
335335 prepare_wp_request(vdev, &wp, enable);
336336
337− ivpu_dbg(vdev, PM, "PLL workpoint request: %u Hz, config: 0x%x, epp: 0x%x, cdyn: 0x%x\n",
338− PLL_RATIO_TO_FREQ(wp.target), wp.cfg, wp.epp, wp.cdyn);
337+ ivpu_dbg(vdev, PM, "PLL workpoint request: %lu MHz, config: 0x%x, epp: 0x%x, cdyn: 0x%x\n",
338+ pll_ratio_to_dpu_freq(vdev, wp.target) / HZ_PER_MHZ, wp.cfg, wp.epp, wp.cdyn);
339339
340340 ret = wp_request_send(vdev, &wp);
341341 if (ret) {
@@ -573,6 +573,47 @@ int ivpu_hw_btrs_wait_for_idle(struct ivpu_device *vdev) · 231 unmodified lines
573573 return REGB_POLL_FLD(VPU_HW_BTRS_LNL_VPU_STATUS, IDLE, 0x1, IDLE_TIMEOUT_US);
574574 }
575575
576+static u32 pll_config_get_mtl(struct ivpu_device *vdev)
577+{
578+ return REGB_RD32(VPU_HW_BTRS_MTL_CURRENT_PLL);
579+}
580+
581+static u32 pll_config_get_lnl(struct ivpu_device *vdev)
582+{
583+ return REGB_RD32(VPU_HW_BTRS_LNL_PLL_FREQ);
584+}
585+
586+static u32 pll_ratio_to_dpu_freq_mtl(u16 ratio)
587+{
588+ return (PLL_RATIO_TO_FREQ(ratio) * 2) / 3;
589+}
590+
591+static u32 pll_ratio_to_dpu_freq_lnl(u16 ratio)
592+{
593+ return PLL_RATIO_TO_FREQ(ratio) / 2;
594+}
595+
596+static u32 pll_ratio_to_dpu_freq(struct ivpu_device *vdev, u32 ratio)
597+{
598+ if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
599+ return pll_ratio_to_dpu_freq_mtl(ratio);
600+ else
601+ return pll_ratio_to_dpu_freq_lnl(ratio);
602+}
603+
604+u32 ivpu_hw_btrs_dpu_max_freq_get(struct ivpu_device *vdev)
605+{
606+ return pll_ratio_to_dpu_freq(vdev, vdev->hw->pll.max_ratio);
607+}
608+
609+u32 ivpu_hw_btrs_dpu_freq_get(struct ivpu_device *vdev)
610+{
611+ if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
612+ return pll_ratio_to_dpu_freq_mtl(pll_config_get_mtl(vdev));
613+ else
614+ return pll_ratio_to_dpu_freq_lnl(pll_config_get_lnl(vdev));
615+}
616+
576617 /* Handler for IRQs from Buttress core (irqB) */
577618 bool ivpu_hw_btrs_irq_handler_mtl(struct ivpu_device *vdev, int irq)
578619 {
@@ -582,9 +623,12 @@ bool ivpu_hw_btrs_irq_handler_mtl(struct ivpu_device *vdev, int irq) · 3 unmodified lines
582623 if (!status)
583624 return false;
584625
585− if (REG_TEST_FLD(VPU_HW_BTRS_MTL_INTERRUPT_STAT, FREQ_CHANGE, status))
586− ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq: %08x",
587− REGB_RD32(VPU_HW_BTRS_MTL_CURRENT_PLL));
626+ if (REG_TEST_FLD(VPU_HW_BTRS_MTL_INTERRUPT_STAT, FREQ_CHANGE, status)) {
627+ u32 pll = pll_config_get_mtl(vdev);
628+
629+ ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq, wp %08x, %lu MHz",
630+ pll, pll_ratio_to_dpu_freq_mtl(pll) / HZ_PER_MHZ);
631+ }
588632
589633 if (REG_TEST_FLD(VPU_HW_BTRS_MTL_INTERRUPT_STAT, ATS_ERR, status)) {
590634 ivpu_err(vdev, "ATS_ERR irq 0x%016llx", REGB_RD64(VPU_HW_BTRS_MTL_ATS_ERR_LOG_0));
@@ -633,8 +677,12 @@ bool ivpu_hw_btrs_irq_handler_lnl(struct ivpu_device *vdev, int irq) · 42 unmodified lines
633677 queue_work(system_wq, &vdev->irq_dct_work);
634678 }
635679
636− if (REG_TEST_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, FREQ_CHANGE, status))
637− ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq: %08x", REGB_RD32(VPU_HW_BTRS_LNL_PLL_FREQ));
680+ if (REG_TEST_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, FREQ_CHANGE, status)) {
681+ u32 pll = pll_config_get_lnl(vdev);
682+
683+ ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq, wp %08x, %lu MHz",
684+ pll, pll_ratio_to_dpu_freq_lnl(pll) / HZ_PER_MHZ);
685+ }
638686
639687 if (REG_TEST_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, ATS_ERR, status)) {
640688 ivpu_err(vdev, "ATS_ERR LOG1 0x%08x ATS_ERR_LOG2 0x%08x\n",
@@ -717,60 +765,6 @@ void ivpu_hw_btrs_dct_set_status(struct ivpu_device *vdev, bool enable, u32 acti · 76 unmodified lines
717765 REGB_WR32(VPU_HW_BTRS_LNL_PCODE_MAILBOX_STATUS, val);
718766 }
719767
720−static u32 pll_ratio_to_freq_mtl(u32 ratio, u32 config)
721−{
722− u32 pll_clock = PLL_REF_CLK_FREQ * ratio;
723− u32 cpu_clock;
724−
725− if ((config & 0xff) == MTL_PLL_RATIO_4_3)
726− cpu_clock = pll_clock * 2 / 4;
727− else
728− cpu_clock = pll_clock * 2 / 5;
729−
730− return cpu_clock;
731−}
732−
733−u32 ivpu_hw_btrs_ratio_to_freq(struct ivpu_device *vdev, u32 ratio)
734−{
735− struct ivpu_hw_info *hw = vdev->hw;
736−
737− if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
738− return pll_ratio_to_freq_mtl(ratio, hw->config);
739− else
740− return PLL_RATIO_TO_FREQ(ratio);
741−}
742−
743−static u32 pll_freq_get_mtl(struct ivpu_device *vdev)
744−{
745− u32 pll_curr_ratio;
746−
747− pll_curr_ratio = REGB_RD32(VPU_HW_BTRS_MTL_CURRENT_PLL);
748− pll_curr_ratio &= VPU_HW_BTRS_MTL_CURRENT_PLL_RATIO_MASK;
749−
750− if (!ivpu_is_silicon(vdev))
751− return PLL_SIMULATION_FREQ;
752−
753− return pll_ratio_to_freq_mtl(pll_curr_ratio, vdev->hw->config);
754−}
755−
756−static u32 pll_freq_get_lnl(struct ivpu_device *vdev)
757−{
758− u32 pll_curr_ratio;
759−
760− pll_curr_ratio = REGB_RD32(VPU_HW_BTRS_LNL_PLL_FREQ);
761− pll_curr_ratio &= VPU_HW_BTRS_LNL_PLL_FREQ_RATIO_MASK;
762−
763− return PLL_RATIO_TO_FREQ(pll_curr_ratio);
764−}
765−
766−u32 ivpu_hw_btrs_pll_freq_get(struct ivpu_device *vdev)
767−{
768− if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
769− return pll_freq_get_mtl(vdev);
770− else
771− return pll_freq_get_lnl(vdev);
772−}
773−
774768 u32 ivpu_hw_btrs_telemetry_offset_get(struct ivpu_device *vdev)
775769 {
776770 if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
drivers/accel/ivpu/ivpu_hw_btrs.h+4−5
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0-only */
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2025 Intel Corporation
44 */
55
66 #ifndef __IVPU_HW_BTRS_H__
@@ -13,9 +13,8 @@ · 6 unmodified lines
1313
1414 #define PLL_PROFILING_FREQ_DEFAULT 38400000
1515 #define PLL_PROFILING_FREQ_HIGH 400000000
16−#define PLL_RATIO_TO_FREQ(x) ((x) * PLL_REF_CLK_FREQ)
1716
18−#define DCT_DEFAULT_ACTIVE_PERCENT 15u
17+#define DCT_DEFAULT_ACTIVE_PERCENT 30u
1918 #define DCT_PERIOD_US 35300u
2019
2120 int ivpu_hw_btrs_info_init(struct ivpu_device *vdev);
@@ -32,12 +31,12 @@ int ivpu_hw_btrs_ip_reset(struct ivpu_device *vdev); · 10 unmodified lines
3231 void ivpu_hw_btrs_profiling_freq_reg_set_lnl(struct ivpu_device *vdev);
3332 void ivpu_hw_btrs_ats_print_lnl(struct ivpu_device *vdev);
3433 void ivpu_hw_btrs_clock_relinquish_disable_lnl(struct ivpu_device *vdev);
34+u32 ivpu_hw_btrs_dpu_max_freq_get(struct ivpu_device *vdev);
35+u32 ivpu_hw_btrs_dpu_freq_get(struct ivpu_device *vdev);
3536 bool ivpu_hw_btrs_irq_handler_mtl(struct ivpu_device *vdev, int irq);
3637 bool ivpu_hw_btrs_irq_handler_lnl(struct ivpu_device *vdev, int irq);
3738 int ivpu_hw_btrs_dct_get_request(struct ivpu_device *vdev, bool *enable);
3839 void ivpu_hw_btrs_dct_set_status(struct ivpu_device *vdev, bool enable, u32 dct_percent);
39−u32 ivpu_hw_btrs_pll_freq_get(struct ivpu_device *vdev);
40−u32 ivpu_hw_btrs_ratio_to_freq(struct ivpu_device *vdev, u32 ratio);
4140 u32 ivpu_hw_btrs_telemetry_offset_get(struct ivpu_device *vdev);
4241 u32 ivpu_hw_btrs_telemetry_size_get(struct ivpu_device *vdev);
4342 u32 ivpu_hw_btrs_telemetry_enable_get(struct ivpu_device *vdev);
drivers/accel/ivpu/ivpu_ipc.c+2−1
@@ -302,7 +302,8 @@ ivpu_ipc_send_receive_internal(struct ivpu_device *vdev, struct vpu_jsm_msg *req · 301 unmodified lines
302302 struct ivpu_ipc_consumer cons;
303303 int ret;
304304
305− drm_WARN_ON(&vdev->drm, pm_runtime_status_suspended(vdev->drm.dev));
305+ drm_WARN_ON(&vdev->drm, pm_runtime_status_suspended(vdev->drm.dev) &&
306+ pm_runtime_enabled(vdev->drm.dev));
306307
307308 ivpu_ipc_consumer_add(vdev, &cons, channel, NULL);
308309
drivers/accel/ivpu/ivpu_job.c+33−17
@@ -470,8 +470,8 @@ static void ivpu_job_destroy(struct ivpu_job *job) · 469 unmodified lines
470470 struct ivpu_device *vdev = job->vdev;
471471 u32 i;
472472
473− ivpu_dbg(vdev, JOB, "Job destroyed: id %3u ctx %2d engine %d",
474− job->job_id, job->file_priv->ctx.id, job->engine_idx);
473+ ivpu_dbg(vdev, JOB, "Job destroyed: id %3u ctx %2d cmdq_id %u engine %d",
474+ job->job_id, job->file_priv->ctx.id, job->cmdq_id, job->engine_idx);
475475
476476 for (i = 0; i < job->bo_count; i++)
477477 if (job->bos[i])
@@ -564,8 +564,8 @@ static int ivpu_job_signal_and_destroy(struct ivpu_device *vdev, u32 job_id, u32 · 86 unmodified lines
564564 dma_fence_signal(job->done_fence);
565565
566566 trace_job("done", job);
567− ivpu_dbg(vdev, JOB, "Job complete: id %3u ctx %2d engine %d status 0x%x\n",
568− job->job_id, job->file_priv->ctx.id, job->engine_idx, job_status);
567+ ivpu_dbg(vdev, JOB, "Job complete: id %3u ctx %2d cmdq_id %u engine %d status 0x%x\n",
568+ job->job_id, job->file_priv->ctx.id, job->cmdq_id, job->engine_idx, job_status);
569569
570570 ivpu_job_destroy(job);
571571 ivpu_stop_job_timeout_detection(vdev);
@@ -664,8 +664,8 @@ static int ivpu_job_submit(struct ivpu_job *job, u8 priority, u32 cmdq_id) · 92 unmodified lines
664664 }
665665
666666 trace_job("submit", job);
667− ivpu_dbg(vdev, JOB, "Job submitted: id %3u ctx %2d engine %d prio %d addr 0x%llx next %d\n",
668− job->job_id, file_priv->ctx.id, job->engine_idx, cmdq->priority,
667+ ivpu_dbg(vdev, JOB, "Job submitted: id %3u ctx %2d cmdq_id %u engine %d prio %d addr 0x%llx next %d\n",
668+ job->job_id, file_priv->ctx.id, cmdq->id, job->engine_idx, cmdq->priority,
669669 job->cmd_buf_vpu_addr, cmdq->jobq->header.tail);
670670
671671 mutex_unlock(&file_priv->lock);
@@ -681,8 +681,8 @@ static int ivpu_job_submit(struct ivpu_job *job, u8 priority, u32 cmdq_id) · 9 unmodified lines
681681 err_erase_xa:
682682 xa_erase(&vdev->submitted_jobs_xa, job->job_id);
683683 err_unlock:
684− mutex_unlock(&vdev->submitted_jobs_lock);
685684 mutex_unlock(&file_priv->lock);
685+ mutex_unlock(&vdev->submitted_jobs_lock);
686686 ivpu_rpm_put(vdev);
687687 return ret;
688688 }
@@ -777,7 +777,8 @@ static int ivpu_submit(struct drm_file *file, struct ivpu_file_priv *file_priv, · 88 unmodified lines
777777 goto err_free_handles;
778778 }
779779
780− ivpu_dbg(vdev, JOB, "Submit ioctl: ctx %u buf_count %u\n", file_priv->ctx.id, buffer_count);
780+ ivpu_dbg(vdev, JOB, "Submit ioctl: ctx %u cmdq_id %u buf_count %u\n",
781+ file_priv->ctx.id, cmdq_id, buffer_count);
781782
782783 job = ivpu_job_create(file_priv, engine, buffer_count);
783784 if (!job) {
@@ -873,15 +874,21 @@ int ivpu_cmdq_submit_ioctl(struct drm_device *dev, void *data, struct drm_file * · 89 unmodified lines
873874 int ivpu_cmdq_create_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
874875 {
875876 struct ivpu_file_priv *file_priv = file->driver_priv;
877+ struct ivpu_device *vdev = file_priv->vdev;
876878 struct drm_ivpu_cmdq_create *args = data;
877879 struct ivpu_cmdq *cmdq;
880+ int ret;
878881
879− if (!ivpu_is_capable(file_priv->vdev, DRM_IVPU_CAP_MANAGE_CMDQ))
882+ if (!ivpu_is_capable(vdev, DRM_IVPU_CAP_MANAGE_CMDQ))
880883 return -ENODEV;
881884
882885 if (args->priority > DRM_IVPU_JOB_PRIORITY_REALTIME)
883886 return -EINVAL;
884887
888+ ret = ivpu_rpm_get(vdev);
889+ if (ret < 0)
890+ return ret;
891+
885892 mutex_lock(&file_priv->lock);
886893
887894 cmdq = ivpu_cmdq_create(file_priv, ivpu_job_to_jsm_priority(args->priority), false);
@@ -890,6 +897,8 @@ int ivpu_cmdq_create_ioctl(struct drm_device *dev, void *data, struct drm_file * · 2 unmodified lines
890897
891898 mutex_unlock(&file_priv->lock);
892899
900+ ivpu_rpm_put(vdev);
901+
893902 return cmdq ? 0 : -ENOMEM;
894903 }
895904
@@ -899,28 +908,35 @@ int ivpu_cmdq_destroy_ioctl(struct drm_device *dev, void *data, struct drm_file · 3 unmodified lines
899908 struct ivpu_device *vdev = file_priv->vdev;
900909 struct drm_ivpu_cmdq_destroy *args = data;
901910 struct ivpu_cmdq *cmdq;
902− u32 cmdq_id;
911+ u32 cmdq_id = 0;
903912 int ret;
904913
905914 if (!ivpu_is_capable(vdev, DRM_IVPU_CAP_MANAGE_CMDQ))
906915 return -ENODEV;
907916
917+ ret = ivpu_rpm_get(vdev);
918+ if (ret < 0)
919+ return ret;
920+
908921 mutex_lock(&file_priv->lock);
909922
910923 cmdq = xa_load(&file_priv->cmdq_xa, args->cmdq_id);
911924 if (!cmdq || cmdq->is_legacy) {
912925 ret = -ENOENT;
913− goto err_unlock;
926+ } else {
927+ cmdq_id = cmdq->id;
928+ ivpu_cmdq_destroy(file_priv, cmdq);
929+ ret = 0;
914930 }
915931
916− cmdq_id = cmdq->id;
917− ivpu_cmdq_destroy(file_priv, cmdq);
918932 mutex_unlock(&file_priv->lock);
919− ivpu_cmdq_abort_all_jobs(vdev, file_priv->ctx.id, cmdq_id);
920− return 0;
921933
922−err_unlock:
923− mutex_unlock(&file_priv->lock);
934+ /* Abort any pending jobs only if cmdq was destroyed */
935+ if (!ret)
936+ ivpu_cmdq_abort_all_jobs(vdev, file_priv->ctx.id, cmdq_id);
937+
938+ ivpu_rpm_put(vdev);
939+
924940 return ret;
925941 }
926942
drivers/accel/ivpu/ivpu_ms.c+24−0
@@ -4,6 +4,7 @@ · 3 unmodified lines
44 */
55
66 #include <drm/drm_file.h>
7+#include <linux/pm_runtime.h>
78
89 #include "ivpu_drv.h"
910 #include "ivpu_gem.h"
@@ -44,6 +45,10 @@ int ivpu_ms_start_ioctl(struct drm_device *dev, void *data, struct drm_file *fil · 34 unmodified lines
4445 args->sampling_period_ns < MS_MIN_SAMPLE_PERIOD_NS)
4546 return -EINVAL;
4647
48+ ret = ivpu_rpm_get(vdev);
49+ if (ret < 0)
50+ return ret;
51+
4752 mutex_lock(&file_priv->ms_lock);
4853
4954 if (get_instance_by_mask(file_priv, args->metric_group_mask)) {
@@ -96,6 +101,8 @@ err_free_ms: · 46 unmodified lines
96101 kfree(ms);
97102 unlock:
98103 mutex_unlock(&file_priv->ms_lock);
104+
105+ ivpu_rpm_put(vdev);
99106 return ret;
100107 }
101108
@@ -160,6 +167,10 @@ int ivpu_ms_get_data_ioctl(struct drm_device *dev, void *data, struct drm_file * · 58 unmodified lines
160167 if (!args->metric_group_mask)
161168 return -EINVAL;
162169
170+ ret = ivpu_rpm_get(vdev);
171+ if (ret < 0)
172+ return ret;
173+
163174 mutex_lock(&file_priv->ms_lock);
164175
165176 ms = get_instance_by_mask(file_priv, args->metric_group_mask);
@@ -187,6 +198,7 @@ int ivpu_ms_get_data_ioctl(struct drm_device *dev, void *data, struct drm_file * · 21 unmodified lines
187198 unlock:
188199 mutex_unlock(&file_priv->ms_lock);
189200
201+ ivpu_rpm_put(vdev);
190202 return ret;
191203 }
192204
@@ -204,11 +216,17 @@ int ivpu_ms_stop_ioctl(struct drm_device *dev, void *data, struct drm_file *file · 11 unmodified lines
204216 {
205217 struct ivpu_file_priv *file_priv = file->driver_priv;
206218 struct drm_ivpu_metric_streamer_stop *args = data;
219+ struct ivpu_device *vdev = file_priv->vdev;
207220 struct ivpu_ms_instance *ms;
221+ int ret;
208222
209223 if (!args->metric_group_mask)
210224 return -EINVAL;
211225
226+ ret = ivpu_rpm_get(vdev);
227+ if (ret < 0)
228+ return ret;
229+
212230 mutex_lock(&file_priv->ms_lock);
213231
214232 ms = get_instance_by_mask(file_priv, args->metric_group_mask);
@@ -217,6 +235,7 @@ int ivpu_ms_stop_ioctl(struct drm_device *dev, void *data, struct drm_file *file · 2 unmodified lines
217235
218236 mutex_unlock(&file_priv->ms_lock);
219237
238+ ivpu_rpm_put(vdev);
220239 return ms ? 0 : -EINVAL;
221240 }
222241
@@ -281,6 +300,9 @@ unlock: · 58 unmodified lines
281300 void ivpu_ms_cleanup(struct ivpu_file_priv *file_priv)
282301 {
283302 struct ivpu_ms_instance *ms, *tmp;
303+ struct ivpu_device *vdev = file_priv->vdev;
304+
305+ pm_runtime_get_sync(vdev->drm.dev);
284306
285307 mutex_lock(&file_priv->ms_lock);
286308
@@ -293,6 +315,8 @@ void ivpu_ms_cleanup(struct ivpu_file_priv *file_priv) · 6 unmodified lines
293315 free_instance(file_priv, ms);
294316
295317 mutex_unlock(&file_priv->ms_lock);
318+
319+ pm_runtime_put_autosuspend(vdev->drm.dev);
296320 }
297321
298322 void ivpu_ms_cleanup_all(struct ivpu_device *vdev)
drivers/accel/ivpu/ivpu_pm.c+10−8
@@ -428,16 +428,17 @@ int ivpu_pm_dct_enable(struct ivpu_device *vdev, u8 active_percent) · 427 unmodified lines
428428 active_us = (DCT_PERIOD_US * active_percent) / 100;
429429 inactive_us = DCT_PERIOD_US - active_us;
430430
431+ vdev->pm->dct_active_percent = active_percent;
432+
433+ ivpu_dbg(vdev, PM, "DCT requested %u%% (D0: %uus, D0i2: %uus)\n",
434+ active_percent, active_us, inactive_us);
435+
431436 ret = ivpu_jsm_dct_enable(vdev, active_us, inactive_us);
432437 if (ret) {
433438 ivpu_err_ratelimited(vdev, "Failed to enable DCT: %d\n", ret);
434439 return ret;
435440 }
436441
437− vdev->pm->dct_active_percent = active_percent;
438−
439− ivpu_dbg(vdev, PM, "DCT set to %u%% (D0: %uus, D0i2: %uus)\n",
440− active_percent, active_us, inactive_us);
441442 return 0;
442443 }
443444
@@ -445,15 +446,16 @@ int ivpu_pm_dct_disable(struct ivpu_device *vdev) · 1 unmodified line
445446 {
446447 int ret;
447448
449+ vdev->pm->dct_active_percent = 0;
450+
451+ ivpu_dbg(vdev, PM, "DCT requested to be disabled\n");
452+
448453 ret = ivpu_jsm_dct_disable(vdev);
449454 if (ret) {
450455 ivpu_err_ratelimited(vdev, "Failed to disable DCT: %d\n", ret);
451456 return ret;
452457 }
453458
454− vdev->pm->dct_active_percent = 0;
455−
456− ivpu_dbg(vdev, PM, "DCT disabled\n");
457459 return 0;
458460 }
459461
@@ -466,7 +468,7 @@ void ivpu_pm_irq_dct_work_fn(struct work_struct *work) · 6 unmodified lines
466468 if (ivpu_hw_btrs_dct_get_request(vdev, &enable))
467469 return;
468470
469− if (vdev->pm->dct_active_percent)
471+ if (enable)
470472 ret = ivpu_pm_dct_enable(vdev, DCT_DEFAULT_ACTIVE_PERCENT);
471473 else
472474 ret = ivpu_pm_dct_disable(vdev);
drivers/accel/ivpu/ivpu_sysfs.c+48−1
@@ -1,10 +1,12 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2024 Intel Corporation
3+ * Copyright (C) 2024-2025 Intel Corporation
44 */
55
66 #include <linux/device.h>
77 #include <linux/err.h>
8+#include <linux/pm_runtime.h>
9+#include <linux/units.h>
810
911 #include "ivpu_drv.h"
1012 #include "ivpu_gem.h"
@@ -90,10 +92,55 @@ sched_mode_show(struct device *dev, struct device_attribute *attr, char *buf) · 79 unmodified lines
9092
9193 static DEVICE_ATTR_RO(sched_mode);
9294
95+/**
96+ * DOC: npu_max_frequency
97+ *
98+ * The npu_max_frequency shows maximum frequency in MHz of the NPU's data
99+ * processing unit
100+ */
101+static ssize_t
102+npu_max_frequency_mhz_show(struct device *dev, struct device_attribute *attr, char *buf)
103+{
104+ struct drm_device *drm = dev_get_drvdata(dev);
105+ struct ivpu_device *vdev = to_ivpu_device(drm);
106+ u32 freq = ivpu_hw_dpu_max_freq_get(vdev);
107+
108+ return sysfs_emit(buf, "%lu\n", freq / HZ_PER_MHZ);
109+}
110+
111+static DEVICE_ATTR_RO(npu_max_frequency_mhz);
112+
113+/**
114+ * DOC: npu_current_frequency_mhz
115+ *
116+ * The npu_current_frequency_mhz shows current frequency in MHz of the NPU's
117+ * data processing unit
118+ */
119+static ssize_t
120+npu_current_frequency_mhz_show(struct device *dev, struct device_attribute *attr, char *buf)
121+{
122+ struct drm_device *drm = dev_get_drvdata(dev);
123+ struct ivpu_device *vdev = to_ivpu_device(drm);
124+ u32 freq = 0;
125+
126+ /* Read frequency only if device is active, otherwise frequency is 0 */
127+ if (pm_runtime_get_if_active(vdev->drm.dev) > 0) {
128+ freq = ivpu_hw_dpu_freq_get(vdev);
129+
130+ pm_runtime_put_autosuspend(vdev->drm.dev);
131+ }
132+
133+ return sysfs_emit(buf, "%lu\n", freq / HZ_PER_MHZ);
134+}
135+
136+static DEVICE_ATTR_RO(npu_current_frequency_mhz);
137+
93138 static struct attribute *ivpu_dev_attrs[] = {
94139 &dev_attr_npu_busy_time_us.attr,
95140 &dev_attr_npu_memory_utilization.attr,
96141 &dev_attr_sched_mode.attr,
142+ &dev_attr_npu_max_frequency_mhz.attr,
143+ &dev_attr_npu_current_frequency_mhz.attr,
97144 NULL,
98145 };
99146
drivers/accel/ivpu/vpu_boot_api.h+10−3
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 * Minor version changes when API backward compatibility is preserved.
2727 * Resets to 0 if Major version is incremented.
2828 */
29−#define VPU_BOOT_API_VER_MINOR 26
29+#define VPU_BOOT_API_VER_MINOR 28
3030
3131 /*
3232 * API header changed (field names, documentation, formatting) but API itself has not been changed
@@ -76,8 +76,15 @@ struct vpu_firmware_header { · 43 unmodified lines
7676 * submission queue size and device capabilities.
7777 */
7878 u32 preemption_buffer_2_size;
79+ /*
80+ * Maximum preemption buffer size that the FW can use: no need for the host
81+ * driver to allocate more space than that specified by these fields.
82+ * A value of 0 means no declared limit.
83+ */
84+ u32 preemption_buffer_1_max_size;
85+ u32 preemption_buffer_2_max_size;
7986 /* Space reserved for future preemption-related fields. */
80− u32 preemption_reserved[6];
87+ u32 preemption_reserved[4];
8188 /* FW image read only section start address, 4KB aligned */
8289 u64 ro_section_start_address;
8390 /* FW image read only section size, 4KB aligned */
@@ -134,7 +141,7 @@ enum vpu_trace_destination { · 50 unmodified lines
134141 /*
135142 * Processor bit shifts (for loggable HW components).
136143 */
137−#define VPU_TRACE_PROC_BIT_ARM 0
144+#define VPU_TRACE_PROC_BIT_RESERVED 0
138145 #define VPU_TRACE_PROC_BIT_LRT 1
139146 #define VPU_TRACE_PROC_BIT_LNN 2
140147 #define VPU_TRACE_PROC_BIT_SHV_0 3
drivers/accel/ivpu/vpu_jsm_api.h+36−17
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 /*
2323 * Minor version changes when API backward compatibility is preserved.
2424 */
25−#define VPU_JSM_API_VER_MINOR 25
25+#define VPU_JSM_API_VER_MINOR 29
2626
2727 /*
2828 * API header changed (field names, documentation, formatting) but API itself has not been changed
@@ -53,8 +53,7 @@ · 24 unmodified lines
5353 * Engine indexes.
5454 */
5555 #define VPU_ENGINE_COMPUTE 0
56−#define VPU_ENGINE_COPY 1
57−#define VPU_ENGINE_NB 2
56+#define VPU_ENGINE_NB 1
5857
5958 /*
6059 * VPU status values.
@@ -126,11 +125,13 @@ enum { · 65 unmodified lines
126125 * When set, indicates that job queue uses native fences (as inline commands
127126 * in job queue). Such queues may also use legacy fences (as commands in batch buffers).
128127 * When cleared, indicates the job queue only uses legacy fences.
129− * NOTE: For queues using native fences, VPU expects that all jobs in the queue
130− * are immediately followed by an inline command object. This object is expected
131− * to be a fence signal command in most cases, but can also be a NOP in case the host
132− * does not need per-job fence signalling. Other inline commands objects can be
133− * inserted between "job and inline command" pairs.
128+ * NOTES:
129+ * 1. For queues using native fences, VPU expects that all jobs in the queue
130+ * are immediately followed by an inline command object. This object is expected
131+ * to be a fence signal command in most cases, but can also be a NOP in case the host
132+ * does not need per-job fence signalling. Other inline commands objects can be
133+ * inserted between "job and inline command" pairs.
134+ * 2. Native fence queues are only supported on VPU 40xx onwards.
134135 */
135136 VPU_JOB_QUEUE_FLAGS_USE_NATIVE_FENCE_MASK = (1 << 1U),
136137
@@ -275,6 +276,8 @@ struct vpu_inline_cmd { · 138 unmodified lines
275276 u64 value;
276277 /* User VA of the log buffer in which to add log entry on completion. */
277278 u64 log_buffer_va;
279+ /* NPU private data. */
280+ u64 npu_private_data;
278281 } fence;
279282 /* Other commands do not have a payload. */
280283 /* Payload definition for future inline commands can be inserted here. */
@@ -791,12 +794,22 @@ struct vpu_jsm_metric_streamer_update { · 510 unmodified lines
791794 /** Metric group mask that identifies metric streamer instance. */
792795 u64 metric_group_mask;
793796 /**
794− * Address and size of the buffer where the VPU will write metric data. If
795− * the buffer address is 0 or same as the currently used buffer the VPU will
796− * continue writing metric data to the current buffer. In this case the
797− * buffer size is ignored and the size of the current buffer is unchanged.
798− * If the address is non-zero and differs from the current buffer address the
799− * VPU will immediately switch data collection to the new buffer.
797+ * Address and size of the buffer where the VPU will write metric data.
798+ * This member dictates how the update operation should perform:
799+ * 1. client needs information about the number of collected samples and the
800+ * amount of data written to the current buffer
801+ * 2. client wants to switch to a new buffer
802+ *
803+ * Case 1. is identified by the buffer address being 0 or the same as the
804+ * currently used buffer address. In this case the buffer size is ignored and
805+ * the size of the current buffer is unchanged. The VPU will return an update
806+ * in the vpu_jsm_metric_streamer_done structure. The internal writing position
807+ * into the buffer is not changed.
808+ *
809+ * Case 2. is identified by the address being non-zero and differs from the
810+ * current buffer address. The VPU will immediately switch data collection to
811+ * the new buffer. Then the VPU will return an update in the
812+ * vpu_jsm_metric_streamer_done structure.
800813 */
801814 u64 buffer_addr;
802815 u64 buffer_size;
@@ -934,6 +947,7 @@ struct vpu_ipc_msg_payload_hws_priority_band_setup { · 131 unmodified lines
934947 /*
935948 * Default quantum in 100ns units for scheduling across processes
936949 * within a priority band
950+ * Minimum value supported by NPU is 1ms (10000 in 100ns units).
937951 */
938952 u32 process_quantum[VPU_HWS_NUM_PRIORITY_BANDS];
939953 /*
@@ -946,8 +960,10 @@ struct vpu_ipc_msg_payload_hws_priority_band_setup { · 6 unmodified lines
946960 * in situations when it's starved by the focus band.
947961 */
948962 u32 normal_band_percentage;
949− /* Reserved */
950− u32 reserved_0;
963+ /*
964+ * TDR timeout value in milliseconds. Default value of 0 meaning no timeout.
965+ */
966+ u32 tdr_timeout;
951967 };
952968
953969 /*
@@ -1024,7 +1040,10 @@ struct vpu_ipc_msg_payload_hws_set_context_sched_properties { · 70 unmodified lines
10241040 s32 in_process_priority;
10251041 /* Zero padding / Reserved */
10261042 u32 reserved_1;
1027− /* Context quantum relative to other contexts of same priority in the same process */
1043+ /*
1044+ * Context quantum relative to other contexts of same priority in the same process
1045+ * Minimum value supported by NPU is 1ms (10000 in 100ns units).
1046+ */
10281047 u64 context_quantum;
10291048 /* Grace period when preempting context of the same priority within the same process */
10301049 u64 grace_period_same_priority;
drivers/acpi/acpica/aclocal.h+2−2
@@ -293,7 +293,7 @@ acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state); · 292 unmodified lines
293293 * expected_return_btypes - Allowed type(s) for the return value
294294 */
295295 struct acpi_name_info {
296− char name[ACPI_NAMESEG_SIZE];
296+ char name[ACPI_NAMESEG_SIZE] __nonstring;
297297 u16 argument_list;
298298 u8 expected_btypes;
299299 };
@@ -370,7 +370,7 @@ typedef acpi_status (*acpi_object_converter) (struct acpi_namespace_node * · 70 unmodified lines
370370 converted_object);
371371
372372 struct acpi_simple_repair_info {
373− char name[ACPI_NAMESEG_SIZE];
373+ char name[ACPI_NAMESEG_SIZE] __nonstring;
374374 u32 unexpected_btypes;
375375 u32 package_index;
376376 acpi_object_converter object_converter;
drivers/acpi/acpica/nsrepair2.c+1−1
@@ -25,7 +25,7 @@ acpi_status (*acpi_repair_function) (struct acpi_evaluate_info * info, · 24 unmodified lines
2525 return_object_ptr);
2626
2727 typedef struct acpi_repair_info {
28− char name[ACPI_NAMESEG_SIZE];
28+ char name[ACPI_NAMESEG_SIZE] __nonstring;
2929 acpi_repair_function repair_function;
3030
3131 } acpi_repair_info;
drivers/acpi/button.c+1−1
@@ -458,7 +458,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) · 457 unmodified lines
458458 acpi_pm_wakeup_event(&device->dev);
459459
460460 button = acpi_driver_data(device);
461− if (button->suspended)
461+ if (button->suspended || event == ACPI_BUTTON_NOTIFY_WAKE)
462462 return;
463463
464464 input = button->input;
drivers/acpi/ec.c+28−0
@@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = { · 2300 unmodified lines
23012301 DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
23022302 },
23032303 },
2304+ /*
2305+ * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
2306+ * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
2307+ */
2308+ {
2309+ .matches = {
2310+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
2311+ DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
2312+ }
2313+ },
2314+ {
2315+ .matches = {
2316+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
2317+ DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
2318+ }
2319+ },
2320+ {
2321+ .matches = {
2322+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
2323+ DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
2324+ }
2325+ },
2326+ {
2327+ .matches = {
2328+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
2329+ DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
2330+ }
2331+ },
23042332 { },
23052333 };
23062334
drivers/acpi/pptt.c+10−5
@@ -229,18 +229,20 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, · 228 unmodified lines
229229 node_entry = ACPI_PTR_DIFF(node, table_hdr);
230230 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
231231 sizeof(struct acpi_table_pptt));
232− proc_sz = sizeof(struct acpi_pptt_processor *);
232+ proc_sz = sizeof(struct acpi_pptt_processor);
233233
234− while ((unsigned long)entry + proc_sz < table_end) {
234+ /* ignore subtable types that are smaller than a processor node */
235+ while ((unsigned long)entry + proc_sz <= table_end) {
235236 cpu_node = (struct acpi_pptt_processor *)entry;
237+
236238 if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
237239 cpu_node->parent == node_entry)
238240 return 0;
239241 if (entry->length == 0)
240242 return 0;
243+
241244 entry = ACPI_ADD_PTR(struct acpi_subtable_header, entry,
242245 entry->length);
243−
244246 }
245247 return 1;
246248 }
@@ -270,18 +272,21 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he · 23 unmodified lines
270272 table_end = (unsigned long)table_hdr + table_hdr->length;
271273 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
272274 sizeof(struct acpi_table_pptt));
273− proc_sz = sizeof(struct acpi_pptt_processor *);
275+ proc_sz = sizeof(struct acpi_pptt_processor);
274276
275277 /* find the processor structure associated with this cpuid */
276− while ((unsigned long)entry + proc_sz < table_end) {
278+ while ((unsigned long)entry + proc_sz <= table_end) {
277279 cpu_node = (struct acpi_pptt_processor *)entry;
278280
279281 if (entry->length == 0) {
280282 pr_warn("Invalid zero length subtable\n");
281283 break;
282284 }
285+ /* entry->length may not equal proc_sz, revalidate the processor structure length */
283286 if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
284287 acpi_cpu_id == cpu_node->acpi_processor_id &&
288+ (unsigned long)entry + entry->length <= table_end &&
289+ entry->length == proc_sz + cpu_node->number_of_priv_resources * sizeof(u32) &&
285290 acpi_pptt_leaf_node(table_hdr, cpu_node)) {
286291 return (struct acpi_pptt_processor *)entry;
287292 }
drivers/android/binder.c+1−1
@@ -6373,7 +6373,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m, · 6372 unmodified lines
63736373 seq_printf(m, " node %d", buffer->target_node->debug_id);
63746374 seq_printf(m, " size %zd:%zd offset %lx\n",
63756375 buffer->data_size, buffer->offsets_size,
6376− proc->alloc.vm_start - buffer->user_data);
6376+ buffer->user_data - proc->alloc.vm_start);
63776377 }
63786378
63796379 static void print_binder_work_ilocked(struct seq_file *m,
drivers/ata/libata-sata.c+15−0
@@ -1510,6 +1510,8 @@ int ata_eh_get_ncq_success_sense(struct ata_link *link) · 1509 unmodified lines
15101510 unsigned int err_mask, tag;
15111511 u8 *sense, sk = 0, asc = 0, ascq = 0;
15121512 u64 sense_valid, val;
1513+ u16 extended_sense;
1514+ bool aux_icc_valid;
15131515 int ret = 0;
15141516
15151517 err_mask = ata_read_log_page(dev, ATA_LOG_SENSE_NCQ, 0, buf, 2);
@@ -1529,6 +1531,8 @@ int ata_eh_get_ncq_success_sense(struct ata_link *link) · 13 unmodified lines
15291531
15301532 sense_valid = (u64)buf[8] | ((u64)buf[9] << 8) |
15311533 ((u64)buf[10] << 16) | ((u64)buf[11] << 24);
1534+ extended_sense = get_unaligned_le16(&buf[14]);
1535+ aux_icc_valid = extended_sense & BIT(15);
15321536
15331537 ata_qc_for_each_raw(ap, qc, tag) {
15341538 if (!(qc->flags & ATA_QCFLAG_EH) ||
@@ -1556,6 +1560,17 @@ int ata_eh_get_ncq_success_sense(struct ata_link *link) · 21 unmodified lines
15561560 continue;
15571561 }
15581562
1563+ qc->result_tf.nsect = sense[6];
1564+ qc->result_tf.hob_nsect = sense[7];
1565+ qc->result_tf.lbal = sense[8];
1566+ qc->result_tf.lbam = sense[9];
1567+ qc->result_tf.lbah = sense[10];
1568+ qc->result_tf.hob_lbal = sense[11];
1569+ qc->result_tf.hob_lbam = sense[12];
1570+ qc->result_tf.hob_lbah = sense[13];
1571+ if (aux_icc_valid)
1572+ qc->result_tf.auxiliary = get_unaligned_le32(&sense[16]);
1573+
15591574 /* Set sense without also setting scsicmd->result */
15601575 scsi_build_sense_buffer(dev->flags & ATA_DFLAG_D_SENSE,
15611576 qc->scsicmd->sense_buffer, sk,
drivers/ata/libata-scsi.c+17−8
@@ -2453,8 +2453,8 @@ static unsigned int ata_msense_control_ata_feature(struct ata_device *dev, · 2452 unmodified lines
24532453 */
24542454 put_unaligned_be16(ATA_FEATURE_SUB_MPAGE_LEN - 4, &buf[2]);
24552455
2456− if (dev->flags & ATA_DFLAG_CDL)
2457− buf[4] = 0x02; /* Support T2A and T2B pages */
2456+ if (dev->flags & ATA_DFLAG_CDL_ENABLED)
2457+ buf[4] = 0x02; /* T2A and T2B pages enabled */
24582458 else
24592459 buf[4] = 0;
24602460
@@ -3886,12 +3886,11 @@ static int ata_mselect_control_spg0(struct ata_queued_cmd *qc, · 1425 unmodified lines
38863886 }
38873887
38883888 /*
3889− * Translate MODE SELECT control mode page, sub-pages f2h (ATA feature mode
3889+ * Translate MODE SELECT control mode page, sub-page f2h (ATA feature mode
38903890 * page) into a SET FEATURES command.
38913891 */
3892−static unsigned int ata_mselect_control_ata_feature(struct ata_queued_cmd *qc,
3893− const u8 *buf, int len,
3894− u16 *fp)
3892+static int ata_mselect_control_ata_feature(struct ata_queued_cmd *qc,
3893+ const u8 *buf, int len, u16 *fp)
38953894 {
38963895 struct ata_device *dev = qc->dev;
38973896 struct ata_taskfile *tf = &qc->tf;
@@ -3909,17 +3908,27 @@ static unsigned int ata_mselect_control_ata_feature(struct ata_queued_cmd *qc, · 11 unmodified lines
39093908 /* Check cdl_ctrl */
39103909 switch (buf[0] & 0x03) {
39113910 case 0:
3912− /* Disable CDL */
3911+ /* Disable CDL if it is enabled */
3912+ if (!(dev->flags & ATA_DFLAG_CDL_ENABLED))
3913+ return 0;
3914+ ata_dev_dbg(dev, "Disabling CDL\n");
39133915 cdl_action = 0;
39143916 dev->flags &= ~ATA_DFLAG_CDL_ENABLED;
39153917 break;
39163918 case 0x02:
3917− /* Enable CDL T2A/T2B: NCQ priority must be disabled */
3919+ /*
3920+ * Enable CDL if not already enabled. Since this is mutually
3921+ * exclusive with NCQ priority, allow this only if NCQ priority
3922+ * is disabled.
3923+ */
3924+ if (dev->flags & ATA_DFLAG_CDL_ENABLED)
3925+ return 0;
39183926 if (dev->flags & ATA_DFLAG_NCQ_PRIO_ENABLED) {
39193927 ata_dev_err(dev,
39203928 "NCQ priority must be disabled to enable CDL\n");
39213929 return -EINVAL;
39223930 }
3931+ ata_dev_dbg(dev, "Enabling CDL\n");
39233932 cdl_action = 1;
39243933 dev->flags |= ATA_DFLAG_CDL_ENABLED;
39253934 break;
drivers/ata/pata_pxa.c+6−0
@@ -223,10 +223,16 @@ static int pxa_ata_probe(struct platform_device *pdev) · 222 unmodified lines
223223
224224 ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, cmd_res->start,
225225 resource_size(cmd_res));
226+ if (!ap->ioaddr.cmd_addr)
227+ return -ENOMEM;
226228 ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, ctl_res->start,
227229 resource_size(ctl_res));
230+ if (!ap->ioaddr.ctl_addr)
231+ return -ENOMEM;
228232 ap->ioaddr.bmdma_addr = devm_ioremap(&pdev->dev, dma_res->start,
229233 resource_size(dma_res));
234+ if (!ap->ioaddr.bmdma_addr)
235+ return -ENOMEM;
230236
231237 /*
232238 * Adjust register offsets
drivers/ata/sata_sx4.c+10−3
@@ -1117,9 +1117,14 @@ static int pdc20621_prog_dimm0(struct ata_host *host) · 1116 unmodified lines
11171117 mmio += PDC_CHIP0_OFS;
11181118
11191119 for (i = 0; i < ARRAY_SIZE(pdc_i2c_read_data); i++)
1120− pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
1121− pdc_i2c_read_data[i].reg,
1122− &spd0[pdc_i2c_read_data[i].ofs]);
1120+ if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
1121+ pdc_i2c_read_data[i].reg,
1122+ &spd0[pdc_i2c_read_data[i].ofs])) {
1123+ dev_err(host->dev,
1124+ "Failed in i2c read at index %d: device=%#x, reg=%#x\n",
1125+ i, PDC_DIMM0_SPD_DEV_ADDRESS, pdc_i2c_read_data[i].reg);
1126+ return -EIO;
1127+ }
11231128
11241129 data |= (spd0[4] - 8) | ((spd0[21] != 0) << 3) | ((spd0[3]-11) << 4);
11251130 data |= ((spd0[17] / 4) << 6) | ((spd0[5] / 2) << 7) |
@@ -1284,6 +1289,8 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) · 158 unmodified lines
12841289
12851290 /* Programming DIMM0 Module Control Register (index_CID0:80h) */
12861291 size = pdc20621_prog_dimm0(host);
1292+ if (size < 0)
1293+ return size;
12871294 dev_dbg(host->dev, "Local DIMM Size = %dMB\n", size);
12881295
12891296 /* Programming DIMM Module Global Control Register (index_CID0:88h) */
drivers/base/auxiliary.c+10−0
@@ -156,6 +156,16 @@ · 155 unmodified lines
156156 * },
157157 * .ops = my_custom_ops,
158158 * };
159+ *
160+ * Please note that such custom ops approach is valid, but it is hard to implement
161+ * it right without global locks per-device to protect from auxiliary_drv removal
162+ * during call to that ops. In addition, this implementation lacks proper module
163+ * dependency, which causes to load/unload races between auxiliary parent and devices
164+ * modules.
165+ *
166+ * The most easiest way to provide these ops reliably without needing to
167+ * have a lock is to EXPORT_SYMBOL*() them and rely on already existing
168+ * modules infrastructure for validity and correct dependencies chains.
159169 */
160170
161171 static const struct auxiliary_device_id *auxiliary_match_id(const struct auxiliary_device_id *id,
drivers/base/base.h+17−0
@@ -73,6 +73,7 @@ static inline void subsys_put(struct subsys_private *sp) · 72 unmodified lines
7373 kset_put(&sp->subsys);
7474 }
7575
76+struct subsys_private *bus_to_subsys(const struct bus_type *bus);
7677 struct subsys_private *class_to_subsys(const struct class *class);
7778
7879 struct driver_private {
@@ -180,6 +181,22 @@ int driver_add_groups(const struct device_driver *drv, const struct attribute_gr · 101 unmodified lines
180181 void driver_remove_groups(const struct device_driver *drv, const struct attribute_group **groups);
181182 void device_driver_detach(struct device *dev);
182183
184+static inline void device_set_driver(struct device *dev, const struct device_driver *drv)
185+{
186+ /*
187+ * Majority (all?) read accesses to dev->driver happens either
188+ * while holding device lock or in bus/driver code that is only
189+ * invoked when the device is bound to a driver and there is no
190+ * concern of the pointer being changed while it is being read.
191+ * However when reading device's uevent file we read driver pointer
192+ * without taking device lock (so we do not block there for
193+ * arbitrary amount of time). We use WRITE_ONCE() here to prevent
194+ * tearing so that READ_ONCE() can safely be used in uevent code.
195+ */
196+ // FIXME - this cast should not be needed "soon"
197+ WRITE_ONCE(dev->driver, (struct device_driver *)drv);
198+}
199+
183200 int devres_release_all(struct device *dev);
184201 void device_block_probing(void);
185202 void device_unblock_probing(void);
drivers/base/bus.c+1−1
@@ -57,7 +57,7 @@ static int __must_check bus_rescan_devices_helper(struct device *dev, · 56 unmodified lines
5757 * NULL. A call to subsys_put() must be done when finished with the pointer in
5858 * order for it to be properly freed.
5959 */
60−static struct subsys_private *bus_to_subsys(const struct bus_type *bus)
60+struct subsys_private *bus_to_subsys(const struct bus_type *bus)
6161 {
6262 struct subsys_private *sp = NULL;
6363 struct kobject *kobj;
drivers/base/core.c+32−6
@@ -2624,6 +2624,35 @@ static const char *dev_uevent_name(const struct kobject *kobj) · 2623 unmodified lines
26242624 return NULL;
26252625 }
26262626
2627+/*
2628+ * Try filling "DRIVER=<name>" uevent variable for a device. Because this
2629+ * function may race with binding and unbinding the device from a driver,
2630+ * we need to be careful. Binding is generally safe, at worst we miss the
2631+ * fact that the device is already bound to a driver (but the driver
2632+ * information that is delivered through uevents is best-effort, it may
2633+ * become obsolete as soon as it is generated anyways). Unbinding is more
2634+ * risky as driver pointer is transitioning to NULL, so READ_ONCE() should
2635+ * be used to make sure we are dealing with the same pointer, and to
2636+ * ensure that driver structure is not going to disappear from under us
2637+ * we take bus' drivers klist lock. The assumption that only registered
2638+ * driver can be bound to a device, and to unregister a driver bus code
2639+ * will take the same lock.
2640+ */
2641+static void dev_driver_uevent(const struct device *dev, struct kobj_uevent_env *env)
2642+{
2643+ struct subsys_private *sp = bus_to_subsys(dev->bus);
2644+
2645+ if (sp) {
2646+ scoped_guard(spinlock, &sp->klist_drivers.k_lock) {
2647+ struct device_driver *drv = READ_ONCE(dev->driver);
2648+ if (drv)
2649+ add_uevent_var(env, "DRIVER=%s", drv->name);
2650+ }
2651+
2652+ subsys_put(sp);
2653+ }
2654+}
2655+
26272656 static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)
26282657 {
26292658 const struct device *dev = kobj_to_dev(kobj);
@@ -2655,8 +2684,8 @@ static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env) · 25 unmodified lines
26552684 if (dev->type && dev->type->name)
26562685 add_uevent_var(env, "DEVTYPE=%s", dev->type->name);
26572686
2658− if (dev->driver)
2659− add_uevent_var(env, "DRIVER=%s", dev->driver->name);
2687+ /* Add "DRIVER=%s" variable if the device is bound to a driver */
2688+ dev_driver_uevent(dev, env);
26602689
26612690 /* Add common DT information about the device */
26622691 of_device_uevent(dev, env);
@@ -2726,11 +2755,8 @@ static ssize_t uevent_show(struct device *dev, struct device_attribute *attr, · 63 unmodified lines
27262755 if (!env)
27272756 return -ENOMEM;
27282757
2729− /* Synchronize with really_probe() */
2730− device_lock(dev);
27312758 /* let the kset specific function add its keys */
27322759 retval = kset->uevent_ops->uevent(&dev->kobj, env);
2733− device_unlock(dev);
27342760 if (retval)
27352761 goto out;
27362762
@@ -3700,7 +3726,7 @@ done: · 963 unmodified lines
37003726 device_pm_remove(dev);
37013727 dpm_sysfs_remove(dev);
37023728 DPMError:
3703− dev->driver = NULL;
3729+ device_set_driver(dev, NULL);
37043730 bus_remove_device(dev);
37053731 BusError:
37063732 device_remove_attrs(dev);
drivers/base/cpu.c+3−0
@@ -600,6 +600,7 @@ CPU_SHOW_VULN_FALLBACK(spec_rstack_overflow); · 599 unmodified lines
600600 CPU_SHOW_VULN_FALLBACK(gds);
601601 CPU_SHOW_VULN_FALLBACK(reg_file_data_sampling);
602602 CPU_SHOW_VULN_FALLBACK(ghostwrite);
603+CPU_SHOW_VULN_FALLBACK(indirect_target_selection);
603604
604605 static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
605606 static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
@@ -616,6 +617,7 @@ static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NU · 10 unmodified lines
616617 static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL);
617618 static DEVICE_ATTR(reg_file_data_sampling, 0444, cpu_show_reg_file_data_sampling, NULL);
618619 static DEVICE_ATTR(ghostwrite, 0444, cpu_show_ghostwrite, NULL);
620+static DEVICE_ATTR(indirect_target_selection, 0444, cpu_show_indirect_target_selection, NULL);
619621
620622 static struct attribute *cpu_root_vulnerabilities_attrs[] = {
621623 &dev_attr_meltdown.attr,
@@ -633,6 +635,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { · 11 unmodified lines
633635 &dev_attr_gather_data_sampling.attr,
634636 &dev_attr_reg_file_data_sampling.attr,
635637 &dev_attr_ghostwrite.attr,
638+ &dev_attr_indirect_target_selection.attr,
636639 NULL
637640 };
638641
drivers/base/dd.c+3−4
@@ -550,7 +550,7 @@ static void device_unbind_cleanup(struct device *dev) · 549 unmodified lines
550550 arch_teardown_dma_ops(dev);
551551 kfree(dev->dma_range_map);
552552 dev->dma_range_map = NULL;
553− dev->driver = NULL;
553+ device_set_driver(dev, NULL);
554554 dev_set_drvdata(dev, NULL);
555555 if (dev->pm_domain && dev->pm_domain->dismiss)
556556 dev->pm_domain->dismiss(dev);
@@ -629,8 +629,7 @@ static int really_probe(struct device *dev, const struct device_driver *drv) · 72 unmodified lines
629629 }
630630
631631 re_probe:
632− // FIXME - this cast should not be needed "soon"
633− dev->driver = (struct device_driver *)drv;
632+ device_set_driver(dev, drv);
634633
635634 /* If using pinctrl, bind pins now before probing */
636635 ret = pinctrl_bind_pins(dev);
@@ -1014,7 +1013,7 @@ static int __device_attach(struct device *dev, bool allow_async) · 377 unmodified lines
10141013 if (ret == 0)
10151014 ret = 1;
10161015 else {
1017− dev->driver = NULL;
1016+ device_set_driver(dev, NULL);
10181017 ret = 0;
10191018 }
10201019 } else {
drivers/base/devtmpfs.c+9−13
@@ -296,7 +296,7 @@ static int delete_path(const char *nodepath) · 295 unmodified lines
296296 return err;
297297 }
298298
299−static int dev_mynode(struct device *dev, struct inode *inode, struct kstat *stat)
299+static int dev_mynode(struct device *dev, struct inode *inode)
300300 {
301301 /* did we create it */
302302 if (inode->i_private != &thread)
@@ -304,13 +304,13 @@ static int dev_mynode(struct device *dev, struct inode *inode, struct kstat *sta · 1 unmodified line
304304
305305 /* does the dev_t match */
306306 if (is_blockdev(dev)) {
307− if (!S_ISBLK(stat->mode))
307+ if (!S_ISBLK(inode->i_mode))
308308 return 0;
309309 } else {
310− if (!S_ISCHR(stat->mode))
310+ if (!S_ISCHR(inode->i_mode))
311311 return 0;
312312 }
313− if (stat->rdev != dev->devt)
313+ if (inode->i_rdev != dev->devt)
314314 return 0;
315315
316316 /* ours */
@@ -321,20 +321,16 @@ static int handle_remove(const char *nodename, struct device *dev) · 4 unmodified lines
321321 {
322322 struct path parent;
323323 struct dentry *dentry;
324− struct kstat stat;
325− struct path p;
324+ struct inode *inode;
326325 int deleted = 0;
327− int err;
326+ int err = 0;
328327
329328 dentry = kern_path_locked(nodename, &parent);
330329 if (IS_ERR(dentry))
331330 return PTR_ERR(dentry);
332331
333− p.mnt = parent.mnt;
334− p.dentry = dentry;
335− err = vfs_getattr(&p, &stat, STATX_TYPE | STATX_MODE,
336− AT_STATX_SYNC_AS_STAT);
337− if (!err && dev_mynode(dev, d_inode(dentry), &stat)) {
332+ inode = d_inode(dentry);
333+ if (dev_mynode(dev, inode)) {
338334 struct iattr newattrs;
339335 /*
340336 * before unlinking this node, reset permissions
@@ -342,7 +338,7 @@ static int handle_remove(const char *nodename, struct device *dev) · 1 unmodified line
342338 */
343339 newattrs.ia_uid = GLOBAL_ROOT_UID;
344340 newattrs.ia_gid = GLOBAL_ROOT_GID;
345− newattrs.ia_mode = stat.mode & ~0777;
341+ newattrs.ia_mode = inode->i_mode & ~0777;
346342 newattrs.ia_valid =
347343 ATTR_UID|ATTR_GID|ATTR_MODE;
348344 inode_lock(d_inode(dentry));
drivers/base/memory.c+17−24
@@ -816,21 +816,6 @@ static int add_memory_block(unsigned long block_id, unsigned long state, · 815 unmodified lines
816816 return 0;
817817 }
818818
819−static int __init add_boot_memory_block(unsigned long base_section_nr)
820−{
821− unsigned long nr;
822−
823− for_each_present_section_nr(base_section_nr, nr) {
824− if (nr >= (base_section_nr + sections_per_block))
825− break;
826−
827− return add_memory_block(memory_block_id(base_section_nr),
828− MEM_ONLINE, NULL, NULL);
829− }
830−
831− return 0;
832−}
833−
834819 static int add_hotplug_memory_block(unsigned long block_id,
835820 struct vmem_altmap *altmap,
836821 struct memory_group *group)
@@ -957,7 +942,7 @@ static const struct attribute_group *memory_root_attr_groups[] = { · 120 unmodified lines
957942 void __init memory_dev_init(void)
958943 {
959944 int ret;
960− unsigned long block_sz, nr;
945+ unsigned long block_sz, block_id, nr;
961946
962947 /* Validate the configured memory block size */
963948 block_sz = memory_block_size_bytes();
@@ -970,15 +955,23 @@ void __init memory_dev_init(void) · 6 unmodified lines
970955 panic("%s() failed to register subsystem: %d\n", __func__, ret);
971956
972957 /*
973− * Create entries for memory sections that were found
974− * during boot and have been initialized
958+ * Create entries for memory sections that were found during boot
959+ * and have been initialized. Use @block_id to track the last
960+ * handled block and initialize it to an invalid value (ULONG_MAX)
961+ * to bypass the block ID matching check for the first present
962+ * block so that it can be covered.
975963 */
976− for (nr = 0; nr <= __highest_present_section_nr;
977− nr += sections_per_block) {
978− ret = add_boot_memory_block(nr);
979− if (ret)
980− panic("%s() failed to add memory block: %d\n", __func__,
981− ret);
964+ block_id = ULONG_MAX;
965+ for_each_present_section_nr(0, nr) {
966+ if (block_id != ULONG_MAX && memory_block_id(nr) == block_id)
967+ continue;
968+
969+ block_id = memory_block_id(nr);
970+ ret = add_memory_block(block_id, MEM_ONLINE, NULL, NULL);
971+ if (ret) {
972+ panic("%s() failed to add memory block: %d\n",
973+ __func__, ret);
974+ }
982975 }
983976 }
984977
drivers/base/module.c+5−8
@@ -42,16 +42,13 @@ int module_add_driver(struct module *mod, const struct device_driver *drv) · 41 unmodified lines
4242 if (mod)
4343 mk = &mod->mkobj;
4444 else if (drv->mod_name) {
45− struct kobject *mkobj;
46−
47− /* Lookup built-in module entry in /sys/modules */
48− mkobj = kset_find_obj(module_kset, drv->mod_name);
49− if (mkobj) {
50− mk = container_of(mkobj, struct module_kobject, kobj);
45+ /* Lookup or create built-in module entry in /sys/modules */
46+ mk = lookup_or_create_module_kobject(drv->mod_name);
47+ if (mk) {
5148 /* remember our module structure */
5249 drv->p->mkobj = mk;
53− /* kset_find_obj took a reference */
54− kobject_put(mkobj);
50+ /* lookup_or_create_module_kobject took a reference */
51+ kobject_put(&mk->kobj);
5552 }
5653 }
5754
drivers/base/platform.c+3−3
@@ -1440,7 +1440,7 @@ static void platform_shutdown(struct device *_dev) · 1439 unmodified lines
14401440
14411441 static int platform_dma_configure(struct device *dev)
14421442 {
1443− struct platform_driver *drv = to_platform_driver(dev->driver);
1443+ struct device_driver *drv = READ_ONCE(dev->driver);
14441444 struct fwnode_handle *fwnode = dev_fwnode(dev);
14451445 enum dev_dma_attr attr;
14461446 int ret = 0;
@@ -1451,8 +1451,8 @@ static int platform_dma_configure(struct device *dev) · 4 unmodified lines
14511451 attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
14521452 ret = acpi_dma_configure(dev, attr);
14531453 }
1454− /* @drv may not be valid when we're called from the IOMMU layer */
1455− if (ret || !dev->driver || drv->driver_managed_dma)
1454+ /* @dev->driver may not be valid when we're called from the IOMMU layer */
1455+ if (ret || !drv || to_platform_driver(drv)->driver_managed_dma)
14561456 return ret;
14571457
14581458 ret = iommu_device_use_default_domain(dev);
drivers/base/swnode.c+1−2
@@ -1080,6 +1080,7 @@ void software_node_notify(struct device *dev) · 1079 unmodified lines
10801080 if (!swnode)
10811081 return;
10821082
1083+ kobject_get(&swnode->kobj);
10831084 ret = sysfs_create_link(&dev->kobj, &swnode->kobj, "software_node");
10841085 if (ret)
10851086 return;
@@ -1089,8 +1090,6 @@ void software_node_notify(struct device *dev) · 3 unmodified lines
10891090 sysfs_remove_link(&dev->kobj, "software_node");
10901091 return;
10911092 }
1092−
1093− kobject_get(&swnode->kobj);
10941093 }
10951094
10961095 void software_node_notify_remove(struct device *dev)
drivers/block/Kconfig+1−7
@@ -367,7 +367,7 @@ config BLK_DEV_RBD · 366 unmodified lines
367367 tristate "Rados block device (RBD)"
368368 depends on INET && BLOCK
369369 select CEPH_LIB
370− select LIBCRC32C
370+ select CRC32
371371 select CRYPTO_AES
372372 select CRYPTO
373373 help
@@ -388,12 +388,6 @@ config BLK_DEV_UBLK · 14 unmodified lines
388388 definition isn't finalized yet, and might change according to future
389389 requirement, so mark is as experimental now.
390390
391− Say Y if you want to get better performance because task_work_add()
392− can be used in IO path for replacing io_uring cmd, which will become
393− shared between IO tasks and ubq daemon, meantime task_work_add() can
394− can handle batch more effectively, but task_work_add() isn't exported
395− for module, so ublk has to be built to kernel.
396−
397391 config BLKDEV_UBLK_LEGACY_OPCODES
398392 bool "Support legacy command opcode"
399393 depends on BLK_DEV_UBLK
drivers/block/drbd/Kconfig+1−1
@@ -10,7 +10,7 @@ config BLK_DEV_DRBD · 9 unmodified lines
1010 tristate "DRBD Distributed Replicated Block Device support"
1111 depends on PROC_FS && INET
1212 select LRU_CACHE
13− select LIBCRC32C
13+ select CRC32
1414 help
1515
1616 NOTE: In order to authenticate connections you have to select
drivers/block/loop.c+42−99
@@ -211,72 +211,6 @@ static void loop_set_size(struct loop_device *lo, loff_t size) · 210 unmodified lines
211211 kobject_uevent(&disk_to_dev(lo->lo_disk)->kobj, KOBJ_CHANGE);
212212 }
213213
214−static int lo_write_bvec(struct file *file, struct bio_vec *bvec, loff_t *ppos)
215−{
216− struct iov_iter i;
217− ssize_t bw;
218−
219− iov_iter_bvec(&i, ITER_SOURCE, bvec, 1, bvec->bv_len);
220−
221− bw = vfs_iter_write(file, &i, ppos, 0);
222−
223− if (likely(bw == bvec->bv_len))
224− return 0;
225−
226− printk_ratelimited(KERN_ERR
227− "loop: Write error at byte offset %llu, length %i.\n",
228− (unsigned long long)*ppos, bvec->bv_len);
229− if (bw >= 0)
230− bw = -EIO;
231− return bw;
232−}
233−
234−static int lo_write_simple(struct loop_device *lo, struct request *rq,
235− loff_t pos)
236−{
237− struct bio_vec bvec;
238− struct req_iterator iter;
239− int ret = 0;
240−
241− rq_for_each_segment(bvec, rq, iter) {
242− ret = lo_write_bvec(lo->lo_backing_file, &bvec, &pos);
243− if (ret < 0)
244− break;
245− cond_resched();
246− }
247−
248− return ret;
249−}
250−
251−static int lo_read_simple(struct loop_device *lo, struct request *rq,
252− loff_t pos)
253−{
254− struct bio_vec bvec;
255− struct req_iterator iter;
256− struct iov_iter i;
257− ssize_t len;
258−
259− rq_for_each_segment(bvec, rq, iter) {
260− iov_iter_bvec(&i, ITER_DEST, &bvec, 1, bvec.bv_len);
261− len = vfs_iter_read(lo->lo_backing_file, &i, &pos, 0);
262− if (len < 0)
263− return len;
264−
265− flush_dcache_page(bvec.bv_page);
266−
267− if (len != bvec.bv_len) {
268− struct bio *bio;
269−
270− __rq_for_each_bio(bio, rq)
271− zero_fill_bio(bio);
272− break;
273− }
274− cond_resched();
275− }
276−
277− return 0;
278−}
279−
280214 static void loop_clear_limits(struct loop_device *lo, int mode)
281215 {
282216 struct queue_limits lim = queue_limits_start_update(lo->lo_queue);
@@ -342,7 +276,7 @@ static void lo_complete_rq(struct request *rq) · 59 unmodified lines
342276 struct loop_cmd *cmd = blk_mq_rq_to_pdu(rq);
343277 blk_status_t ret = BLK_STS_OK;
344278
345− if (!cmd->use_aio || cmd->ret < 0 || cmd->ret == blk_rq_bytes(rq) ||
279+ if (cmd->ret < 0 || cmd->ret == blk_rq_bytes(rq) ||
346280 req_op(rq) != REQ_OP_READ) {
347281 if (cmd->ret < 0)
348282 ret = errno_to_blk_status(cmd->ret);
@@ -358,14 +292,13 @@ static void lo_complete_rq(struct request *rq) · 9 unmodified lines
358292 cmd->ret = 0;
359293 blk_mq_requeue_request(rq, true);
360294 } else {
361− if (cmd->use_aio) {
362− struct bio *bio = rq->bio;
295+ struct bio *bio = rq->bio;
363296
364− while (bio) {
365− zero_fill_bio(bio);
366− bio = bio->bi_next;
367− }
297+ while (bio) {
298+ zero_fill_bio(bio);
299+ bio = bio->bi_next;
368300 }
301+
369302 ret = BLK_STS_IOERR;
370303 end_io:
371304 blk_mq_end_request(rq, ret);
@@ -445,9 +378,14 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, · 73 unmodified lines
445378
446379 cmd->iocb.ki_pos = pos;
447380 cmd->iocb.ki_filp = file;
448− cmd->iocb.ki_complete = lo_rw_aio_complete;
449− cmd->iocb.ki_flags = IOCB_DIRECT;
450− cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
381+ cmd->iocb.ki_ioprio = req_get_ioprio(rq);
382+ if (cmd->use_aio) {
383+ cmd->iocb.ki_complete = lo_rw_aio_complete;
384+ cmd->iocb.ki_flags = IOCB_DIRECT;
385+ } else {
386+ cmd->iocb.ki_complete = NULL;
387+ cmd->iocb.ki_flags = 0;
388+ }
451389
452390 if (rw == ITER_SOURCE)
453391 ret = file->f_op->write_iter(&cmd->iocb, &iter);
@@ -458,7 +396,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, · 4 unmodified lines
458396
459397 if (ret != -EIOCBQUEUED)
460398 lo_rw_aio_complete(&cmd->iocb, ret);
461− return 0;
399+ return -EIOCBQUEUED;
462400 }
463401
464402 static int do_req_filebacked(struct loop_device *lo, struct request *rq)
@@ -466,15 +404,6 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq) · 1 unmodified line
466404 struct loop_cmd *cmd = blk_mq_rq_to_pdu(rq);
467405 loff_t pos = ((loff_t) blk_rq_pos(rq) << 9) + lo->lo_offset;
468406
469− /*
470− * lo_write_simple and lo_read_simple should have been covered
471− * by io submit style function like lo_rw_aio(), one blocker
472− * is that lo_read_simple() need to call flush_dcache_page after
473− * the page is written from kernel, and it isn't easy to handle
474− * this in io submit style function which submits all segments
475− * of the req at one time. And direct read IO doesn't need to
476− * run flush_dcache_page().
477− */
478407 switch (req_op(rq)) {
479408 case REQ_OP_FLUSH:
480409 return lo_req_flush(lo, rq);
@@ -490,15 +419,9 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq) · 9 unmodified lines
490419 case REQ_OP_DISCARD:
491420 return lo_fallocate(lo, rq, pos, FALLOC_FL_PUNCH_HOLE);
492421 case REQ_OP_WRITE:
493− if (cmd->use_aio)
494− return lo_rw_aio(lo, cmd, pos, ITER_SOURCE);
495− else
496− return lo_write_simple(lo, rq, pos);
422+ return lo_rw_aio(lo, cmd, pos, ITER_SOURCE);
497423 case REQ_OP_READ:
498− if (cmd->use_aio)
499− return lo_rw_aio(lo, cmd, pos, ITER_DEST);
500− else
501− return lo_read_simple(lo, rq, pos);
424+ return lo_rw_aio(lo, cmd, pos, ITER_DEST);
502425 default:
503426 WARN_ON_ONCE(1);
504427 return -EIO;
@@ -582,6 +505,17 @@ static void loop_assign_backing_file(struct loop_device *lo, struct file *file) · 77 unmodified lines
582505 lo->lo_min_dio_size = loop_query_min_dio_size(lo);
583506 }
584507
508+static int loop_check_backing_file(struct file *file)
509+{
510+ if (!file->f_op->read_iter)
511+ return -EINVAL;
512+
513+ if ((file->f_mode & FMODE_WRITE) && !file->f_op->write_iter)
514+ return -EINVAL;
515+
516+ return 0;
517+}
518+
585519 /*
586520 * loop_change_fd switched the backing store of a loopback device to
587521 * a new file. This is useful for operating system installers to free up
@@ -603,6 +537,10 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, · 15 unmodified lines
603537 if (!file)
604538 return -EBADF;
605539
540+ error = loop_check_backing_file(file);
541+ if (error)
542+ return error;
543+
606544 /* suppress uevents while reconfiguring the device */
607545 dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 1);
608546
@@ -662,19 +600,20 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, · 53 unmodified lines
662600 * dependency.
663601 */
664602 fput(old_file);
603+ dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0);
665604 if (partscan)
666605 loop_reread_partitions(lo);
667606
668607 error = 0;
669608 done:
670− /* enable and uncork uevent now that we are done */
671− dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0);
609+ kobject_uevent(&disk_to_dev(lo->lo_disk)->kobj, KOBJ_CHANGE);
672610 return error;
673611
674612 out_err:
675613 loop_global_unlock(lo, is_loop);
676614 out_putf:
677615 fput(file);
616+ dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0);
678617 goto done;
679618 }
680619
@@ -1039,6 +978,11 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode, · 358 unmodified lines
1039978
1040979 if (!file)
1041980 return -EBADF;
981+
982+ error = loop_check_backing_file(file);
983+ if (error)
984+ return error;
985+
1042986 is_loop = is_loop_device(file);
1043987
1044988 /* This is safe, since we have a reference from open(). */
@@ -1129,8 +1073,8 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode, · 84 unmodified lines
11291073 if (partscan)
11301074 clear_bit(GD_SUPPRESS_PART_SCAN, &lo->lo_disk->state);
11311075
1132− /* enable and uncork uevent now that we are done */
11331076 dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0);
1077+ kobject_uevent(&disk_to_dev(lo->lo_disk)->kobj, KOBJ_CHANGE);
11341078
11351079 loop_global_unlock(lo, is_loop);
11361080 if (partscan)
@@ -1921,7 +1865,6 @@ static void loop_handle_cmd(struct loop_cmd *cmd) · 784 unmodified lines
19211865 struct loop_device *lo = rq->q->queuedata;
19221866 int ret = 0;
19231867 struct mem_cgroup *old_memcg = NULL;
1924− const bool use_aio = cmd->use_aio;
19251868
19261869 if (write && (lo->lo_flags & LO_FLAGS_READ_ONLY)) {
19271870 ret = -EIO;
@@ -1951,7 +1894,7 @@ static void loop_handle_cmd(struct loop_cmd *cmd) · 23 unmodified lines
19511894 }
19521895 failed:
19531896 /* complete non-aio request */
1954− if (!use_aio || ret) {
1897+ if (ret != -EIOCBQUEUED) {
19551898 if (ret == -EOPNOTSUPP)
19561899 cmd->ret = ret;
19571900 else
drivers/block/null_blk/main.c+1−1
@@ -2031,7 +2031,7 @@ static int null_add_dev(struct nullb_device *dev) · 2030 unmodified lines
20312031 nullb->disk->minors = 1;
20322032 nullb->disk->fops = &null_ops;
20332033 nullb->disk->private_data = nullb;
2034− strscpy_pad(nullb->disk->disk_name, nullb->disk_name, DISK_NAME_LEN);
2034+ strscpy(nullb->disk->disk_name, nullb->disk_name);
20352035
20362036 if (nullb->dev->zoned) {
20372037 rv = null_register_zoned_dev(nullb);
drivers/block/ublk_drv.c+361−307
@@ -122,15 +122,6 @@ struct ublk_uring_cmd_pdu { · 121 unmodified lines
122122 */
123123 #define UBLK_IO_FLAG_OWNED_BY_SRV 0x02
124124
125−/*
126− * IO command is aborted, so this flag is set in case of
127− * !UBLK_IO_FLAG_ACTIVE.
128− *
129− * After this flag is observed, any pending or new incoming request
130− * associated with this io command will be failed immediately
131− */
132−#define UBLK_IO_FLAG_ABORTED 0x04
133−
134125 /*
135126 * UBLK_IO_FLAG_NEED_GET_DATA is set because IO command requires
136127 * get data buffer address from ublksrv.
@@ -199,8 +190,6 @@ struct ublk_device { · 62 unmodified lines
199190 struct completion completion;
200191 unsigned int nr_queues_ready;
201192 unsigned int nr_privileged_daemon;
202−
203− struct work_struct nosrv_work;
204193 };
205194
206195 /* header of ublk_params */
@@ -209,18 +198,13 @@ struct ublk_params_header { · 2 unmodified lines
209198 __u32 types;
210199 };
211200
212−static bool ublk_abort_requests(struct ublk_device *ub, struct ublk_queue *ubq);
213−
201+static void ublk_stop_dev_unlocked(struct ublk_device *ub);
202+static void ublk_abort_queue(struct ublk_device *ub, struct ublk_queue *ubq);
214203 static inline struct request *__ublk_check_and_get_req(struct ublk_device *ub,
215− struct ublk_queue *ubq, int tag, size_t offset);
204+ const struct ublk_queue *ubq, int tag, size_t offset);
216205 static inline unsigned int ublk_req_build_flags(struct request *req);
217206 static inline struct ublksrv_io_desc *ublk_get_iod(struct ublk_queue *ubq,
218207 int tag);
219−static inline bool ublk_dev_is_user_copy(const struct ublk_device *ub)
220−{
221− return ub->dev_info.flags & (UBLK_F_USER_COPY | UBLK_F_SUPPORT_ZERO_COPY);
222−}
223−
224208 static inline bool ublk_dev_is_zoned(const struct ublk_device *ub)
225209 {
226210 return ub->dev_info.flags & UBLK_F_ZONED;
@@ -620,14 +604,19 @@ static void ublk_apply_params(struct ublk_device *ub) · 393 unmodified lines
620604 ublk_dev_param_zoned_apply(ub);
621605 }
622606
607+static inline bool ublk_support_zero_copy(const struct ublk_queue *ubq)
608+{
609+ return ubq->flags & UBLK_F_SUPPORT_ZERO_COPY;
610+}
611+
623612 static inline bool ublk_support_user_copy(const struct ublk_queue *ubq)
624613 {
625− return ubq->flags & (UBLK_F_USER_COPY | UBLK_F_SUPPORT_ZERO_COPY);
614+ return ubq->flags & UBLK_F_USER_COPY;
626615 }
627616
628617 static inline bool ublk_need_map_io(const struct ublk_queue *ubq)
629618 {
630− return !ublk_support_user_copy(ubq);
619+ return !ublk_support_user_copy(ubq) && !ublk_support_zero_copy(ubq);
631620 }
632621
633622 static inline bool ublk_need_req_ref(const struct ublk_queue *ubq)
@@ -635,8 +624,11 @@ static inline bool ublk_need_req_ref(const struct ublk_queue *ubq) · 1 unmodified line
635624 /*
636625 * read()/write() is involved in user copy, so request reference
637626 * has to be grabbed
627+ *
628+ * for zero copy, request buffer need to be registered to io_uring
629+ * buffer table, so reference is needed
638630 */
639− return ublk_support_user_copy(ubq);
631+ return ublk_support_user_copy(ubq) || ublk_support_zero_copy(ubq);
640632 }
641633
642634 static inline void ublk_init_req_ref(const struct ublk_queue *ubq,
@@ -1074,7 +1066,7 @@ static inline struct ublk_uring_cmd_pdu *ublk_get_uring_cmd_pdu( · 431 unmodified lines
10741066
10751067 static inline bool ubq_daemon_is_dying(struct ublk_queue *ubq)
10761068 {
1077− return ubq->ubq_daemon->flags & PF_EXITING;
1069+ return !ubq->ubq_daemon || ubq->ubq_daemon->flags & PF_EXITING;
10781070 }
10791071
10801072 /* todo: handle partial completion */
@@ -1085,12 +1077,6 @@ static inline void __ublk_complete_rq(struct request *req) · 4 unmodified lines
10851077 unsigned int unmapped_bytes;
10861078 blk_status_t res = BLK_STS_OK;
10871079
1088− /* called from ublk_abort_queue() code path */
1089− if (io->flags & UBLK_IO_FLAG_ABORTED) {
1090− res = BLK_STS_IOERR;
1091− goto exit;
1092− }
1093−
10941080 /* failed read IO if nothing is read */
10951081 if (!io->res && req_op(req) == REQ_OP_READ)
10961082 io->res = -EIO;
@@ -1140,25 +1126,6 @@ static void ublk_complete_rq(struct kref *ref) · 43 unmodified lines
11401126 __ublk_complete_rq(req);
11411127 }
11421128
1143−/*
1144− * Since ublk_rq_task_work_cb always fails requests immediately during
1145− * exiting, __ublk_fail_req() is only called from abort context during
1146− * exiting. So lock is unnecessary.
1147− *
1148− * Also aborting may not be started yet, keep in mind that one failed
1149− * request may be issued by block layer again.
1150− */
1151−static void __ublk_fail_req(struct ublk_queue *ubq, struct ublk_io *io,
1152− struct request *req)
1153−{
1154− WARN_ON_ONCE(io->flags & UBLK_IO_FLAG_ACTIVE);
1155−
1156− if (ublk_nosrv_should_reissue_outstanding(ubq->dev))
1157− blk_mq_requeue_request(req, false);
1158− else
1159− ublk_put_req_ref(ubq, req);
1160−}
1161−
11621129 static void ubq_complete_io_cmd(struct ublk_io *io, int res,
11631130 unsigned issue_flags)
11641131 {
@@ -1314,8 +1281,6 @@ static void ublk_queue_cmd_list(struct ublk_queue *ubq, struct rq_list *l) · 149 unmodified lines
13141281 static enum blk_eh_timer_return ublk_timeout(struct request *rq)
13151282 {
13161283 struct ublk_queue *ubq = rq->mq_hctx->driver_data;
1317− unsigned int nr_inflight = 0;
1318− int i;
13191284
13201285 if (ubq->flags & UBLK_F_UNPRIVILEGED_DEV) {
13211286 if (!ubq->timeout) {
@@ -1326,30 +1291,11 @@ static enum blk_eh_timer_return ublk_timeout(struct request *rq) · 4 unmodified lines
13261291 return BLK_EH_DONE;
13271292 }
13281293
1329− if (!ubq_daemon_is_dying(ubq))
1330− return BLK_EH_RESET_TIMER;
1331−
1332− for (i = 0; i < ubq->q_depth; i++) {
1333− struct ublk_io *io = &ubq->ios[i];
1334−
1335− if (!(io->flags & UBLK_IO_FLAG_ACTIVE))
1336− nr_inflight++;
1337− }
1338−
1339− /* cancelable uring_cmd can't help us if all commands are in-flight */
1340− if (nr_inflight == ubq->q_depth) {
1341− struct ublk_device *ub = ubq->dev;
1342−
1343− if (ublk_abort_requests(ub, ubq)) {
1344− schedule_work(&ub->nosrv_work);
1345− }
1346− return BLK_EH_DONE;
1347− }
1348−
13491294 return BLK_EH_RESET_TIMER;
13501295 }
13511296
1352−static blk_status_t ublk_prep_req(struct ublk_queue *ubq, struct request *rq)
1297+static blk_status_t ublk_prep_req(struct ublk_queue *ubq, struct request *rq,
1298+ bool check_cancel)
13531299 {
13541300 blk_status_t res;
13551301
@@ -1368,7 +1314,7 @@ static blk_status_t ublk_prep_req(struct ublk_queue *ubq, struct request *rq) · 12 unmodified lines
13681314 if (ublk_nosrv_should_queue_io(ubq) && unlikely(ubq->force_abort))
13691315 return BLK_STS_IOERR;
13701316
1371− if (unlikely(ubq->canceling))
1317+ if (check_cancel && unlikely(ubq->canceling))
13721318 return BLK_STS_IOERR;
13731319
13741320 /* fill iod to slot in io cmd buffer */
@@ -1387,7 +1333,7 @@ static blk_status_t ublk_queue_rq(struct blk_mq_hw_ctx *hctx, · 12 unmodified lines
13871333 struct request *rq = bd->rq;
13881334 blk_status_t res;
13891335
1390− res = ublk_prep_req(ubq, rq);
1336+ res = ublk_prep_req(ubq, rq, false);
13911337 if (res != BLK_STS_OK)
13921338 return res;
13931339
@@ -1419,7 +1365,7 @@ static void ublk_queue_rqs(struct rq_list *rqlist) · 25 unmodified lines
14191365 ublk_queue_cmd_list(ubq, &submit_list);
14201366 ubq = this_q;
14211367
1422− if (ublk_prep_req(ubq, req) == BLK_STS_OK)
1368+ if (ublk_prep_req(ubq, req, true) == BLK_STS_OK)
14231369 rq_list_add_tail(&submit_list, req);
14241370 else
14251371 rq_list_add_tail(&requeue_list, req);
@@ -1447,6 +1393,37 @@ static const struct blk_mq_ops ublk_mq_ops = { · 21 unmodified lines
14471393 .timeout = ublk_timeout,
14481394 };
14491395
1396+static void ublk_queue_reinit(struct ublk_device *ub, struct ublk_queue *ubq)
1397+{
1398+ int i;
1399+
1400+ /* All old ioucmds have to be completed */
1401+ ubq->nr_io_ready = 0;
1402+
1403+ /*
1404+ * old daemon is PF_EXITING, put it now
1405+ *
1406+ * It could be NULL in case of closing one quisced device.
1407+ */
1408+ if (ubq->ubq_daemon)
1409+ put_task_struct(ubq->ubq_daemon);
1410+ /* We have to reset it to NULL, otherwise ub won't accept new FETCH_REQ */
1411+ ubq->ubq_daemon = NULL;
1412+ ubq->timeout = false;
1413+
1414+ for (i = 0; i < ubq->q_depth; i++) {
1415+ struct ublk_io *io = &ubq->ios[i];
1416+
1417+ /*
1418+ * UBLK_IO_FLAG_CANCELED is kept for avoiding to touch
1419+ * io->cmd
1420+ */
1421+ io->flags &= UBLK_IO_FLAG_CANCELED;
1422+ io->cmd = NULL;
1423+ io->addr = 0;
1424+ }
1425+}
1426+
14501427 static int ublk_ch_open(struct inode *inode, struct file *filp)
14511428 {
14521429 struct ublk_device *ub = container_of(inode->i_cdev,
@@ -1458,10 +1435,119 @@ static int ublk_ch_open(struct inode *inode, struct file *filp) · 5 unmodified lines
14581435 return 0;
14591436 }
14601437
1438+static void ublk_reset_ch_dev(struct ublk_device *ub)
1439+{
1440+ int i;
1441+
1442+ for (i = 0; i < ub->dev_info.nr_hw_queues; i++)
1443+ ublk_queue_reinit(ub, ublk_get_queue(ub, i));
1444+
1445+ /* set to NULL, otherwise new ubq_daemon cannot mmap the io_cmd_buf */
1446+ ub->mm = NULL;
1447+ ub->nr_queues_ready = 0;
1448+ ub->nr_privileged_daemon = 0;
1449+}
1450+
1451+static struct gendisk *ublk_get_disk(struct ublk_device *ub)
1452+{
1453+ struct gendisk *disk;
1454+
1455+ spin_lock(&ub->lock);
1456+ disk = ub->ub_disk;
1457+ if (disk)
1458+ get_device(disk_to_dev(disk));
1459+ spin_unlock(&ub->lock);
1460+
1461+ return disk;
1462+}
1463+
1464+static void ublk_put_disk(struct gendisk *disk)
1465+{
1466+ if (disk)
1467+ put_device(disk_to_dev(disk));
1468+}
1469+
14611470 static int ublk_ch_release(struct inode *inode, struct file *filp)
14621471 {
14631472 struct ublk_device *ub = filp->private_data;
1473+ struct gendisk *disk;
1474+ int i;
1475+
1476+ /*
1477+ * disk isn't attached yet, either device isn't live, or it has
1478+ * been removed already, so we needn't to do anything
1479+ */
1480+ disk = ublk_get_disk(ub);
1481+ if (!disk)
1482+ goto out;
1483+
1484+ /*
1485+ * All uring_cmd are done now, so abort any request outstanding to
1486+ * the ublk server
1487+ *
1488+ * This can be done in lockless way because ublk server has been
1489+ * gone
1490+ *
1491+ * More importantly, we have to provide forward progress guarantee
1492+ * without holding ub->mutex, otherwise control task grabbing
1493+ * ub->mutex triggers deadlock
1494+ *
1495+ * All requests may be inflight, so ->canceling may not be set, set
1496+ * it now.
1497+ */
1498+ for (i = 0; i < ub->dev_info.nr_hw_queues; i++) {
1499+ struct ublk_queue *ubq = ublk_get_queue(ub, i);
1500+
1501+ ubq->canceling = true;
1502+ ublk_abort_queue(ub, ubq);
1503+ }
1504+ blk_mq_kick_requeue_list(disk->queue);
1505+
1506+ /*
1507+ * All infligh requests have been completed or requeued and any new
1508+ * request will be failed or requeued via `->canceling` now, so it is
1509+ * fine to grab ub->mutex now.
1510+ */
1511+ mutex_lock(&ub->mutex);
1512+
1513+ /* double check after grabbing lock */
1514+ if (!ub->ub_disk)
1515+ goto unlock;
1516+
1517+ /*
1518+ * Transition the device to the nosrv state. What exactly this
1519+ * means depends on the recovery flags
1520+ */
1521+ blk_mq_quiesce_queue(disk->queue);
1522+ if (ublk_nosrv_should_stop_dev(ub)) {
1523+ /*
1524+ * Allow any pending/future I/O to pass through quickly
1525+ * with an error. This is needed because del_gendisk
1526+ * waits for all pending I/O to complete
1527+ */
1528+ for (i = 0; i < ub->dev_info.nr_hw_queues; i++)
1529+ ublk_get_queue(ub, i)->force_abort = true;
1530+ blk_mq_unquiesce_queue(disk->queue);
14641531
1532+ ublk_stop_dev_unlocked(ub);
1533+ } else {
1534+ if (ublk_nosrv_dev_should_queue_io(ub)) {
1535+ /* ->canceling is set and all requests are aborted */
1536+ ub->dev_info.state = UBLK_S_DEV_QUIESCED;
1537+ } else {
1538+ ub->dev_info.state = UBLK_S_DEV_FAIL_IO;
1539+ for (i = 0; i < ub->dev_info.nr_hw_queues; i++)
1540+ ublk_get_queue(ub, i)->fail_io = true;
1541+ }
1542+ blk_mq_unquiesce_queue(disk->queue);
1543+ }
1544+unlock:
1545+ mutex_unlock(&ub->mutex);
1546+ ublk_put_disk(disk);
1547+
1548+ /* all uring_cmd has been done now, reset device & ubq */
1549+ ublk_reset_ch_dev(ub);
1550+out:
14651551 clear_bit(UB_STATE_OPEN, &ub->state);
14661552 return 0;
14671553 }
@@ -1528,10 +1614,26 @@ static void ublk_commit_completion(struct ublk_device *ub, · 60 unmodified lines
15281614 ublk_put_req_ref(ubq, req);
15291615 }
15301616
1617+static void __ublk_fail_req(struct ublk_queue *ubq, struct ublk_io *io,
1618+ struct request *req)
1619+{
1620+ WARN_ON_ONCE(io->flags & UBLK_IO_FLAG_ACTIVE);
1621+
1622+ if (ublk_nosrv_should_reissue_outstanding(ubq->dev))
1623+ blk_mq_requeue_request(req, false);
1624+ else {
1625+ io->res = -EIO;
1626+ __ublk_complete_rq(req);
1627+ }
1628+}
1629+
15311630 /*
1532− * Called from ubq_daemon context via cancel fn, meantime quiesce ublk
1533− * blk-mq queue, so we are called exclusively with blk-mq and ubq_daemon
1534− * context, so everything is serialized.
1631+ * Called from ublk char device release handler, when any uring_cmd is
1632+ * done, meantime request queue is "quiesced" since all inflight requests
1633+ * can't be completed because ublk server is dead.
1634+ *
1635+ * So no one can hold our request IO reference any more, simply ignore the
1636+ * reference, and complete the request immediately
15351637 */
15361638 static void ublk_abort_queue(struct ublk_device *ub, struct ublk_queue *ubq)
15371639 {
@@ -1548,46 +1650,29 @@ static void ublk_abort_queue(struct ublk_device *ub, struct ublk_queue *ubq) · 10 unmodified lines
15481650 * will do it
15491651 */
15501652 rq = blk_mq_tag_to_rq(ub->tag_set.tags[ubq->q_id], i);
1551− if (rq && blk_mq_request_started(rq)) {
1552− io->flags |= UBLK_IO_FLAG_ABORTED;
1653+ if (rq && blk_mq_request_started(rq))
15531654 __ublk_fail_req(ubq, io, rq);
1554− }
15551655 }
15561656 }
15571657 }
15581658
15591659 /* Must be called when queue is frozen */
1560−static bool ublk_mark_queue_canceling(struct ublk_queue *ubq)
1660+static void ublk_mark_queue_canceling(struct ublk_queue *ubq)
15611661 {
1562− bool canceled;
1563−
15641662 spin_lock(&ubq->cancel_lock);
1565− canceled = ubq->canceling;
1566− if (!canceled)
1663+ if (!ubq->canceling)
15671664 ubq->canceling = true;
15681665 spin_unlock(&ubq->cancel_lock);
1569−
1570− return canceled;
15711666 }
15721667
1573−static bool ublk_abort_requests(struct ublk_device *ub, struct ublk_queue *ubq)
1668+static void ublk_start_cancel(struct ublk_queue *ubq)
15741669 {
1575− bool was_canceled = ubq->canceling;
1576− struct gendisk *disk;
1577−
1578− if (was_canceled)
1579− return false;
1580−
1581− spin_lock(&ub->lock);
1582− disk = ub->ub_disk;
1583− if (disk)
1584− get_device(disk_to_dev(disk));
1585− spin_unlock(&ub->lock);
1670+ struct ublk_device *ub = ubq->dev;
1671+ struct gendisk *disk = ublk_get_disk(ub);
15861672
15871673 /* Our disk has been dead */
15881674 if (!disk)
1589− return false;
1590−
1675+ return;
15911676 /*
15921677 * Now we are serialized with ublk_queue_rq()
15931678 *
@@ -1596,25 +1681,36 @@ static bool ublk_abort_requests(struct ublk_device *ub, struct ublk_queue *ubq) · 2 unmodified lines
15961681 * touch completed uring_cmd
15971682 */
15981683 blk_mq_quiesce_queue(disk->queue);
1599− was_canceled = ublk_mark_queue_canceling(ubq);
1600− if (!was_canceled) {
1601− /* abort queue is for making forward progress */
1602− ublk_abort_queue(ub, ubq);
1603− }
1684+ ublk_mark_queue_canceling(ubq);
16041685 blk_mq_unquiesce_queue(disk->queue);
1605− put_device(disk_to_dev(disk));
1606−
1607− return !was_canceled;
1686+ ublk_put_disk(disk);
16081687 }
16091688
1610−static void ublk_cancel_cmd(struct ublk_queue *ubq, struct ublk_io *io,
1689+static void ublk_cancel_cmd(struct ublk_queue *ubq, unsigned tag,
16111690 unsigned int issue_flags)
16121691 {
1692+ struct ublk_io *io = &ubq->ios[tag];
1693+ struct ublk_device *ub = ubq->dev;
1694+ struct request *req;
16131695 bool done;
16141696
16151697 if (!(io->flags & UBLK_IO_FLAG_ACTIVE))
16161698 return;
16171699
1700+ /*
1701+ * Don't try to cancel this command if the request is started for
1702+ * avoiding race between io_uring_cmd_done() and
1703+ * io_uring_cmd_complete_in_task().
1704+ *
1705+ * Either the started request will be aborted via __ublk_abort_rq(),
1706+ * then this uring_cmd is canceled next time, or it will be done in
1707+ * task work function ublk_dispatch_req() because io_uring guarantees
1708+ * that ublk_dispatch_req() is always called
1709+ */
1710+ req = blk_mq_tag_to_rq(ub->tag_set.tags[ubq->q_id], tag);
1711+ if (req && blk_mq_request_started(req) && req->tag == tag)
1712+ return;
1713+
16181714 spin_lock(&ubq->cancel_lock);
16191715 done = !!(io->flags & UBLK_IO_FLAG_CANCELED);
16201716 if (!done)
@@ -1628,6 +1724,17 @@ static void ublk_cancel_cmd(struct ublk_queue *ubq, struct ublk_io *io, · 7 unmodified lines
16281724 /*
16291725 * The ublk char device won't be closed when calling cancel fn, so both
16301726 * ublk device and queue are guaranteed to be live
1727+ *
1728+ * Two-stage cancel:
1729+ *
1730+ * - make every active uring_cmd done in ->cancel_fn()
1731+ *
1732+ * - aborting inflight ublk IO requests in ublk char device release handler,
1733+ * which depends on 1st stage because device can only be closed iff all
1734+ * uring_cmd are done
1735+ *
1736+ * Do _not_ try to acquire ub->mutex before all inflight requests are
1737+ * aborted, otherwise deadlock may be caused.
16311738 */
16321739 static void ublk_uring_cmd_cancel_fn(struct io_uring_cmd *cmd,
16331740 unsigned int issue_flags)
@@ -1635,9 +1742,6 @@ static void ublk_uring_cmd_cancel_fn(struct io_uring_cmd *cmd, · 1 unmodified line
16351742 struct ublk_uring_cmd_pdu *pdu = ublk_get_uring_cmd_pdu(cmd);
16361743 struct ublk_queue *ubq = pdu->ubq;
16371744 struct task_struct *task;
1638− struct ublk_device *ub;
1639− bool need_schedule;
1640− struct ublk_io *io;
16411745
16421746 if (WARN_ON_ONCE(!ubq))
16431747 return;
@@ -1649,16 +1753,11 @@ static void ublk_uring_cmd_cancel_fn(struct io_uring_cmd *cmd, · 5 unmodified lines
16491753 if (WARN_ON_ONCE(task && task != ubq->ubq_daemon))
16501754 return;
16511755
1652− ub = ubq->dev;
1653− need_schedule = ublk_abort_requests(ub, ubq);
1756+ if (!ubq->canceling)
1757+ ublk_start_cancel(ubq);
16541758
1655− io = &ubq->ios[pdu->tag];
1656− WARN_ON_ONCE(io->cmd != cmd);
1657− ublk_cancel_cmd(ubq, io, issue_flags);
1658−
1659− if (need_schedule) {
1660− schedule_work(&ub->nosrv_work);
1661− }
1759+ WARN_ON_ONCE(ubq->ios[pdu->tag].cmd != cmd);
1760+ ublk_cancel_cmd(ubq, pdu->tag, issue_flags);
16621761 }
16631762
16641763 static inline bool ublk_queue_ready(struct ublk_queue *ubq)
@@ -1671,7 +1770,7 @@ static void ublk_cancel_queue(struct ublk_queue *ubq) · 6 unmodified lines
16711770 int i;
16721771
16731772 for (i = 0; i < ubq->q_depth; i++)
1674− ublk_cancel_cmd(ubq, &ubq->ios[i], IO_URING_F_UNLOCKED);
1773+ ublk_cancel_cmd(ubq, i, IO_URING_F_UNLOCKED);
16751774 }
16761775
16771776 /* Cancel all pending commands, must be called after del_gendisk() returns */
@@ -1709,33 +1808,20 @@ static void ublk_wait_tagset_rqs_idle(struct ublk_device *ub) · 31 unmodified lines
17091808 }
17101809 }
17111810
1712−static void __ublk_quiesce_dev(struct ublk_device *ub)
1713−{
1714− pr_devel("%s: quiesce ub: dev_id %d state %s\n",
1715− __func__, ub->dev_info.dev_id,
1716− ub->dev_info.state == UBLK_S_DEV_LIVE ?
1717− "LIVE" : "QUIESCED");
1718− blk_mq_quiesce_queue(ub->ub_disk->queue);
1719− ublk_wait_tagset_rqs_idle(ub);
1720− ub->dev_info.state = UBLK_S_DEV_QUIESCED;
1721−}
1722−
1723−static void ublk_unquiesce_dev(struct ublk_device *ub)
1811+static void ublk_force_abort_dev(struct ublk_device *ub)
17241812 {
17251813 int i;
17261814
1727− pr_devel("%s: unquiesce ub: dev_id %d state %s\n",
1815+ pr_devel("%s: force abort ub: dev_id %d state %s\n",
17281816 __func__, ub->dev_info.dev_id,
17291817 ub->dev_info.state == UBLK_S_DEV_LIVE ?
17301818 "LIVE" : "QUIESCED");
1731− /* quiesce_work has run. We let requeued rqs be aborted
1732− * before running fallback_wq. "force_abort" must be seen
1733− * after request queue is unqiuesced. Then del_gendisk()
1734− * can move on.
1735− */
1819+ blk_mq_quiesce_queue(ub->ub_disk->queue);
1820+ if (ub->dev_info.state == UBLK_S_DEV_LIVE)
1821+ ublk_wait_tagset_rqs_idle(ub);
1822+
17361823 for (i = 0; i < ub->dev_info.nr_hw_queues; i++)
17371824 ublk_get_queue(ub, i)->force_abort = true;
1738−
17391825 blk_mq_unquiesce_queue(ub->ub_disk->queue);
17401826 /* We may have requeued some rqs in ublk_quiesce_queue() */
17411827 blk_mq_kick_requeue_list(ub->ub_disk->queue);
@@ -1756,61 +1842,51 @@ static struct gendisk *ublk_detach_disk(struct ublk_device *ub) · 14 unmodified lines
17561842 return disk;
17571843 }
17581844
1759−static void ublk_stop_dev(struct ublk_device *ub)
1845+static void ublk_stop_dev_unlocked(struct ublk_device *ub)
1846+ __must_hold(&ub->mutex)
17601847 {
17611848 struct gendisk *disk;
17621849
1763− mutex_lock(&ub->mutex);
17641850 if (ub->dev_info.state == UBLK_S_DEV_DEAD)
1765− goto unlock;
1766− if (ublk_nosrv_dev_should_queue_io(ub)) {
1767− if (ub->dev_info.state == UBLK_S_DEV_LIVE)
1768− __ublk_quiesce_dev(ub);
1769− ublk_unquiesce_dev(ub);
1770− }
1851+ return;
1852+
1853+ if (ublk_nosrv_dev_should_queue_io(ub))
1854+ ublk_force_abort_dev(ub);
17711855 del_gendisk(ub->ub_disk);
17721856 disk = ublk_detach_disk(ub);
17731857 put_disk(disk);
1774− unlock:
1858+}
1859+
1860+static void ublk_stop_dev(struct ublk_device *ub)
1861+{
1862+ mutex_lock(&ub->mutex);
1863+ ublk_stop_dev_unlocked(ub);
17751864 mutex_unlock(&ub->mutex);
17761865 ublk_cancel_dev(ub);
17771866 }
17781867
1779−static void ublk_nosrv_work(struct work_struct *work)
1868+/* reset ublk io_uring queue & io flags */
1869+static void ublk_reset_io_flags(struct ublk_device *ub)
17801870 {
1781− struct ublk_device *ub =
1782− container_of(work, struct ublk_device, nosrv_work);
1783− int i;
1784−
1785− if (ublk_nosrv_should_stop_dev(ub)) {
1786− ublk_stop_dev(ub);
1787− return;
1788− }
1871+ int i, j;
17891872
1790− mutex_lock(&ub->mutex);
1791− if (ub->dev_info.state != UBLK_S_DEV_LIVE)
1792− goto unlock;
1873+ for (i = 0; i < ub->dev_info.nr_hw_queues; i++) {
1874+ struct ublk_queue *ubq = ublk_get_queue(ub, i);
17931875
1794− if (ublk_nosrv_dev_should_queue_io(ub)) {
1795− __ublk_quiesce_dev(ub);
1796− } else {
1797− blk_mq_quiesce_queue(ub->ub_disk->queue);
1798− ub->dev_info.state = UBLK_S_DEV_FAIL_IO;
1799− for (i = 0; i < ub->dev_info.nr_hw_queues; i++) {
1800− ublk_get_queue(ub, i)->fail_io = true;
1801− }
1802− blk_mq_unquiesce_queue(ub->ub_disk->queue);
1876+ /* UBLK_IO_FLAG_CANCELED can be cleared now */
1877+ spin_lock(&ubq->cancel_lock);
1878+ for (j = 0; j < ubq->q_depth; j++)
1879+ ubq->ios[j].flags &= ~UBLK_IO_FLAG_CANCELED;
1880+ spin_unlock(&ubq->cancel_lock);
1881+ ubq->canceling = false;
1882+ ubq->fail_io = false;
18031883 }
1804−
1805− unlock:
1806− mutex_unlock(&ub->mutex);
1807− ublk_cancel_dev(ub);
18081884 }
18091885
18101886 /* device can only be started after all IOs are ready */
18111887 static void ublk_mark_io_ready(struct ublk_device *ub, struct ublk_queue *ubq)
1888+ __must_hold(&ub->mutex)
18121889 {
1813− mutex_lock(&ub->mutex);
18141890 ubq->nr_io_ready++;
18151891 if (ublk_queue_ready(ubq)) {
18161892 ubq->ubq_daemon = current;
@@ -1820,18 +1896,12 @@ static void ublk_mark_io_ready(struct ublk_device *ub, struct ublk_queue *ubq) · 3 unmodified lines
18201896 if (capable(CAP_SYS_ADMIN))
18211897 ub->nr_privileged_daemon++;
18221898 }
1823− if (ub->nr_queues_ready == ub->dev_info.nr_hw_queues)
1824− complete_all(&ub->completion);
1825− mutex_unlock(&ub->mutex);
1826−}
1827−
1828−static void ublk_handle_need_get_data(struct ublk_device *ub, int q_id,
1829− int tag)
1830−{
1831− struct ublk_queue *ubq = ublk_get_queue(ub, q_id);
1832− struct request *req = blk_mq_tag_to_rq(ub->tag_set.tags[q_id], tag);
18331899
1834− ublk_queue_cmd(ubq, req);
1900+ if (ub->nr_queues_ready == ub->dev_info.nr_hw_queues) {
1901+ /* now we are ready for handling ublk io request */
1902+ ublk_reset_io_flags(ub);
1903+ complete_all(&ub->completion);
1904+ }
18351905 }
18361906
18371907 static inline int ublk_check_cmd_op(u32 cmd_op)
@@ -1879,13 +1949,20 @@ static void ublk_io_release(void *priv) · 41 unmodified lines
18791949 }
18801950
18811951 static int ublk_register_io_buf(struct io_uring_cmd *cmd,
1882− struct ublk_queue *ubq, unsigned int tag,
1952+ const struct ublk_queue *ubq, unsigned int tag,
18831953 unsigned int index, unsigned int issue_flags)
18841954 {
18851955 struct ublk_device *ub = cmd->file->private_data;
1956+ const struct ublk_io *io = &ubq->ios[tag];
18861957 struct request *req;
18871958 int ret;
18881959
1960+ if (!ublk_support_zero_copy(ubq))
1961+ return -EINVAL;
1962+
1963+ if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV))
1964+ return -EINVAL;
1965+
18891966 req = __ublk_check_and_get_req(ub, ubq, tag, 0);
18901967 if (!req)
18911968 return -EINVAL;
@@ -1901,11 +1978,66 @@ static int ublk_register_io_buf(struct io_uring_cmd *cmd, · 9 unmodified lines
19011978 }
19021979
19031980 static int ublk_unregister_io_buf(struct io_uring_cmd *cmd,
1981+ const struct ublk_queue *ubq, unsigned int tag,
19041982 unsigned int index, unsigned int issue_flags)
19051983 {
1984+ const struct ublk_io *io = &ubq->ios[tag];
1985+
1986+ if (!ublk_support_zero_copy(ubq))
1987+ return -EINVAL;
1988+
1989+ if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV))
1990+ return -EINVAL;
1991+
19061992 return io_buffer_unregister_bvec(cmd, index, issue_flags);
19071993 }
19081994
1995+static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_queue *ubq,
1996+ struct ublk_io *io, __u64 buf_addr)
1997+{
1998+ struct ublk_device *ub = ubq->dev;
1999+ int ret = 0;
2000+
2001+ /*
2002+ * When handling FETCH command for setting up ublk uring queue,
2003+ * ub->mutex is the innermost lock, and we won't block for handling
2004+ * FETCH, so it is fine even for IO_URING_F_NONBLOCK.
2005+ */
2006+ mutex_lock(&ub->mutex);
2007+ /* UBLK_IO_FETCH_REQ is only allowed before queue is setup */
2008+ if (ublk_queue_ready(ubq)) {
2009+ ret = -EBUSY;
2010+ goto out;
2011+ }
2012+
2013+ /* allow each command to be FETCHed at most once */
2014+ if (io->flags & UBLK_IO_FLAG_ACTIVE) {
2015+ ret = -EINVAL;
2016+ goto out;
2017+ }
2018+
2019+ WARN_ON_ONCE(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV);
2020+
2021+ if (ublk_need_map_io(ubq)) {
2022+ /*
2023+ * FETCH_RQ has to provide IO buffer if NEED GET
2024+ * DATA is not enabled
2025+ */
2026+ if (!buf_addr && !ublk_need_get_data(ubq))
2027+ goto out;
2028+ } else if (buf_addr) {
2029+ /* User copy requires addr to be unset */
2030+ ret = -EINVAL;
2031+ goto out;
2032+ }
2033+
2034+ ublk_fill_io_cmd(io, cmd, buf_addr);
2035+ ublk_mark_io_ready(ub, ubq);
2036+out:
2037+ mutex_unlock(&ub->mutex);
2038+ return ret;
2039+}
2040+
19092041 static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
19102042 unsigned int issue_flags,
19112043 const struct ublksrv_io_cmd *ub_cmd)
@@ -1960,35 +2092,11 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd, · 48 unmodified lines
19602092 case UBLK_IO_REGISTER_IO_BUF:
19612093 return ublk_register_io_buf(cmd, ubq, tag, ub_cmd->addr, issue_flags);
19622094 case UBLK_IO_UNREGISTER_IO_BUF:
1963− return ublk_unregister_io_buf(cmd, ub_cmd->addr, issue_flags);
2095+ return ublk_unregister_io_buf(cmd, ubq, tag, ub_cmd->addr, issue_flags);
19642096 case UBLK_IO_FETCH_REQ:
1965− /* UBLK_IO_FETCH_REQ is only allowed before queue is setup */
1966− if (ublk_queue_ready(ubq)) {
1967− ret = -EBUSY;
1968− goto out;
1969− }
1970− /*
1971− * The io is being handled by server, so COMMIT_RQ is expected
1972− * instead of FETCH_REQ
1973− */
1974− if (io->flags & UBLK_IO_FLAG_OWNED_BY_SRV)
1975− goto out;
1976−
1977− if (ublk_need_map_io(ubq)) {
1978− /*
1979− * FETCH_RQ has to provide IO buffer if NEED GET
1980− * DATA is not enabled
1981− */
1982− if (!ub_cmd->addr && !ublk_need_get_data(ubq))
1983− goto out;
1984− } else if (ub_cmd->addr) {
1985− /* User copy requires addr to be unset */
1986− ret = -EINVAL;
2097+ ret = ublk_fetch(cmd, ubq, io, ub_cmd->addr);
2098+ if (ret)
19872099 goto out;
1988− }
1989−
1990− ublk_fill_io_cmd(io, cmd, ub_cmd->addr);
1991− ublk_mark_io_ready(ub, ubq);
19922100 break;
19932101 case UBLK_IO_COMMIT_AND_FETCH_REQ:
19942102 req = blk_mq_tag_to_rq(ub->tag_set.tags[ub_cmd->q_id], tag);
@@ -2020,8 +2128,9 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd, · 25 unmodified lines
20202128 if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV))
20212129 goto out;
20222130 ublk_fill_io_cmd(io, cmd, ub_cmd->addr);
2023− ublk_handle_need_get_data(ub, ub_cmd->q_id, ub_cmd->tag);
2024− break;
2131+ req = blk_mq_tag_to_rq(ub->tag_set.tags[ub_cmd->q_id], tag);
2132+ ublk_dispatch_req(ubq, req, issue_flags);
2133+ return -EIOCBQUEUED;
20252134 default:
20262135 goto out;
20272136 }
@@ -2035,13 +2144,10 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd, · 7 unmodified lines
20352144 }
20362145
20372146 static inline struct request *__ublk_check_and_get_req(struct ublk_device *ub,
2038− struct ublk_queue *ubq, int tag, size_t offset)
2147+ const struct ublk_queue *ubq, int tag, size_t offset)
20392148 {
20402149 struct request *req;
20412150
2042− if (!ublk_need_req_ref(ubq))
2043− return NULL;
2044−
20452151 req = blk_mq_tag_to_rq(ub->tag_set.tags[ubq->q_id], tag);
20462152 if (!req)
20472153 return NULL;
@@ -2155,6 +2261,9 @@ static struct request *ublk_check_and_get_req(struct kiocb *iocb, · 107 unmodified lines
21552261 if (!ubq)
21562262 return ERR_PTR(-EINVAL);
21572263
2264+ if (!ublk_support_user_copy(ubq))
2265+ return ERR_PTR(-EACCES);
2266+
21582267 if (tag >= ubq->q_depth)
21592268 return ERR_PTR(-EINVAL);
21602269
@@ -2388,7 +2497,6 @@ static void ublk_remove(struct ublk_device *ub) · 227 unmodified lines
23882497 bool unprivileged;
23892498
23902499 ublk_stop_dev(ub);
2391− cancel_work_sync(&ub->nosrv_work);
23922500 cdev_device_del(&ub->cdev, &ub->cdev_dev);
23932501 unprivileged = ub->dev_info.flags & UBLK_F_UNPRIVILEGED_DEV;
23942502 ublk_put_device(ub);
@@ -2413,9 +2521,9 @@ static struct ublk_device *ublk_get_device_from_id(int idx) · 18 unmodified lines
24132521 return ub;
24142522 }
24152523
2416−static int ublk_ctrl_start_dev(struct ublk_device *ub, struct io_uring_cmd *cmd)
2524+static int ublk_ctrl_start_dev(struct ublk_device *ub,
2525+ const struct ublksrv_ctrl_cmd *header)
24172526 {
2418− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
24192527 const struct ublk_param_basic *p = &ub->params.basic;
24202528 int ublksrv_pid = (int)header->data[0];
24212529 struct queue_limits lim = {
@@ -2534,9 +2642,8 @@ out_unlock: · 112 unmodified lines
25342642 }
25352643
25362644 static int ublk_ctrl_get_queue_affinity(struct ublk_device *ub,
2537− struct io_uring_cmd *cmd)
2645+ const struct ublksrv_ctrl_cmd *header)
25382646 {
2539− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
25402647 void __user *argp = (void __user *)(unsigned long)header->addr;
25412648 cpumask_var_t cpumask;
25422649 unsigned long queue;
@@ -2585,9 +2692,8 @@ static inline void ublk_dump_dev_info(struct ublksrv_ctrl_dev_info *info) · 42 unmodified lines
25852692 info->nr_hw_queues, info->queue_depth);
25862693 }
25872694
2588−static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd)
2695+static int ublk_ctrl_add_dev(const struct ublksrv_ctrl_cmd *header)
25892696 {
2590− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
25912697 void __user *argp = (void __user *)(unsigned long)header->addr;
25922698 struct ublksrv_ctrl_dev_info info;
25932699 struct ublk_device *ub;
@@ -2675,7 +2781,6 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd) · 81 unmodified lines
26752781 goto out_unlock;
26762782 mutex_init(&ub->mutex);
26772783 spin_lock_init(&ub->lock);
2678− INIT_WORK(&ub->nosrv_work, ublk_nosrv_work);
26792784
26802785 ret = ublk_alloc_dev_number(ub, header->dev_id);
26812786 if (ret < 0)
@@ -2697,13 +2802,18 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd) · 15 unmodified lines
26972802 ub->dev_info.flags |= UBLK_F_CMD_IOCTL_ENCODE |
26982803 UBLK_F_URING_CMD_COMP_IN_TASK;
26992804
2700− /* GET_DATA isn't needed any more with USER_COPY */
2701− if (ublk_dev_is_user_copy(ub))
2805+ /* GET_DATA isn't needed any more with USER_COPY or ZERO COPY */
2806+ if (ub->dev_info.flags & (UBLK_F_USER_COPY | UBLK_F_SUPPORT_ZERO_COPY))
27022807 ub->dev_info.flags &= ~UBLK_F_NEED_GET_DATA;
27032808
2704− /* Zoned storage support requires user copy feature */
2809+ /*
2810+ * Zoned storage support requires reuse `ublksrv_io_cmd->addr` for
2811+ * returning write_append_lba, which is only allowed in case of
2812+ * user copy or zero copy
2813+ */
27052814 if (ublk_dev_is_zoned(ub) &&
2706− (!IS_ENABLED(CONFIG_BLK_DEV_ZONED) || !ublk_dev_is_user_copy(ub))) {
2815+ (!IS_ENABLED(CONFIG_BLK_DEV_ZONED) || !(ub->dev_info.flags &
2816+ (UBLK_F_USER_COPY | UBLK_F_SUPPORT_ZERO_COPY)))) {
27072817 ret = -EINVAL;
27082818 goto out_free_dev_number;
27092819 }
@@ -2807,14 +2917,12 @@ static inline void ublk_ctrl_cmd_dump(struct io_uring_cmd *cmd) · 97 unmodified lines
28072917 static int ublk_ctrl_stop_dev(struct ublk_device *ub)
28082918 {
28092919 ublk_stop_dev(ub);
2810− cancel_work_sync(&ub->nosrv_work);
28112920 return 0;
28122921 }
28132922
28142923 static int ublk_ctrl_get_dev_info(struct ublk_device *ub,
2815− struct io_uring_cmd *cmd)
2924+ const struct ublksrv_ctrl_cmd *header)
28162925 {
2817− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
28182926 void __user *argp = (void __user *)(unsigned long)header->addr;
28192927
28202928 if (header->len < sizeof(struct ublksrv_ctrl_dev_info) || !header->addr)
@@ -2843,9 +2951,8 @@ static void ublk_ctrl_fill_params_devt(struct ublk_device *ub) · 22 unmodified lines
28432951 }
28442952
28452953 static int ublk_ctrl_get_params(struct ublk_device *ub,
2846− struct io_uring_cmd *cmd)
2954+ const struct ublksrv_ctrl_cmd *header)
28472955 {
2848− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
28492956 void __user *argp = (void __user *)(unsigned long)header->addr;
28502957 struct ublk_params_header ph;
28512958 int ret;
@@ -2874,9 +2981,8 @@ static int ublk_ctrl_get_params(struct ublk_device *ub, · 22 unmodified lines
28742981 }
28752982
28762983 static int ublk_ctrl_set_params(struct ublk_device *ub,
2877− struct io_uring_cmd *cmd)
2984+ const struct ublksrv_ctrl_cmd *header)
28782985 {
2879− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
28802986 void __user *argp = (void __user *)(unsigned long)header->addr;
28812987 struct ublk_params_header ph;
28822988 int ret = -EFAULT;
@@ -2914,43 +3020,14 @@ static int ublk_ctrl_set_params(struct ublk_device *ub, · 31 unmodified lines
29143020 return ret;
29153021 }
29163022
2917−static void ublk_queue_reinit(struct ublk_device *ub, struct ublk_queue *ubq)
2918−{
2919− int i;
2920−
2921− WARN_ON_ONCE(!(ubq->ubq_daemon && ubq_daemon_is_dying(ubq)));
2922−
2923− /* All old ioucmds have to be completed */
2924− ubq->nr_io_ready = 0;
2925− /* old daemon is PF_EXITING, put it now */
2926− put_task_struct(ubq->ubq_daemon);
2927− /* We have to reset it to NULL, otherwise ub won't accept new FETCH_REQ */
2928− ubq->ubq_daemon = NULL;
2929− ubq->timeout = false;
2930− ubq->canceling = false;
2931−
2932− for (i = 0; i < ubq->q_depth; i++) {
2933− struct ublk_io *io = &ubq->ios[i];
2934−
2935− /* forget everything now and be ready for new FETCH_REQ */
2936− io->flags = 0;
2937− io->cmd = NULL;
2938− io->addr = 0;
2939− }
2940−}
2941−
29423023 static int ublk_ctrl_start_recovery(struct ublk_device *ub,
2943− struct io_uring_cmd *cmd)
3024+ const struct ublksrv_ctrl_cmd *header)
29443025 {
2945− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
29463026 int ret = -EINVAL;
2947− int i;
29483027
29493028 mutex_lock(&ub->mutex);
29503029 if (ublk_nosrv_should_stop_dev(ub))
29513030 goto out_unlock;
2952− if (!ub->nr_queues_ready)
2953− goto out_unlock;
29543031 /*
29553032 * START_RECOVERY is only allowd after:
29563033 *
@@ -2974,12 +3051,6 @@ static int ublk_ctrl_start_recovery(struct ublk_device *ub, · 17 unmodified lines
29743051 goto out_unlock;
29753052 }
29763053 pr_devel("%s: start recovery for dev id %d.\n", __func__, header->dev_id);
2977− for (i = 0; i < ub->dev_info.nr_hw_queues; i++)
2978− ublk_queue_reinit(ub, ublk_get_queue(ub, i));
2979− /* set to NULL, otherwise new ubq_daemon cannot mmap the io_cmd_buf */
2980− ub->mm = NULL;
2981− ub->nr_queues_ready = 0;
2982− ub->nr_privileged_daemon = 0;
29833054 init_completion(&ub->completion);
29843055 ret = 0;
29853056 out_unlock:
@@ -2988,12 +3059,10 @@ static int ublk_ctrl_start_recovery(struct ublk_device *ub, · 2 unmodified lines
29883059 }
29893060
29903061 static int ublk_ctrl_end_recovery(struct ublk_device *ub,
2991− struct io_uring_cmd *cmd)
3062+ const struct ublksrv_ctrl_cmd *header)
29923063 {
2993− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
29943064 int ublksrv_pid = (int)header->data[0];
29953065 int ret = -EINVAL;
2996− int i;
29973066
29983067 pr_devel("%s: Waiting for new ubq_daemons(nr: %d) are ready, dev id %d...\n",
29993068 __func__, ub->dev_info.nr_hw_queues, header->dev_id);
@@ -3013,33 +3082,18 @@ static int ublk_ctrl_end_recovery(struct ublk_device *ub, · 13 unmodified lines
30133082 goto out_unlock;
30143083 }
30153084 ub->dev_info.ublksrv_pid = ublksrv_pid;
3085+ ub->dev_info.state = UBLK_S_DEV_LIVE;
30163086 pr_devel("%s: new ublksrv_pid %d, dev id %d\n",
30173087 __func__, ublksrv_pid, header->dev_id);
3018−
3019− if (ublk_nosrv_dev_should_queue_io(ub)) {
3020− ub->dev_info.state = UBLK_S_DEV_LIVE;
3021− blk_mq_unquiesce_queue(ub->ub_disk->queue);
3022− pr_devel("%s: queue unquiesced, dev id %d.\n",
3023− __func__, header->dev_id);
3024− blk_mq_kick_requeue_list(ub->ub_disk->queue);
3025− } else {
3026− blk_mq_quiesce_queue(ub->ub_disk->queue);
3027− ub->dev_info.state = UBLK_S_DEV_LIVE;
3028− for (i = 0; i < ub->dev_info.nr_hw_queues; i++) {
3029− ublk_get_queue(ub, i)->fail_io = false;
3030− }
3031− blk_mq_unquiesce_queue(ub->ub_disk->queue);
3032− }
3033−
3088+ blk_mq_kick_requeue_list(ub->ub_disk->queue);
30343089 ret = 0;
30353090 out_unlock:
30363091 mutex_unlock(&ub->mutex);
30373092 return ret;
30383093 }
30393094
3040−static int ublk_ctrl_get_features(struct io_uring_cmd *cmd)
3095+static int ublk_ctrl_get_features(const struct ublksrv_ctrl_cmd *header)
30413096 {
3042− const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe);
30433097 void __user *argp = (void __user *)(unsigned long)header->addr;
30443098 u64 features = UBLK_F_ALL;
30453099
@@ -3178,7 +3232,7 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd, · 132 unmodified lines
31783232 goto out;
31793233
31803234 if (cmd_op == UBLK_U_CMD_GET_FEATURES) {
3181− ret = ublk_ctrl_get_features(cmd);
3235+ ret = ublk_ctrl_get_features(header);
31823236 goto out;
31833237 }
31843238
@@ -3195,17 +3249,17 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd, · 10 unmodified lines
31953249
31963250 switch (_IOC_NR(cmd_op)) {
31973251 case UBLK_CMD_START_DEV:
3198− ret = ublk_ctrl_start_dev(ub, cmd);
3252+ ret = ublk_ctrl_start_dev(ub, header);
31993253 break;
32003254 case UBLK_CMD_STOP_DEV:
32013255 ret = ublk_ctrl_stop_dev(ub);
32023256 break;
32033257 case UBLK_CMD_GET_DEV_INFO:
32043258 case UBLK_CMD_GET_DEV_INFO2:
3205− ret = ublk_ctrl_get_dev_info(ub, cmd);
3259+ ret = ublk_ctrl_get_dev_info(ub, header);
32063260 break;
32073261 case UBLK_CMD_ADD_DEV:
3208− ret = ublk_ctrl_add_dev(cmd);
3262+ ret = ublk_ctrl_add_dev(header);
32093263 break;
32103264 case UBLK_CMD_DEL_DEV:
32113265 ret = ublk_ctrl_del_dev(&ub, true);
@@ -3214,19 +3268,19 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd, · 2 unmodified lines
32143268 ret = ublk_ctrl_del_dev(&ub, false);
32153269 break;
32163270 case UBLK_CMD_GET_QUEUE_AFFINITY:
3217− ret = ublk_ctrl_get_queue_affinity(ub, cmd);
3271+ ret = ublk_ctrl_get_queue_affinity(ub, header);
32183272 break;
32193273 case UBLK_CMD_GET_PARAMS:
3220− ret = ublk_ctrl_get_params(ub, cmd);
3274+ ret = ublk_ctrl_get_params(ub, header);
32213275 break;
32223276 case UBLK_CMD_SET_PARAMS:
3223− ret = ublk_ctrl_set_params(ub, cmd);
3277+ ret = ublk_ctrl_set_params(ub, header);
32243278 break;
32253279 case UBLK_CMD_START_USER_RECOVERY:
3226− ret = ublk_ctrl_start_recovery(ub, cmd);
3280+ ret = ublk_ctrl_start_recovery(ub, header);
32273281 break;
32283282 case UBLK_CMD_END_USER_RECOVERY:
3229− ret = ublk_ctrl_end_recovery(ub, cmd);
3283+ ret = ublk_ctrl_end_recovery(ub, header);
32303284 break;
32313285 default:
32323286 ret = -EOPNOTSUPP;
drivers/bluetooth/btintel_pcie.c+31−26
@@ -957,8 +957,10 @@ static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb) · 956 unmodified lines
957957 /* This is a debug event that comes from IML and OP image when it
958958 * starts execution. There is no need pass this event to stack.
959959 */
960− if (skb->data[2] == 0x97)
960+ if (skb->data[2] == 0x97) {
961+ hci_recv_diag(hdev, skb);
961962 return 0;
963+ }
962964 }
963965
964966 return hci_recv_frame(hdev, skb);
@@ -974,7 +976,6 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data, · 9 unmodified lines
974976 u8 pkt_type;
975977 u16 plen;
976978 u32 pcie_pkt_type;
977− struct sk_buff *new_skb;
978979 void *pdata;
979980 struct hci_dev *hdev = data->hdev;
980981
@@ -1051,24 +1052,20 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data, · 70 unmodified lines
10511052
10521053 bt_dev_dbg(hdev, "pkt_type: 0x%2.2x len: %u", pkt_type, plen);
10531054
1054− new_skb = bt_skb_alloc(plen, GFP_ATOMIC);
1055− if (!new_skb) {
1056− bt_dev_err(hdev, "Failed to allocate memory for skb of len: %u",
1057− skb->len);
1058− ret = -ENOMEM;
1059− goto exit_error;
1060− }
1061−
1062− hci_skb_pkt_type(new_skb) = pkt_type;
1063− skb_put_data(new_skb, skb->data, plen);
1055+ hci_skb_pkt_type(skb) = pkt_type;
10641056 hdev->stat.byte_rx += plen;
1057+ skb_trim(skb, plen);
10651058
10661059 if (pcie_pkt_type == BTINTEL_PCIE_HCI_EVT_PKT)
1067− ret = btintel_pcie_recv_event(hdev, new_skb);
1060+ ret = btintel_pcie_recv_event(hdev, skb);
10681061 else
1069− ret = hci_recv_frame(hdev, new_skb);
1062+ ret = hci_recv_frame(hdev, skb);
1063+ skb = NULL; /* skb is freed in the callee */
10701064
10711065 exit_error:
1066+ if (skb)
1067+ kfree_skb(skb);
1068+
10721069 if (ret)
10731070 hdev->stat.err_rx++;
10741071
@@ -1202,8 +1199,6 @@ static void btintel_pcie_rx_work(struct work_struct *work) · 127 unmodified lines
12021199 struct btintel_pcie_data *data = container_of(work,
12031200 struct btintel_pcie_data, rx_work);
12041201 struct sk_buff *skb;
1205− int err;
1206− struct hci_dev *hdev = data->hdev;
12071202
12081203 if (test_bit(BTINTEL_PCIE_HWEXP_INPROGRESS, &data->flags)) {
12091204 /* Unlike usb products, controller will not send hardware
@@ -1224,11 +1219,7 @@ static void btintel_pcie_rx_work(struct work_struct *work) · 14 unmodified lines
12241219
12251220 /* Process the sk_buf in queue and send to the HCI layer */
12261221 while ((skb = skb_dequeue(&data->rx_skb_q))) {
1227− err = btintel_pcie_recv_frame(data, skb);
1228− if (err)
1229− bt_dev_err(hdev, "Failed to send received frame: %d",
1230− err);
1231− kfree_skb(skb);
1222+ btintel_pcie_recv_frame(data, skb);
12321223 }
12331224 }
12341225
@@ -1281,10 +1272,8 @@ static void btintel_pcie_msix_rx_handle(struct btintel_pcie_data *data) · 46 unmodified lines
12811272 bt_dev_dbg(hdev, "RXQ: cr_hia: %u cr_tia: %u", cr_hia, cr_tia);
12821273
12831274 /* Check CR_TIA and CR_HIA for change */
1284− if (cr_tia == cr_hia) {
1285− bt_dev_warn(hdev, "RXQ: no new CD found");
1275+ if (cr_tia == cr_hia)
12861276 return;
1287− }
12881277
12891278 rxq = &data->rxq;
12901279
@@ -1320,6 +1309,16 @@ static irqreturn_t btintel_pcie_msix_isr(int irq, void *data) · 29 unmodified lines
13201309 return IRQ_WAKE_THREAD;
13211310 }
13221311
1312+static inline bool btintel_pcie_is_rxq_empty(struct btintel_pcie_data *data)
1313+{
1314+ return data->ia.cr_hia[BTINTEL_PCIE_RXQ_NUM] == data->ia.cr_tia[BTINTEL_PCIE_RXQ_NUM];
1315+}
1316+
1317+static inline bool btintel_pcie_is_txackq_empty(struct btintel_pcie_data *data)
1318+{
1319+ return data->ia.cr_tia[BTINTEL_PCIE_TXQ_NUM] == data->ia.cr_hia[BTINTEL_PCIE_TXQ_NUM];
1320+}
1321+
13231322 static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)
13241323 {
13251324 struct msix_entry *entry = dev_id;
@@ -1351,12 +1350,18 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id) · 25 unmodified lines
13511350 btintel_pcie_msix_gp0_handler(data);
13521351
13531352 /* For TX */
1354− if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_0)
1353+ if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_0) {
13551354 btintel_pcie_msix_tx_handle(data);
1355+ if (!btintel_pcie_is_rxq_empty(data))
1356+ btintel_pcie_msix_rx_handle(data);
1357+ }
13561358
13571359 /* For RX */
1358− if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_1)
1360+ if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_1) {
13591361 btintel_pcie_msix_rx_handle(data);
1362+ if (!btintel_pcie_is_txackq_empty(data))
1363+ btintel_pcie_msix_tx_handle(data);
1364+ }
13601365
13611366 /*
13621367 * Before sending the interrupt the HW disables it to prevent a nested
drivers/bluetooth/btmtksdio.c+10−2
@@ -723,6 +723,10 @@ static int btmtksdio_close(struct hci_dev *hdev) · 722 unmodified lines
723723 {
724724 struct btmtksdio_dev *bdev = hci_get_drvdata(hdev);
725725
726+ /* Skip btmtksdio_close if BTMTKSDIO_FUNC_ENABLED isn't set */
727+ if (!test_bit(BTMTKSDIO_FUNC_ENABLED, &bdev->tx_state))
728+ return 0;
729+
726730 sdio_claim_host(bdev->func);
727731
728732 /* Disable interrupt */
@@ -1443,11 +1447,15 @@ static void btmtksdio_remove(struct sdio_func *func) · 714 unmodified lines
14431447 if (!bdev)
14441448 return;
14451449
1450+ hdev = bdev->hdev;
1451+
1452+ /* Make sure to call btmtksdio_close before removing sdio card */
1453+ if (test_bit(BTMTKSDIO_FUNC_ENABLED, &bdev->tx_state))
1454+ btmtksdio_close(hdev);
1455+
14461456 /* Be consistent the state in btmtksdio_probe */
14471457 pm_runtime_get_noresume(bdev->dev);
14481458
1449− hdev = bdev->hdev;
1450−
14511459 sdio_set_drvdata(func, NULL);
14521460 hci_unregister_dev(hdev);
14531461 hci_free_dev(hdev);
drivers/bluetooth/btnxpuart.c+11−10
@@ -1286,7 +1286,9 @@ static void nxp_coredump(struct hci_dev *hdev) · 1285 unmodified lines
12861286 u8 pcmd = 2;
12871287
12881288 skb = nxp_drv_send_cmd(hdev, HCI_NXP_TRIGGER_DUMP, 1, &pcmd);
1289− if (!IS_ERR(skb))
1289+ if (IS_ERR(skb))
1290+ bt_dev_err(hdev, "Failed to trigger FW Dump. (%ld)", PTR_ERR(skb));
1291+ else
12901292 kfree_skb(skb);
12911293 }
12921294
@@ -1445,9 +1447,6 @@ static int nxp_shutdown(struct hci_dev *hdev) · 152 unmodified lines
14451447 /* HCI_NXP_IND_RESET command may not returns any response */
14461448 if (!IS_ERR(skb))
14471449 kfree_skb(skb);
1448− } else if (nxpdev->current_baudrate != nxpdev->fw_init_baudrate) {
1449− nxpdev->new_baudrate = nxpdev->fw_init_baudrate;
1450− nxp_set_baudrate_cmd(hdev, NULL);
14511450 }
14521451
14531452 return 0;
@@ -1799,13 +1798,15 @@ static void nxp_serdev_remove(struct serdev_device *serdev) · 345 unmodified lines
17991798 clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
18001799 wake_up_interruptible(&nxpdev->check_boot_sign_wait_q);
18011800 wake_up_interruptible(&nxpdev->fw_dnld_done_wait_q);
1802− }
1803−
1804− if (test_bit(HCI_RUNNING, &hdev->flags)) {
1805− /* Ensure shutdown callback is executed before unregistering, so
1806− * that baudrate is reset to initial value.
1801+ } else {
1802+ /* Restore FW baudrate to fw_init_baudrate if changed.
1803+ * This will ensure FW baudrate is in sync with
1804+ * driver baudrate in case this driver is re-inserted.
18071805 */
1808− nxp_shutdown(hdev);
1806+ if (nxpdev->current_baudrate != nxpdev->fw_init_baudrate) {
1807+ nxpdev->new_baudrate = nxpdev->fw_init_baudrate;
1808+ nxp_set_baudrate_cmd(hdev, NULL);
1809+ }
18091810 }
18101811
18111812 ps_cleanup(nxpdev);
drivers/bluetooth/btqca.c+1−1
@@ -889,7 +889,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · 888 unmodified lines
889889 if (le32_to_cpu(ver.soc_id) == QCA_WCN3950_SOC_ID_T)
890890 variant = "t";
891891 else if (le32_to_cpu(ver.soc_id) == QCA_WCN3950_SOC_ID_S)
892− variant = "u";
892+ variant = "s";
893893
894894 snprintf(config.fwname, sizeof(config.fwname),
895895 "qca/cmnv%02x%s.bin", rom_ver, variant);
drivers/bluetooth/btrtl.c+2−0
@@ -1215,6 +1215,8 @@ next: · 1214 unmodified lines
12151215 rtl_dev_err(hdev, "mandatory config file %s not found",
12161216 btrtl_dev->ic_info->cfg_name);
12171217 ret = btrtl_dev->cfg_len;
1218+ if (!ret)
1219+ ret = -EINVAL;
12181220 goto err_free;
12191221 }
12201222 }
drivers/bluetooth/btusb.c+72−45
@@ -3010,55 +3010,27 @@ static void btusb_coredump_qca(struct hci_dev *hdev) · 3009 unmodified lines
30103010 bt_dev_err(hdev, "%s: triggle crash failed (%d)", __func__, err);
30113011 }
30123012
3013−/*
3014− * ==0: not a dump pkt.
3015− * < 0: fails to handle a dump pkt
3016− * > 0: otherwise.
3017− */
3013+/* Return: 0 on success, negative errno on failure. */
30183014 static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
30193015 {
3020− int ret = 1;
3016+ int ret = 0;
3017+ unsigned int skip = 0;
30213018 u8 pkt_type;
3022− u8 *sk_ptr;
3023− unsigned int sk_len;
30243019 u16 seqno;
30253020 u32 dump_size;
30263021
3027− struct hci_event_hdr *event_hdr;
3028− struct hci_acl_hdr *acl_hdr;
30293022 struct qca_dump_hdr *dump_hdr;
30303023 struct btusb_data *btdata = hci_get_drvdata(hdev);
30313024 struct usb_device *udev = btdata->udev;
30323025
30333026 pkt_type = hci_skb_pkt_type(skb);
3034− sk_ptr = skb->data;
3035− sk_len = skb->len;
3036−
3037− if (pkt_type == HCI_ACLDATA_PKT) {
3038− acl_hdr = hci_acl_hdr(skb);
3039− if (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE)
3040− return 0;
3041− sk_ptr += HCI_ACL_HDR_SIZE;
3042− sk_len -= HCI_ACL_HDR_SIZE;
3043− event_hdr = (struct hci_event_hdr *)sk_ptr;
3044− } else {
3045− event_hdr = hci_event_hdr(skb);
3046− }
3047−
3048− if ((event_hdr->evt != HCI_VENDOR_PKT)
3049− || (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE)))
3050− return 0;
3051−
3052− sk_ptr += HCI_EVENT_HDR_SIZE;
3053− sk_len -= HCI_EVENT_HDR_SIZE;
3027+ skip = sizeof(struct hci_event_hdr);
3028+ if (pkt_type == HCI_ACLDATA_PKT)
3029+ skip += sizeof(struct hci_acl_hdr);
30543030
3055− dump_hdr = (struct qca_dump_hdr *)sk_ptr;
3056− if ((sk_len < offsetof(struct qca_dump_hdr, data))
3057− || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS)
3058− || (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
3059− return 0;
3031+ skb_pull(skb, skip);
3032+ dump_hdr = (struct qca_dump_hdr *)skb->data;
30603033
3061− /*it is dump pkt now*/
30623034 seqno = le16_to_cpu(dump_hdr->seqno);
30633035 if (seqno == 0) {
30643036 set_bit(BTUSB_HW_SSR_ACTIVE, &btdata->flags);
@@ -3078,16 +3050,15 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb) · 13 unmodified lines
30783050
30793051 btdata->qca_dump.ram_dump_size = dump_size;
30803052 btdata->qca_dump.ram_dump_seqno = 0;
3081− sk_ptr += offsetof(struct qca_dump_hdr, data0);
3082− sk_len -= offsetof(struct qca_dump_hdr, data0);
3053+
3054+ skb_pull(skb, offsetof(struct qca_dump_hdr, data0));
30833055
30843056 usb_disable_autosuspend(udev);
30853057 bt_dev_info(hdev, "%s memdump size(%u)\n",
30863058 (pkt_type == HCI_ACLDATA_PKT) ? "ACL" : "event",
30873059 dump_size);
30883060 } else {
3089− sk_ptr += offsetof(struct qca_dump_hdr, data);
3090− sk_len -= offsetof(struct qca_dump_hdr, data);
3061+ skb_pull(skb, offsetof(struct qca_dump_hdr, data));
30913062 }
30923063
30933064 if (!btdata->qca_dump.ram_dump_size) {
@@ -3107,7 +3078,6 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb) · 13 unmodified lines
31073078 return ret;
31083079 }
31093080
3110− skb_pull(skb, skb->len - sk_len);
31113081 hci_devcd_append(hdev, skb);
31123082 btdata->qca_dump.ram_dump_seqno++;
31133083 if (seqno == QCA_LAST_SEQUENCE_NUM) {
@@ -3132,17 +3102,74 @@ out: · 18 unmodified lines
31323102 return ret;
31333103 }
31343104
3105+/* Return: true if the ACL packet is a dump packet, false otherwise. */
3106+static bool acl_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
3107+{
3108+ struct hci_event_hdr *event_hdr;
3109+ struct hci_acl_hdr *acl_hdr;
3110+ struct qca_dump_hdr *dump_hdr;
3111+ struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
3112+ bool is_dump = false;
3113+
3114+ if (!clone)
3115+ return false;
3116+
3117+ acl_hdr = skb_pull_data(clone, sizeof(*acl_hdr));
3118+ if (!acl_hdr || (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE))
3119+ goto out;
3120+
3121+ event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
3122+ if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
3123+ goto out;
3124+
3125+ dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
3126+ if (!dump_hdr || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
3127+ (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
3128+ goto out;
3129+
3130+ is_dump = true;
3131+out:
3132+ consume_skb(clone);
3133+ return is_dump;
3134+}
3135+
3136+/* Return: true if the event packet is a dump packet, false otherwise. */
3137+static bool evt_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
3138+{
3139+ struct hci_event_hdr *event_hdr;
3140+ struct qca_dump_hdr *dump_hdr;
3141+ struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
3142+ bool is_dump = false;
3143+
3144+ if (!clone)
3145+ return false;
3146+
3147+ event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
3148+ if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
3149+ goto out;
3150+
3151+ dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
3152+ if (!dump_hdr || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
3153+ (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
3154+ goto out;
3155+
3156+ is_dump = true;
3157+out:
3158+ consume_skb(clone);
3159+ return is_dump;
3160+}
3161+
31353162 static int btusb_recv_acl_qca(struct hci_dev *hdev, struct sk_buff *skb)
31363163 {
3137− if (handle_dump_pkt_qca(hdev, skb))
3138− return 0;
3164+ if (acl_pkt_is_dump_qca(hdev, skb))
3165+ return handle_dump_pkt_qca(hdev, skb);
31393166 return hci_recv_frame(hdev, skb);
31403167 }
31413168
31423169 static int btusb_recv_evt_qca(struct hci_dev *hdev, struct sk_buff *skb)
31433170 {
3144− if (handle_dump_pkt_qca(hdev, skb))
3145− return 0;
3171+ if (evt_pkt_is_dump_qca(hdev, skb))
3172+ return handle_dump_pkt_qca(hdev, skb);
31463173 return hci_recv_frame(hdev, skb);
31473174 }
31483175
drivers/bluetooth/hci_vhci.c+5−5
@@ -289,18 +289,18 @@ static void vhci_coredump(struct hci_dev *hdev) · 288 unmodified lines
289289
290290 static void vhci_coredump_hdr(struct hci_dev *hdev, struct sk_buff *skb)
291291 {
292− char buf[80];
292+ const char *buf;
293293
294− snprintf(buf, sizeof(buf), "Controller Name: vhci_ctrl\n");
294+ buf = "Controller Name: vhci_ctrl\n";
295295 skb_put_data(skb, buf, strlen(buf));
296296
297− snprintf(buf, sizeof(buf), "Firmware Version: vhci_fw\n");
297+ buf = "Firmware Version: vhci_fw\n";
298298 skb_put_data(skb, buf, strlen(buf));
299299
300− snprintf(buf, sizeof(buf), "Driver: vhci_drv\n");
300+ buf = "Driver: vhci_drv\n";
301301 skb_put_data(skb, buf, strlen(buf));
302302
303− snprintf(buf, sizeof(buf), "Vendor: vhci\n");
303+ buf = "Vendor: vhci\n";
304304 skb_put_data(skb, buf, strlen(buf));
305305 }
306306
drivers/char/misc.c+1−1
@@ -315,7 +315,7 @@ static int __init misc_init(void) · 314 unmodified lines
315315 goto fail_remove;
316316
317317 err = -EIO;
318− if (register_chrdev(MISC_MAJOR, "misc", &misc_fops))
318+ if (__register_chrdev(MISC_MAJOR, 0, MINORMASK + 1, "misc", &misc_fops))
319319 goto fail_printk;
320320 return 0;
321321
drivers/char/tpm/tpm-buf.c+3−3
@@ -201,7 +201,7 @@ static void tpm_buf_read(struct tpm_buf *buf, off_t *offset, size_t count, void · 200 unmodified lines
201201 */
202202 u8 tpm_buf_read_u8(struct tpm_buf *buf, off_t *offset)
203203 {
204− u8 value;
204+ u8 value = 0;
205205
206206 tpm_buf_read(buf, offset, sizeof(value), &value);
207207
@@ -218,7 +218,7 @@ EXPORT_SYMBOL_GPL(tpm_buf_read_u8); · 10 unmodified lines
218218 */
219219 u16 tpm_buf_read_u16(struct tpm_buf *buf, off_t *offset)
220220 {
221− u16 value;
221+ u16 value = 0;
222222
223223 tpm_buf_read(buf, offset, sizeof(value), &value);
224224
@@ -235,7 +235,7 @@ EXPORT_SYMBOL_GPL(tpm_buf_read_u16); · 10 unmodified lines
235235 */
236236 u32 tpm_buf_read_u32(struct tpm_buf *buf, off_t *offset)
237237 {
238− u32 value;
238+ u32 value = 0;
239239
240240 tpm_buf_read(buf, offset, sizeof(value), &value);
241241
drivers/char/tpm/tpm2-sessions.c+6−14
@@ -40,11 +40,6 @@ · 39 unmodified lines
4040 *
4141 * These are the usage functions:
4242 *
43− * tpm2_start_auth_session() which allocates the opaque auth structure
44− * and gets a session from the TPM. This must be called before
45− * any of the following functions. The session is protected by a
46− * session_key which is derived from a random salt value
47− * encrypted to the NULL seed.
4843 * tpm2_end_auth_session() kills the session and frees the resources.
4944 * Under normal operation this function is done by
5045 * tpm_buf_check_hmac_response(), so this is only to be used on
@@ -963,16 +958,13 @@ err: · 912 unmodified lines
963958 }
964959
965960 /**
966− * tpm2_start_auth_session() - create a HMAC authentication session with the TPM
967− * @chip: the TPM chip structure to create the session with
961+ * tpm2_start_auth_session() - Create an a HMAC authentication session
962+ * @chip: A TPM chip
968963 *
969− * This function loads the NULL seed from its saved context and starts
970− * an authentication session on the null seed, fills in the
971− * @chip->auth structure to contain all the session details necessary
972− * for performing the HMAC, encrypt and decrypt operations and
973− * returns. The NULL seed is flushed before this function returns.
964+ * Loads the ephemeral key (null seed), and starts an HMAC authenticated
965+ * session. The null seed is flushed before the return.
974966 *
975− * Return: zero on success or actual error encountered.
967+ * Returns zero on success, or a POSIX error code.
976968 */
977969 int tpm2_start_auth_session(struct tpm_chip *chip)
978970 {
@@ -1024,7 +1016,7 @@ int tpm2_start_auth_session(struct tpm_chip *chip) · 45 unmodified lines
10241016 /* hash algorithm for session */
10251017 tpm_buf_append_u16(&buf, TPM_ALG_SHA256);
10261018
1027− rc = tpm_transmit_cmd(chip, &buf, 0, "start auth session");
1019+ rc = tpm_ret_to_err(tpm_transmit_cmd(chip, &buf, 0, "StartAuthSession"));
10281020 tpm2_flush_context(chip, null_key);
10291021
10301022 if (rc == TPM2_RC_SUCCESS)
drivers/char/tpm/tpm_tis_core.h+1−1
@@ -54,7 +54,7 @@ enum tis_int_flags { · 53 unmodified lines
5454 enum tis_defaults {
5555 TIS_MEM_LEN = 0x5000,
5656 TIS_SHORT_TIMEOUT = 750, /* ms */
57− TIS_LONG_TIMEOUT = 2000, /* 2 sec */
57+ TIS_LONG_TIMEOUT = 4000, /* 4 secs */
5858 TIS_TIMEOUT_MIN_ATML = 14700, /* usecs */
5959 TIS_TIMEOUT_MAX_ATML = 15000, /* usecs */
6060 };
drivers/char/virtio_console.c+4−3
@@ -1576,8 +1576,8 @@ static void handle_control_message(struct virtio_device *vdev, · 1575 unmodified lines
15761576 break;
15771577 case VIRTIO_CONSOLE_RESIZE: {
15781578 struct {
1579− __u16 rows;
1580− __u16 cols;
1579+ __virtio16 cols;
1580+ __virtio16 rows;
15811581 } size;
15821582
15831583 if (!is_console_port(port))
@@ -1585,7 +1585,8 @@ static void handle_control_message(struct virtio_device *vdev, · 1 unmodified line
15851585
15861586 memcpy(&size, buf->buf + buf->offset + sizeof(*cpkt),
15871587 sizeof(size));
1588− set_console_size(port, size.rows, size.cols);
1588+ set_console_size(port, virtio16_to_cpu(vdev, size.rows),
1589+ virtio16_to_cpu(vdev, size.cols));
15891590
15901591 port->cons.hvc->irq_requested = 1;
15911592 resize_console(port);
drivers/clk/clk-s2mps11.c+2−1
@@ -137,6 +137,8 @@ static int s2mps11_clk_probe(struct platform_device *pdev) · 136 unmodified lines
137137 if (!clk_data)
138138 return -ENOMEM;
139139
140+ clk_data->num = S2MPS11_CLKS_NUM;
141+
140142 switch (hwid) {
141143 case S2MPS11X:
142144 s2mps11_reg = S2MPS11_REG_RTC_CTRL;
@@ -186,7 +188,6 @@ static int s2mps11_clk_probe(struct platform_device *pdev) · 43 unmodified lines
186188 clk_data->hws[i] = &s2mps11_clks[i].hw;
187189 }
188190
189− clk_data->num = S2MPS11_CLKS_NUM;
190191 of_clk_add_hw_provider(s2mps11_clks->clk_np, of_clk_hw_onecell_get,
191192 clk_data);
192193
drivers/clk/rockchip/clk-rk3576.c+2−0
@@ -541,6 +541,8 @@ static struct rockchip_clk_branch rk3576_clk_branches[] __initdata = { · 540 unmodified lines
541541 RK3576_CLKGATE_CON(5), 14, GFLAGS),
542542 GATE(CLK_OTPC_AUTO_RD_G, "clk_otpc_auto_rd_g", "xin24m", 0,
543543 RK3576_CLKGATE_CON(5), 15, GFLAGS),
544+ GATE(CLK_OTP_PHY_G, "clk_otp_phy_g", "xin24m", 0,
545+ RK3576_CLKGATE_CON(6), 0, GFLAGS),
544546 COMPOSITE(CLK_MIPI_CAMERAOUT_M0, "clk_mipi_cameraout_m0", mux_24m_spll_gpll_cpll_p, 0,
545547 RK3576_CLKSEL_CON(38), 8, 2, MFLAGS, 0, 8, DFLAGS,
546548 RK3576_CLKGATE_CON(6), 3, GFLAGS),
drivers/clk/sunxi-ng/ccu-sun20i-d1.c+25−19
@@ -412,19 +412,23 @@ static const struct clk_parent_data mmc0_mmc1_parents[] = { · 411 unmodified lines
412412 { .hw = &pll_periph0_2x_clk.common.hw },
413413 { .hw = &pll_audio1_div2_clk.common.hw },
414414 };
415−static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc0_clk, "mmc0", mmc0_mmc1_parents, 0x830,
416− 0, 4, /* M */
417− 8, 2, /* P */
418− 24, 3, /* mux */
419− BIT(31), /* gate */
420− 0);
421−
422−static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc1_clk, "mmc1", mmc0_mmc1_parents, 0x834,
423− 0, 4, /* M */
424− 8, 2, /* P */
425− 24, 3, /* mux */
426− BIT(31), /* gate */
427− 0);
415+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0",
416+ mmc0_mmc1_parents, 0x830,
417+ 0, 4, /* M */
418+ 8, 2, /* P */
419+ 24, 3, /* mux */
420+ BIT(31), /* gate */
421+ 2, /* post-div */
422+ 0);
423+
424+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1",
425+ mmc0_mmc1_parents, 0x834,
426+ 0, 4, /* M */
427+ 8, 2, /* P */
428+ 24, 3, /* mux */
429+ BIT(31), /* gate */
430+ 2, /* post-div */
431+ 0);
428432
429433 static const struct clk_parent_data mmc2_parents[] = {
430434 { .fw_name = "hosc" },
@@ -433,12 +437,14 @@ static const struct clk_parent_data mmc2_parents[] = { · 2 unmodified lines
433437 { .hw = &pll_periph0_800M_clk.common.hw },
434438 { .hw = &pll_audio1_div2_clk.common.hw },
435439 };
436−static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc2_clk, "mmc2", mmc2_parents, 0x838,
437− 0, 4, /* M */
438− 8, 2, /* P */
439− 24, 3, /* mux */
440− BIT(31), /* gate */
441− 0);
440+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc2_parents,
441+ 0x838,
442+ 0, 4, /* M */
443+ 8, 2, /* P */
444+ 24, 3, /* mux */
445+ BIT(31), /* gate */
446+ 2, /* post-div */
447+ 0);
442448
443449 static SUNXI_CCU_GATE_HWS(bus_mmc0_clk, "bus-mmc0", psi_ahb_hws,
444450 0x84c, BIT(0), 0);
drivers/clk/sunxi-ng/ccu_mp.h+23−2
@@ -52,6 +52,28 @@ struct ccu_mp { · 51 unmodified lines
5252 } \
5353 }
5454
55+#define SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(_struct, _name, _parents, \
56+ _reg, \
57+ _mshift, _mwidth, \
58+ _pshift, _pwidth, \
59+ _muxshift, _muxwidth, \
60+ _gate, _postdiv, _flags)\
61+ struct ccu_mp _struct = { \
62+ .enable = _gate, \
63+ .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
64+ .p = _SUNXI_CCU_DIV(_pshift, _pwidth), \
65+ .mux = _SUNXI_CCU_MUX(_muxshift, _muxwidth), \
66+ .fixed_post_div = _postdiv, \
67+ .common = { \
68+ .reg = _reg, \
69+ .features = CCU_FEATURE_FIXED_POSTDIV, \
70+ .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, \
71+ _parents, \
72+ &ccu_mp_ops, \
73+ _flags), \
74+ } \
75+ }
76+
5577 #define SUNXI_CCU_MP_WITH_MUX_GATE(_struct, _name, _parents, _reg, \
5678 _mshift, _mwidth, \
5779 _pshift, _pwidth, \
@@ -109,8 +131,7 @@ struct ccu_mp { · 51 unmodified lines
109131 _mshift, _mwidth, \
110132 _pshift, _pwidth, \
111133 _muxshift, _muxwidth, \
112− _gate, _features, \
113− _flags) \
134+ _gate, _flags, _features) \
114135 struct ccu_mp _struct = { \
115136 .enable = _gate, \
116137 .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
drivers/clocksource/i8253.c+1−3
@@ -103,7 +103,7 @@ int __init clocksource_i8253_init(void) · 102 unmodified lines
103103 #ifdef CONFIG_CLKEVT_I8253
104104 void clockevent_i8253_disable(void)
105105 {
106− raw_spin_lock(&i8253_lock);
106+ guard(raw_spinlock_irqsave)(&i8253_lock);
107107
108108 /*
109109 * Writing the MODE register should stop the counter, according to
@@ -132,8 +132,6 @@ void clockevent_i8253_disable(void) · 22 unmodified lines
132132 outb_p(0, PIT_CH0);
133133
134134 outb_p(0x30, PIT_MODE);
135−
136− raw_spin_unlock(&i8253_lock);
137135 }
138136
139137 static int pit_shutdown(struct clock_event_device *evt)
drivers/comedi/drivers/jr3_pci.c+1−1
@@ -758,7 +758,7 @@ static void jr3_pci_detach(struct comedi_device *dev) · 757 unmodified lines
758758 struct jr3_pci_dev_private *devpriv = dev->private;
759759
760760 if (devpriv)
761− timer_delete_sync(&devpriv->timer);
761+ timer_shutdown_sync(&devpriv->timer);
762762
763763 comedi_pci_detach(dev);
764764 }
drivers/cpufreq/Kconfig.arm+10−10
@@ -76,7 +76,7 @@ config ARM_VEXPRESS_SPC_CPUFREQ · 75 unmodified lines
7676 config ARM_BRCMSTB_AVS_CPUFREQ
7777 tristate "Broadcom STB AVS CPUfreq driver"
7878 depends on (ARCH_BRCMSTB && !ARM_SCMI_CPUFREQ) || COMPILE_TEST
79− default y
79+ default y if ARCH_BRCMSTB && !ARM_SCMI_CPUFREQ
8080 help
8181 Some Broadcom STB SoCs use a co-processor running proprietary firmware
8282 ("AVS") to handle voltage and frequency scaling. This driver provides
@@ -88,7 +88,7 @@ config ARM_HIGHBANK_CPUFREQ · 5 unmodified lines
8888 tristate "Calxeda Highbank-based"
8989 depends on ARCH_HIGHBANK || COMPILE_TEST
9090 depends on CPUFREQ_DT && REGULATOR && PL320_MBOX
91− default m
91+ default m if ARCH_HIGHBANK
9292 help
9393 This adds the CPUFreq driver for Calxeda Highbank SoC
9494 based boards.
@@ -133,7 +133,7 @@ config ARM_MEDIATEK_CPUFREQ · 38 unmodified lines
133133 config ARM_MEDIATEK_CPUFREQ_HW
134134 tristate "MediaTek CPUFreq HW driver"
135135 depends on ARCH_MEDIATEK || COMPILE_TEST
136− default m
136+ default m if ARCH_MEDIATEK
137137 help
138138 Support for the CPUFreq HW driver.
139139 Some MediaTek chipsets have a HW engine to offload the steps
@@ -181,7 +181,7 @@ config ARM_RASPBERRYPI_CPUFREQ · 41 unmodified lines
181181 config ARM_S3C64XX_CPUFREQ
182182 bool "Samsung S3C64XX"
183183 depends on CPU_S3C6410 || COMPILE_TEST
184− default y
184+ default CPU_S3C6410
185185 help
186186 This adds the CPUFreq driver for Samsung S3C6410 SoC.
187187
@@ -190,7 +190,7 @@ config ARM_S3C64XX_CPUFREQ · 2 unmodified lines
190190 config ARM_S5PV210_CPUFREQ
191191 bool "Samsung S5PV210 and S5PC110"
192192 depends on CPU_S5PV210 || COMPILE_TEST
193− default y
193+ default CPU_S5PV210
194194 help
195195 This adds the CPUFreq driver for Samsung S5PV210 and
196196 S5PC110 SoCs.
@@ -214,7 +214,7 @@ config ARM_SCMI_CPUFREQ · 17 unmodified lines
214214 config ARM_SPEAR_CPUFREQ
215215 bool "SPEAr CPUFreq support"
216216 depends on PLAT_SPEAR || COMPILE_TEST
217− default y
217+ default PLAT_SPEAR
218218 help
219219 This adds the CPUFreq driver support for SPEAr SOCs.
220220
@@ -233,7 +233,7 @@ config ARM_TEGRA20_CPUFREQ · 12 unmodified lines
233233 tristate "Tegra20/30 CPUFreq support"
234234 depends on ARCH_TEGRA || COMPILE_TEST
235235 depends on CPUFREQ_DT
236− default y
236+ default ARCH_TEGRA
237237 help
238238 This adds the CPUFreq driver support for Tegra20/30 SOCs.
239239
@@ -241,7 +241,7 @@ config ARM_TEGRA124_CPUFREQ · 1 unmodified line
241241 bool "Tegra124 CPUFreq support"
242242 depends on ARCH_TEGRA || COMPILE_TEST
243243 depends on CPUFREQ_DT
244− default y
244+ default ARCH_TEGRA
245245 help
246246 This adds the CPUFreq driver support for Tegra124 SOCs.
247247
@@ -256,14 +256,14 @@ config ARM_TEGRA194_CPUFREQ · 8 unmodified lines
256256 tristate "Tegra194 CPUFreq support"
257257 depends on ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC || (64BIT && COMPILE_TEST)
258258 depends on TEGRA_BPMP
259− default y
259+ default ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC
260260 help
261261 This adds CPU frequency driver support for Tegra194 SOCs.
262262
263263 config ARM_TI_CPUFREQ
264264 bool "Texas Instruments CPUFreq support"
265265 depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST
266− default y
266+ default ARCH_OMAP2PLUS || ARCH_K3
267267 help
268268 This driver enables valid OPPs on the running platform based on
269269 values contained within the SoC in use. Enable this in order to
drivers/cpufreq/acpi-cpufreq.c+13−2
@@ -909,8 +909,19 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) · 908 unmodified lines
909909 if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
910910 pr_warn(FW_WARN "P-state 0 is not max freq\n");
911911
912− if (acpi_cpufreq_driver.set_boost)
913− policy->boost_supported = true;
912+ if (acpi_cpufreq_driver.set_boost) {
913+ if (policy->boost_supported) {
914+ /*
915+ * The firmware may have altered boost state while the
916+ * CPU was offline (for example during a suspend-resume
917+ * cycle).
918+ */
919+ if (policy->boost_enabled != boost_state(cpu))
920+ set_boost(policy, policy->boost_enabled);
921+ } else {
922+ policy->boost_supported = true;
923+ }
924+ }
914925
915926 return result;
916927
drivers/cpufreq/amd-pstate.c+15−21
@@ -607,13 +607,16 @@ static void amd_pstate_update_min_max_limit(struct cpufreq_policy *policy) · 606 unmodified lines
607607 union perf_cached perf = READ_ONCE(cpudata->perf);
608608
609609 perf.max_limit_perf = freq_to_perf(perf, cpudata->nominal_freq, policy->max);
610− perf.min_limit_perf = freq_to_perf(perf, cpudata->nominal_freq, policy->min);
610+ WRITE_ONCE(cpudata->max_limit_freq, policy->max);
611611
612− if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
612+ if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) {
613613 perf.min_limit_perf = min(perf.nominal_perf, perf.max_limit_perf);
614+ WRITE_ONCE(cpudata->min_limit_freq, min(cpudata->nominal_freq, cpudata->max_limit_freq));
615+ } else {
616+ perf.min_limit_perf = freq_to_perf(perf, cpudata->nominal_freq, policy->min);
617+ WRITE_ONCE(cpudata->min_limit_freq, policy->min);
618+ }
614619
615− WRITE_ONCE(cpudata->max_limit_freq, policy->max);
616− WRITE_ONCE(cpudata->min_limit_freq, policy->min);
617620 WRITE_ONCE(cpudata->perf, perf);
618621 }
619622
@@ -791,16 +794,6 @@ static void amd_perf_ctl_reset(unsigned int cpu) · 171 unmodified lines
791794 wrmsrl_on_cpu(cpu, MSR_AMD_PERF_CTL, 0);
792795 }
793796
794−/*
795− * Set amd-pstate preferred core enable can't be done directly from cpufreq callbacks
796− * due to locking, so queue the work for later.
797− */
798−static void amd_pstste_sched_prefcore_workfn(struct work_struct *work)
799−{
800− sched_set_itmt_support();
801−}
802−static DECLARE_WORK(sched_prefcore_work, amd_pstste_sched_prefcore_workfn);
803−
804797 #define CPPC_MAX_PERF U8_MAX
805798
806799 static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
@@ -811,14 +804,8 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata) · 4 unmodified lines
811804
812805 cpudata->hw_prefcore = true;
813806
814− /*
815− * The priorities can be set regardless of whether or not
816− * sched_set_itmt_support(true) has been called and it is valid to
817− * update them at any time after it has been called.
818− */
807+ /* Priorities must be initialized before ITMT support can be toggled on. */
819808 sched_set_itmt_core_prio((int)READ_ONCE(cpudata->prefcore_ranking), cpudata->cpu);
820−
821− schedule_work(&sched_prefcore_work);
822809 }
823810
824811 static void amd_pstate_update_limits(unsigned int cpu)
@@ -1193,6 +1180,9 @@ static ssize_t show_energy_performance_preference( · 368 unmodified lines
11931180
11941181 static void amd_pstate_driver_cleanup(void)
11951182 {
1183+ if (amd_pstate_prefcore)
1184+ sched_clear_itmt_support();
1185+
11961186 cppc_state = AMD_PSTATE_DISABLE;
11971187 current_pstate_driver = NULL;
11981188 }
@@ -1235,6 +1225,10 @@ static int amd_pstate_register_driver(int mode) · 36 unmodified lines
12351225 return ret;
12361226 }
12371227
1228+ /* Enable ITMT support once all CPUs have initialized their asym priorities. */
1229+ if (amd_pstate_prefcore)
1230+ sched_set_itmt_support();
1231+
12381232 return 0;
12391233 }
12401234
drivers/cpufreq/apple-soc-cpufreq.c+8−2
@@ -134,11 +134,17 @@ static const struct of_device_id apple_soc_cpufreq_of_match[] __maybe_unused = { · 133 unmodified lines
134134
135135 static unsigned int apple_soc_cpufreq_get_rate(unsigned int cpu)
136136 {
137− struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
138− struct apple_cpu_priv *priv = policy->driver_data;
137+ struct cpufreq_policy *policy;
138+ struct apple_cpu_priv *priv;
139139 struct cpufreq_frequency_table *p;
140140 unsigned int pstate;
141141
142+ policy = cpufreq_cpu_get_raw(cpu);
143+ if (unlikely(!policy))
144+ return 0;
145+
146+ priv = policy->driver_data;
147+
142148 if (priv->info->cur_pstate_mask) {
143149 u32 reg = readl_relaxed(priv->reg_base + APPLE_DVFS_STATUS);
144150
drivers/cpufreq/cppc_cpufreq.c+1−1
@@ -747,7 +747,7 @@ static unsigned int cppc_cpufreq_get_rate(unsigned int cpu) · 746 unmodified lines
747747 int ret;
748748
749749 if (!policy)
750− return -ENODEV;
750+ return 0;
751751
752752 cpu_data = policy->driver_data;
753753
drivers/cpufreq/cpufreq-dt-platdev.c+1−0
@@ -175,6 +175,7 @@ static const struct of_device_id blocklist[] __initconst = { · 174 unmodified lines
175175 { .compatible = "qcom,sm8350", },
176176 { .compatible = "qcom,sm8450", },
177177 { .compatible = "qcom,sm8550", },
178+ { .compatible = "qcom,sm8650", },
178179
179180 { .compatible = "st,stih407", },
180181 { .compatible = "st,stih410", },
drivers/cpufreq/cpufreq.c+33−9
@@ -536,16 +536,18 @@ void cpufreq_disable_fast_switch(struct cpufreq_policy *policy) · 535 unmodified lines
536536 EXPORT_SYMBOL_GPL(cpufreq_disable_fast_switch);
537537
538538 static unsigned int __resolve_freq(struct cpufreq_policy *policy,
539− unsigned int target_freq, unsigned int relation)
539+ unsigned int target_freq,
540+ unsigned int min, unsigned int max,
541+ unsigned int relation)
540542 {
541543 unsigned int idx;
542544
543− target_freq = clamp_val(target_freq, policy->min, policy->max);
545+ target_freq = clamp_val(target_freq, min, max);
544546
545547 if (!policy->freq_table)
546548 return target_freq;
547549
548− idx = cpufreq_frequency_table_target(policy, target_freq, relation);
550+ idx = cpufreq_frequency_table_target(policy, target_freq, min, max, relation);
549551 policy->cached_resolved_idx = idx;
550552 policy->cached_target_freq = target_freq;
551553 return policy->freq_table[idx].frequency;
@@ -565,7 +567,21 @@ static unsigned int __resolve_freq(struct cpufreq_policy *policy, · 13 unmodified lines
565567 unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy,
566568 unsigned int target_freq)
567569 {
568− return __resolve_freq(policy, target_freq, CPUFREQ_RELATION_LE);
570+ unsigned int min = READ_ONCE(policy->min);
571+ unsigned int max = READ_ONCE(policy->max);
572+
573+ /*
574+ * If this function runs in parallel with cpufreq_set_policy(), it may
575+ * read policy->min before the update and policy->max after the update
576+ * or the other way around, so there is no ordering guarantee.
577+ *
578+ * Resolve this by always honoring the max (in case it comes from
579+ * thermal throttling or similar).
580+ */
581+ if (unlikely(min > max))
582+ min = max;
583+
584+ return __resolve_freq(policy, target_freq, min, max, CPUFREQ_RELATION_LE);
569585 }
570586 EXPORT_SYMBOL_GPL(cpufreq_driver_resolve_freq);
571587
@@ -2384,7 +2400,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy, · 1812 unmodified lines
23842400 if (cpufreq_disabled())
23852401 return -ENODEV;
23862402
2387− target_freq = __resolve_freq(policy, target_freq, relation);
2403+ target_freq = __resolve_freq(policy, target_freq, policy->min,
2404+ policy->max, relation);
23882405
23892406 pr_debug("target for CPU %u: %u kHz, relation %u, requested %u kHz\n",
23902407 policy->cpu, target_freq, relation, old_target_freq);
@@ -2708,11 +2725,18 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, · 317 unmodified lines
27082725 * Resolve policy min/max to available frequencies. It ensures
27092726 * no frequency resolution will neither overshoot the requested maximum
27102727 * nor undershoot the requested minimum.
2728+ *
2729+ * Avoid storing intermediate values in policy->max or policy->min and
2730+ * compiler optimizations around them because they may be accessed
2731+ * concurrently by cpufreq_driver_resolve_freq() during the update.
27112732 */
2712− policy->min = new_data.min;
2713− policy->max = new_data.max;
2714− policy->min = __resolve_freq(policy, policy->min, CPUFREQ_RELATION_L);
2715− policy->max = __resolve_freq(policy, policy->max, CPUFREQ_RELATION_H);
2733+ WRITE_ONCE(policy->max, __resolve_freq(policy, new_data.max,
2734+ new_data.min, new_data.max,
2735+ CPUFREQ_RELATION_H));
2736+ new_data.min = __resolve_freq(policy, new_data.min, new_data.min,
2737+ new_data.max, CPUFREQ_RELATION_L);
2738+ WRITE_ONCE(policy->min, new_data.min > policy->max ? policy->max : new_data.min);
2739+
27162740 trace_cpu_frequency_limits(policy);
27172741
27182742 cpufreq_update_pressure(policy);
drivers/cpufreq/cpufreq_ondemand.c+2−1
@@ -76,7 +76,8 @@ static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, · 75 unmodified lines
7676 return freq_next;
7777 }
7878
79− index = cpufreq_frequency_table_target(policy, freq_next, relation);
79+ index = cpufreq_frequency_table_target(policy, freq_next, policy->min,
80+ policy->max, relation);
8081 freq_req = freq_table[index].frequency;
8182 freq_reduc = freq_req * od_tuners->powersave_bias / 1000;
8283 freq_avg = freq_req - freq_reduc;
drivers/cpufreq/freq_table.c+3−3
@@ -115,8 +115,8 @@ int cpufreq_generic_frequency_table_verify(struct cpufreq_policy_data *policy) · 114 unmodified lines
115115 EXPORT_SYMBOL_GPL(cpufreq_generic_frequency_table_verify);
116116
117117 int cpufreq_table_index_unsorted(struct cpufreq_policy *policy,
118− unsigned int target_freq,
119− unsigned int relation)
118+ unsigned int target_freq, unsigned int min,
119+ unsigned int max, unsigned int relation)
120120 {
121121 struct cpufreq_frequency_table optimal = {
122122 .driver_data = ~0,
@@ -147,7 +147,7 @@ int cpufreq_table_index_unsorted(struct cpufreq_policy *policy, · 24 unmodified lines
147147 cpufreq_for_each_valid_entry_idx(pos, table, i) {
148148 freq = pos->frequency;
149149
150− if ((freq < policy->min) || (freq > policy->max))
150+ if (freq < min || freq > max)
151151 continue;
152152 if (freq == target_freq) {
153153 optimal.driver_data = i;
drivers/cpufreq/intel_pstate.c+4−1
@@ -598,6 +598,9 @@ static bool turbo_is_disabled(void) · 597 unmodified lines
598598 {
599599 u64 misc_en;
600600
601+ if (!cpu_feature_enabled(X86_FEATURE_IDA))
602+ return true;
603+
601604 rdmsrl(MSR_IA32_MISC_ENABLE, misc_en);
602605
603606 return !!(misc_en & MSR_IA32_MISC_ENABLE_TURBO_DISABLE);
@@ -2209,7 +2212,7 @@ static int knl_get_turbo_pstate(int cpu) · 1605 unmodified lines
22092212 static int hwp_get_cpu_scaling(int cpu)
22102213 {
22112214 if (hybrid_scaling_factor) {
2212− struct cpuinfo_x86 *c = &cpu_data(smp_processor_id());
2215+ struct cpuinfo_x86 *c = &cpu_data(cpu);
22132216 u8 cpu_type = c->topo.intel_type;
22142217
22152218 /*
drivers/cpufreq/scmi-cpufreq.c+8−2
@@ -37,11 +37,17 @@ static struct cpufreq_driver scmi_cpufreq_driver; · 36 unmodified lines
3737
3838 static unsigned int scmi_cpufreq_get_rate(unsigned int cpu)
3939 {
40− struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
41− struct scmi_data *priv = policy->driver_data;
40+ struct cpufreq_policy *policy;
41+ struct scmi_data *priv;
4242 unsigned long rate;
4343 int ret;
4444
45+ policy = cpufreq_cpu_get_raw(cpu);
46+ if (unlikely(!policy))
47+ return 0;
48+
49+ priv = policy->driver_data;
50+
4551 ret = perf_ops->freq_get(ph, priv->domain_id, &rate, false);
4652 if (ret)
4753 return 0;
drivers/cpufreq/scpi-cpufreq.c+10−3
@@ -29,9 +29,16 @@ static struct scpi_ops *scpi_ops; · 28 unmodified lines
2929
3030 static unsigned int scpi_cpufreq_get_rate(unsigned int cpu)
3131 {
32− struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
33− struct scpi_data *priv = policy->driver_data;
34− unsigned long rate = clk_get_rate(priv->clk);
32+ struct cpufreq_policy *policy;
33+ struct scpi_data *priv;
34+ unsigned long rate;
35+
36+ policy = cpufreq_cpu_get_raw(cpu);
37+ if (unlikely(!policy))
38+ return 0;
39+
40+ priv = policy->driver_data;
41+ rate = clk_get_rate(priv->clk);
3542
3643 return rate / 1000;
3744 }
drivers/cpufreq/sun50i-cpufreq-nvmem.c+12−6
@@ -194,7 +194,9 @@ static int sun50i_cpufreq_get_efuse(void) · 193 unmodified lines
194194 struct nvmem_cell *speedbin_nvmem;
195195 const struct of_device_id *match;
196196 struct device *cpu_dev;
197− u32 *speedbin;
197+ void *speedbin_ptr;
198+ u32 speedbin = 0;
199+ size_t len;
198200 int ret;
199201
200202 cpu_dev = get_cpu_device(0);
@@ -217,14 +219,18 @@ static int sun50i_cpufreq_get_efuse(void) · 16 unmodified lines
217219 return dev_err_probe(cpu_dev, PTR_ERR(speedbin_nvmem),
218220 "Could not get nvmem cell\n");
219221
220− speedbin = nvmem_cell_read(speedbin_nvmem, NULL);
222+ speedbin_ptr = nvmem_cell_read(speedbin_nvmem, &len);
221223 nvmem_cell_put(speedbin_nvmem);
222− if (IS_ERR(speedbin))
223− return PTR_ERR(speedbin);
224+ if (IS_ERR(speedbin_ptr))
225+ return PTR_ERR(speedbin_ptr);
224226
225− ret = opp_data->efuse_xlate(*speedbin);
227+ if (len <= 4)
228+ memcpy(&speedbin, speedbin_ptr, len);
229+ speedbin = le32_to_cpu(speedbin);
226230
227− kfree(speedbin);
231+ ret = opp_data->efuse_xlate(speedbin);
232+
233+ kfree(speedbin_ptr);
228234
229235 return ret;
230236 };
drivers/crypto/atmel-sha204a.c+6−0
@@ -163,6 +163,12 @@ static int atmel_sha204a_probe(struct i2c_client *client) · 162 unmodified lines
163163 i2c_priv->hwrng.name = dev_name(&client->dev);
164164 i2c_priv->hwrng.read = atmel_sha204a_rng_read;
165165
166+ /*
167+ * According to review by Bill Cox [1], this HWRNG has very low entropy.
168+ * [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html
169+ */
170+ i2c_priv->hwrng.quality = 1;
171+
166172 ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng);
167173 if (ret)
168174 dev_warn(&client->dev, "failed to register RNG (%d)\n", ret);
drivers/crypto/caam/qi.c+3−3
@@ -122,12 +122,12 @@ int caam_qi_enqueue(struct device *qidev, struct caam_drv_req *req) · 121 unmodified lines
122122 qm_fd_addr_set64(&fd, addr);
123123
124124 do {
125+ refcount_inc(&req->drv_ctx->refcnt);
125126 ret = qman_enqueue(req->drv_ctx->req_fq, &fd);
126− if (likely(!ret)) {
127− refcount_inc(&req->drv_ctx->refcnt);
127+ if (likely(!ret))
128128 return 0;
129− }
130129
130+ refcount_dec(&req->drv_ctx->refcnt);
131131 if (ret != -EBUSY)
132132 break;
133133 num_retries++;
drivers/crypto/tegra/tegra-se-aes.c+1−4
@@ -269,7 +269,7 @@ static int tegra_aes_do_one_req(struct crypto_engine *engine, void *areq) · 268 unmodified lines
269269 unsigned int cmdlen, key1_id, key2_id;
270270 int ret;
271271
272− rctx->iv = (u32 *)req->iv;
272+ rctx->iv = (ctx->alg == SE_ALG_ECB) ? NULL : (u32 *)req->iv;
273273 rctx->len = req->cryptlen;
274274 key1_id = ctx->key1_id;
275275 key2_id = ctx->key2_id;
@@ -498,9 +498,6 @@ static int tegra_aes_crypt(struct skcipher_request *req, bool encrypt) · 222 unmodified lines
498498 if (!req->cryptlen)
499499 return 0;
500500
501− if (ctx->alg == SE_ALG_ECB)
502− req->iv = NULL;
503−
504501 rctx->encrypt = encrypt;
505502
506503 return crypto_transfer_skcipher_request_to_engine(ctx->se->engine, req);
drivers/cxl/core/core.h+1−1
@@ -119,7 +119,7 @@ int cxl_port_get_switch_dport_bandwidth(struct cxl_port *port, · 118 unmodified lines
119119
120120 int cxl_ras_init(void);
121121 void cxl_ras_exit(void);
122−int cxl_gpf_port_setup(struct device *dport_dev, struct cxl_port *port);
122+int cxl_gpf_port_setup(struct cxl_dport *dport);
123123 int cxl_acpi_get_extended_linear_cache_size(struct resource *backing_res,
124124 int nid, resource_size_t *size);
125125
drivers/cxl/core/features.c+3−3
@@ -528,13 +528,13 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs, · 527 unmodified lines
528528 rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
529529 feat_in->version, feat_in->feat_data,
530530 data_size, flags, offset, &return_code);
531+ *out_len = sizeof(*rpc_out);
531532 if (rc) {
532533 rpc_out->retval = return_code;
533534 return no_free_ptr(rpc_out);
534535 }
535536
536537 rpc_out->retval = CXL_MBOX_CMD_RC_SUCCESS;
537− *out_len = sizeof(*rpc_out);
538538
539539 return no_free_ptr(rpc_out);
540540 }
@@ -677,7 +677,7 @@ static void free_memdev_fwctl(void *_fwctl_dev) · 136 unmodified lines
677677 fwctl_put(fwctl_dev);
678678 }
679679
680−int devm_cxl_setup_fwctl(struct cxl_memdev *cxlmd)
680+int devm_cxl_setup_fwctl(struct device *host, struct cxl_memdev *cxlmd)
681681 {
682682 struct cxl_dev_state *cxlds = cxlmd->cxlds;
683683 struct cxl_features_state *cxlfs;
@@ -700,7 +700,7 @@ int devm_cxl_setup_fwctl(struct cxl_memdev *cxlmd) · 16 unmodified lines
700700 if (rc)
701701 return rc;
702702
703− return devm_add_action_or_reset(&cxlmd->dev, free_memdev_fwctl,
703+ return devm_add_action_or_reset(host, free_memdev_fwctl,
704704 no_free_ptr(fwctl_dev));
705705 }
706706 EXPORT_SYMBOL_NS_GPL(devm_cxl_setup_fwctl, "CXL");
drivers/cxl/core/pci.c+17−13
@@ -1072,14 +1072,20 @@ int cxl_pci_get_bandwidth(struct pci_dev *pdev, struct access_coordinate *c) · 1071 unmodified lines
10721072 #define GPF_TIMEOUT_BASE_MAX 2
10731073 #define GPF_TIMEOUT_SCALE_MAX 7 /* 10 seconds */
10741074
1075−u16 cxl_gpf_get_dvsec(struct device *dev, bool is_port)
1075+u16 cxl_gpf_get_dvsec(struct device *dev)
10761076 {
1077+ struct pci_dev *pdev;
1078+ bool is_port = true;
10771079 u16 dvsec;
10781080
10791081 if (!dev_is_pci(dev))
10801082 return 0;
10811083
1082− dvsec = pci_find_dvsec_capability(to_pci_dev(dev), PCI_VENDOR_ID_CXL,
1084+ pdev = to_pci_dev(dev);
1085+ if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ENDPOINT)
1086+ is_port = false;
1087+
1088+ dvsec = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
10831089 is_port ? CXL_DVSEC_PORT_GPF : CXL_DVSEC_DEVICE_GPF);
10841090 if (!dvsec)
10851091 dev_warn(dev, "%s GPF DVSEC not present\n",
@@ -1128,26 +1134,24 @@ static int update_gpf_port_dvsec(struct pci_dev *pdev, int dvsec, int phase) · 42 unmodified lines
11281134 return rc;
11291135 }
11301136
1131−int cxl_gpf_port_setup(struct device *dport_dev, struct cxl_port *port)
1137+int cxl_gpf_port_setup(struct cxl_dport *dport)
11321138 {
1133− struct pci_dev *pdev;
1134−
1135− if (!port)
1139+ if (!dport)
11361140 return -EINVAL;
11371141
1138− if (!port->gpf_dvsec) {
1142+ if (!dport->gpf_dvsec) {
1143+ struct pci_dev *pdev;
11391144 int dvsec;
11401145
1141− dvsec = cxl_gpf_get_dvsec(dport_dev, true);
1146+ dvsec = cxl_gpf_get_dvsec(dport->dport_dev);
11421147 if (!dvsec)
11431148 return -EINVAL;
11441149
1145− port->gpf_dvsec = dvsec;
1150+ dport->gpf_dvsec = dvsec;
1151+ pdev = to_pci_dev(dport->dport_dev);
1152+ update_gpf_port_dvsec(pdev, dport->gpf_dvsec, 1);
1153+ update_gpf_port_dvsec(pdev, dport->gpf_dvsec, 2);
11461154 }
11471155
1148− pdev = to_pci_dev(dport_dev);
1149− update_gpf_port_dvsec(pdev, port->gpf_dvsec, 1);
1150− update_gpf_port_dvsec(pdev, port->gpf_dvsec, 2);
1151−
11521156 return 0;
11531157 }
drivers/cxl/core/port.c+1−1
@@ -1678,7 +1678,7 @@ retry: · 1677 unmodified lines
16781678 if (rc && rc != -EBUSY)
16791679 return rc;
16801680
1681− cxl_gpf_port_setup(dport_dev, port);
1681+ cxl_gpf_port_setup(dport);
16821682
16831683 /* Any more ports to add between this one and the root? */
16841684 if (!dev_is_cxl_root_child(&port->dev))
drivers/cxl/core/regs.c+0−4
@@ -581,7 +581,6 @@ resource_size_t __rcrb_to_component(struct device *dev, struct cxl_rcrb_info *ri · 580 unmodified lines
581581 resource_size_t rcrb = ri->base;
582582 void __iomem *addr;
583583 u32 bar0, bar1;
584− u16 cmd;
585584 u32 id;
586585
587586 if (which == CXL_RCRB_UPSTREAM)
@@ -603,7 +602,6 @@ resource_size_t __rcrb_to_component(struct device *dev, struct cxl_rcrb_info *ri · 15 unmodified lines
603602 }
604603
605604 id = readl(addr + PCI_VENDOR_ID);
606− cmd = readw(addr + PCI_COMMAND);
607605 bar0 = readl(addr + PCI_BASE_ADDRESS_0);
608606 bar1 = readl(addr + PCI_BASE_ADDRESS_1);
609607 iounmap(addr);
@@ -618,8 +616,6 @@ resource_size_t __rcrb_to_component(struct device *dev, struct cxl_rcrb_info *ri · 8 unmodified lines
618616 dev_err(dev, "Failed to access Downstream Port RCRB\n");
619617 return CXL_RESOURCE_NONE;
620618 }
621− if (!(cmd & PCI_COMMAND_MEMORY))
622− return CXL_RESOURCE_NONE;
623619 /* The RCRB is a Memory Window, and the MEM_TYPE_1M bit is obsolete */
624620 if (bar0 & (PCI_BASE_ADDRESS_MEM_TYPE_1M | PCI_BASE_ADDRESS_SPACE_IO))
625621 return CXL_RESOURCE_NONE;
drivers/cxl/cxl.h+3−3
@@ -592,7 +592,6 @@ struct cxl_dax_region { · 591 unmodified lines
592592 * @cdat: Cached CDAT data
593593 * @cdat_available: Should a CDAT attribute be available in sysfs
594594 * @pci_latency: Upstream latency in picoseconds
595− * @gpf_dvsec: Cached GPF port DVSEC
596595 */
597596 struct cxl_port {
598597 struct device dev;
@@ -616,7 +615,6 @@ struct cxl_port { · 17 unmodified lines
616615 } cdat;
617616 bool cdat_available;
618617 long pci_latency;
619− int gpf_dvsec;
620618 };
621619
622620 /**
@@ -664,6 +662,7 @@ struct cxl_rcrb_info { · 41 unmodified lines
664662 * @regs: Dport parsed register blocks
665663 * @coord: access coordinates (bandwidth and latency performance attributes)
666664 * @link_latency: calculated PCIe downstream latency
665+ * @gpf_dvsec: Cached GPF port DVSEC
667666 */
668667 struct cxl_dport {
669668 struct device *dport_dev;
@@ -675,6 +674,7 @@ struct cxl_dport { · 5 unmodified lines
675674 struct cxl_regs regs;
676675 struct access_coordinate coord[ACCESS_COORDINATE_MAX];
677676 long link_latency;
677+ int gpf_dvsec;
678678 };
679679
680680 /**
@@ -910,6 +910,6 @@ bool cxl_endpoint_decoder_reset_detected(struct cxl_port *port); · 229 unmodified lines
910910 #define __mock static
911911 #endif
912912
913−u16 cxl_gpf_get_dvsec(struct device *dev, bool is_port);
913+u16 cxl_gpf_get_dvsec(struct device *dev);
914914
915915 #endif /* __CXL_H__ */
drivers/cxl/pci.c+1−1
@@ -1018,7 +1018,7 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 1017 unmodified lines
10181018 if (rc)
10191019 return rc;
10201020
1021− rc = devm_cxl_setup_fwctl(cxlmd);
1021+ rc = devm_cxl_setup_fwctl(&pdev->dev, cxlmd);
10221022 if (rc)
10231023 dev_dbg(&pdev->dev, "No CXL FWCTL setup\n");
10241024
drivers/cxl/pmem.c+1−1
@@ -108,7 +108,7 @@ static void cxl_nvdimm_arm_dirty_shutdown_tracking(struct cxl_nvdimm *cxl_nvd) · 107 unmodified lines
108108 return;
109109 }
110110
111− if (!cxl_gpf_get_dvsec(cxlds->dev, false))
111+ if (!cxl_gpf_get_dvsec(cxlds->dev))
112112 return;
113113
114114 if (cxl_get_dirty_count(mds, &count)) {
drivers/dma-buf/dma-resv.c+3−2
@@ -320,8 +320,9 @@ void dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence, · 319 unmodified lines
320320 count++;
321321
322322 dma_resv_list_set(fobj, i, fence, usage);
323− /* pointer update must be visible before we extend the num_fences */
324− smp_store_mb(fobj->num_fences, count);
323+ /* fence update must be visible before we extend the num_fences */
324+ smp_wmb();
325+ fobj->num_fences = count;
325326 }
326327 EXPORT_SYMBOL(dma_resv_add_fence);
327328
drivers/dma-buf/sw_sync.c+14−5
@@ -438,15 +438,17 @@ static int sw_sync_ioctl_get_deadline(struct sync_timeline *obj, unsigned long a · 437 unmodified lines
438438 return -EINVAL;
439439
440440 pt = dma_fence_to_sync_pt(fence);
441− if (!pt)
442− return -EINVAL;
441+ if (!pt) {
442+ ret = -EINVAL;
443+ goto put_fence;
444+ }
443445
444446 spin_lock_irqsave(fence->lock, flags);
445− if (test_bit(SW_SYNC_HAS_DEADLINE_BIT, &fence->flags)) {
446− data.deadline_ns = ktime_to_ns(pt->deadline);
447− } else {
447+ if (!test_bit(SW_SYNC_HAS_DEADLINE_BIT, &fence->flags)) {
448448 ret = -ENOENT;
449+ goto unlock;
449450 }
451+ data.deadline_ns = ktime_to_ns(pt->deadline);
450452 spin_unlock_irqrestore(fence->lock, flags);
451453
452454 dma_fence_put(fence);
@@ -458,6 +460,13 @@ static int sw_sync_ioctl_get_deadline(struct sync_timeline *obj, unsigned long a · 5 unmodified lines
458460 return -EFAULT;
459461
460462 return 0;
463+
464+unlock:
465+ spin_unlock_irqrestore(fence->lock, flags);
466+put_fence:
467+ dma_fence_put(fence);
468+
469+ return ret;
461470 }
462471
463472 static long sw_sync_ioctl(struct file *file, unsigned int cmd,
drivers/dma-buf/udmabuf.c+1−1
@@ -393,7 +393,7 @@ static long udmabuf_create(struct miscdevice *device, · 392 unmodified lines
393393 if (!ubuf)
394394 return -ENOMEM;
395395
396− pglimit = (size_limit_mb * 1024 * 1024) >> PAGE_SHIFT;
396+ pglimit = ((u64)size_limit_mb * 1024 * 1024) >> PAGE_SHIFT;
397397 for (i = 0; i < head->count; i++) {
398398 pgoff_t subpgcnt;
399399
drivers/dma/amd/ptdma/ptdma-dmaengine.c+10−9
@@ -342,6 +342,9 @@ static void pt_cmd_callback_work(void *data, int err) · 341 unmodified lines
342342 struct pt_dma_chan *chan;
343343 unsigned long flags;
344344
345+ if (!desc)
346+ return;
347+
345348 dma_chan = desc->vd.tx.chan;
346349 chan = to_pt_chan(dma_chan);
347350
@@ -355,16 +358,14 @@ static void pt_cmd_callback_work(void *data, int err) · 7 unmodified lines
355358 desc->status = DMA_ERROR;
356359
357360 spin_lock_irqsave(&chan->vc.lock, flags);
358− if (desc) {
359− if (desc->status != DMA_COMPLETE) {
360− if (desc->status != DMA_ERROR)
361− desc->status = DMA_COMPLETE;
361+ if (desc->status != DMA_COMPLETE) {
362+ if (desc->status != DMA_ERROR)
363+ desc->status = DMA_COMPLETE;
362364
363− dma_cookie_complete(tx_desc);
364− dma_descriptor_unmap(tx_desc);
365− } else {
366− tx_desc = NULL;
367− }
365+ dma_cookie_complete(tx_desc);
366+ dma_descriptor_unmap(tx_desc);
367+ } else {
368+ tx_desc = NULL;
368369 }
369370 spin_unlock_irqrestore(&chan->vc.lock, flags);
370371
drivers/dma/dmatest.c+3−3
@@ -841,9 +841,9 @@ static int dmatest_func(void *data) · 840 unmodified lines
841841 } else {
842842 dma_async_issue_pending(chan);
843843
844− wait_event_timeout(thread->done_wait,
845− done->done,
846− msecs_to_jiffies(params->timeout));
844+ wait_event_freezable_timeout(thread->done_wait,
845+ done->done,
846+ msecs_to_jiffies(params->timeout));
847847
848848 status = dma_async_is_tx_complete(chan, cookie, NULL,
849849 NULL);
drivers/dma/fsl-edma-main.c+1−1
@@ -57,7 +57,7 @@ static irqreturn_t fsl_edma3_tx_handler(int irq, void *dev_id) · 56 unmodified lines
5757
5858 intr = edma_readl_chreg(fsl_chan, ch_int);
5959 if (!intr)
60− return IRQ_HANDLED;
60+ return IRQ_NONE;
6161
6262 edma_writel_chreg(fsl_chan, 1, ch_int);
6363
drivers/dma/idxd/cdev.c+11−2
@@ -222,7 +222,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp) · 221 unmodified lines
222222 struct idxd_wq *wq;
223223 struct device *dev, *fdev;
224224 int rc = 0;
225− struct iommu_sva *sva;
225+ struct iommu_sva *sva = NULL;
226226 unsigned int pasid;
227227 struct idxd_cdev *idxd_cdev;
228228
@@ -317,7 +317,7 @@ failed_set_pasid: · 88 unmodified lines
317317 if (device_user_pasid_enabled(idxd))
318318 idxd_xa_pasid_remove(ctx);
319319 failed_get_pasid:
320− if (device_user_pasid_enabled(idxd))
320+ if (device_user_pasid_enabled(idxd) && !IS_ERR_OR_NULL(sva))
321321 iommu_sva_unbind_device(sva);
322322 failed:
323323 mutex_unlock(&wq->wq_lock);
@@ -407,6 +407,9 @@ static int idxd_cdev_mmap(struct file *filp, struct vm_area_struct *vma) · 83 unmodified lines
407407 if (!idxd->user_submission_safe && !capable(CAP_SYS_RAWIO))
408408 return -EPERM;
409409
410+ if (current->mm != ctx->mm)
411+ return -EPERM;
412+
410413 rc = check_vma(wq, vma, __func__);
411414 if (rc < 0)
412415 return rc;
@@ -473,6 +476,9 @@ static ssize_t idxd_cdev_write(struct file *filp, const char __user *buf, size_t · 60 unmodified lines
473476 ssize_t written = 0;
474477 int i;
475478
479+ if (current->mm != ctx->mm)
480+ return -EPERM;
481+
476482 for (i = 0; i < len/sizeof(struct dsa_hw_desc); i++) {
477483 int rc = idxd_submit_user_descriptor(ctx, udesc + i);
478484
@@ -493,6 +499,9 @@ static __poll_t idxd_cdev_poll(struct file *filp, · 14 unmodified lines
493499 struct idxd_device *idxd = wq->idxd;
494500 __poll_t out = 0;
495501
502+ if (current->mm != ctx->mm)
503+ return POLLNVAL;
504+
496505 poll_wait(filp, &wq->err_queue, wait);
497506 spin_lock(&idxd->dev_lock);
498507 if (idxd->sw_err.valid)
drivers/dma/idxd/init.c+113−46
@@ -155,6 +155,25 @@ static void idxd_cleanup_interrupts(struct idxd_device *idxd) · 154 unmodified lines
155155 pci_free_irq_vectors(pdev);
156156 }
157157
158+static void idxd_clean_wqs(struct idxd_device *idxd)
159+{
160+ struct idxd_wq *wq;
161+ struct device *conf_dev;
162+ int i;
163+
164+ for (i = 0; i < idxd->max_wqs; i++) {
165+ wq = idxd->wqs[i];
166+ if (idxd->hw.wq_cap.op_config)
167+ bitmap_free(wq->opcap_bmap);
168+ kfree(wq->wqcfg);
169+ conf_dev = wq_confdev(wq);
170+ put_device(conf_dev);
171+ kfree(wq);
172+ }
173+ bitmap_free(idxd->wq_enable_map);
174+ kfree(idxd->wqs);
175+}
176+
158177 static int idxd_setup_wqs(struct idxd_device *idxd)
159178 {
160179 struct device *dev = &idxd->pdev->dev;
@@ -169,8 +188,8 @@ static int idxd_setup_wqs(struct idxd_device *idxd) · 8 unmodified lines
169188
170189 idxd->wq_enable_map = bitmap_zalloc_node(idxd->max_wqs, GFP_KERNEL, dev_to_node(dev));
171190 if (!idxd->wq_enable_map) {
172− kfree(idxd->wqs);
173− return -ENOMEM;
191+ rc = -ENOMEM;
192+ goto err_bitmap;
174193 }
175194
176195 for (i = 0; i < idxd->max_wqs; i++) {
@@ -189,10 +208,8 @@ static int idxd_setup_wqs(struct idxd_device *idxd) · 12 unmodified lines
189208 conf_dev->bus = &dsa_bus_type;
190209 conf_dev->type = &idxd_wq_device_type;
191210 rc = dev_set_name(conf_dev, "wq%d.%d", idxd->id, wq->id);
192− if (rc < 0) {
193− put_device(conf_dev);
211+ if (rc < 0)
194212 goto err;
195− }
196213
197214 mutex_init(&wq->wq_lock);
198215 init_waitqueue_head(&wq->err_queue);
@@ -203,7 +220,6 @@ static int idxd_setup_wqs(struct idxd_device *idxd) · 4 unmodified lines
203220 wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES;
204221 wq->wqcfg = kzalloc_node(idxd->wqcfg_size, GFP_KERNEL, dev_to_node(dev));
205222 if (!wq->wqcfg) {
206− put_device(conf_dev);
207223 rc = -ENOMEM;
208224 goto err;
209225 }
@@ -211,9 +227,8 @@ static int idxd_setup_wqs(struct idxd_device *idxd) · 1 unmodified line
211227 if (idxd->hw.wq_cap.op_config) {
212228 wq->opcap_bmap = bitmap_zalloc(IDXD_MAX_OPCAP_BITS, GFP_KERNEL);
213229 if (!wq->opcap_bmap) {
214− put_device(conf_dev);
215230 rc = -ENOMEM;
216− goto err;
231+ goto err_opcap_bmap;
217232 }
218233 bitmap_copy(wq->opcap_bmap, idxd->opcap_bmap, IDXD_MAX_OPCAP_BITS);
219234 }
@@ -224,15 +239,46 @@ static int idxd_setup_wqs(struct idxd_device *idxd) · 4 unmodified lines
224239
225240 return 0;
226241
227− err:
242+err_opcap_bmap:
243+ kfree(wq->wqcfg);
244+
245+err:
246+ put_device(conf_dev);
247+ kfree(wq);
248+
228249 while (--i >= 0) {
229250 wq = idxd->wqs[i];
251+ if (idxd->hw.wq_cap.op_config)
252+ bitmap_free(wq->opcap_bmap);
253+ kfree(wq->wqcfg);
230254 conf_dev = wq_confdev(wq);
231255 put_device(conf_dev);
256+ kfree(wq);
257+
232258 }
259+ bitmap_free(idxd->wq_enable_map);
260+
261+err_bitmap:
262+ kfree(idxd->wqs);
263+
233264 return rc;
234265 }
235266
267+static void idxd_clean_engines(struct idxd_device *idxd)
268+{
269+ struct idxd_engine *engine;
270+ struct device *conf_dev;
271+ int i;
272+
273+ for (i = 0; i < idxd->max_engines; i++) {
274+ engine = idxd->engines[i];
275+ conf_dev = engine_confdev(engine);
276+ put_device(conf_dev);
277+ kfree(engine);
278+ }
279+ kfree(idxd->engines);
280+}
281+
236282 static int idxd_setup_engines(struct idxd_device *idxd)
237283 {
238284 struct idxd_engine *engine;
@@ -263,6 +309,7 @@ static int idxd_setup_engines(struct idxd_device *idxd) · 24 unmodified lines
263309 rc = dev_set_name(conf_dev, "engine%d.%d", idxd->id, engine->id);
264310 if (rc < 0) {
265311 put_device(conf_dev);
312+ kfree(engine);
266313 goto err;
267314 }
268315
@@ -276,10 +323,26 @@ static int idxd_setup_engines(struct idxd_device *idxd) · 7 unmodified lines
276323 engine = idxd->engines[i];
277324 conf_dev = engine_confdev(engine);
278325 put_device(conf_dev);
326+ kfree(engine);
279327 }
328+ kfree(idxd->engines);
329+
280330 return rc;
281331 }
282332
333+static void idxd_clean_groups(struct idxd_device *idxd)
334+{
335+ struct idxd_group *group;
336+ int i;
337+
338+ for (i = 0; i < idxd->max_groups; i++) {
339+ group = idxd->groups[i];
340+ put_device(group_confdev(group));
341+ kfree(group);
342+ }
343+ kfree(idxd->groups);
344+}
345+
283346 static int idxd_setup_groups(struct idxd_device *idxd)
284347 {
285348 struct device *dev = &idxd->pdev->dev;
@@ -310,6 +373,7 @@ static int idxd_setup_groups(struct idxd_device *idxd) · 24 unmodified lines
310373 rc = dev_set_name(conf_dev, "group%d.%d", idxd->id, group->id);
311374 if (rc < 0) {
312375 put_device(conf_dev);
376+ kfree(group);
313377 goto err;
314378 }
315379
@@ -334,20 +398,18 @@ static int idxd_setup_groups(struct idxd_device *idxd) · 18 unmodified lines
334398 while (--i >= 0) {
335399 group = idxd->groups[i];
336400 put_device(group_confdev(group));
401+ kfree(group);
337402 }
403+ kfree(idxd->groups);
404+
338405 return rc;
339406 }
340407
341408 static void idxd_cleanup_internals(struct idxd_device *idxd)
342409 {
343− int i;
344−
345− for (i = 0; i < idxd->max_groups; i++)
346− put_device(group_confdev(idxd->groups[i]));
347− for (i = 0; i < idxd->max_engines; i++)
348− put_device(engine_confdev(idxd->engines[i]));
349− for (i = 0; i < idxd->max_wqs; i++)
350− put_device(wq_confdev(idxd->wqs[i]));
410+ idxd_clean_groups(idxd);
411+ idxd_clean_engines(idxd);
412+ idxd_clean_wqs(idxd);
351413 destroy_workqueue(idxd->wq);
352414 }
353415
@@ -390,7 +452,7 @@ static int idxd_init_evl(struct idxd_device *idxd) · 36 unmodified lines
390452 static int idxd_setup_internals(struct idxd_device *idxd)
391453 {
392454 struct device *dev = &idxd->pdev->dev;
393− int rc, i;
455+ int rc;
394456
395457 init_waitqueue_head(&idxd->cmd_waitq);
396458
@@ -421,14 +483,11 @@ static int idxd_setup_internals(struct idxd_device *idxd) · 24 unmodified lines
421483 err_evl:
422484 destroy_workqueue(idxd->wq);
423485 err_wkq_create:
424− for (i = 0; i < idxd->max_groups; i++)
425− put_device(group_confdev(idxd->groups[i]));
486+ idxd_clean_groups(idxd);
426487 err_group:
427− for (i = 0; i < idxd->max_engines; i++)
428− put_device(engine_confdev(idxd->engines[i]));
488+ idxd_clean_engines(idxd);
429489 err_engine:
430− for (i = 0; i < idxd->max_wqs; i++)
431− put_device(wq_confdev(idxd->wqs[i]));
490+ idxd_clean_wqs(idxd);
432491 err_wqs:
433492 return rc;
434493 }
@@ -528,6 +587,17 @@ static void idxd_read_caps(struct idxd_device *idxd) · 93 unmodified lines
528587 idxd->hw.iaa_cap.bits = ioread64(idxd->reg_base + IDXD_IAACAP_OFFSET);
529588 }
530589
590+static void idxd_free(struct idxd_device *idxd)
591+{
592+ if (!idxd)
593+ return;
594+
595+ put_device(idxd_confdev(idxd));
596+ bitmap_free(idxd->opcap_bmap);
597+ ida_free(&idxd_ida, idxd->id);
598+ kfree(idxd);
599+}
600+
531601 static struct idxd_device *idxd_alloc(struct pci_dev *pdev, struct idxd_driver_data *data)
532602 {
533603 struct device *dev = &pdev->dev;
@@ -545,28 +615,34 @@ static struct idxd_device *idxd_alloc(struct pci_dev *pdev, struct idxd_driver_d · 11 unmodified lines
545615 idxd_dev_set_type(&idxd->idxd_dev, idxd->data->type);
546616 idxd->id = ida_alloc(&idxd_ida, GFP_KERNEL);
547617 if (idxd->id < 0)
548− return NULL;
618+ goto err_ida;
549619
550620 idxd->opcap_bmap = bitmap_zalloc_node(IDXD_MAX_OPCAP_BITS, GFP_KERNEL, dev_to_node(dev));
551− if (!idxd->opcap_bmap) {
552− ida_free(&idxd_ida, idxd->id);
553− return NULL;
554− }
621+ if (!idxd->opcap_bmap)
622+ goto err_opcap;
555623
556624 device_initialize(conf_dev);
557625 conf_dev->parent = dev;
558626 conf_dev->bus = &dsa_bus_type;
559627 conf_dev->type = idxd->data->dev_type;
560628 rc = dev_set_name(conf_dev, "%s%d", idxd->data->name_prefix, idxd->id);
561− if (rc < 0) {
562− put_device(conf_dev);
563− return NULL;
564− }
629+ if (rc < 0)
630+ goto err_name;
565631
566632 spin_lock_init(&idxd->dev_lock);
567633 spin_lock_init(&idxd->cmd_lock);
568634
569635 return idxd;
636+
637+err_name:
638+ put_device(conf_dev);
639+ bitmap_free(idxd->opcap_bmap);
640+err_opcap:
641+ ida_free(&idxd_ida, idxd->id);
642+err_ida:
643+ kfree(idxd);
644+
645+ return NULL;
570646 }
571647
572648 static int idxd_enable_system_pasid(struct idxd_device *idxd)
@@ -1190,7 +1266,7 @@ int idxd_pci_probe_alloc(struct idxd_device *idxd, struct pci_dev *pdev, · 617 unmodified lines
11901266 err:
11911267 pci_iounmap(pdev, idxd->reg_base);
11921268 err_iomap:
1193− put_device(idxd_confdev(idxd));
1269+ idxd_free(idxd);
11941270 err_idxd_alloc:
11951271 pci_disable_device(pdev);
11961272 return rc;
@@ -1232,7 +1308,6 @@ static void idxd_shutdown(struct pci_dev *pdev) · 35 unmodified lines
12321308 static void idxd_remove(struct pci_dev *pdev)
12331309 {
12341310 struct idxd_device *idxd = pci_get_drvdata(pdev);
1235− struct idxd_irq_entry *irq_entry;
12361311
12371312 idxd_unregister_devices(idxd);
12381313 /*
@@ -1245,20 +1320,12 @@ static void idxd_remove(struct pci_dev *pdev) · 6 unmodified lines
12451320 get_device(idxd_confdev(idxd));
12461321 device_unregister(idxd_confdev(idxd));
12471322 idxd_shutdown(pdev);
1248− if (device_pasid_enabled(idxd))
1249− idxd_disable_system_pasid(idxd);
12501323 idxd_device_remove_debugfs(idxd);
1251−
1252− irq_entry = idxd_get_ie(idxd, 0);
1253− free_irq(irq_entry->vector, irq_entry);
1254− pci_free_irq_vectors(pdev);
1324+ idxd_cleanup(idxd);
12551325 pci_iounmap(pdev, idxd->reg_base);
1256− if (device_user_pasid_enabled(idxd))
1257− idxd_disable_sva(pdev);
1258− pci_disable_device(pdev);
1259− destroy_workqueue(idxd->wq);
1260− perfmon_pmu_remove(idxd);
12611326 put_device(idxd_confdev(idxd));
1327+ idxd_free(idxd);
1328+ pci_disable_device(pdev);
12621329 }
12631330
12641331 static struct pci_driver idxd_pci_driver = {
drivers/dma/mediatek/mtk-cqdma.c+2−4
@@ -420,15 +420,11 @@ static struct virt_dma_desc *mtk_cqdma_find_active_desc(struct dma_chan *c, · 419 unmodified lines
420420 {
421421 struct mtk_cqdma_vchan *cvc = to_cqdma_vchan(c);
422422 struct virt_dma_desc *vd;
423− unsigned long flags;
424423
425− spin_lock_irqsave(&cvc->pc->lock, flags);
426424 list_for_each_entry(vd, &cvc->pc->queue, node)
427425 if (vd->tx.cookie == cookie) {
428− spin_unlock_irqrestore(&cvc->pc->lock, flags);
429426 return vd;
430427 }
431− spin_unlock_irqrestore(&cvc->pc->lock, flags);
432428
433429 list_for_each_entry(vd, &cvc->vc.desc_issued, node)
434430 if (vd->tx.cookie == cookie)
@@ -452,9 +448,11 @@ static enum dma_status mtk_cqdma_tx_status(struct dma_chan *c, · 17 unmodified lines
452448 if (ret == DMA_COMPLETE || !txstate)
453449 return ret;
454450
451+ spin_lock_irqsave(&cvc->pc->lock, flags);
455452 spin_lock_irqsave(&cvc->vc.lock, flags);
456453 vd = mtk_cqdma_find_active_desc(c, cookie);
457454 spin_unlock_irqrestore(&cvc->vc.lock, flags);
455+ spin_unlock_irqrestore(&cvc->pc->lock, flags);
458456
459457 if (vd) {
460458 cvd = to_cqdma_vdesc(vd);
drivers/dma/ti/k3-udma.c+8−2
@@ -1091,8 +1091,11 @@ static void udma_check_tx_completion(struct work_struct *work) · 1090 unmodified lines
10911091 u32 residue_diff;
10921092 ktime_t time_diff;
10931093 unsigned long delay;
1094+ unsigned long flags;
10941095
10951096 while (1) {
1097+ spin_lock_irqsave(&uc->vc.lock, flags);
1098+
10961099 if (uc->desc) {
10971100 /* Get previous residue and time stamp */
10981101 residue_diff = uc->tx_drain.residue;
@@ -1127,6 +1130,8 @@ static void udma_check_tx_completion(struct work_struct *work) · 28 unmodified lines
11271130 break;
11281131 }
11291132
1133+ spin_unlock_irqrestore(&uc->vc.lock, flags);
1134+
11301135 usleep_range(ktime_to_us(delay),
11311136 ktime_to_us(delay) + 10);
11321137 continue;
@@ -1143,6 +1148,8 @@ static void udma_check_tx_completion(struct work_struct *work) · 10 unmodified lines
11431148
11441149 break;
11451150 }
1151+
1152+ spin_unlock_irqrestore(&uc->vc.lock, flags);
11461153 }
11471154
11481155 static irqreturn_t udma_ring_irq_handler(int irq, void *data)
@@ -4246,7 +4253,6 @@ static struct dma_chan *udma_of_xlate(struct of_phandle_args *dma_spec, · 3097 unmodified lines
42464253 struct of_dma *ofdma)
42474254 {
42484255 struct udma_dev *ud = ofdma->of_dma_data;
4249− dma_cap_mask_t mask = ud->ddev.cap_mask;
42504256 struct udma_filter_param filter_param;
42514257 struct dma_chan *chan;
42524258
@@ -4278,7 +4284,7 @@ static struct dma_chan *udma_of_xlate(struct of_phandle_args *dma_spec, · 25 unmodified lines
42784284 }
42794285 }
42804286
4281− chan = __dma_request_channel(&mask, udma_dma_filter_fn, &filter_param,
4287+ chan = __dma_request_channel(&ud->ddev.cap_mask, udma_dma_filter_fn, &filter_param,
42824288 ofdma->of_node);
42834289 if (!chan) {
42844290 dev_err(ud->dev, "get channel fail in %s.\n", __func__);
drivers/edac/altera_edac.c+5−4
@@ -99,7 +99,7 @@ static irqreturn_t altr_sdram_mc_err_handler(int irq, void *dev_id) · 98 unmodified lines
9999 if (status & priv->ecc_stat_ce_mask) {
100100 regmap_read(drvdata->mc_vbase, priv->ecc_saddr_offset,
101101 &err_addr);
102− if (priv->ecc_uecnt_offset)
102+ if (priv->ecc_cecnt_offset)
103103 regmap_read(drvdata->mc_vbase, priv->ecc_cecnt_offset,
104104 &err_count);
105105 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, err_count,
@@ -1005,9 +1005,6 @@ altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask, · 899 unmodified lines
10051005 }
10061006 }
10071007
1008− /* Interrupt mode set to every SBERR */
1009− regmap_write(ecc_mgr_map, ALTR_A10_ECC_INTMODE_OFST,
1010− ALTR_A10_ECC_INTMODE);
10111008 /* Enable ECC */
10121009 ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base +
10131010 ALTR_A10_ECC_CTRL_OFST));
@@ -2127,6 +2124,10 @@ static int altr_edac_a10_probe(struct platform_device *pdev) · 1113 unmodified lines
21272124 return PTR_ERR(edac->ecc_mgr_map);
21282125 }
21292126
2127+ /* Set irq mask for DDR SBE to avoid any pending irq before registration */
2128+ regmap_write(edac->ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST,
2129+ (A10_SYSMGR_ECC_INTMASK_SDMMCB | A10_SYSMGR_ECC_INTMASK_DDR0));
2130+
21302131 edac->irq_chip.name = pdev->dev.of_node->name;
21312132 edac->irq_chip.irq_mask = a10_eccmgr_irq_mask;
21322133 edac->irq_chip.irq_unmask = a10_eccmgr_irq_unmask;
drivers/edac/altera_edac.h+2−0
@@ -249,6 +249,8 @@ struct altr_sdram_mc_data { · 248 unmodified lines
249249 #define A10_SYSMGR_ECC_INTMASK_SET_OFST 0x94
250250 #define A10_SYSMGR_ECC_INTMASK_CLR_OFST 0x98
251251 #define A10_SYSMGR_ECC_INTMASK_OCRAM BIT(1)
252+#define A10_SYSMGR_ECC_INTMASK_SDMMCB BIT(16)
253+#define A10_SYSMGR_ECC_INTMASK_DDR0 BIT(17)
252254
253255 #define A10_SYSMGR_ECC_INTSTAT_SERR_OFST 0x9C
254256 #define A10_SYSMGR_ECC_INTSTAT_DERR_OFST 0xA0
drivers/firmware/arm_ffa/driver.c+2−1
@@ -299,7 +299,8 @@ __ffa_partition_info_get(u32 uuid0, u32 uuid1, u32 uuid2, u32 uuid3, · 298 unmodified lines
299299 import_uuid(&buf->uuid, (u8 *)&rx_buf->uuid);
300300 }
301301
302− ffa_rx_release();
302+ if (!(flags & PARTITION_INFO_GET_RETURN_COUNT_ONLY))
303+ ffa_rx_release();
303304
304305 mutex_unlock(&drv_info->rx_lock);
305306
drivers/firmware/arm_scmi/bus.c+3−0
@@ -255,6 +255,9 @@ static struct scmi_device *scmi_child_dev_find(struct device *parent, · 254 unmodified lines
255255 if (!dev)
256256 return NULL;
257257
258+ /* Drop the refcnt bumped implicitly by device_find_child */
259+ put_device(dev);
260+
258261 return to_scmi_dev(dev);
259262 }
260263
drivers/firmware/arm_scmi/driver.c+8−5
@@ -1248,7 +1248,8 @@ static void xfer_put(const struct scmi_protocol_handle *ph, · 1247 unmodified lines
12481248 }
12491249
12501250 static bool scmi_xfer_done_no_timeout(struct scmi_chan_info *cinfo,
1251− struct scmi_xfer *xfer, ktime_t stop)
1251+ struct scmi_xfer *xfer, ktime_t stop,
1252+ bool *ooo)
12521253 {
12531254 struct scmi_info *info = handle_to_scmi_info(cinfo->handle);
12541255
@@ -1257,7 +1258,7 @@ static bool scmi_xfer_done_no_timeout(struct scmi_chan_info *cinfo, · 2 unmodified lines
12571258 * in case of out-of-order receptions of delayed responses
12581259 */
12591260 return info->desc->ops->poll_done(cinfo, xfer) ||
1260− try_wait_for_completion(&xfer->done) ||
1261+ (*ooo = try_wait_for_completion(&xfer->done)) ||
12611262 ktime_after(ktime_get(), stop);
12621263 }
12631264
@@ -1274,15 +1275,17 @@ static int scmi_wait_for_reply(struct device *dev, const struct scmi_desc *desc, · 10 unmodified lines
12741275 * itself to support synchronous commands replies.
12751276 */
12761277 if (!desc->sync_cmds_completed_on_ret) {
1278+ bool ooo = false;
1279+
12771280 /*
12781281 * Poll on xfer using transport provided .poll_done();
12791282 * assumes no completion interrupt was available.
12801283 */
12811284 ktime_t stop = ktime_add_ms(ktime_get(), timeout_ms);
12821285
1283− spin_until_cond(scmi_xfer_done_no_timeout(cinfo,
1284− xfer, stop));
1285− if (ktime_after(ktime_get(), stop)) {
1286+ spin_until_cond(scmi_xfer_done_no_timeout(cinfo, xfer,
1287+ stop, &ooo));
1288+ if (!ooo && !info->desc->ops->poll_done(cinfo, xfer)) {
12861289 dev_err(dev,
12871290 "timed out in resp(caller: %pS) - polling\n",
12881291 (void *)_RET_IP_);
drivers/firmware/cirrus/Kconfig+1−4
@@ -6,14 +6,11 @@ config FW_CS_DSP · 5 unmodified lines
66
77 config FW_CS_DSP_KUNIT_TEST_UTILS
88 tristate
9− depends on KUNIT && REGMAP
10− select FW_CS_DSP
119
1210 config FW_CS_DSP_KUNIT_TEST
1311 tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS
14− depends on KUNIT && REGMAP
12+ depends on KUNIT && REGMAP && FW_CS_DSP
1513 default KUNIT_ALL_TESTS
16− select FW_CS_DSP
1714 select FW_CS_DSP_KUNIT_TEST_UTILS
1815 help
1916 This builds KUnit tests for cs_dsp.
drivers/firmware/cirrus/test/cs_dsp_mock_mem_maps.c+0−30
@@ -461,36 +461,6 @@ unsigned int cs_dsp_mock_xm_header_get_alg_base_in_words(struct cs_dsp_test *pri · 460 unmodified lines
461461 }
462462 EXPORT_SYMBOL_NS_GPL(cs_dsp_mock_xm_header_get_alg_base_in_words, "FW_CS_DSP_KUNIT_TEST_UTILS");
463463
464−/**
465− * cs_dsp_mock_xm_header_get_fw_version_from_regmap() - Firmware version.
466− *
467− * @priv: Pointer to struct cs_dsp_test.
468− *
469− * Return: Firmware version word value.
470− */
471−unsigned int cs_dsp_mock_xm_header_get_fw_version_from_regmap(struct cs_dsp_test *priv)
472−{
473− unsigned int xm = cs_dsp_mock_base_addr_for_mem(priv, WMFW_ADSP2_XM);
474− union {
475− struct wmfw_id_hdr adsp2;
476− struct wmfw_v3_id_hdr halo;
477− } hdr;
478−
479− switch (priv->dsp->type) {
480− case WMFW_ADSP2:
481− regmap_raw_read(priv->dsp->regmap, xm, &hdr.adsp2, sizeof(hdr.adsp2));
482− return be32_to_cpu(hdr.adsp2.ver);
483− case WMFW_HALO:
484− regmap_raw_read(priv->dsp->regmap, xm, &hdr.halo, sizeof(hdr.halo));
485− return be32_to_cpu(hdr.halo.ver);
486− default:
487− KUNIT_FAIL(priv->test, NULL);
488− return 0;
489− }
490−}
491−EXPORT_SYMBOL_NS_GPL(cs_dsp_mock_xm_header_get_fw_version_from_regmap,
492− "FW_CS_DSP_KUNIT_TEST_UTILS");
493−
494464 /**
495465 * cs_dsp_mock_xm_header_get_fw_version() - Firmware version.
496466 *
drivers/firmware/cirrus/test/cs_dsp_test_bin.c+1−1
@@ -2198,7 +2198,7 @@ static int cs_dsp_bin_test_common_init(struct kunit *test, struct cs_dsp *dsp) · 2197 unmodified lines
21982198
21992199 priv->local->bin_builder =
22002200 cs_dsp_mock_bin_init(priv, 1,
2201− cs_dsp_mock_xm_header_get_fw_version_from_regmap(priv));
2201+ cs_dsp_mock_xm_header_get_fw_version(xm_hdr));
22022202 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv->local->bin_builder);
22032203
22042204 /* We must provide a dummy wmfw to load */
drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c+1−1
@@ -451,7 +451,7 @@ static int cs_dsp_bin_err_test_common_init(struct kunit *test, struct cs_dsp *ds · 450 unmodified lines
451451
452452 local->bin_builder =
453453 cs_dsp_mock_bin_init(priv, 1,
454− cs_dsp_mock_xm_header_get_fw_version_from_regmap(priv));
454+ cs_dsp_mock_xm_header_get_fw_version(local->xm_header));
455455 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, local->bin_builder);
456456
457457 /* Init cs_dsp */
drivers/firmware/samsung/exynos-acpm.c+30−14
@@ -184,6 +184,29 @@ struct acpm_match_data { · 183 unmodified lines
184184 #define client_to_acpm_chan(c) container_of(c, struct acpm_chan, cl)
185185 #define handle_to_acpm_info(h) container_of(h, struct acpm_info, handle)
186186
187+/**
188+ * acpm_get_saved_rx() - get the response if it was already saved.
189+ * @achan: ACPM channel info.
190+ * @xfer: reference to the transfer to get response for.
191+ * @tx_seqnum: xfer TX sequence number.
192+ */
193+static void acpm_get_saved_rx(struct acpm_chan *achan,
194+ const struct acpm_xfer *xfer, u32 tx_seqnum)
195+{
196+ const struct acpm_rx_data *rx_data = &achan->rx_data[tx_seqnum - 1];
197+ u32 rx_seqnum;
198+
199+ if (!rx_data->response)
200+ return;
201+
202+ rx_seqnum = FIELD_GET(ACPM_PROTOCOL_SEQNUM, rx_data->cmd[0]);
203+
204+ if (rx_seqnum == tx_seqnum) {
205+ memcpy(xfer->rxd, rx_data->cmd, xfer->rxlen);
206+ clear_bit(rx_seqnum - 1, achan->bitmap_seqnum);
207+ }
208+}
209+
187210 /**
188211 * acpm_get_rx() - get response from RX queue.
189212 * @achan: ACPM channel info.
@@ -204,15 +227,16 @@ static int acpm_get_rx(struct acpm_chan *achan, const struct acpm_xfer *xfer) · 14 unmodified lines
204227 rx_front = readl(achan->rx.front);
205228 i = readl(achan->rx.rear);
206229
207− /* Bail out if RX is empty. */
208− if (i == rx_front)
230+ tx_seqnum = FIELD_GET(ACPM_PROTOCOL_SEQNUM, xfer->txd[0]);
231+
232+ if (i == rx_front) {
233+ acpm_get_saved_rx(achan, xfer, tx_seqnum);
209234 return 0;
235+ }
210236
211237 base = achan->rx.base;
212238 mlen = achan->mlen;
213239
214− tx_seqnum = FIELD_GET(ACPM_PROTOCOL_SEQNUM, xfer->txd[0]);
215−
216240 /* Drain RX queue. */
217241 do {
218242 /* Read RX seqnum. */
@@ -259,16 +283,8 @@ static int acpm_get_rx(struct acpm_chan *achan, const struct acpm_xfer *xfer) · 40 unmodified lines
259283 * If the response was not in this iteration of the queue, check if the
260284 * RX data was previously saved.
261285 */
262− rx_data = &achan->rx_data[tx_seqnum - 1];
263− if (!rx_set && rx_data->response) {
264− rx_seqnum = FIELD_GET(ACPM_PROTOCOL_SEQNUM,
265− rx_data->cmd[0]);
266−
267− if (rx_seqnum == tx_seqnum) {
268− memcpy(xfer->rxd, rx_data->cmd, xfer->rxlen);
269− clear_bit(rx_seqnum - 1, achan->bitmap_seqnum);
270− }
271− }
286+ if (!rx_set)
287+ acpm_get_saved_rx(achan, xfer, tx_seqnum);
272288
273289 return 0;
274290 }
drivers/firmware/smccc/kvm_guest.c+2−2
@@ -95,7 +95,7 @@ void __init kvm_arm_target_impl_cpu_init(void) · 94 unmodified lines
9595
9696 for (i = 0; i < max_cpus; i++) {
9797 arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_DISCOVER_IMPL_CPUS_FUNC_ID,
98− i, &res);
98+ i, 0, 0, &res);
9999 if (res.a0 != SMCCC_RET_SUCCESS) {
100100 pr_warn("Discovering target implementation CPUs failed\n");
101101 goto mem_free;
@@ -103,7 +103,7 @@ void __init kvm_arm_target_impl_cpu_init(void) · 1 unmodified line
103103 target[i].midr = res.a1;
104104 target[i].revidr = res.a2;
105105 target[i].aidr = res.a3;
106− };
106+ }
107107
108108 if (!cpu_errata_set_target_impl(max_cpus, target)) {
109109 pr_warn("Failed to set target implementation CPUs\n");
drivers/firmware/stratix10-svc.c+11−3
@@ -1224,22 +1224,28 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) · 1223 unmodified lines
12241224 if (!svc->intel_svc_fcs) {
12251225 dev_err(dev, "failed to allocate %s device\n", INTEL_FCS);
12261226 ret = -ENOMEM;
1227− goto err_unregister_dev;
1227+ goto err_unregister_rsu_dev;
12281228 }
12291229
12301230 ret = platform_device_add(svc->intel_svc_fcs);
12311231 if (ret) {
12321232 platform_device_put(svc->intel_svc_fcs);
1233− goto err_unregister_dev;
1233+ goto err_unregister_rsu_dev;
12341234 }
12351235
1236+ ret = of_platform_default_populate(dev_of_node(dev), NULL, dev);
1237+ if (ret)
1238+ goto err_unregister_fcs_dev;
1239+
12361240 dev_set_drvdata(dev, svc);
12371241
12381242 pr_info("Intel Service Layer Driver Initialized\n");
12391243
12401244 return 0;
12411245
1242−err_unregister_dev:
1246+err_unregister_fcs_dev:
1247+ platform_device_unregister(svc->intel_svc_fcs);
1248+err_unregister_rsu_dev:
12431249 platform_device_unregister(svc->stratix10_svc_rsu);
12441250 err_free_kfifo:
12451251 kfifo_free(&controller->svc_fifo);
@@ -1253,6 +1259,8 @@ static void stratix10_svc_drv_remove(struct platform_device *pdev) · 7 unmodified lines
12531259 struct stratix10_svc *svc = dev_get_drvdata(&pdev->dev);
12541260 struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
12551261
1262+ of_platform_depopulate(ctrl->dev);
1263+
12561264 platform_device_unregister(svc->intel_svc_fcs);
12571265 platform_device_unregister(svc->stratix10_svc_rsu);
12581266
drivers/fpga/tests/fpga-bridge-test.c+1−0
@@ -170,4 +170,5 @@ static struct kunit_suite fpga_bridge_suite = { · 169 unmodified lines
170170
171171 kunit_test_suite(fpga_bridge_suite);
172172
173+MODULE_DESCRIPTION("KUnit test for the FPGA Bridge");
173174 MODULE_LICENSE("GPL");
drivers/fpga/tests/fpga-mgr-test.c+1−0
@@ -330,4 +330,5 @@ static struct kunit_suite fpga_mgr_suite = { · 329 unmodified lines
330330
331331 kunit_test_suite(fpga_mgr_suite);
332332
333+MODULE_DESCRIPTION("KUnit test for the FPGA Manager");
333334 MODULE_LICENSE("GPL");
drivers/fpga/tests/fpga-region-test.c+1−0
@@ -214,4 +214,5 @@ static struct kunit_suite fpga_region_suite = { · 213 unmodified lines
214214
215215 kunit_test_suite(fpga_region_suite);
216216
217+MODULE_DESCRIPTION("KUnit test for the FPGA Region");
217218 MODULE_LICENSE("GPL");
drivers/fwctl/main.c+1−1
@@ -105,7 +105,7 @@ static int fwctl_cmd_rpc(struct fwctl_ucmd *ucmd) · 104 unmodified lines
105105 if (!test_and_set_bit(0, &fwctl_tainted)) {
106106 dev_warn(
107107 &fwctl->dev,
108− "%s(%d): has requested full access to the physical device device",
108+ "%s(%d): has requested full access to the physical device",
109109 current->comm, task_pid_nr(current));
110110 add_taint(TAINT_FWCTL, LOCKDEP_STILL_OK);
111111 }
drivers/fwctl/pds/main.c+20−13
@@ -105,12 +105,14 @@ static int pdsfc_identify(struct pdsfc_dev *pdsfc) · 104 unmodified lines
105105 static void pdsfc_free_endpoints(struct pdsfc_dev *pdsfc)
106106 {
107107 struct device *dev = &pdsfc->fwctl.dev;
108+ u32 num_endpoints;
108109 int i;
109110
110111 if (!pdsfc->endpoints)
111112 return;
112113
113− for (i = 0; pdsfc->endpoint_info && i < pdsfc->endpoints->num_entries; i++)
114+ num_endpoints = le32_to_cpu(pdsfc->endpoints->num_entries);
115+ for (i = 0; pdsfc->endpoint_info && i < num_endpoints; i++)
114116 mutex_destroy(&pdsfc->endpoint_info[i].lock);
115117 vfree(pdsfc->endpoint_info);
116118 pdsfc->endpoint_info = NULL;
@@ -199,7 +201,7 @@ static int pdsfc_init_endpoints(struct pdsfc_dev *pdsfc) · 82 unmodified lines
199201 ep_entry = (struct pds_fwctl_query_data_endpoint *)pdsfc->endpoints->entries;
200202 for (i = 0; i < num_endpoints; i++) {
201203 mutex_init(&pdsfc->endpoint_info[i].lock);
202− pdsfc->endpoint_info[i].endpoint = ep_entry[i].id;
204+ pdsfc->endpoint_info[i].endpoint = le32_to_cpu(ep_entry[i].id);
203205 }
204206
205207 return 0;
@@ -214,6 +216,7 @@ static struct pds_fwctl_query_data *pdsfc_get_operations(struct pdsfc_dev *pdsfc · 8 unmodified lines
214216 struct pds_fwctl_query_data *data;
215217 union pds_core_adminq_cmd cmd;
216218 dma_addr_t data_pa;
219+ u32 num_entries;
217220 int err;
218221 int i;
219222
@@ -246,8 +249,9 @@ static struct pds_fwctl_query_data *pdsfc_get_operations(struct pdsfc_dev *pdsfc · 26 unmodified lines
246249 *pa = data_pa;
247250
248251 entries = (struct pds_fwctl_query_data_operation *)data->entries;
249− dev_dbg(dev, "num_entries %d\n", data->num_entries);
250− for (i = 0; i < data->num_entries; i++) {
252+ num_entries = le32_to_cpu(data->num_entries);
253+ dev_dbg(dev, "num_entries %d\n", num_entries);
254+ for (i = 0; i < num_entries; i++) {
251255
252256 /* Translate FW command attribute to fwctl scope */
253257 switch (entries[i].scope) {
@@ -267,7 +271,7 @@ static struct pds_fwctl_query_data *pdsfc_get_operations(struct pdsfc_dev *pdsfc · 13 unmodified lines
267271 break;
268272 }
269273 dev_dbg(dev, "endpoint %d operation: id %x scope %d\n",
270− ep, entries[i].id, entries[i].scope);
274+ ep, le32_to_cpu(entries[i].id), entries[i].scope);
271275 }
272276
273277 return data;
@@ -280,24 +284,26 @@ static int pdsfc_validate_rpc(struct pdsfc_dev *pdsfc, · 6 unmodified lines
280284 struct pds_fwctl_query_data_operation *op_entry;
281285 struct pdsfc_rpc_endpoint_info *ep_info = NULL;
282286 struct device *dev = &pdsfc->fwctl.dev;
287+ u32 num_entries;
283288 int i;
284289
285290 /* validate rpc in_len & out_len based
286291 * on ident.max_req_sz & max_resp_sz
287292 */
288− if (rpc->in.len > pdsfc->ident.max_req_sz) {
293+ if (rpc->in.len > le32_to_cpu(pdsfc->ident.max_req_sz)) {
289294 dev_dbg(dev, "Invalid request size %u, max %u\n",
290− rpc->in.len, pdsfc->ident.max_req_sz);
295+ rpc->in.len, le32_to_cpu(pdsfc->ident.max_req_sz));
291296 return -EINVAL;
292297 }
293298
294− if (rpc->out.len > pdsfc->ident.max_resp_sz) {
299+ if (rpc->out.len > le32_to_cpu(pdsfc->ident.max_resp_sz)) {
295300 dev_dbg(dev, "Invalid response size %u, max %u\n",
296− rpc->out.len, pdsfc->ident.max_resp_sz);
301+ rpc->out.len, le32_to_cpu(pdsfc->ident.max_resp_sz));
297302 return -EINVAL;
298303 }
299304
300− for (i = 0; i < pdsfc->endpoints->num_entries; i++) {
305+ num_entries = le32_to_cpu(pdsfc->endpoints->num_entries);
306+ for (i = 0; i < num_entries; i++) {
301307 if (pdsfc->endpoint_info[i].endpoint == rpc->in.ep) {
302308 ep_info = &pdsfc->endpoint_info[i];
303309 break;
@@ -326,8 +332,9 @@ static int pdsfc_validate_rpc(struct pdsfc_dev *pdsfc, · 22 unmodified lines
326332
327333 /* reject unsupported and/or out of scope commands */
328334 op_entry = (struct pds_fwctl_query_data_operation *)ep_info->operations->entries;
329− for (i = 0; i < ep_info->operations->num_entries; i++) {
330− if (PDS_FWCTL_RPC_OPCODE_CMP(rpc->in.op, op_entry[i].id)) {
335+ num_entries = le32_to_cpu(ep_info->operations->num_entries);
336+ for (i = 0; i < num_entries; i++) {
337+ if (PDS_FWCTL_RPC_OPCODE_CMP(rpc->in.op, le32_to_cpu(op_entry[i].id))) {
331338 if (scope < op_entry[i].scope)
332339 return -EPERM;
333340 return 0;
@@ -402,7 +409,7 @@ static void *pdsfc_fw_rpc(struct fwctl_uctx *uctx, enum fwctl_rpc_scope scope, · 68 unmodified lines
402409 cmd = (union pds_core_adminq_cmd) {
403410 .fwctl_rpc = {
404411 .opcode = PDS_FWCTL_CMD_RPC,
405− .flags = PDS_FWCTL_RPC_IND_REQ | PDS_FWCTL_RPC_IND_RESP,
412+ .flags = cpu_to_le16(PDS_FWCTL_RPC_IND_REQ | PDS_FWCTL_RPC_IND_RESP),
406413 .ep = cpu_to_le32(rpc->in.ep),
407414 .op = cpu_to_le32(rpc->in.op),
408415 .req_pa = cpu_to_le64(in_payload_dma_addr),
drivers/gpio/TODO+34−0
@@ -186,3 +186,37 @@ their hardware offsets within the chip. · 185 unmodified lines
186186
187187 Encourage users to switch to using them and eventually remove the existing
188188 global export/unexport attribues.
189+
190+-------------------------------------------------------------------------------
191+
192+Remove GPIOD_FLAGS_BIT_NONEXCLUSIVE
193+
194+GPIOs in the linux kernel are meant to be an exclusive resource. This means
195+that the GPIO descriptors (the software representation of the hardware concept)
196+are not reference counted and - in general - only one user at a time can
197+request a GPIO line and control its settings. The consumer API is designed
198+around full control of the line's state as evidenced by the fact that, for
199+instance, gpiod_set_value() does indeed drive the line as requested, instead
200+of bumping an enable counter of some sort.
201+
202+A problematic use-case for GPIOs is when two consumers want to use the same
203+descriptor independently. An example of such a user is the regulator subsystem
204+which may instantiate several struct regulator_dev instances containing
205+a struct device but using the same enable GPIO line.
206+
207+A workaround was introduced in the form of the GPIOD_FLAGS_BIT_NONEXCLUSIVE
208+flag but its implementation is problematic: it does not provide any
209+synchronization of usage nor did it introduce any enable count meaning the
210+non-exclusive users of the same descriptor will in fact "fight" for the
211+control over it. This flag should be removed and replaced with a better
212+solution, possibly based on the new power sequencing subsystem.
213+
214+-------------------------------------------------------------------------------
215+
216+Remove devm_gpiod_unhinge()
217+
218+devm_gpiod_unhinge() is provided as a way to transfer the ownership of managed
219+enable GPIOs to the regulator core. Rather than doing that however, we should
220+make it possible for the regulator subsystem to deal with GPIO resources the
221+lifetime of which it doesn't control as logically, a GPIO obtained by a caller
222+should also be freed by it.
drivers/gpio/gpio-mpc8xxx.c+3−1
@@ -410,7 +410,9 @@ static int mpc8xxx_probe(struct platform_device *pdev) · 409 unmodified lines
410410 goto err;
411411 }
412412
413− device_init_wakeup(dev, true);
413+ ret = devm_device_init_wakeup(dev);
414+ if (ret)
415+ return dev_err_probe(dev, ret, "Failed to init wakeup\n");
414416
415417 return 0;
416418 err:
drivers/gpio/gpio-pca953x.c+6−0
@@ -1204,6 +1204,8 @@ static int pca953x_restore_context(struct pca953x_chip *chip) · 1203 unmodified lines
12041204
12051205 guard(mutex)(&chip->i2c_lock);
12061206
1207+ if (chip->client->irq > 0)
1208+ enable_irq(chip->client->irq);
12071209 regcache_cache_only(chip->regmap, false);
12081210 regcache_mark_dirty(chip->regmap);
12091211 ret = pca953x_regcache_sync(chip);
@@ -1216,6 +1218,10 @@ static int pca953x_restore_context(struct pca953x_chip *chip) · 6 unmodified lines
12161218 static void pca953x_save_context(struct pca953x_chip *chip)
12171219 {
12181220 guard(mutex)(&chip->i2c_lock);
1221+
1222+ /* Disable IRQ to prevent early triggering while regmap "cache only" is on */
1223+ if (chip->client->irq > 0)
1224+ disable_irq(chip->client->irq);
12191225 regcache_cache_only(chip->regmap, true);
12201226 }
12211227
drivers/gpio/gpio-tegra186.c+14−13
@@ -823,6 +823,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev) · 822 unmodified lines
823823 struct gpio_irq_chip *irq;
824824 struct tegra_gpio *gpio;
825825 struct device_node *np;
826+ struct resource *res;
826827 char **names;
827828 int err;
828829
@@ -842,19 +843,19 @@ static int tegra186_gpio_probe(struct platform_device *pdev) · 13 unmodified lines
842843 gpio->num_banks++;
843844
844845 /* get register apertures */
845− gpio->secure = devm_platform_ioremap_resource_byname(pdev, "security");
846− if (IS_ERR(gpio->secure)) {
847− gpio->secure = devm_platform_ioremap_resource(pdev, 0);
848− if (IS_ERR(gpio->secure))
849− return PTR_ERR(gpio->secure);
850− }
851−
852− gpio->base = devm_platform_ioremap_resource_byname(pdev, "gpio");
853− if (IS_ERR(gpio->base)) {
854− gpio->base = devm_platform_ioremap_resource(pdev, 1);
855− if (IS_ERR(gpio->base))
856− return PTR_ERR(gpio->base);
857− }
846+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "security");
847+ if (!res)
848+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
849+ gpio->secure = devm_ioremap_resource(&pdev->dev, res);
850+ if (IS_ERR(gpio->secure))
851+ return PTR_ERR(gpio->secure);
852+
853+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio");
854+ if (!res)
855+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
856+ gpio->base = devm_ioremap_resource(&pdev->dev, res);
857+ if (IS_ERR(gpio->base))
858+ return PTR_ERR(gpio->base);
858859
859860 err = platform_irq_count(pdev);
860861 if (err < 0)
drivers/gpio/gpio-virtuser.c+10−2
@@ -401,10 +401,15 @@ static ssize_t gpio_virtuser_direction_do_write(struct file *file, · 400 unmodified lines
401401 char buf[32], *trimmed;
402402 int ret, dir, val = 0;
403403
404− ret = simple_write_to_buffer(buf, sizeof(buf), ppos, user_buf, count);
404+ if (count >= sizeof(buf))
405+ return -EINVAL;
406+
407+ ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
405408 if (ret < 0)
406409 return ret;
407410
411+ buf[ret] = '\0';
412+
408413 trimmed = strim(buf);
409414
410415 if (strcmp(trimmed, "input") == 0) {
@@ -623,12 +628,15 @@ static ssize_t gpio_virtuser_consumer_write(struct file *file, · 212 unmodified lines
623628 char buf[GPIO_VIRTUSER_NAME_BUF_LEN + 2];
624629 int ret;
625630
631+ if (count >= sizeof(buf))
632+ return -EINVAL;
633+
626634 ret = simple_write_to_buffer(buf, GPIO_VIRTUSER_NAME_BUF_LEN, ppos,
627635 user_buf, count);
628636 if (ret < 0)
629637 return ret;
630638
631− buf[strlen(buf) - 1] = '\0';
639+ buf[ret] = '\0';
632640
633641 ret = gpiod_set_consumer_name(data->ad.desc, buf);
634642 if (ret)
drivers/gpio/gpio-zynq.c+1−0
@@ -1011,6 +1011,7 @@ static void zynq_gpio_remove(struct platform_device *pdev) · 1010 unmodified lines
10111011 ret = pm_runtime_get_sync(&pdev->dev);
10121012 if (ret < 0)
10131013 dev_warn(&pdev->dev, "pm_runtime_get_sync() Failed\n");
1014+ device_init_wakeup(&pdev->dev, 0);
10141015 gpiochip_remove(&gpio->chip);
10151016 device_set_wakeup_capable(&pdev->dev, 0);
10161017 pm_runtime_disable(&pdev->dev);
drivers/gpio/gpiolib-devres.c+5−1
@@ -317,11 +317,15 @@ EXPORT_SYMBOL_GPL(devm_gpiod_put); · 316 unmodified lines
317317 * @dev: GPIO consumer
318318 * @desc: GPIO descriptor to remove resource management from
319319 *
320+ * *DEPRECATED*
321+ * This function should not be used. It's been provided as a workaround for
322+ * resource ownership issues in the regulator framework and should be replaced
323+ * with a better solution.
324+ *
320325 * Remove resource management from a GPIO descriptor. This is needed when
321326 * you want to hand over lifecycle management of a descriptor to another
322327 * mechanism.
323328 */
324−
325329 void devm_gpiod_unhinge(struct device *dev, struct gpio_desc *desc)
326330 {
327331 int ret;
drivers/gpio/gpiolib-of.c+5−3
@@ -193,6 +193,8 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np, · 192 unmodified lines
193193 */
194194 { "himax,hx8357", "gpios-reset", false },
195195 { "himax,hx8369", "gpios-reset", false },
196+#endif
197+#if IS_ENABLED(CONFIG_MTD_NAND_JZ4780)
196198 /*
197199 * The rb-gpios semantics was undocumented and qi,lb60 (along with
198200 * the ingenic driver) got it wrong. The active state encodes the
@@ -266,6 +268,9 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, · 67 unmodified lines
266268 { "fsl,imx8qm-fec", "phy-reset-gpios", "phy-reset-active-high" },
267269 { "fsl,s32v234-fec", "phy-reset-gpios", "phy-reset-active-high" },
268270 #endif
271+#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
272+ { "atmel,hsmci", "cd-gpios", "cd-inverted" },
273+#endif
269274 #if IS_ENABLED(CONFIG_PCI_IMX6)
270275 { "fsl,imx6q-pcie", "reset-gpio", "reset-gpio-active-high" },
271276 { "fsl,imx6sx-pcie", "reset-gpio", "reset-gpio-active-high" },
@@ -291,9 +296,6 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, · 19 unmodified lines
291296 #if IS_ENABLED(CONFIG_REGULATOR_GPIO)
292297 { "regulator-gpio", "enable-gpio", "enable-active-high" },
293298 { "regulator-gpio", "enable-gpios", "enable-active-high" },
294−#endif
295−#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
296− { "atmel,hsmci", "cd-gpios", "cd-inverted" },
297299 #endif
298300 };
299301 unsigned int i;
drivers/gpio/gpiolib.c+7−1
@@ -742,6 +742,12 @@ EXPORT_SYMBOL_GPL(gpiochip_query_valid_mask); · 741 unmodified lines
742742 bool gpiochip_line_is_valid(const struct gpio_chip *gc,
743743 unsigned int offset)
744744 {
745+ /*
746+ * hog pins are requested before registering GPIO chip
747+ */
748+ if (!gc->gpiodev)
749+ return true;
750+
745751 /* No mask means all valid */
746752 if (likely(!gc->gpiodev->valid_mask))
747753 return true;
@@ -2879,7 +2885,7 @@ static int gpiod_direction_output_raw_commit(struct gpio_desc *desc, int value) · 2131 unmodified lines
28792885 * output-only, but if there is then not even a .set() operation it
28802886 * is pretty tricky to drive the output line.
28812887 */
2882− if (!guard.gc->set && !guard.gc->direction_output) {
2888+ if (!guard.gc->set && !guard.gc->set_rv && !guard.gc->direction_output) {
28832889 gpiod_warn(desc,
28842890 "%s: missing set() and direction_output() operations\n",
28852891 __func__);
drivers/gpu/drm/Kconfig+1−1
@@ -188,7 +188,7 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS · 187 unmodified lines
188188 bool "Enable refcount backtrace history in the DP MST helpers"
189189 depends on STACKTRACE_SUPPORT
190190 select STACKDEPOT
191− depends on DRM_KMS_HELPER
191+ select DRM_KMS_HELPER
192192 depends on DEBUG_KERNEL
193193 depends on EXPERT
194194 help
drivers/gpu/drm/adp/adp_drv.c+14−13
@@ -121,7 +121,6 @@ struct adp_drv_private { · 120 unmodified lines
121121 dma_addr_t mask_iova;
122122 int be_irq;
123123 int fe_irq;
124− spinlock_t irq_lock;
125124 struct drm_pending_vblank_event *event;
126125 };
127126
@@ -288,6 +287,7 @@ static void adp_crtc_atomic_enable(struct drm_crtc *crtc, · 160 unmodified lines
288287 writel(BIT(0), adp->be + ADBE_BLEND_EN3);
289288 writel(BIT(0), adp->be + ADBE_BLEND_BYPASS);
290289 writel(BIT(0), adp->be + ADBE_BLEND_EN4);
290+ drm_crtc_vblank_on(crtc);
291291 }
292292
293293 static void adp_crtc_atomic_disable(struct drm_crtc *crtc,
@@ -310,6 +310,7 @@ static void adp_crtc_atomic_flush(struct drm_crtc *crtc, · 16 unmodified lines
310310 struct drm_atomic_state *state)
311311 {
312312 u32 frame_num = 1;
313+ unsigned long flags;
313314 struct adp_drv_private *adp = crtc_to_adp(crtc);
314315 struct drm_crtc_state *new_state = drm_atomic_get_new_crtc_state(state, crtc);
315316 u64 new_size = ALIGN(new_state->mode.hdisplay *
@@ -330,13 +331,19 @@ static void adp_crtc_atomic_flush(struct drm_crtc *crtc, · 14 unmodified lines
330331 }
331332 writel(ADBE_FIFO_SYNC | frame_num, adp->be + ADBE_FIFO);
332333 //FIXME: use adbe flush interrupt
333− spin_lock_irq(&crtc->dev->event_lock);
334334 if (crtc->state->event) {
335− drm_crtc_vblank_get(crtc);
336− adp->event = crtc->state->event;
335+ struct drm_pending_vblank_event *event = crtc->state->event;
336+
337+ crtc->state->event = NULL;
338+ spin_lock_irqsave(&crtc->dev->event_lock, flags);
339+
340+ if (drm_crtc_vblank_get(crtc) != 0)
341+ drm_crtc_send_vblank_event(crtc, event);
342+ else
343+ adp->event = event;
344+
345+ spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
337346 }
338− crtc->state->event = NULL;
339− spin_unlock_irq(&crtc->dev->event_lock);
340347 }
341348
342349 static const struct drm_crtc_funcs adp_crtc_funcs = {
@@ -482,8 +489,6 @@ static irqreturn_t adp_fe_irq(int irq, void *arg) · 139 unmodified lines
482489 u32 int_status;
483490 u32 int_ctl;
484491
485− spin_lock(&adp->irq_lock);
486−
487492 int_status = readl(adp->fe + ADP_INT_STATUS);
488493 if (int_status & ADP_INT_STATUS_VBLANK) {
489494 drm_crtc_handle_vblank(&adp->crtc);
@@ -501,7 +506,6 @@ static irqreturn_t adp_fe_irq(int irq, void *arg) · 11 unmodified lines
501506
502507 writel(int_status, adp->fe + ADP_INT_STATUS);
503508
504− spin_unlock(&adp->irq_lock);
505509
506510 return IRQ_HANDLED;
507511 }
@@ -512,8 +516,7 @@ static int adp_drm_bind(struct device *dev) · 4 unmodified lines
512516 struct adp_drv_private *adp = to_adp(drm);
513517 int err;
514518
515− adp_disable_vblank(adp);
516− writel(ADP_CTRL_FIFO_ON | ADP_CTRL_VBLANK_ON, adp->fe + ADP_CTRL);
519+ writel(ADP_CTRL_FIFO_ON, adp->fe + ADP_CTRL);
517520
518521 adp->next_bridge = drmm_of_get_bridge(&adp->drm, dev->of_node, 0, 0);
519522 if (IS_ERR(adp->next_bridge)) {
@@ -567,8 +570,6 @@ static int adp_probe(struct platform_device *pdev) · 47 unmodified lines
567570 if (IS_ERR(adp))
568571 return PTR_ERR(adp);
569572
570− spin_lock_init(&adp->irq_lock);
571−
572573 dev_set_drvdata(&pdev->dev, &adp->drm);
573574
574575 err = adp_parse_of(pdev, adp);
drivers/gpu/drm/amd/amdgpu/amdgpu.h+1−3
@@ -353,7 +353,6 @@ enum amdgpu_kiq_irq { · 352 unmodified lines
353353 AMDGPU_CP_KIQ_IRQ_DRIVER0 = 0,
354354 AMDGPU_CP_KIQ_IRQ_LAST
355355 };
356−#define SRIOV_USEC_TIMEOUT 1200000 /* wait 12 * 100ms for SRIOV */
357356 #define MAX_KIQ_REG_WAIT 5000 /* in usecs, 5ms */
358357 #define MAX_KIQ_REG_BAILOUT_INTERVAL 5 /* in msecs, 5ms */
359358 #define MAX_KIQ_REG_TRY 1000
@@ -1124,6 +1123,7 @@ struct amdgpu_device { · 764 unmodified lines
11241123 bool in_s3;
11251124 bool in_s4;
11261125 bool in_s0ix;
1126+ suspend_state_t last_suspend_state;
11271127
11281128 enum pp_mp1_state mp1_state;
11291129 struct amdgpu_doorbell_index doorbell_index;
@@ -1614,11 +1614,9 @@ static inline void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_cap · 484 unmodified lines
16141614 #if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
16151615 bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev);
16161616 bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev);
1617−void amdgpu_choose_low_power_state(struct amdgpu_device *adev);
16181617 #else
16191618 static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { return false; }
16201619 static inline bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev) { return false; }
1621−static inline void amdgpu_choose_low_power_state(struct amdgpu_device *adev) { }
16221620 #endif
16231621
16241622 void amdgpu_register_gpu_instance(struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c+0−18
@@ -1533,22 +1533,4 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) · 1532 unmodified lines
15331533 #endif /* CONFIG_AMD_PMC */
15341534 }
15351535
1536−/**
1537− * amdgpu_choose_low_power_state
1538− *
1539− * @adev: amdgpu_device_pointer
1540− *
1541− * Choose the target low power state for the GPU
1542− */
1543−void amdgpu_choose_low_power_state(struct amdgpu_device *adev)
1544−{
1545− if (adev->in_runpm)
1546− return;
1547−
1548− if (amdgpu_acpi_is_s0ix_active(adev))
1549− adev->in_s0ix = true;
1550− else if (amdgpu_acpi_is_s3_active(adev))
1551− adev->in_s3 = true;
1552−}
1553−
15541536 #endif /* CONFIG_SUSPEND */
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c+1−1
@@ -109,7 +109,7 @@ int amdgpu_unmap_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm, · 108 unmodified lines
109109 struct drm_exec exec;
110110 int r;
111111
112− drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0);
112+ drm_exec_init(&exec, 0, 0);
113113 drm_exec_until_all_locked(&exec) {
114114 r = amdgpu_vm_lock_pd(vm, &exec, 0);
115115 if (likely(!r))
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+15−23
@@ -3510,6 +3510,7 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev) · 3509 unmodified lines
35103510 amdgpu_device_mem_scratch_fini(adev);
35113511 amdgpu_ib_pool_fini(adev);
35123512 amdgpu_seq64_fini(adev);
3513+ amdgpu_doorbell_fini(adev);
35133514 }
35143515 if (adev->ip_blocks[i].version->funcs->sw_fini) {
35153516 r = adev->ip_blocks[i].version->funcs->sw_fini(&adev->ip_blocks[i]);
@@ -3643,6 +3644,13 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) · 127 unmodified lines
36433644 adev, adev->ip_blocks[i].version->type))
36443645 continue;
36453646
3647+ /* Since we skip suspend for S0i3, we need to cancel the delayed
3648+ * idle work here as the suspend callback never gets called.
3649+ */
3650+ if (adev->in_s0ix &&
3651+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX &&
3652+ amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(10, 0, 0))
3653+ cancel_delayed_work_sync(&adev->gfx.idle_work);
36463654 /* skip suspend of gfx/mes and psp for S0ix
36473655 * gfx is in gfxoff state, so on resume it will exit gfxoff just
36483656 * like at runtime. PSP is also part of the always on hardware
@@ -4851,7 +4859,6 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev) · 1202 unmodified lines
48514859
48524860 iounmap(adev->rmmio);
48534861 adev->rmmio = NULL;
4854− amdgpu_doorbell_fini(adev);
48554862 drm_dev_exit(idx);
48564863 }
48574864
@@ -4900,28 +4907,20 @@ static int amdgpu_device_evict_resources(struct amdgpu_device *adev) · 42 unmodified lines
49004907 * @data: data
49014908 *
49024909 * This function is called when the system is about to suspend or hibernate.
4903− * It is used to evict resources from the device before the system goes to
4904− * sleep while there is still access to swap.
4910+ * It is used to set the appropriate flags so that eviction can be optimized
4911+ * in the pm prepare callback.
49054912 */
49064913 static int amdgpu_device_pm_notifier(struct notifier_block *nb, unsigned long mode,
49074914 void *data)
49084915 {
49094916 struct amdgpu_device *adev = container_of(nb, struct amdgpu_device, pm_nb);
4910− int r;
49114917
49124918 switch (mode) {
49134919 case PM_HIBERNATION_PREPARE:
49144920 adev->in_s4 = true;
4915− fallthrough;
4916− case PM_SUSPEND_PREPARE:
4917− r = amdgpu_device_evict_resources(adev);
4918− /*
4919− * This is considered non-fatal at this time because
4920− * amdgpu_device_prepare() will also fatally evict resources.
4921− * See https://gitlab.freedesktop.org/drm/amd/-/issues/3781
4922− */
4923− if (r)
4924− drm_warn(adev_to_drm(adev), "Failed to evict resources, freeze active processes if problems occur: %d\n", r);
4921+ break;
4922+ case PM_POST_HIBERNATION:
4923+ adev->in_s4 = false;
49254924 break;
49264925 }
49274926
@@ -4942,15 +4941,13 @@ int amdgpu_device_prepare(struct drm_device *dev) · 14 unmodified lines
49424941 struct amdgpu_device *adev = drm_to_adev(dev);
49434942 int i, r;
49444943
4945− amdgpu_choose_low_power_state(adev);
4946−
49474944 if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
49484945 return 0;
49494946
49504947 /* Evict the majority of BOs before starting suspend sequence */
49514948 r = amdgpu_device_evict_resources(adev);
49524949 if (r)
4953− goto unprepare;
4950+ return r;
49544951
49554952 flush_delayed_work(&adev->gfx.gfx_off_delay_work);
49564953
@@ -4961,15 +4958,10 @@ int amdgpu_device_prepare(struct drm_device *dev) · 4 unmodified lines
49614958 continue;
49624959 r = adev->ip_blocks[i].version->funcs->prepare_suspend(&adev->ip_blocks[i]);
49634960 if (r)
4964− goto unprepare;
4961+ return r;
49654962 }
49664963
49674964 return 0;
4968−
4969−unprepare:
4970− adev->in_s0ix = adev->in_s3 = adev->in_s4 = false;
4971−
4972− return r;
49734965 }
49744966
49754967 /**
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c+2−0
@@ -120,6 +120,8 @@ MODULE_FIRMWARE("amdgpu/vega20_ip_discovery.bin"); · 119 unmodified lines
120120 MODULE_FIRMWARE("amdgpu/raven_ip_discovery.bin");
121121 MODULE_FIRMWARE("amdgpu/raven2_ip_discovery.bin");
122122 MODULE_FIRMWARE("amdgpu/picasso_ip_discovery.bin");
123+MODULE_FIRMWARE("amdgpu/arcturus_ip_discovery.bin");
124+MODULE_FIRMWARE("amdgpu/aldebaran_ip_discovery.bin");
123125
124126 #define mmIP_DISCOVERY_VERSION 0x16A00
125127 #define mmRCC_CONFIG_MEMSIZE 0xde3
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c+63−9
@@ -43,6 +43,29 @@ · 42 unmodified lines
4343 #include <linux/dma-fence-array.h>
4444 #include <linux/pci-p2pdma.h>
4545
46+static const struct dma_buf_attach_ops amdgpu_dma_buf_attach_ops;
47+
48+/**
49+ * dma_buf_attach_adev - Helper to get adev of an attachment
50+ *
51+ * @attach: attachment
52+ *
53+ * Returns:
54+ * A struct amdgpu_device * if the attaching device is an amdgpu device or
55+ * partition, NULL otherwise.
56+ */
57+static struct amdgpu_device *dma_buf_attach_adev(struct dma_buf_attachment *attach)
58+{
59+ if (attach->importer_ops == &amdgpu_dma_buf_attach_ops) {
60+ struct drm_gem_object *obj = attach->importer_priv;
61+ struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
62+
63+ return amdgpu_ttm_adev(bo->tbo.bdev);
64+ }
65+
66+ return NULL;
67+}
68+
4669 /**
4770 * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
4871 *
@@ -54,11 +77,13 @@ · 5 unmodified lines
5477 static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
5578 struct dma_buf_attachment *attach)
5679 {
80+ struct amdgpu_device *attach_adev = dma_buf_attach_adev(attach);
5781 struct drm_gem_object *obj = dmabuf->priv;
5882 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
5983 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
6084
61− if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
85+ if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) &&
86+ pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
6287 attach->peer2peer = false;
6388
6489 amdgpu_vm_bo_update_shared(bo);
@@ -75,11 +100,35 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf, · 10 unmodified lines
75100 */
76101 static int amdgpu_dma_buf_pin(struct dma_buf_attachment *attach)
77102 {
78− struct drm_gem_object *obj = attach->dmabuf->priv;
79− struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
103+ struct dma_buf *dmabuf = attach->dmabuf;
104+ struct amdgpu_bo *bo = gem_to_amdgpu_bo(dmabuf->priv);
105+ u32 domains = bo->allowed_domains;
106+
107+ dma_resv_assert_held(dmabuf->resv);
108+
109+ /* Try pinning into VRAM to allow P2P with RDMA NICs without ODP
110+ * support if all attachments can do P2P. If any attachment can't do
111+ * P2P just pin into GTT instead.
112+ *
113+ * To avoid with conflicting pinnings between GPUs and RDMA when move
114+ * notifiers are disabled, only allow pinning in VRAM when move
115+ * notiers are enabled.
116+ */
117+ if (!IS_ENABLED(CONFIG_DMABUF_MOVE_NOTIFY)) {
118+ domains &= ~AMDGPU_GEM_DOMAIN_VRAM;
119+ } else {
120+ list_for_each_entry(attach, &dmabuf->attachments, node)
121+ if (!attach->peer2peer)
122+ domains &= ~AMDGPU_GEM_DOMAIN_VRAM;
123+ }
80124
81− /* pin buffer into GTT */
82− return amdgpu_bo_pin(bo, AMDGPU_GEM_DOMAIN_GTT);
125+ if (domains & AMDGPU_GEM_DOMAIN_VRAM)
126+ bo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
127+
128+ if (WARN_ON(!domains))
129+ return -EINVAL;
130+
131+ return amdgpu_bo_pin(bo, domains);
83132 }
84133
85134 /**
@@ -134,9 +183,6 @@ static struct sg_table *amdgpu_dma_buf_map(struct dma_buf_attachment *attach, · 48 unmodified lines
134183 r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
135184 if (r)
136185 return ERR_PTR(r);
137−
138− } else if (bo->tbo.resource->mem_type != TTM_PL_TT) {
139− return ERR_PTR(-EBUSY);
140186 }
141187
142188 switch (bo->tbo.resource->mem_type) {
@@ -153,6 +199,11 @@ static struct sg_table *amdgpu_dma_buf_map(struct dma_buf_attachment *attach, · 10 unmodified lines
153199 break;
154200
155201 case TTM_PL_VRAM:
202+ /* XGMI-accessible memory should never be DMA-mapped */
203+ if (WARN_ON(amdgpu_dmabuf_is_xgmi_accessible(
204+ dma_buf_attach_adev(attach), bo)))
205+ return ERR_PTR(-EINVAL);
206+
156207 r = amdgpu_vram_mgr_alloc_sgt(adev, bo->tbo.resource, 0,
157208 bo->tbo.base.size, attach->dev,
158209 dir, &sgt);
@@ -184,7 +235,7 @@ static void amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach, · 25 unmodified lines
184235 struct sg_table *sgt,
185236 enum dma_data_direction dir)
186237 {
187− if (sgt->sgl->page_link) {
238+ if (sg_page(sgt->sgl)) {
188239 dma_unmap_sgtable(attach->dev, sgt, dir, 0);
189240 sg_free_table(sgt);
190241 kfree(sgt);
@@ -459,6 +510,9 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev, · 268 unmodified lines
459510 struct drm_gem_object *obj = &bo->tbo.base;
460511 struct drm_gem_object *gobj;
461512
513+ if (!adev)
514+ return false;
515+
462516 if (obj->import_attach) {
463517 struct dma_buf *dma_buf = obj->import_attach->dmabuf;
464518
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+14−10
@@ -2548,8 +2548,20 @@ static int amdgpu_pmops_suspend(struct device *dev) · 2547 unmodified lines
25482548 adev->in_s0ix = true;
25492549 else if (amdgpu_acpi_is_s3_active(adev))
25502550 adev->in_s3 = true;
2551− if (!adev->in_s0ix && !adev->in_s3)
2551+ if (!adev->in_s0ix && !adev->in_s3) {
2552+ /* don't allow going deep first time followed by s2idle the next time */
2553+ if (adev->last_suspend_state != PM_SUSPEND_ON &&
2554+ adev->last_suspend_state != pm_suspend_target_state) {
2555+ drm_err_once(drm_dev, "Unsupported suspend state %d\n",
2556+ pm_suspend_target_state);
2557+ return -EINVAL;
2558+ }
25522559 return 0;
2560+ }
2561+
2562+ /* cache the state last used for suspend */
2563+ adev->last_suspend_state = pm_suspend_target_state;
2564+
25532565 return amdgpu_device_suspend(drm_dev, true);
25542566 }
25552567
@@ -2603,13 +2615,8 @@ static int amdgpu_pmops_freeze(struct device *dev) · 47 unmodified lines
26032615 static int amdgpu_pmops_thaw(struct device *dev)
26042616 {
26052617 struct drm_device *drm_dev = dev_get_drvdata(dev);
2606− struct amdgpu_device *adev = drm_to_adev(drm_dev);
2607− int r;
2608−
2609− r = amdgpu_device_resume(drm_dev, true);
2610− adev->in_s4 = false;
26112618
2612− return r;
2619+ return amdgpu_device_resume(drm_dev, true);
26132620 }
26142621
26152622 static int amdgpu_pmops_poweroff(struct device *dev)
@@ -2622,9 +2629,6 @@ static int amdgpu_pmops_poweroff(struct device *dev) · 6 unmodified lines
26222629 static int amdgpu_pmops_restore(struct device *dev)
26232630 {
26242631 struct drm_device *drm_dev = dev_get_drvdata(dev);
2625− struct amdgpu_device *adev = drm_to_adev(drm_dev);
2626−
2627− adev->in_s4 = false;
26282632
26292633 return amdgpu_device_resume(drm_dev, true);
26302634 }
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c+11−3
@@ -1438,9 +1438,11 @@ static int amdgpu_gfx_run_cleaner_shader_job(struct amdgpu_ring *ring) · 1437 unmodified lines
14381438 struct amdgpu_device *adev = ring->adev;
14391439 struct drm_gpu_scheduler *sched = &ring->sched;
14401440 struct drm_sched_entity entity;
1441+ static atomic_t counter;
14411442 struct dma_fence *f;
14421443 struct amdgpu_job *job;
14431444 struct amdgpu_ib *ib;
1445+ void *owner;
14441446 int i, r;
14451447
14461448 /* Initialize the scheduler entity */
@@ -1451,9 +1453,15 @@ static int amdgpu_gfx_run_cleaner_shader_job(struct amdgpu_ring *ring) · 4 unmodified lines
14511453 goto err;
14521454 }
14531455
1454− r = amdgpu_job_alloc_with_ib(ring->adev, &entity, NULL,
1455− 64, 0,
1456− &job);
1456+ /*
1457+ * Use some unique dummy value as the owner to make sure we execute
1458+ * the cleaner shader on each submission. The value just need to change
1459+ * for each submission and is otherwise meaningless.
1460+ */
1461+ owner = (void *)(unsigned long)atomic_inc_return(&counter);
1462+
1463+ r = amdgpu_job_alloc_with_ib(ring->adev, &entity, owner,
1464+ 64, 0, &job);
14571465 if (r)
14581466 goto err;
14591467
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c+14−5
@@ -699,12 +699,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid, · 698 unmodified lines
699699 uint32_t flush_type, bool all_hub,
700700 uint32_t inst)
701701 {
702− u32 usec_timeout = amdgpu_sriov_vf(adev) ? SRIOV_USEC_TIMEOUT :
703− adev->usec_timeout;
704702 struct amdgpu_ring *ring = &adev->gfx.kiq[inst].ring;
705703 struct amdgpu_kiq *kiq = &adev->gfx.kiq[inst];
706704 unsigned int ndw;
707− int r;
705+ int r, cnt = 0;
708706 uint32_t seq;
709707
710708 /*
@@ -761,10 +759,21 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid, · 50 unmodified lines
761759
762760 amdgpu_ring_commit(ring);
763761 spin_unlock(&adev->gfx.kiq[inst].ring_lock);
764− if (amdgpu_fence_wait_polling(ring, seq, usec_timeout) < 1) {
762+
763+ r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT);
764+
765+ might_sleep();
766+ while (r < 1 && cnt++ < MAX_KIQ_REG_TRY &&
767+ !amdgpu_reset_pending(adev->reset_domain)) {
768+ msleep(MAX_KIQ_REG_BAILOUT_INTERVAL);
769+ r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT);
770+ }
771+
772+ if (cnt > MAX_KIQ_REG_TRY) {
765773 dev_err(adev->dev, "timeout waiting for kiq fence\n");
766774 r = -ETIME;
767− }
775+ } else
776+ r = 0;
768777 }
769778
770779 error_unlock_reset:
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+2−2
@@ -163,8 +163,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain) · 162 unmodified lines
163163 * When GTT is just an alternative to VRAM make sure that we
164164 * only use it as fallback and still try to fill up VRAM first.
165165 */
166− if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM &&
167− !(adev->flags & AMD_IS_APU))
166+ if (abo->tbo.resource && !(adev->flags & AMD_IS_APU) &&
167+ domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)
168168 places[c].flags |= TTM_PL_FLAG_FALLBACK;
169169 c++;
170170 }
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h+0−1
@@ -66,7 +66,6 @@ · 65 unmodified lines
6666 #define VCN_ENC_CMD_REG_WAIT 0x0000000c
6767
6868 #define VCN_AON_SOC_ADDRESS_2_0 0x1f800
69−#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
7069 #define VCN_VID_IP_ADDRESS_2_0 0x0
7170 #define VCN_AON_IP_ADDRESS_2_0 0x30000
7271
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c+4−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424
2525 #include <linux/dma-mapping.h>
2626 #include <drm/ttm/ttm_range_manager.h>
27+#include <drm/drm_drv.h>
2728
2829 #include "amdgpu.h"
2930 #include "amdgpu_vm.h"
@@ -907,6 +908,9 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev) · 877 unmodified lines
907908 struct ttm_resource_manager *man = &mgr->manager;
908909 int err;
909910
911+ man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram", adev->gmc.real_vram_size);
912+ if (IS_ERR(man->cg))
913+ return PTR_ERR(man->cg);
910914 ttm_resource_manager_init(man, &adev->mman.bdev,
911915 adev->gmc.real_vram_size);
912916
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c+4−4
@@ -6114,7 +6114,7 @@ static int gfx_v10_0_cp_gfx_load_pfp_microcode(struct amdgpu_device *adev) · 6113 unmodified lines
61146114 }
61156115
61166116 if (amdgpu_emu_mode == 1)
6117− adev->hdp.funcs->flush_hdp(adev, NULL);
6117+ amdgpu_device_flush_hdp(adev, NULL);
61186118
61196119 tmp = RREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_CNTL);
61206120 tmp = REG_SET_FIELD(tmp, CP_PFP_IC_BASE_CNTL, VMID, 0);
@@ -6192,7 +6192,7 @@ static int gfx_v10_0_cp_gfx_load_ce_microcode(struct amdgpu_device *adev) · 71 unmodified lines
61926192 }
61936193
61946194 if (amdgpu_emu_mode == 1)
6195− adev->hdp.funcs->flush_hdp(adev, NULL);
6195+ amdgpu_device_flush_hdp(adev, NULL);
61966196
61976197 tmp = RREG32_SOC15(GC, 0, mmCP_CE_IC_BASE_CNTL);
61986198 tmp = REG_SET_FIELD(tmp, CP_CE_IC_BASE_CNTL, VMID, 0);
@@ -6269,7 +6269,7 @@ static int gfx_v10_0_cp_gfx_load_me_microcode(struct amdgpu_device *adev) · 70 unmodified lines
62696269 }
62706270
62716271 if (amdgpu_emu_mode == 1)
6272− adev->hdp.funcs->flush_hdp(adev, NULL);
6272+ amdgpu_device_flush_hdp(adev, NULL);
62736273
62746274 tmp = RREG32_SOC15(GC, 0, mmCP_ME_IC_BASE_CNTL);
62756275 tmp = REG_SET_FIELD(tmp, CP_ME_IC_BASE_CNTL, VMID, 0);
@@ -6644,7 +6644,7 @@ static int gfx_v10_0_cp_compute_load_microcode(struct amdgpu_device *adev) · 368 unmodified lines
66446644 }
66456645
66466646 if (amdgpu_emu_mode == 1)
6647− adev->hdp.funcs->flush_hdp(adev, NULL);
6647+ amdgpu_device_flush_hdp(adev, NULL);
66486648
66496649 tmp = RREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_CNTL);
66506650 tmp = REG_SET_FIELD(tmp, CP_CPC_IC_BASE_CNTL, CACHE_POLICY, 0);
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+6−6
@@ -2428,7 +2428,7 @@ static int gfx_v11_0_config_me_cache(struct amdgpu_device *adev, uint64_t addr) · 2427 unmodified lines
24282428 }
24292429
24302430 if (amdgpu_emu_mode == 1)
2431− adev->hdp.funcs->flush_hdp(adev, NULL);
2431+ amdgpu_device_flush_hdp(adev, NULL);
24322432
24332433 tmp = RREG32_SOC15(GC, 0, regCP_ME_IC_BASE_CNTL);
24342434 tmp = REG_SET_FIELD(tmp, CP_ME_IC_BASE_CNTL, VMID, 0);
@@ -2472,7 +2472,7 @@ static int gfx_v11_0_config_pfp_cache(struct amdgpu_device *adev, uint64_t addr) · 37 unmodified lines
24722472 }
24732473
24742474 if (amdgpu_emu_mode == 1)
2475− adev->hdp.funcs->flush_hdp(adev, NULL);
2475+ amdgpu_device_flush_hdp(adev, NULL);
24762476
24772477 tmp = RREG32_SOC15(GC, 0, regCP_PFP_IC_BASE_CNTL);
24782478 tmp = REG_SET_FIELD(tmp, CP_PFP_IC_BASE_CNTL, VMID, 0);
@@ -2517,7 +2517,7 @@ static int gfx_v11_0_config_mec_cache(struct amdgpu_device *adev, uint64_t addr) · 38 unmodified lines
25172517 }
25182518
25192519 if (amdgpu_emu_mode == 1)
2520− adev->hdp.funcs->flush_hdp(adev, NULL);
2520+ amdgpu_device_flush_hdp(adev, NULL);
25212521
25222522 tmp = RREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_CNTL);
25232523 tmp = REG_SET_FIELD(tmp, CP_CPC_IC_BASE_CNTL, CACHE_POLICY, 0);
@@ -3153,7 +3153,7 @@ static int gfx_v11_0_cp_gfx_load_pfp_microcode_rs64(struct amdgpu_device *adev) · 629 unmodified lines
31533153 amdgpu_bo_unreserve(adev->gfx.pfp.pfp_fw_data_obj);
31543154
31553155 if (amdgpu_emu_mode == 1)
3156− adev->hdp.funcs->flush_hdp(adev, NULL);
3156+ amdgpu_device_flush_hdp(adev, NULL);
31573157
31583158 WREG32_SOC15(GC, 0, regCP_PFP_IC_BASE_LO,
31593159 lower_32_bits(adev->gfx.pfp.pfp_fw_gpu_addr));
@@ -3371,7 +3371,7 @@ static int gfx_v11_0_cp_gfx_load_me_microcode_rs64(struct amdgpu_device *adev) · 211 unmodified lines
33713371 amdgpu_bo_unreserve(adev->gfx.me.me_fw_data_obj);
33723372
33733373 if (amdgpu_emu_mode == 1)
3374− adev->hdp.funcs->flush_hdp(adev, NULL);
3374+ amdgpu_device_flush_hdp(adev, NULL);
33753375
33763376 WREG32_SOC15(GC, 0, regCP_ME_IC_BASE_LO,
33773377 lower_32_bits(adev->gfx.me.me_fw_gpu_addr));
@@ -4541,7 +4541,7 @@ static int gfx_v11_0_gfxhub_enable(struct amdgpu_device *adev) · 1163 unmodified lines
45414541 if (r)
45424542 return r;
45434543
4544− adev->hdp.funcs->flush_hdp(adev, NULL);
4544+ amdgpu_device_flush_hdp(adev, NULL);
45454545
45464546 value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
45474547 false : true;
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c+3−3
@@ -2324,7 +2324,7 @@ static int gfx_v12_0_cp_gfx_load_pfp_microcode_rs64(struct amdgpu_device *adev) · 2323 unmodified lines
23242324 amdgpu_bo_unreserve(adev->gfx.pfp.pfp_fw_data_obj);
23252325
23262326 if (amdgpu_emu_mode == 1)
2327− adev->hdp.funcs->flush_hdp(adev, NULL);
2327+ amdgpu_device_flush_hdp(adev, NULL);
23282328
23292329 WREG32_SOC15(GC, 0, regCP_PFP_IC_BASE_LO,
23302330 lower_32_bits(adev->gfx.pfp.pfp_fw_gpu_addr));
@@ -2468,7 +2468,7 @@ static int gfx_v12_0_cp_gfx_load_me_microcode_rs64(struct amdgpu_device *adev) · 137 unmodified lines
24682468 amdgpu_bo_unreserve(adev->gfx.me.me_fw_data_obj);
24692469
24702470 if (amdgpu_emu_mode == 1)
2471− adev->hdp.funcs->flush_hdp(adev, NULL);
2471+ amdgpu_device_flush_hdp(adev, NULL);
24722472
24732473 WREG32_SOC15(GC, 0, regCP_ME_IC_BASE_LO,
24742474 lower_32_bits(adev->gfx.me.me_fw_gpu_addr));
@@ -3426,7 +3426,7 @@ static int gfx_v12_0_gfxhub_enable(struct amdgpu_device *adev) · 951 unmodified lines
34263426 if (r)
34273427 return r;
34283428
3429− adev->hdp.funcs->flush_hdp(adev, NULL);
3429+ amdgpu_device_flush_hdp(adev, NULL);
34303430
34313431 value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
34323432 false : true;
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c+2−2
@@ -268,7 +268,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, · 267 unmodified lines
268268 ack = hub->vm_inv_eng0_ack + hub->eng_distance * eng;
269269
270270 /* flush hdp cache */
271− adev->hdp.funcs->flush_hdp(adev, NULL);
271+ amdgpu_device_flush_hdp(adev, NULL);
272272
273273 /* This is necessary for SRIOV as well as for GFXOFF to function
274274 * properly under bare metal
@@ -969,7 +969,7 @@ static int gmc_v10_0_gart_enable(struct amdgpu_device *adev) · 694 unmodified lines
969969 adev->hdp.funcs->init_registers(adev);
970970
971971 /* Flush HDP after it is initialized */
972− adev->hdp.funcs->flush_hdp(adev, NULL);
972+ amdgpu_device_flush_hdp(adev, NULL);
973973
974974 value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
975975 false : true;
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c+14−2
@@ -229,7 +229,7 @@ static void gmc_v11_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, · 228 unmodified lines
229229 ack = hub->vm_inv_eng0_ack + hub->eng_distance * eng;
230230
231231 /* flush hdp cache */
232− adev->hdp.funcs->flush_hdp(adev, NULL);
232+ amdgpu_device_flush_hdp(adev, NULL);
233233
234234 /* This is necessary for SRIOV as well as for GFXOFF to function
235235 * properly under bare metal
@@ -752,6 +752,18 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block) · 516 unmodified lines
752752 adev->gmc.vram_type = vram_type;
753753 adev->gmc.vram_vendor = vram_vendor;
754754
755+ /* The mall_size is already calculated as mall_size_per_umc * num_umc.
756+ * However, for gfx1151, which features a 2-to-1 UMC mapping,
757+ * the result must be multiplied by 2 to determine the actual mall size.
758+ */
759+ switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
760+ case IP_VERSION(11, 5, 1):
761+ adev->gmc.mall_size *= 2;
762+ break;
763+ default:
764+ break;
765+ }
766+
755767 switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
756768 case IP_VERSION(11, 0, 0):
757769 case IP_VERSION(11, 0, 1):
@@ -899,7 +911,7 @@ static int gmc_v11_0_gart_enable(struct amdgpu_device *adev) · 141 unmodified lines
899911 return r;
900912
901913 /* Flush HDP after it is initialized */
902− adev->hdp.funcs->flush_hdp(adev, NULL);
914+ amdgpu_device_flush_hdp(adev, NULL);
903915
904916 value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
905917 false : true;
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c+2−2
@@ -297,7 +297,7 @@ static void gmc_v12_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, · 296 unmodified lines
297297 return;
298298
299299 /* flush hdp cache */
300− adev->hdp.funcs->flush_hdp(adev, NULL);
300+ amdgpu_device_flush_hdp(adev, NULL);
301301
302302 /* This is necessary for SRIOV as well as for GFXOFF to function
303303 * properly under bare metal
@@ -881,7 +881,7 @@ static int gmc_v12_0_gart_enable(struct amdgpu_device *adev) · 577 unmodified lines
881881 return r;
882882
883883 /* Flush HDP after it is initialized */
884− adev->hdp.funcs->flush_hdp(adev, NULL);
884+ amdgpu_device_flush_hdp(adev, NULL);
885885
886886 value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
887887 false : true;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c+1−1
@@ -2435,7 +2435,7 @@ static int gmc_v9_0_hw_init(struct amdgpu_ip_block *ip_block) · 2434 unmodified lines
24352435 adev->hdp.funcs->init_registers(adev);
24362436
24372437 /* After HDP is initialized, flush HDP.*/
2438− adev->hdp.funcs->flush_hdp(adev, NULL);
2438+ amdgpu_device_flush_hdp(adev, NULL);
24392439
24402440 if (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS)
24412441 value = false;
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c+6−1
@@ -41,7 +41,12 @@ static void hdp_v4_0_flush_hdp(struct amdgpu_device *adev, · 40 unmodified lines
4141 {
4242 if (!ring || !ring->funcs->emit_wreg) {
4343 WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
44− RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
44+ /* We just need to read back a register to post the write.
45+ * Reading back the remapped register causes problems on
46+ * some platforms so just read back the memory size register.
47+ */
48+ if (adev->nbio.funcs->get_memsize)
49+ adev->nbio.funcs->get_memsize(adev);
4550 } else {
4651 amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
4752 }
drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c+6−1
@@ -32,7 +32,12 @@ static void hdp_v5_0_flush_hdp(struct amdgpu_device *adev, · 31 unmodified lines
3232 {
3333 if (!ring || !ring->funcs->emit_wreg) {
3434 WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
35− RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
35+ /* We just need to read back a register to post the write.
36+ * Reading back the remapped register causes problems on
37+ * some platforms so just read back the memory size register.
38+ */
39+ if (adev->nbio.funcs->get_memsize)
40+ adev->nbio.funcs->get_memsize(adev);
3641 } else {
3742 amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
3843 }
drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c+11−1
@@ -33,7 +33,17 @@ static void hdp_v5_2_flush_hdp(struct amdgpu_device *adev, · 32 unmodified lines
3333 if (!ring || !ring->funcs->emit_wreg) {
3434 WREG32_NO_KIQ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2,
3535 0);
36− RREG32_NO_KIQ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
36+ if (amdgpu_sriov_vf(adev)) {
37+ /* this is fine because SR_IOV doesn't remap the register */
38+ RREG32_NO_KIQ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
39+ } else {
40+ /* We just need to read back a register to post the write.
41+ * Reading back the remapped register causes problems on
42+ * some platforms so just read back the memory size register.
43+ */
44+ if (adev->nbio.funcs->get_memsize)
45+ adev->nbio.funcs->get_memsize(adev);
46+ }
3747 } else {
3848 amdgpu_ring_emit_wreg(ring,
3949 (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2,
drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c+6−1
@@ -35,7 +35,12 @@ static void hdp_v6_0_flush_hdp(struct amdgpu_device *adev, · 34 unmodified lines
3535 {
3636 if (!ring || !ring->funcs->emit_wreg) {
3737 WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
38− RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
38+ /* We just need to read back a register to post the write.
39+ * Reading back the remapped register causes problems on
40+ * some platforms so just read back the memory size register.
41+ */
42+ if (adev->nbio.funcs->get_memsize)
43+ adev->nbio.funcs->get_memsize(adev);
3944 } else {
4045 amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
4146 }
drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c+6−1
@@ -32,7 +32,12 @@ static void hdp_v7_0_flush_hdp(struct amdgpu_device *adev, · 31 unmodified lines
3232 {
3333 if (!ring || !ring->funcs->emit_wreg) {
3434 WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
35− RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
35+ /* We just need to read back a register to post the write.
36+ * Reading back the remapped register causes problems on
37+ * some platforms so just read back the memory size register.
38+ */
39+ if (adev->nbio.funcs->get_memsize)
40+ adev->nbio.funcs->get_memsize(adev);
3641 } else {
3742 amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
3843 }
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c+4−0
@@ -894,6 +894,10 @@ static void mes_v11_0_get_fw_version(struct amdgpu_device *adev) · 893 unmodified lines
894894 {
895895 int pipe;
896896
897+ /* return early if we have already fetched these */
898+ if (adev->mes.sched_version && adev->mes.kiq_version)
899+ return;
900+
897901 /* get MES scheduler/KIQ versions */
898902 mutex_lock(&adev->srbm_mutex);
899903
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c+12−9
@@ -1392,17 +1392,20 @@ static int mes_v12_0_queue_init(struct amdgpu_device *adev, · 1391 unmodified lines
13921392 mes_v12_0_queue_init_register(ring);
13931393 }
13941394
1395− /* get MES scheduler/KIQ versions */
1396− mutex_lock(&adev->srbm_mutex);
1397− soc21_grbm_select(adev, 3, pipe, 0, 0);
1395+ if (((pipe == AMDGPU_MES_SCHED_PIPE) && !adev->mes.sched_version) ||
1396+ ((pipe == AMDGPU_MES_KIQ_PIPE) && !adev->mes.kiq_version)) {
1397+ /* get MES scheduler/KIQ versions */
1398+ mutex_lock(&adev->srbm_mutex);
1399+ soc21_grbm_select(adev, 3, pipe, 0, 0);
13981400
1399− if (pipe == AMDGPU_MES_SCHED_PIPE)
1400− adev->mes.sched_version = RREG32_SOC15(GC, 0, regCP_MES_GP3_LO);
1401− else if (pipe == AMDGPU_MES_KIQ_PIPE && adev->enable_mes_kiq)
1402− adev->mes.kiq_version = RREG32_SOC15(GC, 0, regCP_MES_GP3_LO);
1401+ if (pipe == AMDGPU_MES_SCHED_PIPE)
1402+ adev->mes.sched_version = RREG32_SOC15(GC, 0, regCP_MES_GP3_LO);
1403+ else if (pipe == AMDGPU_MES_KIQ_PIPE && adev->enable_mes_kiq)
1404+ adev->mes.kiq_version = RREG32_SOC15(GC, 0, regCP_MES_GP3_LO);
14031405

8 more lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/psp_v11_0.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/psp_v13_0.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/psp_v14_0.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c+9−0

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c+54−0

This diff is large: its 85 lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/vi.c+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/gpu/drm/amd/amdkfd/kfd_topology.c+5−4

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+53−53

This diff is large: its 197 lines aren’t shown here.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c+14−3

This diff is large: its 57 lines aren’t shown here.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c+16−3

This diff is large: its 61 lines aren’t shown here.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c+30−4

This diff is large: its 74 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc.c+7−3

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c+11−9

This diff is large: its 61 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c+21−7

This diff is large: its 107 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c+5−9

This diff is large: its 42 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c+13−2

This diff is large: its 58 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c+3−2

This diff is large: its 14 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/link/link_dpms.c+11−2

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c+36−18

This diff is large: its 75 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c+0−6

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/amd/include/kgd_pp_interface.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/pm/amdgpu_dpm.c+19−0

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c+35−1

This diff is large: its 57 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/drm_drv.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/drm_edid.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/drm_file.c+6−0

This diff is large: its 20 lines aren’t shown here.

drivers/gpu/drm/drm_gpusvm.c+32−5

This diff is large: its 99 lines aren’t shown here.

drivers/gpu/drm/drm_mipi_dbi.c+5−1

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos7_drm_decon.c+2−2

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_drm_drv.c+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_drm_fimc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_drm_fimd.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_drm_vidi.c+0−3

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_bw.c+13−1

This diff is large: its 38 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_device.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp.c+46−10

This diff is large: its 94 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp_mst.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_vblank.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/i915/gt/intel_rc6.c+4−15

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/i915/gt/intel_rps.c+11−3

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/i915/gt/uc/intel_huc.c+5−6

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/i915/gt/uc/intel_huc.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/gt/uc/intel_uc.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/gvt/opregion.c+4−3

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/i915/i915_drv.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h+6−2

This diff is large: its 22 lines aren’t shown here.

drivers/gpu/drm/i915/selftests/i915_selftest.c+18−0

This diff is large: its 38 lines aren’t shown here.

drivers/gpu/drm/i915/soc/intel_dram.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/imagination/pvr_fw.c+20−7

This diff is large: its 68 lines aren’t shown here.

drivers/gpu/drm/imagination/pvr_job.c+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/gpu/drm/imagination/pvr_queue.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/meson/meson_drv.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/meson/meson_drv.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/meson/meson_encoder_hdmi.c+16−13

This diff is large: its 69 lines aren’t shown here.

drivers/gpu/drm/meson/meson_vclk.c+101−94

This diff is large: its 453 lines aren’t shown here.

drivers/gpu/drm/meson/meson_vclk.h+7−6

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/mgag200/mgag200_mode.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/msm/adreno/a6xx_gpu.c+4−4

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h+0−2

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h+0−3

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h+0−4

This diff is large: its 32 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h+0−3

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h+0−2

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c+39−35

This diff is large: its 107 lines aren’t shown here.

drivers/gpu/drm/msm/registers/adreno/adreno_pm4.xml+7−0

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/nouveau/nouveau_bo.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/nouveau/nouveau_fence.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/nouveau/nouveau_gem.c+0−3

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c+2−2

This diff is large: its 14 lines aren’t shown here.

drivers/gpu/drm/panel/panel-simple.c+13−12

This diff is large: its 41 lines aren’t shown here.

drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c+3−20

This diff is large: its 45 lines aren’t shown here.

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/sti/Makefile+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/tests/drm_client_modeset_test.c+8−1

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/tests/drm_cmdline_parser_test.c+9−1

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/tests/drm_gem_shmem_test.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/tests/drm_kunit_helpers.c+22−0

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/tests/drm_modes_test.c+26−0

This diff is large: its 102 lines aren’t shown here.

drivers/gpu/drm/tests/drm_probe_helper_test.c+7−1

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/tiny/panel-mipi-dbi.c+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/ttm/ttm_backup.c+12−32

This diff is large: its 101 lines aren’t shown here.

drivers/gpu/drm/ttm/ttm_bo.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/ttm/ttm_pool.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/gpu/drm/ttm/ttm_tt.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/v3d/v3d_sched.c+34−10

This diff is large: its 85 lines aren’t shown here.

drivers/gpu/drm/virtio/virtgpu_drv.c+9−0

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/virtio/virtgpu_gem.c+6−5

This diff is large: its 20 lines aren’t shown here.

drivers/gpu/drm/virtio/virtgpu_plane.c+14−6

This diff is large: its 35 lines aren’t shown here.

drivers/gpu/drm/virtio/virtgpu_prime.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/instructions/xe_gpu_commands.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/instructions/xe_mi_commands.h+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/xe/regs/xe_engine_regs.h+5−0

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/xe/regs/xe_gt_regs.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/regs/xe_lrc_layout.h+2−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/xe/tests/xe_mocs.c+5−2

This diff is large: its 14 lines aren’t shown here.

drivers/gpu/drm/xe/xe_device_types.h+3−0

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/xe/xe_dma_buf.c+1−4

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/xe/xe_eu_stall.c+12−2

This diff is large: its 75 lines aren’t shown here.

drivers/gpu/drm/xe/xe_eu_stall.h+2−1

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/xe/xe_exec_queue.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gsc.c+22−0

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gsc.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gsc_proxy.c+11−0

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gsc_proxy.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gt.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gt_debugfs.c+5−4

This diff is large: its 28 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gt_pagefault.c+9−2

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c+10−2

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/xe/xe_guc_ads.c+45−30

This diff is large: its 140 lines aren’t shown here.

drivers/gpu/drm/xe/xe_guc_capture.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/xe/xe_guc_pc.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/xe_guc_submit.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/xe/xe_hmm.c+0−24

This diff is large: its 38 lines aren’t shown here.

drivers/gpu/drm/xe/xe_hw_engine.c+6−6

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c+52−56

This diff is large: its 141 lines aren’t shown here.

drivers/gpu/drm/xe/xe_lrc.c+186−13

This diff is large: its 349 lines aren’t shown here.

drivers/gpu/drm/xe/xe_lrc.h+3−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/xe/xe_lrc_types.h+6−3

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/xe/xe_migrate.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/gpu/drm/xe/xe_mmio.c+5−5

This diff is large: its 35 lines aren’t shown here.

drivers/gpu/drm/xe/xe_mocs.c+6−5

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/xe/xe_module.c+0−3

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/xe/xe_module.h+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/xe_pci.c+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/xe/xe_pci_types.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/xe_pt.c+11−3

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/xe/xe_pxp_debugfs.c+11−2

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/xe/xe_ring_ops.c+11−9

This diff is large: its 45 lines aren’t shown here.

drivers/gpu/drm/xe/xe_shrinker.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/xe/xe_svm.c+108−29

This diff is large: its 228 lines aren’t shown here.

drivers/gpu/drm/xe/xe_svm.h+8−5

This diff is large: its 34 lines aren’t shown here.

drivers/gpu/drm/xe/xe_trace_lrc.h+4−4

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/xe/xe_uc.c+7−1

This diff is large: its 22 lines aren’t shown here.

drivers/gpu/drm/xe/xe_uc.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/xe/xe_vm.c+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/xe/xe_wa.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/xe/xe_wa_oob.rules+2−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/nova-core/gpu.rs+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c+8−4

This diff is large: its 41 lines aren’t shown here.

drivers/hid/bpf/hid_bpf_dispatch.c+9−0

This diff is large: its 30 lines aren’t shown here.

drivers/hid/bpf/progs/XPPen__ACK05.bpf.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/hid/hid-ids.h+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/hid/hid-quirks.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/hid/hid-steam.c+0−2

This diff is large: its 12 lines aren’t shown here.

drivers/hid/hid-thrustmaster.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/hid/hid-uclogic-core.c+4−3

This diff is large: its 16 lines aren’t shown here.

drivers/hid/wacom_sys.c+10−1

This diff is large: its 35 lines aren’t shown here.

drivers/hv/channel.c+3−62

This diff is large: its 80 lines aren’t shown here.

drivers/hv/hv_common.c+6−4

This diff is large: its 24 lines aren’t shown here.

drivers/hv/hyperv_vmbus.h+6−0

This diff is large: its 11 lines aren’t shown here.

drivers/hv/vmbus_drv.c+108−1

This diff is large: its 139 lines aren’t shown here.

drivers/hwtracing/intel_th/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/hwtracing/intel_th/msu.c+7−24

This diff is large: its 80 lines aren’t shown here.

drivers/i2c/busses/i2c-cros-ec-tunnel.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/i2c/busses/i2c-designware-pcidrv.c+3−1

This diff is large: its 13 lines aren’t shown here.

drivers/i2c/busses/i2c-imx-lpi2c.c+2−2

This diff is large: its 12 lines aren’t shown here.

drivers/i2c/busses/i2c-omap.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/i2c/i2c-atr.c+1−1

This diff is large: its 14 lines aren’t shown here.

drivers/iio/accel/adis16201.c+2−2

This diff is large: its 12 lines aren’t shown here.

drivers/iio/accel/adxl355_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/accel/adxl367.c+3−7

This diff is large: its 22 lines aren’t shown here.

drivers/iio/accel/fxls8962af-core.c+5−2

This diff is large: its 14 lines aren’t shown here.

drivers/iio/adc/ad7266.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/adc/ad7380.c+22−10

This diff is large: its 84 lines aren’t shown here.

drivers/iio/adc/ad7606.c+8−3

This diff is large: its 25 lines aren’t shown here.

drivers/iio/adc/ad7606_spi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/adc/ad7768-1.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/adc/dln2-adc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/adc/qcom-spmi-iadc.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/iio/adc/rockchip_saradc.c+8−9

This diff is large: its 31 lines aren’t shown here.

drivers/iio/chemical/pms7003.c+3−2

This diff is large: its 26 lines aren’t shown here.

drivers/iio/chemical/sps30.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/common/hid-sensors/hid-sensor-attributes.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/iio/imu/adis16550.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/bmi270/bmi270_core.c+2−4

This diff is large: its 20 lines aren’t shown here.

drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c+6−0

This diff is large: its 20 lines aren’t shown here.

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+5−2

This diff is large: its 14 lines aren’t shown here.

drivers/iio/light/hid-sensor-prox.c+14−8

This diff is large: its 45 lines aren’t shown here.

drivers/iio/light/opt3001.c+3−2

This diff is large: its 20 lines aren’t shown here.

drivers/iio/magnetometer/ak8974.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/iio/pressure/mprls0025pa.h+6−11

This diff is large: its 38 lines aren’t shown here.

drivers/iio/temperature/maxim_thermocouple.c+1−1

This diff is large: its 11 lines aren’t shown here.

drivers/infiniband/core/cma.c+3−1

This diff is large: its 25 lines aren’t shown here.

drivers/infiniband/core/device.c+4−2

This diff is large: its 22 lines aren’t shown here.

drivers/infiniband/core/ucaps.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/infiniband/hw/bnxt_re/ib_verbs.c+0−10

This diff is large: its 53 lines aren’t shown here.

drivers/infiniband/hw/hns/hns_roce_main.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/infiniband/hw/irdma/main.c+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/infiniband/hw/irdma/verbs.c+0−1

This diff is large: its 6 lines aren’t shown here.

drivers/infiniband/hw/mlx5/fs.c+0−2

This diff is large: its 16 lines aren’t shown here.

drivers/infiniband/hw/usnic/usnic_ib_main.c+7−7

This diff is large: its 35 lines aren’t shown here.

drivers/infiniband/sw/rxe/rxe_cq.c+1−4

This diff is large: its 13 lines aren’t shown here.

drivers/infiniband/sw/rxe/rxe_loc.h+6−0

This diff is large: its 13 lines aren’t shown here.

drivers/infiniband/sw/rxe/rxe_mr.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/infiniband/sw/rxe/rxe_resp.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/input/joystick/magellan.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/input/joystick/xpad.c+34−18

This diff is large: its 170 lines aren’t shown here.

drivers/input/keyboard/mtk-pmic-keys.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/input/misc/hisi_powerkey.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/input/misc/sparcspkr.c+16−6

This diff is large: its 36 lines aren’t shown here.

drivers/input/mouse/synaptics.c+5−0

This diff is large: its 24 lines aren’t shown here.

drivers/input/rmi4/rmi_f34.c+76−59

This diff is large: its 218 lines aren’t shown here.

drivers/input/touchscreen/cyttsp5.c+5−2

This diff is large: its 27 lines aren’t shown here.

drivers/input/touchscreen/stmpe-ts.c+1−6

This diff is large: its 14 lines aren’t shown here.

drivers/iommu/amd/init.c+8−0

This diff is large: its 15 lines aren’t shown here.

drivers/iommu/amd/iommu.c+4−11

This diff is large: its 33 lines aren’t shown here.

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c+6−0

This diff is large: its 13 lines aren’t shown here.

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c+18−5

This diff is large: its 44 lines aren’t shown here.

drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c+5−27

This diff is large: its 70 lines aren’t shown here.

drivers/iommu/dma-iommu.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/iommu/exynos-iommu.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/iommu/intel/iommu.c+22−14

This diff is large: its 82 lines aren’t shown here.

drivers/iommu/intel/irq_remapping.c+15−14

This diff is large: its 59 lines aren’t shown here.

drivers/iommu/iommu.c+33−16

This diff is large: its 92 lines aren’t shown here.

drivers/iommu/ipmmu-vmsa.c+10−17

This diff is large: its 42 lines aren’t shown here.

drivers/iommu/mtk_iommu.c+13−13

This diff is large: its 49 lines aren’t shown here.

drivers/irqchip/Kconfig+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/irqchip/irq-bcm2712-mip.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/irqchip/irq-gic-v2m.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/irqchip/irq-gic-v3-its-msi-parent.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/irqchip/irq-gic-v3-mbi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/irqchip/irq-mvebu-gicp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/irqchip/irq-mvebu-odmi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/irqchip/irq-qcom-mpm.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/irqchip/irq-renesas-rzv2h.c+8−0

This diff is large: its 15 lines aren’t shown here.

drivers/irqchip/irq-riscv-imsic-state.c+5−5

This diff is large: its 39 lines aren’t shown here.

drivers/irqchip/irq-sg2042-msi.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/mcb/mcb-parse.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/md/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/md/bcache/super.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/md/dm-bufio.c+8−1

This diff is large: its 23 lines aren’t shown here.

drivers/md/dm-integrity.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/md/dm-table.c+5−6

This diff is large: its 46 lines aren’t shown here.

drivers/md/md-bitmap.c+2−3

This diff is large: its 12 lines aren’t shown here.

drivers/md/persistent-data/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/md/raid1.c+16−10

This diff is large: its 42 lines aren’t shown here.

drivers/md/raid10.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/cec/i2c/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/i2c/Kconfig+4−1

This diff is large: its 13 lines aren’t shown here.

drivers/media/platform/synopsys/hdmirx/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/test-drivers/vivid/Kconfig+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c+6−2

This diff is large: its 36 lines aren’t shown here.

drivers/misc/mei/hw-me-regs.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/misc/mei/pci-me.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/misc/mei/vsc-tp.c+22−18

This diff is large: its 104 lines aren’t shown here.

drivers/misc/pci_endpoint_test.c+1−20

This diff is large: its 90 lines aren’t shown here.

drivers/mmc/host/Kconfig+1−1

This diff is large: its 10 lines aren’t shown here.

drivers/mmc/host/renesas_sdhi_core.c+5−7

This diff is large: its 49 lines aren’t shown here.

drivers/mmc/host/sdhci-of-dwcmshc.c+40−0

This diff is large: its 68 lines aren’t shown here.

drivers/mmc/host/sdhci_am654.c+34−1

This diff is large: its 84 lines aren’t shown here.

drivers/mtd/inftlcore.c+5−4

This diff is large: its 16 lines aren’t shown here.

drivers/mtd/nand/Makefile+0−3

This diff is large: its 12 lines aren’t shown here.

drivers/mtd/nand/raw/r852.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/net/bonding/bond_main.c+9−4

This diff is large: its 28 lines aren’t shown here.

drivers/net/can/kvaser_pciefd.c+102−80

This diff is large: its 389 lines aren’t shown here.

drivers/net/can/m_can/m_can.c+2−1

This diff is large: its 19 lines aren’t shown here.

drivers/net/can/rockchip/rockchip_canfd-core.c+5−4

This diff is large: its 30 lines aren’t shown here.

drivers/net/can/slcan/slcan-core.c+20−6

This diff is large: its 64 lines aren’t shown here.

drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c+33−9

This diff is large: its 81 lines aren’t shown here.

drivers/net/dsa/b53/b53_common.c+193−57

This diff is large: its 474 lines aren’t shown here.

drivers/net/dsa/b53/b53_priv.h+3−0

This diff is large: its 24 lines aren’t shown here.

drivers/net/dsa/b53/b53_regs.h+14−0

This diff is large: its 28 lines aren’t shown here.

drivers/net/dsa/bcm_sf2.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/dsa/microchip/ksz_common.c+107−28

This diff is large: its 200 lines aren’t shown here.

drivers/net/dsa/mt7530.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/net/dsa/mv88e6xxx/chip.c+12−1

This diff is large: its 27 lines aren’t shown here.

drivers/net/dsa/mv88e6xxx/devlink.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/net/dsa/ocelot/felix_vsc9959.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/net/dsa/sja1105/sja1105_main.c+1−5

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/airoha/airoha_eth.c+9−13

This diff is large: its 50 lines aren’t shown here.

drivers/net/ethernet/airoha/airoha_npu.c+6−4

This diff is large: its 19 lines aren’t shown here.

drivers/net/ethernet/amd/pds_core/adminq.c+14−22

This diff is large: its 104 lines aren’t shown here.

drivers/net/ethernet/amd/pds_core/auxbus.c+0−4

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/amd/pds_core/core.c+4−5

This diff is large: its 24 lines aren’t shown here.

drivers/net/ethernet/amd/pds_core/core.h+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/amd/pds_core/debugfs.c+3−2

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/amd/pds_core/devlink.c+1−3

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe-desc.c+7−2

This diff is large: its 16 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe-dev.c+22−2

This diff is large: its 44 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe-drv.c+9−2

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe.h+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/broadcom/Kconfig+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt.c+51−24

This diff is large: its 250 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c+15−5

This diff is large: its 36 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c+33−7

This diff is large: its 68 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c+21−8

This diff is large: its 49 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c+3−6

This diff is large: its 42 lines aren’t shown here.

drivers/net/ethernet/cadence/macb_main.c+6−13

This diff is large: its 29 lines aren’t shown here.

drivers/net/ethernet/cavium/Kconfig+1−1

This diff is large: its 10 lines aren’t shown here.

drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/dlink/dl2k.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/dlink/dl2k.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/engleder/tsnep_main.c+19−11

This diff is large: its 89 lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/enetc.c+28−17

This diff is large: its 91 lines aren’t shown here.

drivers/net/ethernet/freescale/fec_main.c+6−1

This diff is large: its 14 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_common.h+5−3

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c+7−4

This diff is large: its 39 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_diagnose.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c+11−8

This diff is large: its 63 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c+7−0

This diff is large: its 21 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_irq.c+15−9

This diff is large: its 77 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c+4−4

This diff is large: its 25 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c+10−1

This diff is large: its 37 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h+3−0

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c+39−43

This diff is large: its 155 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c+7−6

This diff is large: its 27 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c+19−6

This diff is large: its 65 lines aren’t shown here.

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_adapter.c+18−29

This diff is large: its 102 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_adapter.h+4−2

This diff is large: its 21 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_ddp.c+5−5

This diff is large: its 21 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_lag.c+6−0

This diff is large: its 19 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_virtchnl.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf.h+10−10

This diff is large: its 50 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf_lib.c+36−50

This diff is large: its 169 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf_main.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf_txrx.c+9−9

This diff is large: its 32 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc_defines.h+5−1

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc_main.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc_ptp.c+76−39

This diff is large: its 222 lines aren’t shown here.

drivers/net/ethernet/marvell/octeon_ep/octep_main.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/af/cgx.c+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c+19−5

This diff is large: its 62 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c+8−3

This diff is large: its 40 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c+5−5

This diff is large: its 38 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c+6−3

This diff is large: its 16 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/qos.c+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/nic/rep.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/mediatek/mtk_eth_soc.c+71−41

This diff is large: its 217 lines aren’t shown here.

drivers/net/ethernet/mediatek/mtk_eth_soc.h+10−1

This diff is large: its 25 lines aren’t shown here.

drivers/net/ethernet/mediatek/mtk_star_emac.c+7−6

This diff is large: its 41 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c+2−4

This diff is large: its 32 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c+29−3

This diff is large: its 53 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en_main.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c+1−4

This diff is large: its 19 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c+18−8

This diff is large: its 56 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/rdma.c+6−5

This diff is large: its 44 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/rdma.h+2−2

This diff is large: its 15 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic.h+4−4

This diff is large: its 19 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_csr.h+2−0

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_fw.c+119−78

This diff is large: its 314 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_irq.c+96−46

This diff is large: its 235 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_mac.c+0−6

This diff is large: its 13 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_netdev.c+3−2

This diff is large: its 21 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_pci.c+7−7

This diff is large: its 55 lines aren’t shown here.

drivers/net/ethernet/microchip/lan743x_main.c+16−11

This diff is large: its 91 lines aren’t shown here.

drivers/net/ethernet/microchip/lan743x_main.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/mscc/ocelot.c+6−0

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/qlogic/qede/qede_main.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c+5−2

This diff is large: its 14 lines aren’t shown here.

drivers/net/ethernet/realtek/rtase/rtase_main.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/stmicro/stmmac/dwmac1000.h+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/sun/niu.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/ti/am65-cpsw-nuss.c+15−2

This diff is large: its 52 lines aren’t shown here.

drivers/net/ethernet/ti/icssg/icss_iep.c+58−63

This diff is large: its 155 lines aren’t shown here.

drivers/net/ethernet/ti/icssg/icssg_common.c+17−7

This diff is large: its 88 lines aren’t shown here.

drivers/net/ethernet/ti/icssg/icssg_prueth.c+10−6

This diff is large: its 54 lines aren’t shown here.

drivers/net/ethernet/vertexcom/mse102x.c+29−7

This diff is large: its 109 lines aren’t shown here.

drivers/net/ethernet/wangxun/libwx/wx_hw.c+8−2

This diff is large: its 23 lines aren’t shown here.

drivers/net/ethernet/wangxun/libwx/wx_lib.c+4−2

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/wangxun/libwx/wx_type.h+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/wangxun/ngbe/ngbe_main.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c+7−1

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/wangxun/txgbe/txgbe_main.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/wangxun/txgbe/txgbe_type.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/net/hyperv/hyperv_net.h+12−1

This diff is large: its 27 lines aren’t shown here.

drivers/net/hyperv/netvsc.c+48−9

This diff is large: its 93 lines aren’t shown here.

drivers/net/hyperv/netvsc_drv.c+14−48

This diff is large: its 95 lines aren’t shown here.

drivers/net/hyperv/rndis_filter.c+5−19

This diff is large: its 42 lines aren’t shown here.

drivers/net/mdio/mdio-mux-meson-gxl.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/net/phy/dp83822.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/phy/micrel.c+0−7

This diff is large: its 21 lines aren’t shown here.

drivers/net/phy/microchip.c+3−43

This diff is large: its 60 lines aren’t shown here.

drivers/net/phy/phy_device.c+42−15

This diff is large: its 85 lines aren’t shown here.

drivers/net/phy/phy_led_triggers.c+13−10

This diff is large: its 55 lines aren’t shown here.

drivers/net/phy/phylink.c+22−16

This diff is large: its 60 lines aren’t shown here.

drivers/net/ppp/ppp_synctty.c+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/team/team_core.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/net/usb/rndis_host.c+2−14

This diff is large: its 31 lines aren’t shown here.

drivers/net/virtio_net.c+75−17

This diff is large: its 170 lines aren’t shown here.

drivers/net/vmxnet3/vmxnet3_drv.c+3−2

This diff is large: its 26 lines aren’t shown here.

drivers/net/vmxnet3/vmxnet3_xdp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/vxlan/vxlan_vnifilter.c+7−1

This diff is large: its 22 lines aren’t shown here.

drivers/net/wireless/ath/carl9170/fw.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/atmel/at76c50x-usb.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c+3−1

This diff is large: its 12 lines aren’t shown here.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c+4−2

This diff is large: its 19 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/cfg/sc.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/iwl-config.h+9−7

This diff is large: its 61 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/iwl-csr.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c+6−10

This diff is large: its 45 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/iwl-trans.c+21−7

This diff is large: its 89 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/iwl-trans.h+8−6

This diff is large: its 55 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/agg.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/d3.c+9−8

This diff is large: its 55 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/debugfs.c+4−3

This diff is large: its 22 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/fw.c+10−3

This diff is large: its 37 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/iface.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/mac80211.c+6−2

This diff is large: its 44 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/mld.c+9−2

This diff is large: its 34 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/mld.h+0−5

This diff is large: its 12 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/pcie/drv.c+121−126

This diff is large: its 727 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/pcie/internal.h+5−4

This diff is large: its 24 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c+7−1

This diff is large: its 16 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/pcie/trans.c+12−4

This diff is large: its 58 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/pcie/tx.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/tests/devinfo.c+5−10

This diff is large: its 37 lines aren’t shown here.

drivers/net/wireless/mediatek/mt76/dma.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/wireless/mediatek/mt76/mt7925/mcu.c+2−2

This diff is large: its 17 lines aren’t shown here.

drivers/net/wireless/purelifi/plfxlc/mac.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/net/wireless/ti/wl1251/tx.c+3−1

This diff is large: its 12 lines aren’t shown here.

drivers/net/xen-netfront.c+12−5

This diff is large: its 33 lines aren’t shown here.

drivers/nvme/host/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/nvme/host/core.c+38−4

This diff is large: its 84 lines aren’t shown here.

drivers/nvme/host/multipath.c+10−9

This diff is large: its 47 lines aren’t shown here.

drivers/nvme/host/nvme.h+2−1

This diff is large: its 21 lines aren’t shown here.

drivers/nvme/host/pci.c+12−2

This diff is large: its 57 lines aren’t shown here.

drivers/nvme/host/sysfs.c+28−0

This diff is large: its 42 lines aren’t shown here.

drivers/nvme/host/tcp.c+31−2

This diff is large: its 61 lines aren’t shown here.

drivers/nvme/target/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/nvme/target/auth.c+2−3

This diff is large: its 24 lines aren’t shown here.

drivers/nvme/target/core.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/nvme/target/fc.c+20−40

This diff is large: its 149 lines aren’t shown here.

drivers/nvme/target/fcloop.c+40−34

This diff is large: its 208 lines aren’t shown here.

drivers/nvme/target/pci-epf.c+81−46

This diff is large: its 308 lines aren’t shown here.

drivers/nvme/target/tcp.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/nvmem/core.c+32−8

This diff is large: its 79 lines aren’t shown here.

drivers/nvmem/qfprom.c+20−6

This diff is large: its 51 lines aren’t shown here.

drivers/nvmem/rockchip-otp.c+15−2

This diff is large: its 58 lines aren’t shown here.

drivers/pci/hotplug/s390_pci_hpc.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/pci/msi/msi.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/pci/pci.c+0−4

This diff is large: its 18 lines aren’t shown here.

drivers/pci/quirks.c+6−6

This diff is large: its 19 lines aren’t shown here.

drivers/pci/setup-bus.c+4−0

This diff is large: its 18 lines aren’t shown here.

drivers/phy/phy-can-transceiver.c+15−7

This diff is large: its 36 lines aren’t shown here.

drivers/phy/qualcomm/phy-qcom-qmp-ufs.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/phy/renesas/phy-rcar-gen3-usb2.c+75−60

This diff is large: its 295 lines aren’t shown here.

drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/phy/starfive/phy-jh7110-usb.c+7−0

This diff is large: its 28 lines aren’t shown here.

drivers/phy/tegra/xusb-tegra186.c+27−19

This diff is large: its 133 lines aren’t shown here.

drivers/phy/tegra/xusb.c+4−4

This diff is large: its 21 lines aren’t shown here.

drivers/pinctrl/freescale/pinctrl-imx.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/pinctrl/mediatek/mtk-eint.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/pinctrl/mediatek/pinctrl-airoha.c+70−89

This diff is large: its 405 lines aren’t shown here.

drivers/pinctrl/mediatek/pinctrl-mtk-common.c+9−3

This diff is large: its 19 lines aren’t shown here.

drivers/pinctrl/meson/pinctrl-meson.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/pinctrl/qcom/pinctrl-msm.c+12−11

This diff is large: its 66 lines aren’t shown here.

drivers/pinctrl/qcom/pinctrl-sm8750.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/platform/mellanox/mlxbf-bootctl.c+2−2

This diff is large: its 12 lines aren’t shown here.

drivers/platform/x86/amd/hsmp/acpi.c+1−2

This diff is large: its 11 lines aren’t shown here.

drivers/platform/x86/amd/hsmp/hsmp.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/platform/x86/amd/hsmp/plat.c+5−1

This diff is large: its 27 lines aren’t shown here.

drivers/platform/x86/amd/pmc/pmc-quirks.c+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/platform/x86/amd/pmc/pmc.c+3−4

This diff is large: its 14 lines aren’t shown here.

drivers/platform/x86/amd/pmf/auto-mode.c+2−2

This diff is large: its 12 lines aren’t shown here.

drivers/platform/x86/amd/pmf/cnqf.c+4−4

This diff is large: its 15 lines aren’t shown here.

drivers/platform/x86/amd/pmf/core.c+14−0

This diff is large: its 21 lines aren’t shown here.

drivers/platform/x86/amd/pmf/pmf.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/platform/x86/amd/pmf/sps.c+8−4

This diff is large: its 28 lines aren’t shown here.

drivers/platform/x86/amd/pmf/tee-if.c+26−3

This diff is large: its 69 lines aren’t shown here.

drivers/platform/x86/asus-laptop.c+6−3

This diff is large: its 18 lines aren’t shown here.

drivers/platform/x86/asus-wmi.c+12−2

This diff is large: its 49 lines aren’t shown here.

drivers/platform/x86/dell/alienware-wmi-wmax.c+58−4

This diff is large: its 105 lines aren’t shown here.

drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/platform/x86/fujitsu-laptop.c+29−4

This diff is large: its 73 lines aren’t shown here.

drivers/platform/x86/ideapad-laptop.c+16−0

This diff is large: its 30 lines aren’t shown here.

drivers/platform/x86/intel/hid.c+11−10

This diff is large: its 28 lines aren’t shown here.

drivers/platform/x86/intel/pmc/arl.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c+9−4

This diff is large: its 33 lines aren’t shown here.

drivers/platform/x86/msi-wmi-platform.c+63−36

This diff is large: its 265 lines aren’t shown here.

drivers/platform/x86/think-lmi.c+14−12

This diff is large: its 65 lines aren’t shown here.

drivers/platform/x86/think-lmi.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/platform/x86/thinkpad_acpi.c+7−0

This diff is large: its 28 lines aren’t shown here.

drivers/platform/x86/x86-android-tablets/dmi.c+13−1

This diff is large: its 28 lines aren’t shown here.

drivers/platform/x86/x86-android-tablets/other.c+92−32

This diff is large: its 222 lines aren’t shown here.

drivers/platform/x86/x86-android-tablets/x86-android-tablets.h+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/pmdomain/core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/pmdomain/renesas/rcar-gen4-sysc.c+0−5

This diff is large: its 12 lines aren’t shown here.

drivers/pmdomain/renesas/rcar-sysc.c+0−5

This diff is large: its 12 lines aren’t shown here.

drivers/power/supply/power_supply_sysfs.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/pps/generators/pps_gen_tio.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/ptp/ptp_ocp.c+68−9

This diff is large: its 164 lines aren’t shown here.

drivers/pwm/core.c+7−6

This diff is large: its 40 lines aren’t shown here.

drivers/pwm/pwm-axi-pwmgen.c+7−3

This diff is large: its 35 lines aren’t shown here.

drivers/pwm/pwm-fsl-ftm.c+6−0

This diff is large: its 20 lines aren’t shown here.

drivers/pwm/pwm-mediatek.c+6−2

This diff is large: its 28 lines aren’t shown here.

drivers/pwm/pwm-rcar.c+13−11

This diff is large: its 44 lines aren’t shown here.

drivers/pwm/pwm-stm32.c+3−9

This diff is large: its 26 lines aren’t shown here.

drivers/ras/amd/atl/internal.h+3−0

This diff is large: its 8 lines aren’t shown here.

drivers/ras/amd/atl/umc.c+17−2

This diff is large: its 40 lines aren’t shown here.

drivers/ras/amd/fmpm.c+8−1

This diff is large: its 23 lines aren’t shown here.

drivers/regulator/max20086-regulator.c+6−1

This diff is large: its 21 lines aren’t shown here.

drivers/remoteproc/qcom_wcnss.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/s390/block/Kconfig+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/s390/virtio/virtio_ccw.c+12−4

This diff is large: its 41 lines aren’t shown here.

drivers/scsi/hisi_sas/hisi_sas_main.c+20−0

This diff is large: its 29 lines aren’t shown here.

drivers/scsi/hisi_sas/hisi_sas_v2_hw.c+7−2

This diff is large: its 25 lines aren’t shown here.

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c+12−2

This diff is large: its 35 lines aren’t shown here.

drivers/scsi/megaraid/megaraid_sas.h+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/scsi/megaraid/megaraid_sas_base.c+7−2

This diff is large: its 23 lines aren’t shown here.

drivers/scsi/megaraid/megaraid_sas_fusion.c+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/scsi/mpi3mr/mpi3mr_fw.c+7−1

This diff is large: its 43 lines aren’t shown here.

drivers/scsi/myrb.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/scsi/pm8001/pm8001_sas.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/scsi/scsi.c+24−12

This diff is large: its 75 lines aren’t shown here.

drivers/scsi/scsi_lib.c+5−1

This diff is large: its 14 lines aren’t shown here.

drivers/scsi/scsi_transport_iscsi.c+5−2

This diff is large: its 17 lines aren’t shown here.

drivers/scsi/scsi_transport_srp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/scsi/sd_zbc.c+5−1

This diff is large: its 25 lines aren’t shown here.

drivers/scsi/smartpqi/smartpqi_init.c+7−6

This diff is large: its 59 lines aren’t shown here.

drivers/scsi/storvsc_drv.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/soc/samsung/exynos-usi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/soundwire/bus.c+5−4

This diff is large: its 30 lines aren’t shown here.

drivers/soundwire/intel_auxdevice.c+13−23

This diff is large: its 78 lines aren’t shown here.

drivers/spi/spi-fsl-dspi.c+45−1

This diff is large: its 119 lines aren’t shown here.

drivers/spi/spi-fsl-qspi.c+2−6

This diff is large: its 27 lines aren’t shown here.

drivers/spi/spi-imx.c+4−1

This diff is large: its 14 lines aren’t shown here.

drivers/spi/spi-loopback-test.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/spi/spi-mem.c+5−1

This diff is large: its 13 lines aren’t shown here.

drivers/spi/spi-qpic-snand.c+2−3

This diff is large: its 19 lines aren’t shown here.

drivers/spi/spi-stm32-ospi.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/spi/spi-sun4i.c+5−1

This diff is large: its 27 lines aren’t shown here.

drivers/spi/spi-tegra114.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/spi/spi-tegra210-quad.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/staging/axis-fifo/axis-fifo.c+3−11

This diff is large: its 55 lines aren’t shown here.

drivers/staging/iio/adc/ad7816.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/target/iscsi/iscsi_target.c+1−1

This diff is large: its 10 lines aren’t shown here.

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c+4−3

This diff is large: its 21 lines aren’t shown here.

drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c+17−16

This diff is large: its 79 lines aren’t shown here.

drivers/thermal/intel/x86_pkg_temp_thermal.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/tty/serial/msm_serial.c+6−0

This diff is large: its 13 lines aren’t shown here.

drivers/tty/serial/sifive.c+6−0

This diff is large: its 25 lines aren’t shown here.

drivers/tty/vt/selection.c+2−3

This diff is large: its 16 lines aren’t shown here.

drivers/ufs/core/ufs-mcq.c+5−7

This diff is large: its 26 lines aren’t shown here.

drivers/ufs/core/ufs-sysfs.c+54−0

This diff is large: its 75 lines aren’t shown here.

drivers/ufs/core/ufshcd-priv.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/ufs/core/ufshcd.c+99−26

This diff is large: its 276 lines aren’t shown here.

drivers/ufs/host/ufs-exynos.c+63−22

This diff is large: its 207 lines aren’t shown here.

drivers/ufs/host/ufs-exynos.h+5−1

This diff is large: its 27 lines aren’t shown here.

drivers/ufs/host/ufs-qcom.c+43−0

This diff is large: its 85 lines aren’t shown here.

drivers/ufs/host/ufs-qcom.h+18−0

This diff is large: its 34 lines aren’t shown here.

drivers/uio/uio_hv_generic.c+17−22

This diff is large: its 77 lines aren’t shown here.

drivers/usb/cdns3/cdns3-gadget.c+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/usb/cdns3/cdnsp-gadget.c+31−0

This diff is large: its 52 lines aren’t shown here.

drivers/usb/cdns3/cdnsp-gadget.h+6−0

This diff is large: its 27 lines aren’t shown here.

drivers/usb/cdns3/cdnsp-pci.c+10−2

This diff is large: its 33 lines aren’t shown here.

drivers/usb/cdns3/cdnsp-ring.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/usb/cdns3/core.h+3−0

This diff is large: its 17 lines aren’t shown here.

drivers/usb/chipidea/ci_hdrc_imx.c+31−13

This diff is large: its 112 lines aren’t shown here.

drivers/usb/class/cdc-wdm.c+16−5

This diff is large: its 64 lines aren’t shown here.

drivers/usb/class/usbtmc.c+36−23

This diff is large: its 145 lines aren’t shown here.

drivers/usb/core/quirks.c+9−0

This diff is large: its 30 lines aren’t shown here.

drivers/usb/dwc3/core.h+4−0

This diff is large: its 18 lines aren’t shown here.

drivers/usb/dwc3/dwc3-xilinx.c+1−3

This diff is large: its 17 lines aren’t shown here.

drivers/usb/dwc3/gadget.c+29−37

This diff is large: its 138 lines aren’t shown here.

drivers/usb/gadget/composite.c+5−7

This diff is large: its 21 lines aren’t shown here.

drivers/usb/gadget/function/f_ecm.c+7−0

This diff is large: its 21 lines aren’t shown here.

drivers/usb/gadget/function/f_midi2.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/gadget/udc/tegra-xudc.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/usb/host/ohci-pci.c+23−0

This diff is large: its 37 lines aren’t shown here.

drivers/usb/host/uhci-platform.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/host/xhci-dbgcap.c+16−3

This diff is large: its 57 lines aren’t shown here.

drivers/usb/host/xhci-dbgcap.h+3−0

This diff is large: its 24 lines aren’t shown here.

drivers/usb/host/xhci-hub.c+16−14

This diff is large: its 56 lines aren’t shown here.

drivers/usb/host/xhci-ring.c+13−17

This diff is large: its 90 lines aren’t shown here.

drivers/usb/host/xhci-tegra.c+3−0

This diff is large: its 24 lines aren’t shown here.

drivers/usb/host/xhci.c+5−13

This diff is large: its 54 lines aren’t shown here.

drivers/usb/host/xhci.h+3−2

This diff is large: its 26 lines aren’t shown here.

drivers/usb/misc/onboard_usb_dev.c+8−2

This diff is large: its 17 lines aren’t shown here.

drivers/usb/serial/ftdi_sio.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/usb/serial/ftdi_sio_ids.h+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/usb/serial/option.c+3−0

This diff is large: its 17 lines aren’t shown here.

drivers/usb/serial/usb-serial-simple.c+7−0

This diff is large: its 28 lines aren’t shown here.

drivers/usb/storage/unusual_uas.h+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/usb/typec/class.c+20−4

This diff is large: its 94 lines aren’t shown here.

drivers/usb/typec/class.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/usb/typec/tcpm/tcpm.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/typec/ucsi/displayport.c+13−8

This diff is large: its 81 lines aren’t shown here.

drivers/usb/typec/ucsi/ucsi.c+34−0

This diff is large: its 41 lines aren’t shown here.

drivers/usb/typec/ucsi/ucsi.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/vfio/pci/vfio_pci_config.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/vfio/pci/vfio_pci_core.c+6−6

This diff is large: its 21 lines aren’t shown here.

drivers/vhost/scsi.c+56−18

This diff is large: its 137 lines aren’t shown here.

drivers/virtio/virtio.c+6−0

This diff is large: its 13 lines aren’t shown here.

drivers/virtio/virtio_pci_modern.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/virtio/virtio_ring.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/xen/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/xen/balloon.c+24−10

This diff is large: its 67 lines aren’t shown here.

drivers/xen/swiotlb-xen.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/xen/xenbus/xenbus.h+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/xen/xenbus/xenbus_comms.c+4−5

This diff is large: its 28 lines aren’t shown here.

drivers/xen/xenbus/xenbus_dev_frontend.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/xen/xenbus/xenbus_probe.c+8−6

This diff is large: its 29 lines aren’t shown here.

drivers/xen/xenbus/xenbus_probe_frontend.c+1−0

This diff is large: its 6 lines aren’t shown here.

drivers/xen/xenbus/xenbus_xs.c+16−2

This diff is large: its 53 lines aren’t shown here.

fs/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

fs/afs/dynroot.c+2−2

This diff is large: its 12 lines aren’t shown here.

fs/bcachefs/Kconfig+3−4

This diff is large: its 22 lines aren’t shown here.

fs/bcachefs/alloc_foreground.c+23−1

This diff is large: its 32 lines aren’t shown here.

fs/bcachefs/alloc_foreground.h+3−1

This diff is large: its 11 lines aren’t shown here.

fs/bcachefs/backpointers.c+79−38

This diff is large: its 161 lines aren’t shown here.

fs/bcachefs/bcachefs.h+4−2

This diff is large: its 20 lines aren’t shown here.

fs/bcachefs/bcachefs_format.h+43−38

This diff is large: its 104 lines aren’t shown here.

fs/bcachefs/bkey_methods.c+20−4

This diff is large: its 52 lines aren’t shown here.

fs/bcachefs/btree_cache.c+4−5

This diff is large: its 30 lines aren’t shown here.

fs/bcachefs/btree_gc.c+25−2

This diff is large: its 41 lines aren’t shown here.

fs/bcachefs/btree_io.c+8−1

This diff is large: its 52 lines aren’t shown here.

fs/bcachefs/btree_iter.c+20−11

This diff is large: its 103 lines aren’t shown here.

fs/bcachefs/btree_journal_iter.c+3−4

This diff is large: its 28 lines aren’t shown here.

fs/bcachefs/btree_key_cache.c+17−8

This diff is large: its 73 lines aren’t shown here.

fs/bcachefs/btree_key_cache.h+1−2

This diff is large: its 10 lines aren’t shown here.

fs/bcachefs/btree_node_scan.c+3−3

This diff is large: its 27 lines aren’t shown here.

fs/bcachefs/btree_update_interior.c+33−18

This diff is large: its 131 lines aren’t shown here.

fs/bcachefs/btree_write_buffer.c+4−4

This diff is large: its 15 lines aren’t shown here.

fs/bcachefs/buckets.c+12−6

This diff is large: its 41 lines aren’t shown here.

fs/bcachefs/buckets.h+1−5

This diff is large: its 20 lines aren’t shown here.

fs/bcachefs/checksum.c+57−190

This diff is large: its 369 lines aren’t shown here.

fs/bcachefs/checksum.h+1−2

This diff is large: its 17 lines aren’t shown here.

fs/bcachefs/data_update.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/bcachefs/dirent.c+21−36

This diff is large: its 154 lines aren’t shown here.

fs/bcachefs/dirent.h+16−1

This diff is large: its 31 lines aren’t shown here.

fs/bcachefs/disk_accounting.c+15−2

This diff is large: its 38 lines aren’t shown here.

fs/bcachefs/disk_accounting.h+11−5

This diff is large: its 58 lines aren’t shown here.

fs/bcachefs/disk_groups.c+12−13

This diff is large: its 36 lines aren’t shown here.

fs/bcachefs/ec.c+9−15

This diff is large: its 41 lines aren’t shown here.

fs/bcachefs/ec.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/bcachefs/errcode.h+2−2

This diff is large: its 18 lines aren’t shown here.

fs/bcachefs/error.c+15−6

This diff is large: its 55 lines aren’t shown here.

fs/bcachefs/error.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/bcachefs/extents.c+4−3

This diff is large: its 21 lines aren’t shown here.

fs/bcachefs/extents.h+0−7

This diff is large: its 14 lines aren’t shown here.

fs/bcachefs/fs-io-buffered.c+16−1

This diff is large: its 28 lines aren’t shown here.

fs/bcachefs/fs-io-pagecache.c+11−7

This diff is large: its 47 lines aren’t shown here.

fs/bcachefs/fs-io.c+35−9

This diff is large: its 58 lines aren’t shown here.

fs/bcachefs/fs-ioctl.c+0−217

This diff is large: its 231 lines aren’t shown here.

fs/bcachefs/fs-ioctl.h+0−75

This diff is large: its 82 lines aren’t shown here.

fs/bcachefs/fs.c+378−83

This diff is large: its 599 lines aren’t shown here.

fs/bcachefs/fsck.c+81−2

This diff is large: its 132 lines aren’t shown here.

fs/bcachefs/inode.c+36−0

This diff is large: its 50 lines aren’t shown here.

fs/bcachefs/inode.h+11−1

This diff is large: its 26 lines aren’t shown here.

fs/bcachefs/inode_format.h+5−4

This diff is large: its 30 lines aren’t shown here.

fs/bcachefs/io_read.c+17−10

This diff is large: its 55 lines aren’t shown here.

fs/bcachefs/io_write.c+21−0

This diff is large: its 28 lines aren’t shown here.

fs/bcachefs/journal.c+33−3

This diff is large: its 57 lines aren’t shown here.

fs/bcachefs/journal.h+1−6

This diff is large: its 21 lines aren’t shown here.

fs/bcachefs/journal_io.c+5−3

This diff is large: its 36 lines aren’t shown here.

fs/bcachefs/journal_reclaim.c+17−6

This diff is large: its 54 lines aren’t shown here.

fs/bcachefs/move.c+2−1

This diff is large: its 10 lines aren’t shown here.

fs/bcachefs/movinggc.c+7−0

This diff is large: its 14 lines aren’t shown here.

fs/bcachefs/movinggc.h+9−0

This diff is large: its 16 lines aren’t shown here.

fs/bcachefs/namei.c+3−6

This diff is large: its 37 lines aren’t shown here.

fs/bcachefs/opts.h+5−0

This diff is large: its 12 lines aren’t shown here.

fs/bcachefs/rebalance.c+10−3

This diff is large: its 41 lines aren’t shown here.

fs/bcachefs/rebalance.h+1−1

This diff is large: its 9 lines aren’t shown here.

fs/bcachefs/recovery.c+13−6

This diff is large: its 52 lines aren’t shown here.

fs/bcachefs/recovery_passes.c+37−33

This diff is large: its 94 lines aren’t shown here.

fs/bcachefs/sb-downgrade.c+4−0

This diff is large: its 11 lines aren’t shown here.

fs/bcachefs/sb-errors_format.h+17−6

This diff is large: its 80 lines aren’t shown here.

fs/bcachefs/sb-members.c+4−2

This diff is large: its 14 lines aren’t shown here.

fs/bcachefs/sb-members.h+8−5

This diff is large: its 29 lines aren’t shown here.

fs/bcachefs/snapshot.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/bcachefs/str_hash.h+2−3

This diff is large: its 22 lines aren’t shown here.

fs/bcachefs/subvolume.c+3−2

This diff is large: its 19 lines aren’t shown here.

fs/bcachefs/super-io.c+20−3

This diff is large: its 43 lines aren’t shown here.

fs/bcachefs/super.c+103−117

This diff is large: its 370 lines aren’t shown here.

fs/bcachefs/sysfs.c+3−4

This diff is large: its 15 lines aren’t shown here.

fs/bcachefs/tests.c+4−0

This diff is large: its 18 lines aren’t shown here.

fs/bcachefs/thread_with_file.c+3−1

This diff is large: its 12 lines aren’t shown here.

fs/bcachefs/util.h+38−0

This diff is large: its 43 lines aren’t shown here.

fs/bcachefs/xattr.c+6−0

This diff is large: its 13 lines aren’t shown here.

fs/bcachefs/xattr_format.h+7−1

This diff is large: its 15 lines aren’t shown here.

fs/binfmt_elf.c+47−24

This diff is large: its 114 lines aren’t shown here.

fs/btrfs/Kconfig+1−1

This diff is large: its 11 lines aren’t shown here.

fs/btrfs/compression.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/btrfs/discard.c+15−2

This diff is large: its 38 lines aren’t shown here.

fs/btrfs/disk-io.c+0−2

This diff is large: its 16 lines aren’t shown here.

fs/btrfs/extent_io.c+3−3

This diff is large: its 20 lines aren’t shown here.

fs/btrfs/extent_io.h+2−0

This diff is large: its 9 lines aren’t shown here.

fs/btrfs/file.c+7−2

This diff is large: its 31 lines aren’t shown here.

fs/btrfs/fs.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/btrfs/inode.c+15−5

This diff is large: its 66 lines aren’t shown here.

fs/btrfs/ioctl.c+2−0

This diff is large: its 9 lines aren’t shown here.

fs/btrfs/relocation.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/btrfs/scrub.c+2−2

This diff is large: its 11 lines aren’t shown here.

fs/btrfs/subpage.c+2−2

This diff is large: its 18 lines aren’t shown here.

fs/btrfs/super.c+5−2

This diff is large: its 21 lines aren’t shown here.

fs/btrfs/tree-checker.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/btrfs/volumes.c+1−90

This diff is large: its 125 lines aren’t shown here.

fs/btrfs/zoned.c+16−3

This diff is large: its 54 lines aren’t shown here.

fs/buffer.c+66−31

This diff is large: its 210 lines aren’t shown here.

fs/cachefiles/key.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/ceph/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

fs/ceph/inode.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/dax.c+1−0

This diff is large: its 8 lines aren’t shown here.

fs/devpts/inode.c+2−2

This diff is large: its 15 lines aren’t shown here.

fs/erofs/Kconfig+1−1

This diff is large: its 10 lines aren’t shown here.

fs/erofs/erofs_fs.h+4−4

This diff is large: its 30 lines aren’t shown here.

fs/erofs/fileio.c+4−2

This diff is large: its 22 lines aren’t shown here.

fs/erofs/super.c+0−1

This diff is large: its 8 lines aren’t shown here.

fs/erofs/zdata.c+14−18

This diff is large: its 91 lines aren’t shown here.

fs/erofs/zmap.c+3−2

This diff is large: its 19 lines aren’t shown here.

fs/eventpoll.c+11−2

This diff is large: its 27 lines aren’t shown here.

fs/ext4/block_validity.c+2−3

This diff is large: its 13 lines aren’t shown here.

fs/ext4/ialloc.c+2−1

This diff is large: its 10 lines aren’t shown here.

fs/ext4/inode.c+52−23

This diff is large: its 119 lines aren’t shown here.

fs/ext4/mballoc.c+10−11

This diff is large: its 52 lines aren’t shown here.

fs/ext4/namei.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/file.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/fuse/virtio_fs.c+3−0

This diff is large: its 10 lines aren’t shown here.

fs/gfs2/Kconfig+0−1

This diff is large: its 8 lines aren’t shown here.

fs/hfs/bnode.c+6−0

This diff is large: its 13 lines aren’t shown here.

fs/hfsplus/bnode.c+6−0

This diff is large: its 13 lines aren’t shown here.

fs/iomap/buffered-io.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/isofs/export.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/jbd2/revoke.c+9−6

This diff is large: its 43 lines aren’t shown here.

fs/namei.c+62−27

This diff is large: its 148 lines aren’t shown here.

fs/namespace.c+64−56

This diff is large: its 242 lines aren’t shown here.

fs/netfs/fscache_cache.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/netfs/fscache_cookie.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/netfs/main.c+4−0

This diff is large: its 26 lines aren’t shown here.

fs/nfs/Kconfig+1−1

This diff is large: its 16 lines aren’t shown here.

fs/nfs/client.c+9−0

This diff is large: its 30 lines aren’t shown here.

fs/nfs/dir.c+14−1

This diff is large: its 29 lines aren’t shown here.

fs/nfs/direct.c+1−1

This diff is large: its 16 lines aren’t shown here.

fs/nfs/filelayout/filelayoutdev.c+3−3

This diff is large: its 27 lines aren’t shown here.

fs/nfs/flexfilelayout/flexfilelayout.c+3−3

This diff is large: its 27 lines aren’t shown here.

fs/nfs/flexfilelayout/flexfilelayoutdev.c+3−3

This diff is large: its 27 lines aren’t shown here.

fs/nfs/internal.h+0−7

This diff is large: its 19 lines aren’t shown here.

fs/nfs/localio.c+1−1

This diff is large: its 16 lines aren’t shown here.

fs/nfs/netns.h+5−1

This diff is large: its 13 lines aren’t shown here.

fs/nfs/nfs3acl.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/nfs/nfs4proc.c+17−1

This diff is large: its 43 lines aren’t shown here.

fs/nfs/nfs4session.h+0−4

This diff is large: its 17 lines aren’t shown here.

fs/nfs/nfs4trace.h+22−12

This diff is large: its 104 lines aren’t shown here.

fs/nfs/pnfs.c+34−17

This diff is large: its 106 lines aren’t shown here.

fs/nfs/pnfs.h+3−1

This diff is large: its 18 lines aren’t shown here.

fs/nfs/pnfs_nfs.c+18−14

This diff is large: its 97 lines aren’t shown here.

fs/nfsd/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

fs/nfsd/nfs4state.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/nfsd/nfsfh.h+0−7

This diff is large: its 21 lines aren’t shown here.

fs/nilfs2/the_nilfs.c+0−3

This diff is large: its 17 lines aren’t shown here.

fs/notify/fanotify/fanotify_user.c+1−6

This diff is large: its 14 lines aren’t shown here.

fs/ocfs2/alloc.c+1−0

This diff is large: its 8 lines aren’t shown here.

fs/ocfs2/journal.c+59−23

This diff is large: its 142 lines aren’t shown here.

fs/ocfs2/journal.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/ocfs2/ocfs2.h+16−1

This diff is large: its 31 lines aren’t shown here.

fs/ocfs2/quota_local.c+2−7

This diff is large: its 44 lines aren’t shown here.

fs/ocfs2/suballoc.c+32−6

This diff is large: its 83 lines aren’t shown here.

fs/ocfs2/suballoc.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/ocfs2/super.c+3−0

This diff is large: its 10 lines aren’t shown here.

fs/orangefs/inode.c+5−4

This diff is large: its 34 lines aren’t shown here.

fs/overlayfs/overlayfs.h+0−2

This diff is large: its 9 lines aren’t shown here.

fs/overlayfs/super.c+5−0

This diff is large: its 12 lines aren’t shown here.

fs/pnode.c+9−8

This diff is large: its 55 lines aren’t shown here.

fs/pnode.h+1−1

This diff is large: its 9 lines aren’t shown here.

fs/smb/client/cached_dir.c+2−8

This diff is large: its 61 lines aren’t shown here.

fs/smb/client/cifsencrypt.c+5−11

This diff is large: its 24 lines aren’t shown here.

fs/smb/client/cifsglob.h+2−4

This diff is large: its 13 lines aren’t shown here.

fs/smb/client/cifspdu.h+4−3

This diff is large: its 22 lines aren’t shown here.

fs/smb/client/cifsproto.h+6−0

This diff is large: its 20 lines aren’t shown here.

fs/smb/client/cifssmb.c+57−0

This diff is large: its 64 lines aren’t shown here.

fs/smb/client/connect.c+12−47

This diff is large: its 139 lines aren’t shown here.

fs/smb/client/file.c+32−4

This diff is large: its 57 lines aren’t shown here.

fs/smb/client/fs_context.c+6−19

This diff is large: its 58 lines aren’t shown here.

fs/smb/client/fs_context.h+47−0

This diff is large: its 59 lines aren’t shown here.

fs/smb/client/inode.c+17−8

This diff is large: its 43 lines aren’t shown here.

fs/smb/client/readdir.c+5−2

This diff is large: its 25 lines aren’t shown here.

fs/smb/client/reparse.c+29−34

This diff is large: its 131 lines aren’t shown here.

fs/smb/client/reparse.h+1−4

This diff is large: its 11 lines aren’t shown here.

fs/smb/client/sess.c+40−20

This diff is large: its 97 lines aren’t shown here.

fs/smb/client/smb1ops.c+244−32

This diff is large: its 386 lines aren’t shown here.

fs/smb/client/smb2inode.c+2−0

This diff is large: its 9 lines aren’t shown here.

fs/smb/client/smb2ops.c+7−7

This diff is large: its 49 lines aren’t shown here.

fs/smb/client/smb2pdu.c+6−16

This diff is large: its 50 lines aren’t shown here.

fs/smb/common/smb2pdu.h+3−3

This diff is large: its 17 lines aren’t shown here.

fs/smb/server/auth.c+13−1

This diff is large: its 21 lines aren’t shown here.

fs/smb/server/connection.c+3−1

This diff is large: its 12 lines aren’t shown here.

fs/smb/server/mgmt/user_session.c+14−6

This diff is large: its 77 lines aren’t shown here.

fs/smb/server/mgmt/user_session.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/smb/server/oplock.c+15−26

This diff is large: its 126 lines aren’t shown here.

fs/smb/server/oplock.h+0−1

This diff is large: its 8 lines aren’t shown here.

fs/smb/server/smb2pdu.c+12−9

This diff is large: its 56 lines aren’t shown here.

fs/smb/server/smb_common.h+2−0

This diff is large: its 9 lines aren’t shown here.

fs/smb/server/transport_ipc.c+6−1

This diff is large: its 21 lines aren’t shown here.

fs/smb/server/transport_tcp.c+9−5

This diff is large: its 27 lines aren’t shown here.

fs/smb/server/transport_tcp.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/smb/server/vfs.c+9−3

This diff is large: its 36 lines aren’t shown here.

fs/smb/server/vfs_cache.c+27−14

This diff is large: its 72 lines aren’t shown here.

fs/splice.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/stat.c+18−14

This diff is large: its 47 lines aren’t shown here.

fs/udf/truncate.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/userfaultfd.c+22−6

This diff is large: its 67 lines aren’t shown here.

fs/xattr.c+26−2

This diff is large: its 63 lines aren’t shown here.

fs/xfs/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

fs/xfs/xfs_buf.c+1−0

This diff is large: its 8 lines aren’t shown here.

fs/xfs/xfs_buf_mem.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/xfs/xfs_dquot.c+1−2

This diff is large: its 11 lines aren’t shown here.

fs/xfs/xfs_fsmap.c+33−18

This diff is large: its 86 lines aren’t shown here.

fs/xfs/xfs_inode_item.c+0−6

This diff is large: its 14 lines aren’t shown here.

fs/xfs/xfs_log.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/xfs/xfs_mount.h+1−0

This diff is large: its 8 lines aren’t shown here.

fs/xfs/xfs_super.c+27−1

This diff is large: its 49 lines aren’t shown here.

fs/xfs/xfs_sysfs.c+32−0

This diff is large: its 41 lines aren’t shown here.

fs/xfs/xfs_trans_ail.c+20−19

This diff is large: its 66 lines aren’t shown here.

fs/xfs/xfs_trans_priv.h+0−28

This diff is large: its 33 lines aren’t shown here.

fs/xfs/xfs_zone_alloc.c+7−0

This diff is large: its 14 lines aren’t shown here.

fs/xfs/xfs_zone_gc.c+23−4

This diff is large: its 58 lines aren’t shown here.

include/acpi/actbl.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/crypto/hash.h+5−1

This diff is large: its 20 lines aren’t shown here.

include/crypto/internal/hash.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/cxl/features.h+3−2

This diff is large: its 19 lines aren’t shown here.

include/drm/drm_gem.h+1−2

This diff is large: its 10 lines aren’t shown here.

include/drm/drm_gpusvm.h+33−14

This diff is large: its 100 lines aren’t shown here.

include/drm/drm_kunit_helpers.h+3−0

This diff is large: its 10 lines aren’t shown here.

include/drm/intel/pciids.h+5−0

This diff is large: its 19 lines aren’t shown here.

include/drm/ttm/ttm_backup.h+8−10

This diff is large: its 53 lines aren’t shown here.

include/drm/ttm/ttm_tt.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/kunit/test.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/alloc_tag.h+12−0

This diff is large: its 26 lines aren’t shown here.

include/linux/backing-dev.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/bio.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/blkdev.h+49−29

This diff is large: its 127 lines aren’t shown here.

include/linux/buffer_head.h+9−0

This diff is large: its 30 lines aren’t shown here.

include/linux/ceph/osd_client.h+0−6

This diff is large: its 20 lines aren’t shown here.

include/linux/cgroup-defs.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/cgroup.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/codetag.h+4−4

This diff is large: its 15 lines aren’t shown here.

include/linux/cpu.h+2−0

This diff is large: its 9 lines aren’t shown here.

include/linux/cpufreq.h+54−29

This diff is large: its 166 lines aren’t shown here.

include/linux/dcache.h+50−56

This diff is large: its 116 lines aren’t shown here.

include/linux/dma-mapping.h+8−4

This diff is large: its 19 lines aren’t shown here.

include/linux/execmem.h+10−1

This diff is large: its 42 lines aren’t shown here.

include/linux/file_ref.h+6−13

This diff is large: its 35 lines aren’t shown here.

include/linux/firmware/cirrus/cs_dsp_test_utils.h+0−1

This diff is large: its 8 lines aren’t shown here.

include/linux/fs.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/fsnotify_backend.h+0−15

This diff is large: its 22 lines aren’t shown here.

include/linux/fwnode.h+5−0

This diff is large: its 12 lines aren’t shown here.

include/linux/gpio/consumer.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/highmem.h+5−5

This diff is large: its 45 lines aren’t shown here.

include/linux/hrtimer.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/hugetlb.h+5−0

This diff is large: its 19 lines aren’t shown here.

include/linux/hyperv.h+6−7

This diff is large: its 27 lines aren’t shown here.

include/linux/ieee80211.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/iommu.h+4−4

This diff is large: its 24 lines aren’t shown here.

include/linux/irqchip/irq-davinci-aintc.h+0−27

This diff is large: its 28 lines aren’t shown here.

include/linux/kvm_host.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/local_lock.h+8−50

This diff is large: its 83 lines aren’t shown here.

include/linux/local_lock_internal.h+87−120

This diff is large: its 324 lines aren’t shown here.

include/linux/micrel_phy.h+0−1

This diff is large: its 8 lines aren’t shown here.

include/linux/mm.h+18−1

This diff is large: its 33 lines aren’t shown here.

include/linux/mman.h+2−0

This diff is large: its 10 lines aren’t shown here.

include/linux/mmzone.h+3−2

This diff is large: its 19 lines aren’t shown here.

include/linux/module.h+7−0

This diff is large: its 21 lines aren’t shown here.

include/linux/mroute_base.h+5−0

This diff is large: its 12 lines aren’t shown here.

include/linux/mtd/spinand.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/namei.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/netdevice.h+3−0

This diff is large: its 20 lines aren’t shown here.

include/linux/nfs.h+0−7

This diff is large: its 19 lines aren’t shown here.

include/linux/nfs_fs_sb.h+9−3

This diff is large: its 26 lines aren’t shown here.

include/linux/page-flags.h+7−0

This diff is large: its 14 lines aren’t shown here.

include/linux/pci.h+2−0

This diff is large: its 9 lines aren’t shown here.

include/linux/percpu.h+0−4

This diff is large: its 12 lines aren’t shown here.

include/linux/perf_event.h+0−1

This diff is large: its 8 lines aren’t shown here.

include/linux/pgalloc_tag.h+8−0

This diff is large: its 22 lines aren’t shown here.

include/linux/pgtable.h+6−3

This diff is large: its 23 lines aren’t shown here.

include/linux/phylink.h+20−11

This diff is large: its 62 lines aren’t shown here.

include/linux/platform_data/x86/intel_pmc_ipc.h+4−0

This diff is large: its 18 lines aren’t shown here.

include/linux/rtnetlink.h+1−1

This diff is large: its 8 lines aren’t shown here.

include/linux/soundwire/sdw_intel.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/spi/spi.h+1−4

This diff is large: its 12 lines aren’t shown here.

include/linux/timekeeper_internal.h+5−3

This diff is large: its 43 lines aren’t shown here.

include/linux/tpm.h+20−1

This diff is large: its 42 lines aren’t shown here.

include/linux/virtio.h+3−0

This diff is large: its 17 lines aren’t shown here.

include/linux/vmalloc.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/net/bluetooth/hci.h+3−1

This diff is large: its 18 lines aren’t shown here.

include/net/bluetooth/hci_core.h+10−11

This diff is large: its 56 lines aren’t shown here.

include/net/bluetooth/hci_sync.h+3−0

This diff is large: its 7 lines aren’t shown here.

include/net/fib_rules.h+2−0

This diff is large: its 9 lines aren’t shown here.

include/net/flow.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/net/l3mdev.h+27−0

This diff is large: its 41 lines aren’t shown here.

include/net/netdev_lock.h+3−0

This diff is large: its 10 lines aren’t shown here.

include/net/netdev_queues.h+6−0

This diff is large: its 13 lines aren’t shown here.

include/net/sch_generic.h+15−0

This diff is large: its 22 lines aren’t shown here.

include/net/sctp/structs.h+2−1

This diff is large: its 17 lines aren’t shown here.

include/net/sock.h+38−2

This diff is large: its 73 lines aren’t shown here.

include/net/xdp_sock.h+0−3

This diff is large: its 10 lines aren’t shown here.

include/net/xfrm.h+0−1

This diff is large: its 8 lines aren’t shown here.

include/net/xsk_buff_pool.h+3−1

This diff is large: its 19 lines aren’t shown here.

include/rdma/ib_verbs.h+7−0

This diff is large: its 15 lines aren’t shown here.

include/sound/pcm.h+2−0

This diff is large: its 9 lines aren’t shown here.

include/sound/soc_sdw_utils.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/sound/ump_convert.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/sound/ump_msg.h+2−2

This diff is large: its 18 lines aren’t shown here.

include/trace/events/btrfs.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/uapi/cxl/features.h+15−6

This diff is large: its 50 lines aren’t shown here.

include/uapi/drm/ivpu_accel.h+2−2

This diff is large: its 17 lines aren’t shown here.

include/uapi/linux/bpf.h+3−0

This diff is large: its 10 lines aren’t shown here.

include/uapi/linux/ethtool_netlink_generated.h+0−5

This diff is large: its 12 lines aren’t shown here.

include/uapi/linux/io_uring.h+3−1

This diff is large: its 11 lines aren’t shown here.

include/uapi/linux/landlock.h+57−30

This diff is large: its 101 lines aren’t shown here.

include/uapi/linux/taskstats.h+29−18

This diff is large: its 101 lines aren’t shown here.

include/uapi/linux/vhost.h+2−2

This diff is large: its 13 lines aren’t shown here.

include/uapi/linux/virtio_pci.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/ufs/ufs.h+4−1

This diff is large: its 26 lines aren’t shown here.

include/ufs/ufs_quirks.h+6−0

This diff is large: its 11 lines aren’t shown here.

include/ufs/ufshcd.h+6−1

This diff is large: its 28 lines aren’t shown here.

include/vdso/unaligned.h+6−6

This diff is large: its 21 lines aren’t shown here.

init/Kconfig+13−15

This diff is large: its 56 lines aren’t shown here.

io_uring/fdinfo.c+27−25

This diff is large: its 124 lines aren’t shown here.

io_uring/io_uring.c+39−44

This diff is large: its 192 lines aren’t shown here.

io_uring/kbuf.c+2−0

This diff is large: its 9 lines aren’t shown here.

io_uring/memmap.c+1−1

This diff is large: its 9 lines aren’t shown here.

io_uring/net.c+10−4

This diff is large: its 29 lines aren’t shown here.

io_uring/rsrc.c+63−46

This diff is large: its 154 lines aren’t shown here.

io_uring/sqpoll.c+1−1

This diff is large: its 9 lines aren’t shown here.

io_uring/uring_cmd.c+5−0

This diff is large: its 12 lines aren’t shown here.

io_uring/uring_cmd.h+0−6

This diff is large: its 10 lines aren’t shown here.

io_uring/zcrx.c+38−18

This diff is large: its 190 lines aren’t shown here.

io_uring/zcrx.h+4−2

This diff is large: its 29 lines aren’t shown here.

kernel/audit_watch.c+10−6

This diff is large: its 35 lines aren’t shown here.

kernel/bpf/hashtab.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/bpf/preload/bpf_preload_kern.c+1−0

This diff is large: its 7 lines aren’t shown here.

kernel/bpf/queue_stack_maps.c+12−23

This diff is large: its 97 lines aren’t shown here.

kernel/bpf/ringbuf.c+7−10

This diff is large: its 59 lines aren’t shown here.

kernel/bpf/rqspinlock.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/bpf/syscall.c+3−3

This diff is large: its 27 lines aren’t shown here.

kernel/cgroup/cgroup.c+36−1

This diff is large: its 68 lines aren’t shown here.

kernel/cgroup/cpuset-internal.h+1−0

This diff is large: its 8 lines aren’t shown here.

kernel/cgroup/cpuset.c+242−165

This diff is large: its 828 lines aren’t shown here.

kernel/cgroup/rstat.c+2−1

This diff is large: its 13 lines aren’t shown here.

kernel/dma/coherent.c+9−3

This diff is large: its 26 lines aren’t shown here.

kernel/dma/contiguous.c+1−2

This diff is large: its 10 lines aren’t shown here.

kernel/dma/mapping.c+17−8

This diff is large: its 40 lines aren’t shown here.

kernel/events/core.c+23−51

This diff is large: its 202 lines aren’t shown here.

kernel/events/uprobes.c+13−2

This diff is large: its 33 lines aren’t shown here.

kernel/fork.c+5−4

This diff is large: its 23 lines aren’t shown here.

kernel/irq/msi.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/module/Kconfig+5−0

This diff is large: its 12 lines aren’t shown here.

kernel/module/main.c+1−0

This diff is large: its 8 lines aren’t shown here.

kernel/padata.c+2−1

This diff is large: its 10 lines aren’t shown here.

kernel/params.c+25−26

This diff is large: its 88 lines aren’t shown here.

kernel/sched/cpufreq_schedutil.c+42−7

This diff is large: its 79 lines aren’t shown here.

kernel/sched/ext.c+130−111

This diff is large: its 667 lines aren’t shown here.

kernel/sched/ext_idle.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/sched/fair.c+1−3

This diff is large: its 18 lines aren’t shown here.

kernel/time/hrtimer.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/time/tick-common.c+22−0

This diff is large: its 48 lines aren’t shown here.

kernel/time/timekeeping.c+42−8

This diff is large: its 136 lines aren’t shown here.

kernel/time/vsyscall.c+2−2

This diff is large: its 15 lines aren’t shown here.

kernel/trace/fprobe.c+150−21

This diff is large: its 229 lines aren’t shown here.

kernel/trace/ftrace.c+194−143

This diff is large: its 453 lines aren’t shown here.

kernel/trace/ring_buffer.c+5−3

This diff is large: its 16 lines aren’t shown here.

kernel/trace/rv/rv.c+6−1

This diff is large: its 14 lines aren’t shown here.

kernel/trace/trace.c+13−3

This diff is large: its 50 lines aren’t shown here.

kernel/trace/trace_dynevent.c+15−1

This diff is large: its 30 lines aren’t shown here.

kernel/trace/trace_dynevent.h+1−0

This diff is large: its 8 lines aren’t shown here.

kernel/trace/trace_entries.h+2−2

This diff is large: its 14 lines aren’t shown here.

kernel/trace/trace_eprobe.c+3−0

This diff is large: its 14 lines aren’t shown here.

kernel/trace/trace_events_filter.c+2−2

This diff is large: its 18 lines aren’t shown here.

kernel/trace/trace_events_synth.c+0−1

This diff is large: its 8 lines aren’t shown here.

kernel/trace/trace_events_trigger.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/trace/trace_fprobe.c+17−9

This diff is large: its 55 lines aren’t shown here.

kernel/trace/trace_functions.c+1−5

This diff is large: its 13 lines aren’t shown here.

kernel/trace/trace_functions_graph.c+5−6

This diff is large: its 41 lines aren’t shown here.

kernel/trace/trace_kprobe.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/trace/trace_output.c+2−2

This diff is large: its 22 lines aren’t shown here.

kernel/trace/trace_probe.c+9−0

This diff is large: its 38 lines aren’t shown here.

kernel/trace/trace_uprobe.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/vhost_task.c+1−1

This diff is large: its 9 lines aren’t shown here.

lib/Kconfig+26−31

This diff is large: its 104 lines aren’t shown here.

lib/Kconfig.debug+1−1

This diff is large: its 9 lines aren’t shown here.

lib/Kconfig.ubsan+0−1

This diff is large: its 8 lines aren’t shown here.

lib/alloc_tag.c+81−21

This diff is large: its 163 lines aren’t shown here.

lib/asn1_decoder.c+1−0

This diff is large: its 6 lines aren’t shown here.

lib/codetag.c+3−2

This diff is large: its 19 lines aren’t shown here.

lib/iov_iter.c+1−1

This diff is large: its 9 lines aren’t shown here.

lib/string.c+10−3

This diff is large: its 38 lines aren’t shown here.

lib/test_ubsan.c+11−7

This diff is large: its 30 lines aren’t shown here.

lib/tests/slub_kunit.c+1−0

This diff is large: its 6 lines aren’t shown here.

lib/ucs2_string.c+1−0

This diff is large: its 6 lines aren’t shown here.

lib/zlib_inflate/inflate_syms.c+1−0

This diff is large: its 6 lines aren’t shown here.

mm/cma.c+15−9

This diff is large: its 83 lines aren’t shown here.

mm/compaction.c+3−3

This diff is large: its 26 lines aren’t shown here.

mm/execmem.c+37−3

This diff is large: its 54 lines aren’t shown here.

mm/filemap.c+1−0

This diff is large: its 8 lines aren’t shown here.

mm/gup.c+2−2

This diff is large: its 11 lines aren’t shown here.

mm/huge_memory.c+8−3

This diff is large: its 25 lines aren’t shown here.

mm/hugetlb.c+71−10

This diff is large: its 180 lines aren’t shown here.

mm/hugetlb_vmemmap.c+3−3

This diff is large: its 15 lines aren’t shown here.

mm/internal.h+11−16

This diff is large: its 63 lines aren’t shown here.

mm/kasan/kasan_test_c.c+21−0

This diff is large: its 40 lines aren’t shown here.

mm/kasan/shadow.c+78−14

This diff is large: its 122 lines aren’t shown here.

mm/memblock.c+19−2

This diff is large: its 48 lines aren’t shown here.

mm/memcontrol-v1.c+1−1

This diff is large: its 9 lines aren’t shown here.

mm/memcontrol.c+21−24

This diff is large: its 165 lines aren’t shown here.

mm/memory.c+6−6

This diff is large: its 49 lines aren’t shown here.

mm/migrate.c+5−3

This diff is large: its 36 lines aren’t shown here.

mm/mm_init.c+1−1

This diff is large: its 9 lines aren’t shown here.

mm/mremap.c+1−2

This diff is large: its 10 lines aren’t shown here.

mm/page_alloc.c+116−96

This diff is large: its 449 lines aren’t shown here.

mm/slub.c+17−21

This diff is large: its 90 lines aren’t shown here.

mm/swapfile.c+25−7

This diff is large: its 46 lines aren’t shown here.

mm/truncate.c+12−8

This diff is large: its 51 lines aren’t shown here.

mm/userfaultfd.c+21−4

This diff is large: its 60 lines aren’t shown here.

mm/vma.c+48−4

This diff is large: its 122 lines aren’t shown here.

mm/vma.h+8−1

This diff is large: its 23 lines aren’t shown here.

mm/vmalloc.c+27−7

This diff is large: its 77 lines aren’t shown here.

mm/vmscan.c+26−3

This diff is large: its 45 lines aren’t shown here.

mm/zsmalloc.c+4−4

This diff is large: its 24 lines aren’t shown here.

net/batman-adv/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

net/batman-adv/hard-interface.c+18−14

This diff is large: its 78 lines aren’t shown here.

net/bluetooth/hci_conn.c+37−176

This diff is large: its 266 lines aren’t shown here.

net/bluetooth/hci_event.c+49−44

This diff is large: its 181 lines aren’t shown here.

net/bluetooth/hci_sync.c+145−5

This diff is large: its 166 lines aren’t shown here.

net/bluetooth/iso.c+12−14

This diff is large: its 48 lines aren’t shown here.

net/bluetooth/l2cap_core.c+29−8

This diff is large: its 101 lines aren’t shown here.

net/bluetooth/mgmt.c+6−3

This diff is large: its 27 lines aren’t shown here.

net/bridge/br_nf_core.c+2−5

This diff is large: its 20 lines aren’t shown here.

net/bridge/br_private.h+1−0

This diff is large: its 8 lines aren’t shown here.

net/bridge/br_vlan.c+3−1

This diff is large: its 19 lines aren’t shown here.

net/can/bcm.c+54−25

This diff is large: its 203 lines aren’t shown here.

net/can/gw.c+90−59

This diff is large: its 318 lines aren’t shown here.

net/can/j1939/socket.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/ceph/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

net/ceph/osd_client.c+0−23

This diff is large: its 37 lines aren’t shown here.

net/core/dev.c+22−28

This diff is large: its 122 lines aren’t shown here.

net/core/dev_api.c+39−0

This diff is large: its 50 lines aren’t shown here.

net/core/devmem.c+7−0

This diff is large: its 21 lines aren’t shown here.

net/core/devmem.h+2−0

This diff is large: its 9 lines aren’t shown here.

net/core/fib_rules.c+40−8

This diff is large: its 99 lines aren’t shown here.

net/core/filter.c+45−36

This diff is large: its 121 lines aren’t shown here.

net/core/link_watch.c+23−5

This diff is large: its 65 lines aren’t shown here.

net/core/lock_debug.c+1−1

This diff is large: its 13 lines aren’t shown here.

net/core/lwtunnel.c+20−6

This diff is large: its 83 lines aren’t shown here.

net/core/netdev-genl.c+67−22

This diff is large: its 142 lines aren’t shown here.

net/core/rtnetlink.c+6−6

This diff is large: its 48 lines aren’t shown here.

net/core/selftests.c+13−5

This diff is large: its 35 lines aren’t shown here.

net/core/sock.c+5−0

This diff is large: its 19 lines aren’t shown here.

net/dsa/dsa.c+49−10

This diff is large: its 103 lines aren’t shown here.

net/dsa/tag_8021q.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/dsa/tag_ksz.c+15−4

This diff is large: its 34 lines aren’t shown here.

net/ethtool/cmis.h+0−1

This diff is large: its 8 lines aren’t shown here.

net/ethtool/cmis_cdb.c+4−16

This diff is large: its 48 lines aren’t shown here.

net/ethtool/common.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/ethtool/ioctl.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ethtool/netlink.c+5−3

This diff is large: its 43 lines aren’t shown here.

net/hsr/hsr_device.c+3−3

This diff is large: its 18 lines aren’t shown here.

net/ipv4/esp4.c+7−46

This diff is large: its 99 lines aren’t shown here.

net/ipv4/ipmr.c+1−11

This diff is large: its 33 lines aren’t shown here.

net/ipv4/tcp_offload.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv4/udp_offload.c+60−1

This diff is large: its 75 lines aren’t shown here.

net/ipv4/xfrm4_input.c+10−8

This diff is large: its 42 lines aren’t shown here.

net/ipv6/addrconf.c+14−10

This diff is large: its 52 lines aren’t shown here.

net/ipv6/esp6.c+7−46

This diff is large: its 99 lines aren’t shown here.

net/ipv6/ip6mr.c+1−11

This diff is large: its 33 lines aren’t shown here.

net/ipv6/route.c+5−4

This diff is large: its 23 lines aren’t shown here.

net/ipv6/tcpv6_offload.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/xfrm6_input.c+10−8

This diff is large: its 45 lines aren’t shown here.

net/l3mdev/l3mdev.c+3−1

This diff is large: its 12 lines aren’t shown here.

net/llc/af_llc.c+4−4

This diff is large: its 20 lines aren’t shown here.

net/mac80211/iface.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/mac80211/main.c+4−2

This diff is large: its 15 lines aren’t shown here.

net/mac80211/mlme.c+6−6

This diff is large: its 41 lines aren’t shown here.

net/mac80211/status.c+7−1

This diff is large: its 15 lines aren’t shown here.

net/mctp/af_mctp.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/mctp/device.c+12−5

This diff is large: its 24 lines aren’t shown here.

net/mctp/route.c+3−1

This diff is large: its 12 lines aren’t shown here.

net/mptcp/pm_userspace.c+5−1

This diff is large: its 13 lines aren’t shown here.

net/mptcp/subflow.c+6−2

This diff is large: its 20 lines aren’t shown here.

net/netfilter/Kconfig+2−2

This diff is large: its 18 lines aren’t shown here.

net/netfilter/ipset/ip_set_hash_gen.h+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/ipvs/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/ipvs/ip_vs_xmit.c+8−19

This diff is large: its 66 lines aren’t shown here.

net/netfilter/nf_flow_table_core.c+6−4

This diff is large: its 26 lines aren’t shown here.

net/netfilter/nft_set_pipapo_avx2.c+2−1

This diff is large: its 11 lines aren’t shown here.

net/openvswitch/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

net/openvswitch/actions.c+1−2

This diff is large: its 10 lines aren’t shown here.

net/openvswitch/flow_netlink.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/sched/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/cls_api.c+45−21

This diff is large: its 98 lines aren’t shown here.

net/sched/sch_codel.c+2−5

This diff is large: its 21 lines aren’t shown here.

net/sched/sch_drr.c+10−6

This diff is large: its 72 lines aren’t shown here.

net/sched/sch_ets.c+10−7

This diff is large: its 73 lines aren’t shown here.

net/sched/sch_fq.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_fq_codel.c+3−5

This diff is large: its 22 lines aren’t shown here.

net/sched/sch_fq_pie.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_hfsc.c+27−12

This diff is large: its 89 lines aren’t shown here.

net/sched/sch_hhf.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_htb.c+6−7

This diff is large: its 41 lines aren’t shown here.

net/sched/sch_pie.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/sched/sch_qfq.c+12−6

This diff is large: its 74 lines aren’t shown here.

net/sched/sch_sfq.c+50−16

This diff is large: its 97 lines aren’t shown here.

net/sctp/Kconfig+1−1

This diff is large: its 12 lines aren’t shown here.

net/sctp/socket.c+14−8

This diff is large: its 64 lines aren’t shown here.

net/sctp/transport.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/smc/af_smc.c+5−0

This diff is large: its 19 lines aren’t shown here.

net/sunrpc/cache.c+1−5

This diff is large: its 15 lines aren’t shown here.

net/tipc/crypto.c+5−0

This diff is large: its 25 lines aren’t shown here.

net/tipc/link.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/tipc/monitor.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/tls/tls_main.c+6−0

This diff is large: its 20 lines aren’t shown here.

net/tls/tls_strp.c+2−1

This diff is large: its 17 lines aren’t shown here.

net/wireless/scan.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/xdp/xsk.c+4−4

This diff is large: its 34 lines aren’t shown here.

net/xdp/xsk_buff_pool.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/xfrm/espintcp.c+3−1

This diff is large: its 12 lines aren’t shown here.

net/xfrm/xfrm_ipcomp.c+1−2

This diff is large: its 17 lines aren’t shown here.

net/xfrm/xfrm_policy.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/xfrm/xfrm_state.c+3−3

This diff is large: its 20 lines aren’t shown here.

rust/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

rust/bindings/lib.rs+1−0

This diff is large: its 8 lines aren’t shown here.

rust/helpers/dma.c+16−0

This diff is large: its 17 lines aren’t shown here.

rust/helpers/helpers.c+1−0

This diff is large: its 8 lines aren’t shown here.

rust/helpers/io.c+17−17

This diff is large: its 112 lines aren’t shown here.

rust/kernel/alloc/kvec.rs+3−0

This diff is large: its 10 lines aren’t shown here.

rust/kernel/firmware.rs+6−2

This diff is large: its 22 lines aren’t shown here.

rust/kernel/list.rs+3−0

This diff is large: its 10 lines aren’t shown here.

rust/kernel/str.rs+23−23

This diff is large: its 117 lines aren’t shown here.

rust/macros/kunit.rs+4−9

This diff is large: its 32 lines aren’t shown here.

rust/macros/module.rs+5−14

This diff is large: its 54 lines aren’t shown here.

rust/macros/paste.rs+1−1

This diff is large: its 9 lines aren’t shown here.

rust/pin-init/examples/pthread_mutex.rs+1−1

This diff is large: its 8 lines aren’t shown here.

rust/pin-init/internal/src/pinned_drop.rs+1−2

This diff is large: its 10 lines aren’t shown here.

rust/pin-init/src/alloc.rs+3−5

This diff is large: its 15 lines aren’t shown here.

rust/pin-init/src/lib.rs+1−1

This diff is large: its 9 lines aren’t shown here.

rust/uapi/lib.rs+1−0

This diff is large: its 8 lines aren’t shown here.

samples/bpf/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

samples/ftrace/sample-trace-array.c+1−1

This diff is large: its 9 lines aren’t shown here.

samples/livepatch/livepatch-callbacks-busymod.c+1−0

This diff is large: its 6 lines aren’t shown here.

samples/livepatch/livepatch-callbacks-demo.c+1−0

This diff is large: its 7 lines aren’t shown here.

samples/livepatch/livepatch-callbacks-mod.c+1−0

This diff is large: its 6 lines aren’t shown here.

samples/livepatch/livepatch-sample.c+1−0

This diff is large: its 7 lines aren’t shown here.

samples/livepatch/livepatch-shadow-fix1.c+1−0

This diff is large: its 7 lines aren’t shown here.

samples/livepatch/livepatch-shadow-fix2.c+1−0

This diff is large: its 7 lines aren’t shown here.

scripts/Makefile.compiler+2−2

This diff is large: its 11 lines aren’t shown here.

scripts/Makefile.extrawarn+21−2

This diff is large: its 58 lines aren’t shown here.

scripts/Makefile.vmlinux+3−3

This diff is large: its 22 lines aren’t shown here.

scripts/Makefile.vmlinux_o+2−2

This diff is large: its 18 lines aren’t shown here.

scripts/generate_rust_analyzer.py+9−3

This diff is large: its 26 lines aren’t shown here.

scripts/genksyms/keywords.c+7−0

This diff is large: its 28 lines aren’t shown here.

scripts/genksyms/parse.y+4−1

This diff is large: its 19 lines aren’t shown here.

scripts/package/kernel.spec+1−0

This diff is large: its 8 lines aren’t shown here.

scripts/package/mkdebian+1−1

This diff is large: its 9 lines aren’t shown here.

security/Kconfig.hardening+1−1

This diff is large: its 9 lines aren’t shown here.

security/integrity/ima/ima_main.c+3−1

This diff is large: its 11 lines aren’t shown here.

security/landlock/audit.c+2−2

This diff is large: its 18 lines aren’t shown here.

security/landlock/domain.c+2−2

This diff is large: its 18 lines aren’t shown here.

security/landlock/domain.h+1−1

This diff is large: its 9 lines aren’t shown here.

security/landlock/id.c+31−2

This diff is large: its 79 lines aren’t shown here.

security/landlock/syscalls.c+15−15

This diff is large: its 84 lines aren’t shown here.

sound/core/oss/pcm_oss.c+1−2

This diff is large: its 10 lines aren’t shown here.

sound/core/pcm_native.c+11−0

This diff is large: its 18 lines aren’t shown here.

sound/core/seq/seq_clientmgr.c+33−19

This diff is large: its 82 lines aren’t shown here.

sound/core/seq/seq_ump_convert.c+18−0

This diff is large: its 22 lines aren’t shown here.

sound/core/seq/seq_ump_convert.h+1−0

This diff is large: its 7 lines aren’t shown here.

sound/hda/intel-sdw-acpi.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/isa/azt2320.c+2−2

This diff is large: its 11 lines aren’t shown here.

sound/pci/es1968.c+4−2

This diff is large: its 20 lines aren’t shown here.

sound/pci/hda/Kconfig+1−3

This diff is large: its 11 lines aren’t shown here.

sound/pci/hda/patch_realtek.c+104−19

This diff is large: its 265 lines aren’t shown here.

sound/pci/hda/tas2781_hda_spi.c+1−2

This diff is large: its 10 lines aren’t shown here.

sound/sh/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/acp/acp-i2s.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/acp/acp-legacy-common.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/acp/acp-rembrandt.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/acp/acp-renoir.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/acp/acp63.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/acp/acp70.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/ps/pci-ps.c+3−2

This diff is large: its 26 lines aren’t shown here.

sound/soc/codecs/Kconfig+2−3

This diff is large: its 13 lines aren’t shown here.

sound/soc/codecs/aw88081.c+10−0

This diff is large: its 20 lines aren’t shown here.

sound/soc/codecs/cs42l43-jack.c+10−0

This diff is large: its 31 lines aren’t shown here.

sound/soc/codecs/hdmi-codec.c+19−3

This diff is large: its 32 lines aren’t shown here.

sound/soc/codecs/lpass-wsa-macro.c+84−33

This diff is large: its 176 lines aren’t shown here.

sound/soc/dwc/dwc-i2s.c+6−7

This diff is large: its 31 lines aren’t shown here.

sound/soc/fsl/fsl_asrc_dma.c+14−1

This diff is large: its 26 lines aren’t shown here.

sound/soc/fsl/fsl_qmc_audio.c+3−0

This diff is large: its 10 lines aren’t shown here.

sound/soc/fsl/imx-card.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/generic/simple-card-utils.c+2−2

This diff is large: its 12 lines aren’t shown here.

sound/soc/intel/avs/path.c+72−0

This diff is large: its 79 lines aren’t shown here.

sound/soc/intel/avs/path.h+5−0

This diff is large: its 12 lines aren’t shown here.

sound/soc/intel/avs/pcm.c+50−2

This diff is large: its 87 lines aren’t shown here.

sound/soc/intel/boards/bytcr_rt5640.c+13−0

This diff is large: its 20 lines aren’t shown here.

sound/soc/intel/boards/sof_sdw.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/intel/catpt/dsp.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/intel/common/soc-acpi-intel-ptl-match.c+2−1

This diff is large: its 10 lines aren’t shown here.

sound/soc/mediatek/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/qcom/lpass.h+2−1

This diff is large: its 13 lines aren’t shown here.

sound/soc/renesas/rz-ssi.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c+4−0

This diff is large: its 11 lines aren’t shown here.

sound/soc/sdw_utils/soc_sdw_cs42l43.c+10−0

This diff is large: its 24 lines aren’t shown here.

sound/soc/sdw_utils/soc_sdw_cs_amp.c+24−0

This diff is large: its 38 lines aren’t shown here.

sound/soc/sdw_utils/soc_sdw_rt_dmic.c+2−0

This diff is large: its 9 lines aren’t shown here.

sound/soc/soc-pcm.c+4−1

This diff is large: its 15 lines aren’t shown here.

sound/soc/sof/intel/hda-bus.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/sof/intel/hda.c+15−1

This diff is large: its 23 lines aren’t shown here.

sound/soc/sof/ipc4-control.c+10−1

This diff is large: its 25 lines aren’t shown here.

sound/soc/sof/ipc4-pcm.c+2−1

This diff is large: its 10 lines aren’t shown here.

sound/soc/sof/topology.c+14−4

This diff is large: its 35 lines aren’t shown here.

sound/soc/stm/stm32_sai_sub.c+11−5

This diff is large: its 53 lines aren’t shown here.

sound/usb/endpoint.c+7−0

This diff is large: its 23 lines aren’t shown here.

sound/usb/format.c+2−1

This diff is large: its 10 lines aren’t shown here.

sound/usb/midi.c+12−4

This diff is large: its 23 lines aren’t shown here.

sound/usb/quirks.c+4−0

This diff is large: its 18 lines aren’t shown here.

tools/arch/arm64/include/uapi/asm/kvm.h+2−3

This diff is large: its 26 lines aren’t shown here.

tools/arch/arm64/include/uapi/asm/unistd.h+1−23

This diff is large: its 26 lines aren’t shown here.

tools/arch/x86/include/asm/cpufeatures.h+20−8

This diff is large: its 78 lines aren’t shown here.

tools/arch/x86/include/asm/msr-index.h+19−12

This diff is large: its 76 lines aren’t shown here.

tools/arch/x86/include/uapi/asm/kvm.h+4−0

This diff is large: its 17 lines aren’t shown here.

tools/arch/x86/include/uapi/asm/svm.h+2−0

This diff is large: its 16 lines aren’t shown here.

tools/arch/x86/lib/memset_64.S+2−1

This diff is large: its 17 lines aren’t shown here.

tools/arch/x86/lib/x86-opcode-map.txt+2−2

This diff is large: its 11 lines aren’t shown here.

tools/hv/hv_kvp_daemon.c+84−24

This diff is large: its 129 lines aren’t shown here.

tools/include/linux/cfi_types.h+45−0

This diff is large: its 46 lines aren’t shown here.

tools/include/uapi/asm-generic/mman-common.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/include/uapi/asm-generic/unistd.h+3−1

This diff is large: its 13 lines aren’t shown here.

tools/include/uapi/linux/bpf.h+3−0

This diff is large: its 10 lines aren’t shown here.

tools/include/uapi/linux/in.h+2−0

This diff is large: its 9 lines aren’t shown here.

tools/include/uapi/linux/kvm.h+5−4

This diff is large: its 30 lines aren’t shown here.

tools/include/uapi/linux/perf_event.h+2−0

This diff is large: its 9 lines aren’t shown here.

tools/include/uapi/linux/stat.h+75−24

This diff is large: its 126 lines aren’t shown here.

tools/lib/perf/Makefile+12−2

This diff is large: its 35 lines aren’t shown here.

tools/net/ynl/lib/ynl.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/net/ynl/pyynl/ethtool.py+15−7

This diff is large: its 32 lines aren’t shown here.

tools/net/ynl/pyynl/ynl_gen_c.py+71−24

This diff is large: its 236 lines aren’t shown here.

tools/objtool/arch/x86/decode.c+20−7

This diff is large: its 63 lines aren’t shown here.

tools/objtool/arch/x86/special.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/objtool/check.c+53−8

This diff is large: its 105 lines aren’t shown here.

tools/objtool/include/objtool/arch.h+2−1

This diff is large: its 10 lines aren’t shown here.

tools/perf/Makefile.config+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/arch/arm/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/powerpc/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/s390/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/sh/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/sparc/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/x86/entry/syscalls/syscall_32.tbl+2−1

This diff is large: its 14 lines aren’t shown here.

tools/perf/arch/x86/entry/syscalls/syscall_64.tbl+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/arch/xtensa/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/check-headers.sh+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/trace/beauty/include/linux/socket.h+2−0

This diff is large: its 9 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/fcntl.h+4−0

This diff is large: its 9 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/fs.h+16−5

This diff is large: its 44 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/mount.h+9−1

This diff is large: its 24 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/prctl.h+11−0

This diff is large: its 16 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/stat.h+75−24

This diff is large: its 126 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/sound/asound.h+6−2

This diff is large: its 29 lines aren’t shown here.

tools/perf/util/evsel.c+0−22

This diff is large: its 36 lines aren’t shown here.

tools/perf/util/unwind-libunwind-local.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/sched_ext/scx_flatcg.bpf.c+1−1

This diff is large: its 7 lines aren’t shown here.

tools/scripts/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/testing/cxl/test/mem.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/kunit/configs/all_tests.config+4−0

This diff is large: its 22 lines aren’t shown here.

tools/testing/kunit/kunit_parser.py+4−0

This diff is large: its 11 lines aren’t shown here.

tools/testing/kunit/kunit_tool_test.py+2−2

This diff is large: its 11 lines aren’t shown here.

tools/testing/kunit/qemu_configs/sh.py+3−1

This diff is large: its 11 lines aren’t shown here.

tools/testing/memblock/internal.h+6−0

This diff is large: its 11 lines aren’t shown here.

tools/testing/memblock/linux/mutex.h+14−0

This diff is large: its 15 lines aren’t shown here.

tools/testing/memblock/tests/basic_api.c+102−0

This diff is large: its 116 lines aren’t shown here.

tools/testing/selftests/.gitignore+0−1

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/Makefile+1−0

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/bpf/config.x86_64+0−1

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/bpf/prog_tests/for_each.c+37−0

This diff is large: its 56 lines aren’t shown here.

tools/testing/selftests/bpf/prog_tests/res_spin_lock.c+5−2

This diff is large: its 14 lines aren’t shown here.

tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c+0−1

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/bpf/progs/bpf_misc.h+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/bpf/progs/for_each_hash_modify.c+30−0

This diff is large: its 31 lines aren’t shown here.

tools/testing/selftests/bpf/progs/res_spin_lock.c+7−3

This diff is large: its 34 lines aren’t shown here.

tools/testing/selftests/cgroup/test_cpuset_prs.sh+402−215

This diff is large: its 916 lines aren’t shown here.

tools/testing/selftests/drivers/net/dsa/tc_taprio.sh+1−0

This diff is large: its 2 lines aren’t shown here.

tools/testing/selftests/drivers/net/hds.py+32−1

This diff is large: its 54 lines aren’t shown here.

tools/testing/selftests/drivers/net/hw/iou-zcrx.py+4−0

This diff is large: its 32 lines aren’t shown here.

tools/testing/selftests/drivers/net/hw/ncdevmem.c+22−33

This diff is large: its 112 lines aren’t shown here.

tools/testing/selftests/drivers/net/ocelot/psfp.sh+2−6

This diff is large: its 21 lines aren’t shown here.

tools/testing/selftests/drivers/net/ping.py+27−18

This diff is large: its 124 lines aren’t shown here.

tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c+46−11

This diff is large: its 93 lines aren’t shown here.

tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc+22−1

This diff is large: its 34 lines aren’t shown here.

tools/testing/selftests/ftrace/test.d/filter/event-filter-function.tc+20−0

This diff is large: its 27 lines aren’t shown here.

tools/testing/selftests/ftrace/test.d/ftrace/fgraph-multi-filter.tc+177−0

This diff is large: its 178 lines aren’t shown here.

tools/testing/selftests/futex/functional/futex_wait_wouldblock.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/hid/config.common+0−1

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/kvm/Makefile.kvm+15−30

This diff is large: its 103 lines aren’t shown here.

tools/testing/selftests/kvm/arm64/page_fault_test.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/kvm/arm64/set_id_regs.c+4−4

This diff is large: its 15 lines aren’t shown here.

tools/testing/selftests/kvm/include/arm64/processor.h+61−6

This diff is large: its 81 lines aren’t shown here.

tools/testing/selftests/kvm/lib/arm64/processor.c+34−26

This diff is large: its 153 lines aren’t shown here.

tools/testing/selftests/kvm/lib/kvm_util.c+2−3

This diff is large: its 12 lines aren’t shown here.

tools/testing/selftests/kvm/rseq_test.c+25−6

This diff is large: its 74 lines aren’t shown here.

tools/testing/selftests/kvm/x86/monitor_mwait_test.c+57−51

This diff is large: its 160 lines aren’t shown here.

tools/testing/selftests/landlock/audit.h+14−7

This diff is large: its 30 lines aren’t shown here.

tools/testing/selftests/landlock/audit_test.c+137−17

This diff is large: its 237 lines aren’t shown here.

tools/testing/selftests/landlock/fs_test.c+2−1

This diff is large: its 10 lines aren’t shown here.

tools/testing/selftests/lib/config+1−0

This diff is large: its 4 lines aren’t shown here.

tools/testing/selftests/mincore/mincore_selftest.c+2−17

This diff is large: its 54 lines aren’t shown here.

tools/testing/selftests/mm/charge_reserved_hugetlb.sh+2−2

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/mm/compaction_test.c+14−5

This diff is large: its 33 lines aren’t shown here.

tools/testing/selftests/mm/cow.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/mm/guard-regions.c+10−6

This diff is large: its 31 lines aren’t shown here.

tools/testing/selftests/mm/hugetlb_reparenting_test.sh+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/mm/pkey-powerpc.h+13−1

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/mm/pkey_util.c+1−0

This diff is large: its 6 lines aren’t shown here.

tools/testing/selftests/net/.gitignore+1−0

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/net/Makefile+3−0

This diff is large: its 17 lines aren’t shown here.

tools/testing/selftests/net/fib_rule_tests.sh+34−0

This diff is large: its 48 lines aren’t shown here.

tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh+95−1

This diff is large: its 110 lines aren’t shown here.

tools/testing/selftests/net/forwarding/tc_taprio.sh+421−0

This diff is large: its 422 lines aren’t shown here.

tools/testing/selftests/net/forwarding/tsn_lib.sh+26−0

This diff is large: its 58 lines aren’t shown here.

tools/testing/selftests/net/gre_ipv6_lladdr.sh+177−0

This diff is large: its 178 lines aren’t shown here.

tools/testing/selftests/net/mptcp/diag.sh+2−3

This diff is large: its 12 lines aren’t shown here.

tools/testing/selftests/net/mptcp/mptcp_join.sh+18−0

This diff is large: its 32 lines aren’t shown here.

tools/testing/selftests/net/netfilter/nft_concat_range.sh+38−1

This diff is large: its 60 lines aren’t shown here.

tools/testing/selftests/net/skf_net_off.c+244−0

This diff is large: its 245 lines aren’t shown here.

tools/testing/selftests/net/skf_net_off.sh+30−0

This diff is large: its 31 lines aren’t shown here.

tools/testing/selftests/net/tls.c+36−0

This diff is large: its 43 lines aren’t shown here.

tools/testing/selftests/pcie_bwctrl/Makefile+2−1

This diff is large: its 5 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/infra/actions.json+22−0

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json+442−0

This diff is large: its 448 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/codel.json+24−0

This diff is large: its 30 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq.json+22−0

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_codel.json+22−0

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json+22−0

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf.json+22−0

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/pie.json+24−0

This diff is large: its 25 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json+36−0

This diff is large: its 42 lines aren’t shown here.

tools/testing/selftests/tpm2/.gitignore+3−0

This diff is large: its 4 lines aren’t shown here.

tools/testing/selftests/tpm2/test_smoke.sh+1−1

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/ublk/Makefile+9−1

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/ublk/fault_inject.c+98−0

This diff is large: its 99 lines aren’t shown here.

tools/testing/selftests/ublk/kublk.c+324−32

This diff is large: its 597 lines aren’t shown here.

tools/testing/selftests/ublk/kublk.h+41−6

This diff is large: its 107 lines aren’t shown here.

tools/testing/selftests/ublk/stripe.c+27−1

This diff is large: its 46 lines aren’t shown here.

tools/testing/selftests/ublk/test_common.sh+121−25

This diff is large: its 233 lines aren’t shown here.

tools/testing/selftests/ublk/test_generic_04.sh+40−0

This diff is large: its 41 lines aren’t shown here.

tools/testing/selftests/ublk/test_generic_05.sh+44−0

This diff is large: its 45 lines aren’t shown here.

tools/testing/selftests/ublk/test_generic_06.sh+41−0

This diff is large: its 42 lines aren’t shown here.

tools/testing/selftests/ublk/test_generic_07.sh+28−0

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/ublk/test_loop_01.sh+3−5

This diff is large: its 21 lines aren’t shown here.

tools/testing/selftests/ublk/test_loop_02.sh+3−5

This diff is large: its 19 lines aren’t shown here.

tools/testing/selftests/ublk/test_loop_03.sh+3−5

This diff is large: its 20 lines aren’t shown here.

tools/testing/selftests/ublk/test_loop_04.sh+4−5

This diff is large: its 20 lines aren’t shown here.

tools/testing/selftests/ublk/test_loop_05.sh+3−5

This diff is large: its 21 lines aren’t shown here.

tools/testing/selftests/ublk/test_stress_01.sh+16−29

This diff is large: its 61 lines aren’t shown here.

tools/testing/selftests/ublk/test_stress_02.sh+16−29

This diff is large: its 61 lines aren’t shown here.

tools/testing/selftests/ublk/test_stress_03.sh+38−0

This diff is large: its 39 lines aren’t shown here.

tools/testing/selftests/ublk/test_stress_04.sh+37−0

This diff is large: its 38 lines aren’t shown here.

tools/testing/selftests/ublk/test_stress_05.sh+64−0

This diff is large: its 65 lines aren’t shown here.

tools/testing/selftests/ublk/test_stripe_01.sh+4−8

This diff is large: its 24 lines aren’t shown here.

tools/testing/selftests/ublk/test_stripe_02.sh+5−8

This diff is large: its 23 lines aren’t shown here.

tools/testing/selftests/ublk/test_stripe_03.sh+4−8

This diff is large: its 24 lines aren’t shown here.

tools/testing/selftests/ublk/test_stripe_04.sh+21−0

This diff is large: its 22 lines aren’t shown here.

tools/testing/selftests/x86/bugs/Makefile+3−0

This diff is large: its 4 lines aren’t shown here.

tools/testing/selftests/x86/bugs/common.py+164−0

This diff is large: its 165 lines aren’t shown here.

tools/testing/selftests/x86/bugs/its_indirect_alignment.py+150−0

This diff is large: its 151 lines aren’t shown here.

tools/testing/selftests/x86/bugs/its_permutations.py+109−0

This diff is large: its 110 lines aren’t shown here.

tools/testing/selftests/x86/bugs/its_ret_alignment.py+139−0

This diff is large: its 140 lines aren’t shown here.

tools/testing/selftests/x86/bugs/its_sysfs.py+65−0

This diff is large: its 66 lines aren’t shown here.

tools/testing/shared/linux.c+2−2

This diff is large: its 18 lines aren’t shown here.

tools/testing/shared/linux/cleanup.h+2−0

This diff is large: its 3 lines aren’t shown here.

tools/testing/vsock/vsock_test.c+16−12

This diff is large: its 38 lines aren’t shown here.

usr/include/Makefile+4−0

This diff is large: its 11 lines aren’t shown here.

virt/kvm/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

virt/kvm/eventfd.c+5−5

This diff is large: its 44 lines aren’t shown here.