History

Merge tag 'v6.5-rc6' into iommufd for-next

Required for following patches. Resolve merge conflict by using the hunk from the for-next branch and shifting the iommufd_object_deref_user() into iommufd_hw_pagetable_put()

Jason Gunthorpe committed 3 years ago

Commit a35762d2 parents 23a1b46 2ccdd1b962 files · +9328 −4774Browse files

Unified · Split

962 files
  1. .mailmap +96 −1
  2. Documentation/ABI/testing/sysfs-bus-cxl +13 −2
  3. Documentation/ABI/testing/sysfs-devices-system-cpu +7 −6
  4. Documentation/ABI/testing/sysfs-module +11 −0
  5. Documentation/ABI/testing/sysfs-platform-hidma +1 −1
  6. Documentation/ABI/testing/sysfs-platform-hidma-mgmt +10 −10
  7. Documentation/admin-guide/devices.txt +1 −1
  8. Documentation/admin-guide/hw-vuln/gather_data_sampling.rst +109 −0
  9. Documentation/admin-guide/hw-vuln/index.rst +8 −6
  10. Documentation/admin-guide/hw-vuln/spectre.rst +7 −4
  11. Documentation/admin-guide/hw-vuln/srso.rst +150 −0
  12. Documentation/admin-guide/kdump/vmcoreinfo.rst +6 −0
  13. Documentation/admin-guide/kernel-parameters.txt +45 −13
  14. Documentation/arch/arm64/silicon-errata.rst +3 −0
  15. Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml +0 −3
  16. Documentation/devicetree/bindings/net/mediatek,net.yaml +1 −6
  17. Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +8 −2
  18. Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml +3 −1
  19. Documentation/filesystems/locking.rst +2 −3
  20. Documentation/filesystems/porting.rst +10 −15
  21. Documentation/filesystems/tmpfs.rst +20 −27
  22. Documentation/networking/napi.rst +7 −6
  23. Documentation/process/embargoed-hardware-issues.rst +0 −3
  24. Documentation/process/security-bugs.rst +18 −21
  25. MAINTAINERS +42 −42
  26. Makefile +1 −1
  27. arch/alpha/include/asm/processor.h +0 −13
  28. arch/alpha/kernel/setup.c +1 −2
  29. arch/arm/boot/dts/microchip/sam9x60.dtsi +13 −13
  30. arch/arm/boot/dts/nspire/nspire.dtsi +1 −1
  31. arch/arm/boot/dts/nxp/imx/imx53-sk-imx53.dts +10 −0
  32. arch/arm/boot/dts/nxp/imx/imx6sll.dtsi +1 −1
  33. arch/arm/configs/axm55xx_defconfig +1 −1
  34. arch/arm/configs/davinci_all_defconfig +1 −1
  35. arch/arm/configs/exynos_defconfig +1 −1
  36. arch/arm/configs/footbridge_defconfig +1 −1
  37. arch/arm/configs/imx_v6_v7_defconfig +1 −1
  38. arch/arm/configs/keystone_defconfig +1 −1
  39. arch/arm/configs/lpc32xx_defconfig +1 −1
  40. arch/arm/configs/milbeaut_m10v_defconfig +1 −1
  41. arch/arm/configs/multi_v7_defconfig +1 −1
  42. arch/arm/configs/omap1_defconfig +1 −1
  43. arch/arm/configs/omap2plus_defconfig +1 −1
  44. arch/arm/configs/pxa_defconfig +1 −1
  45. arch/arm/configs/rpc_defconfig +1 −1
  46. arch/arm/configs/s5pv210_defconfig +1 −1
  47. arch/arm/configs/socfpga_defconfig +1 −1
  48. arch/arm/configs/spear13xx_defconfig +1 −1
  49. arch/arm/configs/spear3xx_defconfig +1 −1
  50. arch/arm/configs/spear6xx_defconfig +1 −1
  51. arch/arm/mach-pxa/sharpsl_pm.h +0 −1
  52. arch/arm/mach-pxa/spitz_pm.c +1 −0
  53. arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +1 −1
  54. arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts +1 −1
  55. arch/arm64/boot/dts/arm/vexpress-v2m-rs1.dtsi +0 −1
  56. arch/arm64/boot/dts/freescale/imx8mm-phyboard-polis-rdk.dts +1 −1
  57. arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi +2 −2
  58. arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dts +4 −0
  59. arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts +4 −0
  60. arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi +1 −1
  61. arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 −1
  62. arch/arm64/boot/dts/renesas/r9a07g044.dtsi +8 −8
  63. arch/arm64/boot/dts/renesas/r9a07g054.dtsi +8 −8
  64. arch/arm64/configs/defconfig +1 −1
  65. arch/arm64/include/asm/el2_setup.h +29 −15
  66. arch/arm64/include/asm/kvm_asm.h +1 −1
  67. arch/arm64/include/asm/kvm_emulate.h +17 −4
  68. arch/arm64/include/asm/processor.h +0 −8
  69. arch/arm64/kernel/fpsimd.c +7 −7
  70. arch/arm64/kernel/ptrace.c +7 −3
  71. arch/arm64/kvm/arm.c +27 −34
  72. arch/arm64/kvm/hyp/include/hyp/switch.h +1 −0
  73. arch/arm64/kvm/hyp/nvhe/ffa.c +14 −1
  74. arch/arm64/kvm/hyp/nvhe/switch.c +1 −1
  75. arch/ia64/configs/bigsur_defconfig +1 −1
  76. arch/ia64/configs/generic_defconfig +1 −1
  77. arch/ia64/configs/gensparse_defconfig +1 −1
  78. arch/ia64/configs/tiger_defconfig +1 −1
  79. arch/ia64/include/asm/processor.h +0 −3
  80. arch/loongarch/Kconfig +1 −0
  81. arch/loongarch/Makefile +3 −1
  82. arch/loongarch/configs/loongson3_defconfig +1 −1
  83. arch/loongarch/include/asm/fpu.h +4 −11
  84. arch/loongarch/kernel/setup.c +16 −0
  85. arch/loongarch/lib/clear_user.S +2 −1
  86. arch/loongarch/lib/copy_user.S +2 −1
  87. arch/loongarch/net/bpf_jit.h +1 −1
  88. arch/m68k/fpsp040/skeleton.S +2 −2
  89. arch/m68k/ifpsp060/os.S +2 −2
  90. arch/m68k/kernel/relocate_kernel.S +2 −2
  91. arch/mips/configs/bigsur_defconfig +1 −1
  92. arch/mips/configs/fuloong2e_defconfig +1 −1
  93. arch/mips/configs/ip22_defconfig +1 −1
  94. arch/mips/configs/ip32_defconfig +1 −1
  95. arch/mips/configs/jazz_defconfig +1 −1
  96. arch/mips/configs/lemote2f_defconfig +1 −1
  97. arch/mips/configs/loongson2k_defconfig +1 −1
  98. arch/mips/configs/loongson3_defconfig +1 −1
  99. arch/mips/configs/mtx1_defconfig +1 −1
  100. arch/mips/configs/pic32mzda_defconfig +1 −1
  101. arch/mips/configs/rm200_defconfig +1 −1
  102. arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h +0 −2
  103. arch/parisc/Kconfig.debug +1 −1
  104. arch/parisc/boot/compressed/misc.c +5 −5
  105. arch/parisc/configs/generic-32bit_defconfig +1 −1
  106. arch/parisc/configs/generic-64bit_defconfig +1 −1
  107. arch/parisc/include/asm/dma.h +2 −0
  108. arch/parisc/include/asm/ftrace.h +4 −0
  109. arch/parisc/include/asm/spinlock.h +0 −2
  110. arch/parisc/include/asm/spinlock_types.h +6 −0
  111. arch/parisc/kernel/firmware.c +4 −4
  112. arch/parisc/kernel/ftrace.c +1 −1
  113. arch/parisc/kernel/parisc_ksyms.c +1 −6
  114. arch/parisc/kernel/pci-dma.c +2 −10
  115. arch/parisc/kernel/pdt.c +1 −3
  116. arch/parisc/kernel/perf.c +1 −1
  117. arch/parisc/kernel/processor.c +1 −0
  118. arch/parisc/kernel/setup.c +0 −48
  119. arch/parisc/kernel/signal.c +1 −1
  120. arch/parisc/kernel/sys_parisc.c +5 −10
  121. arch/parisc/kernel/syscall.S +20 −3
  122. arch/parisc/kernel/unaligned.c +10 −9
  123. arch/parisc/lib/ucmpdi2.c +2 −1
  124. arch/parisc/mm/fault.c +25 −25
  125. arch/parisc/mm/fixmap.c +0 −3
  126. arch/parisc/mm/init.c +34 −4
  127. arch/parisc/mm/ioremap.c +4 −5
  128. arch/powerpc/configs/44x/sam440ep_defconfig +1 −1
  129. arch/powerpc/configs/85xx/stx_gp3_defconfig +1 −1
  130. arch/powerpc/configs/cell_defconfig +1 −1
  131. arch/powerpc/configs/ep8248e_defconfig +1 −1
  132. arch/powerpc/configs/mgcoge_defconfig +1 −1
  133. arch/powerpc/configs/pasemi_defconfig +1 −1
  134. arch/powerpc/configs/pmac32_defconfig +1 −1
  135. arch/powerpc/configs/powernv_defconfig +1 −1
  136. arch/powerpc/configs/ppc64_defconfig +1 −1
  137. arch/powerpc/configs/ppc64e_defconfig +1 −1
  138. arch/powerpc/configs/ppc6xx_defconfig +1 −1
  139. arch/powerpc/configs/ps3_defconfig +1 −1
  140. arch/powerpc/include/asm/processor.h +0 −3
  141. arch/powerpc/include/asm/word-at-a-time.h +1 −1
  142. arch/powerpc/kernel/head_64.S +1 −2
  143. arch/powerpc/kernel/trace/ftrace_mprofile.S +7 −2
  144. arch/powerpc/mm/init_64.c +1 −2
  145. arch/powerpc/platforms/85xx/smp.c +1 −1
  146. arch/powerpc/platforms/powermac/time.c +3 −3
  147. arch/riscv/configs/defconfig +1 −1
  148. arch/riscv/configs/rv32_defconfig +1 −1
  149. arch/riscv/include/asm/acpi.h +1 −1
  150. arch/riscv/include/asm/cacheflush.h +4 −0
  151. arch/riscv/include/asm/mmio.h +8 −8
  152. arch/riscv/include/asm/pgtable.h +2 −0
  153. arch/riscv/include/asm/vmalloc.h +3 −1
  154. arch/riscv/kernel/acpi.c +2 −2
  155. arch/riscv/kernel/cpu.c +5 −0
  156. arch/riscv/kernel/crash_core.c +2 −0
  157. arch/riscv/kernel/elf_kexec.c +2 −1
  158. arch/riscv/kernel/smp.c +0 −5
  159. arch/riscv/mm/init.c +11 −5
  160. arch/riscv/mm/kasan_init.c +0 −1
  161. arch/s390/configs/debug_defconfig +7 −6
  162. arch/s390/configs/defconfig +6 −5
  163. arch/s390/configs/zfcpdump_defconfig +0 −1
  164. arch/s390/include/uapi/asm/ptrace.h +2 −0
  165. arch/s390/kernel/sthyi.c +3 −3
  166. arch/s390/kvm/intercept.c +6 −3
  167. arch/s390/mm/vmem.c +2 −0
  168. arch/sh/configs/espt_defconfig +1 −1
  169. arch/sh/configs/sdk7780_defconfig +1 −1
  170. arch/sh/configs/sdk7786_defconfig +1 −1
  171. arch/sh/configs/sh03_defconfig +1 −1
  172. arch/sh/configs/sh7763rdp_defconfig +1 −1
  173. arch/sparc/configs/sparc32_defconfig +1 −1
  174. arch/sparc/include/asm/processor_64.h +0 −3
  175. arch/um/configs/i386_defconfig +1 −1
  176. arch/um/configs/x86_64_defconfig +1 −1
  177. arch/um/os-Linux/sigio.c +4 −3
  178. arch/x86/Kconfig +26 −0
  179. arch/x86/boot/compressed/idt_64.c +8 −1
  180. arch/x86/boot/compressed/sev.c +35 −2
  181. arch/x86/configs/i386_defconfig +1 −1
  182. arch/x86/configs/x86_64_defconfig +1 −1
  183. arch/x86/entry/entry_64.S +15 −1
  184. arch/x86/entry/vdso/vma.c +2 −2
  185. arch/x86/hyperv/hv_apic.c +1 −3
  186. arch/x86/hyperv/hv_init.c +21 −0
  187. arch/x86/hyperv/hv_vtl.c +4 −0
  188. arch/x86/hyperv/ivm.c +3 −4
  189. arch/x86/hyperv/mmu.c +2 −10
  190. arch/x86/hyperv/nested.c +2 −9
  191. arch/x86/include/asm/acpi.h +2 −0
  192. arch/x86/include/asm/cpufeatures.h +13 −1
  193. arch/x86/include/asm/kvm-x86-ops.h +1 −0
  194. arch/x86/include/asm/kvm_host.h +2 −1
  195. arch/x86/include/asm/linkage.h +1 −1
  196. arch/x86/include/asm/microcode.h +1 −0
  197. arch/x86/include/asm/microcode_amd.h +2 −0
  198. arch/x86/include/asm/mshyperv.h +1 −1
  199. arch/x86/include/asm/msr-index.h +13 −0
  200. arch/x86/include/asm/nospec-branch.h +18 −5
  201. arch/x86/include/asm/processor.h +6 −6
  202. arch/x86/include/asm/segment.h +1 −1
  203. arch/x86/kernel/acpi/boot.c +4 −0
  204. arch/x86/kernel/cpu/amd.c +166 −72
  205. arch/x86/kernel/cpu/bugs.c +346 −6
  206. arch/x86/kernel/cpu/common.c +36 −10
  207. arch/x86/kernel/cpu/cpu.h +1 −0
  208. arch/x86/kernel/cpu/mce/amd.c +2 −2
  209. arch/x86/kernel/traps.c +13 −7
  210. arch/x86/kernel/vmlinux.lds.S +33 −2
  211. arch/x86/kvm/cpuid.c +3 −0
  212. arch/x86/kvm/lapic.c +17 −8
  213. arch/x86/kvm/svm/sev.c +61 −63
  214. arch/x86/kvm/svm/svm.c +11 −9
  215. arch/x86/kvm/svm/svm.h +26 −0
  216. arch/x86/kvm/svm/vmenter.S +3 −0
  217. arch/x86/kvm/vmx/vmenter.S +4 −4
  218. arch/x86/kvm/vmx/vmx.c +46 −16
  219. arch/x86/kvm/vmx/vmx_ops.h +9 −3
  220. arch/x86/kvm/x86.c +38 −17
  221. arch/x86/lib/retpoline.S +79 −4
  222. block/blk-core.c +0 −6
  223. block/blk-iocost.c +3 −2
  224. block/fops.c +4 −3
  225. drivers/accel/ivpu/ivpu_gem.c +8 −0
  226. drivers/acpi/arm64/iort.c +0 −3
  227. drivers/acpi/resource.c +64 −0
  228. drivers/acpi/scan.c +1 −0
  229. drivers/android/binder.c +1 −0
  230. drivers/android/binder_alloc.c +6 −0
  231. drivers/android/binder_alloc.h +1 −0
  232. drivers/ata/libata-core.c +2 −2
  233. drivers/ata/libata-scsi.c +7 −0
  234. drivers/ata/pata_arasan_cf.c +2 −1
  235. drivers/ata/pata_ns87415.c +1 −1
  236. drivers/ata/pata_octeon_cf.c +3 −3
  237. drivers/base/cpu.c +23 −62
  238. drivers/base/power/power.h +1 −0
  239. drivers/base/power/wakeirq.c +8 −53
  240. drivers/block/rbd.c +100 −50
  241. drivers/block/ublk_drv.c +7 −4
  242. drivers/block/zram/zram_drv.c +20 −12
  243. drivers/char/tpm/st33zp24/i2c.c +1 −1
  244. drivers/char/tpm/tpm-chip.c +14 −69
  245. drivers/char/tpm/tpm_crb.c +30 −0
  246. drivers/char/tpm/tpm_i2c_atmel.c +1 −1
  247. drivers/char/tpm/tpm_i2c_infineon.c +1 −1
  248. drivers/char/tpm/tpm_i2c_nuvoton.c +1 −1
  249. drivers/char/tpm/tpm_tis.c +18 −2
  250. drivers/char/tpm/tpm_tis_core.c +7 −2
  251. drivers/char/tpm/tpm_tis_i2c.c +1 −1
  252. drivers/char/tpm/tpm_tis_i2c_cr50.c +1 −1
  253. drivers/clk/Kconfig +1 −0
  254. drivers/clk/imx/clk-imx93.c +1 −1
  255. drivers/clk/mediatek/clk-mt8183.c +27 −0
  256. drivers/clk/meson/clk-pll.c +2 −2
  257. drivers/counter/Kconfig +7 −7
  258. drivers/cpufreq/amd-pstate.c +5 −5
  259. drivers/cpuidle/cpuidle-psci-domain.c +13 −26
  260. drivers/cpuidle/dt_idle_genpd.c +24 −0
  261. drivers/cpuidle/dt_idle_genpd.h +7 −0
  262. drivers/cxl/Kconfig +2 −1
  263. drivers/cxl/acpi.c +2 −3
  264. drivers/cxl/core/mbox.c +44 −1
  265. drivers/cxl/core/memdev.c +19 −0
  266. drivers/cxl/cxlmem.h +17 −1
  267. drivers/dma/Kconfig +2 −0
  268. drivers/dma/idxd/device.c +1 −3
  269. drivers/dma/mcf-edma.c +7 −6
  270. drivers/dma/owl-dma.c +1 −1
  271. drivers/dma/pl330.c +16 −2
  272. drivers/dma/xilinx/xdma.c +4 −2
  273. drivers/firmware/arm_scmi/mailbox.c +3 −1
  274. drivers/firmware/arm_scmi/raw_mode.c +4 −1
  275. drivers/firmware/arm_scmi/smc.c +14 −7
  276. drivers/firmware/smccc/soc_id.c +2 −3
  277. drivers/gpio/gpio-sim.c +1 −0
  278. drivers/gpio/gpio-ws16c48.c +1 −1
  279. drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 −0
  280. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 −1
  281. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +26 −0
  282. drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 −3
  283. drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +6 −2
  284. drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +2 −1
  285. drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c +1 −4
  286. drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +8 −7
  287. drivers/gpu/drm/amd/amdkfd/kfd_crat.c +0 −4
  288. drivers/gpu/drm/amd/amdkfd/kfd_debug.c +2 −3
  289. drivers/gpu/drm/amd/amdkfd/kfd_debug.h +6 −0
  290. drivers/gpu/drm/amd/amdkfd/kfd_device.c +0 −13
  291. drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +3 −11
  292. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 −3
  293. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +2 −2
  294. drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +5 −1
  295. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c +5 −2
  296. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c +2 −1
  297. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c +4 −1
  298. drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 −2
  299. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +16 −6
  300. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 −3
  301. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +9 −3
  302. drivers/gpu/drm/bridge/ite-it6505.c +3 −1
  303. drivers/gpu/drm/bridge/lontium-lt9611.c +1 −3
  304. drivers/gpu/drm/drm_gem_shmem_helper.c +6 −0
  305. drivers/gpu/drm/i915/display/intel_dpt.c +3 −1
  306. drivers/gpu/drm/i915/gem/selftests/huge_pages.c +4 −2
  307. drivers/gpu/drm/i915/gt/gen8_engine_cs.c +92 −48
  308. drivers/gpu/drm/i915/gt/gen8_engine_cs.h +13 −8
  309. drivers/gpu/drm/i915/gt/intel_gpu_commands.h +2 −0
  310. drivers/gpu/drm/i915/gt/intel_gt_regs.h +8 −8
  311. drivers/gpu/drm/i915/gt/intel_lrc.c +2 −15
  312. drivers/gpu/drm/i915/gvt/edid.c +1 −1
  313. drivers/gpu/drm/i915/i915_active.c +70 −29
  314. drivers/gpu/drm/i915/i915_request.c +11 −0
  315. drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c +1 −1
  316. drivers/gpu/drm/msm/adreno/a5xx_gpu.c +1 −1
  317. drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h +1 −1
  318. drivers/gpu/drm/msm/adreno/adreno_device.c +0 −2
  319. drivers/gpu/drm/msm/adreno/adreno_gpu.h +8 −4
  320. drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h +0 −13
  321. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +7 −1
  322. drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c +0 −2
  323. drivers/gpu/drm/msm/msm_fence.c +6 −0
  324. drivers/gpu/drm/msm/msm_gem_submit.c +14 −2
  325. drivers/gpu/drm/msm/msm_mdss.c +17 −2
  326. drivers/gpu/drm/nouveau/nouveau_connector.c +1 −1
  327. drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c +47 −1
  328. drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h +1 −0
  329. drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c +3 −1
  330. drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110.c +10 −0
  331. drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c +1 −0
  332. drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk208.c +1 −0
  333. drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c +1 −0
  334. drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c +0 −13
  335. drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +1 −0
  336. drivers/gpu/drm/rockchip/rockchip_drm_vop.c +9 −8
  337. drivers/gpu/drm/ttm/ttm_bo.c +2 −1
  338. drivers/hv/connection.c +6 −7
  339. drivers/hv/hv_balloon.c +1 −1
  340. drivers/hv/hv_common.c +5 −5
  341. drivers/hwmon/aquacomputer_d5next.c +37 −2
  342. drivers/hwmon/k10temp.c +15 −2
  343. drivers/hwmon/nct6775-core.c +22 −6
  344. drivers/hwmon/nct6775-platform.c +1 −1
  345. drivers/hwmon/nct6775.h +1 −0
  346. drivers/hwmon/nct7802.c +1 −1
  347. drivers/hwmon/oxp-sensors.c +24 −14
  348. drivers/hwmon/pmbus/bel-pfe.c +8 −8
  349. drivers/hwmon/pmbus/pmbus_core.c +11 −9
  350. drivers/iio/adc/ad7192.c +8 −8
  351. drivers/iio/adc/ina2xx-adc.c +6 −3
  352. drivers/iio/adc/meson_saradc.c +12 −11
  353. drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c +1 −1
  354. drivers/iio/frequency/admv1013.c +4 −1
  355. drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 −1
  356. drivers/iio/industrialio-core.c +3 −2
  357. drivers/iio/light/rohm-bu27008.c +19 −3
  358. drivers/iio/light/rohm-bu27034.c +19 −3
  359. drivers/infiniband/core/cma.c +2 −0
  360. drivers/infiniband/core/umem.c +2 −1
  361. drivers/infiniband/hw/bnxt_re/ib_verbs.c +12 −0
  362. drivers/infiniband/hw/bnxt_re/main.c +3 −1
  363. drivers/infiniband/hw/bnxt_re/qplib_fp.c +23 −5
  364. drivers/infiniband/hw/bnxt_re/qplib_fp.h +1 −0
  365. drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +4 −5
  366. drivers/infiniband/hw/bnxt_re/qplib_res.c +1 −0
  367. drivers/infiniband/hw/hfi1/chip.c +1 −0
  368. drivers/infiniband/hw/irdma/ctrl.c +19 −12
  369. drivers/infiniband/hw/irdma/defs.h +22 −24
  370. drivers/infiniband/hw/irdma/hw.c +2 −1
  371. drivers/infiniband/hw/irdma/main.h +1 −1
  372. drivers/infiniband/hw/irdma/puda.c +6 −0
  373. drivers/infiniband/hw/irdma/type.h +2 −0
  374. drivers/infiniband/hw/irdma/uk.c +4 −1
  375. drivers/infiniband/hw/irdma/utils.c +4 −4
  376. drivers/infiniband/hw/mlx4/qp.c +9 −9
  377. drivers/infiniband/hw/mthca/mthca_qp.c +1 −1
  378. drivers/infiniband/sw/rxe/rxe_mw.c +2 −1
  379. drivers/interconnect/qcom/bcm-voter.c +5 −0
  380. drivers/interconnect/qcom/icc-rpmh.h +2 −0
  381. drivers/interconnect/qcom/sa8775p.c +1 −0
  382. drivers/interconnect/qcom/sm8450.c +9 −0
  383. drivers/interconnect/qcom/sm8550.c +17 −0
  384. drivers/iommu/iommufd/device.c +2 −8
  385. drivers/iommu/iommufd/iommufd_private.h +14 −3
  386. drivers/iommu/iommufd/main.c +59 −19
  387. drivers/iommu/iommufd/pages.c +1 −1
  388. drivers/irqchip/irq-bcm6345-l1.c +5 −9
  389. drivers/irqchip/irq-gic-v3-its.c +48 −30
  390. drivers/irqchip/irq-gic-v3.c +61 −1
  391. drivers/isdn/hardware/mISDN/hfcpci.c +5 −5
  392. drivers/isdn/mISDN/dsp.h +1 −1
  393. drivers/isdn/mISDN/dsp_cmx.c +1 −1
  394. drivers/isdn/mISDN/dsp_core.c +1 −1
  395. drivers/md/dm-cache-policy-smq.c +18 −10
  396. drivers/md/dm-integrity.c +1 −0
  397. drivers/md/dm-raid.c +9 −11
  398. drivers/md/md.c +2 −0
  399. drivers/media/cec/usb/pulse8/pulse8-cec.c +5 −2
  400. drivers/media/i2c/tc358746.c +2 −2
  401. drivers/media/pci/cx23885/cx23885-dvb.c +0 −12
  402. drivers/media/platform/amphion/vpu_core.c +2 −2
  403. drivers/media/platform/amphion/vpu_mbox.c +4 −5
  404. drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +1 −5
  405. drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c +1 −3
  406. drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c +1 −3
  407. drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +2 −1
  408. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h +0 −1
  409. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +65 −70
  410. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h +3 −2
  411. drivers/media/platform/qcom/venus/hfi_cmds.c +2 −2
  412. drivers/media/platform/verisilicon/hantro.h +23 −23
  413. drivers/media/platform/verisilicon/hantro_postproc.c +6 −6
  414. drivers/memory/tegra/mc.c +37 −0
  415. drivers/memory/tegra/tegra194.c +1 −0
  416. drivers/memory/tegra/tegra234.c +3 −24
  417. drivers/misc/cardreader/rts5227.c +1 −1
  418. drivers/misc/cardreader/rts5228.c +0 −18
  419. drivers/misc/cardreader/rts5249.c +1 −2
  420. drivers/misc/cardreader/rts5260.c +0 −18
  421. drivers/misc/cardreader/rts5261.c +0 −18
  422. drivers/misc/cardreader/rtsx_pcr.c +4 −1
  423. drivers/misc/sram.c +1 −1
  424. drivers/misc/tps6594-esm.c +18 −1
  425. drivers/mmc/host/moxart-mmc.c +1 −7
  426. drivers/mmc/host/sdhci_f_sdh30.c +27 −33
  427. drivers/mtd/nand/raw/fsl_upm.c +1 −1
  428. drivers/mtd/nand/raw/meson_nand.c +1 −2
  429. drivers/mtd/nand/raw/omap_elm.c +12 −12
  430. drivers/mtd/nand/raw/rockchip-nand-controller.c +25 −20
  431. drivers/mtd/nand/spi/toshiba.c +2 −2
  432. drivers/mtd/nand/spi/winbond.c +2 −2
  433. drivers/mtd/spi-nor/spansion.c +2 −2
  434. drivers/net/bonding/bond_main.c +8 −1
  435. drivers/net/can/usb/gs_usb.c +2 −0
  436. drivers/net/dsa/bcm_sf2.c +6 −2
  437. drivers/net/dsa/microchip/ksz_common.c +15 −20
  438. drivers/net/dsa/ocelot/felix.c +2 −0
  439. drivers/net/dsa/qca/qca8k-8xxx.c +5 −2
  440. drivers/net/dsa/qca/qca8k-common.c +16 −3
  441. drivers/net/ethernet/atheros/atl1c/atl1c_main.c +5 −2
  442. drivers/net/ethernet/atheros/atl1e/atl1e_main.c +5 −2
  443. drivers/net/ethernet/atheros/atlx/atl1.c +5 −2
  444. drivers/net/ethernet/broadcom/bnxt/bnxt.c +51 −34
  445. drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 −1
  446. drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +10 −4
  447. drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h +1 −1
  448. drivers/net/ethernet/emulex/benet/be_main.c +2 −1
  449. drivers/net/ethernet/freescale/enetc/enetc_pf.c +71 −40
  450. drivers/net/ethernet/freescale/fec_main.c +14 −4
  451. drivers/net/ethernet/hisilicon/hns3/hnae3.h +6 −1
  452. drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c +19 −3
  453. drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h +2 −0
  454. drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c +5 −2
  455. drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +13 −1
  456. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c +43 −8
  457. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c +3 −4
  458. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +22 −7
  459. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +33 −3
  460. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h +5 −0
  461. drivers/net/ethernet/ibm/ibmvnic.c +99 −13
  462. drivers/net/ethernet/intel/i40e/i40e_debugfs.c +1 −1
  463. drivers/net/ethernet/intel/iavf/iavf_ethtool.c +4 −1
  464. drivers/net/ethernet/intel/iavf/iavf_fdir.c +8 −3
  465. drivers/net/ethernet/intel/iavf/iavf_main.c +6 −5
  466. drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +14 −12
  467. drivers/net/ethernet/intel/ice/ice_main.c +18 −0
  468. drivers/net/ethernet/intel/igc/igc.h +4 −0
  469. drivers/net/ethernet/intel/igc/igc_main.c +60 −14
  470. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 −1
  471. drivers/net/ethernet/korina.c +1 −2
  472. drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c +3 −0
  473. drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c +42 −1
  474. drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.h +4 −4
  475. drivers/net/ethernet/marvell/prestera/prestera_pci.c +2 −1
  476. drivers/net/ethernet/marvell/prestera/prestera_router.c +7 −7
  477. drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c +67 −49
  478. drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c +4 −5
  479. drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c +4 −1
  480. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c +2 −2
  481. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c +3 −1
  482. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +0 −8
  483. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c +26 −3
  484. drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c +1 −0
  485. drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +10 −0
  486. drivers/net/ethernet/mellanox/mlx5/core/en_main.c +32 −8
  487. drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +9 −11
  488. drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +31 −11
  489. drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_debugfs.c +1 −1
  490. drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c +1 −1
  491. drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +8 −9
  492. drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c +1 −1
  493. drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h +1 −1
  494. drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +85 −22
  495. drivers/net/ethernet/mellanox/mlx5/core/fs_core.h +1 −1
  496. drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c +1 −1
  497. drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +5 −0
  498. drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c +1 −1
  499. drivers/net/ethernet/mellanox/mlx5/core/main.c +2 −1
  500. drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +1 −1
  501. drivers/net/ethernet/mellanox/mlx5/core/sriov.c +1 −2
  502. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c +1 −1
  503. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c +3 −2
  504. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c +13 −6
  505. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ptrn.c +1 −1
  506. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v0.c +4 −3
  507. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c +4 −3
  508. drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h +1 −1
  509. drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c +2 −2
  510. drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h +1 −1
  511. drivers/net/ethernet/microsoft/mana/mana_en.c +33 −4
  512. drivers/net/ethernet/pensando/ionic/ionic_lif.c +16 −7
  513. drivers/net/ethernet/qlogic/qed/qed_dev_api.h +16 −0
  514. drivers/net/ethernet/qlogic/qed/qed_fcoe.c +14 −5
  515. drivers/net/ethernet/qlogic/qed/qed_fcoe.h +15 −2
  516. drivers/net/ethernet/qlogic/qed/qed_hw.c +22 −4
  517. drivers/net/ethernet/qlogic/qed/qed_iscsi.c +14 −5
  518. drivers/net/ethernet/qlogic/qed/qed_iscsi.h +6 −2
  519. drivers/net/ethernet/qlogic/qed/qed_l2.c +14 −5
  520. drivers/net/ethernet/qlogic/qed/qed_l2.h +24 −0
  521. drivers/net/ethernet/qlogic/qed/qed_main.c +3 −3
  522. drivers/net/ethernet/sfc/falcon/selftest.c +13 −10
  523. drivers/net/ethernet/sfc/selftest.c +13 −10
  524. drivers/net/ethernet/sfc/siena/selftest.c +13 −10
  525. drivers/net/ethernet/socionext/netsec.c +11 −0
  526. drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c +2 −1
  527. drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c +3 −1
  528. drivers/net/ethernet/xilinx/ll_temac_main.c +8 −4
  529. drivers/net/ipa/ipa_table.c +11 −9
  530. drivers/net/macsec.c +14 −14
  531. drivers/net/macvlan.c +1 −0
  532. drivers/net/phy/at803x.c +25 −22
  533. drivers/net/phy/marvell10g.c +7 −0
  534. drivers/net/tap.c +1 −1
  535. drivers/net/team/team.c +9 −0
  536. drivers/net/tun.c +2 −2
  537. drivers/net/usb/cdc_ether.c +21 −0
  538. drivers/net/usb/lan78xx.c +2 −5
  539. drivers/net/usb/qmi_wwan.c +1 −0
  540. drivers/net/usb/zaurus.c +21 −0
  541. drivers/net/virtio_net.c +2 −2
  542. drivers/net/vxlan/vxlan_core.c +107 −58
  543. drivers/net/vxlan/vxlan_vnifilter.c +8 −3
  544. drivers/net/wireguard/allowedips.c +4 −4
  545. drivers/net/wireguard/selftest/allowedips.c +10 −6
  546. drivers/net/wireless/ath/ath11k/ahb.c +0 −1
  547. drivers/net/wireless/ath/ath11k/pcic.c +0 −1
  548. drivers/net/wireless/ath/ath12k/wmi.c +1 −2
  549. drivers/net/wireless/ath/ath6kl/Makefile +0 −5
  550. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +5 −0
  551. drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +6 −1
  552. drivers/net/wireless/legacy/rayctl.h +1 −1
  553. drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +3 −3
  554. drivers/net/wireless/realtek/rtw89/mac.c +1 −1
  555. drivers/net/xen-netback/netback.c +10 −5
  556. drivers/nvme/host/core.c +7 −3
  557. drivers/nvme/host/ioctl.c +0 −2
  558. drivers/nvme/host/pci.c +2 −1
  559. drivers/nvme/host/rdma.c +2 −1
  560. drivers/nvme/host/tcp.c +2 −1
  561. drivers/parisc/sba_iommu.c +6 −0
  562. drivers/parport/parport_gsc.c +4 −24
  563. drivers/parport/parport_gsc.h +0 −7
  564. drivers/pci/bus.c +3 −1
  565. drivers/pci/controller/Kconfig +0 −1
  566. drivers/pci/controller/dwc/pcie-designware-host.c +4 −9
  567. drivers/pci/controller/dwc/pcie-designware.c +7 −13
  568. drivers/pci/controller/dwc/pcie-designware.h +0 −1
  569. drivers/pci/hotplug/acpiphp_glue.c +7 −1
  570. drivers/pci/of.c +0 −5
  571. drivers/phy/hisilicon/phy-hisi-inno-usb2.c +1 −1
  572. drivers/phy/mediatek/phy-mtk-dp.c +1 −1
  573. drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c +1 −1
  574. drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c +50 −28
  575. drivers/platform/x86/amd/pmc-quirks.c +2 −6
  576. drivers/platform/x86/amd/pmf/acpi.c +22 −1
  577. drivers/platform/x86/amd/pmf/core.c +7 −2
  578. drivers/platform/x86/amd/pmf/pmf.h +16 −0
  579. drivers/platform/x86/amd/pmf/sps.c +71 −4
  580. drivers/platform/x86/asus-wmi.c +12 −2
  581. drivers/platform/x86/huawei-wmi.c +2 −0
  582. drivers/platform/x86/intel/hid.c +15 −12
  583. drivers/platform/x86/intel/speed_select_if/isst_if_common.c +2 −2
  584. drivers/platform/x86/lenovo-ymc.c +25 −0
  585. drivers/platform/x86/mlx-platform.c +11 −12
  586. drivers/platform/x86/msi-ec.c +9 −9
  587. drivers/platform/x86/msi-laptop.c +4 −4
  588. drivers/platform/x86/serial-multi-instantiate.c +31 −4
  589. drivers/platform/x86/think-lmi.c +2 −2
  590. drivers/platform/x86/touchscreen_dmi.c +4 −3
  591. drivers/powercap/intel_rapl_common.c +7 −7
  592. drivers/powercap/intel_rapl_msr.c +25 −24
  593. drivers/powercap/intel_rapl_tpmi.c +8 −9
  594. drivers/regulator/mt6358-regulator.c +5 −5
  595. drivers/s390/block/dasd.c +48 −77
  596. drivers/s390/block/dasd_3990_erp.c +2 −2
  597. drivers/s390/block/dasd_ioctl.c +1 −0
  598. drivers/s390/net/qeth_core.h +0 −1
  599. drivers/s390/net/qeth_core_main.c +0 −2
  600. drivers/s390/net/qeth_l2_main.c +6 −3
  601. drivers/s390/net/qeth_l3_main.c +5 −3
  602. drivers/s390/scsi/zfcp_fc.c +1 −5
  603. drivers/scsi/53c700.c +1 −1
  604. drivers/scsi/fnic/fnic.h +1 −1
  605. drivers/scsi/fnic/fnic_scsi.c +4 −2
  606. drivers/scsi/lpfc/lpfc_scsi.c +3 −17
  607. drivers/scsi/pm8001/pm8001_init.c +2 −1
  608. drivers/scsi/qedf/qedf_main.c +18 −0
  609. drivers/scsi/qedi/qedi_main.c +21 −2
  610. drivers/scsi/raid_class.c +1 −0
  611. drivers/scsi/scsi_proc.c +17 −13
  612. drivers/scsi/sd.c +6 −3
  613. drivers/scsi/sg.c +4 −3
  614. drivers/scsi/snic/snic_disc.c +1 −0
  615. drivers/scsi/storvsc_drv.c +4 −4
  616. drivers/soc/imx/imx8mp-blk-ctrl.c +1 −1
  617. drivers/soundwire/amd_manager.c +2 −2
  618. drivers/soundwire/bus.c +4 −4
  619. drivers/soundwire/qcom.c +1 −1
  620. drivers/spi/spi-qcom-qspi.c +49 −5
  621. drivers/staging/fbtft/fb_ili9341.c +1 −1
  622. drivers/staging/ks7010/ks_wlan_net.c +4 −2
  623. drivers/staging/media/atomisp/Kconfig +1 −0
  624. drivers/staging/rtl8712/rtl871x_xmit.c +34 −9
  625. drivers/staging/rtl8712/xmit_linux.c +6 −0
  626. drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c +8 −8
  627. drivers/thermal/thermal_core.c +2 −2
  628. drivers/thermal/thermal_of.c +6 −21
  629. drivers/thunderbolt/tb.c +2 −0
  630. drivers/thunderbolt/tmu.c +3 −1
  631. drivers/tty/n_gsm.c +3 −1
  632. drivers/tty/serial/8250/8250_dwlib.c +4 −2
  633. drivers/tty/serial/qcom_geni_serial.c +0 −7
  634. drivers/tty/serial/sh-sci.c +1 −1
  635. drivers/tty/serial/sifive.c +1 −1
  636. drivers/tty/serial/ucc_uart.c +1 −1
  637. drivers/tty/tty_io.c +1 −1
  638. drivers/ufs/host/ufs-renesas.c +1 −1
  639. drivers/usb/cdns3/cdns3-gadget.c +3 −1
  640. drivers/usb/common/usb-conn-gpio.c +5 −1
  641. drivers/usb/core/quirks.c +4 −0
  642. drivers/usb/dwc3/core.c +2 −18
  643. drivers/usb/dwc3/core.h +0 −3
  644. drivers/usb/dwc3/dwc3-pci.c +4 −2
  645. drivers/usb/dwc3/gadget.c +8 −1
  646. drivers/usb/gadget/composite.c +4 −0
  647. drivers/usb/gadget/legacy/raw_gadget.c +6 −4
  648. drivers/usb/gadget/udc/core.c +9 −1
  649. drivers/usb/gadget/udc/tegra-xudc.c +4 −4
  650. drivers/usb/host/ohci-at91.c +7 −1
  651. drivers/usb/host/xhci-mtk.c +1 −0
  652. drivers/usb/host/xhci-pci.c +1 −3
  653. drivers/usb/host/xhci-ring.c +1 −24
  654. drivers/usb/host/xhci-tegra.c +4 −4
  655. drivers/usb/misc/ehset.c +4 −4
  656. drivers/usb/serial/option.c +6 −0
  657. drivers/usb/serial/usb-serial-simple.c +40 −33
  658. drivers/usb/storage/alauda.c +9 −3
  659. drivers/usb/typec/altmodes/displayport.c +17 −1
  660. drivers/usb/typec/class.c +8 −7
  661. drivers/usb/typec/mux/Kconfig +1 −0
  662. drivers/usb/typec/mux/nb7vpq904m.c +18 −7
  663. drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c +2 −2
  664. drivers/usb/typec/tcpm/tcpm.c +7 −0
  665. drivers/usb/typec/ucsi/ucsi.c +2 −2
  666. drivers/xen/events/events_base.c +5 −11
  667. drivers/xen/evtchn.c +26 −9
  668. drivers/xen/grant-table.c +29 −11
  669. drivers/xen/xenbus/xenbus_probe.c +3 −0
  670. fs/9p/fid.h +3 −3
  671. fs/9p/v9fs.c +0 −2
  672. fs/9p/v9fs.h +1 −1
  673. fs/9p/vfs_dir.c +3 −2
  674. fs/9p/vfs_file.c +1 −4
  675. fs/9p/vfs_inode.c +0 −6
  676. fs/9p/vfs_inode_dotl.c +0 −1
  677. fs/autofs/Kconfig +0 −12
  678. fs/btrfs/block-group.c +49 −19
  679. fs/btrfs/block-group.h +4 −2
  680. fs/btrfs/block-rsv.c +5 −0
  681. fs/btrfs/disk-io.c +18 −2
  682. fs/btrfs/extent-tree.c +4 −1
  683. fs/btrfs/extent_io.c +10 −3
  684. fs/btrfs/free-space-tree.c +17 −7
  685. fs/btrfs/inode.c +5 −5
  686. fs/btrfs/relocation.c +37 −8
  687. fs/btrfs/transaction.c +8 −2
  688. fs/btrfs/tree-checker.c +14 −0
  689. fs/btrfs/zoned.c +3 −0
  690. fs/ceph/dir.c +3 −2
  691. fs/ceph/mds_client.c +2 −2
  692. fs/ceph/mds_client.h +5 −0
  693. fs/ceph/metric.c +1 −1
  694. fs/ceph/super.c +10 −0
  695. fs/coda/dir.c +7 −13
  696. fs/erofs/super.c +0 −2
  697. fs/erofs/zdata.c +4 −3
  698. fs/exfat/balloc.c +3 −3
  699. fs/exfat/dir.c +21 −18
  700. fs/exportfs/expfs.c +1 −1
  701. fs/file.c +19 −5
  702. fs/gfs2/file.c +2 −2
  703. fs/gfs2/trans.c +10 −4
  704. fs/inode.c +0 −3
  705. fs/jfs/namei.c +2 −1
  706. fs/nfsd/nfs4state.c +0 −2
  707. fs/nfsd/vfs.c +6 −3
  708. fs/nilfs2/inode.c +8 −0
  709. fs/nilfs2/segment.c +2 −0
  710. fs/nilfs2/the_nilfs.h +2 −0
  711. fs/nls/nls_base.c +2 −2
  712. fs/ntfs/dir.c +2 −1
  713. fs/ocfs2/file.c +3 −2
  714. fs/open.c +1 −1
  715. fs/overlayfs/readdir.c +2 −1
  716. fs/overlayfs/super.c +1 −1
  717. fs/proc/base.c +1 −1
  718. fs/proc/kcore.c +27 −3
  719. fs/proc/vmcore.c +1 −1
  720. fs/readdir.c +52 −16
  721. fs/smb/client/cifsglob.h +1 −0
  722. fs/smb/client/cifssmb.c +1 −2
  723. fs/smb/client/connect.c +5 −0
  724. fs/smb/client/dfs.c +5 −1
  725. fs/smb/client/ioctl.c +5 −0
  726. fs/smb/client/misc.c +1 −0
  727. fs/smb/client/sess.c +3 −1
  728. fs/smb/client/smb2pdu.c +1 −2
  729. fs/smb/server/ksmbd_netlink.h +2 −1
  730. fs/smb/server/server.c +6 −1
  731. fs/smb/server/smb2misc.c +5 −5
  732. fs/smb/server/smb2pdu.c +37 −19
  733. fs/smb/server/smb_common.c +11 −8
  734. fs/smb/server/smb_common.h +1 −1
  735. fs/smb/server/vfs.c +37 −28
  736. fs/smb/server/vfs.h +2 −2
  737. fs/splice.c +2 −0
  738. fs/vboxsf/dir.c +2 −1
  739. fs/vboxsf/shfl_hostintf.h +3 −3
  740. fs/zonefs/file.c +3 −108
  741. fs/zonefs/super.c +1 −8
  742. fs/zonefs/zonefs.h +0 −2
  743. include/asm-generic/mshyperv.h +1 −1
  744. include/asm-generic/word-at-a-time.h +1 −1
  745. include/drm/drm_fb_helper.h +0 −5
  746. include/linux/bio.h +1 −1
  747. include/linux/blkdev.h +0 −1
  748. include/linux/cpu.h +4 −0
  749. include/linux/cpumask.h +6 −2
  750. include/linux/fs.h +7 −1
  751. include/linux/ftrace.h +0 −4
  752. include/linux/hyperv.h +0 −3
  753. include/linux/intel_rapl.h +10 −4
  754. include/linux/mm.h +23 −6
  755. include/linux/mm_types.h +28 −0
  756. include/linux/mmap_lock.h +8 −2
  757. include/linux/nls.h +1 −1
  758. include/linux/pm_wakeirq.h +0 −10
  759. include/linux/prefetch.h +1 −6
  760. include/linux/skmsg.h +1 −0
  761. include/linux/spi/corgi_lcd.h +2 −0
  762. include/linux/spi/spi-mem.h +4 −0
  763. include/linux/thermal.h +3 −3
  764. include/linux/tpm.h +1 −0
  765. include/net/cfg80211.h +3 −0
  766. include/net/gro.h +43 −0
  767. include/net/inet_sock.h +4 −3
  768. include/net/ip.h +1 −1
  769. include/net/ipv6.h +2 −6
  770. include/net/netfilter/nf_tables.h +45 −75
  771. include/net/route.h +2 −2
  772. include/net/vxlan.h +11 −6
  773. include/scsi/scsi_device.h +1 −0
  774. include/soc/tegra/mc.h +3 −0
  775. include/trace/events/tcp.h +4 −1
  776. include/uapi/linux/blkzoned.h +5 −5
  777. include/uapi/linux/if_packet.h +5 −1
  778. include/uapi/linux/pkt_cls.h +3 −1
  779. include/uapi/xen/evtchn.h +9 −0
  780. include/xen/events.h +10 −1
  781. io_uring/io_uring.c +20 −6
  782. io_uring/openclose.c +4 −2
  783. kernel/bpf/cpumap.c +21 −14
  784. kernel/kprobes.c +13 −1
  785. kernel/locking/rtmutex.c +114 −56
  786. kernel/locking/rtmutex_api.c +1 −1
  787. kernel/locking/rtmutex_common.h +34 −13
  788. kernel/locking/ww_mutex.h +6 −6
  789. kernel/power/hibernate.c +1 −1
  790. kernel/signal.c +4 −0
  791. kernel/trace/bpf_trace.c +12 −5
  792. kernel/trace/ring_buffer.c +13 −12
  793. kernel/trace/trace_events.c +4 −10
  794. kernel/trace/trace_events_synth.c +1 −0
  795. kernel/trace/trace_events_trigger.c +2 −0
  796. kernel/trace/trace_probe.c +4 −4
  797. kernel/trace/trace_seq.c +1 −0
  798. kernel/workqueue.c +42 −1
  799. lib/Kconfig.debug +1 −1
  800. lib/Makefile +6 −0
  801. lib/cpumask.c +4 −1
  802. lib/genalloc.c +1 −1
  803. lib/scatterlist.c +1 −1
  804. lib/test_bitmap.c +4 −4
  805. mm/compaction.c +5 −3
  806. mm/damon/core-test.h +5 −5
  807. mm/damon/core.c +1 −0
  808. mm/hugetlb.c +51 −24
  809. mm/ksm.c +2 −0
  810. mm/memory-failure.c +17 −14
  811. mm/memory.c +19 −12
  812. mm/mempolicy.c +14 −1
  813. mm/mmap.c +1 −0
  814. mm/pagewalk.c +4 −1
  815. mm/shmem.c +6 −3
  816. mm/swapfile.c +4 −4
  817. mm/zsmalloc.c +9 −5
  818. net/8021q/vlan.c +1 −2
  819. net/9p/client.c +12 −34
  820. net/9p/trans_virtio.c +4 −4
  821. net/can/raw.c +4 −3
  822. net/ceph/messenger.c +1 −0
  823. net/ceph/osd_client.c +14 −6
  824. net/core/bpf_sk_storage.c +4 −1
  825. net/core/filter.c +0 −6
  826. net/core/rtnetlink.c +6 −2
  827. net/core/skmsg.c +8 −2
  828. net/core/sock.c +41 −30
  829. net/core/sock_map.c +5 −7
  830. net/dcb/dcbnl.c +1 −1
  831. net/dccp/ipv6.c +2 −2
  832. net/dccp/output.c +1 −1
  833. net/dccp/proto.c +8 −2
  834. net/dsa/port.c +8 −1
  835. net/ipv4/inet_diag.c +2 −2
  836. net/ipv4/ip_output.c +13 −4
  837. net/ipv4/ip_sockglue.c +1 −1
  838. net/ipv4/ip_tunnel_core.c +1 −1
  839. net/ipv4/nexthop.c +7 −21
  840. net/ipv4/raw.c +1 −1
  841. net/ipv4/route.c +2 −2
  842. net/ipv4/tcp_ipv4.c +2 −2
  843. net/ipv4/tcp_metrics.c +44 −26
  844. net/ipv4/udp.c +6 −2
  845. net/ipv4/udp_offload.c +5 −2
  846. net/ipv6/addrconf.c +10 −4
  847. net/ipv6/ip6mr.c +1 −1
  848. net/ipv6/ndisc.c +2 −1
  849. net/ipv6/ping.c +1 −1
  850. net/ipv6/raw.c +3 −3
  851. net/ipv6/route.c +4 −3
  852. net/ipv6/tcp_ipv6.c +5 −4
  853. net/ipv6/udp.c +8 −4
  854. net/ipv6/udp_offload.c +5 −2
  855. net/l2tp/l2tp_ip6.c +1 −1
  856. net/mptcp/protocol.c +3 −4
  857. net/mptcp/protocol.h +0 −1
  858. net/mptcp/sockopt.c +1 −1
  859. net/mptcp/subflow.c +29 −29
  860. net/netfilter/nf_tables_api.c +247 −65
  861. net/netfilter/nft_immediate.c +18 −9
  862. net/netfilter/nft_set_hash.c +52 −33
  863. net/netfilter/nft_set_pipapo.c +48 −18
  864. net/netfilter/nft_set_rbtree.c +100 −64
  865. net/netfilter/nft_socket.c +1 −1
  866. net/netfilter/xt_socket.c +2 −2
  867. net/packet/af_packet.c +17 −13
  868. net/sched/cls_flower.c +3 −2
  869. net/sched/cls_fw.c +0 −1
  870. net/sched/cls_route.c +0 −1
  871. net/sched/cls_u32.c +50 −7
  872. net/sched/em_meta.c +2 −2
  873. net/sched/sch_mqprio.c +14 −0
  874. net/sched/sch_taprio.c +13 −2
  875. net/smc/af_smc.c +54 −25
  876. net/smc/smc.h +1 −1
  877. net/smc/smc_clc.c +2 −2
  878. net/smc/smc_core.c +12 −13
  879. net/smc/smc_sysctl.c +8 −2
  880. net/tipc/crypto.c +2 −1
  881. net/tipc/node.c +1 −1
  882. net/tls/tls_device.c +33 −31
  883. net/tls/tls_main.c +0 −3
  884. net/unix/af_unix.c +17 −8
  885. net/wireless/nl80211.c +4 −1
  886. net/wireless/scan.c +1 −1
  887. net/xdp/xsk.c +2 −1
  888. net/xfrm/xfrm_policy.c +1 −1
  889. rust/Makefile +1 −1
  890. rust/bindings/bindings_helper.h +1 −0
  891. rust/kernel/allocator.rs +59 −15
  892. rust/kernel/sync/arc.rs +1 −2
  893. rust/kernel/types.rs +2 −20
  894. scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci +0 −68
  895. scripts/kallsyms.c +1 −0
  896. scripts/spelling.txt +0 −1
  897. security/keys/keyctl.c +8 −3
  898. security/keys/sysctl.c +1 −1
  899. sound/core/seq/seq_ump_client.c +1 −2
  900. sound/pci/hda/patch_realtek.c +2 −0
  901. sound/soc/atmel/atmel-i2s.c +4 −1
  902. sound/soc/codecs/da7219-aad.c +9 −3
  903. sound/soc/codecs/es8316.c +1 −1
  904. sound/soc/codecs/nau8821.c +41 −0
  905. sound/soc/codecs/rt5682-sdw.c +8 −1
  906. sound/soc/codecs/rt711-sdca-sdw.c +9 −1
  907. sound/soc/codecs/rt711-sdw.c +8 −1
  908. sound/soc/codecs/rt712-sdca-sdw.c +9 −1
  909. sound/soc/codecs/rt722-sdca-sdw.c +9 −1
  910. sound/soc/codecs/wm8904.c +3 −0
  911. sound/soc/fsl/fsl_spdif.c +2 −0
  912. sound/usb/mixer_maps.c +14 −0
  913. sound/usb/quirks.c +31 −6
  914. tools/arch/x86/include/asm/cpufeatures.h +1 −1
  915. tools/arch/x86/include/asm/msr-index.h +1 −0
  916. tools/counter/Makefile +2 −1
  917. tools/hv/vmbus_testing +2 −2
  918. tools/net/ynl/lib/ynl.py +8 −8
  919. tools/objtool/arch/x86/decode.c +4 −1
  920. tools/perf/arch/arm64/util/pmu.c +4 −3
  921. tools/perf/arch/powerpc/util/skip-callchain-idx.c +4 −0
  922. tools/perf/tests/parse-events.c +11 −1
  923. tools/perf/tests/shell/test_uprobe_from_different_cu.sh +7 −1
  924. tools/perf/util/machine.c +0 −5
  925. tools/perf/util/parse-events.c +36 −22
  926. tools/perf/util/pmu.c +11 −0
  927. tools/perf/util/pmu.h +1 −0
  928. tools/perf/util/pmus.c +7 −9
  929. tools/perf/util/stat-display.c +5 −0
  930. tools/testing/cxl/test/cxl.c +0 −4
  931. tools/testing/radix-tree/regression1.c +1 −1
  932. tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +73 −1
  933. tools/testing/selftests/bpf/progs/test_sockmap_listen.c +14 −0
  934. tools/testing/selftests/cgroup/test_kmem.c +4 −0
  935. tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc +1 −1
  936. tools/testing/selftests/kvm/include/kvm_util_base.h +4 −2
  937. tools/testing/selftests/kvm/kvm_binary_stats_test.c +45 −23
  938. tools/testing/selftests/kvm/x86_64/set_sregs_test.c +39 −31
  939. tools/testing/selftests/mm/ksm_tests.c +1 −0
  940. tools/testing/selftests/net/fib_nexthops.sh +10 −0
  941. tools/testing/selftests/net/forwarding/bridge_mdb.sh +33 −26
  942. tools/testing/selftests/net/forwarding/bridge_mdb_max.sh +15 −4
  943. tools/testing/selftests/net/forwarding/ethtool.sh +2 −0
  944. tools/testing/selftests/net/forwarding/ethtool_extended_state.sh +2 −0
  945. tools/testing/selftests/net/forwarding/ethtool_mm.sh +13 −5
  946. tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh +2 −0
  947. tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh +2 −0
  948. tools/testing/selftests/net/forwarding/lib.sh +17 −0
  949. tools/testing/selftests/net/forwarding/settings +1 −0
  950. tools/testing/selftests/net/forwarding/tc_actions.sh +4 −2
  951. tools/testing/selftests/net/forwarding/tc_flower.sh +4 −4
  952. tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh +8 −5
  953. tools/testing/selftests/net/forwarding/tc_tunnel_key.sh +6 −3
  954. tools/testing/selftests/net/mptcp/mptcp_join.sh +5 −5
  955. tools/testing/selftests/net/pmtu.sh +35 −0
  956. tools/testing/selftests/net/so_incoming_cpu.c +1 −1
  957. tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c +0 −2
  958. tools/testing/selftests/rseq/Makefile +3 −1
  959. tools/testing/selftests/rseq/rseq.c +24 −6
  960. tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json +25 −0
  961. tools/testing/vsock/Makefile +1 −1
  962. virt/kvm/kvm_main.c +24 −0
.mailmap+96−1
@@ -13,7 +13,9 @@ · 12 unmodified lines
1313 Aaron Durbin <adurbin@google.com>
1414 Abel Vesa <abelvesa@kernel.org> <abel.vesa@nxp.com>
1515 Abel Vesa <abelvesa@kernel.org> <abelvesa@gmail.com>
16+Abhijeet Dharmapurikar <quic_adharmap@quicinc.com> <adharmap@codeaurora.org>
1617 Abhinav Kumar <quic_abhinavk@quicinc.com> <abhinavk@codeaurora.org>
18+Ahmad Masri <quic_amasri@quicinc.com> <amasri@codeaurora.org>
1719 Adam Oldham <oldhamca@gmail.com>
1820 Adam Radford <aradford@gmail.com>
1921 Adriana Reus <adi.reus@gmail.com> <adriana.reus@intel.com>
@@ -30,6 +32,7 @@ Alexander Mikhalitsyn <alexander@mihalicyn.com> <alexander.mikhalitsyn@virtuozzo · 10 unmodified lines
3032 Alexander Mikhalitsyn <alexander@mihalicyn.com> <aleksandr.mikhalitsyn@canonical.com>
3133 Alexandre Belloni <alexandre.belloni@bootlin.com> <alexandre.belloni@free-electrons.com>
3234 Alexandre Ghiti <alex@ghiti.fr> <alexandre.ghiti@canonical.com>
35+Alexei Avshalom Lazar <quic_ailizaro@quicinc.com> <ailizaro@codeaurora.org>
3336 Alexei Starovoitov <ast@kernel.org> <alexei.starovoitov@gmail.com>
3437 Alexei Starovoitov <ast@kernel.org> <ast@fb.com>
3538 Alexei Starovoitov <ast@kernel.org> <ast@plumgrid.com>
@@ -37,8 +40,11 @@ Alex Hung <alexhung@gmail.com> <alex.hung@canonical.com> · 1 unmodified line
3740 Alex Shi <alexs@kernel.org> <alex.shi@intel.com>
3841 Alex Shi <alexs@kernel.org> <alex.shi@linaro.org>
3942 Alex Shi <alexs@kernel.org> <alex.shi@linux.alibaba.com>
43+Aloka Dixit <quic_alokad@quicinc.com> <alokad@codeaurora.org>
4044 Al Viro <viro@ftp.linux.org.uk>
4145 Al Viro <viro@zenIV.linux.org.uk>
46+Amit Blay <quic_ablay@quicinc.com> <ablay@codeaurora.org>
47+Amit Nischal <quic_anischal@quicinc.com> <anischal@codeaurora.org>
4248 Andi Kleen <ak@linux.intel.com> <ak@suse.de>
4349 Andi Shyti <andi@etezian.org> <andi.shyti@samsung.com>
4450 Andreas Herrmann <aherrman@de.ibm.com>
@@ -54,6 +60,8 @@ Andrey Ryabinin <ryabinin.a.a@gmail.com> <aryabinin@virtuozzo.com> · 9 unmodified lines
5460 Andrzej Hajda <andrzej.hajda@intel.com> <a.hajda@samsung.com>
5561 André Almeida <andrealmeid@igalia.com> <andrealmeid@collabora.com>
5662 Andy Adamson <andros@citi.umich.edu>
63+Anilkumar Kolli <quic_akolli@quicinc.com> <akolli@codeaurora.org>
64+Anirudh Ghayal <quic_aghayal@quicinc.com> <aghayal@codeaurora.org>
5765 Antoine Tenart <atenart@kernel.org> <antoine.tenart@bootlin.com>
5866 Antoine Tenart <atenart@kernel.org> <antoine.tenart@free-electrons.com>
5967 Antonio Ospite <ao2@ao2.it> <ao2@amarulasolutions.com>
@@ -62,9 +70,17 @@ Archit Taneja <archit@ti.com> · 2 unmodified lines
6270 Ard Biesheuvel <ardb@kernel.org> <ard.biesheuvel@linaro.org>
6371 Arnaud Patard <arnaud.patard@rtp-net.org>
6472 Arnd Bergmann <arnd@arndb.de>
73+Arun Kumar Neelakantam <quic_aneela@quicinc.com> <aneela@codeaurora.org>
74+Ashok Raj Nagarajan <quic_arnagara@quicinc.com> <arnagara@codeaurora.org>
75+Ashwin Chaugule <quic_ashwinc@quicinc.com> <ashwinc@codeaurora.org>
76+Asutosh Das <quic_asutoshd@quicinc.com> <asutoshd@codeaurora.org>
6577 Atish Patra <atishp@atishpatra.org> <atish.patra@wdc.com>
78+Avaneesh Kumar Dwivedi <quic_akdwived@quicinc.com> <akdwived@codeaurora.org>
6679 Axel Dyks <xl@xlsigned.net>
6780 Axel Lin <axel.lin@gmail.com>
81+Balakrishna Godavarthi <quic_bgodavar@quicinc.com> <bgodavar@codeaurora.org>
82+Banajit Goswami <quic_bgoswami@quicinc.com> <bgoswami@codeaurora.org>
83+Baochen Qiang <quic_bqiang@quicinc.com> <bqiang@codeaurora.org>
6884 Baolin Wang <baolin.wang@linux.alibaba.com> <baolin.wang@linaro.org>
6985 Baolin Wang <baolin.wang@linux.alibaba.com> <baolin.wang@spreadtrum.com>
7086 Baolin Wang <baolin.wang@linux.alibaba.com> <baolin.wang@unisoc.com>
@@ -93,12 +109,15 @@ Brian Avery <b.avery@hp.com> · 22 unmodified lines
93109 Brian King <brking@us.ibm.com>
94110 Brian Silverman <bsilver16384@gmail.com> <brian.silverman@bluerivertech.com>
95111 Cai Huoqing <cai.huoqing@linux.dev> <caihuoqing@baidu.com>
112+Can Guo <quic_cang@quicinc.com> <cang@codeaurora.org>
113+Carl Huang <quic_cjhuang@quicinc.com> <cjhuang@codeaurora.org>
96114 Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com>
97115 Changbin Du <changbin.du@intel.com> <changbin.du@intel.com>
98116 Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
99117 Chao Yu <chao@kernel.org> <yuchao0@huawei.com>
100118 Chris Chiu <chris.chiu@canonical.com> <chiu@endlessm.com>
101119 Chris Chiu <chris.chiu@canonical.com> <chiu@endlessos.org>
120+Chris Lew <quic_clew@quicinc.com> <clew@codeaurora.org>
102121 Christian Borntraeger <borntraeger@linux.ibm.com> <borntraeger@de.ibm.com>
103122 Christian Borntraeger <borntraeger@linux.ibm.com> <cborntra@de.ibm.com>
104123 Christian Borntraeger <borntraeger@linux.ibm.com> <borntrae@de.ibm.com>
@@ -119,7 +138,10 @@ Daniel Borkmann <daniel@iogearbox.net> <dborkmann@redhat.com> · 14 unmodified lines
119138 Daniel Borkmann <daniel@iogearbox.net> <dborkman@redhat.com>
120139 Daniel Borkmann <daniel@iogearbox.net> <dxchgb@gmail.com>
121140 David Brownell <david-b@pacbell.net>
141+David Collins <quic_collinsd@quicinc.com> <collinsd@codeaurora.org>
122142 David Woodhouse <dwmw2@shinybook.infradead.org>
143+Dedy Lansky <quic_dlansky@quicinc.com> <dlansky@codeaurora.org>
144+Deepak Kumar Singh <quic_deesin@quicinc.com> <deesin@codeaurora.org>
123145 Dengcheng Zhu <dzhu@wavecomp.com> <dczhu@mips.com>
124146 Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@gmail.com>
125147 Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@imgtec.com>
@@ -136,6 +158,7 @@ Dmitry Safonov <0x7f454c46@gmail.com> <dsafonov@virtuozzo.com> · 10 unmodified lines
136158 Domen Puncer <domen@coderock.org>
137159 Douglas Gilbert <dougg@torque.net>
138160 Ed L. Cashin <ecashin@coraid.com>
161+Elliot Berman <quic_eberman@quicinc.com> <eberman@codeaurora.org>
139162 Enric Balletbo i Serra <eballetbo@kernel.org> <enric.balletbo@collabora.com>
140163 Enric Balletbo i Serra <eballetbo@kernel.org> <eballetbo@iseebcn.com>
141164 Erik Kaneda <erik.kaneda@intel.com> <erik.schmauss@intel.com>
@@ -148,6 +171,7 @@ Faith Ekstrand <faith.ekstrand@collabora.com> <jason.ekstrand@collabora.com> · 6 unmodified lines
148171 Felipe W Damasio <felipewd@terra.com.br>
149172 Felix Kuhling <fxkuehl@gmx.de>
150173 Felix Moeller <felix@derklecks.de>
174+Fenglin Wu <quic_fenglinw@quicinc.com> <fenglinw@codeaurora.org>
151175 Filipe Lautert <filipe@icewall.org>
152176 Finn Thain <fthain@linux-m68k.org> <fthain@telegraphics.com.au>
153177 Franck Bui-Huu <vagabon.xyz@gmail.com>
@@ -171,8 +195,11 @@ Greg Kurz <groug@kaod.org> <gkurz@linux.vnet.ibm.com> · 17 unmodified lines
171195 Gregory CLEMENT <gregory.clement@bootlin.com> <gregory.clement@free-electrons.com>
172196 Guilherme G. Piccoli <kernel@gpiccoli.net> <gpiccoli@linux.vnet.ibm.com>
173197 Guilherme G. Piccoli <kernel@gpiccoli.net> <gpiccoli@canonical.com>
198+Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com> <gokulsri@codeaurora.org>
199+Govindaraj Saminathan <quic_gsamin@quicinc.com> <gsamin@codeaurora.org>
174200 Guo Ren <guoren@kernel.org> <guoren@linux.alibaba.com>
175201 Guo Ren <guoren@kernel.org> <ren_guo@c-sky.com>
202+Guru Das Srinagesh <quic_gurus@quicinc.com> <gurus@codeaurora.org>
176203 Gustavo Padovan <gustavo@las.ic.unicamp.br>
177204 Gustavo Padovan <padovan@profusion.mobi>
178205 Hanjun Guo <guohanjun@huawei.com> <hanjun.guo@linaro.org>
@@ -190,6 +217,7 @@ Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn> · 11 unmodified lines
190217 J. Bruce Fields <bfields@fieldses.org> <bfields@redhat.com>
191218 J. Bruce Fields <bfields@fieldses.org> <bfields@citi.umich.edu>
192219 Jacob Shin <Jacob.Shin@amd.com>
220+Jack Pham <quic_jackp@quicinc.com> <jackp@codeaurora.org>
193221 Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk@google.com>
194222 Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk.kim@samsung.com>
195223 Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk@motorola.com>
@@ -217,10 +245,12 @@ Jayachandran C <c.jayachandran@gmail.com> <jchandra@digeo.com> · 21 unmodified lines
217245 Jayachandran C <c.jayachandran@gmail.com> <jnair@caviumnetworks.com>
218246 <jean-philippe@linaro.org> <jean-philippe.brucker@arm.com>
219247 Jean Tourrilhes <jt@hpl.hp.com>
248+Jeevan Shriram <quic_jshriram@quicinc.com> <jshriram@codeaurora.org>
220249 Jeff Garzik <jgarzik@pretzel.yyz.us>
221250 Jeff Layton <jlayton@kernel.org> <jlayton@poochiereds.net>
222251 Jeff Layton <jlayton@kernel.org> <jlayton@primarydata.com>
223252 Jeff Layton <jlayton@kernel.org> <jlayton@redhat.com>
253+Jeffrey Hugo <quic_jhugo@quicinc.com> <jhugo@codeaurora.org>
224254 Jens Axboe <axboe@kernel.dk> <axboe@suse.de>
225255 Jens Axboe <axboe@kernel.dk> <jens.axboe@oracle.com>
226256 Jens Axboe <axboe@kernel.dk> <axboe@fb.com>
@@ -228,6 +258,7 @@ Jens Axboe <axboe@kernel.dk> <axboe@meta.com> · 1 unmodified line
228258 Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
229259 Jernej Skrabec <jernej.skrabec@gmail.com> <jernej.skrabec@siol.net>
230260 Jessica Zhang <quic_jesszhan@quicinc.com> <jesszhan@codeaurora.org>
261+Jilai Wang <quic_jilaiw@quicinc.com> <jilaiw@codeaurora.org>
231262 Jiri Pirko <jiri@resnulli.us> <jiri@nvidia.com>
232263 Jiri Pirko <jiri@resnulli.us> <jiri@mellanox.com>
233264 Jiri Pirko <jiri@resnulli.us> <jpirko@redhat.com>
@@ -238,6 +269,7 @@ Jiri Slaby <jirislaby@kernel.org> <jslaby@suse.cz> · 4 unmodified lines
238269 Jiri Slaby <jirislaby@kernel.org> <xslaby@fi.muni.cz>
239270 Jisheng Zhang <jszhang@kernel.org> <jszhang@marvell.com>
240271 Jisheng Zhang <jszhang@kernel.org> <Jisheng.Zhang@synaptics.com>
272+Jishnu Prakash <quic_jprakash@quicinc.com> <jprakash@codeaurora.org>
241273 Johan Hovold <johan@kernel.org> <jhovold@gmail.com>
242274 Johan Hovold <johan@kernel.org> <johan@hovoldconsulting.com>
243275 John Crispin <john@phrozen.org> <blogic@openwrt.org>
@@ -256,6 +288,7 @@ Jordan Crouse <jordan@cosmicpenguin.net> <jcrouse@codeaurora.org> · 12 unmodified lines
256288 <josh@joshtriplett.org> <josht@vnet.ibm.com>
257289 Josh Poimboeuf <jpoimboe@kernel.org> <jpoimboe@redhat.com>
258290 Josh Poimboeuf <jpoimboe@kernel.org> <jpoimboe@us.ibm.com>
291+Jouni Malinen <quic_jouni@quicinc.com> <jouni@codeaurora.org>
259292 Juha Yrjola <at solidboot.com>
260293 Juha Yrjola <juha.yrjola@nokia.com>
261294 Juha Yrjola <juha.yrjola@solidboot.com>
@@ -263,6 +296,8 @@ Julien Thierry <julien.thierry.kdev@gmail.com> <julien.thierry@arm.com> · 1 unmodified line
263296 Iskren Chernev <me@iskren.info> <iskren.chernev@gmail.com>
264297 Kalle Valo <kvalo@kernel.org> <kvalo@codeaurora.org>
265298 Kalyan Thota <quic_kalyant@quicinc.com> <kalyan_t@codeaurora.org>
299+Karthikeyan Periyasamy <quic_periyasa@quicinc.com> <periyasa@codeaurora.org>
300+Kathiravan T <quic_kathirav@quicinc.com> <kathirav@codeaurora.org>
266301 Kay Sievers <kay.sievers@vrfy.org>
267302 Kees Cook <keescook@chromium.org> <kees.cook@canonical.com>
268303 Kees Cook <keescook@chromium.org> <keescook@google.com>
@@ -271,6 +306,8 @@ Kees Cook <keescook@chromium.org> <kees@ubuntu.com> · 2 unmodified lines
271306 Keith Busch <kbusch@kernel.org> <keith.busch@intel.com>
272307 Keith Busch <kbusch@kernel.org> <keith.busch@linux.intel.com>
273308 Kenneth W Chen <kenneth.w.chen@intel.com>
309+Kenneth Westfield <quic_kwestfie@quicinc.com> <kwestfie@codeaurora.org>
310+Kiran Gunda <quic_kgunda@quicinc.com> <kgunda@codeaurora.org>
274311 Kirill Tkhai <tkhai@ya.ru> <ktkhai@virtuozzo.com>
275312 Konstantin Khlebnikov <koct9i@gmail.com> <khlebnikov@yandex-team.ru>
276313 Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com>
@@ -279,6 +316,7 @@ Krishna Manikandan <quic_mkrishn@quicinc.com> <mkrishn@codeaurora.org> · 2 unmodified lines
279316 Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski.k@gmail.com>
280317 Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski@samsung.com>
281318 Krzysztof Kozlowski <krzk@kernel.org> <krzysztof.kozlowski@canonical.com>
319+Kshitiz Godara <quic_kgodara@quicinc.com> <kgodara@codeaurora.org>
282320 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
283321 Kuogee Hsieh <quic_khsieh@quicinc.com> <khsieh@codeaurora.org>
284322 Lee Jones <lee@kernel.org> <joneslee@google.com>
@@ -292,19 +330,27 @@ Leonid I Ananiev <leonid.i.ananiev@intel.com> · 7 unmodified lines
292330 Leon Romanovsky <leon@kernel.org> <leon@leon.nu>
293331 Leon Romanovsky <leon@kernel.org> <leonro@mellanox.com>
294332 Leon Romanovsky <leon@kernel.org> <leonro@nvidia.com>
333+Liam Mark <quic_lmark@quicinc.com> <lmark@codeaurora.org>
295334 Linas Vepstas <linas@austin.ibm.com>
296335 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
297336 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@web.de>
298337 <linux-hardening@vger.kernel.org> <kernel-hardening@lists.openwall.com>
299338 Li Yang <leoyang.li@nxp.com> <leoli@freescale.com>
300339 Li Yang <leoyang.li@nxp.com> <leo@zh-kernel.org>
340+Lior David <quic_liord@quicinc.com> <liord@codeaurora.org>
301341 Lorenzo Pieralisi <lpieralisi@kernel.org> <lorenzo.pieralisi@arm.com>
302342 Luca Ceresoli <luca.ceresoli@bootlin.com> <luca@lucaceresoli.net>
303343 Lukasz Luba <lukasz.luba@arm.com> <l.luba@partner.samsung.com>
344+Luo Jie <quic_luoj@quicinc.com> <luoj@codeaurora.org>
304345 Maciej W. Rozycki <macro@mips.com> <macro@imgtec.com>
305346 Maciej W. Rozycki <macro@orcam.me.uk> <macro@linux-mips.org>
347+Maharaja Kennadyrajan <quic_mkenna@quicinc.com> <mkenna@codeaurora.org>
348+Maheshwar Ajja <quic_majja@quicinc.com> <majja@codeaurora.org>
349+Malathi Gottam <quic_mgottam@quicinc.com> <mgottam@codeaurora.org>
350+Manikanta Pubbisetty <quic_mpubbise@quicinc.com> <mpubbise@codeaurora.org>
306351 Manivannan Sadhasivam <mani@kernel.org> <manivannanece23@gmail.com>
307352 Manivannan Sadhasivam <mani@kernel.org> <manivannan.sadhasivam@linaro.org>
353+Manoj Basapathi <quic_manojbm@quicinc.com> <manojbm@codeaurora.org>
308354 Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com>
309355 Marc Zyngier <maz@kernel.org> <marc.zyngier@arm.com>
310356 Marek Behún <kabel@kernel.org> <marek.behun@nic.cz>
@@ -334,6 +380,7 @@ Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting> · 23 unmodified lines
334380 Matt Ranostay <mranostay@gmail.com> Matthew Ranostay <mranostay@embeddedalley.com>
335381 Matt Ranostay <mranostay@gmail.com> <matt.ranostay@intel.com>
336382 Matt Redfearn <matt.redfearn@mips.com> <matt.redfearn@imgtec.com>
383+Maulik Shah <quic_mkshah@quicinc.com> <mkshah@codeaurora.org>
337384 Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com>
338385 Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@brturbo.com.br>
339386 Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@infradead.org>
@@ -346,7 +393,10 @@ Maxim Mikityanskiy <maxtram95@gmail.com> <maximmi@nvidia.com> · 6 unmodified lines
346393 Maxime Ripard <mripard@kernel.org> <maxime@cerno.tech>
347394 Maxime Ripard <mripard@kernel.org> <maxime.ripard@bootlin.com>
348395 Maxime Ripard <mripard@kernel.org> <maxime.ripard@free-electrons.com>
396+Maya Erez <quic_merez@quicinc.com> <merez@codeaurora.org>
349397 Mayuresh Janorkar <mayur@ti.com>
398+Md Sadre Alam <quic_mdalam@quicinc.com> <mdalam@codeaurora.org>
399+Miaoqing Pan <quic_miaoqing@quicinc.com> <miaoqing@codeaurora.org>
350400 Michael Buesch <m@bues.ch>
351401 Michal Simek <michal.simek@amd.com> <michal.simek@xilinx.com>
352402 Michel Dänzer <michel@tungstengraphics.com>
@@ -357,6 +407,7 @@ Miguel Ojeda <ojeda@kernel.org> <miguel.ojeda.sandonis@gmail.com> · 4 unmodified lines
357407 Mike Rapoport <rppt@kernel.org> <mike@compulab.co.il>
358408 Mike Rapoport <rppt@kernel.org> <mike.rapoport@gmail.com>
359409 Mike Rapoport <rppt@kernel.org> <rppt@linux.ibm.com>
410+Mike Tipton <quic_mdtipton@quicinc.com> <mdtipton@codeaurora.org>
360411 Miodrag Dinic <miodrag.dinic@mips.com> <miodrag.dinic@imgtec.com>
361412 Miquel Raynal <miquel.raynal@bootlin.com> <miquel.raynal@free-electrons.com>
362413 Mitesh shah <mshah@teja.com>
@@ -365,9 +416,13 @@ Morten Welinder <terra@gnome.org> · 2 unmodified lines
365416 Morten Welinder <welinder@anemone.rentec.com>
366417 Morten Welinder <welinder@darter.rentec.com>
367418 Morten Welinder <welinder@troll.com>
419+Mukesh Ojha <quic_mojha@quicinc.com> <mojha@codeaurora.org>
420+Muna Sinada <quic_msinada@quicinc.com> <msinada@codeaurora.org>
421+Murali Nalajala <quic_mnalajal@quicinc.com> <mnalajal@codeaurora.org>
368422 Mythri P K <mythripk@ti.com>
369423 Nadia Yvette Chambers <nyc@holomorphy.com> William Lee Irwin III <wli@holomorphy.com>
370424 Nathan Chancellor <nathan@kernel.org> <natechancellor@gmail.com>
425+Neeraj Upadhyay <quic_neeraju@quicinc.com> <neeraju@codeaurora.org>
371426 Neil Armstrong <neil.armstrong@linaro.org> <narmstrong@baylibre.com>
372427 Nguyen Anh Quynh <aquynh@gmail.com>
373428 Nicholas Piggin <npiggin@gmail.com> <npiggen@suse.de>
@@ -386,6 +441,7 @@ Nikolay Aleksandrov <razor@blackwall.org> <nikolay@redhat.com> · 12 unmodified lines
386441 Nikolay Aleksandrov <razor@blackwall.org> <nikolay@cumulusnetworks.com>
387442 Nikolay Aleksandrov <razor@blackwall.org> <nikolay@nvidia.com>
388443 Nikolay Aleksandrov <razor@blackwall.org> <nikolay@isovalent.com>
444+Odelu Kukatla <quic_okukatla@quicinc.com> <okukatla@codeaurora.org>
389445 Oleksandr Natalenko <oleksandr@natalenko.name> <oleksandr@redhat.com>
390446 Oleksij Rempel <linux@rempel-privat.de> <bug-track@fisher-privat.net>
391447 Oleksij Rempel <linux@rempel-privat.de> <external.Oleksij.Rempel@de.bosch.com>
@@ -393,6 +449,7 @@ Oleksij Rempel <linux@rempel-privat.de> <fixed-term.Oleksij.Rempel@de.bosch.com> · 1 unmodified line
393449 Oleksij Rempel <linux@rempel-privat.de> <o.rempel@pengutronix.de>
394450 Oleksij Rempel <linux@rempel-privat.de> <ore@pengutronix.de>
395451 Oliver Upton <oliver.upton@linux.dev> <oupton@google.com>
452+Oza Pawandeep <quic_poza@quicinc.com> <poza@codeaurora.org>
396453 Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com>
397454 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
398455 Patrick Mochel <mochel@digitalimplant.org>
@@ -404,11 +461,14 @@ Paul E. McKenney <paulmck@kernel.org> <paulmck@linux.vnet.ibm.com> · 5 unmodified lines
404461 Paul E. McKenney <paulmck@kernel.org> <paulmck@us.ibm.com>
405462 Paul Mackerras <paulus@ozlabs.org> <paulus@samba.org>
406463 Paul Mackerras <paulus@ozlabs.org> <paulus@au1.ibm.com>
464+Pavankumar Kondeti <quic_pkondeti@quicinc.com> <pkondeti@codeaurora.org>
407465 Peter A Jonsson <pj@ludd.ltu.se>
408466 Peter Oruba <peter.oruba@amd.com>
409467 Peter Oruba <peter@oruba.de>
410468 Pratyush Anand <pratyush.anand@gmail.com> <pratyush.anand@st.com>
411469 Praveen BP <praveenbp@ti.com>
470+Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> <pradeepc@codeaurora.org>
471+Prasad Sodagudi <quic_psodagud@quicinc.com> <psodagud@codeaurora.org>
412472 Punit Agrawal <punitagrawal@gmail.com> <punit.agrawal@arm.com>
413473 Qais Yousef <qyousef@layalina.io> <qais.yousef@imgtec.com>
414474 Qais Yousef <qyousef@layalina.io> <qais.yousef@arm.com>
@@ -417,10 +477,16 @@ Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com> · 2 unmodified lines
417477 Rafael J. Wysocki <rjw@rjwysocki.net> <rjw@sisk.pl>
418478 Rajeev Nandan <quic_rajeevny@quicinc.com> <rajeevny@codeaurora.org>
419479 Rajendra Nayak <quic_rjendra@quicinc.com> <rnayak@codeaurora.org>
480+Rajeshwari Ravindra Kamble <quic_rkambl@quicinc.com> <rkambl@codeaurora.org>
481+Raju P.L.S.S.S.N <quic_rplsssn@quicinc.com> <rplsssn@codeaurora.org>
420482 Rajesh Shah <rajesh.shah@intel.com>
483+Rakesh Pillai <quic_pillair@quicinc.com> <pillair@codeaurora.org>
421484 Ralf Baechle <ralf@linux-mips.org>
422485 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
486+Ram Chandra Jangir <quic_rjangir@quicinc.com> <rjangir@codeaurora.org>
423487 Randy Dunlap <rdunlap@infradead.org> <rdunlap@xenotime.net>
488+Ravi Kumar Bokka <quic_rbokka@quicinc.com> <rbokka@codeaurora.org>
489+Ravi Kumar Siddojigari <quic_rsiddoji@quicinc.com> <rsiddoji@codeaurora.org>
424490 Rémi Denis-Courmont <rdenis@simphalempin.com>
425491 Ricardo Ribalda <ribalda@kernel.org> <ricardo@ribalda.com>
426492 Ricardo Ribalda <ribalda@kernel.org> Ricardo Ribalda Delgado <ribalda@kernel.org>
@@ -429,6 +495,7 @@ Richard Leitner <richard.leitner@linux.dev> <dev@g0hl1n.net> · 2 unmodified lines
429495 Richard Leitner <richard.leitner@linux.dev> <me@g0hl1n.net>
430496 Richard Leitner <richard.leitner@linux.dev> <richard.leitner@skidata.com>
431497 Robert Foss <rfoss@kernel.org> <robert.foss@linaro.org>
498+Rocky Liao <quic_rjliao@quicinc.com> <rjliao@codeaurora.org>
432499 Roman Gushchin <roman.gushchin@linux.dev> <guro@fb.com>
433500 Roman Gushchin <roman.gushchin@linux.dev> <guroan@gmail.com>
434501 Roman Gushchin <roman.gushchin@linux.dev> <klamm@yandex-team.ru>
@@ -446,24 +513,35 @@ Santosh Shilimkar <santosh.shilimkar@oracle.org> · 11 unmodified lines
446513 Santosh Shilimkar <ssantosh@kernel.org>
447514 Sarangdhar Joshi <spjoshi@codeaurora.org>
448515 Sascha Hauer <s.hauer@pengutronix.de>
516+Sahitya Tummala <quic_stummala@quicinc.com> <stummala@codeaurora.org>
517+Sathishkumar Muruganandam <quic_murugana@quicinc.com> <murugana@codeaurora.org>
449518 Satya Priya <quic_c_skakit@quicinc.com> <skakit@codeaurora.org>
450519 S.Çağlar Onur <caglar@pardus.org.tr>
520+Sayali Lokhande <quic_sayalil@quicinc.com> <sayalil@codeaurora.org>
451521 Sean Christopherson <seanjc@google.com> <sean.j.christopherson@intel.com>
452522 Sean Nyekjaer <sean@geanix.com> <sean.nyekjaer@prevas.dk>
523+Sean Tranchetti <quic_stranche@quicinc.com> <stranche@codeaurora.org>
453524 Sebastian Reichel <sre@kernel.org> <sebastian.reichel@collabora.co.uk>
454525 Sebastian Reichel <sre@kernel.org> <sre@debian.org>
455526 Sedat Dilek <sedat.dilek@gmail.com> <sedat.dilek@credativ.de>
527+Senthilkumar N L <quic_snlakshm@quicinc.com> <snlakshm@codeaurora.org>
456528 Seth Forshee <sforshee@kernel.org> <seth.forshee@canonical.com>
457529 Shannon Nelson <shannon.nelson@amd.com> <snelson@pensando.io>
458530 Shannon Nelson <shannon.nelson@amd.com> <shannon.nelson@intel.com>
459531 Shannon Nelson <shannon.nelson@amd.com> <shannon.nelson@oracle.com>
532+Sharath Chandra Vurukala <quic_sharathv@quicinc.com> <sharathv@codeaurora.org>
460533 Shiraz Hashim <shiraz.linux.kernel@gmail.com> <shiraz.hashim@st.com>
461534 Shuah Khan <shuah@kernel.org> <shuahkhan@gmail.com>
462535 Shuah Khan <shuah@kernel.org> <shuah.khan@hp.com>
463536 Shuah Khan <shuah@kernel.org> <shuahkh@osg.samsung.com>
464537 Shuah Khan <shuah@kernel.org> <shuah.kh@samsung.com>
538+Sibi Sankar <quic_sibis@quicinc.com> <sibis@codeaurora.org>
539+Sid Manning <quic_sidneym@quicinc.com> <sidneym@codeaurora.org>
465540 Simon Arlott <simon@octiron.net> <simon@fire.lp0.eu>
466541 Simon Kelley <simon@thekelleys.org.uk>
542+Sricharan Ramabadhran <quic_srichara@quicinc.com> <sricharan@codeaurora.org>
543+Srinivas Ramana <quic_sramana@quicinc.com> <sramana@codeaurora.org>
544+Sriram R <quic_srirrama@quicinc.com> <srirrama@codeaurora.org>
467545 Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
468546 Stephen Hemminger <stephen@networkplumber.org> <shemminger@linux-foundation.org>
469547 Stephen Hemminger <stephen@networkplumber.org> <shemminger@osdl.org>
@@ -471,22 +549,30 @@ Stephen Hemminger <stephen@networkplumber.org> <sthemmin@microsoft.com> · 1 unmodified line
471549 Stephen Hemminger <stephen@networkplumber.org> <sthemmin@vyatta.com>
472550 Steve Wise <larrystevenwise@gmail.com> <swise@chelsio.com>
473551 Steve Wise <larrystevenwise@gmail.com> <swise@opengridcomputing.com>
474−Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
552+Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com> <subashab@codeaurora.org>
553+Subbaraman Narayanamurthy <quic_subbaram@quicinc.com> <subbaram@codeaurora.org>
475554 Subhash Jadavani <subhashj@codeaurora.org>
555+Sudarshan Rajagopalan <quic_sudaraja@quicinc.com> <sudaraja@codeaurora.org>
476556 Sudeep Holla <sudeep.holla@arm.com> Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
477557 Sumit Semwal <sumit.semwal@ti.com>
558+Surabhi Vishnoi <quic_svishnoi@quicinc.com> <svishnoi@codeaurora.org>
478559 Takashi YOSHII <takashi.yoshii.zj@renesas.com>
560+Tamizh Chelvam Raja <quic_tamizhr@quicinc.com> <tamizhr@codeaurora.org>
561+Taniya Das <quic_tdas@quicinc.com> <tdas@codeaurora.org>
479562 Tejun Heo <htejun@gmail.com>
480563 Thomas Graf <tgraf@suug.ch>
481564 Thomas Körper <socketcan@esd.eu> <thomas.koerper@esd.eu>
482565 Thomas Pedersen <twp@codeaurora.org>
483566 Tiezhu Yang <yangtiezhu@loongson.cn> <kernelpatch@126.com>
567+Tingwei Zhang <quic_tingwei@quicinc.com> <tingwei@codeaurora.org>
568+Tirupathi Reddy <quic_tirupath@quicinc.com> <tirupath@codeaurora.org>
484569 Tobias Klauser <tklauser@distanz.ch> <tobias.klauser@gmail.com>
485570 Tobias Klauser <tklauser@distanz.ch> <klto@zhaw.ch>
486571 Tobias Klauser <tklauser@distanz.ch> <tklauser@nuerscht.ch>
487572 Tobias Klauser <tklauser@distanz.ch> <tklauser@xenon.tklauser.home>
488573 Todor Tomov <todor.too@gmail.com> <todor.tomov@linaro.org>
489574 Tony Luck <tony.luck@intel.com>
575+Trilok Soni <quic_tsoni@quicinc.com> <tsoni@codeaurora.org>
490576 TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
491577 TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
492578 Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
@@ -499,11 +585,17 @@ Uwe Kleine-König <ukleinek@strlen.de> · 6 unmodified lines
499585 Uwe Kleine-König <ukl@pengutronix.de>
500586 Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
501587 Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
588+Vara Reddy <quic_varar@quicinc.com> <varar@codeaurora.org>
589+Varadarajan Narayanan <quic_varada@quicinc.com> <varada@codeaurora.org>
590+Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com> <vthiagar@codeaurora.org>
502591 Vasily Averin <vasily.averin@linux.dev> <vvs@virtuozzo.com>
503592 Vasily Averin <vasily.averin@linux.dev> <vvs@openvz.org>
504593 Vasily Averin <vasily.averin@linux.dev> <vvs@parallels.com>
505594 Vasily Averin <vasily.averin@linux.dev> <vvs@sw.ru>
506595 Valentin Schneider <vschneid@redhat.com> <valentin.schneider@arm.com>
596+Veera Sundaram Sankaran <quic_veeras@quicinc.com> <veeras@codeaurora.org>
597+Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com> <vbadigan@codeaurora.org>
598+Venkateswara Naralasetty <quic_vnaralas@quicinc.com> <vnaralas@codeaurora.org>
507599 Vikash Garodia <quic_vgarodia@quicinc.com> <vgarodia@codeaurora.org>
508600 Vinod Koul <vkoul@kernel.org> <vinod.koul@intel.com>
509601 Vinod Koul <vkoul@kernel.org> <vinod.koul@linux.intel.com>
@@ -513,11 +605,14 @@ Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com> · 3 unmodified lines
513605 Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
514606 Viresh Kumar <viresh.kumar@linaro.org> <viresh.kumar@linaro.org>
515607 Viresh Kumar <viresh.kumar@linaro.org> <viresh.kumar@linaro.com>
608+Vivek Aknurwar <quic_viveka@quicinc.com> <viveka@codeaurora.org>
516609 Vivien Didelot <vivien.didelot@gmail.com> <vivien.didelot@savoirfairelinux.com>
517610 Vlad Dogaru <ddvlad@gmail.com> <vlad.dogaru@intel.com>
518611 Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@parallels.com>
519612 Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@virtuozzo.com>
520613 WeiXiong Liao <gmpy.liaowx@gmail.com> <liaoweixiong@allwinnertech.com>
614+Wen Gong <quic_wgong@quicinc.com> <wgong@codeaurora.org>
615+Wesley Cheng <quic_wcheng@quicinc.com> <wcheng@codeaurora.org>
521616 Will Deacon <will@kernel.org> <will.deacon@arm.com>
522617 Wolfram Sang <wsa@kernel.org> <w.sang@pengutronix.de>
523618 Wolfram Sang <wsa@kernel.org> <wsa@the-dreams.de>
Documentation/ABI/testing/sysfs-bus-cxl+13−2
@@ -82,7 +82,12 @@ Description: · 81 unmodified lines
8282 whether it resides in persistent capacity, volatile capacity,
8383 or the LSA, is made permanently unavailable by whatever means
8484 is appropriate for the media type. This functionality requires
85− the device to be not be actively decoding any HPA ranges.
85+ the device to be disabled, that is, not actively decoding any
86+ HPA ranges. This permits avoiding explicit global CPU cache
87+ management, relying instead for it to be done when a region
88+ transitions between software programmed and hardware committed
89+ states. If this file is not present, then there is no hardware
90+ support for the operation.
8691
8792
8893 What /sys/bus/cxl/devices/memX/security/erase
@@ -92,7 +97,13 @@ Contact: linux-cxl@vger.kernel.org · 3 unmodified lines
9297 Description:
9398 (WO) Write a boolean 'true' string value to this attribute to
9499 secure erase user data by changing the media encryption keys for
95− all user data areas of the device.
100+ all user data areas of the device. This functionality requires
101+ the device to be disabled, that is, not actively decoding any
102+ HPA ranges. This permits avoiding explicit global CPU cache
103+ management, relying instead for it to be done when a region
104+ transitions between software programmed and hardware committed
105+ states. If this file is not present, then there is no hardware
106+ support for the operation.
96107
97108
98109 What: /sys/bus/cxl/devices/memX/firmware/
Documentation/ABI/testing/sysfs-devices-system-cpu+7−6
@@ -513,17 +513,18 @@ Description: information about CPUs heterogeneity. · 512 unmodified lines
513513 cpu_capacity: capacity of cpuX.
514514
515515 What: /sys/devices/system/cpu/vulnerabilities
516+ /sys/devices/system/cpu/vulnerabilities/gather_data_sampling
517+ /sys/devices/system/cpu/vulnerabilities/itlb_multihit
518+ /sys/devices/system/cpu/vulnerabilities/l1tf
519+ /sys/devices/system/cpu/vulnerabilities/mds
516520 /sys/devices/system/cpu/vulnerabilities/meltdown
521+ /sys/devices/system/cpu/vulnerabilities/mmio_stale_data
522+ /sys/devices/system/cpu/vulnerabilities/retbleed
523+ /sys/devices/system/cpu/vulnerabilities/spec_store_bypass
517524 /sys/devices/system/cpu/vulnerabilities/spectre_v1
518525 /sys/devices/system/cpu/vulnerabilities/spectre_v2
519− /sys/devices/system/cpu/vulnerabilities/spec_store_bypass
520− /sys/devices/system/cpu/vulnerabilities/l1tf
521− /sys/devices/system/cpu/vulnerabilities/mds
522526 /sys/devices/system/cpu/vulnerabilities/srbds
523527 /sys/devices/system/cpu/vulnerabilities/tsx_async_abort
524− /sys/devices/system/cpu/vulnerabilities/itlb_multihit
525− /sys/devices/system/cpu/vulnerabilities/mmio_stale_data
526− /sys/devices/system/cpu/vulnerabilities/retbleed
527528 Date: January 2018
528529 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
529530 Description: Information about CPU vulnerabilities
Documentation/ABI/testing/sysfs-module+11−0
@@ -60,3 +60,14 @@ Description: Module taint flags: · 59 unmodified lines
6060 C staging driver module
6161 E unsigned module
6262 == =====================
63+
64+What: /sys/module/grant_table/parameters/free_per_iteration
65+Date: July 2023
66+KernelVersion: 6.5 but backported to all supported stable branches
67+Contact: Xen developer discussion <xen-devel@lists.xenproject.org>
68+Description: Read and write number of grant entries to attempt to free per iteration.
69+
70+ Note: Future versions of Xen and Linux may provide a better
71+ interface for controlling the rate of deferred grant reclaim
72+ or may not need it at all.
73+Users: Qubes OS (https://www.qubes-os.org)
Documentation/ABI/testing/sysfs-platform-hidma+1−1
@@ -2,7 +2,7 @@ What: /sys/devices/platform/hidma-*/chid · 1 unmodified line
22 /sys/devices/platform/QCOM8061:*/chid
33 Date: Dec 2015
44 KernelVersion: 4.4
5−Contact: "Sinan Kaya <okaya@codeaurora.org>"
5+Contact: "Sinan Kaya <okaya@kernel.org>"
66 Description:
77 Contains the ID of the channel within the HIDMA instance.
88 It is used to associate a given HIDMA channel with the
Documentation/ABI/testing/sysfs-platform-hidma-mgmt+10−10
@@ -2,7 +2,7 @@ What: /sys/devices/platform/hidma-mgmt*/chanops/chan*/priority · 1 unmodified line
22 /sys/devices/platform/QCOM8060:*/chanops/chan*/priority
33 Date: Nov 2015
44 KernelVersion: 4.4
5−Contact: "Sinan Kaya <okaya@codeaurora.org>"
5+Contact: "Sinan Kaya <okaya@kernel.org>"
66 Description:
77 Contains either 0 or 1 and indicates if the DMA channel is a
88 low priority (0) or high priority (1) channel.
@@ -11,7 +11,7 @@ What: /sys/devices/platform/hidma-mgmt*/chanops/chan*/weight · 2 unmodified lines
1111 /sys/devices/platform/QCOM8060:*/chanops/chan*/weight
1212 Date: Nov 2015
1313 KernelVersion: 4.4
14−Contact: "Sinan Kaya <okaya@codeaurora.org>"
14+Contact: "Sinan Kaya <okaya@kernel.org>"
1515 Description:
1616 Contains 0..15 and indicates the weight of the channel among
1717 equal priority channels during round robin scheduling.
@@ -20,7 +20,7 @@ What: /sys/devices/platform/hidma-mgmt*/chreset_timeout_cycles · 2 unmodified lines
2020 /sys/devices/platform/QCOM8060:*/chreset_timeout_cycles
2121 Date: Nov 2015
2222 KernelVersion: 4.4
23−Contact: "Sinan Kaya <okaya@codeaurora.org>"
23+Contact: "Sinan Kaya <okaya@kernel.org>"
2424 Description:
2525 Contains the platform specific cycle value to wait after a
2626 reset command is issued. If the value is chosen too short,
@@ -32,7 +32,7 @@ What: /sys/devices/platform/hidma-mgmt*/dma_channels · 5 unmodified lines
3232 /sys/devices/platform/QCOM8060:*/dma_channels
3333 Date: Nov 2015
3434 KernelVersion: 4.4
35−Contact: "Sinan Kaya <okaya@codeaurora.org>"
35+Contact: "Sinan Kaya <okaya@kernel.org>"
3636 Description:
3737 Contains the number of dma channels supported by one instance
3838 of HIDMA hardware. The value may change from chip to chip.
@@ -41,7 +41,7 @@ What: /sys/devices/platform/hidma-mgmt*/hw_version_major · 2 unmodified lines
4141 /sys/devices/platform/QCOM8060:*/hw_version_major
4242 Date: Nov 2015
4343 KernelVersion: 4.4
44−Contact: "Sinan Kaya <okaya@codeaurora.org>"
44+Contact: "Sinan Kaya <okaya@kernel.org>"
4545 Description:
4646 Version number major for the hardware.
4747
@@ -49,7 +49,7 @@ What: /sys/devices/platform/hidma-mgmt*/hw_version_minor · 1 unmodified line
4949 /sys/devices/platform/QCOM8060:*/hw_version_minor
5050 Date: Nov 2015
5151 KernelVersion: 4.4
52−Contact: "Sinan Kaya <okaya@codeaurora.org>"
52+Contact: "Sinan Kaya <okaya@kernel.org>"
5353 Description:
5454 Version number minor for the hardware.
5555
@@ -57,7 +57,7 @@ What: /sys/devices/platform/hidma-mgmt*/max_rd_xactions · 1 unmodified line
5757 /sys/devices/platform/QCOM8060:*/max_rd_xactions
5858 Date: Nov 2015
5959 KernelVersion: 4.4
60−Contact: "Sinan Kaya <okaya@codeaurora.org>"
60+Contact: "Sinan Kaya <okaya@kernel.org>"
6161 Description:
6262 Contains a value between 0 and 31. Maximum number of
6363 read transactions that can be issued back to back.
@@ -69,7 +69,7 @@ What: /sys/devices/platform/hidma-mgmt*/max_read_request · 5 unmodified lines
6969 /sys/devices/platform/QCOM8060:*/max_read_request
7070 Date: Nov 2015
7171 KernelVersion: 4.4
72−Contact: "Sinan Kaya <okaya@codeaurora.org>"
72+Contact: "Sinan Kaya <okaya@kernel.org>"
7373 Description:
7474 Size of each read request. The value needs to be a power
7575 of two and can be between 128 and 1024.
@@ -78,7 +78,7 @@ What: /sys/devices/platform/hidma-mgmt*/max_wr_xactions · 2 unmodified lines
7878 /sys/devices/platform/QCOM8060:*/max_wr_xactions
7979 Date: Nov 2015
8080 KernelVersion: 4.4
81−Contact: "Sinan Kaya <okaya@codeaurora.org>"
81+Contact: "Sinan Kaya <okaya@kernel.org>"
8282 Description:
8383 Contains a value between 0 and 31. Maximum number of
8484 write transactions that can be issued back to back.
@@ -91,7 +91,7 @@ What: /sys/devices/platform/hidma-mgmt*/max_write_request · 6 unmodified lines
9191 /sys/devices/platform/QCOM8060:*/max_write_request
9292 Date: Nov 2015
9393 KernelVersion: 4.4
94−Contact: "Sinan Kaya <okaya@codeaurora.org>"
94+Contact: "Sinan Kaya <okaya@kernel.org>"
9595 Description:
9696 Size of each write request. The value needs to be a power
9797 of two and can be between 128 and 1024.
Documentation/admin-guide/devices.txt+1−1
@@ -2691,7 +2691,7 @@ · 2690 unmodified lines
26912691 45 = /dev/ttyMM1 Marvell MPSC - port 1 (obsolete unused)
26922692 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0
26932693 ...
2694− 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5
2694+ 49 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 3
26952695 50 = /dev/ttyIOC0 Altix serial card
26962696 ...
26972697 81 = /dev/ttyIOC31 Altix serial card
Documentation/admin-guide/hw-vuln/gather_data_sampling.rst+109−0
@@ -0,0 +1,109 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
3+GDS - Gather Data Sampling
4+==========================
5+
6+Gather Data Sampling is a hardware vulnerability which allows unprivileged
7+speculative access to data which was previously stored in vector registers.
8+
9+Problem
10+-------
11+When a gather instruction performs loads from memory, different data elements
12+are merged into the destination vector register. However, when a gather
13+instruction that is transiently executed encounters a fault, stale data from
14+architectural or internal vector registers may get transiently forwarded to the
15+destination vector register instead. This will allow a malicious attacker to
16+infer stale data using typical side channel techniques like cache timing
17+attacks. GDS is a purely sampling-based attack.
18+
19+The attacker uses gather instructions to infer the stale vector register data.
20+The victim does not need to do anything special other than use the vector
21+registers. The victim does not need to use gather instructions to be
22+vulnerable.
23+
24+Because the buffers are shared between Hyper-Threads cross Hyper-Thread attacks
25+are possible.
26+
27+Attack scenarios
28+----------------
29+Without mitigation, GDS can infer stale data across virtually all
30+permission boundaries:
31+
32+ Non-enclaves can infer SGX enclave data
33+ Userspace can infer kernel data
34+ Guests can infer data from hosts
35+ Guest can infer guest from other guests
36+ Users can infer data from other users
37+
38+Because of this, it is important to ensure that the mitigation stays enabled in
39+lower-privilege contexts like guests and when running outside SGX enclaves.
40+
41+The hardware enforces the mitigation for SGX. Likewise, VMMs should ensure
42+that guests are not allowed to disable the GDS mitigation. If a host erred and
43+allowed this, a guest could theoretically disable GDS mitigation, mount an
44+attack, and re-enable it.
45+
46+Mitigation mechanism
47+--------------------
48+This issue is mitigated in microcode. The microcode defines the following new
49+bits:
50+
51+ ================================ === ============================
52+ IA32_ARCH_CAPABILITIES[GDS_CTRL] R/O Enumerates GDS vulnerability
53+ and mitigation support.
54+ IA32_ARCH_CAPABILITIES[GDS_NO] R/O Processor is not vulnerable.
55+ IA32_MCU_OPT_CTRL[GDS_MITG_DIS] R/W Disables the mitigation
56+ 0 by default.
57+ IA32_MCU_OPT_CTRL[GDS_MITG_LOCK] R/W Locks GDS_MITG_DIS=0. Writes
58+ to GDS_MITG_DIS are ignored
59+ Can't be cleared once set.
60+ ================================ === ============================
61+
62+GDS can also be mitigated on systems that don't have updated microcode by
63+disabling AVX. This can be done by setting gather_data_sampling="force" or
64+"clearcpuid=avx" on the kernel command-line.
65+
66+If used, these options will disable AVX use by turning off XSAVE YMM support.
67+However, the processor will still enumerate AVX support. Userspace that
68+does not follow proper AVX enumeration to check both AVX *and* XSAVE YMM
69+support will break.
70+
71+Mitigation control on the kernel command line
72+---------------------------------------------
73+The mitigation can be disabled by setting "gather_data_sampling=off" or
74+"mitigations=off" on the kernel command line. Not specifying either will default
75+to the mitigation being enabled. Specifying "gather_data_sampling=force" will
76+use the microcode mitigation when available or disable AVX on affected systems
77+where the microcode hasn't been updated to include the mitigation.
78+
79+GDS System Information
80+------------------------
81+The kernel provides vulnerability status information through sysfs. For
82+GDS this can be accessed by the following sysfs file:
83+
84+/sys/devices/system/cpu/vulnerabilities/gather_data_sampling
85+
86+The possible values contained in this file are:
87+
88+ ============================== =============================================
89+ Not affected Processor not vulnerable.
90+ Vulnerable Processor vulnerable and mitigation disabled.
91+ Vulnerable: No microcode Processor vulnerable and microcode is missing
92+ mitigation.
93+ Mitigation: AVX disabled,
94+ no microcode Processor is vulnerable and microcode is missing
95+ mitigation. AVX disabled as mitigation.
96+ Mitigation: Microcode Processor is vulnerable and mitigation is in
97+ effect.
98+ Mitigation: Microcode (locked) Processor is vulnerable and mitigation is in
99+ effect and cannot be disabled.
100+ Unknown: Dependent on
101+ hypervisor status Running on a virtual guest processor that is
102+ affected but with no way to know if host
103+ processor is mitigated or vulnerable.
104+ ============================== =============================================
105+
106+GDS Default mitigation
107+----------------------
108+The updated microcode will enable the mitigation by default. The kernel's
109+default action is to leave the mitigation enabled.
Documentation/admin-guide/hw-vuln/index.rst+8−6
@@ -13,9 +13,11 @@ are configurable at compile, boot or run time. · 12 unmodified lines
1313 l1tf
1414 mds
1515 tsx_async_abort
16− multihit.rst
17− special-register-buffer-data-sampling.rst
18− core-scheduling.rst
19− l1d_flush.rst
20− processor_mmio_stale_data.rst
21− cross-thread-rsb.rst
16+ multihit
17+ special-register-buffer-data-sampling
18+ core-scheduling
19+ l1d_flush
20+ processor_mmio_stale_data
21+ cross-thread-rsb
22+ srso
23+ gather_data_sampling
Documentation/admin-guide/hw-vuln/spectre.rst+7−4
@@ -484,11 +484,14 @@ Spectre variant 2 · 483 unmodified lines
484484
485485 Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
486486 boot, by setting the IBRS bit, and they're automatically protected against
487− Spectre v2 variant attacks, including cross-thread branch target injections
488− on SMT systems (STIBP). In other words, eIBRS enables STIBP too.
487+ Spectre v2 variant attacks.
489488
490− Legacy IBRS systems clear the IBRS bit on exit to userspace and
491− therefore explicitly enable STIBP for that
489+ On Intel's enhanced IBRS systems, this includes cross-thread branch target
490+ injections on SMT systems (STIBP). In other words, Intel eIBRS enables
491+ STIBP, too.
492+
493+ AMD Automatic IBRS does not protect userspace, and Legacy IBRS systems clear
494+ the IBRS bit on exit to userspace, therefore both explicitly enable STIBP.
492495
493496 The retpoline mitigation is turned on by default on vulnerable
494497 CPUs. It can be forced on or off by the administrator
Documentation/admin-guide/hw-vuln/srso.rst+150−0
@@ -0,0 +1,150 @@
1+.. SPDX-License-Identifier: GPL-2.0
2+
3+Speculative Return Stack Overflow (SRSO)
4+========================================
5+
6+This is a mitigation for the speculative return stack overflow (SRSO)
7+vulnerability found on AMD processors. The mechanism is by now the well
8+known scenario of poisoning CPU functional units - the Branch Target
9+Buffer (BTB) and Return Address Predictor (RAP) in this case - and then
10+tricking the elevated privilege domain (the kernel) into leaking
11+sensitive data.
12+
13+AMD CPUs predict RET instructions using a Return Address Predictor (aka
14+Return Address Stack/Return Stack Buffer). In some cases, a non-architectural
15+CALL instruction (i.e., an instruction predicted to be a CALL but is
16+not actually a CALL) can create an entry in the RAP which may be used
17+to predict the target of a subsequent RET instruction.
18+
19+The specific circumstances that lead to this varies by microarchitecture
20+but the concern is that an attacker can mis-train the CPU BTB to predict
21+non-architectural CALL instructions in kernel space and use this to
22+control the speculative target of a subsequent kernel RET, potentially
23+leading to information disclosure via a speculative side-channel.
24+
25+The issue is tracked under CVE-2023-20569.
26+
27+Affected processors
28+-------------------
29+
30+AMD Zen, generations 1-4. That is, all families 0x17 and 0x19. Older
31+processors have not been investigated.
32+
33+System information and options
34+------------------------------
35+
36+First of all, it is required that the latest microcode be loaded for
37+mitigations to be effective.
38+
39+The sysfs file showing SRSO mitigation status is:
40+
41+ /sys/devices/system/cpu/vulnerabilities/spec_rstack_overflow
42+
43+The possible values in this file are:
44+
45+ * 'Not affected':
46+
47+ The processor is not vulnerable
48+
49+ * 'Vulnerable: no microcode':
50+
51+ The processor is vulnerable, no microcode extending IBPB
52+ functionality to address the vulnerability has been applied.
53+
54+ * 'Mitigation: microcode':
55+
56+ Extended IBPB functionality microcode patch has been applied. It does
57+ not address User->Kernel and Guest->Host transitions protection but it
58+ does address User->User and VM->VM attack vectors.
59+
60+ Note that User->User mitigation is controlled by how the IBPB aspect in
61+ the Spectre v2 mitigation is selected:
62+
63+ * conditional IBPB:
64+
65+ where each process can select whether it needs an IBPB issued
66+ around it PR_SPEC_DISABLE/_ENABLE etc, see :doc:`spectre`
67+
68+ * strict:
69+
70+ i.e., always on - by supplying spectre_v2_user=on on the kernel
71+ command line
72+
73+ (spec_rstack_overflow=microcode)
74+
75+ * 'Mitigation: safe RET':
76+
77+ Software-only mitigation. It complements the extended IBPB microcode
78+ patch functionality by addressing User->Kernel and Guest->Host
79+ transitions protection.
80+
81+ Selected by default or by spec_rstack_overflow=safe-ret
82+
83+ * 'Mitigation: IBPB':
84+
85+ Similar protection as "safe RET" above but employs an IBPB barrier on
86+ privilege domain crossings (User->Kernel, Guest->Host).
87+
88+ (spec_rstack_overflow=ibpb)
89+
90+ * 'Mitigation: IBPB on VMEXIT':
91+
92+ Mitigation addressing the cloud provider scenario - the Guest->Host
93+ transitions only.
94+
95+ (spec_rstack_overflow=ibpb-vmexit)
96+
97+
98+
99+In order to exploit vulnerability, an attacker needs to:
100+
101+ - gain local access on the machine
102+
103+ - break kASLR
104+
105+ - find gadgets in the running kernel in order to use them in the exploit
106+
107+ - potentially create and pin an additional workload on the sibling
108+ thread, depending on the microarchitecture (not necessary on fam 0x19)
109+
110+ - run the exploit
111+
112+Considering the performance implications of each mitigation type, the
113+default one is 'Mitigation: safe RET' which should take care of most
114+attack vectors, including the local User->Kernel one.
115+
116+As always, the user is advised to keep her/his system up-to-date by
117+applying software updates regularly.
118+
119+The default setting will be reevaluated when needed and especially when
120+new attack vectors appear.
121+
122+As one can surmise, 'Mitigation: safe RET' does come at the cost of some
123+performance depending on the workload. If one trusts her/his userspace
124+and does not want to suffer the performance impact, one can always
125+disable the mitigation with spec_rstack_overflow=off.
126+
127+Similarly, 'Mitigation: IBPB' is another full mitigation type employing
128+an indrect branch prediction barrier after having applied the required
129+microcode patch for one's system. This mitigation comes also at
130+a performance cost.
131+
132+Mitigation: safe RET
133+--------------------
134+
135+The mitigation works by ensuring all RET instructions speculate to
136+a controlled location, similar to how speculation is controlled in the
137+retpoline sequence. To accomplish this, the __x86_return_thunk forces
138+the CPU to mispredict every function return using a 'safe return'
139+sequence.
140+
141+To ensure the safety of this mitigation, the kernel must ensure that the
142+safe return sequence is itself free from attacker interference. In Zen3
143+and Zen4, this is accomplished by creating a BTB alias between the
144+untraining function srso_untrain_ret_alias() and the safe return
145+function srso_safe_ret_alias() which results in evicting a potentially
146+poisoned BTB entry and using that safe one for all function returns.
147+
148+In older Zen1 and Zen2, this is accomplished using a reinterpretation
149+technique similar to Retbleed one: srso_untrain_ret() and
150+srso_safe_ret().
Documentation/admin-guide/kdump/vmcoreinfo.rst+6−0
@@ -624,3 +624,9 @@ Used to get the correct ranges: · 623 unmodified lines
624624 * VMALLOC_START ~ VMALLOC_END : vmalloc() / ioremap() space.
625625 * VMEMMAP_START ~ VMEMMAP_END : vmemmap space, used for struct page array.
626626 * KERNEL_LINK_ADDR : start address of Kernel link and BPF
627+
628+va_kernel_pa_offset
629+-------------------
630+
631+Indicates the offset between the kernel virtual and physical mappings.
632+Used to translate virtual to physical addresses.
Documentation/admin-guide/kernel-parameters.txt+45−13
@@ -1623,6 +1623,26 @@ · 1622 unmodified lines
16231623 Format: off | on
16241624 default: on
16251625
1626+ gather_data_sampling=
1627+ [X86,INTEL] Control the Gather Data Sampling (GDS)
1628+ mitigation.
1629+
1630+ Gather Data Sampling is a hardware vulnerability which
1631+ allows unprivileged speculative access to data which was
1632+ previously stored in vector registers.
1633+
1634+ This issue is mitigated by default in updated microcode.
1635+ The mitigation may have a performance impact but can be
1636+ disabled. On systems without the microcode mitigation
1637+ disabling AVX serves as a mitigation.
1638+
1639+ force: Disable AVX to mitigate systems without
1640+ microcode mitigation. No effect if the microcode
1641+ mitigation is present. Known to cause crashes in
1642+ userspace with buggy AVX enumeration.
1643+
1644+ off: Disable GDS mitigation.
1645+
16261646 gcov_persist= [GCOV] When non-zero (default), profiling data for
16271647 kernel modules is saved and remains accessible via
16281648 debugfs, even when the module is unloaded/reloaded.
@@ -3273,24 +3293,25 @@ · 1644 unmodified lines
32733293 Disable all optional CPU mitigations. This
32743294 improves system performance, but it may also
32753295 expose users to several CPU vulnerabilities.
3276− Equivalent to: nopti [X86,PPC]
3277− if nokaslr then kpti=0 [ARM64]
3278− nospectre_v1 [X86,PPC]
3279− nobp=0 [S390]
3280− nospectre_v2 [X86,PPC,S390,ARM64]
3281− spectre_v2_user=off [X86]
3282− spec_store_bypass_disable=off [X86,PPC]
3283− ssbd=force-off [ARM64]
3284− nospectre_bhb [ARM64]
3296+ Equivalent to: if nokaslr then kpti=0 [ARM64]
3297+ gather_data_sampling=off [X86]
3298+ kvm.nx_huge_pages=off [X86]
32853299 l1tf=off [X86]
32863300 mds=off [X86]
3287− tsx_async_abort=off [X86]
3288− kvm.nx_huge_pages=off [X86]
3289− srbds=off [X86,INTEL]
3301+ mmio_stale_data=off [X86]
32903302 no_entry_flush [PPC]
32913303 no_uaccess_flush [PPC]
3292− mmio_stale_data=off [X86]
3304+ nobp=0 [S390]
3305+ nopti [X86,PPC]
3306+ nospectre_bhb [ARM64]
3307+ nospectre_v1 [X86,PPC]
3308+ nospectre_v2 [X86,PPC,S390,ARM64]
32933309 retbleed=off [X86]
3310+ spec_store_bypass_disable=off [X86,PPC]
3311+ spectre_v2_user=off [X86]
3312+ srbds=off [X86,INTEL]
3313+ ssbd=force-off [ARM64]
3314+ tsx_async_abort=off [X86]
32943315
32953316 Exceptions:
32963317 This does not have any effect on
@@ -5875,6 +5896,17 @@ · 2578 unmodified lines
58755896 Not specifying this option is equivalent to
58765897 spectre_v2_user=auto.
58775898
5899+ spec_rstack_overflow=
5900+ [X86] Control RAS overflow mitigation on AMD Zen CPUs
5901+
5902+ off - Disable mitigation
5903+ microcode - Enable microcode mitigation only
5904+ safe-ret - Enable sw-only safe RET mitigation (default)
5905+ ibpb - Enable mitigation by issuing IBPB on
5906+ kernel entry
5907+ ibpb-vmexit - Issue IBPB only on VMEXIT
5908+ (cloud-specific mitigation)
5909+
58785910 spec_store_bypass_disable=
58795911 [HW] Control Speculative Store Bypass (SSB) Disable mitigation
58805912 (Speculative Store Bypass vulnerability)
Documentation/arch/arm64/silicon-errata.rst+3−0
@@ -148,6 +148,9 @@ stable kernels. · 147 unmodified lines
148148 | ARM | MMU-700 | #2268618,2812531| N/A |
149149 +----------------+-----------------+-----------------+-----------------------------+
150150 +----------------+-----------------+-----------------+-----------------------------+
151+| ARM | GIC-700 | #2941627 | ARM64_ERRATUM_2941627 |
152++----------------+-----------------+-----------------+-----------------------------+
153++----------------+-----------------+-----------------+-----------------------------+
151154 | Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_845719 |
152155 +----------------+-----------------+-----------------+-----------------------------+
153156 | Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_843419 |
Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml+0−3
@@ -216,7 +216,6 @@ properties: · 215 unmodified lines
216216 description: Whether to enable burnout current for EXT1.
217217
218218 adi,ext1-burnout-current-nanoamp:
219− $ref: /schemas/types.yaml#/definitions/uint32
220219 description:
221220 Burnout current in nanoamps to be applied to EXT1.
222221 enum: [0, 50, 500, 1000, 10000]
@@ -233,7 +232,6 @@ properties: · 10 unmodified lines
233232 description: Whether to enable burnout current for EXT2.
234233
235234 adi,ext2-burnout-current-nanoamp:
236− $ref: /schemas/types.yaml#/definitions/uint32
237235 description: Burnout current in nanoamps to be applied to EXT2.
238236 enum: [0, 50, 500, 1000, 10000]
239237 default: 0
@@ -249,7 +247,6 @@ properties: · 9 unmodified lines
249247 description: Whether to enable burnout current for VIOUT.
250248
251249 adi,viout-burnout-current-nanoamp:
252− $ref: /schemas/types.yaml#/definitions/uint32
253250 description: Burnout current in nanoamps to be applied to VIOUT.
254251 enum: [0, 1000, 10000]
255252 default: 0
Documentation/devicetree/bindings/net/mediatek,net.yaml+1−6
@@ -293,7 +293,7 @@ allOf: · 292 unmodified lines
293293 patternProperties:
294294 "^mac@[0-1]$":
295295 type: object
296− additionalProperties: false
296+ unevaluatedProperties: false
297297 allOf:
298298 - $ref: ethernet-controller.yaml#
299299 description:
@@ -305,14 +305,9 @@ patternProperties: · 5 unmodified lines
305305 reg:
306306 maxItems: 1
307307
308− phy-handle: true
309−
310− phy-mode: true
311−
312308 required:
313309 - reg
314310 - compatible
315− - phy-handle
316311
317312 required:
318313 - compatible
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml+8−2
@@ -91,12 +91,18 @@ properties: · 90 unmodified lines
9191 $ref: /schemas/types.yaml#/definitions/phandle
9292
9393 tx_delay:
94− description: Delay value for TXD timing. Range value is 0~0x7F, 0x30 as default.
94+ description: Delay value for TXD timing.
9595 $ref: /schemas/types.yaml#/definitions/uint32
96+ minimum: 0
97+ maximum: 0x7F
98+ default: 0x30
9699
97100 rx_delay:
98− description: Delay value for RXD timing. Range value is 0~0x7F, 0x10 as default.
101+ description: Delay value for RXD timing.
99102 $ref: /schemas/types.yaml#/definitions/uint32
103+ minimum: 0
104+ maximum: 0x7F
105+ default: 0x10
100106
101107 phy-supply:
102108 description: PHY regulator
Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml+3−1
@@ -16,13 +16,15 @@ properties: · 15 unmodified lines
1616 - enum:
1717 - atmel,at91rm9200-usart
1818 - atmel,at91sam9260-usart
19− - microchip,sam9x60-usart
2019 - items:
2120 - const: atmel,at91rm9200-dbgu
2221 - const: atmel,at91rm9200-usart
2322 - items:
2423 - const: atmel,at91sam9260-dbgu
2524 - const: atmel,at91sam9260-usart
25+ - items:
26+ - const: microchip,sam9x60-usart
27+ - const: atmel,at91sam9260-usart
2628 - items:
2729 - const: microchip,sam9x60-dbgu
2830 - const: microchip,sam9x60-usart
Documentation/filesystems/locking.rst+2−3
@@ -551,9 +551,8 @@ mutex or just to use i_size_read() instead. · 550 unmodified lines
551551 Note: this does not protect the file->f_pos against concurrent modifications
552552 since this is something the userspace has to take care about.
553553
554−->iterate() is called with i_rwsem exclusive.
555−
556−->iterate_shared() is called with i_rwsem at least shared.
554+->iterate_shared() is called with i_rwsem held for reading, and with the
555+file f_pos_lock held exclusively
557556
558557 ->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags.
559558 Most instances call fasync_helper(), which does that maintenance, so it's
Documentation/filesystems/porting.rst+10−15
@@ -537,7 +537,7 @@ vfs_readdir() is gone; switch to iterate_dir() instead · 536 unmodified lines
537537
538538 **mandatory**
539539
540−->readdir() is gone now; switch to ->iterate()
540+->readdir() is gone now; switch to ->iterate_shared()
541541
542542 **mandatory**
543543
@@ -693,24 +693,19 @@ parallel now. · 149 unmodified lines
693693
694694 ---
695695
696−**recommended**
696+**mandatory**
697697
698−->iterate_shared() is added; it's a parallel variant of ->iterate().
698+->iterate_shared() is added.
699699 Exclusion on struct file level is still provided (as well as that
700700 between it and lseek on the same struct file), but if your directory
701701 has been opened several times, you can get these called in parallel.
702702 Exclusion between that method and all directory-modifying ones is
703703 still provided, of course.
704704
705−Often enough ->iterate() can serve as ->iterate_shared() without any
706−changes - it is a read-only operation, after all. If you have any
707−per-inode or per-dentry in-core data structures modified by ->iterate(),
708−you might need something to serialize the access to them. If you
709−do dcache pre-seeding, you'll need to switch to d_alloc_parallel() for
710−that; look for in-tree examples.
711−
712−Old method is only used if the new one is absent; eventually it will
713−be removed. Switch while you still can; the old one won't stay.
705+If you have any per-inode or per-dentry in-core data structures modified
706+by ->iterate_shared(), you might need something to serialize the access
707+to them. If you do dcache pre-seeding, you'll need to switch to
708+d_alloc_parallel() for that; look for in-tree examples.
714709
715710 ---
716711
@@ -930,9 +925,9 @@ should be done by looking at FMODE_LSEEK in file->f_mode. · 213 unmodified lines
930925 filldir_t (readdir callbacks) calling conventions have changed. Instead of
931926 returning 0 or -E... it returns bool now. false means "no more" (as -E... used
932927 to) and true - "keep going" (as 0 in old calling conventions). Rationale:
933−callers never looked at specific -E... values anyway. ->iterate() and
934−->iterate_shared() instance require no changes at all, all filldir_t ones in
935−the tree converted.
928+callers never looked at specific -E... values anyway. -> iterate_shared()
929+instances require no changes at all, all filldir_t ones in the tree
930+converted.
936931
937932 ---
938933
Documentation/filesystems/tmpfs.rst+20−27
@@ -84,8 +84,6 @@ nr_inodes The maximum number of inodes for this instance. The default · 83 unmodified lines
8484 is half of the number of your physical RAM pages, or (on a
8585 machine with highmem) the number of lowmem RAM pages,
8686 whichever is the lower.
87−noswap Disables swap. Remounts must respect the original settings.
88− By default swap is enabled.
8987 ========= ============================================================
9088
9189 These parameters accept a suffix k, m or g for kilo, mega and giga and
@@ -99,36 +97,31 @@ mount with such options, since it allows any user with write access to · 7 unmodified lines
9997 use up all the memory on the machine; but enhances the scalability of
10098 that instance in a system with many CPUs making intensive use of it.
10199
100+tmpfs blocks may be swapped out, when there is a shortage of memory.
101+tmpfs has a mount option to disable its use of swap:
102+
103+====== ===========================================================
104+noswap Disables swap. Remounts must respect the original settings.
105+ By default swap is enabled.
106+====== ===========================================================
107+
102108 tmpfs also supports Transparent Huge Pages which requires a kernel
103109 configured with CONFIG_TRANSPARENT_HUGEPAGE and with huge supported for
104110 your system (has_transparent_hugepage(), which is architecture specific).
105111 The mount options for this are:
106112
107−====== ============================================================
108−huge=0 never: disables huge pages for the mount
109−huge=1 always: enables huge pages for the mount
110−huge=2 within_size: only allocate huge pages if the page will be
111− fully within i_size, also respect fadvise()/madvise() hints.
112−huge=3 advise: only allocate huge pages if requested with
113− fadvise()/madvise()
114−====== ============================================================
115−
116−There is a sysfs file which you can also use to control system wide THP
117−configuration for all tmpfs mounts, the file is:
118−
119−/sys/kernel/mm/transparent_hugepage/shmem_enabled
120−
121−This sysfs file is placed on top of THP sysfs directory and so is registered
122−by THP code. It is however only used to control all tmpfs mounts with one
123−single knob. Since it controls all tmpfs mounts it should only be used either
124−for emergency or testing purposes. The values you can set for shmem_enabled are:
125−
126−== ============================================================
127−-1 deny: disables huge on shm_mnt and all mounts, for
128− emergency use
129−-2 force: enables huge on shm_mnt and all mounts, w/o needing
130− option, for testing
131−== ============================================================
113+================ ==============================================================
114+huge=never Do not allocate huge pages. This is the default.
115+huge=always Attempt to allocate huge page every time a new page is needed.
116+huge=within_size Only allocate huge page if it will be fully within i_size.
117+ Also respect madvise(2) hints.
118+huge=advise Only allocate huge page if requested with madvise(2).
119+================ ==============================================================
120+
121+See also Documentation/admin-guide/mm/transhuge.rst, which describes the
122+sysfs file /sys/kernel/mm/transparent_hugepage/shmem_enabled: which can
123+be used to deny huge pages on all tmpfs mounts in an emergency, or to
124+force huge pages on all tmpfs mounts for testing.
132125
133126 tmpfs has a mount option to set the NUMA memory allocation policy for
134127 all files in that instance (if CONFIG_NUMA is enabled) - which can be
Documentation/networking/napi.rst+7−6
@@ -65,15 +65,16 @@ argument - drivers can process completions for any number of Tx · 64 unmodified lines
6565 packets but should only process up to ``budget`` number of
6666 Rx packets. Rx processing is usually much more expensive.
6767
68−In other words, it is recommended to ignore the budget argument when
69−performing TX buffer reclamation to ensure that the reclamation is not
70−arbitrarily bounded; however, it is required to honor the budget argument
71−for RX processing.
68+In other words for Rx processing the ``budget`` argument limits how many
69+packets driver can process in a single poll. Rx specific APIs like page
70+pool or XDP cannot be used at all when ``budget`` is 0.
71+skb Tx processing should happen regardless of the ``budget``, but if
72+the argument is 0 driver cannot call any XDP (or page pool) APIs.
7273
7374 .. warning::
7475
75− The ``budget`` argument may be 0 if core tries to only process Tx completions
76− and no Rx packets.
76+ The ``budget`` argument may be 0 if core tries to only process
77+ skb Tx completions and no Rx or XDP packets.
7778
7879 The poll method returns the amount of work done. If the driver still
7980 has outstanding work to do (e.g. ``budget`` was exhausted)
Documentation/process/embargoed-hardware-issues.rst+0−3
@@ -254,7 +254,6 @@ an involved disclosed party. The current ambassadors list: · 253 unmodified lines
254254 Samsung Javier González <javier.gonz@samsung.com>
255255
256256 Microsoft James Morris <jamorris@linux.microsoft.com>
257− VMware
258257 Xen Andrew Cooper <andrew.cooper3@citrix.com>
259258
260259 Canonical John Johansen <john.johansen@canonical.com>
@@ -263,10 +262,8 @@ an involved disclosed party. The current ambassadors list: · 2 unmodified lines
263262 Red Hat Josh Poimboeuf <jpoimboe@redhat.com>
264263 SUSE Jiri Kosina <jkosina@suse.cz>
265264
266− Amazon
267265 Google Kees Cook <keescook@chromium.org>
268266
269− GCC
270267 LLVM Nick Desaulniers <ndesaulniers@google.com>
271268 ============= ========================================================
272269
Documentation/process/security-bugs.rst+18−21
@@ -63,31 +63,28 @@ information submitted to the security list and any followup discussions · 62 unmodified lines
6363 of the report are treated confidentially even after the embargo has been
6464 lifted, in perpetuity.
6565
66−Coordination
67−------------
68−
69−Fixes for sensitive bugs, such as those that might lead to privilege
70−escalations, may need to be coordinated with the private
71−<linux-distros@vs.openwall.org> mailing list so that distribution vendors
72−are well prepared to issue a fixed kernel upon public disclosure of the
73−upstream fix. Distros will need some time to test the proposed patch and
74−will generally request at least a few days of embargo, and vendor update
75−publication prefers to happen Tuesday through Thursday. When appropriate,
76−the security team can assist with this coordination, or the reporter can
77−include linux-distros from the start. In this case, remember to prefix
78−the email Subject line with "[vs]" as described in the linux-distros wiki:
79−<http://oss-security.openwall.org/wiki/mailing-lists/distros#how-to-use-the-lists>
66+Coordination with other groups
67+------------------------------
68+
69+The kernel security team strongly recommends that reporters of potential
70+security issues NEVER contact the "linux-distros" mailing list until
71+AFTER discussing it with the kernel security team. Do not Cc: both
72+lists at once. You may contact the linux-distros mailing list after a
73+fix has been agreed on and you fully understand the requirements that
74+doing so will impose on you and the kernel community.
75+
76+The different lists have different goals and the linux-distros rules do
77+not contribute to actually fixing any potential security problems.
8078
8179 CVE assignment
8280 --------------
8381
84−The security team does not normally assign CVEs, nor do we require them
85−for reports or fixes, as this can needlessly complicate the process and
86−may delay the bug handling. If a reporter wishes to have a CVE identifier
87−assigned ahead of public disclosure, they will need to contact the private
88−linux-distros list, described above. When such a CVE identifier is known
89−before a patch is provided, it is desirable to mention it in the commit
90−message if the reporter agrees.
82+The security team does not assign CVEs, nor do we require them for
83+reports or fixes, as this can needlessly complicate the process and may
84+delay the bug handling. If a reporter wishes to have a CVE identifier
85+assigned, they should find one by themselves, for example by contacting
86+MITRE directly. However under no circumstances will a patch inclusion
87+be delayed to wait for a CVE identifier to arrive.
9188
9289 Non-disclosure agreements
9390 -------------------------
MAINTAINERS+42−42
@@ -2339,7 +2339,7 @@ F: drivers/phy/mediatek/ · 2338 unmodified lines
23392339 ARM/MICROCHIP (ARM64) SoC support
23402340 M: Conor Dooley <conor@kernel.org>
23412341 M: Nicolas Ferre <nicolas.ferre@microchip.com>
2342−M: Claudiu Beznea <claudiu.beznea@microchip.com>
2342+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
23432343 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
23442344 S: Supported
23452345 T: git https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
@@ -2348,7 +2348,7 @@ F: arch/arm64/boot/dts/microchip/ · 2 unmodified lines
23482348 ARM/Microchip (AT91) SoC support
23492349 M: Nicolas Ferre <nicolas.ferre@microchip.com>
23502350 M: Alexandre Belloni <alexandre.belloni@bootlin.com>
2351−M: Claudiu Beznea <claudiu.beznea@microchip.com>
2351+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
23522352 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
23532353 S: Supported
23542354 W: http://www.linux4sam.org
@@ -3250,7 +3250,7 @@ F: include/uapi/linux/atm* · 895 unmodified lines
32503250
32513251 ATMEL MACB ETHERNET DRIVER
32523252 M: Nicolas Ferre <nicolas.ferre@microchip.com>
3253−M: Claudiu Beznea <claudiu.beznea@microchip.com>
3253+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
32543254 S: Supported
32553255 F: drivers/net/ethernet/cadence/
32563256
@@ -3262,9 +3262,8 @@ F: Documentation/devicetree/bindings/input/atmel,maxtouch.yaml · 5 unmodified lines
32623262 F: drivers/input/touchscreen/atmel_mxt_ts.c
32633263
32643264 ATMEL WIRELESS DRIVER
3265−M: Simon Kelley <simon@thekelleys.org.uk>
32663265 L: linux-wireless@vger.kernel.org
3267−S: Maintained
3266+S: Orphan
32683267 W: http://www.thekelleys.org.uk/atmel
32693268 W: http://atmelwlandriver.sourceforge.net/
32703269 F: drivers/net/wireless/atmel/atmel*
@@ -3394,7 +3393,7 @@ F: drivers/media/radio/radio-aztech* · 123 unmodified lines
33943393 B43 WIRELESS DRIVER
33953394 L: linux-wireless@vger.kernel.org
33963395 L: b43-dev@lists.infradead.org
3397−S: Odd Fixes
3396+S: Orphan
33983397 W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
33993398 F: drivers/net/wireless/broadcom/b43/
34003399
@@ -4463,7 +4462,6 @@ CADENCE USB3 DRD IP DRIVER · 1062 unmodified lines
44634462 M: Peter Chen <peter.chen@kernel.org>
44644463 M: Pawel Laszczak <pawell@cadence.com>
44654464 R: Roger Quadros <rogerq@kernel.org>
4466−R: Aswath Govindraju <a-govindraju@ti.com>
44674465 L: linux-usb@vger.kernel.org
44684466 S: Maintained
44694467 T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
@@ -5149,10 +5147,12 @@ S: Maintained · 679 unmodified lines
51495147 F: include/linux/compiler_attributes.h
51505148
51515149 COMPUTE EXPRESS LINK (CXL)
5150+M: Davidlohr Bueso <dave@stgolabs.net>
5151+M: Jonathan Cameron <jonathan.cameron@huawei.com>
5152+M: Dave Jiang <dave.jiang@intel.com>
51525153 M: Alison Schofield <alison.schofield@intel.com>
51535154 M: Vishal Verma <vishal.l.verma@intel.com>
51545155 M: Ira Weiny <ira.weiny@intel.com>
5155−M: Ben Widawsky <bwidawsk@kernel.org>
51565156 M: Dan Williams <dan.j.williams@intel.com>
51575157 L: linux-cxl@vger.kernel.org
51585158 S: Maintained
@@ -5461,8 +5461,7 @@ F: Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml · 302 unmodified lines
54615461 F: drivers/net/can/ctucanfd/
54625462
54635463 CW1200 WLAN driver
5464−M: Solomon Peachy <pizza@shaftnet.org>
5465−S: Maintained
5464+S: Orphan
54665465 F: drivers/net/wireless/st/cw1200/
54675466
54685467 CX18 VIDEO4LINUX DRIVER
@@ -9376,7 +9375,6 @@ F: drivers/crypto/hisilicon/sgl.c · 3907 unmodified lines
93769375 F: include/linux/hisi_acc_qm.h
93779376
93789377 HISILICON ROCE DRIVER
9379−M: Haoyue Xu <xuhaoyue1@hisilicon.com>
93809378 M: Junxian Huang <huangjunxian6@hisilicon.com>
93819379 L: linux-rdma@vger.kernel.org
93829380 S: Maintained
@@ -9661,6 +9659,7 @@ F: tools/hv/ · 278 unmodified lines
96619659
96629660 HYPERBUS SUPPORT
96639661 M: Vignesh Raghavendra <vigneshr@ti.com>
9662+R: Tudor Ambarus <tudor.ambarus@linaro.org>
96649663 L: linux-mtd@lists.infradead.org
96659664 S: Supported
96669665 Q: http://patchwork.ozlabs.org/project/linux-mtd/list/
@@ -12480,6 +12479,7 @@ F: net/mctp/ · 2813 unmodified lines
1248012479
1248112480 MAPLE TREE
1248212481 M: Liam R. Howlett <Liam.Howlett@oracle.com>
12482+L: maple-tree@lists.infradead.org
1248312483 L: linux-mm@kvack.org
1248412484 S: Supported
1248512485 F: Documentation/core-api/maple_tree.rst
@@ -12591,18 +12591,14 @@ F: Documentation/devicetree/bindings/net/marvell,pp2.yaml · 105 unmodified lines
1259112591 F: drivers/net/ethernet/marvell/mvpp2/
1259212592
1259312593 MARVELL MWIFIEX WIRELESS DRIVER
12594−M: Amitkumar Karwar <amitkarwar@gmail.com>
12595−M: Ganapathi Bhat <ganapathi017@gmail.com>
12596−M: Sharvari Harisangam <sharvari.harisangam@nxp.com>
12597−M: Xinming Hu <huxinming820@gmail.com>
12594+M: Brian Norris <briannorris@chromium.org>
1259812595 L: linux-wireless@vger.kernel.org
12599−S: Maintained
12596+S: Odd Fixes
1260012597 F: drivers/net/wireless/marvell/mwifiex/
1260112598
1260212599 MARVELL MWL8K WIRELESS DRIVER
12603−M: Lennert Buytenhek <buytenh@wantstofly.org>
1260412600 L: linux-wireless@vger.kernel.org
12605−S: Odd Fixes
12601+S: Orphan
1260612602 F: drivers/net/wireless/marvell/mwl8k.c
1260712603
1260812604 MARVELL NAND CONTROLLER DRIVER
@@ -13790,7 +13786,7 @@ F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml · 1181 unmodified lines
1379013786 F: drivers/spi/spi-at91-usart.c
1379113787
1379213788 MICROCHIP AUDIO ASOC DRIVERS
13793−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13789+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1379413790 L: alsa-devel@alsa-project.org (moderated for non-subscribers)
1379513791 S: Supported
1379613792 F: Documentation/devicetree/bindings/sound/atmel*
@@ -13813,7 +13809,7 @@ S: Maintained · 16 unmodified lines
1381313809 F: drivers/crypto/atmel-ecc.*
1381413810
1381513811 MICROCHIP EIC DRIVER
13816−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13812+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1381713813 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1381813814 S: Supported
1381913815 F: Documentation/devicetree/bindings/interrupt-controller/microchip,sama7g5-eic.yaml
@@ -13886,7 +13882,7 @@ F: drivers/video/fbdev/atmel_lcdfb.c · 66 unmodified lines
1388613882 F: include/video/atmel_lcdc.h
1388713883
1388813884 MICROCHIP MCP16502 PMIC DRIVER
13889−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13885+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1389013886 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1389113887 S: Supported
1389213888 F: Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt
@@ -13913,7 +13909,7 @@ F: Documentation/devicetree/bindings/mtd/atmel-nand.txt · 20 unmodified lines
1391313909 F: drivers/mtd/nand/raw/atmel/*
1391413910
1391513911 MICROCHIP OTPC DRIVER
13916−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13912+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1391713913 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1391813914 S: Supported
1391913915 F: Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml
@@ -13952,7 +13948,7 @@ F: Documentation/devicetree/bindings/fpga/microchip,mpf-spi-fpga-mgr.yaml · 32 unmodified lines
1395213948 F: drivers/fpga/microchip-spi.c
1395313949
1395413950 MICROCHIP PWM DRIVER
13955−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13951+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1395613952 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1395713953 L: linux-pwm@vger.kernel.org
1395813954 S: Supported
@@ -13968,7 +13964,7 @@ F: drivers/iio/adc/at91-sama5d2_adc.c · 9 unmodified lines
1396813964 F: include/dt-bindings/iio/adc/at91-sama5d2_adc.h
1396913965
1397013966 MICROCHIP SAMA5D2-COMPATIBLE SHUTDOWN CONTROLLER
13971−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13967+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1397213968 S: Supported
1397313969 F: Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
1397413970 F: drivers/power/reset/at91-sama5d2_shdwc.c
@@ -13985,7 +13981,7 @@ S: Supported · 10 unmodified lines
1398513981 F: drivers/spi/spi-atmel.*
1398613982
1398713983 MICROCHIP SSC DRIVER
13988−M: Claudiu Beznea <claudiu.beznea@microchip.com>
13984+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1398913985 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1399013986 S: Supported
1399113987 F: Documentation/devicetree/bindings/misc/atmel-ssc.txt
@@ -14014,7 +14010,7 @@ F: drivers/usb/gadget/udc/atmel_usba_udc.* · 22 unmodified lines
1401414010
1401514011 MICROCHIP WILC1000 WIFI DRIVER
1401614012 M: Ajay Singh <ajay.kathat@microchip.com>
14017−M: Claudiu Beznea <claudiu.beznea@microchip.com>
14013+M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1401814014 L: linux-wireless@vger.kernel.org
1401914015 S: Supported
1402014016 F: drivers/net/wireless/microchip/wilc1000/
@@ -16297,6 +16293,7 @@ F: drivers/pci/controller/dwc/pci-exynos.c · 2276 unmodified lines
1629716293 PCI DRIVER FOR SYNOPSYS DESIGNWARE
1629816294 M: Jingoo Han <jingoohan1@gmail.com>
1629916295 M: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
16296+M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1630016297 L: linux-pci@vger.kernel.org
1630116298 S: Maintained
1630216299 F: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
@@ -17448,6 +17445,7 @@ F: drivers/media/tuners/qt1010* · 1145 unmodified lines
1744817445
1744917446 QUALCOMM ATH12K WIRELESS DRIVER
1745017447 M: Kalle Valo <kvalo@kernel.org>
17448+M: Jeff Johnson <quic_jjohnson@quicinc.com>
1745117449 L: ath12k@lists.infradead.org
1745217450 S: Supported
1745317451 T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
@@ -17455,6 +17453,7 @@ F: drivers/net/wireless/ath/ath12k/ · 1 unmodified line
1745517453
1745617454 QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
1745717455 M: Kalle Valo <kvalo@kernel.org>
17456+M: Jeff Johnson <quic_jjohnson@quicinc.com>
1745817457 L: ath10k@lists.infradead.org
1745917458 S: Supported
1746017459 W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
@@ -17464,6 +17463,7 @@ F: drivers/net/wireless/ath/ath10k/ · 3 unmodified lines
1746417463
1746517464 QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
1746617465 M: Kalle Valo <kvalo@kernel.org>
17466+M: Jeff Johnson <quic_jjohnson@quicinc.com>
1746717467 L: ath11k@lists.infradead.org
1746817468 S: Supported
1746917469 W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
@@ -17984,7 +17984,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.g · 514 unmodified lines
1798417984 F: drivers/net/wireless/realtek/rtlwifi/
1798517985
1798617986 REALTEK WIRELESS DRIVER (rtw88)
17987−M: Yan-Hsuan Chuang <tony0620emma@gmail.com>
17987+M: Ping-Ke Shih <pkshih@realtek.com>
1798817988 L: linux-wireless@vger.kernel.org
1798917989 S: Maintained
1799017990 F: drivers/net/wireless/realtek/rtw88/
@@ -18509,17 +18509,14 @@ RTL8180 WIRELESS DRIVER · 518 unmodified lines
1850918509 L: linux-wireless@vger.kernel.org
1851018510 S: Orphan
1851118511 W: https://wireless.wiki.kernel.org/
18512−T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
1851318512 F: drivers/net/wireless/realtek/rtl818x/rtl8180/
1851418513
1851518514 RTL8187 WIRELESS DRIVER
18516−M: Herton Ronaldo Krzesinski <herton@canonical.com>
18517−M: Hin-Tak Leung <htl10@users.sourceforge.net>
18515+M: Hin-Tak Leung <hintak.leung@gmail.com>
1851818516 M: Larry Finger <Larry.Finger@lwfinger.net>
1851918517 L: linux-wireless@vger.kernel.org
1852018518 S: Maintained
1852118519 W: https://wireless.wiki.kernel.org/
18522−T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
1852318520 F: drivers/net/wireless/realtek/rtl818x/rtl8187/
1852418521
1852518522 RTL8XXXU WIRELESS DRIVER (rtl8xxxu)
@@ -20403,7 +20400,6 @@ F: drivers/pwm/pwm-stm32* · 1877 unmodified lines
2040320400 F: include/linux/*/stm32-*tim*
2040420401
2040520402 STMMAC ETHERNET DRIVER
20406−M: Giuseppe Cavallaro <peppe.cavallaro@st.com>
2040720403 M: Alexandre Torgue <alexandre.torgue@foss.st.com>
2040820404 M: Jose Abreu <joabreu@synopsys.com>
2040920405 L: netdev@vger.kernel.org
@@ -21641,11 +21637,17 @@ F: Documentation/translations/zh_TW/ · 1231 unmodified lines
2164121637 TTY LAYER
2164221638 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2164321639 M: Jiri Slaby <jirislaby@kernel.org>
21640+L: linux-kernel@vger.kernel.org
21641+L: linux-serial@vger.kernel.org
2164421642 S: Supported
2164521643 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
2164621644 F: Documentation/driver-api/serial/
2164721645 F: drivers/tty/
21646+F: drivers/tty/serial/serial_base.h
21647+F: drivers/tty/serial/serial_base_bus.c
2164821648 F: drivers/tty/serial/serial_core.c
21649+F: drivers/tty/serial/serial_ctrl.c
21650+F: drivers/tty/serial/serial_port.c
2164921651 F: include/linux/selection.h
2165021652 F: include/linux/serial.h
2165121653 F: include/linux/serial_core.h
@@ -21674,11 +21676,14 @@ S: Orphan · 22 unmodified lines
2167421676 F: drivers/net/ethernet/dec/tulip/
2167521677
2167621678 TUN/TAP driver
21677−M: Maxim Krasnyansky <maxk@qti.qualcomm.com>
21679+M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
21680+M: Jason Wang <jasowang@redhat.com>
2167821681 S: Maintained
2167921682 W: http://vtun.sourceforge.net/tun
2168021683 F: Documentation/networking/tuntap.rst
2168121684 F: arch/um/os-Linux/drivers/
21685+F: drivers/net/tap.c
21686+F: drivers/net/tun.c
2168221687
2168321688 TURBOCHANNEL SUBSYSTEM
2168421689 M: "Maciej W. Rozycki" <macro@orcam.me.uk>
@@ -21901,9 +21906,8 @@ S: Maintained · 216 unmodified lines
2190121906 F: drivers/usb/misc/apple-mfi-fastcharge.c
2190221907
2190321908 USB AR5523 WIRELESS DRIVER
21904−M: Pontus Fuchs <pontus.fuchs@gmail.com>
2190521909 L: linux-wireless@vger.kernel.org
21906−S: Maintained
21910+S: Orphan
2190721911 F: drivers/net/wireless/ath/ar5523/
2190821912
2190921913 USB ATTACHED SCSI
@@ -22180,9 +22184,8 @@ F: drivers/usb/gadget/legacy/webcam.c · 270 unmodified lines
2218022184 F: include/uapi/linux/usb/g_uvc.h
2218122185
2218222186 USB WIRELESS RNDIS DRIVER (rndis_wlan)
22183−M: Jussi Kivilinna <jussi.kivilinna@iki.fi>
2218422187 L: linux-wireless@vger.kernel.org
22185−S: Maintained
22188+S: Orphan
2218622189 F: drivers/net/wireless/legacy/rndis_wlan.c
2218722190
2218822191 USB XHCI DRIVER
@@ -22957,7 +22960,7 @@ F: drivers/input/misc/wistron_btns.c · 768 unmodified lines
2295722960
2295822961 WL3501 WIRELESS PCMCIA CARD DRIVER
2295922962 L: linux-wireless@vger.kernel.org
22960−S: Odd fixes
22963+S: Orphan
2296122964 F: drivers/net/wireless/legacy/wl3501*
2296222965
2296322966 WMI BINARY MOF DRIVER
@@ -23528,11 +23531,8 @@ S: Maintained · 564 unmodified lines
2352823531 F: mm/zbud.c
2352923532
2353023533 ZD1211RW WIRELESS DRIVER
23531−M: Ulrich Kunitz <kune@deine-taler.de>
2353223534 L: linux-wireless@vger.kernel.org
23533−L: zd1211-devs@lists.sourceforge.net (subscribers-only)
23534−S: Maintained
23535−W: http://zd1211.ath.cx/wiki/DriverRewrite
23535+S: Orphan
2353623536 F: drivers/net/wireless/zydas/zd1211rw/
2353723537
2353823538 ZD1301 MEDIA DRIVER
Makefile+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 6
33 PATCHLEVEL = 5
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc3
5+EXTRAVERSION = -rc6
66 NAME = Hurr durr I'ma ninja sloth
77
88 # *DOCUMENTATION*
arch/alpha/include/asm/processor.h+0−13
@@ -47,12 +47,6 @@ unsigned long __get_wchan(struct task_struct *p); · 46 unmodified lines
4747
4848 #define ARCH_HAS_PREFETCH
4949 #define ARCH_HAS_PREFETCHW
50−#define ARCH_HAS_SPINLOCK_PREFETCH
51−
52−#ifndef CONFIG_SMP
53−/* Nothing to prefetch. */
54−#define spin_lock_prefetch(lock) do { } while (0)
55−#endif
5650
5751 extern inline void prefetch(const void *ptr)
5852 {
@@ -64,11 +58,4 @@ extern inline void prefetchw(const void *ptr) · 5 unmodified lines
6458 __builtin_prefetch(ptr, 1, 3);
6559 }
6660
67−#ifdef CONFIG_SMP
68−extern inline void spin_lock_prefetch(const void *ptr)
69−{
70− __builtin_prefetch(ptr, 1, 3);
71−}
72−#endif
73−
7461 #endif /* __ASM_ALPHA_PROCESSOR_H */
arch/alpha/kernel/setup.c+1−2
@@ -385,8 +385,7 @@ setup_memory(void *kernel_end) · 384 unmodified lines
385385 #endif /* CONFIG_BLK_DEV_INITRD */
386386 }
387387
388−int __init
389−page_is_ram(unsigned long pfn)
388+int page_is_ram(unsigned long pfn)
390389 {
391390 struct memclust_struct * cluster;
392391 struct memdesc_struct * memdesc;
arch/arm/boot/dts/microchip/sam9x60.dtsi+13−13
@@ -172,7 +172,7 @@ · 171 unmodified lines
172172 status = "disabled";
173173
174174 uart4: serial@200 {
175− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
175+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
176176 reg = <0x200 0x200>;
177177 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
178178 dmas = <&dma0
@@ -240,7 +240,7 @@ · 61 unmodified lines
240240 status = "disabled";
241241
242242 uart5: serial@200 {
243− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
243+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
244244 reg = <0x200 0x200>;
245245 atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
246246 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
@@ -370,7 +370,7 @@ · 123 unmodified lines
370370 status = "disabled";
371371
372372 uart11: serial@200 {
373− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
373+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
374374 reg = <0x200 0x200>;
375375 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
376376 dmas = <&dma0
@@ -419,7 +419,7 @@ · 42 unmodified lines
419419 status = "disabled";
420420
421421 uart12: serial@200 {
422− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
422+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
423423 reg = <0x200 0x200>;
424424 interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
425425 dmas = <&dma0
@@ -576,7 +576,7 @@ · 150 unmodified lines
576576 status = "disabled";
577577
578578 uart6: serial@200 {
579− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
579+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
580580 reg = <0x200 0x200>;
581581 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
582582 dmas = <&dma0
@@ -625,7 +625,7 @@ · 42 unmodified lines
625625 status = "disabled";
626626
627627 uart7: serial@200 {
628− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
628+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
629629 reg = <0x200 0x200>;
630630 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
631631 dmas = <&dma0
@@ -674,7 +674,7 @@ · 42 unmodified lines
674674 status = "disabled";
675675
676676 uart8: serial@200 {
677− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
677+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
678678 reg = <0x200 0x200>;
679679 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
680680 dmas = <&dma0
@@ -723,7 +723,7 @@ · 42 unmodified lines
723723 status = "disabled";
724724
725725 uart0: serial@200 {
726− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
726+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
727727 reg = <0x200 0x200>;
728728 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
729729 dmas = <&dma0
@@ -791,7 +791,7 @@ · 61 unmodified lines
791791 status = "disabled";
792792
793793 uart1: serial@200 {
794− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
794+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
795795 reg = <0x200 0x200>;
796796 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
797797 dmas = <&dma0
@@ -859,7 +859,7 @@ · 61 unmodified lines
859859 status = "disabled";
860860
861861 uart2: serial@200 {
862− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
862+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
863863 reg = <0x200 0x200>;
864864 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
865865 dmas = <&dma0
@@ -927,7 +927,7 @@ · 61 unmodified lines
927927 status = "disabled";
928928
929929 uart3: serial@200 {
930− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
930+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
931931 reg = <0x200 0x200>;
932932 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
933933 dmas = <&dma0
@@ -1050,7 +1050,7 @@ · 116 unmodified lines
10501050 status = "disabled";
10511051
10521052 uart9: serial@200 {
1053− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
1053+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
10541054 reg = <0x200 0x200>;
10551055 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
10561056 dmas = <&dma0
@@ -1099,7 +1099,7 @@ · 42 unmodified lines
10991099 status = "disabled";
11001100
11011101 uart10: serial@200 {
1102− compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
1102+ compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
11031103 reg = <0x200 0x200>;
11041104 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
11051105 dmas = <&dma0
arch/arm/boot/dts/nspire/nspire.dtsi+1−1
@@ -161,7 +161,7 @@ · 160 unmodified lines
161161 };
162162
163163 watchdog: watchdog@90060000 {
164− compatible = "arm,amba-primecell";
164+ compatible = "arm,primecell";
165165 reg = <0x90060000 0x1000>;
166166 interrupts = <3>;
167167 };
arch/arm/boot/dts/nxp/imx/imx53-sk-imx53.dts+10−0
@@ -60,6 +60,16 @@ · 59 unmodified lines
6060 status = "okay";
6161 };
6262
63+&cpu0 {
64+ /* CPU rated to 800 MHz, not the default 1.2GHz. */
65+ operating-points = <
66+ /* kHz uV */
67+ 166666 850000
68+ 400000 900000
69+ 800000 1050000
70+ >;
71+};
72+
6373 &ecspi1 {
6474 pinctrl-names = "default";
6575 pinctrl-0 = <&pinctrl_ecspi1>;
arch/arm/boot/dts/nxp/imx/imx6sll.dtsi+1−1
@@ -552,7 +552,7 @@ · 551 unmodified lines
552552 reg = <0x020ca000 0x1000>;
553553 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
554554 clocks = <&clks IMX6SLL_CLK_USBPHY2>;
555− phy-reg_3p0-supply = <&reg_3p0>;
555+ phy-3p0-supply = <&reg_3p0>;
556556 fsl,anatop = <&anatop>;
557557 };
558558
arch/arm/configs/axm55xx_defconfig+1−1
@@ -197,7 +197,7 @@ CONFIG_EXT2_FS=y · 196 unmodified lines
197197 CONFIG_EXT3_FS=y
198198 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
199199 CONFIG_EXT4_FS=y
200−CONFIG_AUTOFS4_FS=y
200+CONFIG_AUTOFS_FS=y
201201 CONFIG_FUSE_FS=y
202202 CONFIG_CUSE=y
203203 CONFIG_FSCACHE=y
arch/arm/configs/davinci_all_defconfig+1−1
@@ -232,7 +232,7 @@ CONFIG_EXT2_FS=y · 231 unmodified lines
232232 CONFIG_EXT3_FS=y
233233 CONFIG_EXT4_FS_POSIX_ACL=y
234234 CONFIG_XFS_FS=m
235−CONFIG_AUTOFS4_FS=m
235+CONFIG_AUTOFS_FS=m
236236 CONFIG_MSDOS_FS=y
237237 CONFIG_VFAT_FS=y
238238 CONFIG_TMPFS=y
arch/arm/configs/exynos_defconfig+1−1
@@ -327,7 +327,7 @@ CONFIG_PWM_SAMSUNG=y · 326 unmodified lines
327327 CONFIG_PHY_EXYNOS5250_SATA=y
328328 CONFIG_EXT2_FS=y
329329 CONFIG_EXT4_FS=y
330−CONFIG_AUTOFS4_FS=y
330+CONFIG_AUTOFS_FS=y
331331 CONFIG_MSDOS_FS=y
332332 CONFIG_VFAT_FS=y
333333 CONFIG_TMPFS=y
arch/arm/configs/footbridge_defconfig+1−1
@@ -94,7 +94,7 @@ CONFIG_LEDS_CLASS=y · 93 unmodified lines
9494 CONFIG_LEDS_TRIGGERS=y
9595 CONFIG_LEDS_TRIGGER_TIMER=y
9696 CONFIG_EXT2_FS=y
97−CONFIG_AUTOFS4_FS=y
97+CONFIG_AUTOFS_FS=y
9898 CONFIG_ISO9660_FS=m
9999 CONFIG_JOLIET=y
100100 CONFIG_MSDOS_FS=m
arch/arm/configs/imx_v6_v7_defconfig+1−1
@@ -442,7 +442,7 @@ CONFIG_EXT3_FS_SECURITY=y · 441 unmodified lines
442442 CONFIG_QUOTA=y
443443 CONFIG_QUOTA_NETLINK_INTERFACE=y
444444 # CONFIG_PRINT_QUOTA_WARNING is not set
445−CONFIG_AUTOFS4_FS=y
445+CONFIG_AUTOFS_FS=y
446446 CONFIG_FUSE_FS=y
447447 CONFIG_ISO9660_FS=m
448448 CONFIG_JOLIET=y
arch/arm/configs/keystone_defconfig+1−1
@@ -207,7 +207,7 @@ CONFIG_RESET_TI_SYSCON=m · 206 unmodified lines
207207 CONFIG_EXT4_FS=y
208208 CONFIG_EXT4_FS_POSIX_ACL=y
209209 CONFIG_FANOTIFY=y
210−CONFIG_AUTOFS4_FS=y
210+CONFIG_AUTOFS_FS=y
211211 CONFIG_MSDOS_FS=y
212212 CONFIG_VFAT_FS=y
213213 CONFIG_NTFS_FS=y
arch/arm/configs/lpc32xx_defconfig+1−1
@@ -162,7 +162,7 @@ CONFIG_MAX517=y · 161 unmodified lines
162162 CONFIG_PWM=y
163163 CONFIG_PWM_LPC32XX=y
164164 CONFIG_EXT2_FS=y
165−CONFIG_AUTOFS4_FS=y
165+CONFIG_AUTOFS_FS=y
166166 CONFIG_MSDOS_FS=y
167167 CONFIG_VFAT_FS=y
168168 CONFIG_TMPFS=y
arch/arm/configs/milbeaut_m10v_defconfig+1−1
@@ -81,7 +81,7 @@ CONFIG_SOC_BRCMSTB=y · 80 unmodified lines
8181 CONFIG_MEMORY=y
8282 # CONFIG_ARM_PMU is not set
8383 CONFIG_EXT4_FS=y
84−CONFIG_AUTOFS4_FS=y
84+CONFIG_AUTOFS_FS=y
8585 CONFIG_MSDOS_FS=y
8686 CONFIG_VFAT_FS=y
8787 CONFIG_NTFS_FS=y
arch/arm/configs/multi_v7_defconfig+1−1
@@ -1226,7 +1226,7 @@ CONFIG_COUNTER=m · 1225 unmodified lines
12261226 CONFIG_STM32_TIMER_CNT=m
12271227 CONFIG_STM32_LPTIMER_CNT=m
12281228 CONFIG_EXT4_FS=y
1229−CONFIG_AUTOFS4_FS=y
1229+CONFIG_AUTOFS_FS=y
12301230 CONFIG_MSDOS_FS=y
12311231 CONFIG_VFAT_FS=y
12321232 CONFIG_NTFS_FS=y
arch/arm/configs/omap1_defconfig+1−1
@@ -188,7 +188,7 @@ CONFIG_RTC_DRV_OMAP=y · 187 unmodified lines
188188 CONFIG_EXT2_FS=y
189189 CONFIG_EXT3_FS=y
190190 # CONFIG_DNOTIFY is not set
191−CONFIG_AUTOFS4_FS=y
191+CONFIG_AUTOFS_FS=y
192192 CONFIG_ISO9660_FS=y
193193 CONFIG_JOLIET=y
194194 CONFIG_MSDOS_FS=y
arch/arm/configs/omap2plus_defconfig+1−1
@@ -678,7 +678,7 @@ CONFIG_EXT4_FS_SECURITY=y · 677 unmodified lines
678678 CONFIG_FANOTIFY=y
679679 CONFIG_QUOTA=y
680680 CONFIG_QFMT_V2=y
681−CONFIG_AUTOFS4_FS=m
681+CONFIG_AUTOFS_FS=m
682682 CONFIG_MSDOS_FS=y
683683 CONFIG_VFAT_FS=y
684684 CONFIG_TMPFS=y
arch/arm/configs/pxa_defconfig+1−1
@@ -589,7 +589,7 @@ CONFIG_REISERFS_FS_XATTR=y · 588 unmodified lines
589589 CONFIG_REISERFS_FS_POSIX_ACL=y
590590 CONFIG_REISERFS_FS_SECURITY=y
591591 CONFIG_XFS_FS=m
592−CONFIG_AUTOFS4_FS=m
592+CONFIG_AUTOFS_FS=m
593593 CONFIG_FUSE_FS=m
594594 CONFIG_CUSE=m
595595 CONFIG_FSCACHE=y
arch/arm/configs/rpc_defconfig+1−1
@@ -79,7 +79,7 @@ CONFIG_RTC_CLASS=y · 78 unmodified lines
7979 CONFIG_RTC_DRV_PCF8583=y
8080 CONFIG_EXT2_FS=y
8181 CONFIG_EXT3_FS=y
82−CONFIG_AUTOFS4_FS=m
82+CONFIG_AUTOFS_FS=m
8383 CONFIG_ISO9660_FS=y
8484 CONFIG_JOLIET=y
8585 CONFIG_MSDOS_FS=m
arch/arm/configs/s5pv210_defconfig+1−1
@@ -103,7 +103,7 @@ CONFIG_PHY_SAMSUNG_USB2=m · 102 unmodified lines
103103 CONFIG_PHY_S5PV210_USB2=y
104104 CONFIG_EXT2_FS=y
105105 CONFIG_EXT4_FS=y
106−CONFIG_AUTOFS4_FS=y
106+CONFIG_AUTOFS_FS=y
107107 CONFIG_MSDOS_FS=y
108108 CONFIG_VFAT_FS=y
109109 CONFIG_TMPFS=y
arch/arm/configs/socfpga_defconfig+1−1
@@ -136,7 +136,7 @@ CONFIG_EXT2_FS=y · 135 unmodified lines
136136 CONFIG_EXT2_FS_XATTR=y
137137 CONFIG_EXT2_FS_POSIX_ACL=y
138138 CONFIG_EXT3_FS=y
139−CONFIG_AUTOFS4_FS=y
139+CONFIG_AUTOFS_FS=y
140140 CONFIG_VFAT_FS=y
141141 CONFIG_NTFS_FS=y
142142 CONFIG_NTFS_RW=y
arch/arm/configs/spear13xx_defconfig+1−1
@@ -85,7 +85,7 @@ CONFIG_EXT2_FS_XATTR=y · 84 unmodified lines
8585 CONFIG_EXT2_FS_SECURITY=y
8686 CONFIG_EXT3_FS=y
8787 CONFIG_EXT3_FS_SECURITY=y
88−CONFIG_AUTOFS4_FS=m
88+CONFIG_AUTOFS_FS=m
8989 CONFIG_FUSE_FS=y
9090 CONFIG_MSDOS_FS=m
9191 CONFIG_VFAT_FS=m
arch/arm/configs/spear3xx_defconfig+1−1
@@ -68,7 +68,7 @@ CONFIG_EXT2_FS_XATTR=y · 67 unmodified lines
6868 CONFIG_EXT2_FS_SECURITY=y
6969 CONFIG_EXT3_FS=y
7070 CONFIG_EXT3_FS_SECURITY=y
71−CONFIG_AUTOFS4_FS=m
71+CONFIG_AUTOFS_FS=m
7272 CONFIG_MSDOS_FS=m
7373 CONFIG_VFAT_FS=m
7474 CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
arch/arm/configs/spear6xx_defconfig+1−1
@@ -54,7 +54,7 @@ CONFIG_EXT2_FS_XATTR=y · 53 unmodified lines
5454 CONFIG_EXT2_FS_SECURITY=y
5555 CONFIG_EXT3_FS=y
5656 CONFIG_EXT3_FS_SECURITY=y
57−CONFIG_AUTOFS4_FS=m
57+CONFIG_AUTOFS_FS=m
5858 CONFIG_MSDOS_FS=m
5959 CONFIG_VFAT_FS=m
6060 CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
arch/arm/mach-pxa/sharpsl_pm.h+0−1
@@ -105,5 +105,4 @@ void sharpsl_pm_led(int val); · 104 unmodified lines
105105 #define MAX1111_ACIN_VOLT 6u
106106 int sharpsl_pm_pxa_read_max1111(int channel);
107107
108−void corgi_lcd_limit_intensity(int limit);
109108 #endif
arch/arm/mach-pxa/spitz_pm.c+1−0
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <linux/interrupt.h>
1616 #include <linux/platform_device.h>
1717 #include <linux/apm-emulation.h>
18+#include <linux/spi/corgi_lcd.h>
1819
1920 #include <asm/irq.h>
2021 #include <asm/mach-types.h>
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts+1−1
@@ -145,7 +145,7 @@ · 144 unmodified lines
145145 status = "okay";
146146 clock-frequency = <100000>;
147147 i2c-sda-falling-time-ns = <890>; /* hcnt */
148− i2c-sdl-falling-time-ns = <890>; /* lcnt */
148+ i2c-scl-falling-time-ns = <890>; /* lcnt */
149149
150150 pinctrl-names = "default", "gpio";
151151 pinctrl-0 = <&i2c1_pmx_func>;
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts+1−1
@@ -141,7 +141,7 @@ · 140 unmodified lines
141141 status = "okay";
142142 clock-frequency = <100000>;
143143 i2c-sda-falling-time-ns = <890>; /* hcnt */
144− i2c-sdl-falling-time-ns = <890>; /* lcnt */
144+ i2c-scl-falling-time-ns = <890>; /* lcnt */
145145
146146 adc@14 {
147147 compatible = "lltc,ltc2497";
arch/arm64/boot/dts/arm/vexpress-v2m-rs1.dtsi+0−1
@@ -1 +0,0 @@
1−../../../../arm/boot/dts/vexpress-v2m-rs1.dtsi
arch/arm64/boot/dts/freescale/imx8mm-phyboard-polis-rdk.dts+1−1
@@ -141,7 +141,7 @@ · 140 unmodified lines
141141 };
142142
143143 &gpio1 {
144− gpio-line-names = "nINT_ETHPHY", "LED_RED", "WDOG_INT", "X_RTC_INT",
144+ gpio-line-names = "", "LED_RED", "WDOG_INT", "X_RTC_INT",
145145 "", "", "", "RESET_ETHPHY",
146146 "CAN_nINT", "CAN_EN", "nENABLE_FLATLINK", "",
147147 "USB_OTG_VBUS_EN", "", "LED_GREEN", "LED_BLUE";
arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi+2−2
@@ -111,7 +111,7 @@ · 110 unmodified lines
111111 };
112112
113113 &gpio1 {
114− gpio-line-names = "nINT_ETHPHY", "", "WDOG_INT", "X_RTC_INT",
114+ gpio-line-names = "", "", "WDOG_INT", "X_RTC_INT",
115115 "", "", "", "RESET_ETHPHY",
116116 "", "", "nENABLE_FLATLINK";
117117 };
@@ -210,7 +210,7 @@ · 92 unmodified lines
210210 };
211211 };
212212
213− reg_vdd_gpu: buck3 {
213+ reg_vdd_vpu: buck3 {
214214 regulator-always-on;
215215 regulator-boot-on;
216216 regulator-max-microvolt = <1000000>;
arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dts+4−0
@@ -567,6 +567,10 @@ · 566 unmodified lines
567567 status = "okay";
568568 };
569569
570+&disp_blk_ctrl {
571+ status = "disabled";
572+};
573+
570574 &pgc_mipi {
571575 status = "disabled";
572576 };
arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts+4−0
@@ -628,6 +628,10 @@ · 627 unmodified lines
628628 status = "okay";
629629 };
630630
631+&disp_blk_ctrl {
632+ status = "disabled";
633+};
634+
631635 &pgc_mipi {
632636 status = "disabled";
633637 };
arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi+1−1
@@ -358,7 +358,7 @@ · 357 unmodified lines
358358 MX8MN_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91
359359 MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91
360360 MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f
361− MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x19
361+ MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x159
362362 >;
363363 };
364364
arch/arm64/boot/dts/freescale/imx8mq.dtsi+1−1
@@ -772,7 +772,7 @@ · 771 unmodified lines
772772 <&clk IMX8MQ_SYS1_PLL_800M>,
773773 <&clk IMX8MQ_VPU_PLL>;
774774 assigned-clock-rates = <600000000>,
775− <600000000>,
775+ <300000000>,
776776 <800000000>,
777777 <0>;
778778 };
arch/arm64/boot/dts/renesas/r9a07g044.dtsi+8−8
@@ -223,20 +223,20 @@ · 222 unmodified lines
223223 <GIC_SPI 212 IRQ_TYPE_EDGE_RISING>,
224224 <GIC_SPI 213 IRQ_TYPE_EDGE_RISING>;
225225 interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0",
226− "tgiv0", "tgie0", "tgif0",
227− "tgia1", "tgib1", "tgiv1", "tgiu1",
228− "tgia2", "tgib2", "tgiv2", "tgiu2",
226+ "tciv0", "tgie0", "tgif0",
227+ "tgia1", "tgib1", "tciv1", "tciu1",
228+ "tgia2", "tgib2", "tciv2", "tciu2",
229229 "tgia3", "tgib3", "tgic3", "tgid3",
230− "tgiv3",
230+ "tciv3",
231231 "tgia4", "tgib4", "tgic4", "tgid4",
232− "tgiv4",
232+ "tciv4",
233233 "tgiu5", "tgiv5", "tgiw5",
234234 "tgia6", "tgib6", "tgic6", "tgid6",
235− "tgiv6",
235+ "tciv6",
236236 "tgia7", "tgib7", "tgic7", "tgid7",
237− "tgiv7",
237+ "tciv7",
238238 "tgia8", "tgib8", "tgic8", "tgid8",
239− "tgiv8", "tgiu8";
239+ "tciv8", "tciu8";
240240 clocks = <&cpg CPG_MOD R9A07G044_MTU_X_MCK_MTU3>;
241241 power-domains = <&cpg>;
242242 resets = <&cpg R9A07G044_MTU_X_PRESET_MTU3>;
arch/arm64/boot/dts/renesas/r9a07g054.dtsi+8−8
@@ -223,20 +223,20 @@ · 222 unmodified lines
223223 <GIC_SPI 212 IRQ_TYPE_EDGE_RISING>,
224224 <GIC_SPI 213 IRQ_TYPE_EDGE_RISING>;
225225 interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0",
226− "tgiv0", "tgie0", "tgif0",
227− "tgia1", "tgib1", "tgiv1", "tgiu1",
228− "tgia2", "tgib2", "tgiv2", "tgiu2",
226+ "tciv0", "tgie0", "tgif0",
227+ "tgia1", "tgib1", "tciv1", "tciu1",
228+ "tgia2", "tgib2", "tciv2", "tciu2",
229229 "tgia3", "tgib3", "tgic3", "tgid3",
230− "tgiv3",
230+ "tciv3",
231231 "tgia4", "tgib4", "tgic4", "tgid4",
232− "tgiv4",
232+ "tciv4",
233233 "tgiu5", "tgiv5", "tgiw5",
234234 "tgia6", "tgib6", "tgic6", "tgid6",
235− "tgiv6",
235+ "tciv6",
236236 "tgia7", "tgib7", "tgic7", "tgid7",
237− "tgiv7",
237+ "tciv7",
238238 "tgia8", "tgib8", "tgic8", "tgid8",
239− "tgiv8", "tgiu8";
239+ "tciv8", "tciu8";
240240 clocks = <&cpg CPG_MOD R9A07G054_MTU_X_MCK_MTU3>;
241241 power-domains = <&cpg>;
242242 resets = <&cpg R9A07G054_MTU_X_PRESET_MTU3>;
arch/arm64/configs/defconfig+1−1
@@ -1469,7 +1469,7 @@ CONFIG_BTRFS_FS_POSIX_ACL=y · 1468 unmodified lines
14691469 CONFIG_FANOTIFY=y
14701470 CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
14711471 CONFIG_QUOTA=y
1472−CONFIG_AUTOFS4_FS=y
1472+CONFIG_AUTOFS_FS=y
14731473 CONFIG_FUSE_FS=m
14741474 CONFIG_CUSE=m
14751475 CONFIG_OVERLAY_FS=m
arch/arm64/include/asm/el2_setup.h+29−15
@@ -31,6 +31,13 @@ · 30 unmodified lines
3131 .Lskip_hcrx_\@:
3232 .endm
3333
34+/* Check if running in host at EL2 mode, i.e., (h)VHE. Jump to fail if not. */
35+.macro __check_hvhe fail, tmp
36+ mrs \tmp, hcr_el2
37+ and \tmp, \tmp, #HCR_E2H
38+ cbz \tmp, \fail
39+.endm
40+
3441 /*
3542 * Allow Non-secure EL1 and EL0 to access physical timer and counter.
3643 * This is not necessary for VHE, since the host kernel runs in EL2,
@@ -43,9 +50,7 @@ · 6 unmodified lines
4350 */
4451 .macro __init_el2_timers
4552 mov x0, #3 // Enable EL1 physical timers
46− mrs x1, hcr_el2
47− and x1, x1, #HCR_E2H
48− cbz x1, .LnVHE_\@
53+ __check_hvhe .LnVHE_\@, x1
4954 lsl x0, x0, #10
5055 .LnVHE_\@:
5156 msr cnthctl_el2, x0
@@ -139,15 +144,14 @@ · 87 unmodified lines
139144
140145 /* Coprocessor traps */
141146 .macro __init_el2_cptr
142− mrs x1, hcr_el2
143− and x1, x1, #HCR_E2H
144− cbz x1, .LnVHE_\@
147+ __check_hvhe .LnVHE_\@, x1
145148 mov x0, #(CPACR_EL1_FPEN_EL1EN | CPACR_EL1_FPEN_EL0EN)
146− b .Lset_cptr_\@
149+ msr cpacr_el1, x0
150+ b .Lskip_set_cptr_\@
147151 .LnVHE_\@:
148152 mov x0, #0x33ff
149−.Lset_cptr_\@:
150153 msr cptr_el2, x0 // Disable copro. traps to EL2
154+.Lskip_set_cptr_\@:
151155 .endm
152156
153157 /* Disable any fine grained traps */
@@ -268,19 +272,19 @@ · 114 unmodified lines
268272 check_override id_aa64pfr0, ID_AA64PFR0_EL1_SVE_SHIFT, .Linit_sve_\@, .Lskip_sve_\@, x1, x2
269273
270274 .Linit_sve_\@: /* SVE register access */
271− mrs x0, cptr_el2 // Disable SVE traps
272− mrs x1, hcr_el2
273− and x1, x1, #HCR_E2H
274− cbz x1, .Lcptr_nvhe_\@
275+ __check_hvhe .Lcptr_nvhe_\@, x1
275276
276− // VHE case
277+ // (h)VHE case
278+ mrs x0, cpacr_el1 // Disable SVE traps
277279 orr x0, x0, #(CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN)
278− b .Lset_cptr_\@
280+ msr cpacr_el1, x0
281+ b .Lskip_set_cptr_\@
279282
280283 .Lcptr_nvhe_\@: // nVHE case
284+ mrs x0, cptr_el2 // Disable SVE traps
281285 bic x0, x0, #CPTR_EL2_TZ
282−.Lset_cptr_\@:
283286 msr cptr_el2, x0
287+.Lskip_set_cptr_\@:
284288 isb
285289 mov x1, #ZCR_ELx_LEN_MASK // SVE: Enable full vector
286290 msr_s SYS_ZCR_EL2, x1 // length for EL1.
@@ -289,9 +293,19 @@ · 2 unmodified lines
289293 check_override id_aa64pfr1, ID_AA64PFR1_EL1_SME_SHIFT, .Linit_sme_\@, .Lskip_sme_\@, x1, x2
290294
291295 .Linit_sme_\@: /* SME register access and priority mapping */
296+ __check_hvhe .Lcptr_nvhe_sme_\@, x1
297+
298+ // (h)VHE case
299+ mrs x0, cpacr_el1 // Disable SME traps
300+ orr x0, x0, #(CPACR_EL1_SMEN_EL0EN | CPACR_EL1_SMEN_EL1EN)
301+ msr cpacr_el1, x0
302+ b .Lskip_set_cptr_sme_\@
303+
304+.Lcptr_nvhe_sme_\@: // nVHE case
292305 mrs x0, cptr_el2 // Disable SME traps
293306 bic x0, x0, #CPTR_EL2_TSM
294307 msr cptr_el2, x0
308+.Lskip_set_cptr_sme_\@:
295309 isb
296310
297311 mrs x1, sctlr_el2
arch/arm64/include/asm/kvm_asm.h+1−1
@@ -278,7 +278,7 @@ asmlinkage void __noreturn hyp_panic_bad_stack(void); · 277 unmodified lines
278278 asmlinkage void kvm_unexpected_el2_exception(void);
279279 struct kvm_cpu_context;
280280 void handle_trap(struct kvm_cpu_context *host_ctxt);
281−asmlinkage void __noreturn kvm_host_psci_cpu_entry(bool is_cpu_on);
281+asmlinkage void __noreturn __kvm_host_psci_cpu_entry(bool is_cpu_on);
282282 void __noreturn __pkvm_init_finalise(void);
283283 void kvm_nvhe_prepare_backtrace(unsigned long fp, unsigned long pc);
284284 void kvm_patch_vector_branch(struct alt_instr *alt,
arch/arm64/include/asm/kvm_emulate.h+17−4
@@ -571,6 +571,14 @@ static inline bool vcpu_has_feature(struct kvm_vcpu *vcpu, int feature) · 570 unmodified lines
571571 return test_bit(feature, vcpu->arch.features);
572572 }
573573
574+static __always_inline void kvm_write_cptr_el2(u64 val)
575+{
576+ if (has_vhe() || has_hvhe())
577+ write_sysreg(val, cpacr_el1);
578+ else
579+ write_sysreg(val, cptr_el2);
580+}
581+
574582 static __always_inline u64 kvm_get_reset_cptr_el2(struct kvm_vcpu *vcpu)
575583 {
576584 u64 val;
@@ -578,8 +586,16 @@ static __always_inline u64 kvm_get_reset_cptr_el2(struct kvm_vcpu *vcpu) · 1 unmodified line
578586 if (has_vhe()) {
579587 val = (CPACR_EL1_FPEN_EL0EN | CPACR_EL1_FPEN_EL1EN |
580588 CPACR_EL1_ZEN_EL1EN);
589+ if (cpus_have_final_cap(ARM64_SME))
590+ val |= CPACR_EL1_SMEN_EL1EN;
581591 } else if (has_hvhe()) {
582592 val = (CPACR_EL1_FPEN_EL0EN | CPACR_EL1_FPEN_EL1EN);
593+
594+ if (!vcpu_has_sve(vcpu) ||
595+ (vcpu->arch.fp_state != FP_STATE_GUEST_OWNED))
596+ val |= CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN;
597+ if (cpus_have_final_cap(ARM64_SME))
598+ val |= CPACR_EL1_SMEN_EL1EN | CPACR_EL1_SMEN_EL0EN;
583599 } else {
584600 val = CPTR_NVHE_EL2_RES1;
585601
@@ -597,9 +613,6 @@ static __always_inline void kvm_reset_cptr_el2(struct kvm_vcpu *vcpu) · 11 unmodified lines
597613 {
598614 u64 val = kvm_get_reset_cptr_el2(vcpu);
599615
600− if (has_vhe() || has_hvhe())
601− write_sysreg(val, cpacr_el1);
602− else
603− write_sysreg(val, cptr_el2);
616+ kvm_write_cptr_el2(val);
604617 }
605618 #endif /* __ARM64_KVM_EMULATE_H__ */
arch/arm64/include/asm/processor.h+0−8
@@ -359,14 +359,6 @@ static inline void prefetchw(const void *ptr) · 358 unmodified lines
359359 asm volatile("prfm pstl1keep, %a0\n" : : "p" (ptr));
360360 }
361361
362−#define ARCH_HAS_SPINLOCK_PREFETCH
363−static inline void spin_lock_prefetch(const void *ptr)
364−{
365− asm volatile(ARM64_LSE_ATOMIC_INSN(
366− "prfm pstl1strm, %a0",
367− "nop") : : "p" (ptr));
368−}
369−
370362 extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */
371363 extern void __init minsigstksz_setup(void);
372364
arch/arm64/kernel/fpsimd.c+7−7
@@ -679,7 +679,7 @@ static void fpsimd_to_sve(struct task_struct *task) · 678 unmodified lines
679679 void *sst = task->thread.sve_state;
680680 struct user_fpsimd_state const *fst = &task->thread.uw.fpsimd_state;
681681
682− if (!system_supports_sve())
682+ if (!system_supports_sve() && !system_supports_sme())
683683 return;
684684
685685 vq = sve_vq_from_vl(thread_get_cur_vl(&task->thread));
@@ -705,7 +705,7 @@ static void sve_to_fpsimd(struct task_struct *task) · 19 unmodified lines
705705 unsigned int i;
706706 __uint128_t const *p;
707707
708− if (!system_supports_sve())
708+ if (!system_supports_sve() && !system_supports_sme())
709709 return;
710710
711711 vl = thread_get_cur_vl(&task->thread);
@@ -835,7 +835,8 @@ void sve_sync_from_fpsimd_zeropad(struct task_struct *task) · 123 unmodified lines
835835 void *sst = task->thread.sve_state;
836836 struct user_fpsimd_state const *fst = &task->thread.uw.fpsimd_state;
837837
838− if (!test_tsk_thread_flag(task, TIF_SVE))
838+ if (!test_tsk_thread_flag(task, TIF_SVE) &&
839+ !thread_sm_enabled(&task->thread))
839840 return;
840841
841842 vq = sve_vq_from_vl(thread_get_cur_vl(&task->thread));
@@ -909,7 +910,7 @@ int vec_set_vector_length(struct task_struct *task, enum vec_type type, · 67 unmodified lines
909910 */
910911 task->thread.svcr &= ~(SVCR_SM_MASK |
911912 SVCR_ZA_MASK);
912− clear_thread_flag(TIF_SME);
913+ clear_tsk_thread_flag(task, TIF_SME);
913914 free_sme = true;
914915 }
915916 }
@@ -917,6 +918,8 @@ int vec_set_vector_length(struct task_struct *task, enum vec_type type, · 1 unmodified line
917918 if (task == current)
918919 put_cpu_fpsimd_context();
919920
921+ task_set_vl(task, type, vl);
922+
920923 /*
921924 * Free the changed states if they are not in use, SME will be
922925 * reallocated to the correct size on next use and we just
@@ -931,8 +934,6 @@ int vec_set_vector_length(struct task_struct *task, enum vec_type type, · 8 unmodified lines
931934 if (free_sme)
932935 sme_free(task);
933936
934− task_set_vl(task, type, vl);
935−
936937 out:
937938 update_tsk_thread_flag(task, vec_vl_inherit_flag(type),
938939 flags & PR_SVE_VL_INHERIT);
@@ -1666,7 +1667,6 @@ void fpsimd_flush_thread(void) · 727 unmodified lines
16661667
16671668 fpsimd_flush_thread_vl(ARM64_VEC_SME);
16681669 current->thread.svcr = 0;
1669− sme_smstop();
16701670 }
16711671
16721672 current->thread.fp_type = FP_STATE_FPSIMD;
arch/arm64/kernel/ptrace.c+7−3
@@ -932,11 +932,13 @@ static int sve_set_common(struct task_struct *target, · 931 unmodified lines
932932 /*
933933 * Ensure target->thread.sve_state is up to date with target's
934934 * FPSIMD regs, so that a short copyin leaves trailing
935− * registers unmodified. Always enable SVE even if going into
936− * streaming mode.
935+ * registers unmodified. Only enable SVE if we are
936+ * configuring normal SVE, a system with streaming SVE may not
937+ * have normal SVE.
937938 */
938939 fpsimd_sync_to_sve(target);
939− set_tsk_thread_flag(target, TIF_SVE);
940+ if (type == ARM64_VEC_SVE)
941+ set_tsk_thread_flag(target, TIF_SVE);
940942 target->thread.fp_type = FP_STATE_SVE;
941943
942944 BUILD_BUG_ON(SVE_PT_SVE_OFFSET != sizeof(header));
@@ -1180,6 +1182,8 @@ static int zt_set(struct task_struct *target, · 237 unmodified lines
11801182 if (ret == 0)
11811183 target->thread.svcr |= SVCR_ZA_MASK;
11821184
1185+ fpsimd_flush_task_state(target);
1186+
11831187 return ret;
11841188 }
11851189
arch/arm64/kvm/arm.c+27−34
@@ -55,7 +55,7 @@ DECLARE_KVM_NVHE_PER_CPU(struct kvm_cpu_context, kvm_hyp_ctxt); · 54 unmodified lines
5555
5656 static bool vgic_present, kvm_arm_initialised;
5757
58−static DEFINE_PER_CPU(unsigned char, kvm_arm_hardware_enabled);
58+static DEFINE_PER_CPU(unsigned char, kvm_hyp_initialized);
5959 DEFINE_STATIC_KEY_FALSE(userspace_irqchip_in_use);
6060
6161 bool is_kvm_arm_initialised(void)
@@ -1864,18 +1864,24 @@ static void cpu_hyp_reinit(void) · 1802 unmodified lines
18641864 cpu_hyp_init_features();
18651865 }
18661866
1867−static void _kvm_arch_hardware_enable(void *discard)
1867+static void cpu_hyp_init(void *discard)
18681868 {
1869− if (!__this_cpu_read(kvm_arm_hardware_enabled)) {
1869+ if (!__this_cpu_read(kvm_hyp_initialized)) {
18701870 cpu_hyp_reinit();
1871− __this_cpu_write(kvm_arm_hardware_enabled, 1);
1871+ __this_cpu_write(kvm_hyp_initialized, 1);
18721872 }
18731873 }
18741874
1875−int kvm_arch_hardware_enable(void)
1875+static void cpu_hyp_uninit(void *discard)
18761876 {
1877− int was_enabled;
1877+ if (__this_cpu_read(kvm_hyp_initialized)) {
1878+ cpu_hyp_reset();
1879+ __this_cpu_write(kvm_hyp_initialized, 0);
1880+ }
1881+}
18781882
1883+int kvm_arch_hardware_enable(void)
1884+{
18791885 /*
18801886 * Most calls to this function are made with migration
18811887 * disabled, but not with preemption disabled. The former is
@@ -1884,36 +1890,23 @@ int kvm_arch_hardware_enable(void) · 2 unmodified lines
18841890 */
18851891 preempt_disable();
18861892
1887− was_enabled = __this_cpu_read(kvm_arm_hardware_enabled);
1888− _kvm_arch_hardware_enable(NULL);
1893+ cpu_hyp_init(NULL);
18891894
1890− if (!was_enabled) {
1891− kvm_vgic_cpu_up();
1892− kvm_timer_cpu_up();
1893− }
1895+ kvm_vgic_cpu_up();
1896+ kvm_timer_cpu_up();
18941897
18951898 preempt_enable();
18961899
18971900 return 0;
18981901 }
18991902
1900−static void _kvm_arch_hardware_disable(void *discard)
1901−{
1902− if (__this_cpu_read(kvm_arm_hardware_enabled)) {
1903− cpu_hyp_reset();
1904− __this_cpu_write(kvm_arm_hardware_enabled, 0);
1905− }
1906−}
1907−
19081903 void kvm_arch_hardware_disable(void)
19091904 {
1910− if (__this_cpu_read(kvm_arm_hardware_enabled)) {
1911− kvm_timer_cpu_down();
1912− kvm_vgic_cpu_down();
1913− }
1905+ kvm_timer_cpu_down();
1906+ kvm_vgic_cpu_down();
19141907
19151908 if (!is_protected_kvm_enabled())
1916− _kvm_arch_hardware_disable(NULL);
1909+ cpu_hyp_uninit(NULL);
19171910 }
19181911
19191912 #ifdef CONFIG_CPU_PM
@@ -1922,16 +1915,16 @@ static int hyp_init_cpu_pm_notifier(struct notifier_block *self, · 2 unmodified lines
19221915 void *v)
19231916 {
19241917 /*
1925− * kvm_arm_hardware_enabled is left with its old value over
1918+ * kvm_hyp_initialized is left with its old value over
19261919 * PM_ENTER->PM_EXIT. It is used to indicate PM_EXIT should
19271920 * re-enable hyp.
19281921 */
19291922 switch (cmd) {
19301923 case CPU_PM_ENTER:
1931− if (__this_cpu_read(kvm_arm_hardware_enabled))
1924+ if (__this_cpu_read(kvm_hyp_initialized))
19321925 /*
1933− * don't update kvm_arm_hardware_enabled here
1934− * so that the hardware will be re-enabled
1926+ * don't update kvm_hyp_initialized here
1927+ * so that the hyp will be re-enabled
19351928 * when we resume. See below.
19361929 */
19371930 cpu_hyp_reset();
@@ -1939,8 +1932,8 @@ static int hyp_init_cpu_pm_notifier(struct notifier_block *self, · 1 unmodified line
19391932 return NOTIFY_OK;
19401933 case CPU_PM_ENTER_FAILED:
19411934 case CPU_PM_EXIT:
1942− if (__this_cpu_read(kvm_arm_hardware_enabled))
1943− /* The hardware was enabled before suspend. */
1935+ if (__this_cpu_read(kvm_hyp_initialized))
1936+ /* The hyp was enabled before suspend. */
19441937 cpu_hyp_reinit();
19451938
19461939 return NOTIFY_OK;
@@ -2021,7 +2014,7 @@ static int __init init_subsystems(void) · 74 unmodified lines
20212014 /*
20222015 * Enable hardware so that subsystem initialisation can access EL2.
20232016 */
2024− on_each_cpu(_kvm_arch_hardware_enable, NULL, 1);
2017+ on_each_cpu(cpu_hyp_init, NULL, 1);
20252018
20262019 /*
20272020 * Register CPU lower-power notifier
@@ -2059,7 +2052,7 @@ out: · 31 unmodified lines
20592052 hyp_cpu_pm_exit();
20602053
20612054 if (err || !is_protected_kvm_enabled())
2062− on_each_cpu(_kvm_arch_hardware_disable, NULL, 1);
2055+ on_each_cpu(cpu_hyp_uninit, NULL, 1);
20632056
20642057 return err;
20652058 }
@@ -2097,7 +2090,7 @@ static int __init do_pkvm_init(u32 hyp_va_bits) · 31 unmodified lines
20972090 * The stub hypercalls are now disabled, so set our local flag to
20982091 * prevent a later re-init attempt in kvm_arch_hardware_enable().
20992092 */
2100− __this_cpu_write(kvm_arm_hardware_enabled, 1);
2093+ __this_cpu_write(kvm_hyp_initialized, 1);
21012094 preempt_enable();
21022095
21032096 return ret;
arch/arm64/kvm/hyp/include/hyp/switch.h+1−0
@@ -457,6 +457,7 @@ static bool handle_ampere1_tcr(struct kvm_vcpu *vcpu) · 456 unmodified lines
457457 */
458458 val &= ~(TCR_HD | TCR_HA);
459459 write_sysreg_el1(val, SYS_TCR);
460+ __kvm_skip_instr(vcpu);
460461 return true;
461462 }
462463
arch/arm64/kvm/hyp/nvhe/ffa.c+14−1
@@ -705,7 +705,20 @@ int hyp_ffa_init(void *pages) · 704 unmodified lines
705705 if (res.a0 == FFA_RET_NOT_SUPPORTED)
706706 return 0;
707707
708− if (res.a0 != FFA_VERSION_1_0)
708+ /*
709+ * Firmware returns the maximum supported version of the FF-A
710+ * implementation. Check that the returned version is
711+ * backwards-compatible with the hyp according to the rules in DEN0077A
712+ * v1.1 REL0 13.2.1.
713+ *
714+ * Of course, things are never simple when dealing with firmware. v1.1
715+ * broke ABI with v1.0 on several structures, which is itself
716+ * incompatible with the aforementioned versioning scheme. The
717+ * expectation is that v1.x implementations that do not support the v1.0
718+ * ABI return NOT_SUPPORTED rather than a version number, according to
719+ * DEN0077A v1.1 REL0 18.6.4.
720+ */
721+ if (FFA_MAJOR_VERSION(res.a0) != 1)
709722 return -EOPNOTSUPP;
710723
711724 arm_smccc_1_1_smc(FFA_ID_GET, 0, 0, 0, 0, 0, 0, 0, &res);
arch/arm64/kvm/hyp/nvhe/switch.c+1−1
@@ -63,7 +63,7 @@ static void __activate_traps(struct kvm_vcpu *vcpu) · 62 unmodified lines
6363 __activate_traps_fpsimd32(vcpu);
6464 }
6565
66− write_sysreg(val, cptr_el2);
66+ kvm_write_cptr_el2(val);
6767 write_sysreg(__this_cpu_read(kvm_hyp_vector), vbar_el2);
6868
6969 if (cpus_have_final_cap(ARM64_WORKAROUND_SPECULATIVE_AT)) {
arch/ia64/configs/bigsur_defconfig+1−1
@@ -77,7 +77,7 @@ CONFIG_EXT3_FS=y · 76 unmodified lines
7777 CONFIG_XFS_FS=y
7878 CONFIG_XFS_QUOTA=y
7979 CONFIG_XFS_POSIX_ACL=y
80−CONFIG_AUTOFS4_FS=m
80+CONFIG_AUTOFS_FS=m
8181 CONFIG_ISO9660_FS=m
8282 CONFIG_JOLIET=y
8383 CONFIG_UDF_FS=m
arch/ia64/configs/generic_defconfig+1−1
@@ -146,7 +146,7 @@ CONFIG_REISERFS_FS_XATTR=y · 145 unmodified lines
146146 CONFIG_REISERFS_FS_POSIX_ACL=y
147147 CONFIG_REISERFS_FS_SECURITY=y
148148 CONFIG_XFS_FS=y
149−CONFIG_AUTOFS4_FS=m
149+CONFIG_AUTOFS_FS=m
150150 CONFIG_ISO9660_FS=m
151151 CONFIG_JOLIET=y
152152 CONFIG_UDF_FS=m
arch/ia64/configs/gensparse_defconfig+1−1
@@ -127,7 +127,7 @@ CONFIG_REISERFS_FS_XATTR=y · 126 unmodified lines
127127 CONFIG_REISERFS_FS_POSIX_ACL=y
128128 CONFIG_REISERFS_FS_SECURITY=y
129129 CONFIG_XFS_FS=y
130−CONFIG_AUTOFS4_FS=y
130+CONFIG_AUTOFS_FS=y
131131 CONFIG_ISO9660_FS=m
132132 CONFIG_JOLIET=y
133133 CONFIG_UDF_FS=m
arch/ia64/configs/tiger_defconfig+1−1
@@ -110,7 +110,7 @@ CONFIG_REISERFS_FS_XATTR=y · 109 unmodified lines
110110 CONFIG_REISERFS_FS_POSIX_ACL=y
111111 CONFIG_REISERFS_FS_SECURITY=y
112112 CONFIG_XFS_FS=y
113−CONFIG_AUTOFS4_FS=y
113+CONFIG_AUTOFS_FS=y
114114 CONFIG_ISO9660_FS=m
115115 CONFIG_JOLIET=y
116116 CONFIG_UDF_FS=m
arch/ia64/include/asm/processor.h+0−3
@@ -634,7 +634,6 @@ ia64_imva (void *addr) · 633 unmodified lines
634634
635635 #define ARCH_HAS_PREFETCH
636636 #define ARCH_HAS_PREFETCHW
637−#define ARCH_HAS_SPINLOCK_PREFETCH
638637 #define PREFETCH_STRIDE L1_CACHE_BYTES
639638
640639 static inline void
@@ -649,8 +648,6 @@ prefetchw (const void *x) · 8 unmodified lines
649648 ia64_lfetch_excl(ia64_lfhint_none, x);
650649 }
651650
652−#define spin_lock_prefetch(x) prefetchw(x)
653−
654651 extern unsigned long boot_option_idle_override;
655652
656653 enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_FORCE_MWAIT,
arch/loongarch/Kconfig+1−0
@@ -14,6 +14,7 @@ config LOONGARCH · 13 unmodified lines
1414 select ARCH_HAS_CPU_FINALIZE_INIT
1515 select ARCH_HAS_FORTIFY_SOURCE
1616 select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
17+ select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
1718 select ARCH_HAS_PTE_SPECIAL
1819 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
1920 select ARCH_INLINE_READ_LOCK if !PREEMPTION
arch/loongarch/Makefile+3−1
@@ -68,6 +68,8 @@ LDFLAGS_vmlinux += -static -n -nostdlib · 67 unmodified lines
6868 ifdef CONFIG_AS_HAS_EXPLICIT_RELOCS
6969 cflags-y += $(call cc-option,-mexplicit-relocs)
7070 KBUILD_CFLAGS_KERNEL += $(call cc-option,-mdirect-extern-access)
71+KBUILD_AFLAGS_MODULE += $(call cc-option,-mno-relax) $(call cc-option,-Wa$(comma)-mno-relax)
72+KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax) $(call cc-option,-Wa$(comma)-mno-relax)
7173 else
7274 cflags-y += $(call cc-option,-mno-explicit-relocs)
7375 KBUILD_AFLAGS_KERNEL += -Wa,-mla-global-with-pcrel
@@ -111,7 +113,7 @@ KBUILD_CFLAGS += -isystem $(shell $(CC) -print-file-name=include) · 37 unmodified lines
111113
112114 KBUILD_LDFLAGS += -m $(ld-emul)
113115
114−ifdef CONFIG_LOONGARCH
116+ifdef need-compiler
115117 CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
116118 grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
117119 sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
arch/loongarch/configs/loongson3_defconfig+1−1
@@ -769,7 +769,7 @@ CONFIG_QUOTA=y · 768 unmodified lines
769769 # CONFIG_PRINT_QUOTA_WARNING is not set
770770 CONFIG_QFMT_V1=m
771771 CONFIG_QFMT_V2=m
772−CONFIG_AUTOFS4_FS=y
772+CONFIG_AUTOFS_FS=y
773773 CONFIG_FUSE_FS=m
774774 CONFIG_OVERLAY_FS=y
775775 CONFIG_OVERLAY_FS_INDEX=y
arch/loongarch/include/asm/fpu.h+4−11
@@ -218,15 +218,8 @@ static inline void restore_lsx(struct task_struct *t) · 217 unmodified lines
218218
219219 static inline void init_lsx_upper(void)
220220 {
221− /*
222− * Check cpu_has_lsx only if it's a constant. This will allow the
223− * compiler to optimise out code for CPUs without LSX without adding
224− * an extra redundant check for CPUs with LSX.
225− */
226− if (__builtin_constant_p(cpu_has_lsx) && !cpu_has_lsx)
227− return;
228−
229− _init_lsx_upper();
221+ if (cpu_has_lsx)
222+ _init_lsx_upper();
230223 }
231224
232225 static inline void restore_lsx_upper(struct task_struct *t)
@@ -294,7 +287,7 @@ static inline void restore_lasx_upper(struct task_struct *t) {} · 61 unmodified lines
294287
295288 static inline int thread_lsx_context_live(void)
296289 {
297− if (__builtin_constant_p(cpu_has_lsx) && !cpu_has_lsx)
290+ if (!cpu_has_lsx)
298291 return 0;
299292
300293 return test_thread_flag(TIF_LSX_CTX_LIVE);
@@ -302,7 +295,7 @@ static inline int thread_lsx_context_live(void) · 1 unmodified line
302295
303296 static inline int thread_lasx_context_live(void)
304297 {
305− if (__builtin_constant_p(cpu_has_lasx) && !cpu_has_lasx)
298+ if (!cpu_has_lasx)
306299 return 0;
307300
308301 return test_thread_flag(TIF_LASX_CTX_LIVE);
arch/loongarch/kernel/setup.c+16−0
@@ -332,9 +332,25 @@ static void __init bootcmdline_init(char **cmdline_p) · 331 unmodified lines
332332 strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
333333
334334 strlcat(boot_command_line, init_command_line, COMMAND_LINE_SIZE);
335+ goto out;
335336 }
336337 #endif
337338
339+ /*
340+ * Append built-in command line to the bootloader command line if
341+ * CONFIG_CMDLINE_EXTEND is enabled.
342+ */
343+ if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) && CONFIG_CMDLINE[0]) {
344+ strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
345+ strlcat(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
346+ }
347+
348+ /*
349+ * Use built-in command line if the bootloader command line is empty.
350+ */
351+ if (IS_ENABLED(CONFIG_CMDLINE_BOOTLOADER) && !boot_command_line[0])
352+ strscpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
353+
338354 out:
339355 *cmdline_p = boot_command_line;
340356 }
arch/loongarch/lib/clear_user.S+2−1
@@ -108,6 +108,7 @@ SYM_FUNC_START(__clear_user_fast) · 107 unmodified lines
108108 addi.d a3, a2, -8
109109 bgeu a0, a3, .Llt8
110110 15: st.d zero, a0, 0
111+ addi.d a0, a0, 8
111112
112113 .Llt8:
113114 16: st.d zero, a2, -8
@@ -188,7 +189,7 @@ SYM_FUNC_START(__clear_user_fast) · 74 unmodified lines
188189 _asm_extable 13b, .L_fixup_handle_0
189190 _asm_extable 14b, .L_fixup_handle_1
190191 _asm_extable 15b, .L_fixup_handle_0
191− _asm_extable 16b, .L_fixup_handle_1
192+ _asm_extable 16b, .L_fixup_handle_0
192193 _asm_extable 17b, .L_fixup_handle_s0
193194 _asm_extable 18b, .L_fixup_handle_s0
194195 _asm_extable 19b, .L_fixup_handle_s0
arch/loongarch/lib/copy_user.S+2−1
@@ -136,6 +136,7 @@ SYM_FUNC_START(__copy_user_fast) · 135 unmodified lines
136136 bgeu a1, a4, .Llt8
137137 30: ld.d t0, a1, 0
138138 31: st.d t0, a0, 0
139+ addi.d a0, a0, 8
139140
140141 .Llt8:
141142 32: ld.d t0, a3, -8
@@ -246,7 +247,7 @@ SYM_FUNC_START(__copy_user_fast) · 104 unmodified lines
246247 _asm_extable 30b, .L_fixup_handle_0
247248 _asm_extable 31b, .L_fixup_handle_0
248249 _asm_extable 32b, .L_fixup_handle_0
249− _asm_extable 33b, .L_fixup_handle_1
250+ _asm_extable 33b, .L_fixup_handle_0
250251 _asm_extable 34b, .L_fixup_handle_s0
251252 _asm_extable 35b, .L_fixup_handle_s0
252253 _asm_extable 36b, .L_fixup_handle_s0
arch/loongarch/net/bpf_jit.h+1−1
@@ -150,7 +150,7 @@ static inline void move_imm(struct jit_ctx *ctx, enum loongarch_gpr rd, long imm · 149 unmodified lines
150150 * no need to call lu32id to do a new filled operation.
151151 */
152152 imm_51_31 = (imm >> 31) & 0x1fffff;
153− if (imm_51_31 != 0 || imm_51_31 != 0x1fffff) {
153+ if (imm_51_31 != 0 && imm_51_31 != 0x1fffff) {
154154 /* lu32id rd, imm_51_32 */
155155 imm_51_32 = (imm >> 32) & 0xfffff;
156156 emit_insn(ctx, lu32id, rd, imm_51_32);
arch/m68k/fpsp040/skeleton.S+2−2
@@ -499,13 +499,13 @@ in_ea: · 498 unmodified lines
499499 dbf %d0,morein
500500 rts
501501
502− .section .fixup,#alloc,#execinstr
502+ .section .fixup,"ax"
503503 .even
504504 1:
505505 jbsr fpsp040_die
506506 jbra .Lnotkern
507507
508− .section __ex_table,#alloc
508+ .section __ex_table,"a"
509509 .align 4
510510
511511 .long in_ea,1b
arch/m68k/ifpsp060/os.S+2−2
@@ -379,11 +379,11 @@ _060_real_access: · 378 unmodified lines
379379
380380
381381 | Execption handling for movs access to illegal memory
382− .section .fixup,#alloc,#execinstr
382+ .section .fixup,"ax"
383383 .even
384384 1: moveq #-1,%d1
385385 rts
386−.section __ex_table,#alloc
386+.section __ex_table,"a"
387387 .align 4
388388 .long dmrbuae,1b
389389 .long dmrwuae,1b
arch/m68k/kernel/relocate_kernel.S+2−2
@@ -26,7 +26,7 @@ ENTRY(relocate_new_kernel) · 25 unmodified lines
2626 lea %pc@(.Lcopy),%a4
2727 2: addl #0x00000000,%a4 /* virt_to_phys() */
2828
29− .section ".m68k_fixup","aw"
29+ .section .m68k_fixup,"aw"
3030 .long M68K_FIXUP_MEMOFFSET, 2b+2
3131 .previous
3232
@@ -49,7 +49,7 @@ ENTRY(relocate_new_kernel) · 16 unmodified lines
4949 lea %pc@(.Lcont040),%a4
5050 5: addl #0x00000000,%a4 /* virt_to_phys() */
5151
52− .section ".m68k_fixup","aw"
52+ .section .m68k_fixup,"aw"
5353 .long M68K_FIXUP_MEMOFFSET, 5b+2
5454 .previous
5555
arch/mips/configs/bigsur_defconfig+1−1
@@ -153,7 +153,7 @@ CONFIG_QUOTA=y · 152 unmodified lines
153153 CONFIG_QUOTA_NETLINK_INTERFACE=y
154154 # CONFIG_PRINT_QUOTA_WARNING is not set
155155 CONFIG_QFMT_V2=m
156−CONFIG_AUTOFS4_FS=m
156+CONFIG_AUTOFS_FS=m
157157 CONFIG_FUSE_FS=m
158158 CONFIG_ISO9660_FS=m
159159 CONFIG_JOLIET=y
arch/mips/configs/fuloong2e_defconfig+1−1
@@ -178,7 +178,7 @@ CONFIG_EXT3_FS=y · 177 unmodified lines
178178 CONFIG_EXT4_FS_POSIX_ACL=y
179179 CONFIG_EXT4_FS_SECURITY=y
180180 CONFIG_REISERFS_FS=m
181−CONFIG_AUTOFS4_FS=y
181+CONFIG_AUTOFS_FS=y
182182 CONFIG_FUSE_FS=y
183183 CONFIG_ISO9660_FS=m
184184 CONFIG_JOLIET=y
arch/mips/configs/ip22_defconfig+1−1
@@ -245,7 +245,7 @@ CONFIG_QUOTA=y · 244 unmodified lines
245245 CONFIG_QUOTA_NETLINK_INTERFACE=y
246246 # CONFIG_PRINT_QUOTA_WARNING is not set
247247 CONFIG_QFMT_V2=m
248−CONFIG_AUTOFS4_FS=m
248+CONFIG_AUTOFS_FS=m
249249 CONFIG_FUSE_FS=m
250250 CONFIG_ISO9660_FS=m
251251 CONFIG_JOLIET=y
arch/mips/configs/ip32_defconfig+1−1
@@ -95,7 +95,7 @@ CONFIG_EXT3_FS_SECURITY=y · 94 unmodified lines
9595 CONFIG_QUOTA=y
9696 CONFIG_QFMT_V1=m
9797 CONFIG_QFMT_V2=m
98−CONFIG_AUTOFS4_FS=m
98+CONFIG_AUTOFS_FS=m
9999 CONFIG_FUSE_FS=m
100100 CONFIG_ISO9660_FS=m
101101 CONFIG_JOLIET=y
arch/mips/configs/jazz_defconfig+1−1
@@ -76,7 +76,7 @@ CONFIG_REISERFS_FS_POSIX_ACL=y · 75 unmodified lines
7676 CONFIG_REISERFS_FS_SECURITY=y
7777 CONFIG_XFS_FS=m
7878 CONFIG_XFS_QUOTA=y
79−CONFIG_AUTOFS4_FS=m
79+CONFIG_AUTOFS_FS=m
8080 CONFIG_FUSE_FS=m
8181 CONFIG_ISO9660_FS=m
8282 CONFIG_JOLIET=y
arch/mips/configs/lemote2f_defconfig+1−1
@@ -240,7 +240,7 @@ CONFIG_XFS_POSIX_ACL=y · 239 unmodified lines
240240 CONFIG_BTRFS_FS=m
241241 CONFIG_QUOTA=y
242242 CONFIG_QFMT_V2=m
243−CONFIG_AUTOFS4_FS=m
243+CONFIG_AUTOFS_FS=m
244244 CONFIG_FSCACHE=m
245245 CONFIG_CACHEFILES=m
246246 CONFIG_ISO9660_FS=m
arch/mips/configs/loongson2k_defconfig+1−1
@@ -296,7 +296,7 @@ CONFIG_XFS_QUOTA=y · 295 unmodified lines
296296 CONFIG_XFS_POSIX_ACL=y
297297 CONFIG_QUOTA=y
298298 # CONFIG_PRINT_QUOTA_WARNING is not set
299−CONFIG_AUTOFS4_FS=y
299+CONFIG_AUTOFS_FS=y
300300 CONFIG_FUSE_FS=m
301301 CONFIG_ISO9660_FS=m
302302 CONFIG_JOLIET=y
arch/mips/configs/loongson3_defconfig+1−1
@@ -352,7 +352,7 @@ CONFIG_QUOTA=y · 351 unmodified lines
352352 # CONFIG_PRINT_QUOTA_WARNING is not set
353353 CONFIG_QFMT_V1=m
354354 CONFIG_QFMT_V2=m
355−CONFIG_AUTOFS4_FS=y
355+CONFIG_AUTOFS_FS=y
356356 CONFIG_FUSE_FS=m
357357 CONFIG_VIRTIO_FS=m
358358 CONFIG_FSCACHE=m
arch/mips/configs/mtx1_defconfig+1−1
@@ -601,7 +601,7 @@ CONFIG_EXT3_FS=m · 600 unmodified lines
601601 CONFIG_EXT3_FS_POSIX_ACL=y
602602 CONFIG_EXT3_FS_SECURITY=y
603603 CONFIG_QUOTA=y
604−CONFIG_AUTOFS4_FS=y
604+CONFIG_AUTOFS_FS=y
605605 CONFIG_FUSE_FS=m
606606 CONFIG_ISO9660_FS=m
607607 CONFIG_JOLIET=y
arch/mips/configs/pic32mzda_defconfig+1−1
@@ -66,7 +66,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y · 65 unmodified lines
6666 CONFIG_EXT4_FS=y
6767 CONFIG_EXT4_FS_POSIX_ACL=y
6868 CONFIG_EXT4_FS_SECURITY=y
69−CONFIG_AUTOFS4_FS=m
69+CONFIG_AUTOFS_FS=m
7070 CONFIG_FUSE_FS=m
7171 CONFIG_FSCACHE=m
7272 CONFIG_ISO9660_FS=m
arch/mips/configs/rm200_defconfig+1−1
@@ -317,7 +317,7 @@ CONFIG_REISERFS_FS_POSIX_ACL=y · 316 unmodified lines
317317 CONFIG_REISERFS_FS_SECURITY=y
318318 CONFIG_XFS_FS=m
319319 CONFIG_XFS_QUOTA=y
320−CONFIG_AUTOFS4_FS=m
320+CONFIG_AUTOFS_FS=m
321321 CONFIG_FUSE_FS=m
322322 CONFIG_ISO9660_FS=m
323323 CONFIG_JOLIET=y
arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h+0−2
@@ -58,8 +58,6 @@ · 57 unmodified lines
5858
5959 #define cpu_has_rixi (cpu_data[0].cputype != CPU_CAVIUM_OCTEON)
6060
61−#define ARCH_HAS_SPINLOCK_PREFETCH 1
62−#define spin_lock_prefetch(x) prefetch(x)
6361 #define PREFETCH_STRIDE 128
6462
6563 #ifdef __OCTEON__
arch/parisc/Kconfig.debug+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 #
33 config LIGHTWEIGHT_SPINLOCK_CHECK
44 bool "Enable lightweight spinlock checks"
5− depends on SMP && !DEBUG_SPINLOCK
5+ depends on DEBUG_KERNEL && SMP && !DEBUG_SPINLOCK
66 default y
77 help
88 Add checks with low performance impact to the spinlock functions
arch/parisc/boot/compressed/misc.c+5−5
@@ -117,7 +117,7 @@ char *strchr(const char *s, int c) · 116 unmodified lines
117117 return NULL;
118118 }
119119
120−int puts(const char *s)
120+static int puts(const char *s)
121121 {
122122 const char *nuline = s;
123123
@@ -172,7 +172,7 @@ static int print_num(unsigned long num, int base) · 48 unmodified lines
172172 return 0;
173173 }
174174
175−int printf(const char *fmt, ...)
175+static int printf(const char *fmt, ...)
176176 {
177177 va_list args;
178178 int i = 0;
@@ -204,13 +204,13 @@ void abort(void) · 25 unmodified lines
204204 }
205205
206206 #undef malloc
207−void *malloc(size_t size)
207+static void *malloc(size_t size)
208208 {
209209 return malloc_gzip(size);
210210 }
211211
212212 #undef free
213−void free(void *ptr)
213+static void free(void *ptr)
214214 {
215215 return free_gzip(ptr);
216216 }
@@ -278,7 +278,7 @@ static void parse_elf(void *output) · 61 unmodified lines
278278 free(phdrs);
279279 }
280280
281−unsigned long decompress_kernel(unsigned int started_wide,
281+asmlinkage unsigned long __visible decompress_kernel(unsigned int started_wide,
282282 unsigned int command_line,
283283 const unsigned int rd_start,
284284 const unsigned int rd_end)
arch/parisc/configs/generic-32bit_defconfig+1−1
@@ -237,7 +237,7 @@ CONFIG_EXT3_FS_SECURITY=y · 236 unmodified lines
237237 CONFIG_QUOTA=y
238238 CONFIG_QUOTA_NETLINK_INTERFACE=y
239239 CONFIG_QFMT_V2=y
240−CONFIG_AUTOFS4_FS=y
240+CONFIG_AUTOFS_FS=y
241241 CONFIG_ISO9660_FS=y
242242 CONFIG_JOLIET=y
243243 CONFIG_VFAT_FS=y
arch/parisc/configs/generic-64bit_defconfig+1−1
@@ -259,7 +259,7 @@ CONFIG_BTRFS_FS=m · 258 unmodified lines
259259 CONFIG_QUOTA=y
260260 CONFIG_QUOTA_NETLINK_INTERFACE=y
261261 CONFIG_QFMT_V2=y
262−CONFIG_AUTOFS4_FS=y
262+CONFIG_AUTOFS_FS=y
263263 CONFIG_FUSE_FS=y
264264 CONFIG_CUSE=y
265265 CONFIG_ISO9660_FS=y
arch/parisc/include/asm/dma.h+2−0
@@ -14,6 +14,8 @@ · 13 unmodified lines
1414 #define dma_outb outb
1515 #define dma_inb inb
1616
17+extern unsigned long pcxl_dma_start;
18+
1719 /*
1820 ** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
1921 ** (or rather not merge) DMAs into manageable chunks.
arch/parisc/include/asm/ftrace.h+4−0
@@ -12,6 +12,10 @@ extern void mcount(void); · 11 unmodified lines
1212 extern unsigned long sys_call_table[];
1313
1414 extern unsigned long return_address(unsigned int);
15+struct ftrace_regs;
16+extern void ftrace_function_trampoline(unsigned long parent,
17+ unsigned long self_addr, unsigned long org_sp_gr3,
18+ struct ftrace_regs *fregs);
1519
1620 #ifdef CONFIG_DYNAMIC_FTRACE
1721 extern void ftrace_caller(void);
arch/parisc/include/asm/spinlock.h+0−2
@@ -7,8 +7,6 @@ · 6 unmodified lines
77 #include <asm/processor.h>
88 #include <asm/spinlock_types.h>
99
10−#define SPINLOCK_BREAK_INSN 0x0000c006 /* break 6,6 */
11−
1210 static inline void arch_spin_val_check(int lock_val)
1311 {
1412 if (IS_ENABLED(CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK))
arch/parisc/include/asm/spinlock_types.h+6−0
@@ -4,6 +4,10 @@ · 3 unmodified lines
44
55 #define __ARCH_SPIN_LOCK_UNLOCKED_VAL 0x1a46
66
7+#define SPINLOCK_BREAK_INSN 0x0000c006 /* break 6,6 */
8+
9+#ifndef __ASSEMBLY__
10+
711 typedef struct {
812 #ifdef CONFIG_PA20
913 volatile unsigned int slock;
@@ -27,6 +31,8 @@ typedef struct { · 17 unmodified lines
2731 volatile unsigned int counter;
2832 } arch_rwlock_t;
2933
34+#endif /* __ASSEMBLY__ */
35+
3036 #define __ARCH_RW_LOCK_UNLOCKED__ 0x01000000
3137 #define __ARCH_RW_LOCK_UNLOCKED { .lock_mutex = __ARCH_SPIN_LOCK_UNLOCKED, \
3238 .counter = __ARCH_RW_LOCK_UNLOCKED__ }
arch/parisc/kernel/firmware.c+4−4
@@ -74,8 +74,8 @@ · 73 unmodified lines
7474 static DEFINE_SPINLOCK(pdc_lock);
7575 #endif
7676
77−unsigned long pdc_result[NUM_PDC_RESULT] __aligned(8);
78−unsigned long pdc_result2[NUM_PDC_RESULT] __aligned(8);
77+static unsigned long pdc_result[NUM_PDC_RESULT] __aligned(8);
78+static unsigned long pdc_result2[NUM_PDC_RESULT] __aligned(8);
7979
8080 #ifdef CONFIG_64BIT
8181 #define WIDE_FIRMWARE 0x1
@@ -334,7 +334,7 @@ int __pdc_cpu_rendezvous(void) · 252 unmodified lines
334334 /**
335335 * pdc_cpu_rendezvous_lock - Lock PDC while transitioning to rendezvous state
336336 */
337−void pdc_cpu_rendezvous_lock(void)
337+void pdc_cpu_rendezvous_lock(void) __acquires(&pdc_lock)
338338 {
339339 spin_lock(&pdc_lock);
340340 }
@@ -342,7 +342,7 @@ void pdc_cpu_rendezvous_lock(void) · 1 unmodified line
342342 /**
343343 * pdc_cpu_rendezvous_unlock - Unlock PDC after reaching rendezvous state
344344 */
345−void pdc_cpu_rendezvous_unlock(void)
345+void pdc_cpu_rendezvous_unlock(void) __releases(&pdc_lock)
346346 {
347347 spin_unlock(&pdc_lock);
348348 }
arch/parisc/kernel/ftrace.c+1−1
@@ -53,7 +53,7 @@ static void __hot prepare_ftrace_return(unsigned long *parent, · 52 unmodified lines
5353
5454 static ftrace_func_t ftrace_func;
5555
56−void notrace __hot ftrace_function_trampoline(unsigned long parent,
56+asmlinkage void notrace __hot ftrace_function_trampoline(unsigned long parent,
5757 unsigned long self_addr,
5858 unsigned long org_sp_gr3,
5959 struct ftrace_regs *fregs)
arch/parisc/kernel/parisc_ksyms.c+1−6
@@ -14,6 +14,7 @@ · 13 unmodified lines
1414 #include <linux/module.h>
1515 #include <linux/kernel.h>
1616 #include <linux/syscalls.h>
17+#include <linux/libgcc.h>
1718
1819 #include <linux/string.h>
1920 EXPORT_SYMBOL(memset);
@@ -92,12 +93,6 @@ EXPORT_SYMBOL($$divI_12); · 72 unmodified lines
9293 EXPORT_SYMBOL($$divI_14);
9394 EXPORT_SYMBOL($$divI_15);
9495
95−extern void __ashrdi3(void);
96−extern void __ashldi3(void);
97−extern void __lshrdi3(void);
98−extern void __muldi3(void);
99−extern void __ucmpdi2(void);
100−
10196 EXPORT_SYMBOL(__ashrdi3);
10297 EXPORT_SYMBOL(__ashldi3);
10398 EXPORT_SYMBOL(__lshrdi3);
arch/parisc/kernel/pci-dma.c+2−10
@@ -39,7 +39,7 @@ static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; · 38 unmodified lines
3939 static unsigned long pcxl_used_bytes __read_mostly;
4040 static unsigned long pcxl_used_pages __read_mostly;
4141
42−extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
42+unsigned long pcxl_dma_start __ro_after_init; /* pcxl dma mapping area start */
4343 static DEFINE_SPINLOCK(pcxl_res_lock);
4444 static char *pcxl_res_map;
4545 static int pcxl_res_hint;
@@ -381,7 +381,7 @@ pcxl_dma_init(void) · 335 unmodified lines
381381 pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
382382 get_order(pcxl_res_size));
383383 memset(pcxl_res_map, 0, pcxl_res_size);
384− proc_gsc_root = proc_mkdir("gsc", NULL);
384+ proc_gsc_root = proc_mkdir("bus/gsc", NULL);
385385 if (!proc_gsc_root)
386386 printk(KERN_WARNING
387387 "pcxl_dma_init: Unable to create gsc /proc dir entry\n");
@@ -417,14 +417,6 @@ void *arch_dma_alloc(struct device *dev, size_t size, · 29 unmodified lines
417417 map_uncached_pages(vaddr, size, paddr);
418418 *dma_handle = (dma_addr_t) paddr;
419419
420−#if 0
421−/* This probably isn't needed to support EISA cards.
422−** ISA cards will certainly only support 24-bit DMA addressing.
423−** Not clear if we can, want, or need to support ISA.
424−*/
425− if (!dev || *dev->coherent_dma_mask < 0xffffffff)
426− gfp |= GFP_DMA;
427−#endif
428420 return (void *)vaddr;
429421 }
430422
arch/parisc/kernel/pdt.c+1−3
@@ -354,10 +354,8 @@ static int __init pdt_initcall(void) · 353 unmodified lines
354354 return -ENODEV;
355355
356356 kpdtd_task = kthread_run(pdt_mainloop, NULL, "kpdtd");
357− if (IS_ERR(kpdtd_task))
358− return PTR_ERR(kpdtd_task);
359357
360− return 0;
358+ return PTR_ERR_OR_ZERO(kpdtd_task);
361359 }
362360
363361 late_initcall(pdt_initcall);
arch/parisc/kernel/perf.c+1−1
@@ -57,7 +57,7 @@ struct rdr_tbl_ent { · 56 unmodified lines
5757 static int perf_processor_interface __read_mostly = UNKNOWN_INTF;
5858 static int perf_enabled __read_mostly;
5959 static DEFINE_SPINLOCK(perf_lock);
60−struct parisc_device *cpu_device __read_mostly;
60+static struct parisc_device *cpu_device __read_mostly;
6161
6262 /* RDRs to write for PCX-W */
6363 static const int perf_rdrs_W[] =
arch/parisc/kernel/processor.c+1−0
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include <asm/processor.h>
2727 #include <asm/page.h>
2828 #include <asm/pdc.h>
29+#include <asm/smp.h>
2930 #include <asm/pdcpat.h>
3031 #include <asm/irq.h> /* for struct irq_region */
3132 #include <asm/parisc-device.h>
arch/parisc/kernel/setup.c+0−48
@@ -40,11 +40,6 @@ · 39 unmodified lines
4040
4141 static char __initdata command_line[COMMAND_LINE_SIZE];
4242
43−/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
44−struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
45−struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
46−struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL;
47−
4843 static void __init setup_cmdline(char **cmdline_p)
4944 {
5045 extern unsigned int boot_args[];
@@ -196,48 +191,6 @@ const struct seq_operations cpuinfo_op = { · 145 unmodified lines
196191 .show = show_cpuinfo
197192 };
198193
199−static void __init parisc_proc_mkdir(void)
200−{
201− /*
202− ** Can't call proc_mkdir() until after proc_root_init() has been
203− ** called by start_kernel(). In other words, this code can't
204− ** live in arch/.../setup.c because start_parisc() calls
205− ** start_kernel().
206− */
207− switch (boot_cpu_data.cpu_type) {
208− case pcxl:
209− case pcxl2:
210− if (NULL == proc_gsc_root)
211− {
212− proc_gsc_root = proc_mkdir("bus/gsc", NULL);
213− }
214− break;
215− case pcxt_:
216− case pcxu:
217− case pcxu_:
218− case pcxw:
219− case pcxw_:
220− case pcxw2:
221− if (NULL == proc_runway_root)
222− {
223− proc_runway_root = proc_mkdir("bus/runway", NULL);
224− }
225− break;
226− case mako:
227− case mako2:
228− if (NULL == proc_mckinley_root)
229− {
230− proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
231− }
232− break;
233− default:
234− /* FIXME: this was added to prevent the compiler
235− * complaining about missing pcx, pcxs and pcxt
236− * I'm assuming they have neither gsc nor runway */
237− break;
238− }
239−}
240−
241194 static struct resource central_bus = {
242195 .name = "Central Bus",
243196 .start = F_EXTEND(0xfff80000),
@@ -294,7 +247,6 @@ static int __init parisc_init(void) · 50 unmodified lines
294247 {
295248 u32 osid = (OS_ID_LINUX << 16);
296249
297− parisc_proc_mkdir();
298250 parisc_init_resources();
299251 do_device_inventory(); /* probe for hardware */
300252
arch/parisc/kernel/signal.c+1−1
@@ -423,7 +423,7 @@ static void check_syscallno_in_delay_branch(struct pt_regs *regs) · 422 unmodified lines
423423 regs->gr[31] -= 8; /* delayed branching */
424424
425425 /* Get assembler opcode of code in delay branch */
426− uaddr = (unsigned int *) ((regs->gr[31] & ~3) + 4);
426+ uaddr = (u32 __user *) ((regs->gr[31] & ~3) + 4);
427427 err = get_user(opcode, uaddr);
428428 if (err)
429429 return;
arch/parisc/kernel/sys_parisc.c+5−10
@@ -27,17 +27,12 @@ · 26 unmodified lines
2727 #include <linux/elf-randomize.h>
2828
2929 /*
30− * Construct an artificial page offset for the mapping based on the virtual
30+ * Construct an artificial page offset for the mapping based on the physical
3131 * address of the kernel file mapping variable.
32− * If filp is zero the calculated pgoff value aliases the memory of the given
33− * address. This is useful for io_uring where the mapping shall alias a kernel
34− * address and a userspace adress where both the kernel and the userspace
35− * access the same memory region.
3632 */
37−#define GET_FILP_PGOFF(filp, addr) \
38− ((filp ? (((unsigned long) filp->f_mapping) >> 8) \
39− & ((SHM_COLOUR-1) >> PAGE_SHIFT) : 0UL) \
40− + (addr >> PAGE_SHIFT))
33+#define GET_FILP_PGOFF(filp) \
34+ (filp ? (((unsigned long) filp->f_mapping) >> 8) \
35+ & ((SHM_COLOUR-1) >> PAGE_SHIFT) : 0UL)
4136
4237 static unsigned long shared_align_offset(unsigned long filp_pgoff,
4338 unsigned long pgoff)
@@ -117,7 +112,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp, · 73 unmodified lines
117112 do_color_align = 0;
118113 if (filp || (flags & MAP_SHARED))
119114 do_color_align = 1;
120− filp_pgoff = GET_FILP_PGOFF(filp, addr);
115+ filp_pgoff = GET_FILP_PGOFF(filp);
121116
122117 if (flags & MAP_FIXED) {
123118 /* Even MAP_FIXED mappings must reside within TASK_SIZE */
arch/parisc/kernel/syscall.S+20−3
@@ -39,6 +39,7 @@ registers). · 38 unmodified lines
3939 #include <asm/assembly.h>
4040 #include <asm/processor.h>
4141 #include <asm/cache.h>
42+#include <asm/spinlock_types.h>
4243
4344 #include <linux/linkage.h>
4445
@@ -66,6 +67,16 @@ registers). · 21 unmodified lines
6667 stw \reg1, 0(%sr2,\reg2)
6768 .endm
6869
70+ /* raise exception if spinlock content is not zero or
71+ * __ARCH_SPIN_LOCK_UNLOCKED_VAL */
72+ .macro spinlock_check spin_val,tmpreg
73+#ifdef CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK
74+ ldi __ARCH_SPIN_LOCK_UNLOCKED_VAL, \tmpreg
75+ andcm,= \spin_val, \tmpreg, %r0
76+ .word SPINLOCK_BREAK_INSN
77+#endif
78+ .endm
79+
6980 .text
7081
7182 .import syscall_exit,code
@@ -508,7 +519,8 @@ lws_start: · 436 unmodified lines
508519
509520 lws_exit_noerror:
510521 lws_pagefault_enable %r1,%r21
511− stw,ma %r20, 0(%sr2,%r20)
522+ ldi __ARCH_SPIN_LOCK_UNLOCKED_VAL, %r21
523+ stw,ma %r21, 0(%sr2,%r20)
512524 ssm PSW_SM_I, %r0
513525 b lws_exit
514526 copy %r0, %r21
@@ -521,7 +533,8 @@ lws_wouldblock: · 6 unmodified lines
521533
522534 lws_pagefault:
523535 lws_pagefault_enable %r1,%r21
524− stw,ma %r20, 0(%sr2,%r20)
536+ ldi __ARCH_SPIN_LOCK_UNLOCKED_VAL, %r21
537+ stw,ma %r21, 0(%sr2,%r20)
525538 ssm PSW_SM_I, %r0
526539 ldo 3(%r0),%r28
527540 b lws_exit
@@ -619,6 +632,7 @@ lws_compare_and_swap: · 91 unmodified lines
619632
620633 /* Try to acquire the lock */
621634 LDCW 0(%sr2,%r20), %r28
635+ spinlock_check %r28, %r21
622636 comclr,<> %r0, %r28, %r0
623637 b,n lws_wouldblock
624638
@@ -772,6 +786,7 @@ cas2_lock_start: · 147 unmodified lines
772786
773787 /* Try to acquire the lock */
774788 LDCW 0(%sr2,%r20), %r28
789+ spinlock_check %r28, %r21
775790 comclr,<> %r0, %r28, %r0
776791 b,n lws_wouldblock
777792
@@ -1001,6 +1016,7 @@ atomic_xchg_start: · 223 unmodified lines
10011016
10021017 /* Try to acquire the lock */
10031018 LDCW 0(%sr2,%r20), %r28
1019+ spinlock_check %r28, %r21
10041020 comclr,<> %r0, %r28, %r0
10051021 b,n lws_wouldblock
10061022
@@ -1199,6 +1215,7 @@ atomic_store_start: · 192 unmodified lines
11991215
12001216 /* Try to acquire the lock */
12011217 LDCW 0(%sr2,%r20), %r28
1218+ spinlock_check %r28, %r21
12021219 comclr,<> %r0, %r28, %r0
12031220 b,n lws_wouldblock
12041221
@@ -1330,7 +1347,7 @@ ENTRY(lws_lock_start) · 125 unmodified lines
13301347 /* lws locks */
13311348 .rept 256
13321349 /* Keep locks aligned at 16-bytes */
1333− .word 1
1350+ .word __ARCH_SPIN_LOCK_UNLOCKED_VAL
13341351 .word 0
13351352 .word 0
13361353 .word 0
arch/parisc/kernel/unaligned.c+10−9
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/signal.h>
1212 #include <linux/ratelimit.h>
1313 #include <linux/uaccess.h>
14+#include <linux/sysctl.h>
1415 #include <asm/unaligned.h>
1516 #include <asm/hardirq.h>
1617 #include <asm/traps.h>
@@ -337,7 +338,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop) · 320 unmodified lines
337338 : "r19", "r20", "r21", "r22", "r1" );
338339 #else
339340 {
340− unsigned long valh=(val>>32),vall=(val&0xffffffffl);
341+ unsigned long valh = (val >> 32), vall = (val & 0xffffffffl);
341342 __asm__ __volatile__ (
342343 " mtsp %4, %%sr1\n"
343344 " zdep %2, 29, 2, %%r19\n"
@@ -473,7 +474,7 @@ void handle_unaligned(struct pt_regs *regs) · 129 unmodified lines
473474 case OPCODE_LDWA_I:
474475 case OPCODE_LDW_S:
475476 case OPCODE_LDWA_S:
476− ret = emulate_ldw(regs, R3(regs->iir),0);
477+ ret = emulate_ldw(regs, R3(regs->iir), 0);
477478 break;
478479
479480 case OPCODE_STH:
@@ -482,7 +483,7 @@ void handle_unaligned(struct pt_regs *regs) · 2 unmodified lines
482483
483484 case OPCODE_STW:
484485 case OPCODE_STWA:
485− ret = emulate_stw(regs, R2(regs->iir),0);
486+ ret = emulate_stw(regs, R2(regs->iir), 0);
486487 break;
487488
488489 #ifdef CONFIG_64BIT
@@ -490,12 +491,12 @@ void handle_unaligned(struct pt_regs *regs) · 1 unmodified line
490491 case OPCODE_LDDA_I:
491492 case OPCODE_LDD_S:
492493 case OPCODE_LDDA_S:
493− ret = emulate_ldd(regs, R3(regs->iir),0);
494+ ret = emulate_ldd(regs, R3(regs->iir), 0);
494495 break;
495496
496497 case OPCODE_STD:
497498 case OPCODE_STDA:
498− ret = emulate_std(regs, R2(regs->iir),0);
499+ ret = emulate_std(regs, R2(regs->iir), 0);
499500 break;
500501 #endif
501502
@@ -503,24 +504,24 @@ void handle_unaligned(struct pt_regs *regs) · 1 unmodified line
503504 case OPCODE_FLDWS:
504505 case OPCODE_FLDWXR:
505506 case OPCODE_FLDWSR:
506− ret = emulate_ldw(regs,FR3(regs->iir),1);
507+ ret = emulate_ldw(regs, FR3(regs->iir), 1);
507508 break;
508509
509510 case OPCODE_FLDDX:
510511 case OPCODE_FLDDS:
511− ret = emulate_ldd(regs,R3(regs->iir),1);
512+ ret = emulate_ldd(regs, R3(regs->iir), 1);
512513 break;
513514
514515 case OPCODE_FSTWX:
515516 case OPCODE_FSTWS:
516517 case OPCODE_FSTWXR:
517518 case OPCODE_FSTWSR:
518− ret = emulate_stw(regs,FR3(regs->iir),1);
519+ ret = emulate_stw(regs, FR3(regs->iir), 1);
519520 break;
520521
521522 case OPCODE_FSTDX:
522523 case OPCODE_FSTDS:
523− ret = emulate_std(regs,R3(regs->iir),1);
524+ ret = emulate_std(regs, R3(regs->iir), 1);
524525 break;
525526
526527 case OPCODE_LDCD_I:
arch/parisc/lib/ucmpdi2.c+2−1
@@ -1,5 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0
22 #include <linux/module.h>
3+#include <linux/libgcc.h>
34
45 union ull_union {
56 unsigned long long ull;
@@ -9,7 +10,7 @@ union ull_union { · 3 unmodified lines
910 } ui;
1011 };
1112
12−int __ucmpdi2(unsigned long long a, unsigned long long b)
13+word_type __ucmpdi2(unsigned long long a, unsigned long long b)
1314 {
1415 union ull_union au = {.ull = a};
1516 union ull_union bu = {.ull = b};
arch/parisc/mm/fault.c+25−25
@@ -192,31 +192,31 @@ int fixup_exception(struct pt_regs *regs) · 191 unmodified lines
192192 * For implementation see handle_interruption() in traps.c
193193 */
194194 static const char * const trap_description[] = {
195− [1] "High-priority machine check (HPMC)",
196− [2] "Power failure interrupt",
197− [3] "Recovery counter trap",
198− [5] "Low-priority machine check",
199− [6] "Instruction TLB miss fault",
200− [7] "Instruction access rights / protection trap",
201− [8] "Illegal instruction trap",
202− [9] "Break instruction trap",
203− [10] "Privileged operation trap",
204− [11] "Privileged register trap",
205− [12] "Overflow trap",
206− [13] "Conditional trap",
207− [14] "FP Assist Exception trap",
208− [15] "Data TLB miss fault",
209− [16] "Non-access ITLB miss fault",
210− [17] "Non-access DTLB miss fault",
211− [18] "Data memory protection/unaligned access trap",
212− [19] "Data memory break trap",
213− [20] "TLB dirty bit trap",
214− [21] "Page reference trap",
215− [22] "Assist emulation trap",
216− [25] "Taken branch trap",
217− [26] "Data memory access rights trap",
218− [27] "Data memory protection ID trap",
219− [28] "Unaligned data reference trap",
195+ [1] = "High-priority machine check (HPMC)",
196+ [2] = "Power failure interrupt",
197+ [3] = "Recovery counter trap",
198+ [5] = "Low-priority machine check",
199+ [6] = "Instruction TLB miss fault",
200+ [7] = "Instruction access rights / protection trap",
201+ [8] = "Illegal instruction trap",
202+ [9] = "Break instruction trap",
203+ [10] = "Privileged operation trap",
204+ [11] = "Privileged register trap",
205+ [12] = "Overflow trap",
206+ [13] = "Conditional trap",
207+ [14] = "FP Assist Exception trap",
208+ [15] = "Data TLB miss fault",
209+ [16] = "Non-access ITLB miss fault",
210+ [17] = "Non-access DTLB miss fault",
211+ [18] = "Data memory protection/unaligned access trap",
212+ [19] = "Data memory break trap",
213+ [20] = "TLB dirty bit trap",
214+ [21] = "Page reference trap",
215+ [22] = "Assist emulation trap",
216+ [25] = "Taken branch trap",
217+ [26] = "Data memory access rights trap",
218+ [27] = "Data memory protection ID trap",
219+ [28] = "Unaligned data reference trap",
220220 };
221221
222222 const char *trap_name(unsigned long code)
arch/parisc/mm/fixmap.c+0−3
@@ -19,9 +19,6 @@ void notrace set_fixmap(enum fixed_addresses idx, phys_addr_t phys) · 18 unmodified lines
1919 pmd_t *pmd = pmd_offset(pud, vaddr);
2020 pte_t *pte;
2121
22− if (pmd_none(*pmd))
23− pte = pte_alloc_kernel(pmd, vaddr);
24−
2522 pte = pte_offset_kernel(pmd, vaddr);
2623 set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX));
2724 flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
arch/parisc/mm/init.c+34−4
@@ -523,10 +523,6 @@ void mark_rodata_ro(void) · 522 unmodified lines
523523 void *parisc_vmalloc_start __ro_after_init;
524524 EXPORT_SYMBOL(parisc_vmalloc_start);
525525
526−#ifdef CONFIG_PA11
527−unsigned long pcxl_dma_start __ro_after_init;
528−#endif
529−
530526 void __init mem_init(void)
531527 {
532528 /* Do sanity checks on IPC (compat) structures */
@@ -669,6 +665,39 @@ static void __init gateway_init(void) · 136 unmodified lines
669665 PAGE_SIZE, PAGE_GATEWAY, 1);
670666 }
671667
668+static void __init fixmap_init(void)
669+{
670+ unsigned long addr = FIXMAP_START;
671+ unsigned long end = FIXMAP_START + FIXMAP_SIZE;
672+ pgd_t *pgd = pgd_offset_k(addr);
673+ p4d_t *p4d = p4d_offset(pgd, addr);
674+ pud_t *pud = pud_offset(p4d, addr);
675+ pmd_t *pmd;
676+
677+ BUILD_BUG_ON(FIXMAP_SIZE > PMD_SIZE);
678+
679+#if CONFIG_PGTABLE_LEVELS == 3
680+ if (pud_none(*pud)) {
681+ pmd = memblock_alloc(PAGE_SIZE << PMD_TABLE_ORDER,
682+ PAGE_SIZE << PMD_TABLE_ORDER);
683+ if (!pmd)
684+ panic("fixmap: pmd allocation failed.\n");
685+ pud_populate(NULL, pud, pmd);
686+ }
687+#endif
688+
689+ pmd = pmd_offset(pud, addr);
690+ do {
691+ pte_t *pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
692+ if (!pte)
693+ panic("fixmap: pte allocation failed.\n");
694+
695+ pmd_populate_kernel(&init_mm, pmd, pte);
696+
697+ addr += PAGE_SIZE;
698+ } while (addr < end);
699+}
700+
672701 static void __init parisc_bootmem_free(void)
673702 {
674703 unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0, };
@@ -683,6 +712,7 @@ void __init paging_init(void) · 8 unmodified lines
683712 setup_bootmem();
684713 pagetable_init();
685714 gateway_init();
715+ fixmap_init();
686716 flush_cache_all_local(); /* start with known state */
687717 flush_tlb_all_local(NULL);
688718
arch/parisc/mm/ioremap.c+4−5
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 */
2828 void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
2929 {
30− void __iomem *addr;
30+ uintptr_t addr;
3131 struct vm_struct *area;
3232 unsigned long offset, last_addr;
3333 pgprot_t pgprot;
@@ -79,10 +79,9 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size) · 45 unmodified lines
7979 if (!area)
8080 return NULL;
8181
82− addr = (void __iomem *) area->addr;
83− if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
84− phys_addr, pgprot)) {
85− vunmap(addr);
82+ addr = (uintptr_t) area->addr;
83+ if (ioremap_page_range(addr, addr + size, phys_addr, pgprot)) {
84+ vunmap(area->addr);
8685 return NULL;
8786 }
8887
arch/powerpc/configs/44x/sam440ep_defconfig+1−1
@@ -79,7 +79,7 @@ CONFIG_EXT2_FS_POSIX_ACL=y · 78 unmodified lines
7979 CONFIG_EXT4_FS=y
8080 CONFIG_EXT4_FS_POSIX_ACL=y
8181 CONFIG_REISERFS_FS=y
82−CONFIG_AUTOFS4_FS=y
82+CONFIG_AUTOFS_FS=y
8383 CONFIG_ISO9660_FS=y
8484 CONFIG_JOLIET=y
8585 CONFIG_ZISOFS=y
arch/powerpc/configs/85xx/stx_gp3_defconfig+1−1
@@ -50,7 +50,7 @@ CONFIG_DRM=m · 49 unmodified lines
5050 CONFIG_SOUND=m
5151 CONFIG_EXT2_FS=y
5252 CONFIG_EXT4_FS=y
53−CONFIG_AUTOFS4_FS=y
53+CONFIG_AUTOFS_FS=y
5454 CONFIG_ISO9660_FS=m
5555 CONFIG_UDF_FS=m
5656 CONFIG_MSDOS_FS=m
arch/powerpc/configs/cell_defconfig+1−1
@@ -172,7 +172,7 @@ CONFIG_EDAC_CELL=y · 171 unmodified lines
172172 CONFIG_UIO=m
173173 CONFIG_EXT2_FS=y
174174 CONFIG_EXT4_FS=y
175−CONFIG_AUTOFS4_FS=m
175+CONFIG_AUTOFS_FS=m
176176 CONFIG_ISO9660_FS=m
177177 CONFIG_JOLIET=y
178178 CONFIG_UDF_FS=m
arch/powerpc/configs/ep8248e_defconfig+1−1
@@ -47,7 +47,7 @@ CONFIG_SERIAL_CPM_CONSOLE=y · 46 unmodified lines
4747 # CONFIG_USB_SUPPORT is not set
4848 CONFIG_EXT2_FS=y
4949 CONFIG_EXT4_FS=y
50−CONFIG_AUTOFS4_FS=y
50+CONFIG_AUTOFS_FS=y
5151 CONFIG_PROC_KCORE=y
5252 CONFIG_TMPFS=y
5353 CONFIG_CRAMFS=y
arch/powerpc/configs/mgcoge_defconfig+1−1
@@ -60,7 +60,7 @@ CONFIG_USB_FSL_USB2=y · 59 unmodified lines
6060 CONFIG_USB_G_SERIAL=y
6161 CONFIG_UIO=y
6262 CONFIG_EXT2_FS=y
63−CONFIG_AUTOFS4_FS=y
63+CONFIG_AUTOFS_FS=y
6464 CONFIG_PROC_KCORE=y
6565 CONFIG_TMPFS=y
6666 CONFIG_JFFS2_FS=y
arch/powerpc/configs/pasemi_defconfig+1−1
@@ -143,7 +143,7 @@ CONFIG_EXT2_FS=y · 142 unmodified lines
143143 CONFIG_EXT2_FS_XATTR=y
144144 CONFIG_EXT2_FS_POSIX_ACL=y
145145 CONFIG_EXT4_FS=y
146−CONFIG_AUTOFS4_FS=y
146+CONFIG_AUTOFS_FS=y
147147 CONFIG_ISO9660_FS=y
148148 CONFIG_UDF_FS=y
149149 CONFIG_MSDOS_FS=y
arch/powerpc/configs/pmac32_defconfig+1−1
@@ -254,7 +254,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y · 253 unmodified lines
254254 CONFIG_EXT2_FS=y
255255 CONFIG_EXT4_FS=y
256256 CONFIG_EXT4_FS_POSIX_ACL=y
257−CONFIG_AUTOFS4_FS=m
257+CONFIG_AUTOFS_FS=m
258258 CONFIG_FUSE_FS=m
259259 CONFIG_ISO9660_FS=y
260260 CONFIG_JOLIET=y
arch/powerpc/configs/powernv_defconfig+1−1
@@ -270,7 +270,7 @@ CONFIG_BTRFS_FS=m · 269 unmodified lines
270270 CONFIG_BTRFS_FS_POSIX_ACL=y
271271 CONFIG_NILFS2_FS=m
272272 CONFIG_FANOTIFY=y
273−CONFIG_AUTOFS4_FS=m
273+CONFIG_AUTOFS_FS=m
274274 CONFIG_FUSE_FS=m
275275 CONFIG_OVERLAY_FS=m
276276 CONFIG_ISO9660_FS=y
arch/powerpc/configs/ppc64_defconfig+1−1
@@ -327,7 +327,7 @@ CONFIG_BTRFS_FS=m · 326 unmodified lines
327327 CONFIG_BTRFS_FS_POSIX_ACL=y
328328 CONFIG_NILFS2_FS=m
329329 CONFIG_FS_DAX=y
330−CONFIG_AUTOFS4_FS=m
330+CONFIG_AUTOFS_FS=m
331331 CONFIG_FUSE_FS=m
332332 CONFIG_OVERLAY_FS=m
333333 CONFIG_ISO9660_FS=y
arch/powerpc/configs/ppc64e_defconfig+1−1
@@ -185,7 +185,7 @@ CONFIG_JFS_SECURITY=y · 184 unmodified lines
185185 CONFIG_XFS_FS=m
186186 CONFIG_XFS_POSIX_ACL=y
187187 CONFIG_FS_DAX=y
188−CONFIG_AUTOFS4_FS=m
188+CONFIG_AUTOFS_FS=m
189189 CONFIG_ISO9660_FS=y
190190 CONFIG_UDF_FS=m
191191 CONFIG_MSDOS_FS=y
arch/powerpc/configs/ppc6xx_defconfig+1−1
@@ -969,7 +969,7 @@ CONFIG_XFS_POSIX_ACL=y · 968 unmodified lines
969969 CONFIG_GFS2_FS=m
970970 CONFIG_FS_DAX=y
971971 CONFIG_QUOTA_NETLINK_INTERFACE=y
972−CONFIG_AUTOFS4_FS=m
972+CONFIG_AUTOFS_FS=m
973973 CONFIG_FUSE_FS=m
974974 CONFIG_ISO9660_FS=y
975975 CONFIG_JOLIET=y
arch/powerpc/configs/ps3_defconfig+1−1
@@ -129,7 +129,7 @@ CONFIG_EXT2_FS=m · 128 unmodified lines
129129 CONFIG_EXT4_FS=y
130130 CONFIG_QUOTA=y
131131 CONFIG_QFMT_V2=y
132−CONFIG_AUTOFS4_FS=m
132+CONFIG_AUTOFS_FS=m
133133 CONFIG_ISO9660_FS=m
134134 CONFIG_JOLIET=y
135135 CONFIG_UDF_FS=m
arch/powerpc/include/asm/processor.h+0−3
@@ -393,7 +393,6 @@ int validate_sp_size(unsigned long sp, struct task_struct *p, · 392 unmodified lines
393393 */
394394 #define ARCH_HAS_PREFETCH
395395 #define ARCH_HAS_PREFETCHW
396−#define ARCH_HAS_SPINLOCK_PREFETCH
397396
398397 static inline void prefetch(const void *x)
399398 {
@@ -411,8 +410,6 @@ static inline void prefetchw(const void *x) · 11 unmodified lines
411410 __asm__ __volatile__ ("dcbtst 0,%0" : : "r" (x));
412411 }
413412
414−#define spin_lock_prefetch(x) prefetchw(x)
415−
416413 /* asm stubs */
417414 extern unsigned long isa300_idle_stop_noloss(unsigned long psscr_val);
418415 extern unsigned long isa300_idle_stop_mayloss(unsigned long psscr_val);
arch/powerpc/include/asm/word-at-a-time.h+1−1
@@ -34,7 +34,7 @@ static inline long find_zero(unsigned long mask) · 33 unmodified lines
3434 return leading_zero_bits >> 3;
3535 }
3636
37−static inline bool has_zero(unsigned long val, unsigned long *data, const struct word_at_a_time *c)
37+static inline unsigned long has_zero(unsigned long val, unsigned long *data, const struct word_at_a_time *c)
3838 {
3939 unsigned long rhs = val | c->low_bits;
4040 *data = rhs;
arch/powerpc/kernel/head_64.S+1−2
@@ -375,8 +375,7 @@ _GLOBAL(generic_secondary_smp_init) · 374 unmodified lines
375375 beq 20f
376376
377377 /* start the specified thread */
378− LOAD_REG_ADDR(r5, fsl_secondary_thread_init)
379− ld r4, 0(r5)
378+ LOAD_REG_ADDR(r5, DOTSYM(fsl_secondary_thread_init))
380379 bl book3e_start_thread
381380
382381 /* stop the current thread */
arch/powerpc/kernel/trace/ftrace_mprofile.S+7−2
@@ -33,6 +33,9 @@ · 32 unmodified lines
3333 * and then arrange for the ftrace function to be called.
3434 */
3535 .macro ftrace_regs_entry allregs
36+ /* Create a minimal stack frame for representing B */
37+ PPC_STLU r1, -STACK_FRAME_MIN_SIZE(r1)
38+
3639 /* Create our stack frame + pt_regs */
3740 PPC_STLU r1,-SWITCH_FRAME_SIZE(r1)
3841
@@ -42,7 +45,7 @@ · 3 unmodified lines
4245
4346 #ifdef CONFIG_PPC64
4447 /* Save the original return address in A's stack frame */
45− std r0, LRSAVE+SWITCH_FRAME_SIZE(r1)
48+ std r0, LRSAVE+SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE(r1)
4649 /* Ok to continue? */
4750 lbz r3, PACA_FTRACE_ENABLED(r13)
4851 cmpdi r3, 0
@@ -77,6 +80,8 @@ · 28 unmodified lines
7780 mflr r7
7881 /* Save it as pt_regs->nip */
7982 PPC_STL r7, _NIP(r1)
83+ /* Also save it in B's stackframe header for proper unwind */
84+ PPC_STL r7, LRSAVE+SWITCH_FRAME_SIZE(r1)
8085 /* Save the read LR in pt_regs->link */
8186 PPC_STL r0, _LINK(r1)
8287
@@ -142,7 +147,7 @@ · 59 unmodified lines
142147 #endif
143148
144149 /* Pop our stack frame */
145− addi r1, r1, SWITCH_FRAME_SIZE
150+ addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
146151
147152 #ifdef CONFIG_LIVEPATCH_64
148153 /* Based on the cmpd above, if the NIP was altered handle livepatch */
arch/powerpc/mm/init_64.c+1−2
@@ -314,8 +314,7 @@ void __ref vmemmap_free(unsigned long start, unsigned long end, · 313 unmodified lines
314314 start = ALIGN_DOWN(start, page_size);
315315 if (altmap) {
316316 alt_start = altmap->base_pfn;
317− alt_end = altmap->base_pfn + altmap->reserve +
318− altmap->free + altmap->alloc + altmap->align;
317+ alt_end = altmap->base_pfn + altmap->reserve + altmap->free;
319318 }
320319
321320 pr_debug("vmemmap_free %lx...%lx\n", start, end);
arch/powerpc/platforms/85xx/smp.c+1−1
@@ -180,7 +180,7 @@ static void wake_hw_thread(void *info) · 179 unmodified lines
180180 unsigned long inia;
181181 int cpu = *(const int *)info;
182182
183− inia = *(unsigned long *)fsl_secondary_thread_init;
183+ inia = ppc_function_entry(fsl_secondary_thread_init);
184184 book3e_start_thread(cpu_thread_in_core(cpu), inia);
185185 }
186186 #endif
arch/powerpc/platforms/powermac/time.c+3−3
@@ -26,8 +26,8 @@ · 25 unmodified lines
2626 #include <linux/rtc.h>
2727 #include <linux/of_address.h>
2828
29+#include <asm/early_ioremap.h>
2930 #include <asm/sections.h>
30−#include <asm/io.h>
3131 #include <asm/machdep.h>
3232 #include <asm/time.h>
3333 #include <asm/nvram.h>
@@ -182,7 +182,7 @@ static int __init via_calibrate_decr(void) · 148 unmodified lines
182182 return 0;
183183 }
184184 of_node_put(vias);
185− via = ioremap(rsrc.start, resource_size(&rsrc));
185+ via = early_ioremap(rsrc.start, resource_size(&rsrc));
186186 if (via == NULL) {
187187 printk(KERN_ERR "Failed to map VIA for timer calibration !\n");
188188 return 0;
@@ -207,7 +207,7 @@ static int __init via_calibrate_decr(void) · 18 unmodified lines
207207
208208 ppc_tb_freq = (dstart - dend) * 100 / 6;
209209
210− iounmap(via);
210+ early_iounmap((void *)via, resource_size(&rsrc));
211211
212212 return 1;
213213 }
arch/riscv/configs/defconfig+1−1
@@ -192,7 +192,7 @@ CONFIG_EXT4_FS_POSIX_ACL=y · 191 unmodified lines
192192 CONFIG_EXT4_FS_SECURITY=y
193193 CONFIG_BTRFS_FS=m
194194 CONFIG_BTRFS_FS_POSIX_ACL=y
195−CONFIG_AUTOFS4_FS=y
195+CONFIG_AUTOFS_FS=y
196196 CONFIG_OVERLAY_FS=m
197197 CONFIG_ISO9660_FS=y
198198 CONFIG_JOLIET=y
arch/riscv/configs/rv32_defconfig+1−1
@@ -98,7 +98,7 @@ CONFIG_RPMSG_CTRL=y · 97 unmodified lines
9898 CONFIG_RPMSG_VIRTIO=y
9999 CONFIG_EXT4_FS=y
100100 CONFIG_EXT4_FS_POSIX_ACL=y
101−CONFIG_AUTOFS4_FS=y
101+CONFIG_AUTOFS_FS=y
102102 CONFIG_MSDOS_FS=y
103103 CONFIG_VFAT_FS=y
104104 CONFIG_TMPFS=y
arch/riscv/include/asm/acpi.h+1−1
@@ -19,7 +19,7 @@ typedef u64 phys_cpuid_t; · 18 unmodified lines
1919 #define PHYS_CPUID_INVALID INVALID_HARTID
2020
2121 /* ACPI table mapping after acpi_permanent_mmap is set */
22−void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
22+void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
2323 #define acpi_os_ioremap acpi_os_ioremap
2424
2525 #define acpi_strict 1 /* No out-of-spec workarounds on RISC-V */
arch/riscv/include/asm/cacheflush.h+4−0
@@ -37,6 +37,10 @@ static inline void flush_dcache_page(struct page *page) · 36 unmodified lines
3737 #define flush_icache_user_page(vma, pg, addr, len) \
3838 flush_icache_mm(vma->vm_mm, 0)
3939
40+#ifdef CONFIG_64BIT
41+#define flush_cache_vmap(start, end) flush_tlb_kernel_range(start, end)
42+#endif
43+
4044 #ifndef CONFIG_SMP
4145
4246 #define flush_icache_all() local_flush_icache_all()
arch/riscv/include/asm/mmio.h+8−8
@@ -101,9 +101,9 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) · 100 unmodified lines
101101 * Relaxed I/O memory access primitives. These follow the Device memory
102102 * ordering rules but do not guarantee any ordering relative to Normal memory
103103 * accesses. These are defined to order the indicated access (either a read or
104− * write) with all other I/O memory accesses. Since the platform specification
105− * defines that all I/O regions are strongly ordered on channel 2, no explicit
106− * fences are required to enforce this ordering.
104+ * write) with all other I/O memory accesses to the same peripheral. Since the
105+ * platform specification defines that all I/O regions are strongly ordered on
106+ * channel 0, no explicit fences are required to enforce this ordering.
107107 */
108108 /* FIXME: These are now the same as asm-generic */
109109 #define __io_rbr() do {} while (0)
@@ -125,14 +125,14 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) · 15 unmodified lines
125125 #endif
126126
127127 /*
128− * I/O memory access primitives. Reads are ordered relative to any
129− * following Normal memory access. Writes are ordered relative to any prior
130− * Normal memory access. The memory barriers here are necessary as RISC-V
128+ * I/O memory access primitives. Reads are ordered relative to any following
129+ * Normal memory read and delay() loop. Writes are ordered relative to any
130+ * prior Normal memory write. The memory barriers here are necessary as RISC-V
131131 * doesn't define any ordering between the memory space and the I/O space.
132132 */
133133 #define __io_br() do {} while (0)
134−#define __io_ar(v) __asm__ __volatile__ ("fence i,r" : : : "memory")
135−#define __io_bw() __asm__ __volatile__ ("fence w,o" : : : "memory")
134+#define __io_ar(v) ({ __asm__ __volatile__ ("fence i,ir" : : : "memory"); })
135+#define __io_bw() ({ __asm__ __volatile__ ("fence w,o" : : : "memory"); })
136136 #define __io_aw() mmiowb_set_pending()
137137
138138 #define readb(c) ({ u8 __v; __io_br(); __v = readb_cpu(c); __io_ar(__v); __v; })
arch/riscv/include/asm/pgtable.h+2−0
@@ -188,6 +188,8 @@ extern struct pt_alloc_ops pt_ops __initdata; · 187 unmodified lines
188188 #define PAGE_KERNEL_IO __pgprot(_PAGE_IOREMAP)
189189
190190 extern pgd_t swapper_pg_dir[];
191+extern pgd_t trampoline_pg_dir[];
192+extern pgd_t early_pg_dir[];
191193
192194 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
193195 static inline int pmd_present(pmd_t pmd)
arch/riscv/include/asm/vmalloc.h+3−1
@@ -3,12 +3,14 @@ · 2 unmodified lines
33
44 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
55
6+extern bool pgtable_l4_enabled, pgtable_l5_enabled;
7+
68 #define IOREMAP_MAX_ORDER (PUD_SHIFT)
79
810 #define arch_vmap_pud_supported arch_vmap_pud_supported
911 static inline bool arch_vmap_pud_supported(pgprot_t prot)
1012 {
11− return true;
13+ return pgtable_l4_enabled || pgtable_l5_enabled;
1214 }
1315
1416 #define arch_vmap_pmd_supported arch_vmap_pmd_supported
arch/riscv/kernel/acpi.c+2−2
@@ -215,9 +215,9 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size) · 214 unmodified lines
215215 early_iounmap(map, size);
216216 }
217217
218−void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
218+void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
219219 {
220− return memremap(phys, size, MEMREMAP_WB);
220+ return (void __iomem *)memremap(phys, size, MEMREMAP_WB);
221221 }
222222
223223 #ifdef CONFIG_PCI
arch/riscv/kernel/cpu.c+5−0
@@ -17,6 +17,11 @@ · 16 unmodified lines
1717 #include <asm/smp.h>
1818 #include <asm/pgtable.h>
1919
20+bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
21+{
22+ return phys_id == cpuid_to_hartid_map(cpu);
23+}
24+
2025 /*
2126 * Returns the hart ID of the given device tree node, or -ENODEV if the node
2227 * isn't an enabled and valid RISC-V hart node.
arch/riscv/kernel/crash_core.c+2−0
@@ -18,4 +18,6 @@ void arch_crash_save_vmcoreinfo(void) · 17 unmodified lines
1818 vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
1919 #endif
2020 vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
21+ vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
22+ kernel_map.va_kernel_pa_offset);
2123 }
arch/riscv/kernel/elf_kexec.c+2−1
@@ -281,7 +281,7 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf, · 280 unmodified lines
281281 kbuf.buffer = initrd;
282282 kbuf.bufsz = kbuf.memsz = initrd_len;
283283 kbuf.buf_align = PAGE_SIZE;
284− kbuf.top_down = false;
284+ kbuf.top_down = true;
285285 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
286286 ret = kexec_add_buffer(&kbuf);
287287 if (ret)
@@ -425,6 +425,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi, · 137 unmodified lines
425425 * sym, instead of searching the whole relsec.
426426 */
427427 case R_RISCV_PCREL_HI20:
428+ case R_RISCV_CALL_PLT:
428429 case R_RISCV_CALL:
429430 *(u64 *)loc = CLEAN_IMM(UITYPE, *(u64 *)loc) |
430431 ENCODE_UJTYPE_IMM(val - addr);
arch/riscv/kernel/smp.c+0−5
@@ -61,11 +61,6 @@ int riscv_hartid_to_cpuid(unsigned long hartid) · 60 unmodified lines
6161 return -ENOENT;
6262 }
6363
64−bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
65−{
66− return phys_id == cpuid_to_hartid_map(cpu);
67−}
68−
6964 static void ipi_stop(void)
7065 {
7166 set_cpu_online(smp_processor_id(), false);
arch/riscv/mm/init.c+11−5
@@ -26,12 +26,13 @@ · 25 unmodified lines
2626 #include <linux/kfence.h>
2727
2828 #include <asm/fixmap.h>
29−#include <asm/tlbflush.h>
30−#include <asm/sections.h>
31−#include <asm/soc.h>
3229 #include <asm/io.h>
33−#include <asm/ptdump.h>
3430 #include <asm/numa.h>
31+#include <asm/pgtable.h>
32+#include <asm/ptdump.h>
33+#include <asm/sections.h>
34+#include <asm/soc.h>
35+#include <asm/tlbflush.h>
3536
3637 #include "../kernel/head.h"
3738
@@ -214,8 +215,13 @@ static void __init setup_bootmem(void) · 176 unmodified lines
214215 memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
215216
216217 phys_ram_end = memblock_end_of_DRAM();
218+
219+ /*
220+ * Make sure we align the start of the memory on a PMD boundary so that
221+ * at worst, we map the linear mapping with PMD mappings.
222+ */
217223 if (!IS_ENABLED(CONFIG_XIP_KERNEL))
218− phys_ram_base = memblock_start_of_DRAM();
224+ phys_ram_base = memblock_start_of_DRAM() & PMD_MASK;
219225
220226 /*
221227 * In 64-bit, any use of __va/__pa before this point is wrong as we
arch/riscv/mm/kasan_init.c+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222 * region is not and then we have to go down to the PUD level.
2323 */
2424
25−extern pgd_t early_pg_dir[PTRS_PER_PGD];
2625 pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
2726 p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss;
2827 pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss;
arch/s390/configs/debug_defconfig+7−6
@@ -116,7 +116,6 @@ CONFIG_UNIX=y · 115 unmodified lines
116116 CONFIG_UNIX_DIAG=m
117117 CONFIG_XFRM_USER=m
118118 CONFIG_NET_KEY=m
119−CONFIG_NET_TC_SKB_EXT=y
120119 CONFIG_SMC=m
121120 CONFIG_SMC_DIAG=m
122121 CONFIG_INET=y
@@ -193,6 +192,7 @@ CONFIG_NFT_REJECT=m · 70 unmodified lines
193192 CONFIG_NFT_COMPAT=m
194193 CONFIG_NFT_HASH=m
195194 CONFIG_NFT_FIB_INET=m
195+CONFIG_NETFILTER_XTABLES_COMPAT=y
196196 CONFIG_NETFILTER_XT_SET=m
197197 CONFIG_NETFILTER_XT_TARGET_AUDIT=m
198198 CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
@@ -379,6 +379,7 @@ CONFIG_NET_ACT_SIMP=m · 180 unmodified lines
379379 CONFIG_NET_ACT_SKBEDIT=m
380380 CONFIG_NET_ACT_CSUM=m
381381 CONFIG_NET_ACT_GATE=m
382+CONFIG_NET_TC_SKB_EXT=y
382383 CONFIG_DNS_RESOLVER=y
383384 CONFIG_OPENVSWITCH=m
384385 CONFIG_VSOCKETS=m
@@ -395,6 +396,7 @@ CONFIG_HOTPLUG_PCI=y · 10 unmodified lines
395396 CONFIG_HOTPLUG_PCI_S390=y
396397 CONFIG_DEVTMPFS=y
397398 CONFIG_DEVTMPFS_SAFE=y
399+# CONFIG_FW_LOADER is not set
398400 CONFIG_CONNECTOR=y
399401 CONFIG_ZRAM=y
400402 CONFIG_BLK_DEV_LOOP=m
@@ -502,7 +504,6 @@ CONFIG_NLMON=m · 101 unmodified lines
502504 # CONFIG_NET_VENDOR_GOOGLE is not set
503505 # CONFIG_NET_VENDOR_HUAWEI is not set
504506 # CONFIG_NET_VENDOR_INTEL is not set
505−# CONFIG_NET_VENDOR_WANGXUN is not set
506507 # CONFIG_NET_VENDOR_LITEX is not set
507508 # CONFIG_NET_VENDOR_MARVELL is not set
508509 CONFIG_MLX4_EN=m
@@ -542,6 +543,7 @@ CONFIG_MLX5_CORE_EN=y · 33 unmodified lines
542543 # CONFIG_NET_VENDOR_TI is not set
543544 # CONFIG_NET_VENDOR_VERTEXCOM is not set
544545 # CONFIG_NET_VENDOR_VIA is not set
546+# CONFIG_NET_VENDOR_WANGXUN is not set
545547 # CONFIG_NET_VENDOR_WIZNET is not set
546548 # CONFIG_NET_VENDOR_XILINX is not set
547549 CONFIG_PPP=m
@@ -624,7 +626,7 @@ CONFIG_QUOTA_NETLINK_INTERFACE=y · 76 unmodified lines
624626 CONFIG_QUOTA_DEBUG=y
625627 CONFIG_QFMT_V1=m
626628 CONFIG_QFMT_V2=m
627−CONFIG_AUTOFS4_FS=m
629+CONFIG_AUTOFS_FS=m
628630 CONFIG_FUSE_FS=y
629631 CONFIG_CUSE=m
630632 CONFIG_VIRTIO_FS=m
@@ -646,7 +648,6 @@ CONFIG_TMPFS=y · 15 unmodified lines
646648 CONFIG_TMPFS_POSIX_ACL=y
647649 CONFIG_TMPFS_INODE64=y
648650 CONFIG_HUGETLBFS=y
649−CONFIG_CONFIGFS_FS=m
650651 CONFIG_ECRYPT_FS=m
651652 CONFIG_CRAMFS=m
652653 CONFIG_SQUASHFS=m
@@ -690,7 +691,6 @@ CONFIG_HARDENED_USERCOPY=y · 37 unmodified lines
690691 CONFIG_FORTIFY_SOURCE=y
691692 CONFIG_SECURITY_SELINUX=y
692693 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
693−CONFIG_SECURITY_SELINUX_DISABLE=y
694694 CONFIG_SECURITY_LOCKDOWN_LSM=y
695695 CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
696696 CONFIG_SECURITY_LANDLOCK=y
@@ -744,7 +744,6 @@ CONFIG_CRYPTO_MD4=m · 47 unmodified lines
744744 CONFIG_CRYPTO_MD5=y
745745 CONFIG_CRYPTO_MICHAEL_MIC=m
746746 CONFIG_CRYPTO_RMD160=m
747−CONFIG_CRYPTO_SHA3=m
748747 CONFIG_CRYPTO_SM3_GENERIC=m
749748 CONFIG_CRYPTO_VMAC=m
750749 CONFIG_CRYPTO_WP512=m
@@ -844,6 +843,7 @@ CONFIG_PREEMPT_TRACER=y · 93 unmodified lines
844843 CONFIG_SCHED_TRACER=y
845844 CONFIG_FTRACE_SYSCALLS=y
846845 CONFIG_BLK_DEV_IO_TRACE=y
846+CONFIG_USER_EVENTS=y
847847 CONFIG_HIST_TRIGGERS=y
848848 CONFIG_FTRACE_STARTUP_TEST=y
849849 # CONFIG_EVENT_TRACE_STARTUP_TEST is not set
@@ -866,6 +866,7 @@ CONFIG_FAIL_MAKE_REQUEST=y · 16 unmodified lines
866866 CONFIG_FAIL_IO_TIMEOUT=y
867867 CONFIG_FAIL_FUTEX=y
868868 CONFIG_FAULT_INJECTION_DEBUG_FS=y
869+CONFIG_FAULT_INJECTION_CONFIGFS=y
869870 CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
870871 CONFIG_LKDTM=m
871872 CONFIG_TEST_MIN_HEAP=y
arch/s390/configs/defconfig+6−5
@@ -107,7 +107,6 @@ CONFIG_UNIX=y · 106 unmodified lines
107107 CONFIG_UNIX_DIAG=m
108108 CONFIG_XFRM_USER=m
109109 CONFIG_NET_KEY=m
110−CONFIG_NET_TC_SKB_EXT=y
111110 CONFIG_SMC=m
112111 CONFIG_SMC_DIAG=m
113112 CONFIG_INET=y
@@ -184,6 +183,7 @@ CONFIG_NFT_REJECT=m · 70 unmodified lines
184183 CONFIG_NFT_COMPAT=m
185184 CONFIG_NFT_HASH=m
186185 CONFIG_NFT_FIB_INET=m
186+CONFIG_NETFILTER_XTABLES_COMPAT=y
187187 CONFIG_NETFILTER_XT_SET=m
188188 CONFIG_NETFILTER_XT_TARGET_AUDIT=m
189189 CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
@@ -369,6 +369,7 @@ CONFIG_NET_ACT_SIMP=m · 179 unmodified lines
369369 CONFIG_NET_ACT_SKBEDIT=m
370370 CONFIG_NET_ACT_CSUM=m
371371 CONFIG_NET_ACT_GATE=m
372+CONFIG_NET_TC_SKB_EXT=y
372373 CONFIG_DNS_RESOLVER=y
373374 CONFIG_OPENVSWITCH=m
374375 CONFIG_VSOCKETS=m
@@ -385,6 +386,7 @@ CONFIG_HOTPLUG_PCI_S390=y · 10 unmodified lines
385386 CONFIG_UEVENT_HELPER=y
386387 CONFIG_DEVTMPFS=y
387388 CONFIG_DEVTMPFS_SAFE=y
389+# CONFIG_FW_LOADER is not set
388390 CONFIG_CONNECTOR=y
389391 CONFIG_ZRAM=y
390392 CONFIG_BLK_DEV_LOOP=m
@@ -492,7 +494,6 @@ CONFIG_NLMON=m · 101 unmodified lines
492494 # CONFIG_NET_VENDOR_GOOGLE is not set
493495 # CONFIG_NET_VENDOR_HUAWEI is not set
494496 # CONFIG_NET_VENDOR_INTEL is not set
495−# CONFIG_NET_VENDOR_WANGXUN is not set
496497 # CONFIG_NET_VENDOR_LITEX is not set
497498 # CONFIG_NET_VENDOR_MARVELL is not set
498499 CONFIG_MLX4_EN=m
@@ -532,6 +533,7 @@ CONFIG_MLX5_CORE_EN=y · 33 unmodified lines
532533 # CONFIG_NET_VENDOR_TI is not set
533534 # CONFIG_NET_VENDOR_VERTEXCOM is not set
534535 # CONFIG_NET_VENDOR_VIA is not set
536+# CONFIG_NET_VENDOR_WANGXUN is not set
535537 # CONFIG_NET_VENDOR_WIZNET is not set
536538 # CONFIG_NET_VENDOR_XILINX is not set
537539 CONFIG_PPP=m
@@ -609,7 +611,7 @@ CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y · 71 unmodified lines
609611 CONFIG_QUOTA_NETLINK_INTERFACE=y
610612 CONFIG_QFMT_V1=m
611613 CONFIG_QFMT_V2=m
612−CONFIG_AUTOFS4_FS=m
614+CONFIG_AUTOFS_FS=m
613615 CONFIG_FUSE_FS=y
614616 CONFIG_CUSE=m
615617 CONFIG_VIRTIO_FS=m
@@ -673,7 +675,6 @@ CONFIG_SECURITY=y · 57 unmodified lines
673675 CONFIG_SECURITY_NETWORK=y
674676 CONFIG_SECURITY_SELINUX=y
675677 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
676−CONFIG_SECURITY_SELINUX_DISABLE=y
677678 CONFIG_SECURITY_LOCKDOWN_LSM=y
678679 CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
679680 CONFIG_SECURITY_LANDLOCK=y
@@ -729,7 +730,6 @@ CONFIG_CRYPTO_MD4=m · 49 unmodified lines
729730 CONFIG_CRYPTO_MD5=y
730731 CONFIG_CRYPTO_MICHAEL_MIC=m
731732 CONFIG_CRYPTO_RMD160=m
732−CONFIG_CRYPTO_SHA3=m
733733 CONFIG_CRYPTO_SM3_GENERIC=m
734734 CONFIG_CRYPTO_VMAC=m
735735 CONFIG_CRYPTO_WP512=m
@@ -793,6 +793,7 @@ CONFIG_STACK_TRACER=y · 57 unmodified lines
793793 CONFIG_SCHED_TRACER=y
794794 CONFIG_FTRACE_SYSCALLS=y
795795 CONFIG_BLK_DEV_IO_TRACE=y
796+CONFIG_USER_EVENTS=y
796797 CONFIG_HIST_TRIGGERS=y
797798 CONFIG_SAMPLES=y
798799 CONFIG_SAMPLE_TRACE_PRINTK=m
arch/s390/configs/zfcpdump_defconfig+0−1
@@ -53,7 +53,6 @@ CONFIG_ZFCP=y · 52 unmodified lines
5353 # CONFIG_HVC_IUCV is not set
5454 # CONFIG_HW_RANDOM_S390 is not set
5555 # CONFIG_HMC_DRV is not set
56−# CONFIG_S390_UV_UAPI is not set
5756 # CONFIG_S390_TAPE is not set
5857 # CONFIG_VMCP is not set
5958 # CONFIG_MONWRITER is not set
arch/s390/include/uapi/asm/ptrace.h+2−0
@@ -8,6 +8,8 @@ · 7 unmodified lines
88 #ifndef _UAPI_S390_PTRACE_H
99 #define _UAPI_S390_PTRACE_H
1010
11+#include <linux/const.h>
12+
1113 /*
1214 * Offsets in the user_regs_struct. They are used for the ptrace
1315 * system call and in entry.S
arch/s390/kernel/sthyi.c+3−3
@@ -459,9 +459,9 @@ static int sthyi_update_cache(u64 *rc) · 458 unmodified lines
459459 *
460460 * Fills the destination with system information returned by the STHYI
461461 * instruction. The data is generated by emulation or execution of STHYI,
462− * if available. The return value is the condition code that would be
463− * returned, the rc parameter is the return code which is passed in
464− * register R2 + 1.
462+ * if available. The return value is either a negative error value or
463+ * the condition code that would be returned, the rc parameter is the
464+ * return code which is passed in register R2 + 1.
465465 */
466466 int sthyi_fill(void *dst, u64 *rc)
467467 {
arch/s390/kvm/intercept.c+6−3
@@ -389,8 +389,8 @@ static int handle_partial_execution(struct kvm_vcpu *vcpu) · 388 unmodified lines
389389 */
390390 int handle_sthyi(struct kvm_vcpu *vcpu)
391391 {
392− int reg1, reg2, r = 0;
393− u64 code, addr, cc = 0, rc = 0;
392+ int reg1, reg2, cc = 0, r = 0;
393+ u64 code, addr, rc = 0;
394394 struct sthyi_sctns *sctns = NULL;
395395
396396 if (!test_kvm_facility(vcpu->kvm, 74))
@@ -421,7 +421,10 @@ int handle_sthyi(struct kvm_vcpu *vcpu) · 24 unmodified lines
421421 return -ENOMEM;
422422
423423 cc = sthyi_fill(sctns, &rc);
424−
424+ if (cc < 0) {
425+ free_page((unsigned long)sctns);
426+ return cc;
427+ }
425428 out:
426429 if (!cc) {
427430 if (kvm_s390_pv_cpu_is_protected(vcpu)) {
arch/s390/mm/vmem.c+2−0
@@ -763,6 +763,8 @@ void __init vmem_map_init(void) · 762 unmodified lines
763763 if (static_key_enabled(&cpu_has_bear))
764764 set_memory_nx(0, 1);
765765 set_memory_nx(PAGE_SIZE, 1);
766+ if (debug_pagealloc_enabled())
767+ set_memory_4k(0, ident_map_size >> PAGE_SHIFT);
766768
767769 pr_info("Write protected kernel read-only data: %luk\n",
768770 (unsigned long)(__end_rodata - _stext) >> 10);
arch/sh/configs/espt_defconfig+1−1
@@ -61,7 +61,7 @@ CONFIG_USB_STORAGE=y · 60 unmodified lines
6161 CONFIG_EXT2_FS=y
6262 CONFIG_EXT3_FS=y
6363 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
64−CONFIG_AUTOFS4_FS=y
64+CONFIG_AUTOFS_FS=y
6565 CONFIG_PROC_KCORE=y
6666 CONFIG_TMPFS=y
6767 CONFIG_TMPFS_POSIX_ACL=y
arch/sh/configs/sdk7780_defconfig+1−1
@@ -105,7 +105,7 @@ CONFIG_EXT2_FS_POSIX_ACL=y · 104 unmodified lines
105105 CONFIG_EXT3_FS=y
106106 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
107107 CONFIG_EXT3_FS_POSIX_ACL=y
108−CONFIG_AUTOFS4_FS=y
108+CONFIG_AUTOFS_FS=y
109109 CONFIG_ISO9660_FS=y
110110 CONFIG_MSDOS_FS=y
111111 CONFIG_VFAT_FS=y
arch/sh/configs/sdk7786_defconfig+1−1
@@ -168,7 +168,7 @@ CONFIG_EXT3_FS=y · 167 unmodified lines
168168 CONFIG_EXT4_FS=y
169169 CONFIG_XFS_FS=y
170170 CONFIG_BTRFS_FS=y
171−CONFIG_AUTOFS4_FS=m
171+CONFIG_AUTOFS_FS=m
172172 CONFIG_FUSE_FS=y
173173 CONFIG_CUSE=m
174174 CONFIG_FSCACHE=m
arch/sh/configs/sh03_defconfig+1−1
@@ -60,7 +60,7 @@ CONFIG_EXT2_FS_XATTR=y · 59 unmodified lines
6060 CONFIG_EXT3_FS=y
6161 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
6262 CONFIG_EXT3_FS_POSIX_ACL=y
63−CONFIG_AUTOFS4_FS=y
63+CONFIG_AUTOFS_FS=y
6464 CONFIG_ISO9660_FS=m
6565 CONFIG_JOLIET=y
6666 CONFIG_ZISOFS=y
arch/sh/configs/sh7763rdp_defconfig+1−1
@@ -63,7 +63,7 @@ CONFIG_MMC=y · 62 unmodified lines
6363 CONFIG_EXT2_FS=y
6464 CONFIG_EXT3_FS=y
6565 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
66−CONFIG_AUTOFS4_FS=y
66+CONFIG_AUTOFS_FS=y
6767 CONFIG_MSDOS_FS=y
6868 CONFIG_VFAT_FS=y
6969 CONFIG_PROC_KCORE=y
arch/sparc/configs/sparc32_defconfig+1−1
@@ -65,7 +65,7 @@ CONFIG_EXT2_FS=y · 64 unmodified lines
6565 CONFIG_EXT2_FS_XATTR=y
6666 CONFIG_EXT2_FS_POSIX_ACL=y
6767 CONFIG_EXT2_FS_SECURITY=y
68−CONFIG_AUTOFS4_FS=m
68+CONFIG_AUTOFS_FS=m
6969 CONFIG_ISO9660_FS=m
7070 CONFIG_PROC_KCORE=y
7171 CONFIG_ROMFS_FS=m
arch/sparc/include/asm/processor_64.h+0−3
@@ -213,7 +213,6 @@ unsigned long __get_wchan(struct task_struct *task); · 212 unmodified lines
213213 */
214214 #define ARCH_HAS_PREFETCH
215215 #define ARCH_HAS_PREFETCHW
216−#define ARCH_HAS_SPINLOCK_PREFETCH
217216
218217 static inline void prefetch(const void *x)
219218 {
@@ -239,8 +238,6 @@ static inline void prefetchw(const void *x) · 19 unmodified lines
239238 : "r" (x));
240239 }
241240
242−#define spin_lock_prefetch(x) prefetchw(x)
243−
244241 #define HAVE_ARCH_PICK_MMAP_LAYOUT
245242
246243 int do_mathemu(struct pt_regs *regs, struct fpustate *f, bool illegal_insn_trap);
arch/um/configs/i386_defconfig+1−1
@@ -62,7 +62,7 @@ CONFIG_UML_NET_SLIRP=y · 61 unmodified lines
6262 CONFIG_EXT4_FS=y
6363 CONFIG_REISERFS_FS=y
6464 CONFIG_QUOTA=y
65−CONFIG_AUTOFS4_FS=m
65+CONFIG_AUTOFS_FS=m
6666 CONFIG_ISO9660_FS=m
6767 CONFIG_JOLIET=y
6868 CONFIG_PROC_KCORE=y
arch/um/configs/x86_64_defconfig+1−1
@@ -60,7 +60,7 @@ CONFIG_UML_NET_SLIRP=y · 59 unmodified lines
6060 CONFIG_EXT4_FS=y
6161 CONFIG_REISERFS_FS=y
6262 CONFIG_QUOTA=y
63−CONFIG_AUTOFS4_FS=m
63+CONFIG_AUTOFS_FS=m
6464 CONFIG_ISO9660_FS=m
6565 CONFIG_JOLIET=y
6666 CONFIG_PROC_KCORE=y
arch/um/os-Linux/sigio.c+4−3
@@ -3,7 +3,6 @@ · 2 unmodified lines
33 * Copyright (C) 2002 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com)
44 */
55
6−#include <linux/minmax.h>
76 #include <unistd.h>
87 #include <errno.h>
98 #include <fcntl.h>
@@ -51,7 +50,7 @@ static struct pollfds all_sigio_fds; · 41 unmodified lines
5150
5251 static int write_sigio_thread(void *unused)
5352 {
54− struct pollfds *fds;
53+ struct pollfds *fds, tmp;
5554 struct pollfd *p;
5655 int i, n, respond_fd;
5756 char c;
@@ -78,7 +77,9 @@ static int write_sigio_thread(void *unused) · 20 unmodified lines
7877 "write_sigio_thread : "
7978 "read on socket failed, "
8079 "err = %d\n", errno);
81− swap(current_poll, next_poll);
80+ tmp = current_poll;
81+ current_poll = next_poll;
82+ next_poll = tmp;
8283 respond_fd = sigio_private[1];
8384 }
8485 else {
arch/x86/Kconfig+26−0
@@ -2593,6 +2593,13 @@ config CPU_IBRS_ENTRY · 2592 unmodified lines
25932593 This mitigates both spectre_v2 and retbleed at great cost to
25942594 performance.
25952595
2596+config CPU_SRSO
2597+ bool "Mitigate speculative RAS overflow on AMD"
2598+ depends on CPU_SUP_AMD && X86_64 && RETHUNK
2599+ default y
2600+ help
2601+ Enable the SRSO mitigation needed on AMD Zen1-4 machines.
2602+
25962603 config SLS
25972604 bool "Mitigate Straight-Line-Speculation"
25982605 depends on CC_HAS_SLS && X86_64
@@ -2603,6 +2610,25 @@ config SLS · 4 unmodified lines
26032610 against straight line speculation. The kernel image might be slightly
26042611 larger.
26052612
2613+config GDS_FORCE_MITIGATION
2614+ bool "Force GDS Mitigation"
2615+ depends on CPU_SUP_INTEL
2616+ default n
2617+ help
2618+ Gather Data Sampling (GDS) is a hardware vulnerability which allows
2619+ unprivileged speculative access to data which was previously stored in
2620+ vector registers.
2621+
2622+ This option is equivalent to setting gather_data_sampling=force on the
2623+ command line. The microcode mitigation is used if present, otherwise
2624+ AVX is disabled as a mitigation. On affected systems that are missing
2625+ the microcode any userspace code that unconditionally uses AVX will
2626+ break with this option set.
2627+
2628+ Setting this option on systems not vulnerable to GDS has no effect.
2629+
2630+ If in doubt, say N.
2631+
26062632 endif
26072633
26082634 config ARCH_HAS_ADD_PAGES
arch/x86/boot/compressed/idt_64.c+8−1
@@ -63,7 +63,14 @@ void load_stage2_idt(void) · 62 unmodified lines
6363 set_idt_entry(X86_TRAP_PF, boot_page_fault);
6464
6565 #ifdef CONFIG_AMD_MEM_ENCRYPT
66− set_idt_entry(X86_TRAP_VC, boot_stage2_vc);
66+ /*
67+ * Clear the second stage #VC handler in case guest types
68+ * needing #VC have not been detected.
69+ */
70+ if (sev_status & BIT(1))
71+ set_idt_entry(X86_TRAP_VC, boot_stage2_vc);
72+ else
73+ set_idt_entry(X86_TRAP_VC, NULL);
6774 #endif
6875
6976 load_boot_idt(&boot_idt_desc);
arch/x86/boot/compressed/sev.c+35−2
@@ -404,13 +404,46 @@ void sev_enable(struct boot_params *bp) · 403 unmodified lines
404404 if (bp)
405405 bp->cc_blob_address = 0;
406406
407+ /*
408+ * Do an initial SEV capability check before snp_init() which
409+ * loads the CPUID page and the same checks afterwards are done
410+ * without the hypervisor and are trustworthy.
411+ *
412+ * If the HV fakes SEV support, the guest will crash'n'burn
413+ * which is good enough.
414+ */
415+
416+ /* Check for the SME/SEV support leaf */
417+ eax = 0x80000000;
418+ ecx = 0;
419+ native_cpuid(&eax, &ebx, &ecx, &edx);
420+ if (eax < 0x8000001f)
421+ return;
422+
423+ /*
424+ * Check for the SME/SEV feature:
425+ * CPUID Fn8000_001F[EAX]
426+ * - Bit 0 - Secure Memory Encryption support
427+ * - Bit 1 - Secure Encrypted Virtualization support
428+ * CPUID Fn8000_001F[EBX]
429+ * - Bits 5:0 - Pagetable bit position used to indicate encryption
430+ */
431+ eax = 0x8000001f;
432+ ecx = 0;
433+ native_cpuid(&eax, &ebx, &ecx, &edx);
434+ /* Check whether SEV is supported */
435+ if (!(eax & BIT(1)))
436+ return;
437+
407438 /*
408439 * Setup/preliminary detection of SNP. This will be sanity-checked
409440 * against CPUID/MSR values later.
410441 */
411442 snp = snp_init(bp);
412443
413− /* Check for the SME/SEV support leaf */
444+ /* Now repeat the checks with the SNP CPUID table. */
445+
446+ /* Recheck the SME/SEV support leaf */
414447 eax = 0x80000000;
415448 ecx = 0;
416449 native_cpuid(&eax, &ebx, &ecx, &edx);
@@ -418,7 +451,7 @@ void sev_enable(struct boot_params *bp) · 1 unmodified line
418451 return;
419452
420453 /*
421− * Check for the SME/SEV feature:
454+ * Recheck for the SME/SEV feature:
422455 * CPUID Fn8000_001F[EAX]
423456 * - Bit 0 - Secure Memory Encryption support
424457 * - Bit 1 - Secure Encrypted Virtualization support
arch/x86/configs/i386_defconfig+1−1
@@ -245,7 +245,7 @@ CONFIG_QUOTA=y · 244 unmodified lines
245245 CONFIG_QUOTA_NETLINK_INTERFACE=y
246246 # CONFIG_PRINT_QUOTA_WARNING is not set
247247 CONFIG_QFMT_V2=y
248−CONFIG_AUTOFS4_FS=y
248+CONFIG_AUTOFS_FS=y
249249 CONFIG_ISO9660_FS=y
250250 CONFIG_JOLIET=y
251251 CONFIG_ZISOFS=y
arch/x86/configs/x86_64_defconfig+1−1
@@ -242,7 +242,7 @@ CONFIG_QUOTA=y · 241 unmodified lines
242242 CONFIG_QUOTA_NETLINK_INTERFACE=y
243243 # CONFIG_PRINT_QUOTA_WARNING is not set
244244 CONFIG_QFMT_V2=y
245−CONFIG_AUTOFS4_FS=y
245+CONFIG_AUTOFS_FS=y
246246 CONFIG_ISO9660_FS=y
247247 CONFIG_JOLIET=y
248248 CONFIG_ZISOFS=y
arch/x86/entry/entry_64.S+15−1
@@ -285,7 +285,15 @@ SYM_FUNC_END(__switch_to_asm) · 284 unmodified lines
285285 */
286286 .pushsection .text, "ax"
287287 SYM_CODE_START(ret_from_fork_asm)
288− UNWIND_HINT_REGS
288+ /*
289+ * This is the start of the kernel stack; even through there's a
290+ * register set at the top, the regset isn't necessarily coherent
291+ * (consider kthreads) and one cannot unwind further.
292+ *
293+ * This ensures stack unwinds of kernel threads terminate in a known
294+ * good state.
295+ */
296+ UNWIND_HINT_END_OF_STACK
289297 ANNOTATE_NOENDBR // copy_thread
290298 CALL_DEPTH_ACCOUNT
291299
@@ -295,6 +303,12 @@ SYM_CODE_START(ret_from_fork_asm) · 3 unmodified lines
295303 movq %r12, %rcx /* fn_arg */
296304 call ret_from_fork
297305
306+ /*
307+ * Set the stack state to what is expected for the target function
308+ * -- at this point the register set should be a valid user set
309+ * and unwind should work normally.
310+ */
311+ UNWIND_HINT_REGS
298312 jmp swapgs_restore_regs_and_return_to_usermode
299313 SYM_CODE_END(ret_from_fork_asm)
300314 .popsection
arch/x86/entry/vdso/vma.c+2−2
@@ -299,8 +299,8 @@ static unsigned long vdso_addr(unsigned long start, unsigned len) · 298 unmodified lines
299299
300300 /* Round the lowest possible end address up to a PMD boundary. */
301301 end = (start + len + PMD_SIZE - 1) & PMD_MASK;
302− if (end >= TASK_SIZE_MAX)
303− end = TASK_SIZE_MAX;
302+ if (end >= DEFAULT_MAP_WINDOW)
303+ end = DEFAULT_MAP_WINDOW;
304304 end -= len;
305305
306306 if (end > start) {
arch/x86/hyperv/hv_apic.c+1−3
@@ -107,7 +107,6 @@ static bool cpu_is_self(int cpu) · 106 unmodified lines
107107 static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector,
108108 bool exclude_self)
109109 {
110− struct hv_send_ipi_ex **arg;
111110 struct hv_send_ipi_ex *ipi_arg;
112111 unsigned long flags;
113112 int nr_bank = 0;
@@ -117,9 +116,8 @@ static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector, · 3 unmodified lines
117116 return false;
118117
119118 local_irq_save(flags);
120− arg = (struct hv_send_ipi_ex **)this_cpu_ptr(hyperv_pcpu_input_arg);
119+ ipi_arg = *this_cpu_ptr(hyperv_pcpu_input_arg);
121120
122− ipi_arg = *arg;
123121 if (unlikely(!ipi_arg))
124122 goto ipi_mask_ex_done;
125123
arch/x86/hyperv/hv_init.c+21−0
@@ -14,6 +14,7 @@ · 13 unmodified lines
1414 #include <asm/apic.h>
1515 #include <asm/desc.h>
1616 #include <asm/sev.h>
17+#include <asm/ibt.h>
1718 #include <asm/hypervisor.h>
1819 #include <asm/hyperv-tlfs.h>
1920 #include <asm/mshyperv.h>
@@ -471,6 +472,26 @@ void __init hyperv_init(void) · 451 unmodified lines
471472 wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
472473 }
473474
475+ /*
476+ * Some versions of Hyper-V that provide IBT in guest VMs have a bug
477+ * in that there's no ENDBR64 instruction at the entry to the
478+ * hypercall page. Because hypercalls are invoked via an indirect call
479+ * to the hypercall page, all hypercall attempts fail when IBT is
480+ * enabled, and Linux panics. For such buggy versions, disable IBT.
481+ *
482+ * Fixed versions of Hyper-V always provide ENDBR64 on the hypercall
483+ * page, so if future Linux kernel versions enable IBT for 32-bit
484+ * builds, additional hypercall page hackery will be required here
485+ * to provide an ENDBR32.
486+ */
487+#ifdef CONFIG_X86_KERNEL_IBT
488+ if (cpu_feature_enabled(X86_FEATURE_IBT) &&
489+ *(u32 *)hv_hypercall_pg != gen_endbr()) {
490+ setup_clear_cpu_cap(X86_FEATURE_IBT);
491+ pr_warn("Hyper-V: Disabling IBT because of Hyper-V bug\n");
492+ }
493+#endif
494+
474495 /*
475496 * hyperv_init() is called before LAPIC is initialized: see
476497 * apic_intr_mode_init() -> x86_platform.apic_post_init() and
arch/x86/hyperv/hv_vtl.c+4−0
@@ -25,6 +25,10 @@ void __init hv_vtl_init_platform(void) · 24 unmodified lines
2525 x86_init.irqs.pre_vector_init = x86_init_noop;
2626 x86_init.timers.timer_init = x86_init_noop;
2727
28+ /* Avoid searching for BIOS MP tables */
29+ x86_init.mpparse.find_smp_config = x86_init_noop;
30+ x86_init.mpparse.get_smp_config = x86_init_uint_noop;
31+
2832 x86_platform.get_wallclock = get_rtc_noop;
2933 x86_platform.set_wallclock = set_rtc_noop;
3034 x86_platform.get_nmi_reason = hv_get_nmi_reason;
arch/x86/hyperv/ivm.c+3−4
@@ -247,7 +247,7 @@ EXPORT_SYMBOL_GPL(hv_ghcb_msr_read); · 246 unmodified lines
247247 static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
248248 enum hv_mem_host_visibility visibility)
249249 {
250− struct hv_gpa_range_for_visibility **input_pcpu, *input;
250+ struct hv_gpa_range_for_visibility *input;
251251 u16 pages_processed;
252252 u64 hv_status;
253253 unsigned long flags;
@@ -263,9 +263,8 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[], · 9 unmodified lines
263263 }
264264
265265 local_irq_save(flags);
266− input_pcpu = (struct hv_gpa_range_for_visibility **)
267− this_cpu_ptr(hyperv_pcpu_input_arg);
268− input = *input_pcpu;
266+ input = *this_cpu_ptr(hyperv_pcpu_input_arg);
267+
269268 if (unlikely(!input)) {
270269 local_irq_restore(flags);
271270 return -EINVAL;
arch/x86/hyperv/mmu.c+2−10
@@ -61,7 +61,6 @@ static void hyperv_flush_tlb_multi(const struct cpumask *cpus, · 60 unmodified lines
6161 const struct flush_tlb_info *info)
6262 {
6363 int cpu, vcpu, gva_n, max_gvas;
64− struct hv_tlb_flush **flush_pcpu;
6564 struct hv_tlb_flush *flush;
6665 u64 status;
6766 unsigned long flags;
@@ -74,10 +73,7 @@ static void hyperv_flush_tlb_multi(const struct cpumask *cpus, · 6 unmodified lines
7473
7574 local_irq_save(flags);
7675
77− flush_pcpu = (struct hv_tlb_flush **)
78− this_cpu_ptr(hyperv_pcpu_input_arg);
79−
80− flush = *flush_pcpu;
76+ flush = *this_cpu_ptr(hyperv_pcpu_input_arg);
8177
8278 if (unlikely(!flush)) {
8379 local_irq_restore(flags);
@@ -178,17 +174,13 @@ static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, · 94 unmodified lines
178174 const struct flush_tlb_info *info)
179175 {
180176 int nr_bank = 0, max_gvas, gva_n;
181− struct hv_tlb_flush_ex **flush_pcpu;
182177 struct hv_tlb_flush_ex *flush;
183178 u64 status;
184179
185180 if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED))
186181 return HV_STATUS_INVALID_PARAMETER;
187182
188− flush_pcpu = (struct hv_tlb_flush_ex **)
189− this_cpu_ptr(hyperv_pcpu_input_arg);
190−
191− flush = *flush_pcpu;
183+ flush = *this_cpu_ptr(hyperv_pcpu_input_arg);
192184
193185 if (info->mm) {
194186 /*
arch/x86/hyperv/nested.c+2−9
@@ -19,7 +19,6 @@ · 18 unmodified lines
1919
2020 int hyperv_flush_guest_mapping(u64 as)
2121 {
22− struct hv_guest_mapping_flush **flush_pcpu;
2322 struct hv_guest_mapping_flush *flush;
2423 u64 status;
2524 unsigned long flags;
@@ -30,10 +29,7 @@ int hyperv_flush_guest_mapping(u64 as) · 4 unmodified lines
3029
3130 local_irq_save(flags);
3231
33− flush_pcpu = (struct hv_guest_mapping_flush **)
34− this_cpu_ptr(hyperv_pcpu_input_arg);
35−
36− flush = *flush_pcpu;
32+ flush = *this_cpu_ptr(hyperv_pcpu_input_arg);
3733
3834 if (unlikely(!flush)) {
3935 local_irq_restore(flags);
@@ -90,7 +86,6 @@ EXPORT_SYMBOL_GPL(hyperv_fill_flush_guest_mapping_list); · 50 unmodified lines
9086 int hyperv_flush_guest_mapping_range(u64 as,
9187 hyperv_fill_flush_list_func fill_flush_list_func, void *data)
9288 {
93− struct hv_guest_mapping_flush_list **flush_pcpu;
9489 struct hv_guest_mapping_flush_list *flush;
9590 u64 status;
9691 unsigned long flags;
@@ -102,10 +97,8 @@ int hyperv_flush_guest_mapping_range(u64 as, · 5 unmodified lines
10297
10398 local_irq_save(flags);
10499
105− flush_pcpu = (struct hv_guest_mapping_flush_list **)
106− this_cpu_ptr(hyperv_pcpu_input_arg);
100+ flush = *this_cpu_ptr(hyperv_pcpu_input_arg);
107101
108− flush = *flush_pcpu;
109102 if (unlikely(!flush)) {
110103 local_irq_restore(flags);
111104 goto fault;
arch/x86/include/asm/acpi.h+2−0
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <asm/mpspec.h>
1616 #include <asm/x86_init.h>
1717 #include <asm/cpufeature.h>
18+#include <asm/irq_vectors.h>
1819
1920 #ifdef CONFIG_ACPI_APEI
2021 # include <asm/pgtable_types.h>
@@ -31,6 +32,7 @@ extern int acpi_skip_timer_override; · 10 unmodified lines
3132 extern int acpi_use_timer_override;
3233 extern int acpi_fix_pin2_polarity;
3334 extern int acpi_disable_cmcff;
35+extern bool acpi_int_src_ovr[NR_IRQS_LEGACY];
3436
3537 extern u8 acpi_sci_flags;
3638 extern u32 acpi_sci_override_gsi;
arch/x86/include/asm/cpufeatures.h+13−1
@@ -14,7 +14,7 @@ · 13 unmodified lines
1414 * Defines x86 CPU feature bits
1515 */
1616 #define NCAPINTS 21 /* N 32-bit words worth of info */
17−#define NBUGINTS 1 /* N 32-bit bug flags */
17+#define NBUGINTS 2 /* N 32-bit bug flags */
1818
1919 /*
2020 * Note: If the comment begins with a quoted string, that string is used
@@ -309,6 +309,10 @@ · 288 unmodified lines
309309 #define X86_FEATURE_SMBA (11*32+21) /* "" Slow Memory Bandwidth Allocation */
310310 #define X86_FEATURE_BMEC (11*32+22) /* "" Bandwidth Monitoring Event Configuration */
311311
312+#define X86_FEATURE_SRSO (11*32+24) /* "" AMD BTB untrain RETs */
313+#define X86_FEATURE_SRSO_ALIAS (11*32+25) /* "" AMD BTB untrain RETs through aliasing */
314+#define X86_FEATURE_IBPB_ON_VMEXIT (11*32+26) /* "" Issue an IBPB only on VMEXIT */
315+
312316 /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
313317 #define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
314318 #define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */
@@ -442,6 +446,10 @@ · 127 unmodified lines
442446 #define X86_FEATURE_AUTOIBRS (20*32+ 8) /* "" Automatic IBRS */
443447 #define X86_FEATURE_NO_SMM_CTL_MSR (20*32+ 9) /* "" SMM_CTL MSR is not present */
444448
449+#define X86_FEATURE_SBPB (20*32+27) /* "" Selective Branch Prediction Barrier */
450+#define X86_FEATURE_IBPB_BRTYPE (20*32+28) /* "" MSR_PRED_CMD[IBPB] flushes all branch type predictions */
451+#define X86_FEATURE_SRSO_NO (20*32+29) /* "" CPU is not affected by SRSO */
452+
445453 /*
446454 * BUG word(s)
447455 */
@@ -483,5 +491,9 @@ · 35 unmodified lines
483491 #define X86_BUG_RETBLEED X86_BUG(27) /* CPU is affected by RETBleed */
484492 #define X86_BUG_EIBRS_PBRSB X86_BUG(28) /* EIBRS is vulnerable to Post Barrier RSB Predictions */
485493 #define X86_BUG_SMT_RSB X86_BUG(29) /* CPU is vulnerable to Cross-Thread Return Address Predictions */
494+#define X86_BUG_GDS X86_BUG(30) /* CPU is affected by Gather Data Sampling */
486495
496+/* BUG word 2 */
497+#define X86_BUG_SRSO X86_BUG(1*32 + 0) /* AMD SRSO bug */
498+#define X86_BUG_DIV0 X86_BUG(1*32 + 1) /* AMD DIV0 speculation bug */
487499 #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/kvm-x86-ops.h+1−0
@@ -37,6 +37,7 @@ KVM_X86_OP(get_segment) · 36 unmodified lines
3737 KVM_X86_OP(get_cpl)
3838 KVM_X86_OP(set_segment)
3939 KVM_X86_OP(get_cs_db_l_bits)
40+KVM_X86_OP(is_valid_cr0)
4041 KVM_X86_OP(set_cr0)
4142 KVM_X86_OP_OPTIONAL(post_set_cr3)
4243 KVM_X86_OP(is_valid_cr4)
arch/x86/include/asm/kvm_host.h+2−1
@@ -1566,9 +1566,10 @@ struct kvm_x86_ops { · 1565 unmodified lines
15661566 void (*set_segment)(struct kvm_vcpu *vcpu,
15671567 struct kvm_segment *var, int seg);
15681568 void (*get_cs_db_l_bits)(struct kvm_vcpu *vcpu, int *db, int *l);
1569+ bool (*is_valid_cr0)(struct kvm_vcpu *vcpu, unsigned long cr0);
15691570 void (*set_cr0)(struct kvm_vcpu *vcpu, unsigned long cr0);
15701571 void (*post_set_cr3)(struct kvm_vcpu *vcpu, unsigned long cr3);
1571− bool (*is_valid_cr4)(struct kvm_vcpu *vcpu, unsigned long cr0);
1572+ bool (*is_valid_cr4)(struct kvm_vcpu *vcpu, unsigned long cr4);
15721573 void (*set_cr4)(struct kvm_vcpu *vcpu, unsigned long cr4);
15731574 int (*set_efer)(struct kvm_vcpu *vcpu, u64 efer);
15741575 void (*get_idt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt);
arch/x86/include/asm/linkage.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 #define FUNCTION_PADDING
2222 #endif
2323
24−#if (CONFIG_FUNCTION_ALIGNMENT > 8) && !defined(__DISABLE_EXPORTS) && !defined(BULID_VDSO)
24+#if (CONFIG_FUNCTION_ALIGNMENT > 8) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO)
2525 # define __FUNC_ALIGN __ALIGN; FUNCTION_PADDING
2626 #else
2727 # define __FUNC_ALIGN __ALIGN
arch/x86/include/asm/microcode.h+1−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 #include <asm/cpu.h>
66 #include <linux/earlycpio.h>
77 #include <linux/initrd.h>
8+#include <asm/microcode_amd.h>
89
910 struct ucode_patch {
1011 struct list_head plist;
arch/x86/include/asm/microcode_amd.h+2−0
@@ -48,11 +48,13 @@ extern void __init load_ucode_amd_bsp(unsigned int family); · 47 unmodified lines
4848 extern void load_ucode_amd_ap(unsigned int family);
4949 extern int __init save_microcode_in_initrd_amd(unsigned int family);
5050 void reload_ucode_amd(unsigned int cpu);
51+extern void amd_check_microcode(void);
5152 #else
5253 static inline void __init load_ucode_amd_bsp(unsigned int family) {}
5354 static inline void load_ucode_amd_ap(unsigned int family) {}
5455 static inline int __init
5556 save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; }
5657 static inline void reload_ucode_amd(unsigned int cpu) {}
58+static inline void amd_check_microcode(void) {}
5759 #endif
5860 #endif /* _ASM_X86_MICROCODE_AMD_H */
arch/x86/include/asm/mshyperv.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 #include <linux/types.h>
66 #include <linux/nmi.h>
77 #include <linux/msi.h>
8−#include <asm/io.h>
8+#include <linux/io.h>
99 #include <asm/hyperv-tlfs.h>
1010 #include <asm/nospec-branch.h>
1111 #include <asm/paravirt.h>
arch/x86/include/asm/msr-index.h+13−0
@@ -57,6 +57,7 @@ · 56 unmodified lines
5757
5858 #define MSR_IA32_PRED_CMD 0x00000049 /* Prediction Command */
5959 #define PRED_CMD_IBPB BIT(0) /* Indirect Branch Prediction Barrier */
60+#define PRED_CMD_SBPB BIT(7) /* Selective Branch Prediction Barrier */
6061
6162 #define MSR_PPIN_CTL 0x0000004e
6263 #define MSR_PPIN 0x0000004f
@@ -155,6 +156,15 @@ · 92 unmodified lines
155156 * Not susceptible to Post-Barrier
156157 * Return Stack Buffer Predictions.
157158 */
159+#define ARCH_CAP_GDS_CTRL BIT(25) /*
160+ * CPU is vulnerable to Gather
161+ * Data Sampling (GDS) and
162+ * has controls for mitigation.
163+ */
164+#define ARCH_CAP_GDS_NO BIT(26) /*
165+ * CPU is not vulnerable to Gather
166+ * Data Sampling (GDS).
167+ */
158168
159169 #define ARCH_CAP_XAPIC_DISABLE BIT(21) /*
160170 * IA32_XAPIC_DISABLE_STATUS MSR
@@ -178,6 +188,8 @@ · 17 unmodified lines
178188 #define RNGDS_MITG_DIS BIT(0) /* SRBDS support */
179189 #define RTM_ALLOW BIT(1) /* TSX development mode */
180190 #define FB_CLEAR_DIS BIT(3) /* CPU Fill buffer clear disable */
191+#define GDS_MITG_DIS BIT(4) /* Disable GDS mitigation */
192+#define GDS_MITG_LOCKED BIT(5) /* GDS mitigation locked */
181193
182194 #define MSR_IA32_SYSENTER_CS 0x00000174
183195 #define MSR_IA32_SYSENTER_ESP 0x00000175
@@ -545,6 +557,7 @@ · 361 unmodified lines
545557 #define MSR_AMD64_DE_CFG 0xc0011029
546558 #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
547559 #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT)
560+#define MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT 9
548561
549562 #define MSR_AMD64_BU_CFG2 0xc001102a
550563 #define MSR_AMD64_IBSFETCHCTL 0xc0011030
arch/x86/include/asm/nospec-branch.h+18−5
@@ -211,7 +211,8 @@ · 210 unmodified lines
211211 * eventually turn into it's own annotation.
212212 */
213213 .macro VALIDATE_UNRET_END
214−#if defined(CONFIG_NOINSTR_VALIDATION) && defined(CONFIG_CPU_UNRET_ENTRY)
214+#if defined(CONFIG_NOINSTR_VALIDATION) && \
215+ (defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_SRSO))
215216 ANNOTATE_RETPOLINE_SAFE
216217 nop
217218 #endif
@@ -289,13 +290,18 @@ · 71 unmodified lines
289290 */
290291 .macro UNTRAIN_RET
291292 #if defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_IBPB_ENTRY) || \
292− defined(CONFIG_CALL_DEPTH_TRACKING)
293+ defined(CONFIG_CALL_DEPTH_TRACKING) || defined(CONFIG_CPU_SRSO)
293294 VALIDATE_UNRET_END
294295 ALTERNATIVE_3 "", \
295296 CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET, \
296297 "call entry_ibpb", X86_FEATURE_ENTRY_IBPB, \
297298 __stringify(RESET_CALL_DEPTH), X86_FEATURE_CALL_DEPTH
298299 #endif
300+
301+#ifdef CONFIG_CPU_SRSO
302+ ALTERNATIVE_2 "", "call srso_untrain_ret", X86_FEATURE_SRSO, \
303+ "call srso_untrain_ret_alias", X86_FEATURE_SRSO_ALIAS
304+#endif
299305 .endm
300306
301307 .macro UNTRAIN_RET_FROM_CALL
@@ -307,6 +313,11 @@ · 5 unmodified lines
307313 "call entry_ibpb", X86_FEATURE_ENTRY_IBPB, \
308314 __stringify(RESET_CALL_DEPTH_FROM_CALL), X86_FEATURE_CALL_DEPTH
309315 #endif
316+
317+#ifdef CONFIG_CPU_SRSO
318+ ALTERNATIVE_2 "", "call srso_untrain_ret", X86_FEATURE_SRSO, \
319+ "call srso_untrain_ret_alias", X86_FEATURE_SRSO_ALIAS
320+#endif
310321 .endm
311322
312323
@@ -332,6 +343,8 @@ extern retpoline_thunk_t __x86_indirect_jump_thunk_array[]; · 19 unmodified lines
332343
333344 extern void __x86_return_thunk(void);
334345 extern void zen_untrain_ret(void);
346+extern void srso_untrain_ret(void);
347+extern void srso_untrain_ret_alias(void);
335348 extern void entry_ibpb(void);
336349
337350 #ifdef CONFIG_CALL_THUNKS
@@ -479,11 +492,11 @@ void alternative_msr_write(unsigned int msr, u64 val, unsigned int feature) · 141 unmodified lines
479492 : "memory");
480493 }
481494
495+extern u64 x86_pred_cmd;
496+
482497 static inline void indirect_branch_prediction_barrier(void)
483498 {
484− u64 val = PRED_CMD_IBPB;
485−
486− alternative_msr_write(MSR_IA32_PRED_CMD, val, X86_FEATURE_USE_IBPB);
499+ alternative_msr_write(MSR_IA32_PRED_CMD, x86_pred_cmd, X86_FEATURE_USE_IBPB);
487500 }
488501
489502 /* The Intel SPEC CTRL MSR base value cache */
arch/x86/include/asm/processor.h+6−6
@@ -586,7 +586,6 @@ extern char ignore_fpu_irq; · 585 unmodified lines
586586
587587 #define HAVE_ARCH_PICK_MMAP_LAYOUT 1
588588 #define ARCH_HAS_PREFETCHW
589−#define ARCH_HAS_SPINLOCK_PREFETCH
590589
591590 #ifdef CONFIG_X86_32
592591 # define BASE_PREFETCH ""
@@ -620,11 +619,6 @@ static __always_inline void prefetchw(const void *x) · 27 unmodified lines
620619 "m" (*(const char *)x));
621620 }
622621
623−static inline void spin_lock_prefetch(const void *x)
624−{
625− prefetchw(x);
626−}
627−
628622 #define TOP_OF_INIT_STACK ((unsigned long)&init_stack + sizeof(init_stack) - \
629623 TOP_OF_KERNEL_STACK_PADDING)
630624
@@ -682,9 +676,13 @@ extern u16 get_llc_id(unsigned int cpu); · 51 unmodified lines
682676 #ifdef CONFIG_CPU_SUP_AMD
683677 extern u32 amd_get_nodes_per_socket(void);
684678 extern u32 amd_get_highest_perf(void);
679+extern bool cpu_has_ibpb_brtype_microcode(void);
680+extern void amd_clear_divider(void);
685681 #else
686682 static inline u32 amd_get_nodes_per_socket(void) { return 0; }
687683 static inline u32 amd_get_highest_perf(void) { return 0; }
684+static inline bool cpu_has_ibpb_brtype_microcode(void) { return false; }
685+static inline void amd_clear_divider(void) { }
688686 #endif
689687
690688 extern unsigned long arch_align_stack(unsigned long sp);
@@ -727,4 +725,6 @@ bool arch_is_platform_page(u64 paddr); · 36 unmodified lines
727725 #define arch_is_platform_page arch_is_platform_page
728726 #endif
729727
728+extern bool gds_ucode_mitigated(void);
729+
730730 #endif /* _ASM_X86_PROCESSOR_H */
arch/x86/include/asm/segment.h+1−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
5656
5757 #define GDT_ENTRY_INVALID_SEG 0
5858
59−#ifdef CONFIG_X86_32
59+#if defined(CONFIG_X86_32) && !defined(BUILD_VDSO32_64)
6060 /*
6161 * The layout of the per-CPU GDT under Linux:
6262 *
arch/x86/kernel/acpi/boot.c+4−0
@@ -52,6 +52,7 @@ int acpi_lapic; · 51 unmodified lines
5252 int acpi_ioapic;
5353 int acpi_strict;
5454 int acpi_disable_cmcff;
55+bool acpi_int_src_ovr[NR_IRQS_LEGACY];
5556
5657 /* ACPI SCI override configuration */
5758 u8 acpi_sci_flags __initdata;
@@ -588,6 +589,9 @@ acpi_parse_int_src_ovr(union acpi_subtable_headers * header, · 530 unmodified lines
588589
589590 acpi_table_print_madt_entry(&header->common);
590591
592+ if (intsrc->source_irq < NR_IRQS_LEGACY)
593+ acpi_int_src_ovr[intsrc->source_irq] = true;
594+
591595 if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
592596 acpi_sci_ioapic_setup(intsrc->source_irq,
593597 intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
arch/x86/kernel/cpu/amd.c+166−72
@@ -27,11 +27,6 @@ · 26 unmodified lines
2727
2828 #include "cpu.h"
2929
30−static const int amd_erratum_383[];
31−static const int amd_erratum_400[];
32−static const int amd_erratum_1054[];
33−static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum);
34−
3530 /*
3631 * nodes_per_socket: Stores the number of nodes per socket.
3732 * Refer to Fam15h Models 00-0fh BKDG - CPUID Fn8000_001E_ECX
@@ -39,6 +34,83 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum); · 1 unmodified line
3934 */
4035 static u32 nodes_per_socket = 1;
4136
37+/*
38+ * AMD errata checking
39+ *
40+ * Errata are defined as arrays of ints using the AMD_LEGACY_ERRATUM() or
41+ * AMD_OSVW_ERRATUM() macros. The latter is intended for newer errata that
42+ * have an OSVW id assigned, which it takes as first argument. Both take a
43+ * variable number of family-specific model-stepping ranges created by
44+ * AMD_MODEL_RANGE().
45+ *
46+ * Example:
47+ *
48+ * const int amd_erratum_319[] =
49+ * AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2),
50+ * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0),
51+ * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0));
52+ */
53+
54+#define AMD_LEGACY_ERRATUM(...) { -1, __VA_ARGS__, 0 }
55+#define AMD_OSVW_ERRATUM(osvw_id, ...) { osvw_id, __VA_ARGS__, 0 }
56+#define AMD_MODEL_RANGE(f, m_start, s_start, m_end, s_end) \
57+ ((f << 24) | (m_start << 16) | (s_start << 12) | (m_end << 4) | (s_end))
58+#define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff)
59+#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff)
60+#define AMD_MODEL_RANGE_END(range) ((range) & 0xfff)
61+
62+static const int amd_erratum_400[] =
63+ AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf),
64+ AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf));
65+
66+static const int amd_erratum_383[] =
67+ AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf));
68+
69+/* #1054: Instructions Retired Performance Counter May Be Inaccurate */
70+static const int amd_erratum_1054[] =
71+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
72+
73+static const int amd_zenbleed[] =
74+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0x30, 0x0, 0x4f, 0xf),
75+ AMD_MODEL_RANGE(0x17, 0x60, 0x0, 0x7f, 0xf),
76+ AMD_MODEL_RANGE(0x17, 0x90, 0x0, 0x91, 0xf),
77+ AMD_MODEL_RANGE(0x17, 0xa0, 0x0, 0xaf, 0xf));
78+
79+static const int amd_div0[] =
80+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0x00, 0x0, 0x2f, 0xf),
81+ AMD_MODEL_RANGE(0x17, 0x50, 0x0, 0x5f, 0xf));
82+
83+static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum)
84+{
85+ int osvw_id = *erratum++;
86+ u32 range;
87+ u32 ms;
88+
89+ if (osvw_id >= 0 && osvw_id < 65536 &&
90+ cpu_has(cpu, X86_FEATURE_OSVW)) {
91+ u64 osvw_len;
92+
93+ rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, osvw_len);
94+ if (osvw_id < osvw_len) {
95+ u64 osvw_bits;
96+
97+ rdmsrl(MSR_AMD64_OSVW_STATUS + (osvw_id >> 6),
98+ osvw_bits);
99+ return osvw_bits & (1ULL << (osvw_id & 0x3f));
100+ }
101+ }
102+
103+ /* OSVW unavailable or ID unknown, match family-model-stepping range */
104+ ms = (cpu->x86_model << 4) | cpu->x86_stepping;
105+ while ((range = *erratum++))
106+ if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) &&
107+ (ms >= AMD_MODEL_RANGE_START(range)) &&
108+ (ms <= AMD_MODEL_RANGE_END(range)))
109+ return true;
110+
111+ return false;
112+}
113+
42114 static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p)
43115 {
44116 u32 gprs[8] = { 0 };
@@ -916,6 +988,47 @@ static void init_amd_zn(struct cpuinfo_x86 *c) · 871 unmodified lines
916988 }
917989 }
918990
991+static bool cpu_has_zenbleed_microcode(void)
992+{
993+ u32 good_rev = 0;
994+
995+ switch (boot_cpu_data.x86_model) {
996+ case 0x30 ... 0x3f: good_rev = 0x0830107a; break;
997+ case 0x60 ... 0x67: good_rev = 0x0860010b; break;
998+ case 0x68 ... 0x6f: good_rev = 0x08608105; break;
999+ case 0x70 ... 0x7f: good_rev = 0x08701032; break;
1000+ case 0xa0 ... 0xaf: good_rev = 0x08a00008; break;
1001+
1002+ default:
1003+ return false;
1004+ break;
1005+ }
1006+
1007+ if (boot_cpu_data.microcode < good_rev)
1008+ return false;
1009+
1010+ return true;
1011+}
1012+
1013+static void zenbleed_check(struct cpuinfo_x86 *c)
1014+{
1015+ if (!cpu_has_amd_erratum(c, amd_zenbleed))
1016+ return;
1017+
1018+ if (cpu_has(c, X86_FEATURE_HYPERVISOR))
1019+ return;
1020+
1021+ if (!cpu_has(c, X86_FEATURE_AVX))
1022+ return;
1023+
1024+ if (!cpu_has_zenbleed_microcode()) {
1025+ pr_notice_once("Zenbleed: please update your microcode for the most optimal fix\n");
1026+ msr_set_bit(MSR_AMD64_DE_CFG, MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT);
1027+ } else {
1028+ msr_clear_bit(MSR_AMD64_DE_CFG, MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT);
1029+ }
1030+}
1031+
9191032 static void init_amd(struct cpuinfo_x86 *c)
9201033 {
9211034 early_init_amd(c);
@@ -1020,6 +1133,13 @@ static void init_amd(struct cpuinfo_x86 *c) · 98 unmodified lines
10201133 if (spectre_v2_in_eibrs_mode(spectre_v2_enabled) &&
10211134 cpu_has(c, X86_FEATURE_AUTOIBRS))
10221135 WARN_ON_ONCE(msr_set_bit(MSR_EFER, _EFER_AUTOIBRS));
1136+
1137+ zenbleed_check(c);
1138+
1139+ if (cpu_has_amd_erratum(c, amd_div0)) {
1140+ pr_notice_once("AMD Zen1 DIV0 bug detected. Disable SMT for full protection.\n");
1141+ setup_force_cpu_bug(X86_BUG_DIV0);
1142+ }
10231143 }
10241144
10251145 #ifdef CONFIG_X86_32
@@ -1115,73 +1235,6 @@ static const struct cpu_dev amd_cpu_dev = { · 89 unmodified lines
11151235
11161236 cpu_dev_register(amd_cpu_dev);
11171237
1118−/*
1119− * AMD errata checking
1120− *
1121− * Errata are defined as arrays of ints using the AMD_LEGACY_ERRATUM() or
1122− * AMD_OSVW_ERRATUM() macros. The latter is intended for newer errata that
1123− * have an OSVW id assigned, which it takes as first argument. Both take a
1124− * variable number of family-specific model-stepping ranges created by
1125− * AMD_MODEL_RANGE().
1126− *
1127− * Example:
1128− *
1129− * const int amd_erratum_319[] =
1130− * AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2),
1131− * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0),
1132− * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0));
1133− */
1134−
1135−#define AMD_LEGACY_ERRATUM(...) { -1, __VA_ARGS__, 0 }
1136−#define AMD_OSVW_ERRATUM(osvw_id, ...) { osvw_id, __VA_ARGS__, 0 }
1137−#define AMD_MODEL_RANGE(f, m_start, s_start, m_end, s_end) \
1138− ((f << 24) | (m_start << 16) | (s_start << 12) | (m_end << 4) | (s_end))
1139−#define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff)
1140−#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff)
1141−#define AMD_MODEL_RANGE_END(range) ((range) & 0xfff)
1142−
1143−static const int amd_erratum_400[] =
1144− AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf),
1145− AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf));
1146−
1147−static const int amd_erratum_383[] =
1148− AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf));
1149−
1150−/* #1054: Instructions Retired Performance Counter May Be Inaccurate */
1151−static const int amd_erratum_1054[] =
1152− AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
1153−
1154−static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum)
1155−{
1156− int osvw_id = *erratum++;
1157− u32 range;
1158− u32 ms;
1159−
1160− if (osvw_id >= 0 && osvw_id < 65536 &&
1161− cpu_has(cpu, X86_FEATURE_OSVW)) {
1162− u64 osvw_len;
1163−
1164− rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, osvw_len);
1165− if (osvw_id < osvw_len) {
1166− u64 osvw_bits;
1167−
1168− rdmsrl(MSR_AMD64_OSVW_STATUS + (osvw_id >> 6),
1169− osvw_bits);
1170− return osvw_bits & (1ULL << (osvw_id & 0x3f));
1171− }
1172− }
1173−
1174− /* OSVW unavailable or ID unknown, match family-model-stepping range */
1175− ms = (cpu->x86_model << 4) | cpu->x86_stepping;
1176− while ((range = *erratum++))
1177− if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) &&
1178− (ms >= AMD_MODEL_RANGE_START(range)) &&
1179− (ms <= AMD_MODEL_RANGE_END(range)))
1180− return true;
1181−
1182− return false;
1183−}
1184−
11851238 static DEFINE_PER_CPU_READ_MOSTLY(unsigned long[4], amd_dr_addr_mask);
11861239
11871240 static unsigned int amd_msr_dr_addr_masks[] = {
@@ -1235,3 +1288,44 @@ u32 amd_get_highest_perf(void) · 47 unmodified lines
12351288 return 255;
12361289 }
12371290 EXPORT_SYMBOL_GPL(amd_get_highest_perf);
1291+
1292+static void zenbleed_check_cpu(void *unused)
1293+{
1294+ struct cpuinfo_x86 *c = &cpu_data(smp_processor_id());
1295+
1296+ zenbleed_check(c);
1297+}
1298+
1299+void amd_check_microcode(void)
1300+{
1301+ on_each_cpu(zenbleed_check_cpu, NULL, 1);
1302+}
1303+
1304+bool cpu_has_ibpb_brtype_microcode(void)
1305+{
1306+ switch (boot_cpu_data.x86) {
1307+ /* Zen1/2 IBPB flushes branch type predictions too. */
1308+ case 0x17:
1309+ return boot_cpu_has(X86_FEATURE_AMD_IBPB);
1310+ case 0x19:
1311+ /* Poke the MSR bit on Zen3/4 to check its presence. */
1312+ if (!wrmsrl_safe(MSR_IA32_PRED_CMD, PRED_CMD_SBPB)) {
1313+ setup_force_cpu_cap(X86_FEATURE_SBPB);
1314+ return true;
1315+ } else {
1316+ return false;
1317+ }
1318+ default:
1319+ return false;
1320+ }
1321+}
1322+
1323+/*
1324+ * Issue a DIV 0/1 insn to clear any division data from previous DIV
1325+ * operations.
1326+ */
1327+void noinstr amd_clear_divider(void)
1328+{
1329+ asm volatile(ALTERNATIVE("", "div %2\n\t", X86_BUG_DIV0)
1330+ :: "a" (0), "d" (0), "r" (1));
1331+}
arch/x86/kernel/cpu/bugs.c+346−6
@@ -47,6 +47,8 @@ static void __init taa_select_mitigation(void); · 46 unmodified lines
4747 static void __init mmio_select_mitigation(void);
4848 static void __init srbds_select_mitigation(void);
4949 static void __init l1d_flush_select_mitigation(void);
50+static void __init srso_select_mitigation(void);
51+static void __init gds_select_mitigation(void);
5052
5153 /* The base value of the SPEC_CTRL MSR without task-specific bits set */
5254 u64 x86_spec_ctrl_base;
@@ -56,6 +58,9 @@ EXPORT_SYMBOL_GPL(x86_spec_ctrl_base); · 3 unmodified lines
5658 DEFINE_PER_CPU(u64, x86_spec_ctrl_current);
5759 EXPORT_SYMBOL_GPL(x86_spec_ctrl_current);
5860
61+u64 x86_pred_cmd __ro_after_init = PRED_CMD_IBPB;
62+EXPORT_SYMBOL_GPL(x86_pred_cmd);
63+
5964 static DEFINE_MUTEX(spec_ctrl_mutex);
6065
6166 /* Update SPEC_CTRL MSR and its cached copy unconditionally */
@@ -160,6 +165,8 @@ void __init cpu_select_mitigations(void) · 98 unmodified lines
160165 md_clear_select_mitigation();
161166 srbds_select_mitigation();
162167 l1d_flush_select_mitigation();
168+ srso_select_mitigation();
169+ gds_select_mitigation();
163170 }
164171
165172 /*
@@ -645,6 +652,149 @@ static int __init l1d_flush_parse_cmdline(char *str) · 479 unmodified lines
645652 }
646653 early_param("l1d_flush", l1d_flush_parse_cmdline);
647654
655+#undef pr_fmt
656+#define pr_fmt(fmt) "GDS: " fmt
657+
658+enum gds_mitigations {
659+ GDS_MITIGATION_OFF,
660+ GDS_MITIGATION_UCODE_NEEDED,
661+ GDS_MITIGATION_FORCE,
662+ GDS_MITIGATION_FULL,
663+ GDS_MITIGATION_FULL_LOCKED,
664+ GDS_MITIGATION_HYPERVISOR,
665+};
666+
667+#if IS_ENABLED(CONFIG_GDS_FORCE_MITIGATION)
668+static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FORCE;
669+#else
670+static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FULL;
671+#endif
672+
673+static const char * const gds_strings[] = {
674+ [GDS_MITIGATION_OFF] = "Vulnerable",
675+ [GDS_MITIGATION_UCODE_NEEDED] = "Vulnerable: No microcode",
676+ [GDS_MITIGATION_FORCE] = "Mitigation: AVX disabled, no microcode",
677+ [GDS_MITIGATION_FULL] = "Mitigation: Microcode",
678+ [GDS_MITIGATION_FULL_LOCKED] = "Mitigation: Microcode (locked)",
679+ [GDS_MITIGATION_HYPERVISOR] = "Unknown: Dependent on hypervisor status",
680+};
681+
682+bool gds_ucode_mitigated(void)
683+{
684+ return (gds_mitigation == GDS_MITIGATION_FULL ||
685+ gds_mitigation == GDS_MITIGATION_FULL_LOCKED);
686+}
687+EXPORT_SYMBOL_GPL(gds_ucode_mitigated);
688+
689+void update_gds_msr(void)
690+{
691+ u64 mcu_ctrl_after;
692+ u64 mcu_ctrl;
693+
694+ switch (gds_mitigation) {
695+ case GDS_MITIGATION_OFF:
696+ rdmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);
697+ mcu_ctrl |= GDS_MITG_DIS;
698+ break;
699+ case GDS_MITIGATION_FULL_LOCKED:
700+ /*
701+ * The LOCKED state comes from the boot CPU. APs might not have
702+ * the same state. Make sure the mitigation is enabled on all
703+ * CPUs.
704+ */
705+ case GDS_MITIGATION_FULL:
706+ rdmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);
707+ mcu_ctrl &= ~GDS_MITG_DIS;
708+ break;
709+ case GDS_MITIGATION_FORCE:
710+ case GDS_MITIGATION_UCODE_NEEDED:
711+ case GDS_MITIGATION_HYPERVISOR:
712+ return;
713+ };
714+
715+ wrmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);
716+
717+ /*
718+ * Check to make sure that the WRMSR value was not ignored. Writes to
719+ * GDS_MITG_DIS will be ignored if this processor is locked but the boot
720+ * processor was not.
721+ */
722+ rdmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl_after);
723+ WARN_ON_ONCE(mcu_ctrl != mcu_ctrl_after);
724+}
725+
726+static void __init gds_select_mitigation(void)
727+{
728+ u64 mcu_ctrl;
729+
730+ if (!boot_cpu_has_bug(X86_BUG_GDS))
731+ return;
732+
733+ if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
734+ gds_mitigation = GDS_MITIGATION_HYPERVISOR;
735+ goto out;
736+ }
737+
738+ if (cpu_mitigations_off())
739+ gds_mitigation = GDS_MITIGATION_OFF;
740+ /* Will verify below that mitigation _can_ be disabled */
741+
742+ /* No microcode */
743+ if (!(x86_read_arch_cap_msr() & ARCH_CAP_GDS_CTRL)) {
744+ if (gds_mitigation == GDS_MITIGATION_FORCE) {
745+ /*
746+ * This only needs to be done on the boot CPU so do it
747+ * here rather than in update_gds_msr()
748+ */
749+ setup_clear_cpu_cap(X86_FEATURE_AVX);
750+ pr_warn("Microcode update needed! Disabling AVX as mitigation.\n");
751+ } else {
752+ gds_mitigation = GDS_MITIGATION_UCODE_NEEDED;
753+ }
754+ goto out;
755+ }
756+
757+ /* Microcode has mitigation, use it */
758+ if (gds_mitigation == GDS_MITIGATION_FORCE)
759+ gds_mitigation = GDS_MITIGATION_FULL;
760+
761+ rdmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);
762+ if (mcu_ctrl & GDS_MITG_LOCKED) {
763+ if (gds_mitigation == GDS_MITIGATION_OFF)
764+ pr_warn("Mitigation locked. Disable failed.\n");
765+
766+ /*
767+ * The mitigation is selected from the boot CPU. All other CPUs
768+ * _should_ have the same state. If the boot CPU isn't locked
769+ * but others are then update_gds_msr() will WARN() of the state
770+ * mismatch. If the boot CPU is locked update_gds_msr() will
771+ * ensure the other CPUs have the mitigation enabled.
772+ */
773+ gds_mitigation = GDS_MITIGATION_FULL_LOCKED;
774+ }
775+
776+ update_gds_msr();
777+out:
778+ pr_info("%s\n", gds_strings[gds_mitigation]);
779+}
780+
781+static int __init gds_parse_cmdline(char *str)
782+{
783+ if (!str)
784+ return -EINVAL;
785+
786+ if (!boot_cpu_has_bug(X86_BUG_GDS))
787+ return 0;
788+
789+ if (!strcmp(str, "off"))
790+ gds_mitigation = GDS_MITIGATION_OFF;
791+ else if (!strcmp(str, "force"))
792+ gds_mitigation = GDS_MITIGATION_FORCE;
793+
794+ return 0;
795+}
796+early_param("gather_data_sampling", gds_parse_cmdline);
797+
648798 #undef pr_fmt
649799 #define pr_fmt(fmt) "Spectre V1 : " fmt
650800
@@ -1150,19 +1300,21 @@ spectre_v2_user_select_mitigation(void) · 499 unmodified lines
11501300 }
11511301
11521302 /*
1153− * If no STIBP, enhanced IBRS is enabled, or SMT impossible, STIBP
1303+ * If no STIBP, Intel enhanced IBRS is enabled, or SMT impossible, STIBP
11541304 * is not required.
11551305 *
1156− * Enhanced IBRS also protects against cross-thread branch target
1306+ * Intel's Enhanced IBRS also protects against cross-thread branch target
11571307 * injection in user-mode as the IBRS bit remains always set which
11581308 * implicitly enables cross-thread protections. However, in legacy IBRS
11591309 * mode, the IBRS bit is set only on kernel entry and cleared on return
1160− * to userspace. This disables the implicit cross-thread protection,
1161− * so allow for STIBP to be selected in that case.
1310+ * to userspace. AMD Automatic IBRS also does not protect userspace.
1311+ * These modes therefore disable the implicit cross-thread protection,
1312+ * so allow for STIBP to be selected in those cases.
11621313 */
11631314 if (!boot_cpu_has(X86_FEATURE_STIBP) ||
11641315 !smt_possible ||
1165− spectre_v2_in_eibrs_mode(spectre_v2_enabled))
1316+ (spectre_v2_in_eibrs_mode(spectre_v2_enabled) &&
1317+ !boot_cpu_has(X86_FEATURE_AUTOIBRS)))
11661318 return;
11671319
11681320 /*
@@ -2185,6 +2337,165 @@ static int __init l1tf_cmdline(char *str) · 1016 unmodified lines
21852337 }
21862338 early_param("l1tf", l1tf_cmdline);
21872339
2340+#undef pr_fmt
2341+#define pr_fmt(fmt) "Speculative Return Stack Overflow: " fmt
2342+
2343+enum srso_mitigation {
2344+ SRSO_MITIGATION_NONE,
2345+ SRSO_MITIGATION_MICROCODE,
2346+ SRSO_MITIGATION_SAFE_RET,
2347+ SRSO_MITIGATION_IBPB,
2348+ SRSO_MITIGATION_IBPB_ON_VMEXIT,
2349+};
2350+
2351+enum srso_mitigation_cmd {
2352+ SRSO_CMD_OFF,
2353+ SRSO_CMD_MICROCODE,
2354+ SRSO_CMD_SAFE_RET,
2355+ SRSO_CMD_IBPB,
2356+ SRSO_CMD_IBPB_ON_VMEXIT,
2357+};
2358+
2359+static const char * const srso_strings[] = {
2360+ [SRSO_MITIGATION_NONE] = "Vulnerable",
2361+ [SRSO_MITIGATION_MICROCODE] = "Mitigation: microcode",
2362+ [SRSO_MITIGATION_SAFE_RET] = "Mitigation: safe RET",
2363+ [SRSO_MITIGATION_IBPB] = "Mitigation: IBPB",
2364+ [SRSO_MITIGATION_IBPB_ON_VMEXIT] = "Mitigation: IBPB on VMEXIT only"
2365+};
2366+
2367+static enum srso_mitigation srso_mitigation __ro_after_init = SRSO_MITIGATION_NONE;
2368+static enum srso_mitigation_cmd srso_cmd __ro_after_init = SRSO_CMD_SAFE_RET;
2369+
2370+static int __init srso_parse_cmdline(char *str)
2371+{
2372+ if (!str)
2373+ return -EINVAL;
2374+
2375+ if (!strcmp(str, "off"))
2376+ srso_cmd = SRSO_CMD_OFF;
2377+ else if (!strcmp(str, "microcode"))
2378+ srso_cmd = SRSO_CMD_MICROCODE;
2379+ else if (!strcmp(str, "safe-ret"))
2380+ srso_cmd = SRSO_CMD_SAFE_RET;
2381+ else if (!strcmp(str, "ibpb"))
2382+ srso_cmd = SRSO_CMD_IBPB;
2383+ else if (!strcmp(str, "ibpb-vmexit"))
2384+ srso_cmd = SRSO_CMD_IBPB_ON_VMEXIT;
2385+ else
2386+ pr_err("Ignoring unknown SRSO option (%s).", str);
2387+
2388+ return 0;
2389+}
2390+early_param("spec_rstack_overflow", srso_parse_cmdline);
2391+
2392+#define SRSO_NOTICE "WARNING: See https://kernel.org/doc/html/latest/admin-guide/hw-vuln/srso.html for mitigation options."
2393+
2394+static void __init srso_select_mitigation(void)
2395+{
2396+ bool has_microcode;
2397+
2398+ if (!boot_cpu_has_bug(X86_BUG_SRSO) || cpu_mitigations_off())
2399+ goto pred_cmd;
2400+
2401+ /*
2402+ * The first check is for the kernel running as a guest in order
2403+ * for guests to verify whether IBPB is a viable mitigation.
2404+ */
2405+ has_microcode = boot_cpu_has(X86_FEATURE_IBPB_BRTYPE) || cpu_has_ibpb_brtype_microcode();
2406+ if (!has_microcode) {
2407+ pr_warn("IBPB-extending microcode not applied!\n");
2408+ pr_warn(SRSO_NOTICE);
2409+ } else {
2410+ /*
2411+ * Enable the synthetic (even if in a real CPUID leaf)
2412+ * flags for guests.
2413+ */
2414+ setup_force_cpu_cap(X86_FEATURE_IBPB_BRTYPE);
2415+
2416+ /*
2417+ * Zen1/2 with SMT off aren't vulnerable after the right
2418+ * IBPB microcode has been applied.
2419+ */
2420+ if ((boot_cpu_data.x86 < 0x19) &&
2421+ (!cpu_smt_possible() || (cpu_smt_control == CPU_SMT_DISABLED)))
2422+ setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
2423+ }
2424+
2425+ if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
2426+ if (has_microcode) {
2427+ pr_err("Retbleed IBPB mitigation enabled, using same for SRSO\n");
2428+ srso_mitigation = SRSO_MITIGATION_IBPB;
2429+ goto pred_cmd;
2430+ }
2431+ }
2432+
2433+ switch (srso_cmd) {
2434+ case SRSO_CMD_OFF:
2435+ return;
2436+
2437+ case SRSO_CMD_MICROCODE:
2438+ if (has_microcode) {
2439+ srso_mitigation = SRSO_MITIGATION_MICROCODE;
2440+ pr_warn(SRSO_NOTICE);
2441+ }
2442+ break;
2443+
2444+ case SRSO_CMD_SAFE_RET:
2445+ if (IS_ENABLED(CONFIG_CPU_SRSO)) {
2446+ /*
2447+ * Enable the return thunk for generated code
2448+ * like ftrace, static_call, etc.
2449+ */
2450+ setup_force_cpu_cap(X86_FEATURE_RETHUNK);
2451+
2452+ if (boot_cpu_data.x86 == 0x19)
2453+ setup_force_cpu_cap(X86_FEATURE_SRSO_ALIAS);
2454+ else
2455+ setup_force_cpu_cap(X86_FEATURE_SRSO);
2456+ srso_mitigation = SRSO_MITIGATION_SAFE_RET;
2457+ } else {
2458+ pr_err("WARNING: kernel not compiled with CPU_SRSO.\n");
2459+ goto pred_cmd;
2460+ }
2461+ break;
2462+
2463+ case SRSO_CMD_IBPB:
2464+ if (IS_ENABLED(CONFIG_CPU_IBPB_ENTRY)) {
2465+ if (has_microcode) {
2466+ setup_force_cpu_cap(X86_FEATURE_ENTRY_IBPB);
2467+ srso_mitigation = SRSO_MITIGATION_IBPB;
2468+ }
2469+ } else {
2470+ pr_err("WARNING: kernel not compiled with CPU_IBPB_ENTRY.\n");
2471+ goto pred_cmd;
2472+ }
2473+ break;
2474+
2475+ case SRSO_CMD_IBPB_ON_VMEXIT:
2476+ if (IS_ENABLED(CONFIG_CPU_SRSO)) {
2477+ if (!boot_cpu_has(X86_FEATURE_ENTRY_IBPB) && has_microcode) {
2478+ setup_force_cpu_cap(X86_FEATURE_IBPB_ON_VMEXIT);
2479+ srso_mitigation = SRSO_MITIGATION_IBPB_ON_VMEXIT;
2480+ }
2481+ } else {
2482+ pr_err("WARNING: kernel not compiled with CPU_SRSO.\n");
2483+ goto pred_cmd;
2484+ }
2485+ break;
2486+
2487+ default:
2488+ break;
2489+ }
2490+
2491+ pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
2492+
2493+pred_cmd:
2494+ if ((boot_cpu_has(X86_FEATURE_SRSO_NO) || srso_cmd == SRSO_CMD_OFF) &&
2495+ boot_cpu_has(X86_FEATURE_SBPB))
2496+ x86_pred_cmd = PRED_CMD_SBPB;
2497+}
2498+
21882499 #undef pr_fmt
21892500 #define pr_fmt(fmt) fmt
21902501
@@ -2294,7 +2605,8 @@ static ssize_t mmio_stale_data_show_state(char *buf) · 103 unmodified lines
22942605
22952606 static char *stibp_state(void)
22962607 {
2297− if (spectre_v2_in_eibrs_mode(spectre_v2_enabled))
2608+ if (spectre_v2_in_eibrs_mode(spectre_v2_enabled) &&
2609+ !boot_cpu_has(X86_FEATURE_AUTOIBRS))
22982610 return "";
22992611
23002612 switch (spectre_v2_user_stibp) {
@@ -2382,6 +2694,18 @@ static ssize_t retbleed_show_state(char *buf) · 81 unmodified lines
23822694 return sysfs_emit(buf, "%s\n", retbleed_strings[retbleed_mitigation]);
23832695 }
23842696
2697+static ssize_t srso_show_state(char *buf)
2698+{
2699+ return sysfs_emit(buf, "%s%s\n",
2700+ srso_strings[srso_mitigation],
2701+ (cpu_has_ibpb_brtype_microcode() ? "" : ", no microcode"));
2702+}
2703+
2704+static ssize_t gds_show_state(char *buf)
2705+{
2706+ return sysfs_emit(buf, "%s\n", gds_strings[gds_mitigation]);
2707+}
2708+
23852709 static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr,
23862710 char *buf, unsigned int bug)
23872711 {
@@ -2431,6 +2755,12 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr · 43 unmodified lines
24312755 case X86_BUG_RETBLEED:
24322756 return retbleed_show_state(buf);
24332757
2758+ case X86_BUG_SRSO:
2759+ return srso_show_state(buf);
2760+
2761+ case X86_BUG_GDS:
2762+ return gds_show_state(buf);
2763+
24342764 default:
24352765 break;
24362766 }
@@ -2495,4 +2825,14 @@ ssize_t cpu_show_retbleed(struct device *dev, struct device_attribute *attr, cha · 58 unmodified lines
24952825 {
24962826 return cpu_show_common(dev, attr, buf, X86_BUG_RETBLEED);
24972827 }
2828+
2829+ssize_t cpu_show_spec_rstack_overflow(struct device *dev, struct device_attribute *attr, char *buf)
2830+{
2831+ return cpu_show_common(dev, attr, buf, X86_BUG_SRSO);
2832+}
2833+
2834+ssize_t cpu_show_gds(struct device *dev, struct device_attribute *attr, char *buf)
2835+{
2836+ return cpu_show_common(dev, attr, buf, X86_BUG_GDS);
2837+}
24982838 #endif
arch/x86/kernel/cpu/common.c+36−10
@@ -1250,6 +1250,10 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = { · 1249 unmodified lines
12501250 #define RETBLEED BIT(3)
12511251 /* CPU is affected by SMT (cross-thread) return predictions */
12521252 #define SMT_RSB BIT(4)
1253+/* CPU is affected by SRSO */
1254+#define SRSO BIT(5)
1255+/* CPU is affected by GDS */
1256+#define GDS BIT(6)
12531257
12541258 static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = {
12551259 VULNBL_INTEL_STEPPINGS(IVYBRIDGE, X86_STEPPING_ANY, SRBDS),
@@ -1262,27 +1266,30 @@ static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = { · 6 unmodified lines
12621266 VULNBL_INTEL_STEPPINGS(BROADWELL_X, X86_STEPPING_ANY, MMIO),
12631267 VULNBL_INTEL_STEPPINGS(BROADWELL, X86_STEPPING_ANY, SRBDS),
12641268 VULNBL_INTEL_STEPPINGS(SKYLAKE_L, X86_STEPPING_ANY, SRBDS | MMIO | RETBLEED),
1265− VULNBL_INTEL_STEPPINGS(SKYLAKE_X, X86_STEPPING_ANY, MMIO | RETBLEED),
1269+ VULNBL_INTEL_STEPPINGS(SKYLAKE_X, X86_STEPPING_ANY, MMIO | RETBLEED | GDS),
12661270 VULNBL_INTEL_STEPPINGS(SKYLAKE, X86_STEPPING_ANY, SRBDS | MMIO | RETBLEED),
1267− VULNBL_INTEL_STEPPINGS(KABYLAKE_L, X86_STEPPING_ANY, SRBDS | MMIO | RETBLEED),
1268− VULNBL_INTEL_STEPPINGS(KABYLAKE, X86_STEPPING_ANY, SRBDS | MMIO | RETBLEED),
1271+ VULNBL_INTEL_STEPPINGS(KABYLAKE_L, X86_STEPPING_ANY, SRBDS | MMIO | RETBLEED | GDS),
1272+ VULNBL_INTEL_STEPPINGS(KABYLAKE, X86_STEPPING_ANY, SRBDS | MMIO | RETBLEED | GDS),
12691273 VULNBL_INTEL_STEPPINGS(CANNONLAKE_L, X86_STEPPING_ANY, RETBLEED),
1270− VULNBL_INTEL_STEPPINGS(ICELAKE_L, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED),
1271− VULNBL_INTEL_STEPPINGS(ICELAKE_D, X86_STEPPING_ANY, MMIO),
1272− VULNBL_INTEL_STEPPINGS(ICELAKE_X, X86_STEPPING_ANY, MMIO),
1273− VULNBL_INTEL_STEPPINGS(COMETLAKE, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED),
1274+ VULNBL_INTEL_STEPPINGS(ICELAKE_L, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED | GDS),
1275+ VULNBL_INTEL_STEPPINGS(ICELAKE_D, X86_STEPPING_ANY, MMIO | GDS),
1276+ VULNBL_INTEL_STEPPINGS(ICELAKE_X, X86_STEPPING_ANY, MMIO | GDS),
1277+ VULNBL_INTEL_STEPPINGS(COMETLAKE, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED | GDS),
12741278 VULNBL_INTEL_STEPPINGS(COMETLAKE_L, X86_STEPPINGS(0x0, 0x0), MMIO | RETBLEED),
1275− VULNBL_INTEL_STEPPINGS(COMETLAKE_L, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED),
1279+ VULNBL_INTEL_STEPPINGS(COMETLAKE_L, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED | GDS),
1280+ VULNBL_INTEL_STEPPINGS(TIGERLAKE_L, X86_STEPPING_ANY, GDS),
1281+ VULNBL_INTEL_STEPPINGS(TIGERLAKE, X86_STEPPING_ANY, GDS),
12761282 VULNBL_INTEL_STEPPINGS(LAKEFIELD, X86_STEPPING_ANY, MMIO | MMIO_SBDS | RETBLEED),
1277− VULNBL_INTEL_STEPPINGS(ROCKETLAKE, X86_STEPPING_ANY, MMIO | RETBLEED),
1283+ VULNBL_INTEL_STEPPINGS(ROCKETLAKE, X86_STEPPING_ANY, MMIO | RETBLEED | GDS),
12781284 VULNBL_INTEL_STEPPINGS(ATOM_TREMONT, X86_STEPPING_ANY, MMIO | MMIO_SBDS),
12791285 VULNBL_INTEL_STEPPINGS(ATOM_TREMONT_D, X86_STEPPING_ANY, MMIO),
12801286 VULNBL_INTEL_STEPPINGS(ATOM_TREMONT_L, X86_STEPPING_ANY, MMIO | MMIO_SBDS),
12811287
12821288 VULNBL_AMD(0x15, RETBLEED),
12831289 VULNBL_AMD(0x16, RETBLEED),
1284− VULNBL_AMD(0x17, RETBLEED | SMT_RSB),
1290+ VULNBL_AMD(0x17, RETBLEED | SMT_RSB | SRSO),
12851291 VULNBL_HYGON(0x18, RETBLEED | SMT_RSB),
1292+ VULNBL_AMD(0x19, SRSO),
12861293 {}
12871294 };
12881295
@@ -1406,6 +1413,21 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c) · 117 unmodified lines
14061413 if (cpu_matches(cpu_vuln_blacklist, SMT_RSB))
14071414 setup_force_cpu_bug(X86_BUG_SMT_RSB);
14081415
1416+ if (!cpu_has(c, X86_FEATURE_SRSO_NO)) {
1417+ if (cpu_matches(cpu_vuln_blacklist, SRSO))
1418+ setup_force_cpu_bug(X86_BUG_SRSO);
1419+ }
1420+
1421+ /*
1422+ * Check if CPU is vulnerable to GDS. If running in a virtual machine on
1423+ * an affected processor, the VMM may have disabled the use of GATHER by
1424+ * disabling AVX2. The only way to do this in HW is to clear XCR0[2],
1425+ * which means that AVX will be disabled.
1426+ */
1427+ if (cpu_matches(cpu_vuln_blacklist, GDS) && !(ia32_cap & ARCH_CAP_GDS_NO) &&
1428+ boot_cpu_has(X86_FEATURE_AVX))
1429+ setup_force_cpu_bug(X86_BUG_GDS);
1430+
14091431 if (cpu_matches(cpu_vuln_whitelist, NO_MELTDOWN))
14101432 return;
14111433
@@ -1962,6 +1984,8 @@ void identify_secondary_cpu(struct cpuinfo_x86 *c) · 550 unmodified lines
19621984 validate_apic_and_package_id(c);
19631985 x86_spec_ctrl_setup_ap();
19641986 update_srbds_msr();
1987+ if (boot_cpu_has_bug(X86_BUG_GDS))
1988+ update_gds_msr();
19651989
19661990 tsx_ap_init();
19671991 }
@@ -2287,6 +2311,8 @@ void microcode_check(struct cpuinfo_x86 *prev_info) · 319 unmodified lines
22872311
22882312 perf_check_microcode();
22892313
2314+ amd_check_microcode();
2315+
22902316 store_cpu_caps(&curr_info);
22912317
22922318 if (!memcmp(&prev_info->x86_capability, &curr_info.x86_capability,
arch/x86/kernel/cpu/cpu.h+1−0
@@ -83,6 +83,7 @@ void cpu_select_mitigations(void); · 82 unmodified lines
8383
8484 extern void x86_spec_ctrl_setup_ap(void);
8585 extern void update_srbds_msr(void);
86+extern void update_gds_msr(void);
8687
8788 extern enum spectre_v2_mitigation spectre_v2_enabled;
8889
arch/x86/kernel/cpu/mce/amd.c+2−2
@@ -1261,10 +1261,10 @@ static void __threshold_remove_blocks(struct threshold_bank *b) · 1260 unmodified lines
12611261 struct threshold_block *pos = NULL;
12621262 struct threshold_block *tmp = NULL;
12631263
1264− kobject_del(b->kobj);
1264+ kobject_put(b->kobj);
12651265
12661266 list_for_each_entry_safe(pos, tmp, &b->blocks->miscj, miscj)
1267− kobject_del(&pos->kobj);
1267+ kobject_put(b->kobj);
12681268 }
12691269
12701270 static void threshold_remove_bank(struct threshold_bank *bank)
arch/x86/kernel/traps.c+13−7
@@ -206,6 +206,8 @@ DEFINE_IDTENTRY(exc_divide_error) · 205 unmodified lines
206206 {
207207 do_error_trap(regs, 0, "divide error", X86_TRAP_DE, SIGFPE,
208208 FPE_INTDIV, error_get_trap_addr(regs));
209+
210+ amd_clear_divider();
209211 }
210212
211213 DEFINE_IDTENTRY(exc_overflow)
@@ -697,9 +699,10 @@ static bool try_fixup_enqcmd_gp(void) · 485 unmodified lines
697699 }
698700
699701 static bool gp_try_fixup_and_notify(struct pt_regs *regs, int trapnr,
700− unsigned long error_code, const char *str)
702+ unsigned long error_code, const char *str,
703+ unsigned long address)
701704 {
702− if (fixup_exception(regs, trapnr, error_code, 0))
705+ if (fixup_exception(regs, trapnr, error_code, address))
703706 return true;
704707
705708 current->thread.error_code = error_code;
@@ -759,7 +762,7 @@ DEFINE_IDTENTRY_ERRORCODE(exc_general_protection) · 53 unmodified lines
759762 goto exit;
760763 }
761764
762− if (gp_try_fixup_and_notify(regs, X86_TRAP_GP, error_code, desc))
765+ if (gp_try_fixup_and_notify(regs, X86_TRAP_GP, error_code, desc, 0))
763766 goto exit;
764767
765768 if (error_code)
@@ -1357,17 +1360,20 @@ DEFINE_IDTENTRY(exc_device_not_available) · 591 unmodified lines
13571360
13581361 #define VE_FAULT_STR "VE fault"
13591362
1360−static void ve_raise_fault(struct pt_regs *regs, long error_code)
1363+static void ve_raise_fault(struct pt_regs *regs, long error_code,
1364+ unsigned long address)
13611365 {
13621366 if (user_mode(regs)) {
13631367 gp_user_force_sig_segv(regs, X86_TRAP_VE, error_code, VE_FAULT_STR);
13641368 return;
13651369 }
13661370
1367− if (gp_try_fixup_and_notify(regs, X86_TRAP_VE, error_code, VE_FAULT_STR))
1371+ if (gp_try_fixup_and_notify(regs, X86_TRAP_VE, error_code,
1372+ VE_FAULT_STR, address)) {
13681373 return;
1374+ }
13691375
1370− die_addr(VE_FAULT_STR, regs, error_code, 0);
1376+ die_addr(VE_FAULT_STR, regs, error_code, address);
13711377 }
13721378
13731379 /*
@@ -1431,7 +1437,7 @@ DEFINE_IDTENTRY(exc_virtualization_exception) · 57 unmodified lines
14311437 * it successfully, treat it as #GP(0) and handle it.
14321438 */
14331439 if (!tdx_handle_virt_exception(regs, &ve))
1434− ve_raise_fault(regs, 0);
1440+ ve_raise_fault(regs, 0, ve.gla);
14351441
14361442 cond_local_irq_disable(regs);
14371443 }
arch/x86/kernel/vmlinux.lds.S+33−2
@@ -134,13 +134,27 @@ SECTIONS · 133 unmodified lines
134134 SOFTIRQENTRY_TEXT
135135 #ifdef CONFIG_RETPOLINE
136136 __indirect_thunk_start = .;
137− *(.text.__x86.*)
137+ *(.text.__x86.indirect_thunk)
138+ *(.text.__x86.return_thunk)
138139 __indirect_thunk_end = .;
139140 #endif
140141 STATIC_CALL_TEXT
141142
142143 ALIGN_ENTRY_TEXT_BEGIN
144+#ifdef CONFIG_CPU_SRSO
145+ *(.text.__x86.rethunk_untrain)
146+#endif
147+
143148 ENTRY_TEXT
149+
150+#ifdef CONFIG_CPU_SRSO
151+ /*
152+ * See the comment above srso_untrain_ret_alias()'s
153+ * definition.
154+ */
155+ . = srso_untrain_ret_alias | (1 << 2) | (1 << 8) | (1 << 14) | (1 << 20);
156+ *(.text.__x86.rethunk_safe)
157+#endif
144158 ALIGN_ENTRY_TEXT_END
145159 *(.gnu.warning)
146160
@@ -509,7 +523,24 @@ INIT_PER_CPU(irq_stack_backing_store); · 362 unmodified lines
509523 #endif
510524
511525 #ifdef CONFIG_RETHUNK
512−. = ASSERT((__x86_return_thunk & 0x3f) == 0, "__x86_return_thunk not cacheline-aligned");
526+. = ASSERT((__ret & 0x3f) == 0, "__ret not cacheline-aligned");
527+. = ASSERT((srso_safe_ret & 0x3f) == 0, "srso_safe_ret not cacheline-aligned");
528+#endif
529+
530+#ifdef CONFIG_CPU_SRSO
531+/*
532+ * GNU ld cannot do XOR until 2.41.
533+ * https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f6f78318fca803c4907fb8d7f6ded8295f1947b1
534+ *
535+ * LLVM lld cannot do XOR until lld-17.
536+ * https://github.com/llvm/llvm-project/commit/fae96104d4378166cbe5c875ef8ed808a356f3fb
537+ *
538+ * Instead do: (A | B) - (A & B) in order to compute the XOR
539+ * of the two function addresses:
540+ */
541+. = ASSERT(((ABSOLUTE(srso_untrain_ret_alias) | srso_safe_ret_alias) -
542+ (ABSOLUTE(srso_untrain_ret_alias) & srso_safe_ret_alias)) == ((1 << 2) | (1 << 8) | (1 << 14) | (1 << 20)),
543+ "SRSO function pair won't alias");
513544 #endif
514545
515546 #endif /* CONFIG_X86_64 */
arch/x86/kvm/cpuid.c+3−0
@@ -729,6 +729,9 @@ void kvm_set_cpu_caps(void) · 728 unmodified lines
729729 F(NULL_SEL_CLR_BASE) | F(AUTOIBRS) | 0 /* PrefetchCtlMsr */
730730 );
731731
732+ if (cpu_feature_enabled(X86_FEATURE_SRSO_NO))
733+ kvm_cpu_cap_set(X86_FEATURE_SRSO_NO);
734+
732735 kvm_cpu_cap_init_kvm_defined(CPUID_8000_0022_EAX,
733736 F(PERFMON_V2)
734737 );
arch/x86/kvm/lapic.c+17−8
@@ -637,16 +637,22 @@ bool __kvm_apic_update_irr(u32 *pir, void *regs, int *max_irr) · 636 unmodified lines
637637 *max_irr = -1;
638638
639639 for (i = vec = 0; i <= 7; i++, vec += 32) {
640+ u32 *p_irr = (u32 *)(regs + APIC_IRR + i * 0x10);
641+
642+ irr_val = *p_irr;
640643 pir_val = READ_ONCE(pir[i]);
641− irr_val = *((u32 *)(regs + APIC_IRR + i * 0x10));
644+
642645 if (pir_val) {
646+ pir_val = xchg(&pir[i], 0);
647+
643648 prev_irr_val = irr_val;
644− irr_val |= xchg(&pir[i], 0);
645− *((u32 *)(regs + APIC_IRR + i * 0x10)) = irr_val;
646− if (prev_irr_val != irr_val) {
647− max_updated_irr =
648− __fls(irr_val ^ prev_irr_val) + vec;
649− }
649+ do {
650+ irr_val = prev_irr_val | pir_val;
651+ } while (prev_irr_val != irr_val &&
652+ !try_cmpxchg(p_irr, &prev_irr_val, irr_val));
653+
654+ if (prev_irr_val != irr_val)
655+ max_updated_irr = __fls(irr_val ^ prev_irr_val) + vec;
650656 }
651657 if (irr_val)
652658 *max_irr = __fls(irr_val) + vec;
@@ -660,8 +666,11 @@ EXPORT_SYMBOL_GPL(__kvm_apic_update_irr); · 7 unmodified lines
660666 bool kvm_apic_update_irr(struct kvm_vcpu *vcpu, u32 *pir, int *max_irr)
661667 {
662668 struct kvm_lapic *apic = vcpu->arch.apic;
669+ bool irr_updated = __kvm_apic_update_irr(pir, apic->regs, max_irr);
663670
664− return __kvm_apic_update_irr(pir, apic->regs, max_irr);
671+ if (unlikely(!apic->apicv_active && irr_updated))
672+ apic->irr_pending = true;
673+ return irr_updated;
665674 }
666675 EXPORT_SYMBOL_GPL(kvm_apic_update_irr);
667676
arch/x86/kvm/svm/sev.c+61−63
@@ -2417,15 +2417,18 @@ static void sev_es_sync_from_ghcb(struct vcpu_svm *svm) · 2416 unmodified lines
24172417 */
24182418 memset(vcpu->arch.regs, 0, sizeof(vcpu->arch.regs));
24192419
2420− vcpu->arch.regs[VCPU_REGS_RAX] = ghcb_get_rax_if_valid(ghcb);
2421− vcpu->arch.regs[VCPU_REGS_RBX] = ghcb_get_rbx_if_valid(ghcb);
2422− vcpu->arch.regs[VCPU_REGS_RCX] = ghcb_get_rcx_if_valid(ghcb);
2423− vcpu->arch.regs[VCPU_REGS_RDX] = ghcb_get_rdx_if_valid(ghcb);
2424− vcpu->arch.regs[VCPU_REGS_RSI] = ghcb_get_rsi_if_valid(ghcb);
2420+ BUILD_BUG_ON(sizeof(svm->sev_es.valid_bitmap) != sizeof(ghcb->save.valid_bitmap));
2421+ memcpy(&svm->sev_es.valid_bitmap, &ghcb->save.valid_bitmap, sizeof(ghcb->save.valid_bitmap));
24252422
2426− svm->vmcb->save.cpl = ghcb_get_cpl_if_valid(ghcb);
2423+ vcpu->arch.regs[VCPU_REGS_RAX] = kvm_ghcb_get_rax_if_valid(svm, ghcb);
2424+ vcpu->arch.regs[VCPU_REGS_RBX] = kvm_ghcb_get_rbx_if_valid(svm, ghcb);
2425+ vcpu->arch.regs[VCPU_REGS_RCX] = kvm_ghcb_get_rcx_if_valid(svm, ghcb);
2426+ vcpu->arch.regs[VCPU_REGS_RDX] = kvm_ghcb_get_rdx_if_valid(svm, ghcb);
2427+ vcpu->arch.regs[VCPU_REGS_RSI] = kvm_ghcb_get_rsi_if_valid(svm, ghcb);
24272428
2428− if (ghcb_xcr0_is_valid(ghcb)) {
2429+ svm->vmcb->save.cpl = kvm_ghcb_get_cpl_if_valid(svm, ghcb);
2430+
2431+ if (kvm_ghcb_xcr0_is_valid(svm)) {
24292432 vcpu->arch.xcr0 = ghcb_get_xcr0(ghcb);
24302433 kvm_update_cpuid_runtime(vcpu);
24312434 }
@@ -2436,84 +2439,88 @@ static void sev_es_sync_from_ghcb(struct vcpu_svm *svm) · 4 unmodified lines
24362439 control->exit_code_hi = upper_32_bits(exit_code);
24372440 control->exit_info_1 = ghcb_get_sw_exit_info_1(ghcb);
24382441 control->exit_info_2 = ghcb_get_sw_exit_info_2(ghcb);
2442+ svm->sev_es.sw_scratch = kvm_ghcb_get_sw_scratch_if_valid(svm, ghcb);
24392443
24402444 /* Clear the valid entries fields */
24412445 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap));
24422446 }
24432447
2448+static u64 kvm_ghcb_get_sw_exit_code(struct vmcb_control_area *control)
2449+{
2450+ return (((u64)control->exit_code_hi) << 32) | control->exit_code;
2451+}
2452+
24442453 static int sev_es_validate_vmgexit(struct vcpu_svm *svm)
24452454 {
2446− struct kvm_vcpu *vcpu;
2447− struct ghcb *ghcb;
2455+ struct vmcb_control_area *control = &svm->vmcb->control;
2456+ struct kvm_vcpu *vcpu = &svm->vcpu;
24482457 u64 exit_code;
24492458 u64 reason;
24502459
2451− ghcb = svm->sev_es.ghcb;
2452−
24532460 /*
24542461 * Retrieve the exit code now even though it may not be marked valid
24552462 * as it could help with debugging.
24562463 */
2457− exit_code = ghcb_get_sw_exit_code(ghcb);
2464+ exit_code = kvm_ghcb_get_sw_exit_code(control);
24582465
24592466 /* Only GHCB Usage code 0 is supported */
2460− if (ghcb->ghcb_usage) {
2467+ if (svm->sev_es.ghcb->ghcb_usage) {
24612468 reason = GHCB_ERR_INVALID_USAGE;
24622469 goto vmgexit_err;
24632470 }
24642471
24652472 reason = GHCB_ERR_MISSING_INPUT;
24662473
2467− if (!ghcb_sw_exit_code_is_valid(ghcb) ||
2468− !ghcb_sw_exit_info_1_is_valid(ghcb) ||
2469− !ghcb_sw_exit_info_2_is_valid(ghcb))
2474+ if (!kvm_ghcb_sw_exit_code_is_valid(svm) ||
2475+ !kvm_ghcb_sw_exit_info_1_is_valid(svm) ||
2476+ !kvm_ghcb_sw_exit_info_2_is_valid(svm))
24702477 goto vmgexit_err;
24712478
2472− switch (ghcb_get_sw_exit_code(ghcb)) {
2479+ switch (exit_code) {
24732480 case SVM_EXIT_READ_DR7:
24742481 break;
24752482 case SVM_EXIT_WRITE_DR7:
2476− if (!ghcb_rax_is_valid(ghcb))
2483+ if (!kvm_ghcb_rax_is_valid(svm))
24772484 goto vmgexit_err;
24782485 break;
24792486 case SVM_EXIT_RDTSC:
24802487 break;
24812488 case SVM_EXIT_RDPMC:
2482− if (!ghcb_rcx_is_valid(ghcb))
2489+ if (!kvm_ghcb_rcx_is_valid(svm))
24832490 goto vmgexit_err;
24842491 break;
24852492 case SVM_EXIT_CPUID:
2486− if (!ghcb_rax_is_valid(ghcb) ||
2487− !ghcb_rcx_is_valid(ghcb))
2493+ if (!kvm_ghcb_rax_is_valid(svm) ||
2494+ !kvm_ghcb_rcx_is_valid(svm))
24882495 goto vmgexit_err;
2489− if (ghcb_get_rax(ghcb) == 0xd)
2490− if (!ghcb_xcr0_is_valid(ghcb))
2496+ if (vcpu->arch.regs[VCPU_REGS_RAX] == 0xd)
2497+ if (!kvm_ghcb_xcr0_is_valid(svm))
24912498 goto vmgexit_err;
24922499 break;
24932500 case SVM_EXIT_INVD:
24942501 break;
24952502 case SVM_EXIT_IOIO:
2496− if (ghcb_get_sw_exit_info_1(ghcb) & SVM_IOIO_STR_MASK) {
2497− if (!ghcb_sw_scratch_is_valid(ghcb))
2503+ if (control->exit_info_1 & SVM_IOIO_STR_MASK) {
2504+ if (!kvm_ghcb_sw_scratch_is_valid(svm))
24982505 goto vmgexit_err;
24992506 } else {
2500− if (!(ghcb_get_sw_exit_info_1(ghcb) & SVM_IOIO_TYPE_MASK))
2501− if (!ghcb_rax_is_valid(ghcb))
2507+ if (!(control->exit_info_1 & SVM_IOIO_TYPE_MASK))
2508+ if (!kvm_ghcb_rax_is_valid(svm))
25022509 goto vmgexit_err;
25032510 }
25042511 break;
25052512 case SVM_EXIT_MSR:
2506− if (!ghcb_rcx_is_valid(ghcb))
2513+ if (!kvm_ghcb_rcx_is_valid(svm))
25072514 goto vmgexit_err;
2508− if (ghcb_get_sw_exit_info_1(ghcb)) {
2509− if (!ghcb_rax_is_valid(ghcb) ||
2510− !ghcb_rdx_is_valid(ghcb))
2515+ if (control->exit_info_1) {
2516+ if (!kvm_ghcb_rax_is_valid(svm) ||
2517+ !kvm_ghcb_rdx_is_valid(svm))
25112518 goto vmgexit_err;
25122519 }
25132520 break;
25142521 case SVM_EXIT_VMMCALL:
2515− if (!ghcb_rax_is_valid(ghcb) ||
2516− !ghcb_cpl_is_valid(ghcb))
2522+ if (!kvm_ghcb_rax_is_valid(svm) ||
2523+ !kvm_ghcb_cpl_is_valid(svm))
25172524 goto vmgexit_err;
25182525 break;
25192526 case SVM_EXIT_RDTSCP:
@@ -2521,19 +2528,19 @@ static int sev_es_validate_vmgexit(struct vcpu_svm *svm) · 1 unmodified line
25212528 case SVM_EXIT_WBINVD:
25222529 break;
25232530 case SVM_EXIT_MONITOR:
2524− if (!ghcb_rax_is_valid(ghcb) ||
2525− !ghcb_rcx_is_valid(ghcb) ||
2526− !ghcb_rdx_is_valid(ghcb))
2531+ if (!kvm_ghcb_rax_is_valid(svm) ||
2532+ !kvm_ghcb_rcx_is_valid(svm) ||
2533+ !kvm_ghcb_rdx_is_valid(svm))
25272534 goto vmgexit_err;
25282535 break;
25292536 case SVM_EXIT_MWAIT:
2530− if (!ghcb_rax_is_valid(ghcb) ||
2531− !ghcb_rcx_is_valid(ghcb))
2537+ if (!kvm_ghcb_rax_is_valid(svm) ||
2538+ !kvm_ghcb_rcx_is_valid(svm))
25322539 goto vmgexit_err;
25332540 break;
25342541 case SVM_VMGEXIT_MMIO_READ:
25352542 case SVM_VMGEXIT_MMIO_WRITE:
2536− if (!ghcb_sw_scratch_is_valid(ghcb))
2543+ if (!kvm_ghcb_sw_scratch_is_valid(svm))
25372544 goto vmgexit_err;
25382545 break;
25392546 case SVM_VMGEXIT_NMI_COMPLETE:
@@ -2549,11 +2556,9 @@ static int sev_es_validate_vmgexit(struct vcpu_svm *svm) · 9 unmodified lines
25492556 return 0;
25502557
25512558 vmgexit_err:
2552− vcpu = &svm->vcpu;
2553−
25542559 if (reason == GHCB_ERR_INVALID_USAGE) {
25552560 vcpu_unimpl(vcpu, "vmgexit: ghcb usage %#x is not valid\n",
2556− ghcb->ghcb_usage);
2561+ svm->sev_es.ghcb->ghcb_usage);
25572562 } else if (reason == GHCB_ERR_INVALID_EVENT) {
25582563 vcpu_unimpl(vcpu, "vmgexit: exit code %#llx is not valid\n",
25592564 exit_code);
@@ -2563,11 +2568,8 @@ vmgexit_err: · 3 unmodified lines
25632568 dump_ghcb(svm);
25642569 }
25652570
2566− /* Clear the valid entries fields */
2567− memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap));
2568−
2569− ghcb_set_sw_exit_info_1(ghcb, 2);
2570− ghcb_set_sw_exit_info_2(ghcb, reason);
2571+ ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 2);
2572+ ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, reason);
25712573
25722574 /* Resume the guest to "return" the error code. */
25732575 return 1;
@@ -2586,7 +2588,7 @@ void sev_es_unmap_ghcb(struct vcpu_svm *svm) · 12 unmodified lines
25862588 */
25872589 if (svm->sev_es.ghcb_sa_sync) {
25882590 kvm_write_guest(svm->vcpu.kvm,
2589− ghcb_get_sw_scratch(svm->sev_es.ghcb),
2591+ svm->sev_es.sw_scratch,
25902592 svm->sev_es.ghcb_sa,
25912593 svm->sev_es.ghcb_sa_len);
25922594 svm->sev_es.ghcb_sa_sync = false;
@@ -2632,12 +2634,11 @@ void pre_sev_run(struct vcpu_svm *svm, int cpu) · 39 unmodified lines
26322634 static int setup_vmgexit_scratch(struct vcpu_svm *svm, bool sync, u64 len)
26332635 {
26342636 struct vmcb_control_area *control = &svm->vmcb->control;
2635− struct ghcb *ghcb = svm->sev_es.ghcb;
26362637 u64 ghcb_scratch_beg, ghcb_scratch_end;
26372638 u64 scratch_gpa_beg, scratch_gpa_end;
26382639 void *scratch_va;
26392640
2640− scratch_gpa_beg = ghcb_get_sw_scratch(ghcb);
2641+ scratch_gpa_beg = svm->sev_es.sw_scratch;
26412642 if (!scratch_gpa_beg) {
26422643 pr_err("vmgexit: scratch gpa not provided\n");
26432644 goto e_scratch;
@@ -2708,8 +2709,8 @@ static int setup_vmgexit_scratch(struct vcpu_svm *svm, bool sync, u64 len) · 64 unmodified lines
27082709 return 0;
27092710
27102711 e_scratch:
2711− ghcb_set_sw_exit_info_1(ghcb, 2);
2712− ghcb_set_sw_exit_info_2(ghcb, GHCB_ERR_INVALID_SCRATCH_AREA);
2712+ ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 2);
2713+ ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, GHCB_ERR_INVALID_SCRATCH_AREA);
27132714
27142715 return 1;
27152716 }
@@ -2822,7 +2823,6 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu) · 106 unmodified lines
28222823 struct vcpu_svm *svm = to_svm(vcpu);
28232824 struct vmcb_control_area *control = &svm->vmcb->control;
28242825 u64 ghcb_gpa, exit_code;
2825− struct ghcb *ghcb;
28262826 int ret;
28272827
28282828 /* Validate the GHCB */
@@ -2847,20 +2847,18 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu) · 18 unmodified lines
28472847 }
28482848
28492849 svm->sev_es.ghcb = svm->sev_es.ghcb_map.hva;
2850− ghcb = svm->sev_es.ghcb_map.hva;
28512850
2852− trace_kvm_vmgexit_enter(vcpu->vcpu_id, ghcb);
2853−
2854− exit_code = ghcb_get_sw_exit_code(ghcb);
2851+ trace_kvm_vmgexit_enter(vcpu->vcpu_id, svm->sev_es.ghcb);
28552852
2853+ sev_es_sync_from_ghcb(svm);
28562854 ret = sev_es_validate_vmgexit(svm);
28572855 if (ret)
28582856 return ret;
28592857
2860− sev_es_sync_from_ghcb(svm);
2861− ghcb_set_sw_exit_info_1(ghcb, 0);
2862− ghcb_set_sw_exit_info_2(ghcb, 0);
2858+ ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 0);
2859+ ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, 0);
28632860
2861+ exit_code = kvm_ghcb_get_sw_exit_code(control);
28642862 switch (exit_code) {
28652863 case SVM_VMGEXIT_MMIO_READ:
28662864 ret = setup_vmgexit_scratch(svm, true, control->exit_info_2);
@@ -2898,13 +2896,13 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu) · 31 unmodified lines
28982896 break;
28992897 case 1:
29002898 /* Get AP jump table address */
2901− ghcb_set_sw_exit_info_2(ghcb, sev->ap_jump_table);
2899+ ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, sev->ap_jump_table);
29022900 break;
29032901 default:
29042902 pr_err("svm: vmgexit: unsupported AP jump table request - exit_info_1=%#llx\n",
29052903 control->exit_info_1);
2906− ghcb_set_sw_exit_info_1(ghcb, 2);
2907− ghcb_set_sw_exit_info_2(ghcb, GHCB_ERR_INVALID_INPUT);
2904+ ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 2);
2905+ ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, GHCB_ERR_INVALID_INPUT);
29082906 }
29092907
29102908 ret = 1;
arch/x86/kvm/svm/svm.c+11−9
@@ -1498,7 +1498,9 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) · 1497 unmodified lines
14981498
14991499 if (sd->current_vmcb != svm->vmcb) {
15001500 sd->current_vmcb = svm->vmcb;
1501− indirect_branch_prediction_barrier();
1501+
1502+ if (!cpu_feature_enabled(X86_FEATURE_IBPB_ON_VMEXIT))
1503+ indirect_branch_prediction_barrier();
15021504 }
15031505 if (kvm_vcpu_apicv_active(vcpu))
15041506 avic_vcpu_load(vcpu, cpu);
@@ -1786,6 +1788,11 @@ static void sev_post_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) · 281 unmodified lines
17861788 }
17871789 }
17881790
1791+static bool svm_is_valid_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
1792+{
1793+ return true;
1794+}
1795+
17891796 void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
17901797 {
17911798 struct vcpu_svm *svm = to_svm(vcpu);
@@ -3986,14 +3993,8 @@ static int svm_vcpu_pre_run(struct kvm_vcpu *vcpu) · 2194 unmodified lines
39863993
39873994 static fastpath_t svm_exit_handlers_fastpath(struct kvm_vcpu *vcpu)
39883995 {
3989− struct vmcb_control_area *control = &to_svm(vcpu)->vmcb->control;
3990−
3991− /*
3992− * Note, the next RIP must be provided as SRCU isn't held, i.e. KVM
3993− * can't read guest memory (dereference memslots) to decode the WRMSR.
3994− */
3995− if (control->exit_code == SVM_EXIT_MSR && control->exit_info_1 &&
3996− nrips && control->next_rip)
3996+ if (to_svm(vcpu)->vmcb->control.exit_code == SVM_EXIT_MSR &&
3997+ to_svm(vcpu)->vmcb->control.exit_info_1)
39973998 return handle_fastpath_set_msr_irqoff(vcpu);
39983999
39994000 return EXIT_FASTPATH_NONE;
@@ -4815,6 +4816,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = { · 815 unmodified lines
48154816 .set_segment = svm_set_segment,
48164817 .get_cpl = svm_get_cpl,
48174818 .get_cs_db_l_bits = svm_get_cs_db_l_bits,
4819+ .is_valid_cr0 = svm_is_valid_cr0,
48184820 .set_cr0 = svm_set_cr0,
48194821 .post_set_cr3 = sev_post_set_cr3,
48204822 .is_valid_cr4 = svm_is_valid_cr4,
arch/x86/kvm/svm/svm.h+26−0
@@ -190,10 +190,12 @@ struct vcpu_sev_es_state { · 189 unmodified lines
190190 /* SEV-ES support */
191191 struct sev_es_save_area *vmsa;
192192 struct ghcb *ghcb;
193+ u8 valid_bitmap[16];
193194 struct kvm_host_map ghcb_map;
194195 bool received_first_sipi;
195196
196197 /* SEV-ES scratch area support */
198+ u64 sw_scratch;
197199 void *ghcb_sa;
198200 u32 ghcb_sa_len;
199201 bool ghcb_sa_sync;
@@ -744,4 +746,28 @@ void sev_es_unmap_ghcb(struct vcpu_svm *svm); · 544 unmodified lines
744746 void __svm_sev_es_vcpu_run(struct vcpu_svm *svm, bool spec_ctrl_intercepted);
745747 void __svm_vcpu_run(struct vcpu_svm *svm, bool spec_ctrl_intercepted);
746748
749+#define DEFINE_KVM_GHCB_ACCESSORS(field) \
750+ static __always_inline bool kvm_ghcb_##field##_is_valid(const struct vcpu_svm *svm) \
751+ { \
752+ return test_bit(GHCB_BITMAP_IDX(field), \
753+ (unsigned long *)&svm->sev_es.valid_bitmap); \
754+ } \
755+ \
756+ static __always_inline u64 kvm_ghcb_get_##field##_if_valid(struct vcpu_svm *svm, struct ghcb *ghcb) \
757+ { \
758+ return kvm_ghcb_##field##_is_valid(svm) ? ghcb->save.field : 0; \
759+ } \
760+
761+DEFINE_KVM_GHCB_ACCESSORS(cpl)
762+DEFINE_KVM_GHCB_ACCESSORS(rax)
763+DEFINE_KVM_GHCB_ACCESSORS(rcx)
764+DEFINE_KVM_GHCB_ACCESSORS(rdx)
765+DEFINE_KVM_GHCB_ACCESSORS(rbx)
766+DEFINE_KVM_GHCB_ACCESSORS(rsi)
767+DEFINE_KVM_GHCB_ACCESSORS(sw_exit_code)
768+DEFINE_KVM_GHCB_ACCESSORS(sw_exit_info_1)
769+DEFINE_KVM_GHCB_ACCESSORS(sw_exit_info_2)
770+DEFINE_KVM_GHCB_ACCESSORS(sw_scratch)
771+DEFINE_KVM_GHCB_ACCESSORS(xcr0)
772+
747773 #endif
arch/x86/kvm/svm/vmenter.S+3−0
@@ -224,6 +224,9 @@ SYM_FUNC_START(__svm_vcpu_run) · 223 unmodified lines
224224 */
225225 UNTRAIN_RET
226226
227+ /* SRSO */
228+ ALTERNATIVE "", "call entry_ibpb", X86_FEATURE_IBPB_ON_VMEXIT
229+
227230 /*
228231 * Clear all general purpose registers except RSP and RAX to prevent
229232 * speculative use of the guest's values, even those that are reloaded
arch/x86/kvm/vmx/vmenter.S+4−4
@@ -303,10 +303,8 @@ SYM_FUNC_START(vmx_do_nmi_irqoff) · 302 unmodified lines
303303 VMX_DO_EVENT_IRQOFF call asm_exc_nmi_kvm_vmx
304304 SYM_FUNC_END(vmx_do_nmi_irqoff)
305305
306−
307−.section .text, "ax"
308−
309306 #ifndef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
307+
310308 /**
311309 * vmread_error_trampoline - Trampoline from inline asm to vmread_error()
312310 * @field: VMCS field encoding that failed
@@ -335,7 +333,7 @@ SYM_FUNC_START(vmread_error_trampoline) · 22 unmodified lines
335333 mov 3*WORD_SIZE(%_ASM_BP), %_ASM_ARG2
336334 mov 2*WORD_SIZE(%_ASM_BP), %_ASM_ARG1
337335
338− call vmread_error
336+ call vmread_error_trampoline2
339337
340338 /* Zero out @fault, which will be popped into the result register. */
341339 _ASM_MOV $0, 3*WORD_SIZE(%_ASM_BP)
@@ -357,6 +355,8 @@ SYM_FUNC_START(vmread_error_trampoline) · 15 unmodified lines
357355 SYM_FUNC_END(vmread_error_trampoline)
358356 #endif
359357
358+.section .text, "ax"
359+
360360 SYM_FUNC_START(vmx_do_interrupt_irqoff)
361361 VMX_DO_EVENT_IRQOFF CALL_NOSPEC _ASM_ARG1
362362 SYM_FUNC_END(vmx_do_interrupt_irqoff)
arch/x86/kvm/vmx/vmx.c+46−16
@@ -441,13 +441,23 @@ do { \ · 440 unmodified lines
441441 pr_warn_ratelimited(fmt); \
442442 } while (0)
443443
444−void vmread_error(unsigned long field, bool fault)
444+noinline void vmread_error(unsigned long field)
445445 {
446− if (fault)
446+ vmx_insn_failed("vmread failed: field=%lx\n", field);
447+}
448+
449+#ifndef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
450+noinstr void vmread_error_trampoline2(unsigned long field, bool fault)
451+{
452+ if (fault) {
447453 kvm_spurious_fault();
448− else
449− vmx_insn_failed("vmread failed: field=%lx\n", field);
454+ } else {
455+ instrumentation_begin();
456+ vmread_error(field);
457+ instrumentation_end();
458+ }
450459 }
460+#endif
451461
452462 noinline void vmwrite_error(unsigned long field, unsigned long value)
453463 {
@@ -1503,6 +1513,11 @@ void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) · 1049 unmodified lines
15031513 struct vcpu_vmx *vmx = to_vmx(vcpu);
15041514 unsigned long old_rflags;
15051515
1516+ /*
1517+ * Unlike CR0 and CR4, RFLAGS handling requires checking if the vCPU
1518+ * is an unrestricted guest in order to mark L2 as needing emulation
1519+ * if L1 runs L2 as a restricted guest.
1520+ */
15061521 if (is_unrestricted_guest(vcpu)) {
15071522 kvm_register_mark_available(vcpu, VCPU_EXREG_RFLAGS);
15081523 vmx->rflags = rflags;
@@ -3037,6 +3052,15 @@ static void enter_rmode(struct kvm_vcpu *vcpu) · 1528 unmodified lines
30373052 struct vcpu_vmx *vmx = to_vmx(vcpu);
30383053 struct kvm_vmx *kvm_vmx = to_kvm_vmx(vcpu->kvm);
30393054
3055+ /*
3056+ * KVM should never use VM86 to virtualize Real Mode when L2 is active,
3057+ * as using VM86 is unnecessary if unrestricted guest is enabled, and
3058+ * if unrestricted guest is disabled, VM-Enter (from L1) with CR0.PG=0
3059+ * should VM-Fail and KVM should reject userspace attempts to stuff
3060+ * CR0.PG=0 when L2 is active.
3061+ */
3062+ WARN_ON_ONCE(is_guest_mode(vcpu));
3063+
30403064 vmx_get_segment(vcpu, &vmx->rmode.segs[VCPU_SREG_TR], VCPU_SREG_TR);
30413065 vmx_get_segment(vcpu, &vmx->rmode.segs[VCPU_SREG_ES], VCPU_SREG_ES);
30423066 vmx_get_segment(vcpu, &vmx->rmode.segs[VCPU_SREG_DS], VCPU_SREG_DS);
@@ -3226,6 +3250,17 @@ void ept_save_pdptrs(struct kvm_vcpu *vcpu) · 183 unmodified lines
32263250 #define CR3_EXITING_BITS (CPU_BASED_CR3_LOAD_EXITING | \
32273251 CPU_BASED_CR3_STORE_EXITING)
32283252
3253+static bool vmx_is_valid_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
3254+{
3255+ if (is_guest_mode(vcpu))
3256+ return nested_guest_cr0_valid(vcpu, cr0);
3257+
3258+ if (to_vmx(vcpu)->nested.vmxon)
3259+ return nested_host_cr0_valid(vcpu, cr0);
3260+
3261+ return true;
3262+}
3263+
32293264 void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
32303265 {
32313266 struct vcpu_vmx *vmx = to_vmx(vcpu);
@@ -3235,7 +3270,7 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) · 3 unmodified lines
32353270 old_cr0_pg = kvm_read_cr0_bits(vcpu, X86_CR0_PG);
32363271
32373272 hw_cr0 = (cr0 & ~KVM_VM_CR0_ALWAYS_OFF);
3238− if (is_unrestricted_guest(vcpu))
3273+ if (enable_unrestricted_guest)
32393274 hw_cr0 |= KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST;
32403275 else {
32413276 hw_cr0 |= KVM_VM_CR0_ALWAYS_ON;
@@ -3263,7 +3298,7 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) · 21 unmodified lines
32633298 }
32643299 #endif
32653300
3266− if (enable_ept && !is_unrestricted_guest(vcpu)) {
3301+ if (enable_ept && !enable_unrestricted_guest) {
32673302 /*
32683303 * Ensure KVM has an up-to-date snapshot of the guest's CR3. If
32693304 * the below code _enables_ CR3 exiting, vmx_cache_reg() will
@@ -3394,7 +3429,7 @@ void vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) · 124 unmodified lines
33943429 * this bit, even if host CR4.MCE == 0.
33953430 */
33963431 hw_cr4 = (cr4_read_shadow() & X86_CR4_MCE) | (cr4 & ~X86_CR4_MCE);
3397− if (is_unrestricted_guest(vcpu))
3432+ if (enable_unrestricted_guest)
33983433 hw_cr4 |= KVM_VM_CR4_ALWAYS_ON_UNRESTRICTED_GUEST;
33993434 else if (vmx->rmode.vm86_active)
34003435 hw_cr4 |= KVM_RMODE_VM_CR4_ALWAYS_ON;
@@ -3414,7 +3449,7 @@ void vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) · 13 unmodified lines
34143449 vcpu->arch.cr4 = cr4;
34153450 kvm_register_mark_available(vcpu, VCPU_EXREG_CR4);
34163451
3417− if (!is_unrestricted_guest(vcpu)) {
3452+ if (!enable_unrestricted_guest) {
34183453 if (enable_ept) {
34193454 if (!is_paging(vcpu)) {
34203455 hw_cr4 &= ~X86_CR4_PAE;
@@ -4651,7 +4686,8 @@ static int vmx_alloc_ipiv_pid_table(struct kvm *kvm) · 1230 unmodified lines
46514686 if (kvm_vmx->pid_table)
46524687 return 0;
46534688
4654− pages = alloc_pages(GFP_KERNEL | __GFP_ZERO, vmx_get_pid_table_order(kvm));
4689+ pages = alloc_pages(GFP_KERNEL_ACCOUNT | __GFP_ZERO,
4690+ vmx_get_pid_table_order(kvm));
46554691 if (!pages)
46564692 return -ENOMEM;
46574693
@@ -5364,18 +5400,11 @@ static int handle_set_cr0(struct kvm_vcpu *vcpu, unsigned long val) · 706 unmodified lines
53645400 val = (val & ~vmcs12->cr0_guest_host_mask) |
53655401 (vmcs12->guest_cr0 & vmcs12->cr0_guest_host_mask);
53665402
5367− if (!nested_guest_cr0_valid(vcpu, val))
5368− return 1;
5369−
53705403 if (kvm_set_cr0(vcpu, val))
53715404 return 1;
53725405 vmcs_writel(CR0_READ_SHADOW, orig_val);
53735406 return 0;
53745407 } else {
5375− if (to_vmx(vcpu)->nested.vmxon &&
5376− !nested_host_cr0_valid(vcpu, val))
5377− return 1;
5378−
53795408 return kvm_set_cr0(vcpu, val);
53805409 }
53815410 }
@@ -8203,6 +8232,7 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { · 2821 unmodified lines
82038232 .set_segment = vmx_set_segment,
82048233 .get_cpl = vmx_get_cpl,
82058234 .get_cs_db_l_bits = vmx_get_cs_db_l_bits,
8235+ .is_valid_cr0 = vmx_is_valid_cr0,
82068236 .set_cr0 = vmx_set_cr0,
82078237 .is_valid_cr4 = vmx_is_valid_cr4,
82088238 .set_cr4 = vmx_set_cr4,
arch/x86/kvm/vmx/vmx_ops.h+9−3
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 #include "vmcs.h"
1111 #include "../x86.h"
1212
13−void vmread_error(unsigned long field, bool fault);
13+void vmread_error(unsigned long field);
1414 void vmwrite_error(unsigned long field, unsigned long value);
1515 void vmclear_error(struct vmcs *vmcs, u64 phys_addr);
1616 void vmptrld_error(struct vmcs *vmcs, u64 phys_addr);
@@ -31,6 +31,13 @@ void invept_error(unsigned long ext, u64 eptp, gpa_t gpa); · 14 unmodified lines
3131 * void vmread_error_trampoline(unsigned long field, bool fault);
3232 */
3333 extern unsigned long vmread_error_trampoline;
34+
35+/*
36+ * The second VMREAD error trampoline, called from the assembly trampoline,
37+ * exists primarily to enable instrumentation for the VM-Fail path.
38+ */
39+void vmread_error_trampoline2(unsigned long field, bool fault);
40+
3441 #endif
3542
3643 static __always_inline void vmcs_check16(unsigned long field)
@@ -101,8 +108,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field) · 64 unmodified lines
101108
102109 do_fail:
103110 instrumentation_begin();
104− WARN_ONCE(1, KBUILD_MODNAME ": vmread failed: field=%lx\n", field);
105− pr_warn_ratelimited(KBUILD_MODNAME ": vmread failed: field=%lx\n", field);
111+ vmread_error(field);
106112 instrumentation_end();
107113 return 0;
108114
arch/x86/kvm/x86.c+38−17
@@ -906,6 +906,22 @@ int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3) · 905 unmodified lines
906906 }
907907 EXPORT_SYMBOL_GPL(load_pdptrs);
908908
909+static bool kvm_is_valid_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
910+{
911+#ifdef CONFIG_X86_64
912+ if (cr0 & 0xffffffff00000000UL)
913+ return false;
914+#endif
915+
916+ if ((cr0 & X86_CR0_NW) && !(cr0 & X86_CR0_CD))
917+ return false;
918+
919+ if ((cr0 & X86_CR0_PG) && !(cr0 & X86_CR0_PE))
920+ return false;
921+
922+ return static_call(kvm_x86_is_valid_cr0)(vcpu, cr0);
923+}
924+
909925 void kvm_post_set_cr0(struct kvm_vcpu *vcpu, unsigned long old_cr0, unsigned long cr0)
910926 {
911927 /*
@@ -952,20 +968,13 @@ int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) · 40 unmodified lines
952968 {
953969 unsigned long old_cr0 = kvm_read_cr0(vcpu);
954970
955− cr0 |= X86_CR0_ET;
956−
957−#ifdef CONFIG_X86_64
958− if (cr0 & 0xffffffff00000000UL)
971+ if (!kvm_is_valid_cr0(vcpu, cr0))
959972 return 1;
960−#endif
961−
962− cr0 &= ~CR0_RESERVED_BITS;
963973
964− if ((cr0 & X86_CR0_NW) && !(cr0 & X86_CR0_CD))
965− return 1;
974+ cr0 |= X86_CR0_ET;
966975
967− if ((cr0 & X86_CR0_PG) && !(cr0 & X86_CR0_PE))
968− return 1;
976+ /* Write to CR0 reserved bits are ignored, even on Intel. */
977+ cr0 &= ~CR0_RESERVED_BITS;
969978
970979 #ifdef CONFIG_X86_64
971980 if ((vcpu->arch.efer & EFER_LME) && !is_paging(vcpu) &&
@@ -1607,7 +1616,7 @@ static bool kvm_is_immutable_feature_msr(u32 msr) · 635 unmodified lines
16071616 ARCH_CAP_SKIP_VMENTRY_L1DFLUSH | ARCH_CAP_SSB_NO | ARCH_CAP_MDS_NO | \
16081617 ARCH_CAP_PSCHANGE_MC_NO | ARCH_CAP_TSX_CTRL_MSR | ARCH_CAP_TAA_NO | \
16091618 ARCH_CAP_SBDR_SSDP_NO | ARCH_CAP_FBSDP_NO | ARCH_CAP_PSDP_NO | \
1610− ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO)
1619+ ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO)
16111620
16121621 static u64 kvm_get_arch_capabilities(void)
16131622 {
@@ -1664,6 +1673,9 @@ static u64 kvm_get_arch_capabilities(void) · 50 unmodified lines
16641673 */
16651674 }
16661675
1676+ if (!boot_cpu_has_bug(X86_BUG_GDS) || gds_ucode_mitigated())
1677+ data |= ARCH_CAP_GDS_NO;
1678+
16671679 return data;
16681680 }
16691681
@@ -2172,6 +2184,8 @@ fastpath_t handle_fastpath_set_msr_irqoff(struct kvm_vcpu *vcpu) · 502 unmodified lines
21722184 u64 data;
21732185 fastpath_t ret = EXIT_FASTPATH_NONE;
21742186
2187+ kvm_vcpu_srcu_read_lock(vcpu);
2188+
21752189 switch (msr) {
21762190 case APIC_BASE_MSR + (APIC_ICR >> 4):
21772191 data = kvm_read_edx_eax(vcpu);
@@ -2194,6 +2208,8 @@ fastpath_t handle_fastpath_set_msr_irqoff(struct kvm_vcpu *vcpu) · 16 unmodified lines
21942208 if (ret != EXIT_FASTPATH_NONE)
21952209 trace_kvm_msr_write(msr, data);
21962210
2211+ kvm_vcpu_srcu_read_unlock(vcpu);
2212+
21972213 return ret;
21982214 }
21992215 EXPORT_SYMBOL_GPL(handle_fastpath_set_msr_irqoff);
@@ -10203,9 +10219,13 @@ static int kvm_check_and_inject_events(struct kvm_vcpu *vcpu, · 8003 unmodified lines
1020310219 if (r < 0)
1020410220 goto out;
1020510221 if (r) {
10206− kvm_queue_interrupt(vcpu, kvm_cpu_get_interrupt(vcpu), false);
10207− static_call(kvm_x86_inject_irq)(vcpu, false);
10208− WARN_ON(static_call(kvm_x86_interrupt_allowed)(vcpu, true) < 0);
10222+ int irq = kvm_cpu_get_interrupt(vcpu);
10223+
10224+ if (!WARN_ON_ONCE(irq == -1)) {
10225+ kvm_queue_interrupt(vcpu, irq, false);
10226+ static_call(kvm_x86_inject_irq)(vcpu, false);
10227+ WARN_ON(static_call(kvm_x86_interrupt_allowed)(vcpu, true) < 0);
10228+ }
1020910229 }
1021010230 if (kvm_cpu_has_injectable_intr(vcpu))
1021110231 static_call(kvm_x86_enable_irq_window)(vcpu);
@@ -11460,7 +11480,8 @@ static bool kvm_is_valid_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) · 1248 unmodified lines
1146011480 return false;
1146111481 }
1146211482
11463− return kvm_is_valid_cr4(vcpu, sregs->cr4);
11483+ return kvm_is_valid_cr4(vcpu, sregs->cr4) &&
11484+ kvm_is_valid_cr0(vcpu, sregs->cr0);
1146411485 }
1146511486
1146611487 static int __set_sregs_common(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs,
@@ -13185,7 +13206,7 @@ EXPORT_SYMBOL_GPL(kvm_arch_has_noncoherent_dma); · 1718 unmodified lines
1318513206
1318613207 bool kvm_arch_has_irq_bypass(void)
1318713208 {
13188− return true;
13209+ return enable_apicv && irq_remapping_cap(IRQ_POSTING_CAP);
1318913210 }
1319013211
1319113212 int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
arch/x86/lib/retpoline.S+79−4
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <asm/unwind_hints.h>
1212 #include <asm/percpu.h>
1313 #include <asm/frame.h>
14+#include <asm/nops.h>
1415
1516 .section .text.__x86.indirect_thunk
1617
@@ -131,6 +132,46 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) · 114 unmodified lines
131132 */
132133 #ifdef CONFIG_RETHUNK
133134
135+/*
136+ * srso_untrain_ret_alias() and srso_safe_ret_alias() are placed at
137+ * special addresses:
138+ *
139+ * - srso_untrain_ret_alias() is 2M aligned
140+ * - srso_safe_ret_alias() is also in the same 2M page but bits 2, 8, 14
141+ * and 20 in its virtual address are set (while those bits in the
142+ * srso_untrain_ret_alias() function are cleared).
143+ *
144+ * This guarantees that those two addresses will alias in the branch
145+ * target buffer of Zen3/4 generations, leading to any potential
146+ * poisoned entries at that BTB slot to get evicted.
147+ *
148+ * As a result, srso_safe_ret_alias() becomes a safe return.
149+ */
150+#ifdef CONFIG_CPU_SRSO
151+ .section .text.__x86.rethunk_untrain
152+
153+SYM_START(srso_untrain_ret_alias, SYM_L_GLOBAL, SYM_A_NONE)
154+ ANNOTATE_NOENDBR
155+ ASM_NOP2
156+ lfence
157+ jmp __x86_return_thunk
158+SYM_FUNC_END(srso_untrain_ret_alias)
159+__EXPORT_THUNK(srso_untrain_ret_alias)
160+
161+ .section .text.__x86.rethunk_safe
162+#endif
163+
164+/* Needs a definition for the __x86_return_thunk alternative below. */
165+SYM_START(srso_safe_ret_alias, SYM_L_GLOBAL, SYM_A_NONE)
166+#ifdef CONFIG_CPU_SRSO
167+ add $8, %_ASM_SP
168+ UNWIND_HINT_FUNC
169+#endif
170+ ANNOTATE_UNRET_SAFE
171+ ret
172+ int3
173+SYM_FUNC_END(srso_safe_ret_alias)
174+
134175 .section .text.__x86.return_thunk
135176
136177 /*
@@ -143,7 +184,7 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) · 6 unmodified lines
143184 * from re-poisioning the BTB prediction.
144185 */
145186 .align 64
146− .skip 64 - (__x86_return_thunk - zen_untrain_ret), 0xcc
187+ .skip 64 - (__ret - zen_untrain_ret), 0xcc
147188 SYM_START(zen_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
148189 ANNOTATE_NOENDBR
149190 /*
@@ -175,10 +216,10 @@ SYM_START(zen_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) · 25 unmodified lines
175216 * evicted, __x86_return_thunk will suffer Straight Line Speculation
176217 * which will be contained safely by the INT3.
177218 */
178−SYM_INNER_LABEL(__x86_return_thunk, SYM_L_GLOBAL)
219+SYM_INNER_LABEL(__ret, SYM_L_GLOBAL)
179220 ret
180221 int3
181−SYM_CODE_END(__x86_return_thunk)
222+SYM_CODE_END(__ret)
182223
183224 /*
184225 * Ensure the TEST decoding / BTB invalidation is complete.
@@ -189,11 +230,45 @@ SYM_CODE_END(__x86_return_thunk) · 4 unmodified lines
189230 * Jump back and execute the RET in the middle of the TEST instruction.
190231 * INT3 is for SLS protection.
191232 */
192− jmp __x86_return_thunk
233+ jmp __ret
193234 int3
194235 SYM_FUNC_END(zen_untrain_ret)
195236 __EXPORT_THUNK(zen_untrain_ret)
196237
238+/*
239+ * SRSO untraining sequence for Zen1/2, similar to zen_untrain_ret()
240+ * above. On kernel entry, srso_untrain_ret() is executed which is a
241+ *
242+ * movabs $0xccccccc308c48348,%rax
243+ *
244+ * and when the return thunk executes the inner label srso_safe_ret()
245+ * later, it is a stack manipulation and a RET which is mispredicted and
246+ * thus a "safe" one to use.
247+ */
248+ .align 64
249+ .skip 64 - (srso_safe_ret - srso_untrain_ret), 0xcc
250+SYM_START(srso_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
251+ ANNOTATE_NOENDBR
252+ .byte 0x48, 0xb8
253+
254+SYM_INNER_LABEL(srso_safe_ret, SYM_L_GLOBAL)
255+ add $8, %_ASM_SP
256+ ret
257+ int3
258+ int3
259+ int3
260+ lfence
261+ call srso_safe_ret
262+ int3
263+SYM_CODE_END(srso_safe_ret)
264+SYM_FUNC_END(srso_untrain_ret)
265+__EXPORT_THUNK(srso_untrain_ret)
266+
267+SYM_FUNC_START(__x86_return_thunk)
268+ ALTERNATIVE_2 "jmp __ret", "call srso_safe_ret", X86_FEATURE_SRSO, \
269+ "call srso_safe_ret_alias", X86_FEATURE_SRSO_ALIAS
270+ int3
271+SYM_CODE_END(__x86_return_thunk)
197272 EXPORT_SYMBOL(__x86_return_thunk)
198273
199274 #endif /* CONFIG_RETHUNK */
block/blk-core.c+0−6
@@ -722,14 +722,9 @@ void submit_bio_noacct(struct bio *bio) · 721 unmodified lines
722722 struct block_device *bdev = bio->bi_bdev;
723723 struct request_queue *q = bdev_get_queue(bdev);
724724 blk_status_t status = BLK_STS_IOERR;
725− struct blk_plug *plug;
726725
727726 might_sleep();
728727
729− plug = blk_mq_plug(bio);
730− if (plug && plug->nowait)
731− bio->bi_opf |= REQ_NOWAIT;
732−
733728 /*
734729 * For a REQ_NOWAIT based request, return -EOPNOTSUPP
735730 * if queue does not support NOWAIT.
@@ -1059,7 +1054,6 @@ void blk_start_plug_nr_ios(struct blk_plug *plug, unsigned short nr_ios) · 323 unmodified lines
10591054 plug->rq_count = 0;
10601055 plug->multiple_queues = false;
10611056 plug->has_elevator = false;
1062− plug->nowait = false;
10631057 INIT_LIST_HEAD(&plug->cb_list);
10641058
10651059 /*
block/blk-iocost.c+3−2
@@ -3301,11 +3301,12 @@ static ssize_t ioc_qos_write(struct kernfs_open_file *of, char *input, · 3300 unmodified lines
33013301 if (qos[QOS_MIN] > qos[QOS_MAX])
33023302 goto einval;
33033303
3304− if (enable) {
3304+ if (enable && !ioc->enabled) {
33053305 blk_stat_enable_accounting(disk->queue);
33063306 blk_queue_flag_set(QUEUE_FLAG_RQ_ALLOC_TIME, disk->queue);
33073307 ioc->enabled = true;
3308− } else {
3308+ } else if (!enable && ioc->enabled) {
3309+ blk_stat_disable_accounting(disk->queue);
33093310 blk_queue_flag_clear(QUEUE_FLAG_RQ_ALLOC_TIME, disk->queue);
33103311 ioc->enabled = false;
33113312 }
block/fops.c+4−3
@@ -358,13 +358,14 @@ static ssize_t __blkdev_direct_IO_async(struct kiocb *iocb, · 357 unmodified lines
358358 task_io_account_write(bio->bi_iter.bi_size);
359359 }
360360
361+ if (iocb->ki_flags & IOCB_NOWAIT)
362+ bio->bi_opf |= REQ_NOWAIT;
363+
361364 if (iocb->ki_flags & IOCB_HIPRI) {
362− bio->bi_opf |= REQ_POLLED | REQ_NOWAIT;
365+ bio->bi_opf |= REQ_POLLED;
363366 submit_bio(bio);
364367 WRITE_ONCE(iocb->private, bio);
365368 } else {
366− if (iocb->ki_flags & IOCB_NOWAIT)
367− bio->bi_opf |= REQ_NOWAIT;
368369 submit_bio(bio);
369370 }
370371 return -EIOCBQUEUED;
drivers/accel/ivpu/ivpu_gem.c+8−0
@@ -173,6 +173,9 @@ static void internal_free_pages_locked(struct ivpu_bo *bo) · 172 unmodified lines
173173 {
174174 unsigned int i, npages = bo->base.size >> PAGE_SHIFT;
175175
176+ if (ivpu_bo_cache_mode(bo) != DRM_IVPU_BO_CACHED)
177+ set_pages_array_wb(bo->pages, bo->base.size >> PAGE_SHIFT);
178+
176179 for (i = 0; i < npages; i++)
177180 put_page(bo->pages[i]);
178181
@@ -587,6 +590,11 @@ ivpu_bo_alloc_internal(struct ivpu_device *vdev, u64 vpu_addr, u64 size, u32 fla · 408 unmodified lines
587590 if (ivpu_bo_cache_mode(bo) != DRM_IVPU_BO_CACHED)
588591 drm_clflush_pages(bo->pages, bo->base.size >> PAGE_SHIFT);
589592
593+ if (bo->flags & DRM_IVPU_BO_WC)
594+ set_pages_array_wc(bo->pages, bo->base.size >> PAGE_SHIFT);
595+ else if (bo->flags & DRM_IVPU_BO_UNCACHED)
596+ set_pages_array_uc(bo->pages, bo->base.size >> PAGE_SHIFT);
597+
590598 prot = ivpu_bo_pgprot(bo, PAGE_KERNEL);
591599 bo->kvaddr = vmap(bo->pages, bo->base.size >> PAGE_SHIFT, VM_MAP, prot);
592600 if (!bo->kvaddr) {
drivers/acpi/arm64/iort.c+0−3
@@ -1007,9 +1007,6 @@ static void iort_node_get_rmr_info(struct acpi_iort_node *node, · 1006 unmodified lines
10071007 for (i = 0; i < node->mapping_count; i++, map++) {
10081008 struct acpi_iort_node *parent;
10091009
1010− if (!map->id_count)
1011− continue;
1012−
10131010 parent = ACPI_ADD_PTR(struct acpi_iort_node, iort_table,
10141011 map->output_reference);
10151012 if (parent != iommu)
drivers/acpi/resource.c+64−0
@@ -470,6 +470,45 @@ static const struct dmi_system_id asus_laptop[] = { · 469 unmodified lines
470470 { }
471471 };
472472
473+static const struct dmi_system_id tongfang_gm_rg[] = {
474+ {
475+ .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD",
476+ .matches = {
477+ DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
478+ },
479+ },
480+ { }
481+};
482+
483+static const struct dmi_system_id maingear_laptop[] = {
484+ {
485+ .ident = "MAINGEAR Vector Pro 2 15",
486+ .matches = {
487+ DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"),
488+ DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"),
489+ }
490+ },
491+ {
492+ .ident = "MAINGEAR Vector Pro 2 17",
493+ .matches = {
494+ DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"),
495+ DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"),
496+ },
497+ },
498+ { }
499+};
500+
501+static const struct dmi_system_id pcspecialist_laptop[] = {
502+ {
503+ .ident = "PCSpecialist Elimina Pro 16 M",
504+ .matches = {
505+ DMI_MATCH(DMI_SYS_VENDOR, "PCSpecialist"),
506+ DMI_MATCH(DMI_PRODUCT_NAME, "Elimina Pro 16 M"),
507+ },
508+ },
509+ { }
510+};
511+
473512 static const struct dmi_system_id lg_laptop[] = {
474513 {
475514 .ident = "LG Electronics 17U70P",
@@ -493,6 +532,9 @@ struct irq_override_cmp { · 17 unmodified lines
493532 static const struct irq_override_cmp override_table[] = {
494533 { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
495534 { asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
535+ { tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
536+ { maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
537+ { pcspecialist_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
496538 { lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
497539 };
498540
@@ -512,6 +554,28 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity, · 13 unmodified lines
512554 return entry->override;
513555 }
514556
557+#ifdef CONFIG_X86
558+ /*
559+ * Always use the MADT override info, except for the i8042 PS/2 ctrl
560+ * IRQs (1 and 12). For these the DSDT IRQ settings should sometimes
561+ * be used otherwise PS/2 keyboards / mice will not work.
562+ */
563+ if (gsi != 1 && gsi != 12)
564+ return true;
565+
566+ /* If the override comes from an INT_SRC_OVR MADT entry, honor it. */
567+ if (acpi_int_src_ovr[gsi])
568+ return true;
569+
570+ /*
571+ * IRQ override isn't needed on modern AMD Zen systems and
572+ * this override breaks active low IRQs on AMD Ryzen 6000 and
573+ * newer systems. Skip it.
574+ */
575+ if (boot_cpu_has(X86_FEATURE_ZEN))
576+ return false;
577+#endif
578+
515579 return true;
516580 }
517581
drivers/acpi/scan.c+1−0
@@ -1714,6 +1714,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) · 1713 unmodified lines
17141714 {"BSG1160", },
17151715 {"BSG2150", },
17161716 {"CSC3551", },
1717+ {"CSC3556", },
17171718 {"INT33FE", },
17181719 {"INT3515", },
17191720 /* Non-conforming _HID for Cirrus Logic already released */
drivers/android/binder.c+1−0
@@ -6617,6 +6617,7 @@ err_init_binder_device_failed: · 6616 unmodified lines
66176617
66186618 err_alloc_device_names_failed:
66196619 debugfs_remove_recursive(binder_debugfs_dir_entry_root);
6620+ binder_alloc_shrinker_exit();
66206621
66216622 return ret;
66226623 }
drivers/android/binder_alloc.c+6−0
@@ -1087,6 +1087,12 @@ int binder_alloc_shrinker_init(void) · 1086 unmodified lines
10871087 return ret;
10881088 }
10891089
1090+void binder_alloc_shrinker_exit(void)
1091+{
1092+ unregister_shrinker(&binder_shrinker);
1093+ list_lru_destroy(&binder_alloc_lru);
1094+}
1095+
10901096 /**
10911097 * check_buffer() - verify that buffer/offset is safe to access
10921098 * @alloc: binder_alloc for this proc
drivers/android/binder_alloc.h+1−0
@@ -129,6 +129,7 @@ extern struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc, · 128 unmodified lines
129129 int pid);
130130 extern void binder_alloc_init(struct binder_alloc *alloc);
131131 extern int binder_alloc_shrinker_init(void);
132+extern void binder_alloc_shrinker_exit(void);
132133 extern void binder_alloc_vma_close(struct binder_alloc *alloc);
133134 extern struct binder_buffer *
134135 binder_alloc_prepare_to_free(struct binder_alloc *alloc,
drivers/ata/libata-core.c+2−2
@@ -4938,8 +4938,8 @@ void ata_qc_complete(struct ata_queued_cmd *qc) · 4937 unmodified lines
49384938 if (qc->result_tf.status & ATA_SENSE &&
49394939 ((ata_is_ncq(qc->tf.protocol) &&
49404940 dev->flags & ATA_DFLAG_CDL_ENABLED) ||
4941− (!(ata_is_ncq(qc->tf.protocol) &&
4942− ata_id_sense_reporting_enabled(dev->id))))) {
4941+ (!ata_is_ncq(qc->tf.protocol) &&
4942+ ata_id_sense_reporting_enabled(dev->id)))) {
49434943 /*
49444944 * Tell SCSI EH to not overwrite scmd->result even if
49454945 * this command is finished with result SAM_STAT_GOOD.
drivers/ata/libata-scsi.c+7−0
@@ -1100,7 +1100,14 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev) · 1099 unmodified lines
11001100 }
11011101 } else {
11021102 sdev->sector_size = ata_id_logical_sector_size(dev->id);
1103+ /*
1104+ * Stop the drive on suspend but do not issue START STOP UNIT
1105+ * on resume as this is not necessary and may fail: the device
1106+ * will be woken up by ata_port_pm_resume() with a port reset
1107+ * and device revalidation.
1108+ */
11031109 sdev->manage_start_stop = 1;
1110+ sdev->no_start_on_resume = 1;
11041111 }
11051112
11061113 /*
drivers/ata/pata_arasan_cf.c+2−1
@@ -529,7 +529,8 @@ static void data_xfer(struct work_struct *work) · 528 unmodified lines
529529 /* dma_request_channel may sleep, so calling from process context */
530530 acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
531531 if (IS_ERR(acdev->dma_chan)) {
532− dev_err(acdev->host->dev, "Unable to get dma_chan\n");
532+ dev_err_probe(acdev->host->dev, PTR_ERR(acdev->dma_chan),
533+ "Unable to get dma_chan\n");
533534 acdev->dma_chan = NULL;
534535 goto chan_request_fail;
535536 }
drivers/ata/pata_ns87415.c+1−1
@@ -260,7 +260,7 @@ static u8 ns87560_check_status(struct ata_port *ap) · 259 unmodified lines
260260 * LOCKING:
261261 * Inherited from caller.
262262 */
263−void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
263+static void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
264264 {
265265 struct ata_ioports *ioaddr = &ap->ioaddr;
266266
drivers/ata/pata_octeon_cf.c+3−3
@@ -815,8 +815,8 @@ static int octeon_cf_probe(struct platform_device *pdev) · 814 unmodified lines
815815 irq_handler_t irq_handler = NULL;
816816 void __iomem *base;
817817 struct octeon_cf_port *cf_port;
818− int rv = -ENOMEM;
819818 u32 bus_width;
819+ int rv;
820820
821821 node = pdev->dev.of_node;
822822 if (node == NULL)
@@ -893,12 +893,12 @@ static int octeon_cf_probe(struct platform_device *pdev) · 70 unmodified lines
893893 cs0 = devm_ioremap(&pdev->dev, res_cs0->start,
894894 resource_size(res_cs0));
895895 if (!cs0)
896− return rv;
896+ return -ENOMEM;
897897
898898 /* allocate host */
899899 host = ata_host_alloc(&pdev->dev, 1);
900900 if (!host)
901− return rv;
901+ return -ENOMEM;
902902
903903 ap = host->ports[0];
904904 ap->private_data = cf_port;
drivers/base/cpu.c+23−62
@@ -509,73 +509,30 @@ static void __init cpu_dev_register_generic(void) · 508 unmodified lines
509509 }
510510
511511 #ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
512−
513−ssize_t __weak cpu_show_meltdown(struct device *dev,
514− struct device_attribute *attr, char *buf)
515−{
516− return sysfs_emit(buf, "Not affected\n");
517−}
518−
519−ssize_t __weak cpu_show_spectre_v1(struct device *dev,
520− struct device_attribute *attr, char *buf)
521−{
522− return sysfs_emit(buf, "Not affected\n");
523−}
524−
525−ssize_t __weak cpu_show_spectre_v2(struct device *dev,
526− struct device_attribute *attr, char *buf)
527−{
528− return sysfs_emit(buf, "Not affected\n");
529−}
530−
531−ssize_t __weak cpu_show_spec_store_bypass(struct device *dev,
532− struct device_attribute *attr, char *buf)
533−{
534− return sysfs_emit(buf, "Not affected\n");
535−}
536−
537−ssize_t __weak cpu_show_l1tf(struct device *dev,
538− struct device_attribute *attr, char *buf)
539−{
540− return sysfs_emit(buf, "Not affected\n");
541−}
542−
543−ssize_t __weak cpu_show_mds(struct device *dev,
544− struct device_attribute *attr, char *buf)
545−{
546− return sysfs_emit(buf, "Not affected\n");
547−}
548−
549−ssize_t __weak cpu_show_tsx_async_abort(struct device *dev,
550− struct device_attribute *attr,
551− char *buf)
552−{
553− return sysfs_emit(buf, "Not affected\n");
554−}
555−
556−ssize_t __weak cpu_show_itlb_multihit(struct device *dev,
557− struct device_attribute *attr, char *buf)
558−{
559− return sysfs_emit(buf, "Not affected\n");
560−}
561−
562−ssize_t __weak cpu_show_srbds(struct device *dev,
512+static ssize_t cpu_show_not_affected(struct device *dev,
563513 struct device_attribute *attr, char *buf)
564514 {
565515 return sysfs_emit(buf, "Not affected\n");
566516 }
567517
568−ssize_t __weak cpu_show_mmio_stale_data(struct device *dev,
569− struct device_attribute *attr, char *buf)
570−{
571− return sysfs_emit(buf, "Not affected\n");
572−}
573−
574−ssize_t __weak cpu_show_retbleed(struct device *dev,
575− struct device_attribute *attr, char *buf)
576−{
577− return sysfs_emit(buf, "Not affected\n");
578−}
518+#define CPU_SHOW_VULN_FALLBACK(func) \
519+ ssize_t cpu_show_##func(struct device *, \
520+ struct device_attribute *, char *) \
521+ __attribute__((weak, alias("cpu_show_not_affected")))
522+
523+CPU_SHOW_VULN_FALLBACK(meltdown);
524+CPU_SHOW_VULN_FALLBACK(spectre_v1);
525+CPU_SHOW_VULN_FALLBACK(spectre_v2);
526+CPU_SHOW_VULN_FALLBACK(spec_store_bypass);
527+CPU_SHOW_VULN_FALLBACK(l1tf);
528+CPU_SHOW_VULN_FALLBACK(mds);
529+CPU_SHOW_VULN_FALLBACK(tsx_async_abort);
530+CPU_SHOW_VULN_FALLBACK(itlb_multihit);
531+CPU_SHOW_VULN_FALLBACK(srbds);
532+CPU_SHOW_VULN_FALLBACK(mmio_stale_data);
533+CPU_SHOW_VULN_FALLBACK(retbleed);
534+CPU_SHOW_VULN_FALLBACK(spec_rstack_overflow);
535+CPU_SHOW_VULN_FALLBACK(gds);
579536
580537 static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
581538 static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
@@ -588,6 +545,8 @@ static DEVICE_ATTR(itlb_multihit, 0444, cpu_show_itlb_multihit, NULL); · 6 unmodified lines
588545 static DEVICE_ATTR(srbds, 0444, cpu_show_srbds, NULL);
589546 static DEVICE_ATTR(mmio_stale_data, 0444, cpu_show_mmio_stale_data, NULL);
590547 static DEVICE_ATTR(retbleed, 0444, cpu_show_retbleed, NULL);
548+static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL);
549+static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL);
591550
592551 static struct attribute *cpu_root_vulnerabilities_attrs[] = {
593552 &dev_attr_meltdown.attr,
@@ -601,6 +560,8 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { · 7 unmodified lines
601560 &dev_attr_srbds.attr,
602561 &dev_attr_mmio_stale_data.attr,
603562 &dev_attr_retbleed.attr,
563+ &dev_attr_spec_rstack_overflow.attr,
564+ &dev_attr_gather_data_sampling.attr,
604565 NULL
605566 };
606567
drivers/base/power/power.h+1−0
@@ -29,6 +29,7 @@ extern u64 pm_runtime_active_time(struct device *dev); · 28 unmodified lines
2929 #define WAKE_IRQ_DEDICATED_MASK (WAKE_IRQ_DEDICATED_ALLOCATED | \
3030 WAKE_IRQ_DEDICATED_MANAGED | \
3131 WAKE_IRQ_DEDICATED_REVERSE)
32+#define WAKE_IRQ_DEDICATED_ENABLED BIT(3)
3233
3334 struct wake_irq {
3435 struct device *dev;
drivers/base/power/wakeirq.c+8−53
@@ -194,7 +194,6 @@ err_free: · 193 unmodified lines
194194 return err;
195195 }
196196
197−
198197 /**
199198 * dev_pm_set_dedicated_wake_irq - Request a dedicated wake-up interrupt
200199 * @dev: Device entry
@@ -206,11 +205,6 @@ err_free: · 5 unmodified lines
206205 * Sets up a threaded interrupt handler for a device that has
207206 * a dedicated wake-up interrupt in addition to the device IO
208207 * interrupt.
209− *
210− * The interrupt starts disabled, and needs to be managed for
211− * the device by the bus code or the device driver using
212− * dev_pm_enable_wake_irq*() and dev_pm_disable_wake_irq*()
213− * functions.
214208 */
215209 int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq)
216210 {
@@ -232,11 +226,6 @@ EXPORT_SYMBOL_GPL(dev_pm_set_dedicated_wake_irq); · 15 unmodified lines
232226 * the status of WAKE_IRQ_DEDICATED_REVERSE to tell rpm_suspend()
233227 * to enable dedicated wake-up interrupt after running the runtime suspend
234228 * callback for @dev.
235− *
236− * The interrupt starts disabled, and needs to be managed for
237− * the device by the bus code or the device driver using
238− * dev_pm_enable_wake_irq*() and dev_pm_disable_wake_irq*()
239− * functions.
240229 */
241230 int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq)
242231 {
@@ -244,44 +233,6 @@ int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq) · 1 unmodified line
244233 }
245234 EXPORT_SYMBOL_GPL(dev_pm_set_dedicated_wake_irq_reverse);
246235
247−/**
248− * dev_pm_enable_wake_irq - Enable device wake-up interrupt
249− * @dev: Device
250− *
251− * Optionally called from the bus code or the device driver for
252− * runtime_resume() to override the PM runtime core managed wake-up
253− * interrupt handling to enable the wake-up interrupt.
254− *
255− * Note that for runtime_suspend()) the wake-up interrupts
256− * should be unconditionally enabled unlike for suspend()
257− * that is conditional.
258− */
259−void dev_pm_enable_wake_irq(struct device *dev)
260−{
261− struct wake_irq *wirq = dev->power.wakeirq;
262−
263− if (wirq && (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED))
264− enable_irq(wirq->irq);
265−}
266−EXPORT_SYMBOL_GPL(dev_pm_enable_wake_irq);
267−
268−/**
269− * dev_pm_disable_wake_irq - Disable device wake-up interrupt
270− * @dev: Device
271− *
272− * Optionally called from the bus code or the device driver for
273− * runtime_suspend() to override the PM runtime core managed wake-up
274− * interrupt handling to disable the wake-up interrupt.
275− */
276−void dev_pm_disable_wake_irq(struct device *dev)
277−{
278− struct wake_irq *wirq = dev->power.wakeirq;
279−
280− if (wirq && (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED))
281− disable_irq_nosync(wirq->irq);
282−}
283−EXPORT_SYMBOL_GPL(dev_pm_disable_wake_irq);
284−
285236 /**
286237 * dev_pm_enable_wake_irq_check - Checks and enables wake-up interrupt
287238 * @dev: Device
@@ -314,8 +265,10 @@ void dev_pm_enable_wake_irq_check(struct device *dev, · 26 unmodified lines
314265 return;
315266
316267 enable:
317− if (!can_change_status || !(wirq->status & WAKE_IRQ_DEDICATED_REVERSE))
268+ if (!can_change_status || !(wirq->status & WAKE_IRQ_DEDICATED_REVERSE)) {
318269 enable_irq(wirq->irq);
270+ wirq->status |= WAKE_IRQ_DEDICATED_ENABLED;
271+ }
319272 }
320273
321274 /**
@@ -336,8 +289,10 @@ void dev_pm_disable_wake_irq_check(struct device *dev, bool cond_disable) · 14 unmodified lines
336289 if (cond_disable && (wirq->status & WAKE_IRQ_DEDICATED_REVERSE))
337290 return;
338291
339− if (wirq->status & WAKE_IRQ_DEDICATED_MANAGED)
292+ if (wirq->status & WAKE_IRQ_DEDICATED_MANAGED) {
293+ wirq->status &= ~WAKE_IRQ_DEDICATED_ENABLED;
340294 disable_irq_nosync(wirq->irq);
295+ }
341296 }
342297
343298 /**
@@ -376,7 +331,7 @@ void dev_pm_arm_wake_irq(struct wake_irq *wirq) · 32 unmodified lines
376331
377332 if (device_may_wakeup(wirq->dev)) {
378333 if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
379− !pm_runtime_status_suspended(wirq->dev))
334+ !(wirq->status & WAKE_IRQ_DEDICATED_ENABLED))
380335 enable_irq(wirq->irq);
381336
382337 enable_irq_wake(wirq->irq);
@@ -399,7 +354,7 @@ void dev_pm_disarm_wake_irq(struct wake_irq *wirq) · 16 unmodified lines
399354 disable_irq_wake(wirq->irq);
400355
401356 if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
402− !pm_runtime_status_suspended(wirq->dev))
357+ !(wirq->status & WAKE_IRQ_DEDICATED_ENABLED))
403358 disable_irq_nosync(wirq->irq);
404359 }
405360 }
drivers/block/rbd.c+100−50
@@ -3675,7 +3675,7 @@ static int rbd_lock(struct rbd_device *rbd_dev) · 3674 unmodified lines
36753675 ret = ceph_cls_lock(osdc, &rbd_dev->header_oid, &rbd_dev->header_oloc,
36763676 RBD_LOCK_NAME, CEPH_CLS_LOCK_EXCLUSIVE, cookie,
36773677 RBD_LOCK_TAG, "", 0);
3678− if (ret)
3678+ if (ret && ret != -EEXIST)
36793679 return ret;
36803680
36813681 __rbd_lock(rbd_dev, cookie);
@@ -3849,51 +3849,82 @@ static void wake_lock_waiters(struct rbd_device *rbd_dev, int result) · 167 unmodified lines
38493849 list_splice_tail_init(&rbd_dev->acquiring_list, &rbd_dev->running_list);
38503850 }
38513851
3852−static int get_lock_owner_info(struct rbd_device *rbd_dev,
3853− struct ceph_locker **lockers, u32 *num_lockers)
3852+static bool locker_equal(const struct ceph_locker *lhs,
3853+ const struct ceph_locker *rhs)
3854+{
3855+ return lhs->id.name.type == rhs->id.name.type &&
3856+ lhs->id.name.num == rhs->id.name.num &&
3857+ !strcmp(lhs->id.cookie, rhs->id.cookie) &&
3858+ ceph_addr_equal_no_type(&lhs->info.addr, &rhs->info.addr);
3859+}
3860+
3861+static void free_locker(struct ceph_locker *locker)
3862+{
3863+ if (locker)
3864+ ceph_free_lockers(locker, 1);
3865+}
3866+
3867+static struct ceph_locker *get_lock_owner_info(struct rbd_device *rbd_dev)
38543868 {
38553869 struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc;
3870+ struct ceph_locker *lockers;
3871+ u32 num_lockers;
38563872 u8 lock_type;
38573873 char *lock_tag;
3874+ u64 handle;
38583875 int ret;
38593876
3860− dout("%s rbd_dev %p\n", __func__, rbd_dev);
3861−
38623877 ret = ceph_cls_lock_info(osdc, &rbd_dev->header_oid,
38633878 &rbd_dev->header_oloc, RBD_LOCK_NAME,
3864− &lock_type, &lock_tag, lockers, num_lockers);
3865− if (ret)
3866− return ret;
3879+ &lock_type, &lock_tag, &lockers, &num_lockers);
3880+ if (ret) {
3881+ rbd_warn(rbd_dev, "failed to get header lockers: %d", ret);
3882+ return ERR_PTR(ret);
3883+ }
38673884
3868− if (*num_lockers == 0) {
3885+ if (num_lockers == 0) {
38693886 dout("%s rbd_dev %p no lockers detected\n", __func__, rbd_dev);
3887+ lockers = NULL;
38703888 goto out;
38713889 }
38723890
38733891 if (strcmp(lock_tag, RBD_LOCK_TAG)) {
38743892 rbd_warn(rbd_dev, "locked by external mechanism, tag %s",
38753893 lock_tag);
3876− ret = -EBUSY;
3877− goto out;
3894+ goto err_busy;
38783895 }
38793896
3880− if (lock_type == CEPH_CLS_LOCK_SHARED) {
3881− rbd_warn(rbd_dev, "shared lock type detected");
3882− ret = -EBUSY;
3883− goto out;
3897+ if (lock_type != CEPH_CLS_LOCK_EXCLUSIVE) {
3898+ rbd_warn(rbd_dev, "incompatible lock type detected");
3899+ goto err_busy;
38843900 }
38853901
3886− if (strncmp((*lockers)[0].id.cookie, RBD_LOCK_COOKIE_PREFIX,
3887− strlen(RBD_LOCK_COOKIE_PREFIX))) {
3902+ WARN_ON(num_lockers != 1);
3903+ ret = sscanf(lockers[0].id.cookie, RBD_LOCK_COOKIE_PREFIX " %llu",
3904+ &handle);
3905+ if (ret != 1) {
38883906 rbd_warn(rbd_dev, "locked by external mechanism, cookie %s",
3889− (*lockers)[0].id.cookie);
3890− ret = -EBUSY;
3891− goto out;
3907+ lockers[0].id.cookie);
3908+ goto err_busy;
3909+ }
3910+ if (ceph_addr_is_blank(&lockers[0].info.addr)) {
3911+ rbd_warn(rbd_dev, "locker has a blank address");
3912+ goto err_busy;
38923913 }
38933914
3915+ dout("%s rbd_dev %p got locker %s%llu@%pISpc/%u handle %llu\n",
3916+ __func__, rbd_dev, ENTITY_NAME(lockers[0].id.name),
3917+ &lockers[0].info.addr.in_addr,
3918+ le32_to_cpu(lockers[0].info.addr.nonce), handle);
3919+
38943920 out:
38953921 kfree(lock_tag);
3896− return ret;
3922+ return lockers;
3923+
3924+err_busy:
3925+ kfree(lock_tag);
3926+ ceph_free_lockers(lockers, num_lockers);
3927+ return ERR_PTR(-EBUSY);
38973928 }
38983929
38993930 static int find_watcher(struct rbd_device *rbd_dev,
@@ -3909,8 +3940,10 @@ static int find_watcher(struct rbd_device *rbd_dev, · 9 unmodified lines
39093940 ret = ceph_osdc_list_watchers(osdc, &rbd_dev->header_oid,
39103941 &rbd_dev->header_oloc, &watchers,
39113942 &num_watchers);
3912− if (ret)
3943+ if (ret) {
3944+ rbd_warn(rbd_dev, "failed to get watchers: %d", ret);
39133945 return ret;
3946+ }
39143947
39153948 sscanf(locker->id.cookie, RBD_LOCK_COOKIE_PREFIX " %llu", &cookie);
39163949 for (i = 0; i < num_watchers; i++) {
@@ -3947,51 +3980,72 @@ out: · 30 unmodified lines
39473980 static int rbd_try_lock(struct rbd_device *rbd_dev)
39483981 {
39493982 struct ceph_client *client = rbd_dev->rbd_client->client;
3950− struct ceph_locker *lockers;
3951− u32 num_lockers;
3983+ struct ceph_locker *locker, *refreshed_locker;
39523984 int ret;
39533985
39543986 for (;;) {
3987+ locker = refreshed_locker = NULL;
3988+
39553989 ret = rbd_lock(rbd_dev);
3956− if (ret != -EBUSY)
3957− return ret;
3990+ if (!ret)
3991+ goto out;
3992+ if (ret != -EBUSY) {
3993+ rbd_warn(rbd_dev, "failed to lock header: %d", ret);
3994+ goto out;
3995+ }
39583996
39593997 /* determine if the current lock holder is still alive */
3960− ret = get_lock_owner_info(rbd_dev, &lockers, &num_lockers);
3961− if (ret)
3962− return ret;
3963−
3964− if (num_lockers == 0)
3998+ locker = get_lock_owner_info(rbd_dev);
3999+ if (IS_ERR(locker)) {
4000+ ret = PTR_ERR(locker);
4001+ locker = NULL;
4002+ goto out;
4003+ }
4004+ if (!locker)
39654005 goto again;
39664006
3967− ret = find_watcher(rbd_dev, lockers);
4007+ ret = find_watcher(rbd_dev, locker);
39684008 if (ret)
39694009 goto out; /* request lock or error */
39704010
4011+ refreshed_locker = get_lock_owner_info(rbd_dev);
4012+ if (IS_ERR(refreshed_locker)) {
4013+ ret = PTR_ERR(refreshed_locker);
4014+ refreshed_locker = NULL;
4015+ goto out;
4016+ }
4017+ if (!refreshed_locker ||
4018+ !locker_equal(locker, refreshed_locker))
4019+ goto again;
4020+
39714021 rbd_warn(rbd_dev, "breaking header lock owned by %s%llu",
3972− ENTITY_NAME(lockers[0].id.name));
4022+ ENTITY_NAME(locker->id.name));
39734023
39744024 ret = ceph_monc_blocklist_add(&client->monc,
3975− &lockers[0].info.addr);
4025+ &locker->info.addr);
39764026 if (ret) {
3977− rbd_warn(rbd_dev, "blocklist of %s%llu failed: %d",
3978− ENTITY_NAME(lockers[0].id.name), ret);
4027+ rbd_warn(rbd_dev, "failed to blocklist %s%llu: %d",
4028+ ENTITY_NAME(locker->id.name), ret);
39794029 goto out;
39804030 }
39814031
39824032 ret = ceph_cls_break_lock(&client->osdc, &rbd_dev->header_oid,
39834033 &rbd_dev->header_oloc, RBD_LOCK_NAME,
3984− lockers[0].id.cookie,
3985− &lockers[0].id.name);
3986− if (ret && ret != -ENOENT)
4034+ locker->id.cookie, &locker->id.name);
4035+ if (ret && ret != -ENOENT) {
4036+ rbd_warn(rbd_dev, "failed to break header lock: %d",
4037+ ret);
39874038 goto out;
4039+ }
39884040
39894041 again:
3990− ceph_free_lockers(lockers, num_lockers);
4042+ free_locker(refreshed_locker);
4043+ free_locker(locker);
39914044 }
39924045
39934046 out:
3994− ceph_free_lockers(lockers, num_lockers);
4047+ free_locker(refreshed_locker);
4048+ free_locker(locker);
39954049 return ret;
39964050 }
39974051
@@ -4041,11 +4095,8 @@ static int rbd_try_acquire_lock(struct rbd_device *rbd_dev) · 43 unmodified lines
40414095
40424096 ret = rbd_try_lock(rbd_dev);
40434097 if (ret < 0) {
4044− rbd_warn(rbd_dev, "failed to lock header: %d", ret);
4045− if (ret == -EBLOCKLISTED)
4046− goto out;
4047−
4048− ret = 1; /* request lock anyway */
4098+ rbd_warn(rbd_dev, "failed to acquire lock: %d", ret);
4099+ goto out;
40494100 }
40504101 if (ret > 0) {
40514102 up_write(&rbd_dev->lock_rwsem);
@@ -6579,12 +6630,11 @@ static int rbd_add_acquire_lock(struct rbd_device *rbd_dev) · 2527 unmodified lines
65796630 cancel_delayed_work_sync(&rbd_dev->lock_dwork);
65806631 if (!ret)
65816632 ret = -ETIMEDOUT;
6582− }
65836633
6584− if (ret) {
6585− rbd_warn(rbd_dev, "failed to acquire exclusive lock: %ld", ret);
6586− return ret;
6634+ rbd_warn(rbd_dev, "failed to acquire lock: %ld", ret);
65876635 }
6636+ if (ret)
6637+ return ret;
65886638
65896639 /*
65906640 * The lock may have been released by now, unless automatic lock
drivers/block/ublk_drv.c+7−4
@@ -1847,7 +1847,8 @@ static int ublk_ctrl_start_dev(struct ublk_device *ub, struct io_uring_cmd *cmd) · 1846 unmodified lines
18471847 if (ublksrv_pid <= 0)
18481848 return -EINVAL;
18491849
1850− wait_for_completion_interruptible(&ub->completion);
1850+ if (wait_for_completion_interruptible(&ub->completion) != 0)
1851+ return -EINTR;
18511852
18521853 schedule_delayed_work(&ub->monitor_work, UBLK_DAEMON_MONITOR_PERIOD);
18531854
@@ -2125,8 +2126,8 @@ static int ublk_ctrl_del_dev(struct ublk_device **p_ub) · 271 unmodified lines
21252126 * - the device number is freed already, we will not find this
21262127 * device via ublk_get_device_from_id()
21272128 */
2128− wait_event_interruptible(ublk_idr_wq, ublk_idr_freed(idx));
2129−
2129+ if (wait_event_interruptible(ublk_idr_wq, ublk_idr_freed(idx)))
2130+ return -EINTR;
21302131 return 0;
21312132 }
21322133
@@ -2323,7 +2324,9 @@ static int ublk_ctrl_end_recovery(struct ublk_device *ub, · 190 unmodified lines
23232324 pr_devel("%s: Waiting for new ubq_daemons(nr: %d) are ready, dev id %d...\n",
23242325 __func__, ub->dev_info.nr_hw_queues, header->dev_id);
23252326 /* wait until new ubq_daemon sending all FETCH_REQ */
2326− wait_for_completion_interruptible(&ub->completion);
2327+ if (wait_for_completion_interruptible(&ub->completion))
2328+ return -EINTR;
2329+
23272330 pr_devel("%s: All new ubq_daemons(nr: %d) are ready, dev id %d\n",
23282331 __func__, ub->dev_info.nr_hw_queues, header->dev_id);
23292332
drivers/block/zram/zram_drv.c+20−12
@@ -1870,15 +1870,16 @@ static void zram_bio_discard(struct zram *zram, struct bio *bio) · 1869 unmodified lines
18701870
18711871 static void zram_bio_read(struct zram *zram, struct bio *bio)
18721872 {
1873− struct bvec_iter iter;
1874− struct bio_vec bv;
1875− unsigned long start_time;
1873+ unsigned long start_time = bio_start_io_acct(bio);
1874+ struct bvec_iter iter = bio->bi_iter;
18761875
1877− start_time = bio_start_io_acct(bio);
1878− bio_for_each_segment(bv, bio, iter) {
1876+ do {
18791877 u32 index = iter.bi_sector >> SECTORS_PER_PAGE_SHIFT;
18801878 u32 offset = (iter.bi_sector & (SECTORS_PER_PAGE - 1)) <<
18811879 SECTOR_SHIFT;
1880+ struct bio_vec bv = bio_iter_iovec(bio, iter);
1881+
1882+ bv.bv_len = min_t(u32, bv.bv_len, PAGE_SIZE - offset);
18821883
18831884 if (zram_bvec_read(zram, &bv, index, offset, bio) < 0) {
18841885 atomic64_inc(&zram->stats.failed_reads);
@@ -1890,22 +1891,26 @@ static void zram_bio_read(struct zram *zram, struct bio *bio) · 5 unmodified lines
18901891 zram_slot_lock(zram, index);
18911892 zram_accessed(zram, index);
18921893 zram_slot_unlock(zram, index);
1893− }
1894+
1895+ bio_advance_iter_single(bio, &iter, bv.bv_len);
1896+ } while (iter.bi_size);
1897+
18941898 bio_end_io_acct(bio, start_time);
18951899 bio_endio(bio);
18961900 }
18971901
18981902 static void zram_bio_write(struct zram *zram, struct bio *bio)
18991903 {
1900− struct bvec_iter iter;
1901− struct bio_vec bv;
1902− unsigned long start_time;
1904+ unsigned long start_time = bio_start_io_acct(bio);
1905+ struct bvec_iter iter = bio->bi_iter;
19031906
1904− start_time = bio_start_io_acct(bio);
1905− bio_for_each_segment(bv, bio, iter) {
1907+ do {
19061908 u32 index = iter.bi_sector >> SECTORS_PER_PAGE_SHIFT;
19071909 u32 offset = (iter.bi_sector & (SECTORS_PER_PAGE - 1)) <<
19081910 SECTOR_SHIFT;
1911+ struct bio_vec bv = bio_iter_iovec(bio, iter);
1912+
1913+ bv.bv_len = min_t(u32, bv.bv_len, PAGE_SIZE - offset);
19091914
19101915 if (zram_bvec_write(zram, &bv, index, offset, bio) < 0) {
19111916 atomic64_inc(&zram->stats.failed_writes);
@@ -1916,7 +1921,10 @@ static void zram_bio_write(struct zram *zram, struct bio *bio) · 4 unmodified lines
19161921 zram_slot_lock(zram, index);
19171922 zram_accessed(zram, index);
19181923 zram_slot_unlock(zram, index);
1919− }
1924+
1925+ bio_advance_iter_single(bio, &iter, bv.bv_len);
1926+ } while (iter.bi_size);
1927+
19201928 bio_end_io_acct(bio, start_time);
19211929 bio_endio(bio);
19221930 }
drivers/char/tpm/st33zp24/i2c.c+1−1
@@ -160,7 +160,7 @@ static struct i2c_driver st33zp24_i2c_driver = { · 159 unmodified lines
160160 .of_match_table = of_match_ptr(of_st33zp24_i2c_match),
161161 .acpi_match_table = ACPI_PTR(st33zp24_i2c_acpi_match),
162162 },
163− .probe_new = st33zp24_i2c_probe,
163+ .probe = st33zp24_i2c_probe,
164164 .remove = st33zp24_i2c_remove,
165165 .id_table = st33zp24_i2c_id
166166 };
drivers/char/tpm/tpm-chip.c+14−69
@@ -510,70 +510,6 @@ static int tpm_add_legacy_sysfs(struct tpm_chip *chip) · 509 unmodified lines
510510 return 0;
511511 }
512512
513−/*
514− * Some AMD fTPM versions may cause stutter
515− * https://www.amd.com/en/support/kb/faq/pa-410
516− *
517− * Fixes are available in two series of fTPM firmware:
518− * 6.x.y.z series: 6.0.18.6 +
519− * 3.x.y.z series: 3.57.y.5 +
520− */
521−#ifdef CONFIG_X86
522−static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
523−{
524− u32 val1, val2;
525− u64 version;
526− int ret;
527−
528− if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
529− return false;
530−
531− ret = tpm_request_locality(chip);
532− if (ret)
533− return false;
534−
535− ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val1, NULL);
536− if (ret)
537− goto release;
538− if (val1 != 0x414D4400U /* AMD */) {
539− ret = -ENODEV;
540− goto release;
541− }
542− ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_1, &val1, NULL);
543− if (ret)
544− goto release;
545− ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_2, &val2, NULL);
546−
547−release:
548− tpm_relinquish_locality(chip);
549−
550− if (ret)
551− return false;
552−
553− version = ((u64)val1 << 32) | val2;
554− if ((version >> 48) == 6) {
555− if (version >= 0x0006000000180006ULL)
556− return false;
557− } else if ((version >> 48) == 3) {
558− if (version >= 0x0003005700000005ULL)
559− return false;
560− } else {
561− return false;
562− }
563−
564− dev_warn(&chip->dev,
565− "AMD fTPM version 0x%llx causes system stutter; hwrng disabled\n",
566− version);
567−
568− return true;
569−}
570−#else
571−static inline bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
572−{
573− return false;
574−}
575−#endif /* CONFIG_X86 */
576−
577513 static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
578514 {
579515 struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng);
@@ -585,10 +521,20 @@ static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) · 5 unmodified lines
585521 return tpm_get_random(chip, data, max);
586522 }
587523
524+static bool tpm_is_hwrng_enabled(struct tpm_chip *chip)
525+{
526+ if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM))
527+ return false;
528+ if (tpm_is_firmware_upgrade(chip))
529+ return false;
530+ if (chip->flags & TPM_CHIP_FLAG_HWRNG_DISABLED)
531+ return false;
532+ return true;
533+}
534+
588535 static int tpm_add_hwrng(struct tpm_chip *chip)
589536 {
590− if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM) || tpm_is_firmware_upgrade(chip) ||
591− tpm_amd_is_rng_defective(chip))
537+ if (!tpm_is_hwrng_enabled(chip))
592538 return 0;
593539
594540 snprintf(chip->hwrng_name, sizeof(chip->hwrng_name),
@@ -693,7 +639,7 @@ int tpm_chip_register(struct tpm_chip *chip) · 98 unmodified lines
693639 return 0;
694640
695641 out_hwrng:
696− if (IS_ENABLED(CONFIG_HW_RANDOM_TPM) && !tpm_is_firmware_upgrade(chip))
642+ if (tpm_is_hwrng_enabled(chip))
697643 hwrng_unregister(&chip->hwrng);
698644 out_ppi:
699645 tpm_bios_log_teardown(chip);
@@ -718,8 +664,7 @@ EXPORT_SYMBOL_GPL(tpm_chip_register); · 18 unmodified lines
718664 void tpm_chip_unregister(struct tpm_chip *chip)
719665 {
720666 tpm_del_legacy_sysfs(chip);
721− if (IS_ENABLED(CONFIG_HW_RANDOM_TPM) && !tpm_is_firmware_upgrade(chip) &&
722− !tpm_amd_is_rng_defective(chip))
667+ if (tpm_is_hwrng_enabled(chip))
723668 hwrng_unregister(&chip->hwrng);
724669 tpm_bios_log_teardown(chip);
725670 if (chip->flags & TPM_CHIP_FLAG_TPM2 && !tpm_is_firmware_upgrade(chip))
drivers/char/tpm/tpm_crb.c+30−0
@@ -463,6 +463,28 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status) · 462 unmodified lines
463463 return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE;
464464 }
465465
466+static int crb_check_flags(struct tpm_chip *chip)
467+{
468+ u32 val;
469+ int ret;
470+
471+ ret = crb_request_locality(chip, 0);
472+ if (ret)
473+ return ret;
474+
475+ ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val, NULL);
476+ if (ret)
477+ goto release;
478+
479+ if (val == 0x414D4400U /* AMD */)
480+ chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED;
481+
482+release:
483+ crb_relinquish_locality(chip, 0);
484+
485+ return ret;
486+}
487+
466488 static const struct tpm_class_ops tpm_crb = {
467489 .flags = TPM_OPS_AUTO_STARTUP,
468490 .status = crb_status,
@@ -800,6 +822,14 @@ static int crb_acpi_add(struct acpi_device *device) · 331 unmodified lines
800822 chip->acpi_dev_handle = device->handle;
801823 chip->flags = TPM_CHIP_FLAG_TPM2;
802824
825+ rc = tpm_chip_bootstrap(chip);
826+ if (rc)
827+ goto out;
828+
829+ rc = crb_check_flags(chip);
830+ if (rc)
831+ goto out;
832+
803833 rc = tpm_chip_register(chip);
804834
805835 out:
drivers/char/tpm/tpm_i2c_atmel.c+1−1
@@ -203,7 +203,7 @@ static SIMPLE_DEV_PM_OPS(i2c_atmel_pm_ops, tpm_pm_suspend, tpm_pm_resume); · 202 unmodified lines
203203
204204 static struct i2c_driver i2c_atmel_driver = {
205205 .id_table = i2c_atmel_id,
206− .probe_new = i2c_atmel_probe,
206+ .probe = i2c_atmel_probe,
207207 .remove = i2c_atmel_remove,
208208 .driver = {
209209 .name = I2C_DRIVER_NAME,
drivers/char/tpm/tpm_i2c_infineon.c+1−1
@@ -716,7 +716,7 @@ static void tpm_tis_i2c_remove(struct i2c_client *client) · 715 unmodified lines
716716
717717 static struct i2c_driver tpm_tis_i2c_driver = {
718718 .id_table = tpm_tis_i2c_table,
719− .probe_new = tpm_tis_i2c_probe,
719+ .probe = tpm_tis_i2c_probe,
720720 .remove = tpm_tis_i2c_remove,
721721 .driver = {
722722 .name = "tpm_i2c_infineon",
drivers/char/tpm/tpm_i2c_nuvoton.c+1−1
@@ -650,7 +650,7 @@ static SIMPLE_DEV_PM_OPS(i2c_nuvoton_pm_ops, tpm_pm_suspend, tpm_pm_resume); · 649 unmodified lines
650650
651651 static struct i2c_driver i2c_nuvoton_driver = {
652652 .id_table = i2c_nuvoton_id,
653− .probe_new = i2c_nuvoton_probe,
653+ .probe = i2c_nuvoton_probe,
654654 .remove = i2c_nuvoton_remove,
655655 .driver = {
656656 .name = "tpm_i2c_nuvoton",
drivers/char/tpm/tpm_tis.c+18−2
@@ -89,7 +89,7 @@ static inline void tpm_tis_iowrite32(u32 b, void __iomem *iobase, u32 addr) · 88 unmodified lines
8989 tpm_tis_flush(iobase);
9090 }
9191
92−static int interrupts = -1;
92+static int interrupts;
9393 module_param(interrupts, int, 0444);
9494 MODULE_PARM_DESC(interrupts, "Enable interrupts");
9595
@@ -162,12 +162,28 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = { · 66 unmodified lines
162162 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L590"),
163163 },
164164 },
165+ {
166+ .callback = tpm_tis_disable_irq,
167+ .ident = "ThinkStation P620",
168+ .matches = {
169+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
170+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkStation P620"),
171+ },
172+ },
173+ {
174+ .callback = tpm_tis_disable_irq,
175+ .ident = "TUXEDO InfinityBook S 15/17 Gen7",
176+ .matches = {
177+ DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
178+ DMI_MATCH(DMI_PRODUCT_NAME, "TUXEDO InfinityBook S 15/17 Gen7"),
179+ },
180+ },
165181 {
166182 .callback = tpm_tis_disable_irq,
167183 .ident = "UPX-TGL",
168184 .matches = {
169185 DMI_MATCH(DMI_SYS_VENDOR, "AAEON"),
170− DMI_MATCH(DMI_PRODUCT_VERSION, "UPX-TGL"),
186+ DMI_MATCH(DMI_PRODUCT_NAME, "UPX-TGL01"),
171187 },
172188 },
173189 {}
drivers/char/tpm/tpm_tis_core.c+7−2
@@ -366,8 +366,13 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count) · 365 unmodified lines
366366 goto out;
367367 }
368368
369− size += recv_data(chip, &buf[TPM_HEADER_SIZE],
370− expected - TPM_HEADER_SIZE);
369+ rc = recv_data(chip, &buf[TPM_HEADER_SIZE],
370+ expected - TPM_HEADER_SIZE);
371+ if (rc < 0) {
372+ size = rc;
373+ goto out;
374+ }
375+ size += rc;
371376 if (size < expected) {
372377 dev_err(&chip->dev, "Unable to read remainder of result\n");
373378 size = -ETIME;
drivers/char/tpm/tpm_tis_i2c.c+1−1
@@ -394,7 +394,7 @@ static struct i2c_driver tpm_tis_i2c_driver = { · 393 unmodified lines
394394 .pm = &tpm_tis_pm,
395395 .of_match_table = of_match_ptr(of_tis_i2c_match),
396396 },
397− .probe_new = tpm_tis_i2c_probe,
397+ .probe = tpm_tis_i2c_probe,
398398 .remove = tpm_tis_i2c_remove,
399399 .id_table = tpm_tis_i2c_id,
400400 };
drivers/char/tpm/tpm_tis_i2c_cr50.c+1−1
@@ -779,7 +779,7 @@ static void tpm_cr50_i2c_remove(struct i2c_client *client) · 778 unmodified lines
779779 static SIMPLE_DEV_PM_OPS(cr50_i2c_pm, tpm_pm_suspend, tpm_pm_resume);
780780
781781 static struct i2c_driver cr50_i2c_driver = {
782− .probe_new = tpm_cr50_i2c_probe,
782+ .probe = tpm_cr50_i2c_probe,
783783 .remove = tpm_cr50_i2c_remove,
784784 .driver = {
785785 .name = "cr50_i2c",
drivers/clk/Kconfig+1−0
@@ -444,6 +444,7 @@ config COMMON_CLK_BD718XX · 443 unmodified lines
444444 config COMMON_CLK_FIXED_MMIO
445445 bool "Clock driver for Memory Mapped Fixed values"
446446 depends on COMMON_CLK && OF
447+ depends on HAS_IOMEM
447448 help
448449 Support for Memory Mapped IO Fixed clocks
449450
drivers/clk/imx/clk-imx93.c+1−1
@@ -291,7 +291,7 @@ static int imx93_clocks_probe(struct platform_device *pdev) · 290 unmodified lines
291291 anatop_base = devm_of_iomap(dev, np, 0, NULL);
292292 of_node_put(np);
293293 if (WARN_ON(IS_ERR(anatop_base))) {
294− ret = PTR_ERR(base);
294+ ret = PTR_ERR(anatop_base);
295295 goto unregister_hws;
296296 }
297297
drivers/clk/mediatek/clk-mt8183.c+27−0
@@ -328,6 +328,14 @@ static const char * const atb_parents[] = { · 327 unmodified lines
328328 "syspll_d5"
329329 };
330330
331+static const char * const sspm_parents[] = {
332+ "clk26m",
333+ "univpll_d2_d4",
334+ "syspll_d2_d2",
335+ "univpll_d2_d2",
336+ "syspll_d3"
337+};
338+
331339 static const char * const dpi0_parents[] = {
332340 "clk26m",
333341 "tvdpll_d2",
@@ -507,6 +515,9 @@ static const struct mtk_mux top_muxes[] = { · 173 unmodified lines
507515 /* CLK_CFG_6 */
508516 MUX_GATE_CLR_SET_UPD(CLK_TOP_MUX_ATB, "atb_sel",
509517 atb_parents, 0xa0, 0xa4, 0xa8, 0, 2, 7, 0x004, 24),
518+ MUX_GATE_CLR_SET_UPD_FLAGS(CLK_TOP_MUX_SSPM, "sspm_sel",
519+ sspm_parents, 0xa0, 0xa4, 0xa8, 8, 3, 15, 0x004, 25,
520+ CLK_IS_CRITICAL | CLK_SET_RATE_PARENT),
510521 MUX_GATE_CLR_SET_UPD(CLK_TOP_MUX_DPI0, "dpi0_sel",
511522 dpi0_parents, 0xa0, 0xa4, 0xa8, 16, 4, 23, 0x004, 26),
512523 MUX_GATE_CLR_SET_UPD(CLK_TOP_MUX_SCAM, "scam_sel",
@@ -673,10 +684,18 @@ static const struct mtk_gate_regs infra3_cg_regs = { · 160 unmodified lines
673684 GATE_MTK(_id, _name, _parent, &infra2_cg_regs, _shift, \
674685 &mtk_clk_gate_ops_setclr)
675686
687+#define GATE_INFRA2_FLAGS(_id, _name, _parent, _shift, _flag) \
688+ GATE_MTK_FLAGS(_id, _name, _parent, &infra2_cg_regs, \
689+ _shift, &mtk_clk_gate_ops_setclr, _flag)
690+
676691 #define GATE_INFRA3(_id, _name, _parent, _shift) \
677692 GATE_MTK(_id, _name, _parent, &infra3_cg_regs, _shift, \
678693 &mtk_clk_gate_ops_setclr)
679694
695+#define GATE_INFRA3_FLAGS(_id, _name, _parent, _shift, _flag) \
696+ GATE_MTK_FLAGS(_id, _name, _parent, &infra3_cg_regs, \
697+ _shift, &mtk_clk_gate_ops_setclr, _flag)
698+
680699 static const struct mtk_gate infra_clks[] = {
681700 /* INFRA0 */
682701 GATE_INFRA0(CLK_INFRA_PMIC_TMR, "infra_pmic_tmr", "axi_sel", 0),
@@ -748,7 +767,11 @@ static const struct mtk_gate infra_clks[] = { · 65 unmodified lines
748767 GATE_INFRA2(CLK_INFRA_UNIPRO_TICK, "infra_unipro_tick", "fufs_sel", 12),
749768 GATE_INFRA2(CLK_INFRA_UFS_MP_SAP_BCLK, "infra_ufs_mp_sap_bck", "fufs_sel", 13),
750769 GATE_INFRA2(CLK_INFRA_MD32_BCLK, "infra_md32_bclk", "axi_sel", 14),
770+ /* infra_sspm is main clock in co-processor, should not be closed in Linux. */
771+ GATE_INFRA2_FLAGS(CLK_INFRA_SSPM, "infra_sspm", "sspm_sel", 15, CLK_IS_CRITICAL),
751772 GATE_INFRA2(CLK_INFRA_UNIPRO_MBIST, "infra_unipro_mbist", "axi_sel", 16),
773+ /* infra_sspm_bus_hclk is main clock in co-processor, should not be closed in Linux. */
774+ GATE_INFRA2_FLAGS(CLK_INFRA_SSPM_BUS_HCLK, "infra_sspm_bus_hclk", "axi_sel", 17, CLK_IS_CRITICAL),
752775 GATE_INFRA2(CLK_INFRA_I2C5, "infra_i2c5", "i2c_sel", 18),
753776 GATE_INFRA2(CLK_INFRA_I2C5_ARBITER, "infra_i2c5_arbiter", "i2c_sel", 19),
754777 GATE_INFRA2(CLK_INFRA_I2C5_IMM, "infra_i2c5_imm", "i2c_sel", 20),
@@ -766,6 +789,10 @@ static const struct mtk_gate infra_clks[] = { · 11 unmodified lines
766789 GATE_INFRA3(CLK_INFRA_MSDC0_SELF, "infra_msdc0_self", "msdc50_0_sel", 0),
767790 GATE_INFRA3(CLK_INFRA_MSDC1_SELF, "infra_msdc1_self", "msdc50_0_sel", 1),
768791 GATE_INFRA3(CLK_INFRA_MSDC2_SELF, "infra_msdc2_self", "msdc50_0_sel", 2),
792+ /* infra_sspm_26m_self is main clock in co-processor, should not be closed in Linux. */
793+ GATE_INFRA3_FLAGS(CLK_INFRA_SSPM_26M_SELF, "infra_sspm_26m_self", "f_f26m_ck", 3, CLK_IS_CRITICAL),
794+ /* infra_sspm_32k_self is main clock in co-processor, should not be closed in Linux. */
795+ GATE_INFRA3_FLAGS(CLK_INFRA_SSPM_32K_SELF, "infra_sspm_32k_self", "f_f26m_ck", 4, CLK_IS_CRITICAL),
769796 GATE_INFRA3(CLK_INFRA_UFS_AXI, "infra_ufs_axi", "axi_sel", 5),
770797 GATE_INFRA3(CLK_INFRA_I2C6, "infra_i2c6", "i2c_sel", 6),
771798 GATE_INFRA3(CLK_INFRA_AP_MSDC0, "infra_ap_msdc0", "msdc50_hclk_sel", 7),
drivers/clk/meson/clk-pll.c+2−2
@@ -367,9 +367,9 @@ static int meson_clk_pll_enable(struct clk_hw *hw) · 366 unmodified lines
367367 * 3. enable the lock detect module
368368 */
369369 if (MESON_PARM_APPLICABLE(&pll->current_en)) {
370− usleep_range(10, 20);
370+ udelay(10);
371371 meson_parm_write(clk->map, &pll->current_en, 1);
372− usleep_range(40, 50);
372+ udelay(40);
373373 }
374374
375375 if (MESON_PARM_APPLICABLE(&pll->l_detect)) {
drivers/counter/Kconfig+7−7
@@ -3,13 +3,6 @@ · 2 unmodified lines
33 # Counter devices
44 #
55
6−menuconfig COUNTER
7− tristate "Counter support"
8− help
9− This enables counter device support through the Generic Counter
10− interface. You only need to enable this, if you also want to enable
11− one or more of the counter device drivers below.
12−
136 config I8254
147 tristate
158 select COUNTER
@@ -25,6 +18,13 @@ config I8254 · 9 unmodified lines
2518
2619 If built as a module its name will be i8254.
2720
21+menuconfig COUNTER
22+ tristate "Counter support"
23+ help
24+ This enables counter device support through the Generic Counter
25+ interface. You only need to enable this, if you also want to enable
26+ one or more of the counter device drivers below.
27+
2828 if COUNTER
2929
3030 config 104_QUAD_8
drivers/cpufreq/amd-pstate.c+5−5
@@ -1012,8 +1012,8 @@ static int amd_pstate_update_status(const char *buf, size_t size) · 1011 unmodified lines
10121012 return 0;
10131013 }
10141014
1015−static ssize_t show_status(struct kobject *kobj,
1016− struct kobj_attribute *attr, char *buf)
1015+static ssize_t status_show(struct device *dev,
1016+ struct device_attribute *attr, char *buf)
10171017 {
10181018 ssize_t ret;
10191019
@@ -1024,7 +1024,7 @@ static ssize_t show_status(struct kobject *kobj, · 4 unmodified lines
10241024 return ret;
10251025 }
10261026
1027−static ssize_t store_status(struct kobject *a, struct kobj_attribute *b,
1027+static ssize_t status_store(struct device *a, struct device_attribute *b,
10281028 const char *buf, size_t count)
10291029 {
10301030 char *p = memchr(buf, '\n', count);
@@ -1043,7 +1043,7 @@ cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq); · 12 unmodified lines
10431043 cpufreq_freq_attr_ro(amd_pstate_highest_perf);
10441044 cpufreq_freq_attr_rw(energy_performance_preference);
10451045 cpufreq_freq_attr_ro(energy_performance_available_preferences);
1046−define_one_global_rw(status);
1046+static DEVICE_ATTR_RW(status);
10471047
10481048 static struct freq_attr *amd_pstate_attr[] = {
10491049 &amd_pstate_max_freq,
@@ -1062,7 +1062,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = { · 12 unmodified lines
10621062 };
10631063
10641064 static struct attribute *pstate_global_attributes[] = {
1065− &status.attr,
1065+ &dev_attr_status.attr,
10661066 NULL
10671067 };
10681068
drivers/cpuidle/cpuidle-psci-domain.c+13−26
@@ -120,20 +120,6 @@ static void psci_pd_remove(void) · 119 unmodified lines
120120 }
121121 }
122122
123−static bool psci_pd_try_set_osi_mode(void)
124−{
125− int ret;
126−
127− if (!psci_has_osi_support())
128− return false;
129−
130− ret = psci_set_osi_mode(true);
131− if (ret)
132− return false;
133−
134− return true;
135−}
136−
137123 static void psci_cpuidle_domain_sync_state(struct device *dev)
138124 {
139125 /*
@@ -152,15 +138,12 @@ static int psci_cpuidle_domain_probe(struct platform_device *pdev) · 12 unmodified lines
152138 {
153139 struct device_node *np = pdev->dev.of_node;
154140 struct device_node *node;
155− bool use_osi;
141+ bool use_osi = psci_has_osi_support();
156142 int ret = 0, pd_count = 0;
157143
158144 if (!np)
159145 return -ENODEV;
160146
161− /* If OSI mode is supported, let's try to enable it. */
162− use_osi = psci_pd_try_set_osi_mode();
163−
164147 /*
165148 * Parse child nodes for the "#power-domain-cells" property and
166149 * initialize a genpd/genpd-of-provider pair when it's found.
@@ -170,33 +153,37 @@ static int psci_cpuidle_domain_probe(struct platform_device *pdev) · 3 unmodified lines
170153 continue;
171154
172155 ret = psci_pd_init(node, use_osi);
173− if (ret)
174− goto put_node;
156+ if (ret) {
157+ of_node_put(node);
158+ goto exit;
159+ }
175160
176161 pd_count++;
177162 }
178163
179164 /* Bail out if not using the hierarchical CPU topology. */
180165 if (!pd_count)
181− goto no_pd;
166+ return 0;
182167
183168 /* Link genpd masters/subdomains to model the CPU topology. */
184169 ret = dt_idle_pd_init_topology(np);
185170 if (ret)
186171 goto remove_pd;
187172
173+ /* let's try to enable OSI. */
174+ ret = psci_set_osi_mode(use_osi);
175+ if (ret)
176+ goto remove_pd;
177+
188178 pr_info("Initialized CPU PM domain topology using %s mode\n",
189179 use_osi ? "OSI" : "PC");
190180 return 0;
191181
192−put_node:
193− of_node_put(node);
194182 remove_pd:
183+ dt_idle_pd_remove_topology(np);
195184 psci_pd_remove();
185+exit:
196186 pr_err("failed to create CPU PM domains ret=%d\n", ret);
197−no_pd:
198− if (use_osi)
199− psci_set_osi_mode(false);
200187 return ret;
201188 }
202189
drivers/cpuidle/dt_idle_genpd.c+24−0
@@ -152,6 +152,30 @@ int dt_idle_pd_init_topology(struct device_node *np) · 151 unmodified lines
152152 return 0;
153153 }
154154
155+int dt_idle_pd_remove_topology(struct device_node *np)
156+{
157+ struct device_node *node;
158+ struct of_phandle_args child, parent;
159+ int ret;
160+
161+ for_each_child_of_node(np, node) {
162+ if (of_parse_phandle_with_args(node, "power-domains",
163+ "#power-domain-cells", 0, &parent))
164+ continue;
165+
166+ child.np = node;
167+ child.args_count = 0;
168+ ret = of_genpd_remove_subdomain(&parent, &child);
169+ of_node_put(parent.np);
170+ if (ret) {
171+ of_node_put(node);
172+ return ret;
173+ }
174+ }
175+
176+ return 0;
177+}
178+
155179 struct device *dt_idle_attach_cpu(int cpu, const char *name)
156180 {
157181 struct device *dev;
drivers/cpuidle/dt_idle_genpd.h+7−0
@@ -14,6 +14,8 @@ struct generic_pm_domain *dt_idle_pd_alloc(struct device_node *np, · 13 unmodified lines
1414
1515 int dt_idle_pd_init_topology(struct device_node *np);
1616
17+int dt_idle_pd_remove_topology(struct device_node *np);
18+
1719 struct device *dt_idle_attach_cpu(int cpu, const char *name);
1820
1921 void dt_idle_detach_cpu(struct device *dev);
@@ -36,6 +38,11 @@ static inline int dt_idle_pd_init_topology(struct device_node *np) · 16 unmodified lines
3638 return 0;
3739 }
3840
41+static inline int dt_idle_pd_remove_topology(struct device_node *np)
42+{
43+ return 0;
44+}
45+
3946 static inline struct device *dt_idle_attach_cpu(int cpu, const char *name)
4047 {
4148 return NULL;
drivers/cxl/Kconfig+2−1
@@ -2,6 +2,8 @@ · 1 unmodified line
22 menuconfig CXL_BUS
33 tristate "CXL (Compute Express Link) Devices Support"
44 depends on PCI
5+ select FW_LOADER
6+ select FW_UPLOAD
57 select PCI_DOE
68 help
79 CXL is a bus that is electrically compatible with PCI Express, but
@@ -82,7 +84,6 @@ config CXL_PMEM · 74 unmodified lines
8284 config CXL_MEM
8385 tristate "CXL: Memory Expansion"
8486 depends on CXL_PCI
85− select FW_UPLOAD
8687 default CXL_BUS
8788 help
8889 The CXL.mem protocol allows a device to act as a provider of "System
drivers/cxl/acpi.c+2−3
@@ -296,9 +296,8 @@ err_xormap: · 295 unmodified lines
296296 else
297297 rc = cxl_decoder_autoremove(dev, cxld);
298298 if (rc) {
299− dev_err(dev, "Failed to add decode range [%#llx - %#llx]\n",
300− cxld->hpa_range.start, cxld->hpa_range.end);
301− return 0;
299+ dev_err(dev, "Failed to add decode range: %pr", res);
300+ return rc;
302301 }
303302 dev_dbg(dev, "add: %s node: %d range [%#llx - %#llx]\n",
304303 dev_name(&cxld->dev),
drivers/cxl/core/mbox.c+44−1
@@ -121,6 +121,45 @@ static bool cxl_is_security_command(u16 opcode) · 120 unmodified lines
121121 return false;
122122 }
123123
124+static void cxl_set_security_cmd_enabled(struct cxl_security_state *security,
125+ u16 opcode)
126+{
127+ switch (opcode) {
128+ case CXL_MBOX_OP_SANITIZE:
129+ set_bit(CXL_SEC_ENABLED_SANITIZE, security->enabled_cmds);
130+ break;
131+ case CXL_MBOX_OP_SECURE_ERASE:
132+ set_bit(CXL_SEC_ENABLED_SECURE_ERASE,
133+ security->enabled_cmds);
134+ break;
135+ case CXL_MBOX_OP_GET_SECURITY_STATE:
136+ set_bit(CXL_SEC_ENABLED_GET_SECURITY_STATE,
137+ security->enabled_cmds);
138+ break;
139+ case CXL_MBOX_OP_SET_PASSPHRASE:
140+ set_bit(CXL_SEC_ENABLED_SET_PASSPHRASE,
141+ security->enabled_cmds);
142+ break;
143+ case CXL_MBOX_OP_DISABLE_PASSPHRASE:
144+ set_bit(CXL_SEC_ENABLED_DISABLE_PASSPHRASE,
145+ security->enabled_cmds);
146+ break;
147+ case CXL_MBOX_OP_UNLOCK:
148+ set_bit(CXL_SEC_ENABLED_UNLOCK, security->enabled_cmds);
149+ break;
150+ case CXL_MBOX_OP_FREEZE_SECURITY:
151+ set_bit(CXL_SEC_ENABLED_FREEZE_SECURITY,
152+ security->enabled_cmds);
153+ break;
154+ case CXL_MBOX_OP_PASSPHRASE_SECURE_ERASE:
155+ set_bit(CXL_SEC_ENABLED_PASSPHRASE_SECURE_ERASE,
156+ security->enabled_cmds);
157+ break;
158+ default:
159+ break;
160+ }
161+}
162+
124163 static bool cxl_is_poison_command(u16 opcode)
125164 {
126165 #define CXL_MBOX_OP_POISON_CMDS 0x43
@@ -677,7 +716,8 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel) · 550 unmodified lines
677716 u16 opcode = le16_to_cpu(cel_entry[i].opcode);
678717 struct cxl_mem_command *cmd = cxl_mem_find_command(opcode);
679718
680− if (!cmd && !cxl_is_poison_command(opcode)) {
719+ if (!cmd && (!cxl_is_poison_command(opcode) ||
720+ !cxl_is_security_command(opcode))) {
681721 dev_dbg(dev,
682722 "Opcode 0x%04x unsupported by driver\n", opcode);
683723 continue;
@@ -689,6 +729,9 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel) · 5 unmodified lines
689729 if (cxl_is_poison_command(opcode))
690730 cxl_set_poison_cmd_enabled(&mds->poison, opcode);
691731
732+ if (cxl_is_security_command(opcode))
733+ cxl_set_security_cmd_enabled(&mds->security, opcode);
734+
692735 dev_dbg(dev, "Opcode 0x%04x enabled\n", opcode);
693736 }
694737 }
drivers/cxl/core/memdev.c+19−0
@@ -477,9 +477,28 @@ static struct attribute_group cxl_memdev_pmem_attribute_group = { · 476 unmodified lines
477477 .attrs = cxl_memdev_pmem_attributes,
478478 };
479479
480+static umode_t cxl_memdev_security_visible(struct kobject *kobj,
481+ struct attribute *a, int n)
482+{
483+ struct device *dev = kobj_to_dev(kobj);
484+ struct cxl_memdev *cxlmd = to_cxl_memdev(dev);
485+ struct cxl_memdev_state *mds = to_cxl_memdev_state(cxlmd->cxlds);
486+
487+ if (a == &dev_attr_security_sanitize.attr &&
488+ !test_bit(CXL_SEC_ENABLED_SANITIZE, mds->security.enabled_cmds))
489+ return 0;
490+
491+ if (a == &dev_attr_security_erase.attr &&
492+ !test_bit(CXL_SEC_ENABLED_SECURE_ERASE, mds->security.enabled_cmds))
493+ return 0;
494+
495+ return a->mode;
496+}
497+
480498 static struct attribute_group cxl_memdev_security_attribute_group = {
481499 .name = "security",
482500 .attrs = cxl_memdev_security_attributes,
501+ .is_visible = cxl_memdev_security_visible,
483502 };
484503
485504 static const struct attribute_group *cxl_memdev_attribute_groups[] = {
drivers/cxl/cxlmem.h+17−1
@@ -244,6 +244,19 @@ enum poison_cmd_enabled_bits { · 243 unmodified lines
244244 CXL_POISON_ENABLED_MAX
245245 };
246246
247+/* Device enabled security commands */
248+enum security_cmd_enabled_bits {
249+ CXL_SEC_ENABLED_SANITIZE,
250+ CXL_SEC_ENABLED_SECURE_ERASE,
251+ CXL_SEC_ENABLED_GET_SECURITY_STATE,
252+ CXL_SEC_ENABLED_SET_PASSPHRASE,
253+ CXL_SEC_ENABLED_DISABLE_PASSPHRASE,
254+ CXL_SEC_ENABLED_UNLOCK,
255+ CXL_SEC_ENABLED_FREEZE_SECURITY,
256+ CXL_SEC_ENABLED_PASSPHRASE_SECURE_ERASE,
257+ CXL_SEC_ENABLED_MAX
258+};
259+
247260 /**
248261 * struct cxl_poison_state - Driver poison state info
249262 *
@@ -323,7 +336,7 @@ struct cxl_mbox_activate_fw { · 73 unmodified lines
323336
324337 /* FW state bits */
325338 #define CXL_FW_STATE_BITS 32
326−#define CXL_FW_CANCEL BIT(0)
339+#define CXL_FW_CANCEL 0
327340
328341 /**
329342 * struct cxl_fw_state - Firmware upload / activation state
@@ -346,6 +359,7 @@ struct cxl_fw_state { · 16 unmodified lines
346359 * struct cxl_security_state - Device security state
347360 *
348361 * @state: state of last security operation
362+ * @enabled_cmds: All security commands enabled in the CEL
349363 * @poll: polling for sanitization is enabled, device has no mbox irq support
350364 * @poll_tmo_secs: polling timeout
351365 * @poll_dwork: polling work item
@@ -353,6 +367,7 @@ struct cxl_fw_state { · 1 unmodified line
353367 */
354368 struct cxl_security_state {
355369 unsigned long state;
370+ DECLARE_BITMAP(enabled_cmds, CXL_SEC_ENABLED_MAX);
356371 bool poll;
357372 int poll_tmo_secs;
358373 struct delayed_work poll_dwork;
@@ -434,6 +449,7 @@ struct cxl_dev_state { · 75 unmodified lines
434449 * @next_persistent_bytes: persistent capacity change pending device reset
435450 * @event: event log driver state
436451 * @poison: poison driver state info
452+ * @security: security driver state info
437453 * @fw: firmware upload / activation state
438454 * @mbox_send: @dev specific transport for transmitting mailbox commands
439455 *
drivers/dma/Kconfig+2−0
@@ -211,6 +211,7 @@ config FSL_DMA · 210 unmodified lines
211211 config FSL_EDMA
212212 tristate "Freescale eDMA engine support"
213213 depends on OF
214+ depends on HAS_IOMEM
214215 select DMA_ENGINE
215216 select DMA_VIRTUAL_CHANNELS
216217 help
@@ -280,6 +281,7 @@ config IMX_SDMA · 63 unmodified lines
280281
281282 config INTEL_IDMA64
282283 tristate "Intel integrated DMA 64-bit support"
284+ depends on HAS_IOMEM
283285 select DMA_ENGINE
284286 select DMA_VIRTUAL_CHANNELS
285287 help
drivers/dma/idxd/device.c+1−3
@@ -384,9 +384,7 @@ static void idxd_wq_disable_cleanup(struct idxd_wq *wq) · 383 unmodified lines
384384 wq->threshold = 0;
385385 wq->priority = 0;
386386 wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES;
387− clear_bit(WQ_FLAG_DEDICATED, &wq->flags);
388− clear_bit(WQ_FLAG_BLOCK_ON_FAULT, &wq->flags);
389− clear_bit(WQ_FLAG_ATS_DISABLE, &wq->flags);
387+ wq->flags = 0;
390388 memset(wq->name, 0, WQ_NAME_SIZE);
391389 wq->max_xfer_bytes = WQ_DEFAULT_MAX_XFER;
392390 idxd_wq_set_max_batch_size(idxd->data->type, wq, WQ_DEFAULT_MAX_BATCH);
drivers/dma/mcf-edma.c+7−6
@@ -190,7 +190,13 @@ static int mcf_edma_probe(struct platform_device *pdev) · 189 unmodified lines
190190 return -EINVAL;
191191 }
192192
193− chans = pdata->dma_channels;
193+ if (!pdata->dma_channels) {
194+ dev_info(&pdev->dev, "setting default channel number to 64");
195+ chans = 64;
196+ } else {
197+ chans = pdata->dma_channels;
198+ }
199+
194200 len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;
195201 mcf_edma = devm_kzalloc(&pdev->dev, len, GFP_KERNEL);
196202 if (!mcf_edma)
@@ -202,11 +208,6 @@ static int mcf_edma_probe(struct platform_device *pdev) · 5 unmodified lines
202208 mcf_edma->drvdata = &mcf_data;
203209 mcf_edma->big_endian = 1;
204210
205− if (!mcf_edma->n_chans) {
206− dev_info(&pdev->dev, "setting default channel number to 64");
207− mcf_edma->n_chans = 64;
208− }
209−
210211 mutex_init(&mcf_edma->fsl_edma_mutex);
211212
212213 mcf_edma->membase = devm_platform_ioremap_resource(pdev, 0);
drivers/dma/owl-dma.c+1−1
@@ -192,7 +192,7 @@ struct owl_dma_pchan { · 191 unmodified lines
192192 };
193193
194194 /**
195− * struct owl_dma_pchan - Wrapper for DMA ENGINE channel
195+ * struct owl_dma_vchan - Wrapper for DMA ENGINE channel
196196 * @vc: wrapped virtual channel
197197 * @pchan: the physical channel utilized by this channel
198198 * @txd: active transaction on this channel
drivers/dma/pl330.c+16−2
@@ -403,6 +403,12 @@ enum desc_status { · 402 unmodified lines
403403 * of a channel can be BUSY at any time.
404404 */
405405 BUSY,
406+ /*
407+ * Pause was called while descriptor was BUSY. Due to hardware
408+ * limitations, only termination is possible for descriptors
409+ * that have been paused.
410+ */
411+ PAUSED,
406412 /*
407413 * Sitting on the channel work_list but xfer done
408414 * by PL330 core
@@ -2041,7 +2047,7 @@ static inline void fill_queue(struct dma_pl330_chan *pch) · 1632 unmodified lines
20412047 list_for_each_entry(desc, &pch->work_list, node) {
20422048
20432049 /* If already submitted */
2044− if (desc->status == BUSY)
2050+ if (desc->status == BUSY || desc->status == PAUSED)
20452051 continue;
20462052
20472053 ret = pl330_submit_req(pch->thread, desc);
@@ -2326,6 +2332,7 @@ static int pl330_pause(struct dma_chan *chan) · 278 unmodified lines
23262332 {
23272333 struct dma_pl330_chan *pch = to_pchan(chan);
23282334 struct pl330_dmac *pl330 = pch->dmac;
2335+ struct dma_pl330_desc *desc;
23292336 unsigned long flags;
23302337
23312338 pm_runtime_get_sync(pl330->ddma.dev);
@@ -2335,6 +2342,10 @@ static int pl330_pause(struct dma_chan *chan) · 3 unmodified lines
23352342 _stop(pch->thread);
23362343 spin_unlock(&pl330->lock);
23372344
2345+ list_for_each_entry(desc, &pch->work_list, node) {
2346+ if (desc->status == BUSY)
2347+ desc->status = PAUSED;
2348+ }
23382349 spin_unlock_irqrestore(&pch->lock, flags);
23392350 pm_runtime_mark_last_busy(pl330->ddma.dev);
23402351 pm_runtime_put_autosuspend(pl330->ddma.dev);
@@ -2425,7 +2436,7 @@ pl330_tx_status(struct dma_chan *chan, dma_cookie_t cookie, · 84 unmodified lines
24252436 else if (running && desc == running)
24262437 transferred =
24272438 pl330_get_current_xferred_count(pch, desc);
2428− else if (desc->status == BUSY)
2439+ else if (desc->status == BUSY || desc->status == PAUSED)
24292440 /*
24302441 * Busy but not running means either just enqueued,
24312442 * or finished and not yet marked done
@@ -2442,6 +2453,9 @@ pl330_tx_status(struct dma_chan *chan, dma_cookie_t cookie, · 10 unmodified lines
24422453 case DONE:
24432454 ret = DMA_COMPLETE;
24442455 break;
2456+ case PAUSED:
2457+ ret = DMA_PAUSED;
2458+ break;
24452459 case PREP:
24462460 case BUSY:
24472461 ret = DMA_IN_PROGRESS;
drivers/dma/xilinx/xdma.c+4−2
@@ -668,6 +668,8 @@ static int xdma_set_vector_reg(struct xdma_device *xdev, u32 vec_tbl_start, · 667 unmodified lines
668668 val |= irq_start << shift;
669669 irq_start++;
670670 irq_num--;
671+ if (!irq_num)
672+ break;
671673 }
672674
673675 /* write IRQ register */
@@ -715,7 +717,7 @@ static int xdma_irq_init(struct xdma_device *xdev) · 41 unmodified lines
715717 ret = request_irq(irq, xdma_channel_isr, 0,
716718 "xdma-c2h-channel", &xdev->c2h_chans[j]);
717719 if (ret) {
718− xdma_err(xdev, "H2C channel%d request irq%d failed: %d",
720+ xdma_err(xdev, "C2H channel%d request irq%d failed: %d",
719721 j, irq, ret);
720722 goto failed_init_c2h;
721723 }
@@ -892,7 +894,7 @@ static int xdma_probe(struct platform_device *pdev) · 170 unmodified lines
892894 }
893895
894896 reg_base = devm_ioremap_resource(&pdev->dev, res);
895− if (!reg_base) {
897+ if (IS_ERR(reg_base)) {
896898 xdma_err(xdev, "ioremap failed");
897899 goto failed;
898900 }
drivers/firmware/arm_scmi/mailbox.c+3−1
@@ -166,8 +166,10 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, · 165 unmodified lines
166166 return -ENOMEM;
167167
168168 shmem = of_parse_phandle(cdev->of_node, "shmem", idx);
169− if (!of_device_is_compatible(shmem, "arm,scmi-shmem"))
169+ if (!of_device_is_compatible(shmem, "arm,scmi-shmem")) {
170+ of_node_put(shmem);
170171 return -ENXIO;
172+ }
171173
172174 ret = of_address_to_resource(shmem, 0, &res);
173175 of_node_put(shmem);
drivers/firmware/arm_scmi/raw_mode.c+4−1
@@ -818,10 +818,13 @@ static ssize_t scmi_dbg_raw_mode_common_write(struct file *filp, · 817 unmodified lines
818818 * before sending it with a single RAW xfer.
819819 */
820820 if (rd->tx_size < rd->tx_req_size) {
821− size_t cnt;
821+ ssize_t cnt;
822822
823823 cnt = simple_write_to_buffer(rd->tx.buf, rd->tx.len, ppos,
824824 buf, count);
825+ if (cnt < 0)
826+ return cnt;
827+
825828 rd->tx_size += cnt;
826829 if (cnt < count)
827830 return cnt;
drivers/firmware/arm_scmi/smc.c+14−7
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 /**
4141 * struct scmi_smc - Structure representing a SCMI smc transport
4242 *
43+ * @irq: An optional IRQ for completion
4344 * @cinfo: SCMI channel info
4445 * @shmem: Transmit/Receive shared memory area
4546 * @shmem_lock: Lock to protect access to Tx/Rx shared memory area.
@@ -52,6 +53,7 @@ · 6 unmodified lines
5253 */
5354
5455 struct scmi_smc {
56+ int irq;
5557 struct scmi_chan_info *cinfo;
5658 struct scmi_shared_mem __iomem *shmem;
5759 /* Protect access to shmem area */
@@ -127,7 +129,7 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, · 69 unmodified lines
127129 struct resource res;
128130 struct device_node *np;
129131 u32 func_id;
130− int ret, irq;
132+ int ret;
131133
132134 if (!tx)
133135 return -ENODEV;
@@ -137,8 +139,10 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, · 3 unmodified lines
137139 return -ENOMEM;
138140
139141 np = of_parse_phandle(cdev->of_node, "shmem", 0);
140− if (!of_device_is_compatible(np, "arm,scmi-shmem"))
142+ if (!of_device_is_compatible(np, "arm,scmi-shmem")) {
143+ of_node_put(np);
141144 return -ENXIO;
145+ }
142146
143147 ret = of_address_to_resource(np, 0, &res);
144148 of_node_put(np);
@@ -167,11 +171,10 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, · 22 unmodified lines
167171 * completion of a message is signaled by an interrupt rather than by
168172 * the return of the SMC call.
169173 */
170− irq = of_irq_get_byname(cdev->of_node, "a2p");
171− if (irq > 0) {
172− ret = devm_request_irq(dev, irq, smc_msg_done_isr,
173− IRQF_NO_SUSPEND,
174− dev_name(dev), scmi_info);
174+ scmi_info->irq = of_irq_get_byname(cdev->of_node, "a2p");
175+ if (scmi_info->irq > 0) {
176+ ret = request_irq(scmi_info->irq, smc_msg_done_isr,
177+ IRQF_NO_SUSPEND, dev_name(dev), scmi_info);
175178 if (ret) {
176179 dev_err(dev, "failed to setup SCMI smc irq\n");
177180 return ret;
@@ -193,6 +196,10 @@ static int smc_chan_free(int id, void *p, void *data) · 15 unmodified lines
193196 struct scmi_chan_info *cinfo = p;
194197 struct scmi_smc *scmi_info = cinfo->transport_info;
195198
199+ /* Ignore any possible further reception on the IRQ path */
200+ if (scmi_info->irq > 0)
201+ free_irq(scmi_info->irq, scmi_info);
202+
196203 cinfo->transport_info = NULL;
197204 scmi_info->cinfo = NULL;
198205
drivers/firmware/smccc/soc_id.c+2−3
@@ -34,7 +34,6 @@ static struct soc_device_attribute *soc_dev_attr; · 33 unmodified lines
3434
3535 static int __init smccc_soc_init(void)
3636 {
37− struct arm_smccc_res res;
3837 int soc_id_rev, soc_id_version;
3938 static char soc_id_str[20], soc_id_rev_str[12];
4039 static char soc_id_jep106_id_str[12];
@@ -49,13 +48,13 @@ static int __init smccc_soc_init(void) · 8 unmodified lines
4948 }
5049
5150 if (soc_id_version < 0) {
52− pr_err("ARCH_SOC_ID(0) returned error: %lx\n", res.a0);
51+ pr_err("Invalid SoC Version: %x\n", soc_id_version);
5352 return -EINVAL;
5453 }
5554
5655 soc_id_rev = arm_smccc_get_soc_id_revision();
5756 if (soc_id_rev < 0) {
58− pr_err("ARCH_SOC_ID(1) returned error: %lx\n", res.a0);
57+ pr_err("Invalid SoC Revision: %x\n", soc_id_rev);
5958 return -EINVAL;
6059 }
6160
drivers/gpio/gpio-sim.c+1−0
@@ -429,6 +429,7 @@ static int gpio_sim_add_bank(struct fwnode_handle *swnode, struct device *dev) · 428 unmodified lines
429429 gc->set_config = gpio_sim_set_config;
430430 gc->to_irq = gpio_sim_to_irq;
431431 gc->free = gpio_sim_free;
432+ gc->can_sleep = true;
432433
433434 ret = devm_gpiochip_add_data(dev, gc, chip);
434435 if (ret)
drivers/gpio/gpio-ws16c48.c+1−1
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 #include <linux/spinlock.h>
1919 #include <linux/types.h>
2020
21−#define WS16C48_EXTENT 10
21+#define WS16C48_EXTENT 11
2222 #define MAX_NUM_WS16C48 max_num_isa_dev(WS16C48_EXTENT)
2323
2424 static unsigned int base[MAX_NUM_WS16C48];
drivers/gpu/drm/amd/amdgpu/amdgpu.h+1−0
@@ -1296,6 +1296,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · 1295 unmodified lines
12961296 void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
12971297 int amdgpu_device_pci_reset(struct amdgpu_device *adev);
12981298 bool amdgpu_device_need_post(struct amdgpu_device *adev);
1299+bool amdgpu_sg_display_supported(struct amdgpu_device *adev);
12991300 bool amdgpu_device_pcie_dynamic_switching_supported(void);
13001301 bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
13011302 bool amdgpu_device_aspm_support_quirk(void);
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+1−1
@@ -295,7 +295,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p, · 294 unmodified lines
295295
296296 if (!p->gang_size) {
297297 ret = -EINVAL;
298− goto free_partial_kdata;
298+ goto free_all_kdata;
299299 }
300300
301301 for (i = 0; i < p->gang_size; ++i) {
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+26−0
@@ -1458,6 +1458,32 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev) · 1457 unmodified lines
14581458 return true;
14591459 }
14601460
1461+/*
1462+ * On APUs with >= 64GB white flickering has been observed w/ SG enabled.
1463+ * Disable S/G on such systems until we have a proper fix.
1464+ * https://gitlab.freedesktop.org/drm/amd/-/issues/2354
1465+ * https://gitlab.freedesktop.org/drm/amd/-/issues/2735
1466+ */
1467+bool amdgpu_sg_display_supported(struct amdgpu_device *adev)
1468+{
1469+ switch (amdgpu_sg_display) {
1470+ case -1:
1471+ break;
1472+ case 0:
1473+ return false;
1474+ case 1:
1475+ return true;
1476+ default:
1477+ return false;
1478+ }
1479+ if ((totalram_pages() << (PAGE_SHIFT - 10)) +
1480+ (adev->gmc.real_vram_size / 1024) >= 64000000) {
1481+ DRM_WARN("Disabling S/G due to >=64GB RAM\n");
1482+ return false;
1483+ }
1484+ return true;
1485+}
1486+
14611487 /*
14621488 * Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
14631489 * speed switching. Until we have confirmation from Intel that a specific host
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c+3−3
@@ -498,11 +498,11 @@ static int psp_sw_init(void *handle) · 497 unmodified lines
498498 return 0;
499499
500500 failed2:
501− amdgpu_bo_free_kernel(&psp->fw_pri_bo,
502− &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
503−failed1:
504501 amdgpu_bo_free_kernel(&psp->fence_buf_bo,
505502 &psp->fence_buf_mc_addr, &psp->fence_buf);
503+failed1:
504+ amdgpu_bo_free_kernel(&psp->fw_pri_bo,
505+ &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
506506 return ret;
507507 }
508508
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+6−2
@@ -471,8 +471,12 @@ static void gfx_v11_0_check_fw_cp_gfx_shadow(struct amdgpu_device *adev) · 470 unmodified lines
471471 case IP_VERSION(11, 0, 3):
472472 if ((adev->gfx.me_fw_version >= 1505) &&
473473 (adev->gfx.pfp_fw_version >= 1600) &&
474− (adev->gfx.mec_fw_version >= 512))
475− adev->gfx.cp_gfx_shadow = true;
474+ (adev->gfx.mec_fw_version >= 512)) {
475+ if (amdgpu_sriov_vf(adev))
476+ adev->gfx.cp_gfx_shadow = true;
477+ else
478+ adev->gfx.cp_gfx_shadow = false;
479+ }
476480 break;
477481 default:
478482 adev->gfx.cp_gfx_shadow = false;
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c+2−1
@@ -46,6 +46,7 @@ MODULE_FIRMWARE("amdgpu/gc_9_4_3_rlc.bin"); · 45 unmodified lines
4646 #define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L
4747
4848 #define GOLDEN_GB_ADDR_CONFIG 0x2a114042
49+#define CP_HQD_PERSISTENT_STATE_DEFAULT 0xbe05301
4950
5051 struct amdgpu_gfx_ras gfx_v9_4_3_ras;
5152
@@ -1736,7 +1737,7 @@ static int gfx_v9_4_3_xcc_q_fini_register(struct amdgpu_ring *ring, · 1684 unmodified lines
17361737
17371738 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_IQ_TIMER, 0);
17381739 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_IB_CONTROL, 0);
1739− WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PERSISTENT_STATE, 0);
1740+ WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PERSISTENT_STATE, CP_HQD_PERSISTENT_STATE_DEFAULT);
17401741 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_DOORBELL_CONTROL, 0x40000000);
17411742 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_DOORBELL_CONTROL, 0);
17421743 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_RPTR, 0);
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c+1−4
@@ -402,18 +402,15 @@ static void gfxhub_v1_2_xcc_program_invalidation(struct amdgpu_device *adev, · 401 unmodified lines
402402 static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,
403403 uint32_t xcc_mask)
404404 {
405− uint32_t tmp_mask;
406405 int i;
407406
408− tmp_mask = xcc_mask;
409407 /*
410408 * MC_VM_FB_LOCATION_BASE/TOP is NULL for VF, because they are
411409 * VF copy registers so vbios post doesn't program them, for
412410 * SRIOV driver need to program them
413411 */
414412 if (amdgpu_sriov_vf(adev)) {
415− for_each_inst(i, tmp_mask) {
416− i = ffs(tmp_mask) - 1;
413+ for_each_inst(i, xcc_mask) {
417414 WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_BASE,
418415 adev->gmc.vram_start >> 24);
419416 WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c+8−7
@@ -137,14 +137,15 @@ static int psp_v13_0_wait_for_bootloader(struct psp_context *psp) · 136 unmodified lines
137137 int ret;
138138 int retry_loop;
139139
140+ /* Wait for bootloader to signify that it is ready having bit 31 of
141+ * C2PMSG_35 set to 1. All other bits are expected to be cleared.
142+ * If there is an error in processing command, bits[7:0] will be set.
143+ * This is applicable for PSP v13.0.6 and newer.
144+ */
140145 for (retry_loop = 0; retry_loop < 10; retry_loop++) {
141− /* Wait for bootloader to signify that is
142− ready having bit 31 of C2PMSG_35 set to 1 */
143− ret = psp_wait_for(psp,
144− SOC15_REG_OFFSET(MP0, 0, regMP0_SMN_C2PMSG_35),
145− 0x80000000,
146− 0x80000000,
147− false);
146+ ret = psp_wait_for(
147+ psp, SOC15_REG_OFFSET(MP0, 0, regMP0_SMN_C2PMSG_35),
148+ 0x80000000, 0xffffffff, false);
148149
149150 if (ret == 0)
150151 return 0;
drivers/gpu/drm/amd/amdkfd/kfd_crat.c+0−4
@@ -1543,11 +1543,7 @@ static bool kfd_ignore_crat(void) · 1542 unmodified lines
15431543 if (ignore_crat)
15441544 return true;
15451545
1546−#ifndef KFD_SUPPORT_IOMMU_V2
15471546 ret = true;
1548−#else
1549− ret = false;
1550−#endif
15511547
15521548 return ret;
15531549 }
drivers/gpu/drm/amd/amdkfd/kfd_debug.c+2−3
@@ -302,8 +302,7 @@ static int kfd_dbg_set_queue_workaround(struct queue *q, bool enable) · 301 unmodified lines
302302 if (!q)
303303 return 0;
304304
305− if (KFD_GC_VERSION(q->device) < IP_VERSION(11, 0, 0) ||
306− KFD_GC_VERSION(q->device) >= IP_VERSION(12, 0, 0))
305+ if (!kfd_dbg_has_cwsr_workaround(q->device))
307306 return 0;
308307
309308 if (enable && q->properties.is_user_cu_masked)
@@ -349,7 +348,7 @@ int kfd_dbg_set_mes_debug_mode(struct kfd_process_device *pdd) · 39 unmodified lines
349348 {
350349 uint32_t spi_dbg_cntl = pdd->spi_dbg_override | pdd->spi_dbg_launch_mode;
351350 uint32_t flags = pdd->process->dbg_flags;
352− bool sq_trap_en = !!spi_dbg_cntl;
351+ bool sq_trap_en = !!spi_dbg_cntl || !kfd_dbg_has_cwsr_workaround(pdd->dev);
353352
354353 if (!kfd_dbg_is_per_vmid_supported(pdd->dev))
355354 return 0;
drivers/gpu/drm/amd/amdkfd/kfd_debug.h+6−0
@@ -100,6 +100,12 @@ static inline bool kfd_dbg_is_rlc_restore_supported(struct kfd_node *dev) · 99 unmodified lines
100100 KFD_GC_VERSION(dev) == IP_VERSION(10, 1, 1));
101101 }
102102
103+static inline bool kfd_dbg_has_cwsr_workaround(struct kfd_node *dev)
104+{
105+ return KFD_GC_VERSION(dev) >= IP_VERSION(11, 0, 0) &&
106+ KFD_GC_VERSION(dev) <= IP_VERSION(11, 0, 3);
107+}
108+
103109 static inline bool kfd_dbg_has_gws_support(struct kfd_node *dev)
104110 {
105111 if ((KFD_GC_VERSION(dev) == IP_VERSION(9, 0, 1)
drivers/gpu/drm/amd/amdkfd/kfd_device.c+0−13
@@ -194,11 +194,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd, · 193 unmodified lines
194194
195195 kfd_device_info_set_event_interrupt_class(kfd);
196196
197− /* Raven */
198− if (gc_version == IP_VERSION(9, 1, 0) ||
199− gc_version == IP_VERSION(9, 2, 2))
200− kfd->device_info.needs_iommu_device = true;
201−
202197 if (gc_version < IP_VERSION(11, 0, 0)) {
203198 /* Navi2x+, Navi1x+ */
204199 if (gc_version == IP_VERSION(10, 3, 6))
@@ -233,10 +228,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd, · 28 unmodified lines
233228 asic_type != CHIP_TONGA)
234229 kfd->device_info.supports_cwsr = true;
235230
236− if (asic_type == CHIP_KAVERI ||
237− asic_type == CHIP_CARRIZO)
238− kfd->device_info.needs_iommu_device = true;
239−
240231 if (asic_type != CHIP_HAWAII && !vf)
241232 kfd->device_info.needs_pci_atomics = true;
242233 }
@@ -249,7 +240,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) · 6 unmodified lines
249240 uint32_t gfx_target_version = 0;
250241
251242 switch (adev->asic_type) {
252−#ifdef KFD_SUPPORT_IOMMU_V2
253243 #ifdef CONFIG_DRM_AMDGPU_CIK
254244 case CHIP_KAVERI:
255245 gfx_target_version = 70000;
@@ -262,7 +252,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) · 6 unmodified lines
262252 if (!vf)
263253 f2g = &gfx_v8_kfd2kgd;
264254 break;
265−#endif
266255 #ifdef CONFIG_DRM_AMDGPU_CIK
267256 case CHIP_HAWAII:
268257 gfx_target_version = 70001;
@@ -298,7 +287,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) · 29 unmodified lines
298287 gfx_target_version = 90000;
299288 f2g = &gfx_v9_kfd2kgd;
300289 break;
301−#ifdef KFD_SUPPORT_IOMMU_V2
302290 /* Raven */
303291 case IP_VERSION(9, 1, 0):
304292 case IP_VERSION(9, 2, 2):
@@ -306,7 +294,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) · 1 unmodified line
306294 if (!vf)
307295 f2g = &gfx_v9_kfd2kgd;
308296 break;
309−#endif
310297 /* Vega12 */
311298 case IP_VERSION(9, 2, 1):
312299 gfx_target_version = 90004;
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+3−11
@@ -226,8 +226,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q, · 225 unmodified lines
226226 queue_input.paging = false;
227227 queue_input.tba_addr = qpd->tba_addr;
228228 queue_input.tma_addr = qpd->tma_addr;
229− queue_input.trap_en = KFD_GC_VERSION(q->device) < IP_VERSION(11, 0, 0) ||
230− KFD_GC_VERSION(q->device) > IP_VERSION(11, 0, 3);
229+ queue_input.trap_en = !kfd_dbg_has_cwsr_workaround(q->device);
231230 queue_input.skip_process_ctx_clear = qpd->pqm->process->debug_trap_enabled;
232231
233232 queue_type = convert_to_mes_queue_type(q->properties.type);
@@ -1806,8 +1805,7 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q, · 1572 unmodified lines
18061805 */
18071806 q->properties.is_evicted = !!qpd->evicted;
18081807 q->properties.is_dbg_wa = qpd->pqm->process->debug_trap_enabled &&
1809− KFD_GC_VERSION(q->device) >= IP_VERSION(11, 0, 0) &&
1810− KFD_GC_VERSION(q->device) <= IP_VERSION(11, 0, 3);
1808+ kfd_dbg_has_cwsr_workaround(q->device);
18111809
18121810 if (qd)
18131811 mqd_mgr->restore_mqd(mqd_mgr, &q->mqd, q->mqd_mem_obj, &q->gart_mqd_addr,
@@ -2540,18 +2538,12 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_node *dev) · 726 unmodified lines
25402538 }
25412539
25422540 switch (dev->adev->asic_type) {
2543− case CHIP_CARRIZO:
2544− device_queue_manager_init_vi(&dqm->asic_ops);
2545− break;
2546−
25472541 case CHIP_KAVERI:
2548− device_queue_manager_init_cik(&dqm->asic_ops);
2549− break;
2550−
25512542 case CHIP_HAWAII:
25522543 device_queue_manager_init_cik_hawaii(&dqm->asic_ops);
25532544 break;
25542545
2546+ case CHIP_CARRIZO:
25552547 case CHIP_TONGA:
25562548 case CHIP_FIJI:
25572549 case CHIP_POLARIS10:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+2−3
@@ -1638,9 +1638,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) · 1637 unmodified lines
16381638 }
16391639 break;
16401640 }
1641− if (init_data.flags.gpu_vm_support &&
1642− (amdgpu_sg_display == 0))
1643− init_data.flags.gpu_vm_support = false;
1641+ if (init_data.flags.gpu_vm_support)
1642+ init_data.flags.gpu_vm_support = amdgpu_sg_display_supported(adev);
16441643
16451644 if (init_data.flags.gpu_vm_support)
16461645 adev->mode_info.gpu_vm_support = true;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c+2−2
@@ -706,7 +706,7 @@ void dm_handle_mst_sideband_msg_ready_event( · 705 unmodified lines
706706
707707 if (retry == 3) {
708708 DRM_ERROR("Failed to ack MST event.\n");
709− return;
709+ break;
710710 }
711711
712712 drm_dp_mst_hpd_irq_send_new_request(&aconnector->mst_mgr);
@@ -1320,7 +1320,7 @@ int compute_mst_dsc_configs_for_state(struct drm_atomic_state *state, · 607 unmodified lines
13201320 if (computed_streams[i])
13211321 continue;
13221322
1323− if (!res_pool->funcs->remove_stream_from_ctx ||
1323+ if (res_pool->funcs->remove_stream_from_ctx &&
13241324 res_pool->funcs->remove_stream_from_ctx(stream->ctx->dc, dc_state, stream) != DC_OK)
13251325 return -EINVAL;
13261326
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c+5−1
@@ -777,7 +777,8 @@ void dce110_edp_wait_for_hpd_ready( · 776 unmodified lines
777777 dal_gpio_destroy_irq(&hpd);
778778
779779 /* ensure that the panel is detected */
780− ASSERT(edp_hpd_high);
780+ if (!edp_hpd_high)
781+ DC_LOG_DC("%s: wait timed out!\n", __func__);
781782 }
782783
783784 void dce110_edp_power_control(
@@ -1792,10 +1793,13 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context) · 1008 unmodified lines
17921793 hws->funcs.edp_backlight_control(edp_link_with_sink, false);
17931794 }
17941795 /*resume from S3, no vbios posting, no need to power down again*/
1796+ clk_mgr_exit_optimized_pwr_state(dc, dc->clk_mgr);
1797+
17951798 power_down_all_hw_blocks(dc);
17961799 disable_vga_and_power_gate_all_controllers(dc);
17971800 if (edp_link_with_sink && !keep_edp_vdd_on)
17981801 dc->hwss.edp_power_control(edp_link_with_sink, false);
1802+ clk_mgr_optimize_pwr_state(dc, dc->clk_mgr);
17991803 }
18001804 bios_set_scratch_acc_mode_change(dc->ctx->dc_bios, 1);
18011805 }
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c+5−2
@@ -357,8 +357,11 @@ void dpp3_set_cursor_attributes( · 356 unmodified lines
357357 int cur_rom_en = 0;
358358
359359 if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA ||
360− color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA)
361− cur_rom_en = 1;
360+ color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) {
361+ if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) {
362+ cur_rom_en = 1;
363+ }
364+ }
362365
363366 REG_UPDATE_3(CURSOR0_CONTROL,
364367 CUR0_MODE, color_format,
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c+2−1
@@ -84,7 +84,8 @@ static enum phyd32clk_clock_source get_phy_mux_symclk( · 83 unmodified lines
8484 struct dcn_dccg *dccg_dcn,
8585 enum phyd32clk_clock_source src)
8686 {
87− if (dccg_dcn->base.ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
87+ if (dccg_dcn->base.ctx->asic_id.chip_family == FAMILY_YELLOW_CARP &&
88+ dccg_dcn->base.ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
8889 if (src == PHYD32CLKC)
8990 src = PHYD32CLKF;
9091 if (src == PHYD32CLKD)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c+4−1
@@ -49,7 +49,10 @@ static void dccg32_trigger_dio_fifo_resync( · 48 unmodified lines
4949 uint32_t dispclk_rdivider_value = 0;
5050
5151 REG_GET(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_RDIVIDER, &dispclk_rdivider_value);
52− REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_WDIVIDER, dispclk_rdivider_value);
52+
53+ /* Not valid for the WDIVIDER to be set to 0 */
54+ if (dispclk_rdivider_value != 0)
55+ REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_WDIVIDER, dispclk_rdivider_value);
5356 }
5457
5558 static void dccg32_get_pixel_rate_div(
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c+2−2
@@ -1581,9 +1581,9 @@ static int smu_disable_dpms(struct smu_context *smu) · 1580 unmodified lines
15811581
15821582 /*
15831583 * For SMU 13.0.4/11, PMFW will handle the features disablement properly
1584− * for gpu reset case. Driver involvement is unnecessary.
1584+ * for gpu reset and S0i3 cases. Driver involvement is unnecessary.
15851585 */
1586− if (amdgpu_in_reset(adev)) {
1586+ if (amdgpu_in_reset(adev) || adev->in_s0ix) {
15871587 switch (adev->ip_versions[MP1_HWIP][0]) {
15881588 case IP_VERSION(13, 0, 4):
15891589 case IP_VERSION(13, 0, 11):
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c+16−6
@@ -331,11 +331,13 @@ static int smu_v13_0_0_check_powerplay_table(struct smu_context *smu) · 330 unmodified lines
331331 struct smu_13_0_0_powerplay_table *powerplay_table =
332332 table_context->power_play_table;
333333 struct smu_baco_context *smu_baco = &smu->smu_baco;
334+#if 0
334335 PPTable_t *pptable = smu->smu_table.driver_pptable;
335336 const OverDriveLimits_t * const overdrive_upperlimits =
336337 &pptable->SkuTable.OverDriveLimitsBasicMax;
337338 const OverDriveLimits_t * const overdrive_lowerlimits =
338339 &pptable->SkuTable.OverDriveLimitsMin;
340+#endif
339341
340342 if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_HARDWAREDC)
341343 smu->dc_controlled_by_gpio = true;
@@ -347,18 +349,27 @@ static int smu_v13_0_0_check_powerplay_table(struct smu_context *smu) · 5 unmodified lines
347349 if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_MACO)
348350 smu_baco->maco_support = true;
349351
352+ /*
353+ * We are in the transition to a new OD mechanism.
354+ * Disable the OD feature support for SMU13 temporarily.
355+ * TODO: get this reverted when new OD mechanism online
356+ */
357+#if 0
350358 if (!overdrive_lowerlimits->FeatureCtrlMask ||
351359 !overdrive_upperlimits->FeatureCtrlMask)
352360 smu->od_enabled = false;
353361
354− table_context->thermal_controller_type =
355− powerplay_table->thermal_controller_type;
356−
357362 /*
358363 * Instead of having its own buffer space and get overdrive_table copied,
359364 * smu->od_settings just points to the actual overdrive_table
360365 */
361366 smu->od_settings = &powerplay_table->overdrive_table;
367+#else
368+ smu->od_enabled = false;
369+#endif
370+
371+ table_context->thermal_controller_type =
372+ powerplay_table->thermal_controller_type;
362373
363374 return 0;
364375 }
@@ -1140,7 +1151,6 @@ static int smu_v13_0_0_print_clk_levels(struct smu_context *smu, · 775 unmodified lines
11401151 (OverDriveTableExternal_t *)smu->smu_table.overdrive_table;
11411152 struct smu_13_0_dpm_table *single_dpm_table;
11421153 struct smu_13_0_pcie_table *pcie_table;
1143− const int link_width[] = {0, 1, 2, 4, 8, 12, 16};
11441154 uint32_t gen_speed, lane_width;
11451155 int i, curr_freq, size = 0;
11461156 int32_t min_value, max_value;
@@ -1256,7 +1266,7 @@ static int smu_v13_0_0_print_clk_levels(struct smu_context *smu, · 109 unmodified lines
12561266 (pcie_table->pcie_lane[i] == 6) ? "x16" : "",
12571267 pcie_table->clk_freq[i],
12581268 (gen_speed == DECODE_GEN_SPEED(pcie_table->pcie_gen[i])) &&
1259− (lane_width == DECODE_LANE_WIDTH(link_width[pcie_table->pcie_lane[i]])) ?
1269+ (lane_width == DECODE_LANE_WIDTH(pcie_table->pcie_lane[i])) ?
12601270 "*" : "");
12611271 break;
12621272
@@ -1734,7 +1744,7 @@ static ssize_t smu_v13_0_0_get_gpu_metrics(struct smu_context *smu, · 471 unmodified lines
17341744 gpu_metrics->average_vclk1_frequency = metrics->AverageVclk1Frequency;
17351745 gpu_metrics->average_dclk1_frequency = metrics->AverageDclk1Frequency;
17361746
1737− gpu_metrics->current_gfxclk = metrics->CurrClock[PPCLK_GFXCLK];
1747+ gpu_metrics->current_gfxclk = gpu_metrics->average_gfxclk_frequency;
17381748 gpu_metrics->current_socclk = metrics->CurrClock[PPCLK_SOCCLK];
17391749 gpu_metrics->current_uclk = metrics->CurrClock[PPCLK_UCLK];
17401750 gpu_metrics->current_vclk0 = metrics->CurrClock[PPCLK_VCLK_0];
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c+2−3
@@ -1993,9 +1993,8 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table · 1992 unmodified lines
19931993
19941994 gpu_metrics->average_socket_power =
19951995 SMUQ10_TO_UINT(metrics->SocketPower);
1996− /* Energy is reported in 15.625mJ units */
1997− gpu_metrics->energy_accumulator =
1998− SMUQ10_TO_UINT(metrics->SocketEnergyAcc);
1996+ /* Energy counter reported in 15.259uJ (2^-16) units */
1997+ gpu_metrics->energy_accumulator = metrics->SocketEnergyAcc;
19991998
20001999 gpu_metrics->current_gfxclk =
20012000 SMUQ10_TO_UINT(metrics->GfxclkFrequency[xcc0]);
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c+9−3
@@ -323,10 +323,12 @@ static int smu_v13_0_7_check_powerplay_table(struct smu_context *smu) · 322 unmodified lines
323323 struct smu_baco_context *smu_baco = &smu->smu_baco;
324324 PPTable_t *smc_pptable = table_context->driver_pptable;
325325 BoardTable_t *BoardTable = &smc_pptable->BoardTable;
326+#if 0
326327 const OverDriveLimits_t * const overdrive_upperlimits =
327328 &smc_pptable->SkuTable.OverDriveLimitsBasicMax;
328329 const OverDriveLimits_t * const overdrive_lowerlimits =
329330 &smc_pptable->SkuTable.OverDriveLimitsMin;
331+#endif
330332
331333 if (powerplay_table->platform_caps & SMU_13_0_7_PP_PLATFORM_CAP_HARDWAREDC)
332334 smu->dc_controlled_by_gpio = true;
@@ -338,18 +340,22 @@ static int smu_v13_0_7_check_powerplay_table(struct smu_context *smu) · 5 unmodified lines
338340 if (smu_baco->platform_support && (BoardTable->HsrEnabled || BoardTable->VddqOffEnabled))
339341 smu_baco->maco_support = true;
340342
343+#if 0
341344 if (!overdrive_lowerlimits->FeatureCtrlMask ||
342345 !overdrive_upperlimits->FeatureCtrlMask)
343346 smu->od_enabled = false;
344347
345− table_context->thermal_controller_type =
346− powerplay_table->thermal_controller_type;
347−
348348 /*
349349 * Instead of having its own buffer space and get overdrive_table copied,
350350 * smu->od_settings just points to the actual overdrive_table
351351 */
352352 smu->od_settings = &powerplay_table->overdrive_table;
353+#else
354+ smu->od_enabled = false;
355+#endif
356+
357+ table_context->thermal_controller_type =
358+ powerplay_table->thermal_controller_type;
353359
354360 return 0;
355361 }
drivers/gpu/drm/bridge/ite-it6505.c+3−1
@@ -2517,9 +2517,11 @@ static irqreturn_t it6505_int_threaded_handler(int unused, void *data) · 2516 unmodified lines
25172517 };
25182518 int int_status[3], i;
25192519
2520− if (it6505->enable_drv_hold || pm_runtime_get_if_in_use(dev) <= 0)
2520+ if (it6505->enable_drv_hold || !it6505->powered)
25212521 return IRQ_HANDLED;
25222522
2523+ pm_runtime_get_sync(dev);
2524+
25232525 int_status[0] = it6505_read(it6505, INT_STATUS_01);
25242526 int_status[1] = it6505_read(it6505, INT_STATUS_02);
25252527 int_status[2] = it6505_read(it6505, INT_STATUS_03);
drivers/gpu/drm/bridge/lontium-lt9611.c+1−3
@@ -774,9 +774,7 @@ static struct mipi_dsi_device *lt9611_attach_dsi(struct lt9611 *lt9611, · 773 unmodified lines
774774 dsi->lanes = 4;
775775 dsi->format = MIPI_DSI_FMT_RGB888;
776776 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
777− MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO_NO_HSA |
778− MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP |
779− MIPI_DSI_MODE_NO_EOT_PACKET;
777+ MIPI_DSI_MODE_VIDEO_HSE;
780778
781779 ret = devm_mipi_dsi_attach(dev, dsi);
782780 if (ret < 0) {
drivers/gpu/drm/drm_gem_shmem_helper.c+6−0
@@ -623,7 +623,13 @@ int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct · 622 unmodified lines
623623 int ret;
624624
625625 if (obj->import_attach) {
626+ /* Reset both vm_ops and vm_private_data, so we don't end up with
627+ * vm_ops pointing to our implementation if the dma-buf backend
628+ * doesn't set those fields.
629+ */
626630 vma->vm_private_data = NULL;
631+ vma->vm_ops = NULL;
632+
627633 ret = dma_buf_mmap(obj->dma_buf, vma, 0);
628634
629635 /* Drop the reference drm_gem_mmap_obj() acquired.*/
drivers/gpu/drm/i915/display/intel_dpt.c+3−1
@@ -166,6 +166,8 @@ struct i915_vma *intel_dpt_pin(struct i915_address_space *vm) · 165 unmodified lines
166166 i915_vma_get(vma);
167167 }
168168
169+ dpt->obj->mm.dirty = true;
170+
169171 atomic_dec(&i915->gpu_error.pending_fb_pin);
170172 intel_runtime_pm_put(&i915->runtime_pm, wakeref);
171173
@@ -261,7 +263,7 @@ intel_dpt_create(struct intel_framebuffer *fb) · 89 unmodified lines
261263 dpt_obj = i915_gem_object_create_stolen(i915, size);
262264 if (IS_ERR(dpt_obj) && !HAS_LMEM(i915)) {
263265 drm_dbg_kms(&i915->drm, "Allocating dpt from smem\n");
264− dpt_obj = i915_gem_object_create_internal(i915, size);
266+ dpt_obj = i915_gem_object_create_shmem(i915, size);
265267 }
266268 if (IS_ERR(dpt_obj))
267269 return ERR_CAST(dpt_obj);
drivers/gpu/drm/i915/gem/selftests/huge_pages.c+4−2
@@ -1246,8 +1246,10 @@ static int igt_write_huge(struct drm_i915_private *i915, · 1245 unmodified lines
12461246 * times in succession a possibility by enlarging the permutation array.
12471247 */
12481248 order = i915_random_order(count * count, &prng);
1249− if (!order)
1250− return -ENOMEM;
1249+ if (!order) {
1250+ err = -ENOMEM;
1251+ goto out;
1252+ }
12511253
12521254 max_page_size = rounddown_pow_of_two(obj->mm.page_sizes.sg);
12531255 max = div_u64(max - size, max_page_size);
drivers/gpu/drm/i915/gt/gen8_engine_cs.c+92−48
@@ -165,14 +165,60 @@ static u32 preparser_disable(bool state) · 164 unmodified lines
165165 return MI_ARB_CHECK | 1 << 8 | state;
166166 }
167167
168−u32 *gen12_emit_aux_table_inv(struct intel_gt *gt, u32 *cs, const i915_reg_t inv_reg)
168+static i915_reg_t gen12_get_aux_inv_reg(struct intel_engine_cs *engine)
169169 {
170− u32 gsi_offset = gt->uncore->gsi_offset;
170+ switch (engine->id) {
171+ case RCS0:
172+ return GEN12_CCS_AUX_INV;
173+ case BCS0:
174+ return GEN12_BCS0_AUX_INV;
175+ case VCS0:
176+ return GEN12_VD0_AUX_INV;
177+ case VCS2:
178+ return GEN12_VD2_AUX_INV;
179+ case VECS0:
180+ return GEN12_VE0_AUX_INV;
181+ case CCS0:
182+ return GEN12_CCS0_AUX_INV;
183+ default:
184+ return INVALID_MMIO_REG;
185+ }
186+}
187+
188+static bool gen12_needs_ccs_aux_inv(struct intel_engine_cs *engine)
189+{
190+ i915_reg_t reg = gen12_get_aux_inv_reg(engine);
191+
192+ if (IS_PONTEVECCHIO(engine->i915))
193+ return false;
194+
195+ /*
196+ * So far platforms supported by i915 having flat ccs do not require
197+ * AUX invalidation. Check also whether the engine requires it.
198+ */
199+ return i915_mmio_reg_valid(reg) && !HAS_FLAT_CCS(engine->i915);
200+}
201+
202+u32 *gen12_emit_aux_table_inv(struct intel_engine_cs *engine, u32 *cs)
203+{
204+ i915_reg_t inv_reg = gen12_get_aux_inv_reg(engine);
205+ u32 gsi_offset = engine->gt->uncore->gsi_offset;
206+
207+ if (!gen12_needs_ccs_aux_inv(engine))
208+ return cs;
171209
172210 *cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
173211 *cs++ = i915_mmio_reg_offset(inv_reg) + gsi_offset;
174212 *cs++ = AUX_INV;
175− *cs++ = MI_NOOP;
213+
214+ *cs++ = MI_SEMAPHORE_WAIT_TOKEN |
215+ MI_SEMAPHORE_REGISTER_POLL |
216+ MI_SEMAPHORE_POLL |
217+ MI_SEMAPHORE_SAD_EQ_SDD;
218+ *cs++ = 0;
219+ *cs++ = i915_mmio_reg_offset(inv_reg) + gsi_offset;
220+ *cs++ = 0;
221+ *cs++ = 0;
176222
177223 return cs;
178224 }
@@ -202,8 +248,13 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode) · 23 unmodified lines
202248 {
203249 struct intel_engine_cs *engine = rq->engine;
204250
205− if (mode & EMIT_FLUSH) {
206− u32 flags = 0;
251+ /*
252+ * On Aux CCS platforms the invalidation of the Aux
253+ * table requires quiescing memory traffic beforehand
254+ */
255+ if (mode & EMIT_FLUSH || gen12_needs_ccs_aux_inv(engine)) {
256+ u32 bit_group_0 = 0;
257+ u32 bit_group_1 = 0;
207258 int err;
208259 u32 *cs;
209260
@@ -211,32 +262,40 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode) · 1 unmodified line
211262 if (err)
212263 return err;
213264
214− flags |= PIPE_CONTROL_TILE_CACHE_FLUSH;
215− flags |= PIPE_CONTROL_FLUSH_L3;
216− flags |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
217− flags |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
265+ bit_group_0 |= PIPE_CONTROL0_HDC_PIPELINE_FLUSH;
266+
267+ /*
268+ * When required, in MTL and beyond platforms we
269+ * need to set the CCS_FLUSH bit in the pipe control
270+ */
271+ if (GRAPHICS_VER_FULL(rq->i915) >= IP_VER(12, 70))
272+ bit_group_0 |= PIPE_CONTROL_CCS_FLUSH;
273+
274+ bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH;
275+ bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
276+ bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
277+ bit_group_1 |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
218278 /* Wa_1409600907:tgl,adl-p */
219− flags |= PIPE_CONTROL_DEPTH_STALL;
220− flags |= PIPE_CONTROL_DC_FLUSH_ENABLE;
221− flags |= PIPE_CONTROL_FLUSH_ENABLE;
279+ bit_group_1 |= PIPE_CONTROL_DEPTH_STALL;
280+ bit_group_1 |= PIPE_CONTROL_DC_FLUSH_ENABLE;
281+ bit_group_1 |= PIPE_CONTROL_FLUSH_ENABLE;
222282
223− flags |= PIPE_CONTROL_STORE_DATA_INDEX;
224− flags |= PIPE_CONTROL_QW_WRITE;
283+ bit_group_1 |= PIPE_CONTROL_STORE_DATA_INDEX;
284+ bit_group_1 |= PIPE_CONTROL_QW_WRITE;
225285
226− flags |= PIPE_CONTROL_CS_STALL;
286+ bit_group_1 |= PIPE_CONTROL_CS_STALL;
227287
228288 if (!HAS_3D_PIPELINE(engine->i915))
229− flags &= ~PIPE_CONTROL_3D_ARCH_FLAGS;
289+ bit_group_1 &= ~PIPE_CONTROL_3D_ARCH_FLAGS;
230290 else if (engine->class == COMPUTE_CLASS)
231− flags &= ~PIPE_CONTROL_3D_ENGINE_FLAGS;
291+ bit_group_1 &= ~PIPE_CONTROL_3D_ENGINE_FLAGS;
232292
233293 cs = intel_ring_begin(rq, 6);
234294 if (IS_ERR(cs))
235295 return PTR_ERR(cs);
236296
237− cs = gen12_emit_pipe_control(cs,
238− PIPE_CONTROL0_HDC_PIPELINE_FLUSH,
239− flags, LRC_PPHWSP_SCRATCH_ADDR);
297+ cs = gen12_emit_pipe_control(cs, bit_group_0, bit_group_1,
298+ LRC_PPHWSP_SCRATCH_ADDR);
240299 intel_ring_advance(rq, cs);
241300 }
242301
@@ -267,10 +326,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode) · 24 unmodified lines
267326 else if (engine->class == COMPUTE_CLASS)
268327 flags &= ~PIPE_CONTROL_3D_ENGINE_FLAGS;
269328
270− if (!HAS_FLAT_CCS(rq->engine->i915))
271− count = 8 + 4;
272− else
273− count = 8;
329+ count = 8;
330+ if (gen12_needs_ccs_aux_inv(rq->engine))
331+ count += 8;
274332
275333 cs = intel_ring_begin(rq, count);
276334 if (IS_ERR(cs))
@@ -285,11 +343,7 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode) · 8 unmodified lines
285343
286344 cs = gen8_emit_pipe_control(cs, flags, LRC_PPHWSP_SCRATCH_ADDR);
287345
288− if (!HAS_FLAT_CCS(rq->engine->i915)) {
289− /* hsdes: 1809175790 */
290− cs = gen12_emit_aux_table_inv(rq->engine->gt,
291− cs, GEN12_GFX_CCS_AUX_NV);
292− }
346+ cs = gen12_emit_aux_table_inv(engine, cs);
293347
294348 *cs++ = preparser_disable(false);
295349 intel_ring_advance(rq, cs);
@@ -300,21 +354,14 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode) · 4 unmodified lines
300354
301355 int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
302356 {
303− intel_engine_mask_t aux_inv = 0;
304− u32 cmd, *cs;
357+ u32 cmd = 4;
358+ u32 *cs;
305359
306− cmd = 4;
307360 if (mode & EMIT_INVALIDATE) {
308361 cmd += 2;
309362
310− if (!HAS_FLAT_CCS(rq->engine->i915) &&
311− (rq->engine->class == VIDEO_DECODE_CLASS ||
312− rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
313− aux_inv = rq->engine->mask &
314− ~GENMASK(_BCS(I915_MAX_BCS - 1), BCS0);
315− if (aux_inv)
316− cmd += 4;
317− }
363+ if (gen12_needs_ccs_aux_inv(rq->engine))
364+ cmd += 8;
318365 }
319366
320367 cs = intel_ring_begin(rq, cmd);
@@ -338,6 +385,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode) · 17 unmodified lines
338385 cmd |= MI_INVALIDATE_TLB;
339386 if (rq->engine->class == VIDEO_DECODE_CLASS)
340387 cmd |= MI_INVALIDATE_BSD;
388+
389+ if (gen12_needs_ccs_aux_inv(rq->engine) &&
390+ rq->engine->class == COPY_ENGINE_CLASS)
391+ cmd |= MI_FLUSH_DW_CCS;
341392 }
342393
343394 *cs++ = cmd;
@@ -345,14 +396,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode) · 1 unmodified line
345396 *cs++ = 0; /* upper addr */
346397 *cs++ = 0; /* value */
347398
348− if (aux_inv) { /* hsdes: 1809175790 */
349− if (rq->engine->class == VIDEO_DECODE_CLASS)
350− cs = gen12_emit_aux_table_inv(rq->engine->gt,
351− cs, GEN12_VD0_AUX_NV);
352− else
353− cs = gen12_emit_aux_table_inv(rq->engine->gt,
354− cs, GEN12_VE0_AUX_NV);
355− }
399+ cs = gen12_emit_aux_table_inv(rq->engine, cs);
356400
357401 if (mode & EMIT_INVALIDATE)
358402 *cs++ = preparser_disable(false);
drivers/gpu/drm/i915/gt/gen8_engine_cs.h+13−8
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #include "intel_gt_regs.h"
1414 #include "intel_gpu_commands.h"
1515
16+struct intel_engine_cs;
1617 struct intel_gt;
1718 struct i915_request;
1819
@@ -46,28 +47,32 @@ u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs); · 27 unmodified lines
4647 u32 *gen11_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
4748 u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
4849
49−u32 *gen12_emit_aux_table_inv(struct intel_gt *gt, u32 *cs, const i915_reg_t inv_reg);
50+u32 *gen12_emit_aux_table_inv(struct intel_engine_cs *engine, u32 *cs);
5051
5152 static inline u32 *
52−__gen8_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)
53+__gen8_emit_pipe_control(u32 *batch, u32 bit_group_0,
54+ u32 bit_group_1, u32 offset)
5355 {
5456 memset(batch, 0, 6 * sizeof(u32));
5557
56− batch[0] = GFX_OP_PIPE_CONTROL(6) | flags0;
57− batch[1] = flags1;
58+ batch[0] = GFX_OP_PIPE_CONTROL(6) | bit_group_0;
59+ batch[1] = bit_group_1;
5860 batch[2] = offset;
5961
6062 return batch + 6;
6163 }
6264
63−static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset)
65+static inline u32 *gen8_emit_pipe_control(u32 *batch,
66+ u32 bit_group_1, u32 offset)
6467 {
65− return __gen8_emit_pipe_control(batch, 0, flags, offset);
68+ return __gen8_emit_pipe_control(batch, 0, bit_group_1, offset);
6669 }
6770
68−static inline u32 *gen12_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)
71+static inline u32 *gen12_emit_pipe_control(u32 *batch, u32 bit_group_0,
72+ u32 bit_group_1, u32 offset)
6973 {
70− return __gen8_emit_pipe_control(batch, flags0, flags1, offset);
74+ return __gen8_emit_pipe_control(batch, bit_group_0,
75+ bit_group_1, offset);
7176 }
7277
7378 static inline u32 *
drivers/gpu/drm/i915/gt/intel_gpu_commands.h+2−0
@@ -121,6 +121,7 @@ · 120 unmodified lines
121121 #define MI_SEMAPHORE_TARGET(engine) ((engine)<<15)
122122 #define MI_SEMAPHORE_WAIT MI_INSTR(0x1c, 2) /* GEN8+ */
123123 #define MI_SEMAPHORE_WAIT_TOKEN MI_INSTR(0x1c, 3) /* GEN12+ */
124+#define MI_SEMAPHORE_REGISTER_POLL (1 << 16)
124125 #define MI_SEMAPHORE_POLL (1 << 15)
125126 #define MI_SEMAPHORE_SAD_GT_SDD (0 << 12)
126127 #define MI_SEMAPHORE_SAD_GTE_SDD (1 << 12)
@@ -299,6 +300,7 @@ · 172 unmodified lines
299300 #define PIPE_CONTROL_QW_WRITE (1<<14)
300301 #define PIPE_CONTROL_POST_SYNC_OP_MASK (3<<14)
301302 #define PIPE_CONTROL_DEPTH_STALL (1<<13)
303+#define PIPE_CONTROL_CCS_FLUSH (1<<13) /* MTL+ */
302304 #define PIPE_CONTROL_WRITE_FLUSH (1<<12)
303305 #define PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH (1<<12) /* gen6+ */
304306 #define PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE (1<<11) /* MBZ on ILK */
drivers/gpu/drm/i915/gt/intel_gt_regs.h+8−8
@@ -332,9 +332,11 @@ · 331 unmodified lines
332332 #define GEN8_PRIVATE_PAT_HI _MMIO(0x40e0 + 4)
333333 #define GEN10_PAT_INDEX(index) _MMIO(0x40e0 + (index) * 4)
334334 #define BSD_HWS_PGA_GEN7 _MMIO(0x4180)
335−#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4208)
336−#define GEN12_VD0_AUX_NV _MMIO(0x4218)
337−#define GEN12_VD1_AUX_NV _MMIO(0x4228)
335+
336+#define GEN12_CCS_AUX_INV _MMIO(0x4208)
337+#define GEN12_VD0_AUX_INV _MMIO(0x4218)
338+#define GEN12_VE0_AUX_INV _MMIO(0x4238)
339+#define GEN12_BCS0_AUX_INV _MMIO(0x4248)
338340
339341 #define GEN8_RTCR _MMIO(0x4260)
340342 #define GEN8_M1TCR _MMIO(0x4264)
@@ -342,14 +344,12 @@ · 1 unmodified line
342344 #define GEN8_BTCR _MMIO(0x426c)
343345 #define GEN8_VTCR _MMIO(0x4270)
344346
345−#define GEN12_VD2_AUX_NV _MMIO(0x4298)
346−#define GEN12_VD3_AUX_NV _MMIO(0x42a8)
347−#define GEN12_VE0_AUX_NV _MMIO(0x4238)
348−
349347 #define BLT_HWS_PGA_GEN7 _MMIO(0x4280)
350348
351−#define GEN12_VE1_AUX_NV _MMIO(0x42b8)
349+#define GEN12_VD2_AUX_INV _MMIO(0x4298)
350+#define GEN12_CCS0_AUX_INV _MMIO(0x42c8)
352351 #define AUX_INV REG_BIT(0)
352+
353353 #define VEBOX_HWS_PGA_GEN7 _MMIO(0x4380)
354354
355355 #define GEN12_AUX_ERR_DBG _MMIO(0x43f4)
drivers/gpu/drm/i915/gt/intel_lrc.c+2−15
@@ -1364,10 +1364,7 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs) · 1363 unmodified lines
13641364 IS_DG2_G11(ce->engine->i915))
13651365 cs = gen8_emit_pipe_control(cs, PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE, 0);
13661366
1367− /* hsdes: 1809175790 */
1368− if (!HAS_FLAT_CCS(ce->engine->i915))
1369− cs = gen12_emit_aux_table_inv(ce->engine->gt,
1370− cs, GEN12_GFX_CCS_AUX_NV);
1367+ cs = gen12_emit_aux_table_inv(ce->engine, cs);
13711368
13721369 /* Wa_16014892111 */
13731370 if (IS_MTL_GRAPHICS_STEP(ce->engine->i915, M, STEP_A0, STEP_B0) ||
@@ -1392,17 +1389,7 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs) · 18 unmodified lines
13921389 PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,
13931390 0);
13941391
1395− /* hsdes: 1809175790 */
1396− if (!HAS_FLAT_CCS(ce->engine->i915)) {
1397− if (ce->engine->class == VIDEO_DECODE_CLASS)
1398− cs = gen12_emit_aux_table_inv(ce->engine->gt,
1399− cs, GEN12_VD0_AUX_NV);
1400− else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
1401− cs = gen12_emit_aux_table_inv(ce->engine->gt,
1402− cs, GEN12_VE0_AUX_NV);
1403− }
1404−
1405− return cs;
1392+ return gen12_emit_aux_table_inv(ce->engine, cs);
14061393 }
14071394
14081395 static void
drivers/gpu/drm/i915/gvt/edid.c+1−1
@@ -491,7 +491,7 @@ void intel_gvt_i2c_handle_aux_ch_write(struct intel_vgpu *vgpu, · 490 unmodified lines
491491 return;
492492 }
493493
494− msg_length = REG_FIELD_GET(DP_AUX_CH_CTL_MESSAGE_SIZE_MASK, reg);
494+ msg_length = REG_FIELD_GET(DP_AUX_CH_CTL_MESSAGE_SIZE_MASK, value);
495495
496496 // check the msg in DATA register.
497497 msg = vgpu_vreg(vgpu, offset + 4);
drivers/gpu/drm/i915/i915_active.c+70−29
@@ -449,8 +449,11 @@ int i915_active_add_request(struct i915_active *ref, struct i915_request *rq) · 448 unmodified lines
449449 }
450450 } while (unlikely(is_barrier(active)));
451451
452− if (!__i915_active_fence_set(active, fence))
452+ fence = __i915_active_fence_set(active, fence);
453+ if (!fence)
453454 __i915_active_acquire(ref);
455+ else
456+ dma_fence_put(fence);
454457
455458 out:
456459 i915_active_release(ref);
@@ -469,13 +472,9 @@ __i915_active_set_fence(struct i915_active *ref, · 12 unmodified lines
469472 return NULL;
470473 }
471474
472− rcu_read_lock();
473475 prev = __i915_active_fence_set(active, fence);
474− if (prev)
475− prev = dma_fence_get_rcu(prev);
476− else
476+ if (!prev)
477477 __i915_active_acquire(ref);
478− rcu_read_unlock();
479478
480479 return prev;
481480 }
@@ -1019,10 +1018,11 @@ void i915_request_add_active_barriers(struct i915_request *rq) · 537 unmodified lines
10191018 *
10201019 * Records the new @fence as the last active fence along its timeline in
10211020 * this active tracker, moving the tracking callbacks from the previous
1022− * fence onto this one. Returns the previous fence (if not already completed),
1023− * which the caller must ensure is executed before the new fence. To ensure
1024− * that the order of fences within the timeline of the i915_active_fence is
1025− * understood, it should be locked by the caller.
1021+ * fence onto this one. Gets and returns a reference to the previous fence
1022+ * (if not already completed), which the caller must put after making sure
1023+ * that it is executed before the new fence. To ensure that the order of
1024+ * fences within the timeline of the i915_active_fence is understood, it
1025+ * should be locked by the caller.
10261026 */
10271027 struct dma_fence *
10281028 __i915_active_fence_set(struct i915_active_fence *active,
@@ -1031,7 +1031,23 @@ __i915_active_fence_set(struct i915_active_fence *active, · 2 unmodified lines
10311031 struct dma_fence *prev;
10321032 unsigned long flags;
10331033
1034− if (fence == rcu_access_pointer(active->fence))
1034+ /*
1035+ * In case of fences embedded in i915_requests, their memory is
1036+ * SLAB_FAILSAFE_BY_RCU, then it can be reused right after release
1037+ * by new requests. Then, there is a risk of passing back a pointer
1038+ * to a new, completely unrelated fence that reuses the same memory
1039+ * while tracked under a different active tracker. Combined with i915
1040+ * perf open/close operations that build await dependencies between
1041+ * engine kernel context requests and user requests from different
1042+ * timelines, this can lead to dependency loops and infinite waits.
1043+ *
1044+ * As a countermeasure, we try to get a reference to the active->fence
1045+ * first, so if we succeed and pass it back to our user then it is not
1046+ * released and potentially reused by an unrelated request before the
1047+ * user has a chance to set up an await dependency on it.
1048+ */
1049+ prev = i915_active_fence_get(active);
1050+ if (fence == prev)
10351051 return fence;
10361052
10371053 GEM_BUG_ON(test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags));
@@ -1040,27 +1056,56 @@ __i915_active_fence_set(struct i915_active_fence *active, · 2 unmodified lines
10401056 * Consider that we have two threads arriving (A and B), with
10411057 * C already resident as the active->fence.
10421058 *
1043− * A does the xchg first, and so it sees C or NULL depending
1044− * on the timing of the interrupt handler. If it is NULL, the
1045− * previous fence must have been signaled and we know that
1046− * we are first on the timeline. If it is still present,
1047− * we acquire the lock on that fence and serialise with the interrupt
1048− * handler, in the process removing it from any future interrupt
1049− * callback. A will then wait on C before executing (if present).
1050− *
1051− * As B is second, it sees A as the previous fence and so waits for
1052− * it to complete its transition and takes over the occupancy for
1053− * itself -- remembering that it needs to wait on A before executing.
1059+ * Both A and B have got a reference to C or NULL, depending on the
1060+ * timing of the interrupt handler. Let's assume that if A has got C
1061+ * then it has locked C first (before B).
10541062 *
10551063 * Note the strong ordering of the timeline also provides consistent
10561064 * nesting rules for the fence->lock; the inner lock is always the
10571065 * older lock.
10581066 */
10591067 spin_lock_irqsave(fence->lock, flags);
1060− prev = xchg(__active_fence_slot(active), fence);
1061− if (prev) {
1062− GEM_BUG_ON(prev == fence);
1068+ if (prev)
10631069 spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
1070+
1071+ /*
1072+ * A does the cmpxchg first, and so it sees C or NULL, as before, or
1073+ * something else, depending on the timing of other threads and/or
1074+ * interrupt handler. If not the same as before then A unlocks C if
1075+ * applicable and retries, starting from an attempt to get a new
1076+ * active->fence. Meanwhile, B follows the same path as A.
1077+ * Once A succeeds with cmpxch, B fails again, retires, gets A from
1078+ * active->fence, locks it as soon as A completes, and possibly
1079+ * succeeds with cmpxchg.
1080+ */
1081+ while (cmpxchg(__active_fence_slot(active), prev, fence) != prev) {
1082+ if (prev) {
1083+ spin_unlock(prev->lock);
1084+ dma_fence_put(prev);
1085+ }
1086+ spin_unlock_irqrestore(fence->lock, flags);
1087+
1088+ prev = i915_active_fence_get(active);
1089+ GEM_BUG_ON(prev == fence);
1090+
1091+ spin_lock_irqsave(fence->lock, flags);
1092+ if (prev)
1093+ spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
1094+ }
1095+
1096+ /*
1097+ * If prev is NULL then the previous fence must have been signaled
1098+ * and we know that we are first on the timeline. If it is still
1099+ * present then, having the lock on that fence already acquired, we
1100+ * serialise with the interrupt handler, in the process of removing it
1101+ * from any future interrupt callback. A will then wait on C before
1102+ * executing (if present).
1103+ *
1104+ * As B is second, it sees A as the previous fence and so waits for
1105+ * it to complete its transition and takes over the occupancy for
1106+ * itself -- remembering that it needs to wait on A before executing.
1107+ */
1108+ if (prev) {
10641109 __list_del_entry(&active->cb.node);
10651110 spin_unlock(prev->lock); /* serialise with prev->cb_list */
10661111 }
@@ -1077,11 +1122,7 @@ int i915_active_fence_set(struct i915_active_fence *active, · 10 unmodified lines
10771122 int err = 0;
10781123
10791124 /* Must maintain timeline ordering wrt previous active requests */
1080− rcu_read_lock();
10811125 fence = __i915_active_fence_set(active, &rq->fence);
1082− if (fence) /* but the previous fence may not belong to that timeline! */
1083− fence = dma_fence_get_rcu(fence);
1084− rcu_read_unlock();
10851126 if (fence) {
10861127 err = i915_request_await_dma_fence(rq, fence);
10871128 dma_fence_put(fence);
drivers/gpu/drm/i915/i915_request.c+11−0
@@ -1661,6 +1661,11 @@ __i915_request_ensure_parallel_ordering(struct i915_request *rq, · 1660 unmodified lines
16611661
16621662 request_to_parent(rq)->parallel.last_rq = i915_request_get(rq);
16631663
1664+ /*
1665+ * Users have to put a reference potentially got by
1666+ * __i915_active_fence_set() to the returned request
1667+ * when no longer needed
1668+ */
16641669 return to_request(__i915_active_fence_set(&timeline->last_request,
16651670 &rq->fence));
16661671 }
@@ -1707,6 +1712,10 @@ __i915_request_ensure_ordering(struct i915_request *rq, · 40 unmodified lines
17071712 0);
17081713 }
17091714
1715+ /*
1716+ * Users have to put the reference to prev potentially got
1717+ * by __i915_active_fence_set() when no longer needed
1718+ */
17101719 return prev;
17111720 }
17121721
@@ -1760,6 +1769,8 @@ __i915_request_add_to_timeline(struct i915_request *rq) · 47 unmodified lines
17601769 prev = __i915_request_ensure_ordering(rq, timeline);
17611770 else
17621771 prev = __i915_request_ensure_parallel_ordering(rq, timeline);
1772+ if (prev)
1773+ i915_request_put(prev);
17631774
17641775 /*
17651776 * Make sure that no request gazumped us - if it was allocated after
drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c+1−1
@@ -310,7 +310,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc) · 309 unmodified lines
310310 dev_warn(ipu_crtc->dev, "8-pixel align hactive %d -> %d\n",
311311 sig_cfg.mode.hactive, new_hactive);
312312
313− sig_cfg.mode.hfront_porch = new_hactive - sig_cfg.mode.hactive;
313+ sig_cfg.mode.hfront_porch -= new_hactive - sig_cfg.mode.hactive;
314314 sig_cfg.mode.hactive = new_hactive;
315315 }
316316
drivers/gpu/drm/msm/adreno/a5xx_gpu.c+1−1
@@ -89,7 +89,7 @@ static void a5xx_submit_in_rb(struct msm_gpu *gpu, struct msm_gem_submit *submit · 88 unmodified lines
8989 * since we've already mapped it once in
9090 * submit_reloc()
9191 */
92− if (WARN_ON(!ptr))
92+ if (WARN_ON(IS_ERR_OR_NULL(ptr)))
9393 return;
9494
9595 for (i = 0; i < dwords; i++) {
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h+1−1
@@ -206,7 +206,7 @@ static const struct a6xx_shader_block { · 205 unmodified lines
206206 SHADER(A6XX_SP_LB_3_DATA, 0x800),
207207 SHADER(A6XX_SP_LB_4_DATA, 0x800),
208208 SHADER(A6XX_SP_LB_5_DATA, 0x200),
209− SHADER(A6XX_SP_CB_BINDLESS_DATA, 0x2000),
209+ SHADER(A6XX_SP_CB_BINDLESS_DATA, 0x800),
210210 SHADER(A6XX_SP_CB_LEGACY_DATA, 0x280),
211211 SHADER(A6XX_SP_UAV_DATA, 0x80),
212212 SHADER(A6XX_SP_INST_TAG, 0x80),
drivers/gpu/drm/msm/adreno/adreno_device.c+0−2
@@ -369,8 +369,6 @@ static const struct adreno_info gpulist[] = { · 368 unmodified lines
369369 .hwcg = a640_hwcg,
370370 }, {
371371 .rev = ADRENO_REV(6, 9, 0, ANY_ID),
372− .revn = 690,
373− .name = "A690",
374372 .fw = {
375373 [ADRENO_FW_SQE] = "a660_sqe.fw",
376374 [ADRENO_FW_GMU] = "a690_gmu.bin",
drivers/gpu/drm/msm/adreno/adreno_gpu.h+8−4
@@ -149,7 +149,8 @@ bool adreno_cmp_rev(struct adreno_rev rev1, struct adreno_rev rev2); · 148 unmodified lines
149149
150150 static inline bool adreno_is_revn(const struct adreno_gpu *gpu, uint32_t revn)
151151 {
152− WARN_ON_ONCE(!gpu->revn);
152+ /* revn can be zero, but if not is set at same time as info */
153+ WARN_ON_ONCE(!gpu->info);
153154
154155 return gpu->revn == revn;
155156 }
@@ -161,14 +162,16 @@ static inline bool adreno_has_gmu_wrapper(const struct adreno_gpu *gpu) · 5 unmodified lines
161162
162163 static inline bool adreno_is_a2xx(const struct adreno_gpu *gpu)
163164 {
164− WARN_ON_ONCE(!gpu->revn);
165+ /* revn can be zero, but if not is set at same time as info */
166+ WARN_ON_ONCE(!gpu->info);
165167
166168 return (gpu->revn < 300);
167169 }
168170
169171 static inline bool adreno_is_a20x(const struct adreno_gpu *gpu)
170172 {
171− WARN_ON_ONCE(!gpu->revn);
173+ /* revn can be zero, but if not is set at same time as info */
174+ WARN_ON_ONCE(!gpu->info);
172175
173176 return (gpu->revn < 210);
174177 }
@@ -307,7 +310,8 @@ static inline int adreno_is_a680(const struct adreno_gpu *gpu) · 132 unmodified lines
307310
308311 static inline int adreno_is_a690(const struct adreno_gpu *gpu)
309312 {
310− return adreno_is_revn(gpu, 690);
313+ /* The order of args is important here to handle ANY_ID correctly */
314+ return adreno_cmp_rev(ADRENO_REV(6, 9, 0, ANY_ID), gpu->rev);
311315 };
312316
313317 /* check for a615, a616, a618, a619 or any derivatives */
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h+0−13
@@ -14,19 +14,6 @@ · 13 unmodified lines
1414
1515 #define DPU_PERF_DEFAULT_MAX_CORE_CLK_RATE 412500000
1616
17−/**
18− * enum dpu_core_perf_data_bus_id - data bus identifier
19− * @DPU_CORE_PERF_DATA_BUS_ID_MNOC: DPU/MNOC data bus
20− * @DPU_CORE_PERF_DATA_BUS_ID_LLCC: MNOC/LLCC data bus
21− * @DPU_CORE_PERF_DATA_BUS_ID_EBI: LLCC/EBI data bus
22− */
23−enum dpu_core_perf_data_bus_id {
24− DPU_CORE_PERF_DATA_BUS_ID_MNOC,
25− DPU_CORE_PERF_DATA_BUS_ID_LLCC,
26− DPU_CORE_PERF_DATA_BUS_ID_EBI,
27− DPU_CORE_PERF_DATA_BUS_ID_MAX,
28−};
29−
3017 /**
3118 * struct dpu_core_perf_params - definition of performance parameters
3219 * @max_per_pipe_ib: maximum instantaneous bandwidth request
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c+7−1
@@ -51,7 +51,7 @@ · 50 unmodified lines
5151
5252 static const u32 fetch_tbl[SSPP_MAX] = {CTL_INVALID_BIT, 16, 17, 18, 19,
5353 CTL_INVALID_BIT, CTL_INVALID_BIT, CTL_INVALID_BIT, CTL_INVALID_BIT, 0,
54− 1, 2, 3, CTL_INVALID_BIT, CTL_INVALID_BIT};
54+ 1, 2, 3, 4, 5};
5555
5656 static int _mixer_stages(const struct dpu_lm_cfg *mixer, int count,
5757 enum dpu_lm lm)
@@ -198,6 +198,12 @@ static void dpu_hw_ctl_update_pending_flush_sspp(struct dpu_hw_ctl *ctx, · 140 unmodified lines
198198 case SSPP_DMA3:
199199 ctx->pending_flush_mask |= BIT(25);
200200 break;
201+ case SSPP_DMA4:
202+ ctx->pending_flush_mask |= BIT(13);
203+ break;
204+ case SSPP_DMA5:
205+ ctx->pending_flush_mask |= BIT(14);
206+ break;
201207 case SSPP_CURSOR0:
202208 ctx->pending_flush_mask |= BIT(22);
203209 break;
drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c+0−2
@@ -1087,8 +1087,6 @@ const struct msm_dsi_phy_cfg dsi_phy_14nm_8953_cfgs = { · 1086 unmodified lines
10871087
10881088 const struct msm_dsi_phy_cfg dsi_phy_14nm_2290_cfgs = {
10891089 .has_phy_lane = true,
1090− .regulator_data = dsi_phy_14nm_17mA_regulators,
1091− .num_regulators = ARRAY_SIZE(dsi_phy_14nm_17mA_regulators),
10921090 .ops = {
10931091 .enable = dsi_14nm_phy_enable,
10941092 .disable = dsi_14nm_phy_disable,
drivers/gpu/drm/msm/msm_fence.c+6−0
@@ -191,6 +191,12 @@ msm_fence_init(struct dma_fence *fence, struct msm_fence_context *fctx) · 190 unmodified lines
191191
192192 f->fctx = fctx;
193193
194+ /*
195+ * Until this point, the fence was just some pre-allocated memory,
196+ * no-one should have taken a reference to it yet.
197+ */
198+ WARN_ON(kref_read(&fence->refcount));
199+
194200 dma_fence_init(&f->base, &msm_fence_ops, &fctx->spinlock,
195201 fctx->context, ++fctx->last_fence);
196202 }
drivers/gpu/drm/msm/msm_gem_submit.c+14−2
@@ -86,7 +86,19 @@ void __msm_gem_submit_destroy(struct kref *kref) · 85 unmodified lines
8686 }
8787
8888 dma_fence_put(submit->user_fence);
89− dma_fence_put(submit->hw_fence);
89+
90+ /*
91+ * If the submit is freed before msm_job_run(), then hw_fence is
92+ * just some pre-allocated memory, not a reference counted fence.
93+ * Once the job runs and the hw_fence is initialized, it will
94+ * have a refcount of at least one, since the submit holds a ref
95+ * to the hw_fence.
96+ */
97+ if (kref_read(&submit->hw_fence->refcount) == 0) {
98+ kfree(submit->hw_fence);
99+ } else {
100+ dma_fence_put(submit->hw_fence);
101+ }
90102
91103 put_pid(submit->pid);
92104 msm_submitqueue_put(submit->queue);
@@ -889,7 +901,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, · 796 unmodified lines
889901 * after the job is armed
890902 */
891903 if ((args->flags & MSM_SUBMIT_FENCE_SN_IN) &&
892− idr_find(&queue->fence_idr, args->fence)) {
904+ (!args->fence || idr_find(&queue->fence_idr, args->fence))) {
893905 spin_unlock(&queue->idr_lock);
894906 idr_preload_end();
895907 ret = -EINVAL;
drivers/gpu/drm/msm/msm_mdss.c+17−2
@@ -189,6 +189,7 @@ static int _msm_mdss_irq_domain_add(struct msm_mdss *msm_mdss) · 188 unmodified lines
189189 #define UBWC_2_0 0x20000000
190190 #define UBWC_3_0 0x30000000
191191 #define UBWC_4_0 0x40000000
192+#define UBWC_4_3 0x40030000
192193
193194 static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss)
194195 {
@@ -227,7 +228,10 @@ static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) · 32 unmodified lines
227228 writel_relaxed(1, msm_mdss->mmio + UBWC_CTRL_2);
228229 writel_relaxed(0, msm_mdss->mmio + UBWC_PREDICTION_MODE);
229230 } else {
230− writel_relaxed(2, msm_mdss->mmio + UBWC_CTRL_2);
231+ if (data->ubwc_dec_version == UBWC_4_3)
232+ writel_relaxed(3, msm_mdss->mmio + UBWC_CTRL_2);
233+ else
234+ writel_relaxed(2, msm_mdss->mmio + UBWC_CTRL_2);
231235 writel_relaxed(1, msm_mdss->mmio + UBWC_PREDICTION_MODE);
232236 }
233237 }
@@ -271,6 +275,7 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss) · 37 unmodified lines
271275 msm_mdss_setup_ubwc_dec_30(msm_mdss);
272276 break;
273277 case UBWC_4_0:
278+ case UBWC_4_3:
274279 msm_mdss_setup_ubwc_dec_40(msm_mdss);
275280 break;
276281 default:
@@ -569,6 +574,16 @@ static const struct msm_mdss_data sm8250_data = { · 292 unmodified lines
569574 .macrotile_mode = 1,
570575 };
571576
577+static const struct msm_mdss_data sm8550_data = {
578+ .ubwc_version = UBWC_4_0,
579+ .ubwc_dec_version = UBWC_4_3,
580+ .ubwc_swizzle = 6,
581+ .ubwc_static = 1,
582+ /* TODO: highest_bank_bit = 2 for LP_DDR4 */
583+ .highest_bank_bit = 3,
584+ .macrotile_mode = 1,
585+};
586+
572587 static const struct of_device_id mdss_dt_match[] = {
573588 { .compatible = "qcom,mdss" },
574589 { .compatible = "qcom,msm8998-mdss" },
@@ -585,7 +600,7 @@ static const struct of_device_id mdss_dt_match[] = { · 10 unmodified lines
585600 { .compatible = "qcom,sm8250-mdss", .data = &sm8250_data },
586601 { .compatible = "qcom,sm8350-mdss", .data = &sm8250_data },
587602 { .compatible = "qcom,sm8450-mdss", .data = &sm8250_data },
588− { .compatible = "qcom,sm8550-mdss", .data = &sm8250_data },
603+ { .compatible = "qcom,sm8550-mdss", .data = &sm8550_data },
589604 {}
590605 };
591606 MODULE_DEVICE_TABLE(of, mdss_dt_match);
drivers/gpu/drm/nouveau/nouveau_connector.c+1−1
@@ -967,7 +967,7 @@ nouveau_connector_get_modes(struct drm_connector *connector) · 966 unmodified lines
967967 /* Determine display colour depth for everything except LVDS now,
968968 * DP requires this before mode_valid() is called.
969969 */
970− if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode)
970+ if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS)
971971 nouveau_connector_detect_depth(connector);
972972
973973 /* Find the native mode if this is a digital panel, if we didn't
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c+47−1
@@ -26,6 +26,8 @@ · 25 unmodified lines
2626 #include "head.h"
2727 #include "ior.h"
2828
29+#include <drm/display/drm_dp.h>
30+
2931 #include <subdev/bios.h>
3032 #include <subdev/bios/init.h>
3133 #include <subdev/gpio.h>
@@ -634,6 +636,50 @@ nvkm_dp_enable_supported_link_rates(struct nvkm_outp *outp) · 602 unmodified lines
634636 return outp->dp.rates != 0;
635637 }
636638
639+/* XXX: This is a big fat hack, and this is just drm_dp_read_dpcd_caps()
640+ * converted to work inside nvkm. This is a temporary holdover until we start
641+ * passing the drm_dp_aux device through NVKM
642+ */
643+static int
644+nvkm_dp_read_dpcd_caps(struct nvkm_outp *outp)
645+{
646+ struct nvkm_i2c_aux *aux = outp->dp.aux;
647+ u8 dpcd_ext[DP_RECEIVER_CAP_SIZE];
648+ int ret;
649+
650+ ret = nvkm_rdaux(aux, DPCD_RC00_DPCD_REV, outp->dp.dpcd, DP_RECEIVER_CAP_SIZE);
651+ if (ret < 0)
652+ return ret;
653+
654+ /*
655+ * Prior to DP1.3 the bit represented by
656+ * DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT was reserved.
657+ * If it is set DP_DPCD_REV at 0000h could be at a value less than
658+ * the true capability of the panel. The only way to check is to
659+ * then compare 0000h and 2200h.
660+ */
661+ if (!(outp->dp.dpcd[DP_TRAINING_AUX_RD_INTERVAL] &
662+ DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT))
663+ return 0;
664+
665+ ret = nvkm_rdaux(aux, DP_DP13_DPCD_REV, dpcd_ext, sizeof(dpcd_ext));
666+ if (ret < 0)
667+ return ret;
668+
669+ if (outp->dp.dpcd[DP_DPCD_REV] > dpcd_ext[DP_DPCD_REV]) {
670+ OUTP_DBG(outp, "Extended DPCD rev less than base DPCD rev (%d > %d)\n",
671+ outp->dp.dpcd[DP_DPCD_REV], dpcd_ext[DP_DPCD_REV]);
672+ return 0;
673+ }
674+
675+ if (!memcmp(outp->dp.dpcd, dpcd_ext, sizeof(dpcd_ext)))
676+ return 0;
677+
678+ memcpy(outp->dp.dpcd, dpcd_ext, sizeof(dpcd_ext));
679+
680+ return 0;
681+}
682+
637683 void
638684 nvkm_dp_enable(struct nvkm_outp *outp, bool auxpwr)
639685 {
@@ -689,7 +735,7 @@ nvkm_dp_enable(struct nvkm_outp *outp, bool auxpwr) · 49 unmodified lines
689735 memset(outp->dp.lttpr, 0x00, sizeof(outp->dp.lttpr));
690736 }
691737
692− if (!nvkm_rdaux(aux, DPCD_RC00_DPCD_REV, outp->dp.dpcd, sizeof(outp->dp.dpcd))) {
738+ if (!nvkm_dp_read_dpcd_caps(outp)) {
693739 const u8 rates[] = { 0x1e, 0x14, 0x0a, 0x06, 0 };
694740 const u8 *rate;
695741 int rate_max;
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h+1−0
@@ -117,6 +117,7 @@ void gk104_grctx_generate_r418800(struct gf100_gr *); · 116 unmodified lines
117117
118118 extern const struct gf100_grctx_func gk110_grctx;
119119 void gk110_grctx_generate_r419eb0(struct gf100_gr *);
120+void gk110_grctx_generate_r419f78(struct gf100_gr *);
120121
121122 extern const struct gf100_grctx_func gk110b_grctx;
122123 extern const struct gf100_grctx_func gk208_grctx;
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c+3−1
@@ -906,7 +906,9 @@ static void · 905 unmodified lines
906906 gk104_grctx_generate_r419f78(struct gf100_gr *gr)
907907 {
908908 struct nvkm_device *device = gr->base.engine.subdev.device;
909− nvkm_mask(device, 0x419f78, 0x00000001, 0x00000000);
909+
910+ /* bit 3 set disables loads in fp helper invocations, we need it enabled */
911+ nvkm_mask(device, 0x419f78, 0x00000009, 0x00000000);
910912 }
911913
912914 void
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110.c+10−0
@@ -820,6 +820,15 @@ gk110_grctx_generate_r419eb0(struct gf100_gr *gr) · 819 unmodified lines
820820 nvkm_mask(device, 0x419eb0, 0x00001000, 0x00001000);
821821 }
822822
823+void
824+gk110_grctx_generate_r419f78(struct gf100_gr *gr)
825+{
826+ struct nvkm_device *device = gr->base.engine.subdev.device;
827+
828+ /* bit 3 set disables loads in fp helper invocations, we need it enabled */
829+ nvkm_mask(device, 0x419f78, 0x00000008, 0x00000000);
830+}
831+
823832 const struct gf100_grctx_func
824833 gk110_grctx = {
825834 .main = gf100_grctx_generate_main,
@@ -854,4 +863,5 @@ gk110_grctx = { · 28 unmodified lines
854863 .gpc_tpc_nr = gk104_grctx_generate_gpc_tpc_nr,
855864 .r418800 = gk104_grctx_generate_r418800,
856865 .r419eb0 = gk110_grctx_generate_r419eb0,
866+ .r419f78 = gk110_grctx_generate_r419f78,
857867 };
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c+1−0
@@ -103,4 +103,5 @@ gk110b_grctx = { · 102 unmodified lines
103103 .gpc_tpc_nr = gk104_grctx_generate_gpc_tpc_nr,
104104 .r418800 = gk104_grctx_generate_r418800,
105105 .r419eb0 = gk110_grctx_generate_r419eb0,
106+ .r419f78 = gk110_grctx_generate_r419f78,
106107 };
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk208.c+1−0
@@ -568,4 +568,5 @@ gk208_grctx = { · 567 unmodified lines
568568 .dist_skip_table = gf117_grctx_generate_dist_skip_table,
569569 .gpc_tpc_nr = gk104_grctx_generate_gpc_tpc_nr,
570570 .r418800 = gk104_grctx_generate_r418800,
571+ .r419f78 = gk110_grctx_generate_r419f78,
571572 };
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c+1−0
@@ -988,4 +988,5 @@ gm107_grctx = { · 987 unmodified lines
988988 .r406500 = gm107_grctx_generate_r406500,
989989 .gpc_tpc_nr = gk104_grctx_generate_gpc_tpc_nr,
990990 .r419e00 = gm107_grctx_generate_r419e00,
991+ .r419f78 = gk110_grctx_generate_r419f78,
991992 };
drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c+0−13
@@ -206,19 +206,6 @@ tu102_gr_av_to_init_veid(struct nvkm_blob *blob, struct gf100_gr_pack **ppack) · 205 unmodified lines
206206 return gk20a_gr_av_to_init_(blob, 64, 0x00100000, ppack);
207207 }
208208
209−int
210−tu102_gr_load(struct gf100_gr *gr, int ver, const struct gf100_gr_fwif *fwif)
211−{
212− int ret;
213−
214− ret = gm200_gr_load(gr, ver, fwif);
215− if (ret)
216− return ret;
217−
218− return gk20a_gr_load_net(gr, "gr/", "sw_veid_bundle_init", ver, tu102_gr_av_to_init_veid,
219− &gr->bundle_veid);
220−}
221−
222209 static const struct gf100_gr_fwif
223210 tu102_gr_fwif[] = {
224211 { 0, gm200_gr_load, &tu102_gr, &gp108_gr_fecs_acr, &gp108_gr_gpccs_acr },
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c+1−0
@@ -569,6 +569,7 @@ static const struct of_device_id s6d7aa0_of_match[] = { · 568 unmodified lines
569569 },
570570 { /* sentinel */ }
571571 };
572+MODULE_DEVICE_TABLE(of, s6d7aa0_of_match);
572573
573574 static struct mipi_dsi_driver s6d7aa0_driver = {
574575 .probe = s6d7aa0_probe,
drivers/gpu/drm/rockchip/rockchip_drm_vop.c+9−8
@@ -833,12 +833,12 @@ static int vop_plane_atomic_check(struct drm_plane *plane, · 832 unmodified lines
833833 * need align with 2 pixel.
834834 */
835835 if (fb->format->is_yuv && ((new_plane_state->src.x1 >> 16) % 2)) {
836− DRM_ERROR("Invalid Source: Yuv format not support odd xpos\n");
836+ DRM_DEBUG_KMS("Invalid Source: Yuv format not support odd xpos\n");
837837 return -EINVAL;
838838 }
839839
840840 if (fb->format->is_yuv && new_plane_state->rotation & DRM_MODE_REFLECT_Y) {
841− DRM_ERROR("Invalid Source: Yuv format does not support this rotation\n");
841+ DRM_DEBUG_KMS("Invalid Source: Yuv format does not support this rotation\n");
842842 return -EINVAL;
843843 }
844844
@@ -846,7 +846,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane, · 1 unmodified line
846846 struct vop *vop = to_vop(crtc);
847847
848848 if (!vop->data->afbc) {
849− DRM_ERROR("vop does not support AFBC\n");
849+ DRM_DEBUG_KMS("vop does not support AFBC\n");
850850 return -EINVAL;
851851 }
852852
@@ -855,15 +855,16 @@ static int vop_plane_atomic_check(struct drm_plane *plane, · 2 unmodified lines
855855 return ret;
856856
857857 if (new_plane_state->src.x1 || new_plane_state->src.y1) {
858− DRM_ERROR("AFBC does not support offset display, xpos=%d, ypos=%d, offset=%d\n",
859− new_plane_state->src.x1,
860− new_plane_state->src.y1, fb->offsets[0]);
858+ DRM_DEBUG_KMS("AFBC does not support offset display, " \
859+ "xpos=%d, ypos=%d, offset=%d\n",
860+ new_plane_state->src.x1, new_plane_state->src.y1,
861+ fb->offsets[0]);
861862 return -EINVAL;
862863 }
863864
864865 if (new_plane_state->rotation && new_plane_state->rotation != DRM_MODE_ROTATE_0) {
865− DRM_ERROR("No rotation support in AFBC, rotation=%d\n",
866− new_plane_state->rotation);
866+ DRM_DEBUG_KMS("No rotation support in AFBC, rotation=%d\n",
867+ new_plane_state->rotation);
867868 return -EINVAL;
868869 }
869870 }
drivers/gpu/drm/ttm/ttm_bo.c+2−1
@@ -519,7 +519,8 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo, · 518 unmodified lines
519519
520520 if (bo->pin_count) {
521521 *locked = false;
522− *busy = false;
522+ if (busy)
523+ *busy = false;
523524 return false;
524525 }
525526
drivers/hv/connection.c+6−7
@@ -209,8 +209,7 @@ int vmbus_connect(void) · 208 unmodified lines
209209 * Setup the vmbus event connection for channel interrupt
210210 * abstraction stuff
211211 */
212− vmbus_connection.int_page =
213− (void *)hv_alloc_hyperv_zeroed_page();
212+ vmbus_connection.int_page = hv_alloc_hyperv_zeroed_page();
214213 if (vmbus_connection.int_page == NULL) {
215214 ret = -ENOMEM;
216215 goto cleanup;
@@ -225,8 +224,8 @@ int vmbus_connect(void) · 8 unmodified lines
225224 * Setup the monitor notification facility. The 1st page for
226225 * parent->child and the 2nd page for child->parent
227226 */
228− vmbus_connection.monitor_pages[0] = (void *)hv_alloc_hyperv_page();
229− vmbus_connection.monitor_pages[1] = (void *)hv_alloc_hyperv_page();
227+ vmbus_connection.monitor_pages[0] = hv_alloc_hyperv_page();
228+ vmbus_connection.monitor_pages[1] = hv_alloc_hyperv_page();
230229 if ((vmbus_connection.monitor_pages[0] == NULL) ||
231230 (vmbus_connection.monitor_pages[1] == NULL)) {
232231 ret = -ENOMEM;
@@ -333,15 +332,15 @@ void vmbus_disconnect(void) · 100 unmodified lines
333332 destroy_workqueue(vmbus_connection.work_queue);
334333
335334 if (vmbus_connection.int_page) {
336− hv_free_hyperv_page((unsigned long)vmbus_connection.int_page);
335+ hv_free_hyperv_page(vmbus_connection.int_page);
337336 vmbus_connection.int_page = NULL;
338337 }
339338
340339 set_memory_encrypted((unsigned long)vmbus_connection.monitor_pages[0], 1);
341340 set_memory_encrypted((unsigned long)vmbus_connection.monitor_pages[1], 1);
342341
343− hv_free_hyperv_page((unsigned long)vmbus_connection.monitor_pages[0]);
344− hv_free_hyperv_page((unsigned long)vmbus_connection.monitor_pages[1]);
342+ hv_free_hyperv_page(vmbus_connection.monitor_pages[0]);
343+ hv_free_hyperv_page(vmbus_connection.monitor_pages[1]);
345344 vmbus_connection.monitor_pages[0] = NULL;
346345 vmbus_connection.monitor_pages[1] = NULL;
347346 }
drivers/hv/hv_balloon.c+1−1
@@ -1628,7 +1628,7 @@ static int hv_free_page_report(struct page_reporting_dev_info *pr_dev_info, · 1627 unmodified lines
16281628 WARN_ON_ONCE(nents > HV_MEMORY_HINT_MAX_GPA_PAGE_RANGES);
16291629 WARN_ON_ONCE(sgl->length < (HV_HYP_PAGE_SIZE << page_reporting_order));
16301630 local_irq_save(flags);
1631− hint = *(struct hv_memory_hint **)this_cpu_ptr(hyperv_pcpu_input_arg);
1631+ hint = *this_cpu_ptr(hyperv_pcpu_input_arg);
16321632 if (!hint) {
16331633 local_irq_restore(flags);
16341634 return -ENOSPC;
drivers/hv/hv_common.c+5−5
@@ -115,12 +115,12 @@ void *hv_alloc_hyperv_zeroed_page(void) · 114 unmodified lines
115115 }
116116 EXPORT_SYMBOL_GPL(hv_alloc_hyperv_zeroed_page);
117117
118−void hv_free_hyperv_page(unsigned long addr)
118+void hv_free_hyperv_page(void *addr)
119119 {
120120 if (PAGE_SIZE == HV_HYP_PAGE_SIZE)
121− free_page(addr);
121+ free_page((unsigned long)addr);
122122 else
123− kfree((void *)addr);
123+ kfree(addr);
124124 }
125125 EXPORT_SYMBOL_GPL(hv_free_hyperv_page);
126126
@@ -253,7 +253,7 @@ static void hv_kmsg_dump_unregister(void) · 126 unmodified lines
253253 atomic_notifier_chain_unregister(&panic_notifier_list,
254254 &hyperv_panic_report_block);
255255
256− hv_free_hyperv_page((unsigned long)hv_panic_page);
256+ hv_free_hyperv_page(hv_panic_page);
257257 hv_panic_page = NULL;
258258 }
259259
@@ -270,7 +270,7 @@ static void hv_kmsg_dump_register(void) · 10 unmodified lines
270270 ret = kmsg_dump_register(&hv_kmsg_dumper);
271271 if (ret) {
272272 pr_err("Hyper-V: kmsg dump register error 0x%x\n", ret);
273− hv_free_hyperv_page((unsigned long)hv_panic_page);
273+ hv_free_hyperv_page(hv_panic_page);
274274 hv_panic_page = NULL;
275275 }
276276 }
drivers/hwmon/aquacomputer_d5next.c+37−2
@@ -13,9 +13,11 @@ · 12 unmodified lines
1313
1414 #include <linux/crc16.h>
1515 #include <linux/debugfs.h>
16+#include <linux/delay.h>
1617 #include <linux/hid.h>
1718 #include <linux/hwmon.h>
1819 #include <linux/jiffies.h>
20+#include <linux/ktime.h>
1921 #include <linux/module.h>
2022 #include <linux/mutex.h>
2123 #include <linux/seq_file.h>
@@ -63,6 +65,8 @@ static const char *const aqc_device_names[] = { · 41 unmodified lines
6365 #define CTRL_REPORT_ID 0x03
6466 #define AQUAERO_CTRL_REPORT_ID 0x0b
6567
68+#define CTRL_REPORT_DELAY 200 /* ms */
69+
6670 /* The HID report that the official software always sends
6771 * after writing values, currently same for all devices
6872 */
@@ -527,6 +531,9 @@ struct aqc_data { · 458 unmodified lines
527531 int secondary_ctrl_report_size;
528532 u8 *secondary_ctrl_report;
529533
534+ ktime_t last_ctrl_report_op;
535+ int ctrl_report_delay; /* Delay between two ctrl report operations, in ms */
536+
530537 int buffer_size;
531538 u8 *buffer;
532539 int checksum_start;
@@ -611,17 +618,35 @@ static int aqc_aquastreamxt_convert_fan_rpm(u16 val) · 78 unmodified lines
611618 return 0;
612619 }
613620
621+static void aqc_delay_ctrl_report(struct aqc_data *priv)
622+{
623+ /*
624+ * If previous read or write is too close to this one, delay the current operation
625+ * to give the device enough time to process the previous one.
626+ */
627+ if (priv->ctrl_report_delay) {
628+ s64 delta = ktime_ms_delta(ktime_get(), priv->last_ctrl_report_op);
629+
630+ if (delta < priv->ctrl_report_delay)
631+ msleep(priv->ctrl_report_delay - delta);
632+ }
633+}
634+
614635 /* Expects the mutex to be locked */
615636 static int aqc_get_ctrl_data(struct aqc_data *priv)
616637 {
617638 int ret;
618639
640+ aqc_delay_ctrl_report(priv);
641+
619642 memset(priv->buffer, 0x00, priv->buffer_size);
620643 ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size,
621644 HID_FEATURE_REPORT, HID_REQ_GET_REPORT);
622645 if (ret < 0)
623646 ret = -ENODATA;
624647
648+ priv->last_ctrl_report_op = ktime_get();
649+
625650 return ret;
626651 }
627652
@@ -631,6 +656,8 @@ static int aqc_send_ctrl_data(struct aqc_data *priv) · 3 unmodified lines
631656 int ret;
632657 u16 checksum;
633658
659+ aqc_delay_ctrl_report(priv);
660+
634661 /* Checksum is not needed for Aquaero */
635662 if (priv->kind != aquaero) {
636663 /* Init and xorout value for CRC-16/USB is 0xffff */
@@ -646,12 +673,16 @@ static int aqc_send_ctrl_data(struct aqc_data *priv) · 9 unmodified lines
646673 ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size,
647674 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
648675 if (ret < 0)
649− return ret;
676+ goto record_access_and_ret;
650677
651678 /* The official software sends this report after every change, so do it here as well */
652679 ret = hid_hw_raw_request(priv->hdev, priv->secondary_ctrl_report_id,
653680 priv->secondary_ctrl_report, priv->secondary_ctrl_report_size,
654681 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
682+
683+record_access_and_ret:
684+ priv->last_ctrl_report_op = ktime_get();
685+
655686 return ret;
656687 }
657688
@@ -1027,7 +1058,7 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, · 369 unmodified lines
10271058 if (ret < 0)
10281059 return ret;
10291060
1030− *val = aqc_percent_to_pwm(ret);
1061+ *val = aqc_percent_to_pwm(*val);
10311062 break;
10321063 }
10331064 break;
@@ -1524,6 +1555,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) · 490 unmodified lines
15241555
15251556 priv->buffer_size = AQUAERO_CTRL_REPORT_SIZE;
15261557 priv->temp_ctrl_offset = AQUAERO_TEMP_CTRL_OFFSET;
1558+ priv->ctrl_report_delay = CTRL_REPORT_DELAY;
15271559
15281560 priv->temp_label = label_temp_sensors;
15291561 priv->virtual_temp_label = label_virtual_temp_sensors;
@@ -1547,6 +1579,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) · 17 unmodified lines
15471579 priv->temp_ctrl_offset = D5NEXT_TEMP_CTRL_OFFSET;
15481580
15491581 priv->buffer_size = D5NEXT_CTRL_REPORT_SIZE;
1582+ priv->ctrl_report_delay = CTRL_REPORT_DELAY;
15501583
15511584 priv->power_cycle_count_offset = D5NEXT_POWER_CYCLES;
15521585
@@ -1597,6 +1630,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) · 44 unmodified lines
15971630 priv->temp_ctrl_offset = OCTO_TEMP_CTRL_OFFSET;
15981631
15991632 priv->buffer_size = OCTO_CTRL_REPORT_SIZE;
1633+ priv->ctrl_report_delay = CTRL_REPORT_DELAY;
16001634
16011635 priv->power_cycle_count_offset = OCTO_POWER_CYCLES;
16021636
@@ -1624,6 +1658,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) · 21 unmodified lines
16241658 priv->temp_ctrl_offset = QUADRO_TEMP_CTRL_OFFSET;
16251659
16261660 priv->buffer_size = QUADRO_CTRL_REPORT_SIZE;
1661+ priv->ctrl_report_delay = CTRL_REPORT_DELAY;
16271662
16281663 priv->flow_pulses_ctrl_offset = QUADRO_FLOW_PULSES_CTRL_OFFSET;
16291664 priv->power_cycle_count_offset = QUADRO_POWER_CYCLES;
drivers/hwmon/k10temp.c+15−2
@@ -77,6 +77,13 @@ static DEFINE_MUTEX(nb_smu_ind_mutex); · 76 unmodified lines
7777 #define ZEN_CUR_TEMP_RANGE_SEL_MASK BIT(19)
7878 #define ZEN_CUR_TEMP_TJ_SEL_MASK GENMASK(17, 16)
7979
80+/*
81+ * AMD's Industrial processor 3255 supports temperature from -40 deg to 105 deg Celsius.
82+ * Use the model name to identify 3255 CPUs and set a flag to display negative temperature.
83+ * Do not round off to zero for negative Tctl or Tdie values if the flag is set
84+ */
85+#define AMD_I3255_STR "3255"
86+
8087 struct k10temp_data {
8188 struct pci_dev *pdev;
8289 void (*read_htcreg)(struct pci_dev *pdev, u32 *regval);
@@ -86,6 +93,7 @@ struct k10temp_data { · 3 unmodified lines
8693 u32 show_temp;
8794 bool is_zen;
8895 u32 ccd_offset;
96+ bool disp_negative;
8997 };
9098
9199 #define TCTL_BIT 0
@@ -204,12 +212,12 @@ static int k10temp_read_temp(struct device *dev, u32 attr, int channel, · 112 unmodified lines
204212 switch (channel) {
205213 case 0: /* Tctl */
206214 *val = get_raw_temp(data);
207− if (*val < 0)
215+ if (*val < 0 && !data->disp_negative)
208216 *val = 0;
209217 break;
210218 case 1: /* Tdie */
211219 *val = get_raw_temp(data) - data->temp_offset;
212− if (*val < 0)
220+ if (*val < 0 && !data->disp_negative)
213221 *val = 0;
214222 break;
215223 case 2 ... 13: /* Tccd{1-12} */
@@ -405,6 +413,11 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 189 unmodified lines
405413 data->pdev = pdev;
406414 data->show_temp |= BIT(TCTL_BIT); /* Always show Tctl */
407415
416+ if (boot_cpu_data.x86 == 0x17 &&
417+ strstr(boot_cpu_data.x86_model_id, AMD_I3255_STR)) {
418+ data->disp_negative = true;
419+ }
420+
408421 if (boot_cpu_data.x86 == 0x15 &&
409422 ((boot_cpu_data.x86_model & 0xf0) == 0x60 ||
410423 (boot_cpu_data.x86_model & 0xf0) == 0x70)) {
drivers/hwmon/nct6775-core.c+22−6
@@ -955,14 +955,25 @@ static const u16 scale_in[15] = { · 954 unmodified lines
955955 800, 800
956956 };
957957
958−static inline long in_from_reg(u8 reg, u8 nr)
958+/*
959+ * NCT6798 scaling:
960+ * CPUVC, IN1, AVSB, 3VCC, IN0, IN8, IN4, 3VSB, VBAT, VTT, IN5, IN6, IN2,
961+ * IN3, IN7
962+ * Additional scales to be added later: IN9 (800), VHIF (1600)
963+ */
964+static const u16 scale_in_6798[15] = {
965+ 800, 800, 1600, 1600, 800, 800, 800, 1600, 1600, 1600, 1600, 1600, 800,
966+ 800, 800
967+};
968+
969+static inline long in_from_reg(u8 reg, u8 nr, const u16 *scales)
959970 {
960− return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100);
971+ return DIV_ROUND_CLOSEST(reg * scales[nr], 100);
961972 }
962973
963−static inline u8 in_to_reg(u32 val, u8 nr)
974+static inline u8 in_to_reg(u32 val, u8 nr, const u16 *scales)
964975 {
965− return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255);
976+ return clamp_val(DIV_ROUND_CLOSEST(val * 100, scales[nr]), 0, 255);
966977 }
967978
968979 /* TSI temperatures are in 8.3 format */
@@ -1673,7 +1684,8 @@ show_in_reg(struct device *dev, struct device_attribute *attr, char *buf) · 704 unmodified lines
16731684 if (IS_ERR(data))
16741685 return PTR_ERR(data);
16751686
1676− return sprintf(buf, "%ld\n", in_from_reg(data->in[nr][index], nr));
1687+ return sprintf(buf, "%ld\n",
1688+ in_from_reg(data->in[nr][index], nr, data->scale_in));
16771689 }
16781690
16791691 static ssize_t
@@ -1691,7 +1703,7 @@ store_in_reg(struct device *dev, struct device_attribute *attr, const char *buf, · 11 unmodified lines
16911703 if (err < 0)
16921704 return err;
16931705 mutex_lock(&data->update_lock);
1694− data->in[nr][index] = in_to_reg(val, nr);
1706+ data->in[nr][index] = in_to_reg(val, nr, data->scale_in);
16951707 err = nct6775_write_value(data, data->REG_IN_MINMAX[index - 1][nr], data->in[nr][index]);
16961708 mutex_unlock(&data->update_lock);
16971709 return err ? : count;
@@ -3462,6 +3474,7 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data, · 1764 unmodified lines
34623474 mutex_init(&data->update_lock);
34633475 data->name = nct6775_device_names[data->kind];
34643476 data->bank = 0xff; /* Force initial bank selection */
3477+ data->scale_in = scale_in;
34653478
34663479 switch (data->kind) {
34673480 case nct6106:
@@ -3977,6 +3990,9 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data, · 509 unmodified lines
39773990 break;
39783991 }
39793992
3993+ if (data->kind == nct6798 || data->kind == nct6799)
3994+ data->scale_in = scale_in_6798;
3995+
39803996 reg_temp = NCT6779_REG_TEMP;
39813997 num_reg_temp = ARRAY_SIZE(NCT6779_REG_TEMP);
39823998 if (data->kind == nct6791) {
drivers/hwmon/nct6775-platform.c+1−1
@@ -586,7 +586,7 @@ nct6775_check_fan_inputs(struct nct6775_data *data, struct nct6775_sio_data *sio · 585 unmodified lines
586586 int creb;
587587 int cred;
588588
589− cre6 = sio_data->sio_inb(sio_data, 0xe0);
589+ cre6 = sio_data->sio_inb(sio_data, 0xe6);
590590
591591 sio_data->sio_select(sio_data, NCT6775_LD_12);
592592 cre0 = sio_data->sio_inb(sio_data, 0xe0);
drivers/hwmon/nct6775.h+1−0
@@ -98,6 +98,7 @@ struct nct6775_data { · 97 unmodified lines
9898 u8 bank; /* current register bank */
9999 u8 in_num; /* number of in inputs we have */
100100 u8 in[15][3]; /* [0]=in, [1]=in_max, [2]=in_min */
101+ const u16 *scale_in; /* internal scaling factors */
101102 unsigned int rpm[NUM_FAN];
102103 u16 fan_min[NUM_FAN];
103104 u8 fan_pulses[NUM_FAN];
drivers/hwmon/nct7802.c+1−1
@@ -725,7 +725,7 @@ static umode_t nct7802_temp_is_visible(struct kobject *kobj, · 724 unmodified lines
725725 if (index >= 38 && index < 46 && !(reg & 0x01)) /* PECI 0 */
726726 return 0;
727727
728− if (index >= 0x46 && (!(reg & 0x02))) /* PECI 1 */
728+ if (index >= 46 && !(reg & 0x02)) /* PECI 1 */
729729 return 0;
730730
731731 return attr->mode;
drivers/hwmon/oxp-sensors.c+24−14
@@ -220,6 +220,20 @@ static int tt_toggle_disable(void) · 219 unmodified lines
220220 }
221221
222222 /* Callbacks for turbo toggle attribute */
223+static umode_t tt_toggle_is_visible(struct kobject *kobj,
224+ struct attribute *attr, int n)
225+{
226+ switch (board) {
227+ case aok_zoe_a1:
228+ case oxp_mini_amd_a07:
229+ case oxp_mini_amd_pro:
230+ return attr->mode;
231+ default:
232+ break;
233+ }
234+ return 0;
235+}
236+
223237 static ssize_t tt_toggle_store(struct device *dev,
224238 struct device_attribute *attr, const char *buf,
225239 size_t count)
@@ -396,7 +410,15 @@ static struct attribute *oxp_ec_attrs[] = { · 170 unmodified lines
396410 NULL
397411 };
398412
399−ATTRIBUTE_GROUPS(oxp_ec);
413+static struct attribute_group oxp_ec_attribute_group = {
414+ .is_visible = tt_toggle_is_visible,
415+ .attrs = oxp_ec_attrs,
416+};
417+
418+static const struct attribute_group *oxp_ec_groups[] = {
419+ &oxp_ec_attribute_group,
420+ NULL
421+};
400422
401423 static const struct hwmon_ops oxp_ec_hwmon_ops = {
402424 .is_visible = oxp_ec_hwmon_is_visible,
@@ -415,7 +437,6 @@ static int oxp_platform_probe(struct platform_device *pdev) · 12 unmodified lines
415437 const struct dmi_system_id *dmi_entry;
416438 struct device *dev = &pdev->dev;
417439 struct device *hwdev;
418− int ret;
419440
420441 /*
421442 * Have to check for AMD processor here because DMI strings are the
@@ -430,18 +451,6 @@ static int oxp_platform_probe(struct platform_device *pdev) · 8 unmodified lines
430451
431452 board = (enum oxp_board)(unsigned long)dmi_entry->driver_data;
432453
433− switch (board) {
434− case aok_zoe_a1:
435− case oxp_mini_amd_a07:
436− case oxp_mini_amd_pro:
437− ret = devm_device_add_groups(dev, oxp_ec_groups);
438− if (ret)
439− return ret;
440− break;
441− default:
442− break;
443− }
444−
445454 hwdev = devm_hwmon_device_register_with_info(dev, "oxpec", NULL,
446455 &oxp_ec_chip_info, NULL);
447456
@@ -451,6 +460,7 @@ static int oxp_platform_probe(struct platform_device *pdev) · 3 unmodified lines
451460 static struct platform_driver oxp_platform_driver = {
452461 .driver = {
453462 .name = "oxp-platform",
463+ .dev_groups = oxp_ec_groups,
454464 },
455465 .probe = oxp_platform_probe,
456466 };
drivers/hwmon/pmbus/bel-pfe.c+8−8
@@ -17,12 +17,13 @@ · 16 unmodified lines
1717 enum chips {pfe1100, pfe3000};
1818
1919 /*
20− * Disable status check for pfe3000 devices, because some devices report
21− * communication error (invalid command) for VOUT_MODE command (0x20)
22− * although correct VOUT_MODE (0x16) is returned: it leads to incorrect
23− * exponent in linear mode.
20+ * Disable status check because some devices report communication error
21+ * (invalid command) for VOUT_MODE command (0x20) although the correct
22+ * VOUT_MODE (0x16) is returned: it leads to incorrect exponent in linear
23+ * mode.
24+ * This affects both pfe3000 and pfe1100.
2425 */
25−static struct pmbus_platform_data pfe3000_plat_data = {
26+static struct pmbus_platform_data pfe_plat_data = {
2627 .flags = PMBUS_SKIP_STATUS_CHECK,
2728 };
2829
@@ -94,16 +95,15 @@ static int pfe_pmbus_probe(struct i2c_client *client) · 65 unmodified lines
9495 int model;
9596
9697 model = (int)i2c_match_id(pfe_device_id, client)->driver_data;
98+ client->dev.platform_data = &pfe_plat_data;
9799
98100 /*
99101 * PFE3000-12-069RA devices may not stay in page 0 during device
100102 * probe which leads to probe failure (read status word failed).
101103 * So let's set the device to page 0 at the beginning.
102104 */
103− if (model == pfe3000) {
104− client->dev.platform_data = &pfe3000_plat_data;
105+ if (model == pfe3000)
105106 i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
106− }
107107
108108 return pmbus_do_probe(client, &pfe_driver_info[model]);
109109 }
drivers/hwmon/pmbus/pmbus_core.c+11−9
@@ -2745,9 +2745,8 @@ static const struct pmbus_status_category __maybe_unused pmbus_status_flag_map[] · 2744 unmodified lines
27452745 },
27462746 };
27472747
2748−static int _pmbus_is_enabled(struct device *dev, u8 page)
2748+static int _pmbus_is_enabled(struct i2c_client *client, u8 page)
27492749 {
2750− struct i2c_client *client = to_i2c_client(dev->parent);
27512750 int ret;
27522751
27532752 ret = _pmbus_read_byte_data(client, page, PMBUS_OPERATION);
@@ -2758,17 +2757,16 @@ static int _pmbus_is_enabled(struct device *dev, u8 page) · 4 unmodified lines
27582757 return !!(ret & PB_OPERATION_CONTROL_ON);
27592758 }
27602759
2761−static int __maybe_unused pmbus_is_enabled(struct device *dev, u8 page)
2760+static int __maybe_unused pmbus_is_enabled(struct i2c_client *client, u8 page)
27622761 {
2763− struct i2c_client *client = to_i2c_client(dev->parent);
27642762 struct pmbus_data *data = i2c_get_clientdata(client);
27652763 int ret;
27662764
27672765 mutex_lock(&data->update_lock);
2768− ret = _pmbus_is_enabled(dev, page);
2766+ ret = _pmbus_is_enabled(client, page);
27692767 mutex_unlock(&data->update_lock);
27702768
2771− return !!(ret & PB_OPERATION_CONTROL_ON);
2769+ return ret;
27722770 }
27732771
27742772 #define to_dev_attr(_dev_attr) \
@@ -2844,7 +2842,7 @@ static int _pmbus_get_flags(struct pmbus_data *data, u8 page, unsigned int *flag · 69 unmodified lines
28442842 if (status < 0)
28452843 return status;
28462844
2847− if (_pmbus_is_enabled(dev, page)) {
2845+ if (_pmbus_is_enabled(client, page)) {
28482846 if (status & PB_STATUS_OFF) {
28492847 *flags |= REGULATOR_ERROR_FAIL;
28502848 *event |= REGULATOR_EVENT_FAIL;
@@ -2898,7 +2896,10 @@ static int __maybe_unused pmbus_get_flags(struct pmbus_data *data, u8 page, unsi · 47 unmodified lines
28982896 #if IS_ENABLED(CONFIG_REGULATOR)
28992897 static int pmbus_regulator_is_enabled(struct regulator_dev *rdev)
29002898 {
2901− return pmbus_is_enabled(rdev_get_dev(rdev), rdev_get_id(rdev));
2899+ struct device *dev = rdev_get_dev(rdev);
2900+ struct i2c_client *client = to_i2c_client(dev->parent);
2901+
2902+ return pmbus_is_enabled(client, rdev_get_id(rdev));
29022903 }
29032904
29042905 static int _pmbus_regulator_on_off(struct regulator_dev *rdev, bool enable)
@@ -2945,6 +2946,7 @@ static int pmbus_regulator_get_status(struct regulator_dev *rdev) · 40 unmodified lines
29452946 struct pmbus_data *data = i2c_get_clientdata(client);
29462947 u8 page = rdev_get_id(rdev);
29472948 int status, ret;
2949+ int event;
29482950
29492951 mutex_lock(&data->update_lock);
29502952 status = pmbus_get_status(client, page, PMBUS_STATUS_WORD);
@@ -2964,7 +2966,7 @@ static int pmbus_regulator_get_status(struct regulator_dev *rdev) · 13 unmodified lines
29642966 goto unlock;
29652967 }
29662968
2967− ret = pmbus_regulator_get_error_flags(rdev, &status);
2969+ ret = _pmbus_get_flags(data, rdev_get_id(rdev), &status, &event, false);
29682970 if (ret)
29692971 goto unlock;
29702972
drivers/iio/adc/ad7192.c+8−8
@@ -62,7 +62,6 @@ · 61 unmodified lines
6262 #define AD7192_MODE_STA_MASK BIT(20) /* Status Register transmission Mask */
6363 #define AD7192_MODE_CLKSRC(x) (((x) & 0x3) << 18) /* Clock Source Select */
6464 #define AD7192_MODE_SINC3 BIT(15) /* SINC3 Filter Select */
65−#define AD7192_MODE_ACX BIT(14) /* AC excitation enable(AD7195 only)*/
6665 #define AD7192_MODE_ENPAR BIT(13) /* Parity Enable */
6766 #define AD7192_MODE_CLKDIV BIT(12) /* Clock divide by 2 (AD7190/2 only)*/
6867 #define AD7192_MODE_SCYCLE BIT(11) /* Single cycle conversion */
@@ -91,6 +90,7 @@ · 22 unmodified lines
9190 /* Configuration Register Bit Designations (AD7192_REG_CONF) */
9291
9392 #define AD7192_CONF_CHOP BIT(23) /* CHOP enable */
93+#define AD7192_CONF_ACX BIT(22) /* AC excitation enable(AD7195 only) */
9494 #define AD7192_CONF_REFSEL BIT(20) /* REFIN1/REFIN2 Reference Select */
9595 #define AD7192_CONF_CHAN(x) ((x) << 8) /* Channel select */
9696 #define AD7192_CONF_CHAN_MASK (0x7FF << 8) /* Channel select mask */
@@ -472,7 +472,7 @@ static ssize_t ad7192_show_ac_excitation(struct device *dev, · 375 unmodified lines
472472 struct iio_dev *indio_dev = dev_to_iio_dev(dev);
473473 struct ad7192_state *st = iio_priv(indio_dev);
474474
475− return sysfs_emit(buf, "%d\n", !!(st->mode & AD7192_MODE_ACX));
475+ return sysfs_emit(buf, "%d\n", !!(st->conf & AD7192_CONF_ACX));
476476 }
477477
478478 static ssize_t ad7192_show_bridge_switch(struct device *dev,
@@ -513,13 +513,13 @@ static ssize_t ad7192_set(struct device *dev, · 34 unmodified lines
513513
514514 ad_sd_write_reg(&st->sd, AD7192_REG_GPOCON, 1, st->gpocon);
515515 break;
516− case AD7192_REG_MODE:
516+ case AD7192_REG_CONF:
517517 if (val)
518− st->mode |= AD7192_MODE_ACX;
518+ st->conf |= AD7192_CONF_ACX;
519519 else
520− st->mode &= ~AD7192_MODE_ACX;
520+ st->conf &= ~AD7192_CONF_ACX;
521521
522− ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
522+ ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
523523 break;
524524 default:
525525 ret = -EINVAL;
@@ -579,12 +579,11 @@ static IIO_DEVICE_ATTR(bridge_switch_en, 0644, · 53 unmodified lines
579579
580580 static IIO_DEVICE_ATTR(ac_excitation_en, 0644,
581581 ad7192_show_ac_excitation, ad7192_set,
582− AD7192_REG_MODE);
582+ AD7192_REG_CONF);
583583
584584 static struct attribute *ad7192_attributes[] = {
585585 &iio_dev_attr_filter_low_pass_3db_frequency_available.dev_attr.attr,
586586 &iio_dev_attr_bridge_switch_en.dev_attr.attr,
587− &iio_dev_attr_ac_excitation_en.dev_attr.attr,
588587 NULL
589588 };
590589
@@ -595,6 +594,7 @@ static const struct attribute_group ad7192_attribute_group = { · 4 unmodified lines
595594 static struct attribute *ad7195_attributes[] = {
596595 &iio_dev_attr_filter_low_pass_3db_frequency_available.dev_attr.attr,
597596 &iio_dev_attr_bridge_switch_en.dev_attr.attr,
597+ &iio_dev_attr_ac_excitation_en.dev_attr.attr,
598598 NULL
599599 };
600600
drivers/iio/adc/ina2xx-adc.c+6−3
@@ -124,6 +124,7 @@ static const struct regmap_config ina2xx_regmap_config = { · 123 unmodified lines
124124 enum ina2xx_ids { ina219, ina226 };
125125
126126 struct ina2xx_config {
127+ const char *name;
127128 u16 config_default;
128129 int calibration_value;
129130 int shunt_voltage_lsb; /* nV */
@@ -155,6 +156,7 @@ struct ina2xx_chip_info { · 25 unmodified lines
155156
156157 static const struct ina2xx_config ina2xx_config[] = {
157158 [ina219] = {
159+ .name = "ina219",
158160 .config_default = INA219_CONFIG_DEFAULT,
159161 .calibration_value = 4096,
160162 .shunt_voltage_lsb = 10000,
@@ -164,6 +166,7 @@ static const struct ina2xx_config ina2xx_config[] = { · 3 unmodified lines
164166 .chip_id = ina219,
165167 },
166168 [ina226] = {
169+ .name = "ina226",
167170 .config_default = INA226_CONFIG_DEFAULT,
168171 .calibration_value = 2048,
169172 .shunt_voltage_lsb = 2500,
@@ -996,7 +999,7 @@ static int ina2xx_probe(struct i2c_client *client) · 826 unmodified lines
996999 /* Patch the current config register with default. */
9971000 val = chip->config->config_default;
9981001
999− if (id->driver_data == ina226) {
1002+ if (type == ina226) {
10001003 ina226_set_average(chip, INA226_DEFAULT_AVG, &val);
10011004 ina226_set_int_time_vbus(chip, INA226_DEFAULT_IT, &val);
10021005 ina226_set_int_time_vshunt(chip, INA226_DEFAULT_IT, &val);
@@ -1015,7 +1018,7 @@ static int ina2xx_probe(struct i2c_client *client) · 12 unmodified lines
10151018 }
10161019
10171020 indio_dev->modes = INDIO_DIRECT_MODE;
1018− if (id->driver_data == ina226) {
1021+ if (type == ina226) {
10191022 indio_dev->channels = ina226_channels;
10201023 indio_dev->num_channels = ARRAY_SIZE(ina226_channels);
10211024 indio_dev->info = &ina226_info;
@@ -1024,7 +1027,7 @@ static int ina2xx_probe(struct i2c_client *client) · 2 unmodified lines
10241027 indio_dev->num_channels = ARRAY_SIZE(ina219_channels);
10251028 indio_dev->info = &ina219_info;
10261029 }
1027− indio_dev->name = id->name;
1030+ indio_dev->name = id ? id->name : chip->config->name;
10281031
10291032 ret = devm_iio_kfifo_buffer_setup(&client->dev, indio_dev,
10301033 &ina2xx_setup_ops);
drivers/iio/adc/meson_saradc.c+12−11
@@ -916,12 +916,6 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev) · 915 unmodified lines
916916 goto err_vref;
917917 }
918918
919− ret = clk_prepare_enable(priv->core_clk);
920− if (ret) {
921− dev_err(dev, "failed to enable core clk\n");
922− goto err_core_clk;
923− }
924−
925919 regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1);
926920 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG0,
927921 MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval);
@@ -948,8 +942,6 @@ err_adc_clk: · 20 unmodified lines
948942 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
949943 MESON_SAR_ADC_REG3_ADC_EN, 0);
950944 meson_sar_adc_set_bandgap(indio_dev, false);
951− clk_disable_unprepare(priv->core_clk);
952−err_core_clk:
953945 regulator_disable(priv->vref);
954946 err_vref:
955947 meson_sar_adc_unlock(indio_dev);
@@ -977,8 +969,6 @@ static void meson_sar_adc_hw_disable(struct iio_dev *indio_dev) · 21 unmodified lines
977969
978970 meson_sar_adc_set_bandgap(indio_dev, false);
979971
980− clk_disable_unprepare(priv->core_clk);
981−
982972 regulator_disable(priv->vref);
983973
984974 if (!ret)
@@ -1211,7 +1201,7 @@ static int meson_sar_adc_probe(struct platform_device *pdev) · 226 unmodified lines
12111201 if (IS_ERR(priv->clkin))
12121202 return dev_err_probe(dev, PTR_ERR(priv->clkin), "failed to get clkin\n");
12131203
1214− priv->core_clk = devm_clk_get(dev, "core");
1204+ priv->core_clk = devm_clk_get_enabled(dev, "core");
12151205 if (IS_ERR(priv->core_clk))
12161206 return dev_err_probe(dev, PTR_ERR(priv->core_clk), "failed to get core clk\n");
12171207
@@ -1294,15 +1284,26 @@ static int meson_sar_adc_remove(struct platform_device *pdev) · 76 unmodified lines
12941284 static int meson_sar_adc_suspend(struct device *dev)
12951285 {
12961286 struct iio_dev *indio_dev = dev_get_drvdata(dev);
1287+ struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
12971288
12981289 meson_sar_adc_hw_disable(indio_dev);
12991290
1291+ clk_disable_unprepare(priv->core_clk);
1292+
13001293 return 0;
13011294 }
13021295
13031296 static int meson_sar_adc_resume(struct device *dev)
13041297 {
13051298 struct iio_dev *indio_dev = dev_get_drvdata(dev);
1299+ struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
1300+ int ret;
1301+
1302+ ret = clk_prepare_enable(priv->core_clk);
1303+ if (ret) {
1304+ dev_err(dev, "failed to enable core clk\n");
1305+ return ret;
1306+ }
13061307
13071308 return meson_sar_adc_hw_enable(indio_dev);
13081309 }
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c+1−1
@@ -253,7 +253,7 @@ int cros_ec_sensors_core_init(struct platform_device *pdev, · 252 unmodified lines
253253 platform_set_drvdata(pdev, indio_dev);
254254
255255 state->ec = ec->ec_dev;
256− state->msg = devm_kzalloc(&pdev->dev,
256+ state->msg = devm_kzalloc(&pdev->dev, sizeof(*state->msg) +
257257 max((u16)sizeof(struct ec_params_motion_sense),
258258 state->ec->max_response), GFP_KERNEL);
259259 if (!state->msg)
drivers/iio/frequency/admv1013.c+4−1
@@ -344,9 +344,12 @@ static int admv1013_update_quad_filters(struct admv1013_state *st) · 343 unmodified lines
344344
345345 static int admv1013_update_mixer_vgate(struct admv1013_state *st)
346346 {
347− unsigned int vcm, mixer_vgate;
347+ unsigned int mixer_vgate;
348+ int vcm;
348349
349350 vcm = regulator_get_voltage(st->reg);
351+ if (vcm < 0)
352+ return vcm;
350353
351354 if (vcm < 1800000)
352355 mixer_vgate = (2389 * vcm / 1000000 + 8100) / 100;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c+1−1
@@ -2687,7 +2687,7 @@ unknown_format: · 2686 unmodified lines
26872687 static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
26882688 struct iio_mount_matrix *orientation)
26892689 {
2690− return false;
2690+ return -EOPNOTSUPP;
26912691 }
26922692
26932693 #endif
drivers/iio/industrialio-core.c+3−2
@@ -1888,7 +1888,7 @@ static const struct iio_buffer_setup_ops noop_ring_setup_ops; · 1887 unmodified lines
18881888 int __iio_device_register(struct iio_dev *indio_dev, struct module *this_mod)
18891889 {
18901890 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
1891− struct fwnode_handle *fwnode;
1891+ struct fwnode_handle *fwnode = NULL;
18921892 int ret;
18931893
18941894 if (!indio_dev->info)
@@ -1899,7 +1899,8 @@ int __iio_device_register(struct iio_dev *indio_dev, struct module *this_mod) · 4 unmodified lines
18991899 /* If the calling driver did not initialize firmware node, do it here */
19001900 if (dev_fwnode(&indio_dev->dev))
19011901 fwnode = dev_fwnode(&indio_dev->dev);
1902− else
1902+ /* The default dummy IIO device has no parent */
1903+ else if (indio_dev->dev.parent)
19031904 fwnode = dev_fwnode(indio_dev->dev.parent);
19041905 device_set_node(&indio_dev->dev, fwnode);
19051906
drivers/iio/light/rohm-bu27008.c+19−3
@@ -190,7 +190,7 @@ static const struct iio_itime_sel_mul bu27008_itimes[] = { · 189 unmodified lines
190190 .address = BU27008_REG_##data##_LO, \
191191 .scan_index = BU27008_##color, \
192192 .scan_type = { \
193− .sign = 's', \
193+ .sign = 'u', \
194194 .realbits = 16, \
195195 .storagebits = 16, \
196196 .endianness = IIO_LE, \
@@ -633,7 +633,7 @@ static int bu27008_try_find_new_time_gain(struct bu27008_data *data, int val, · 436 unmodified lines
633633 for (i = 0; i < data->gts.num_itime; i++) {
634634 new_time_sel = data->gts.itime_table[i].sel;
635635 ret = iio_gts_find_gain_sel_for_scale_using_time(&data->gts,
636− new_time_sel, val, val2 * 1000, gain_sel);
636+ new_time_sel, val, val2, gain_sel);
637637 if (!ret)
638638 break;
639639 }
@@ -662,7 +662,7 @@ static int bu27008_set_scale(struct bu27008_data *data, · 22 unmodified lines
662662 goto unlock_out;
663663
664664 ret = iio_gts_find_gain_sel_for_scale_using_time(&data->gts, time_sel,
665− val, val2 * 1000, &gain_sel);
665+ val, val2, &gain_sel);
666666 if (ret) {
667667 ret = bu27008_try_find_new_time_gain(data, val, val2, &gain_sel);
668668 if (ret)
@@ -677,6 +677,21 @@ unlock_out: · 8 unmodified lines
677677 return ret;
678678 }
679679
680+static int bu27008_write_raw_get_fmt(struct iio_dev *indio_dev,
681+ struct iio_chan_spec const *chan,
682+ long mask)
683+{
684+
685+ switch (mask) {
686+ case IIO_CHAN_INFO_SCALE:
687+ return IIO_VAL_INT_PLUS_NANO;
688+ case IIO_CHAN_INFO_INT_TIME:
689+ return IIO_VAL_INT_PLUS_MICRO;
690+ default:
691+ return -EINVAL;
692+ }
693+}
694+
680695 static int bu27008_write_raw(struct iio_dev *idev,
681696 struct iio_chan_spec const *chan,
682697 int val, int val2, long mask)
@@ -756,6 +771,7 @@ static int bu27008_update_scan_mode(struct iio_dev *idev, · 73 unmodified lines
756771 static const struct iio_info bu27008_info = {
757772 .read_raw = &bu27008_read_raw,
758773 .write_raw = &bu27008_write_raw,
774+ .write_raw_get_fmt = &bu27008_write_raw_get_fmt,
759775 .read_avail = &bu27008_read_avail,
760776 .update_scan_mode = bu27008_update_scan_mode,
761777 .validate_trigger = iio_validate_own_trigger,
drivers/iio/light/rohm-bu27034.c+19−3
@@ -575,7 +575,7 @@ static int bu27034_set_scale(struct bu27034_data *data, int chan, · 574 unmodified lines
575575 return -EINVAL;
576576
577577 if (chan == BU27034_CHAN_ALS) {
578− if (val == 0 && val2 == 1000)
578+ if (val == 0 && val2 == 1000000)
579579 return 0;
580580
581581 return -EINVAL;
@@ -587,7 +587,7 @@ static int bu27034_set_scale(struct bu27034_data *data, int chan, · 5 unmodified lines
587587 goto unlock_out;
588588
589589 ret = iio_gts_find_gain_sel_for_scale_using_time(&data->gts, time_sel,
590− val, val2 * 1000, &gain_sel);
590+ val, val2, &gain_sel);
591591 if (ret) {
592592 /*
593593 * Could not support scale with given time. Need to change time.
@@ -624,7 +624,7 @@ static int bu27034_set_scale(struct bu27034_data *data, int chan, · 30 unmodified lines
624624
625625 /* Can we provide requested scale with this time? */
626626 ret = iio_gts_find_gain_sel_for_scale_using_time(
627− &data->gts, new_time_sel, val, val2 * 1000,
627+ &data->gts, new_time_sel, val, val2,
628628 &gain_sel);
629629 if (ret)
630630 continue;
@@ -1217,6 +1217,21 @@ static int bu27034_read_raw(struct iio_dev *idev, · 586 unmodified lines
12171217 }
12181218 }
12191219
1220+static int bu27034_write_raw_get_fmt(struct iio_dev *indio_dev,
1221+ struct iio_chan_spec const *chan,
1222+ long mask)
1223+{
1224+
1225+ switch (mask) {
1226+ case IIO_CHAN_INFO_SCALE:
1227+ return IIO_VAL_INT_PLUS_NANO;
1228+ case IIO_CHAN_INFO_INT_TIME:
1229+ return IIO_VAL_INT_PLUS_MICRO;
1230+ default:
1231+ return -EINVAL;
1232+ }
1233+}
1234+
12201235 static int bu27034_write_raw(struct iio_dev *idev,
12211236 struct iio_chan_spec const *chan,
12221237 int val, int val2, long mask)
@@ -1267,6 +1282,7 @@ static int bu27034_read_avail(struct iio_dev *idev, · 44 unmodified lines
12671282 static const struct iio_info bu27034_info = {
12681283 .read_raw = &bu27034_read_raw,
12691284 .write_raw = &bu27034_write_raw,
1285+ .write_raw_get_fmt = &bu27034_write_raw_get_fmt,
12701286 .read_avail = &bu27034_read_avail,
12711287 };
12721288
drivers/infiniband/core/cma.c+2−0
@@ -4062,6 +4062,8 @@ static int resolve_prepare_src(struct rdma_id_private *id_priv, · 4061 unmodified lines
40624062 RDMA_CM_ADDR_QUERY)))
40634063 return -EINVAL;
40644064
4065+ } else {
4066+ memcpy(cma_dst_addr(id_priv), dst_addr, rdma_addr_size(dst_addr));
40654067 }
40664068
40674069 if (cma_family(id_priv) != dst_addr->sa_family) {
drivers/infiniband/core/umem.c+2−1
@@ -85,6 +85,8 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem, · 84 unmodified lines
8585 dma_addr_t mask;
8686 int i;
8787
88+ umem->iova = va = virt;
89+
8890 if (umem->is_odp) {
8991 unsigned int page_size = BIT(to_ib_umem_odp(umem)->page_shift);
9092
@@ -100,7 +102,6 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem, · 9 unmodified lines
100102 */
101103 pgsz_bitmap &= GENMASK(BITS_PER_LONG - 1, PAGE_SHIFT);
102104
103− umem->iova = va = virt;
104105 /* The best result is the smallest page size that results in the minimum
105106 * number of required pages. Compute the largest page size that could
106107 * work based on VA address bits that don't change.
drivers/infiniband/hw/bnxt_re/ib_verbs.c+12−0
@@ -869,7 +869,10 @@ fail: · 868 unmodified lines
869869 int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
870870 {
871871 struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp);
872+ struct bnxt_qplib_qp *qplib_qp = &qp->qplib_qp;
872873 struct bnxt_re_dev *rdev = qp->rdev;
874+ struct bnxt_qplib_nq *scq_nq = NULL;
875+ struct bnxt_qplib_nq *rcq_nq = NULL;
873876 unsigned int flags;
874877 int rc;
875878
@@ -903,6 +906,15 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata) · 27 unmodified lines
903906 ib_umem_release(qp->rumem);
904907 ib_umem_release(qp->sumem);
905908
909+ /* Flush all the entries of notification queue associated with
910+ * given qp.
911+ */
912+ scq_nq = qplib_qp->scq->nq;
913+ rcq_nq = qplib_qp->rcq->nq;
914+ bnxt_re_synchronize_nq(scq_nq);
915+ if (scq_nq != rcq_nq)
916+ bnxt_re_synchronize_nq(rcq_nq);
917+
906918 return 0;
907919 }
908920
drivers/infiniband/hw/bnxt_re/main.c+3−1
@@ -1253,6 +1253,8 @@ static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 wqe_mode) · 1252 unmodified lines
12531253
12541254 rc = bnxt_re_setup_chip_ctx(rdev, wqe_mode);
12551255 if (rc) {
1256+ bnxt_unregister_dev(rdev->en_dev);
1257+ clear_bit(BNXT_RE_FLAG_NETDEV_REGISTERED, &rdev->flags);
12561258 ibdev_err(&rdev->ibdev, "Failed to get chip context\n");
12571259 return -EINVAL;
12581260 }
@@ -1526,8 +1528,8 @@ static void bnxt_re_remove(struct auxiliary_device *adev) · 267 unmodified lines
15261528 }
15271529 bnxt_re_setup_cc(rdev, false);
15281530 ib_unregister_device(&rdev->ibdev);
1529− ib_dealloc_device(&rdev->ibdev);
15301531 bnxt_re_dev_uninit(rdev);
1532+ ib_dealloc_device(&rdev->ibdev);
15311533 skip_remove:
15321534 mutex_unlock(&bnxt_re_mutex);
15331535 }
drivers/infiniband/hw/bnxt_re/qplib_fp.c+23−5
@@ -381,6 +381,24 @@ static void bnxt_qplib_service_nq(struct tasklet_struct *t) · 380 unmodified lines
381381 spin_unlock_bh(&hwq->lock);
382382 }
383383
384+/* bnxt_re_synchronize_nq - self polling notification queue.
385+ * @nq - notification queue pointer
386+ *
387+ * This function will start polling entries of a given notification queue
388+ * for all pending entries.
389+ * This function is useful to synchronize notification entries while resources
390+ * are going away.
391+ */
392+
393+void bnxt_re_synchronize_nq(struct bnxt_qplib_nq *nq)
394+{
395+ int budget = nq->budget;
396+
397+ nq->budget = nq->hwq.max_elements;
398+ bnxt_qplib_service_nq(&nq->nq_tasklet);
399+ nq->budget = budget;
400+}
401+
384402 static irqreturn_t bnxt_qplib_nq_irq(int irq, void *dev_instance)
385403 {
386404 struct bnxt_qplib_nq *nq = dev_instance;
@@ -402,19 +420,19 @@ void bnxt_qplib_nq_stop_irq(struct bnxt_qplib_nq *nq, bool kill) · 15 unmodified lines
402420 if (!nq->requested)
403421 return;
404422
405− tasklet_disable(&nq->nq_tasklet);
423+ nq->requested = false;
406424 /* Mask h/w interrupt */
407425 bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, nq->res->cctx, false);
408426 /* Sync with last running IRQ handler */
409427 synchronize_irq(nq->msix_vec);
410− if (kill)
411− tasklet_kill(&nq->nq_tasklet);
412−
413428 irq_set_affinity_hint(nq->msix_vec, NULL);
414429 free_irq(nq->msix_vec, nq);
415430 kfree(nq->name);
416431 nq->name = NULL;
417− nq->requested = false;
432+
433+ if (kill)
434+ tasklet_kill(&nq->nq_tasklet);
435+ tasklet_disable(&nq->nq_tasklet);
418436 }
419437
420438 void bnxt_qplib_disable_nq(struct bnxt_qplib_nq *nq)
drivers/infiniband/hw/bnxt_re/qplib_fp.h+1−0
@@ -553,6 +553,7 @@ int bnxt_qplib_process_flush_list(struct bnxt_qplib_cq *cq, · 552 unmodified lines
553553 struct bnxt_qplib_cqe *cqe,
554554 int num_cqes);
555555 void bnxt_qplib_flush_cqn_wq(struct bnxt_qplib_qp *qp);
556+void bnxt_re_synchronize_nq(struct bnxt_qplib_nq *nq);
556557
557558 static inline void *bnxt_qplib_get_swqe(struct bnxt_qplib_q *que, u32 *swq_idx)
558559 {
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c+4−5
@@ -989,19 +989,18 @@ void bnxt_qplib_rcfw_stop_irq(struct bnxt_qplib_rcfw *rcfw, bool kill) · 988 unmodified lines
989989 if (!creq->requested)
990990 return;
991991
992− tasklet_disable(&creq->creq_tasklet);
992+ creq->requested = false;
993993 /* Mask h/w interrupts */
994994 bnxt_qplib_ring_nq_db(&creq->creq_db.dbinfo, rcfw->res->cctx, false);
995995 /* Sync with last running IRQ-handler */
996996 synchronize_irq(creq->msix_vec);
997− if (kill)
998− tasklet_kill(&creq->creq_tasklet);
999−
1000997 free_irq(creq->msix_vec, rcfw);
1001998 kfree(creq->irq_name);
1002999 creq->irq_name = NULL;
1003− creq->requested = false;
10041000 atomic_set(&rcfw->rcfw_intr_enabled, 0);
1001+ if (kill)
1002+ tasklet_kill(&creq->creq_tasklet);
1003+ tasklet_disable(&creq->creq_tasklet);
10051004 }
10061005
10071006 void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw)
drivers/infiniband/hw/bnxt_re/qplib_res.c+1−0
@@ -819,6 +819,7 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res, · 818 unmodified lines
819819 }
820820
821821 memset((u8 *)dpit->tbl, 0xFF, bytes);
822+ mutex_init(&res->dpi_tbl_lock);
822823 dpit->priv_db = dpit->ucreg.bar_reg + dpit->ucreg.offset;
823824
824825 return 0;
drivers/infiniband/hw/hfi1/chip.c+1−0
@@ -12307,6 +12307,7 @@ static void free_cntrs(struct hfi1_devdata *dd) · 12306 unmodified lines
1230712307
1230812308 if (dd->synth_stats_timer.function)
1230912309 del_timer_sync(&dd->synth_stats_timer);
12310+ cancel_work_sync(&dd->update_cntr_work);
1231012311 ppd = (struct hfi1_pportdata *)(dd + 1);
1231112312 for (i = 0; i < dd->num_pports; i++, ppd++) {
1231212313 kfree(ppd->cntrs);
drivers/infiniband/hw/irdma/ctrl.c+19−12
@@ -2712,13 +2712,13 @@ static int irdma_sc_cq_modify(struct irdma_sc_cq *cq, · 2711 unmodified lines
27122712 */
27132713 void irdma_check_cqp_progress(struct irdma_cqp_timeout *timeout, struct irdma_sc_dev *dev)
27142714 {
2715− if (timeout->compl_cqp_cmds != dev->cqp_cmd_stats[IRDMA_OP_CMPL_CMDS]) {
2716− timeout->compl_cqp_cmds = dev->cqp_cmd_stats[IRDMA_OP_CMPL_CMDS];
2715+ u64 completed_ops = atomic64_read(&dev->cqp->completed_ops);
2716+
2717+ if (timeout->compl_cqp_cmds != completed_ops) {
2718+ timeout->compl_cqp_cmds = completed_ops;
27172719 timeout->count = 0;
2718− } else {
2719− if (dev->cqp_cmd_stats[IRDMA_OP_REQ_CMDS] !=
2720− timeout->compl_cqp_cmds)
2721− timeout->count++;
2720+ } else if (timeout->compl_cqp_cmds != dev->cqp->requested_ops) {
2721+ timeout->count++;
27222722 }
27232723 }
27242724
@@ -2761,7 +2761,7 @@ static int irdma_cqp_poll_registers(struct irdma_sc_cqp *cqp, u32 tail, · 36 unmodified lines
27612761 if (newtail != tail) {
27622762 /* SUCCESS */
27632763 IRDMA_RING_MOVE_TAIL(cqp->sq_ring);
2764− cqp->dev->cqp_cmd_stats[IRDMA_OP_CMPL_CMDS]++;
2764+ atomic64_inc(&cqp->completed_ops);
27652765 return 0;
27662766 }
27672767 udelay(cqp->dev->hw_attrs.max_sleep_count);
@@ -3121,8 +3121,8 @@ int irdma_sc_cqp_init(struct irdma_sc_cqp *cqp, · 353 unmodified lines
31213121 info->dev->cqp = cqp;
31223122
31233123 IRDMA_RING_INIT(cqp->sq_ring, cqp->sq_size);
3124− cqp->dev->cqp_cmd_stats[IRDMA_OP_REQ_CMDS] = 0;
3125− cqp->dev->cqp_cmd_stats[IRDMA_OP_CMPL_CMDS] = 0;
3124+ cqp->requested_ops = 0;
3125+ atomic64_set(&cqp->completed_ops, 0);
31263126 /* for the cqp commands backlog. */
31273127 INIT_LIST_HEAD(&cqp->dev->cqp_cmd_head);
31283128
@@ -3274,7 +3274,7 @@ __le64 *irdma_sc_cqp_get_next_send_wqe_idx(struct irdma_sc_cqp *cqp, u64 scratch · 145 unmodified lines
32743274 if (ret_code)
32753275 return NULL;
32763276
3277− cqp->dev->cqp_cmd_stats[IRDMA_OP_REQ_CMDS]++;
3277+ cqp->requested_ops++;
32783278 if (!*wqe_idx)
32793279 cqp->polarity = !cqp->polarity;
32803280 wqe = cqp->sq_base[*wqe_idx].elem;
@@ -3363,6 +3363,9 @@ int irdma_sc_ccq_get_cqe_info(struct irdma_sc_cq *ccq, · 82 unmodified lines
33633363 if (polarity != ccq->cq_uk.polarity)
33643364 return -ENOENT;
33653365
3366+ /* Ensure CEQE contents are read after valid bit is checked */
3367+ dma_rmb();
3368+
33663369 get_64bit_val(cqe, 8, &qp_ctx);
33673370 cqp = (struct irdma_sc_cqp *)(unsigned long)qp_ctx;
33683371 info->error = (bool)FIELD_GET(IRDMA_CQ_ERROR, temp);
@@ -3397,7 +3400,7 @@ int irdma_sc_ccq_get_cqe_info(struct irdma_sc_cq *ccq, · 28 unmodified lines
33973400 dma_wmb(); /* make sure shadow area is updated before moving tail */
33983401
33993402 IRDMA_RING_MOVE_TAIL(cqp->sq_ring);
3400− ccq->dev->cqp_cmd_stats[IRDMA_OP_CMPL_CMDS]++;
3403+ atomic64_inc(&cqp->completed_ops);
34013404
34023405 return ret_code;
34033406 }
@@ -4009,13 +4012,17 @@ int irdma_sc_get_next_aeqe(struct irdma_sc_aeq *aeq, · 605 unmodified lines
40094012 u8 polarity;
40104013
40114014 aeqe = IRDMA_GET_CURRENT_AEQ_ELEM(aeq);
4012− get_64bit_val(aeqe, 0, &compl_ctx);
40134015 get_64bit_val(aeqe, 8, &temp);
40144016 polarity = (u8)FIELD_GET(IRDMA_AEQE_VALID, temp);
40154017
40164018 if (aeq->polarity != polarity)
40174019 return -ENOENT;
40184020
4021+ /* Ensure AEQE contents are read after valid bit is checked */
4022+ dma_rmb();
4023+
4024+ get_64bit_val(aeqe, 0, &compl_ctx);
4025+
40194026 print_hex_dump_debug("WQE: AEQ_ENTRY WQE", DUMP_PREFIX_OFFSET, 16, 8,
40204027 aeqe, 16, false);
40214028
drivers/infiniband/hw/irdma/defs.h+22−24
@@ -191,32 +191,30 @@ enum irdma_cqp_op_type { · 190 unmodified lines
191191 IRDMA_OP_MANAGE_VF_PBLE_BP = 25,
192192 IRDMA_OP_QUERY_FPM_VAL = 26,
193193 IRDMA_OP_COMMIT_FPM_VAL = 27,
194− IRDMA_OP_REQ_CMDS = 28,
195− IRDMA_OP_CMPL_CMDS = 29,
196− IRDMA_OP_AH_CREATE = 30,
197− IRDMA_OP_AH_MODIFY = 31,
198− IRDMA_OP_AH_DESTROY = 32,
199− IRDMA_OP_MC_CREATE = 33,
200− IRDMA_OP_MC_DESTROY = 34,
201− IRDMA_OP_MC_MODIFY = 35,
202− IRDMA_OP_STATS_ALLOCATE = 36,
203− IRDMA_OP_STATS_FREE = 37,
204− IRDMA_OP_STATS_GATHER = 38,
205− IRDMA_OP_WS_ADD_NODE = 39,
206− IRDMA_OP_WS_MODIFY_NODE = 40,
207− IRDMA_OP_WS_DELETE_NODE = 41,
208− IRDMA_OP_WS_FAILOVER_START = 42,
209− IRDMA_OP_WS_FAILOVER_COMPLETE = 43,
210− IRDMA_OP_SET_UP_MAP = 44,
211− IRDMA_OP_GEN_AE = 45,
212− IRDMA_OP_QUERY_RDMA_FEATURES = 46,
213− IRDMA_OP_ALLOC_LOCAL_MAC_ENTRY = 47,
214− IRDMA_OP_ADD_LOCAL_MAC_ENTRY = 48,
215− IRDMA_OP_DELETE_LOCAL_MAC_ENTRY = 49,
216− IRDMA_OP_CQ_MODIFY = 50,
194+ IRDMA_OP_AH_CREATE = 28,
195+ IRDMA_OP_AH_MODIFY = 29,
196+ IRDMA_OP_AH_DESTROY = 30,
197+ IRDMA_OP_MC_CREATE = 31,
198+ IRDMA_OP_MC_DESTROY = 32,
199+ IRDMA_OP_MC_MODIFY = 33,
200+ IRDMA_OP_STATS_ALLOCATE = 34,
201+ IRDMA_OP_STATS_FREE = 35,
202+ IRDMA_OP_STATS_GATHER = 36,
203+ IRDMA_OP_WS_ADD_NODE = 37,
204+ IRDMA_OP_WS_MODIFY_NODE = 38,
205+ IRDMA_OP_WS_DELETE_NODE = 39,
206+ IRDMA_OP_WS_FAILOVER_START = 40,
207+ IRDMA_OP_WS_FAILOVER_COMPLETE = 41,
208+ IRDMA_OP_SET_UP_MAP = 42,
209+ IRDMA_OP_GEN_AE = 43,
210+ IRDMA_OP_QUERY_RDMA_FEATURES = 44,
211+ IRDMA_OP_ALLOC_LOCAL_MAC_ENTRY = 45,
212+ IRDMA_OP_ADD_LOCAL_MAC_ENTRY = 46,
213+ IRDMA_OP_DELETE_LOCAL_MAC_ENTRY = 47,
214+ IRDMA_OP_CQ_MODIFY = 48,
217215
218216 /* Must be last entry*/
219− IRDMA_MAX_CQP_OPS = 51,
217+ IRDMA_MAX_CQP_OPS = 49,
220218 };
221219
222220 /* CQP SQ WQES */
drivers/infiniband/hw/irdma/hw.c+2−1
@@ -191,6 +191,7 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp, · 190 unmodified lines
191191 case IRDMA_AE_AMP_MWBIND_INVALID_RIGHTS:
192192 case IRDMA_AE_AMP_MWBIND_BIND_DISABLED:
193193 case IRDMA_AE_AMP_MWBIND_INVALID_BOUNDS:
194+ case IRDMA_AE_AMP_MWBIND_VALID_STAG:
194195 qp->flush_code = FLUSH_MW_BIND_ERR;
195196 qp->event_type = IRDMA_QP_EVENT_ACCESS_ERR;
196197 break;
@@ -2075,7 +2076,7 @@ void irdma_cqp_ce_handler(struct irdma_pci_f *rf, struct irdma_sc_cq *cq) · 1878 unmodified lines
20752076 cqp_request->compl_info.error = info.error;
20762077
20772078 if (cqp_request->waiting) {
2078− cqp_request->request_done = true;
2079+ WRITE_ONCE(cqp_request->request_done, true);
20792080 wake_up(&cqp_request->waitq);
20802081 irdma_put_cqp_request(&rf->cqp, cqp_request);
20812082 } else {
drivers/infiniband/hw/irdma/main.h+1−1
@@ -161,8 +161,8 @@ struct irdma_cqp_request { · 160 unmodified lines
161161 void (*callback_fcn)(struct irdma_cqp_request *cqp_request);
162162 void *param;
163163 struct irdma_cqp_compl_info compl_info;
164+ bool request_done; /* READ/WRITE_ONCE macros operate on it */
164165 bool waiting:1;
165− bool request_done:1;
166166 bool dynamic:1;
167167 };
168168
drivers/infiniband/hw/irdma/puda.c+6−0
@@ -230,6 +230,9 @@ static int irdma_puda_poll_info(struct irdma_sc_cq *cq, · 229 unmodified lines
230230 if (valid_bit != cq_uk->polarity)
231231 return -ENOENT;
232232
233+ /* Ensure CQE contents are read after valid bit is checked */
234+ dma_rmb();
235+
233236 if (cq->dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2)
234237 ext_valid = (bool)FIELD_GET(IRDMA_CQ_EXTCQE, qword3);
235238
@@ -243,6 +246,9 @@ static int irdma_puda_poll_info(struct irdma_sc_cq *cq, · 7 unmodified lines
243246 if (polarity != cq_uk->polarity)
244247 return -ENOENT;
245248
249+ /* Ensure ext CQE contents are read after ext valid bit is checked */
250+ dma_rmb();
251+
246252 IRDMA_RING_MOVE_HEAD_NOCHECK(cq_uk->cq_ring);
247253 if (!IRDMA_RING_CURRENT_HEAD(cq_uk->cq_ring))
248254 cq_uk->polarity = !cq_uk->polarity;
drivers/infiniband/hw/irdma/type.h+2−0
@@ -365,6 +365,8 @@ struct irdma_sc_cqp { · 364 unmodified lines
365365 struct irdma_dcqcn_cc_params dcqcn_params;
366366 __le64 *host_ctx;
367367 u64 *scratch_array;
368+ u64 requested_ops;
369+ atomic64_t completed_ops;
368370 u32 cqp_id;
369371 u32 sq_size;
370372 u32 hw_sq_size;
drivers/infiniband/hw/irdma/uk.c+4−1
@@ -1161,7 +1161,7 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, · 1160 unmodified lines
11611161 }
11621162 wqe_idx = (u32)FIELD_GET(IRDMA_CQ_WQEIDX, qword3);
11631163 info->qp_handle = (irdma_qp_handle)(unsigned long)qp;
1164− info->op_type = (u8)FIELD_GET(IRDMA_CQ_SQ, qword3);
1164+ info->op_type = (u8)FIELD_GET(IRDMACQ_OP, qword3);
11651165
11661166 if (info->q_type == IRDMA_CQE_QTYPE_RQ) {
11671167 u32 array_idx;
@@ -1527,6 +1527,9 @@ void irdma_uk_clean_cq(void *q, struct irdma_cq_uk *cq) · 359 unmodified lines
15271527 if (polarity != temp)
15281528 break;
15291529
1530+ /* Ensure CQE contents are read after valid bit is checked */
1531+ dma_rmb();
1532+
15301533 get_64bit_val(cqe, 8, &comp_ctx);
15311534 if ((void *)(unsigned long)comp_ctx == q)
15321535 set_64bit_val(cqe, 8, 0);
drivers/infiniband/hw/irdma/utils.c+4−4
@@ -481,7 +481,7 @@ void irdma_free_cqp_request(struct irdma_cqp *cqp, · 480 unmodified lines
481481 if (cqp_request->dynamic) {
482482 kfree(cqp_request);
483483 } else {
484− cqp_request->request_done = false;
484+ WRITE_ONCE(cqp_request->request_done, false);
485485 cqp_request->callback_fcn = NULL;
486486 cqp_request->waiting = false;
487487
@@ -515,7 +515,7 @@ irdma_free_pending_cqp_request(struct irdma_cqp *cqp, · 27 unmodified lines
515515 {
516516 if (cqp_request->waiting) {
517517 cqp_request->compl_info.error = true;
518− cqp_request->request_done = true;
518+ WRITE_ONCE(cqp_request->request_done, true);
519519 wake_up(&cqp_request->waitq);
520520 }
521521 wait_event_timeout(cqp->remove_wq,
@@ -567,11 +567,11 @@ static int irdma_wait_event(struct irdma_pci_f *rf, · 45 unmodified lines
567567 bool cqp_error = false;
568568 int err_code = 0;
569569
570− cqp_timeout.compl_cqp_cmds = rf->sc_dev.cqp_cmd_stats[IRDMA_OP_CMPL_CMDS];
570+ cqp_timeout.compl_cqp_cmds = atomic64_read(&rf->sc_dev.cqp->completed_ops);
571571 do {
572572 irdma_cqp_ce_handler(rf, &rf->ccq.sc_cq);
573573 if (wait_event_timeout(cqp_request->waitq,
574− cqp_request->request_done,
574+ READ_ONCE(cqp_request->request_done),
575575 msecs_to_jiffies(CQP_COMPL_WAIT_TIME_MS)))
576576 break;
577577
drivers/infiniband/hw/mlx4/qp.c+9−9
@@ -565,15 +565,15 @@ static int set_qp_rss(struct mlx4_ib_dev *dev, struct mlx4_ib_rss *rss_ctx, · 564 unmodified lines
565565 return (-EOPNOTSUPP);
566566 }
567567
568− if (ucmd->rx_hash_fields_mask & ~(MLX4_IB_RX_HASH_SRC_IPV4 |
569− MLX4_IB_RX_HASH_DST_IPV4 |
570− MLX4_IB_RX_HASH_SRC_IPV6 |
571− MLX4_IB_RX_HASH_DST_IPV6 |
572− MLX4_IB_RX_HASH_SRC_PORT_TCP |
573− MLX4_IB_RX_HASH_DST_PORT_TCP |
574− MLX4_IB_RX_HASH_SRC_PORT_UDP |
575− MLX4_IB_RX_HASH_DST_PORT_UDP |
576− MLX4_IB_RX_HASH_INNER)) {
568+ if (ucmd->rx_hash_fields_mask & ~(u64)(MLX4_IB_RX_HASH_SRC_IPV4 |
569+ MLX4_IB_RX_HASH_DST_IPV4 |
570+ MLX4_IB_RX_HASH_SRC_IPV6 |
571+ MLX4_IB_RX_HASH_DST_IPV6 |
572+ MLX4_IB_RX_HASH_SRC_PORT_TCP |
573+ MLX4_IB_RX_HASH_DST_PORT_TCP |
574+ MLX4_IB_RX_HASH_SRC_PORT_UDP |
575+ MLX4_IB_RX_HASH_DST_PORT_UDP |
576+ MLX4_IB_RX_HASH_INNER)) {
577577 pr_debug("RX Hash fields_mask has unsupported mask (0x%llx)\n",
578578 ucmd->rx_hash_fields_mask);
579579 return (-EOPNOTSUPP);
drivers/infiniband/hw/mthca/mthca_qp.c+1−1
@@ -1393,7 +1393,7 @@ int mthca_alloc_sqp(struct mthca_dev *dev, · 1392 unmodified lines
13931393 if (mthca_array_get(&dev->qp_table.qp, mqpn))
13941394 err = -EBUSY;
13951395 else
1396− mthca_array_set(&dev->qp_table.qp, mqpn, qp->sqp);
1396+ mthca_array_set(&dev->qp_table.qp, mqpn, qp);
13971397 spin_unlock_irq(&dev->qp_table.lock);
13981398
13991399 if (err)
drivers/infiniband/sw/rxe/rxe_mw.c+2−1
@@ -199,7 +199,8 @@ int rxe_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe) · 198 unmodified lines
199199
200200 if (access & ~RXE_ACCESS_SUPPORTED_MW) {
201201 rxe_err_mw(mw, "access %#x not supported", access);
202− return -EOPNOTSUPP;
202+ ret = -EOPNOTSUPP;
203+ goto err_drop_mr;
203204 }
204205
205206 spin_lock_bh(&mw->lock);
drivers/interconnect/qcom/bcm-voter.c+5−0
@@ -83,6 +83,11 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm) · 82 unmodified lines
8383
8484 temp = agg_peak[bucket] * bcm->vote_scale;
8585 bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit);
86+
87+ if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) {
88+ bcm->vote_x[bucket] = 0;
89+ bcm->vote_y[bucket] = bcm->enable_mask;
90+ }
8691 }
8792
8893 if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC] == 0 &&
drivers/interconnect/qcom/icc-rpmh.h+2−0
@@ -81,6 +81,7 @@ struct qcom_icc_node { · 80 unmodified lines
8181 * @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm
8282 * @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm
8383 * @vote_scale: scaling factor for vote_x and vote_y
84+ * @enable_mask: optional mask to send as vote instead of vote_x/vote_y
8485 * @dirty: flag used to indicate whether the bcm needs to be committed
8586 * @keepalive: flag used to indicate whether a keepalive is required
8687 * @aux_data: auxiliary data used when calculating threshold values and
@@ -97,6 +98,7 @@ struct qcom_icc_bcm { · 10 unmodified lines
9798 u64 vote_x[QCOM_ICC_NUM_BUCKETS];
9899 u64 vote_y[QCOM_ICC_NUM_BUCKETS];
99100 u64 vote_scale;
101+ u32 enable_mask;
100102 bool dirty;
101103 bool keepalive;
102104 struct bcm_db aux_data;
drivers/interconnect/qcom/sa8775p.c+1−0
@@ -1873,6 +1873,7 @@ static struct qcom_icc_node srvc_snoc = { · 1872 unmodified lines
18731873
18741874 static struct qcom_icc_bcm bcm_acv = {
18751875 .name = "ACV",
1876+ .enable_mask = 0x8,
18761877 .num_nodes = 1,
18771878 .nodes = { &ebi },
18781879 };
drivers/interconnect/qcom/sm8450.c+9−0
@@ -1337,6 +1337,7 @@ static struct qcom_icc_node qns_mem_noc_sf_disp = { · 1336 unmodified lines
13371337
13381338 static struct qcom_icc_bcm bcm_acv = {
13391339 .name = "ACV",
1340+ .enable_mask = 0x8,
13401341 .num_nodes = 1,
13411342 .nodes = { &ebi },
13421343 };
@@ -1349,6 +1350,7 @@ static struct qcom_icc_bcm bcm_ce0 = { · 6 unmodified lines
13491350
13501351 static struct qcom_icc_bcm bcm_cn0 = {
13511352 .name = "CN0",
1353+ .enable_mask = 0x1,
13521354 .keepalive = true,
13531355 .num_nodes = 55,
13541356 .nodes = { &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie,
@@ -1383,6 +1385,7 @@ static struct qcom_icc_bcm bcm_cn0 = { · 28 unmodified lines
13831385
13841386 static struct qcom_icc_bcm bcm_co0 = {
13851387 .name = "CO0",
1388+ .enable_mask = 0x1,
13861389 .num_nodes = 2,
13871390 .nodes = { &qxm_nsp, &qns_nsp_gemnoc },
13881391 };
@@ -1403,6 +1406,7 @@ static struct qcom_icc_bcm bcm_mm0 = { · 14 unmodified lines
14031406
14041407 static struct qcom_icc_bcm bcm_mm1 = {
14051408 .name = "MM1",
1409+ .enable_mask = 0x1,
14061410 .num_nodes = 12,
14071411 .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp,
14081412 &qnm_camnoc_sf, &qnm_mdp,
@@ -1445,6 +1449,7 @@ static struct qcom_icc_bcm bcm_sh0 = { · 36 unmodified lines
14451449
14461450 static struct qcom_icc_bcm bcm_sh1 = {
14471451 .name = "SH1",
1452+ .enable_mask = 0x1,
14481453 .num_nodes = 7,
14491454 .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
14501455 &qnm_nsp_gemnoc, &qnm_pcie,
@@ -1461,6 +1466,7 @@ static struct qcom_icc_bcm bcm_sn0 = { · 10 unmodified lines
14611466
14621467 static struct qcom_icc_bcm bcm_sn1 = {
14631468 .name = "SN1",
1469+ .enable_mask = 0x1,
14641470 .num_nodes = 4,
14651471 .nodes = { &qhm_gic, &qxm_pimem,
14661472 &xm_gic, &qns_gemnoc_gc },
@@ -1492,6 +1498,7 @@ static struct qcom_icc_bcm bcm_sn7 = { · 25 unmodified lines
14921498
14931499 static struct qcom_icc_bcm bcm_acv_disp = {
14941500 .name = "ACV",
1501+ .enable_mask = 0x1,
14951502 .num_nodes = 1,
14961503 .nodes = { &ebi_disp },
14971504 };
@@ -1510,6 +1517,7 @@ static struct qcom_icc_bcm bcm_mm0_disp = { · 12 unmodified lines
15101517
15111518 static struct qcom_icc_bcm bcm_mm1_disp = {
15121519 .name = "MM1",
1520+ .enable_mask = 0x1,
15131521 .num_nodes = 3,
15141522 .nodes = { &qnm_mdp_disp, &qnm_rot_disp,
15151523 &qns_mem_noc_sf_disp },
@@ -1523,6 +1531,7 @@ static struct qcom_icc_bcm bcm_sh0_disp = { · 7 unmodified lines
15231531
15241532 static struct qcom_icc_bcm bcm_sh1_disp = {
15251533 .name = "SH1",
1534+ .enable_mask = 0x1,
15261535 .num_nodes = 1,
15271536 .nodes = { &qnm_pcie_disp },
15281537 };
drivers/interconnect/qcom/sm8550.c+17−0
@@ -1473,6 +1473,7 @@ static struct qcom_icc_node qns_mem_noc_sf_cam_ife_2 = { · 1472 unmodified lines
14731473
14741474 static struct qcom_icc_bcm bcm_acv = {
14751475 .name = "ACV",
1476+ .enable_mask = 0x8,
14761477 .num_nodes = 1,
14771478 .nodes = { &ebi },
14781479 };
@@ -1485,6 +1486,7 @@ static struct qcom_icc_bcm bcm_ce0 = { · 6 unmodified lines
14851486
14861487 static struct qcom_icc_bcm bcm_cn0 = {
14871488 .name = "CN0",
1489+ .enable_mask = 0x1,
14881490 .keepalive = true,
14891491 .num_nodes = 54,
14901492 .nodes = { &qsm_cfg, &qhs_ahb2phy0,
@@ -1524,6 +1526,7 @@ static struct qcom_icc_bcm bcm_cn1 = { · 33 unmodified lines
15241526
15251527 static struct qcom_icc_bcm bcm_co0 = {
15261528 .name = "CO0",
1529+ .enable_mask = 0x1,
15271530 .num_nodes = 2,
15281531 .nodes = { &qxm_nsp, &qns_nsp_gemnoc },
15291532 };
@@ -1549,6 +1552,7 @@ static struct qcom_icc_bcm bcm_mm0 = { · 19 unmodified lines
15491552
15501553 static struct qcom_icc_bcm bcm_mm1 = {
15511554 .name = "MM1",
1555+ .enable_mask = 0x1,
15521556 .num_nodes = 8,
15531557 .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp,
15541558 &qnm_camnoc_sf, &qnm_vapss_hcp,
@@ -1589,6 +1593,7 @@ static struct qcom_icc_bcm bcm_sh0 = { · 34 unmodified lines
15891593
15901594 static struct qcom_icc_bcm bcm_sh1 = {
15911595 .name = "SH1",
1596+ .enable_mask = 0x1,
15921597 .num_nodes = 13,
15931598 .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
15941599 &chm_apps, &qnm_gpu,
@@ -1608,6 +1613,7 @@ static struct qcom_icc_bcm bcm_sn0 = { · 13 unmodified lines
16081613
16091614 static struct qcom_icc_bcm bcm_sn1 = {
16101615 .name = "SN1",
1616+ .enable_mask = 0x1,
16111617 .num_nodes = 3,
16121618 .nodes = { &qhm_gic, &xm_gic,
16131619 &qns_gemnoc_gc },
@@ -1633,6 +1639,7 @@ static struct qcom_icc_bcm bcm_sn7 = { · 19 unmodified lines
16331639
16341640 static struct qcom_icc_bcm bcm_acv_disp = {
16351641 .name = "ACV",
1642+ .enable_mask = 0x1,
16361643 .num_nodes = 1,
16371644 .nodes = { &ebi_disp },
16381645 };
@@ -1657,12 +1664,14 @@ static struct qcom_icc_bcm bcm_sh0_disp = { · 18 unmodified lines
16571664
16581665 static struct qcom_icc_bcm bcm_sh1_disp = {
16591666 .name = "SH1",
1667+ .enable_mask = 0x1,
16601668 .num_nodes = 2,
16611669 .nodes = { &qnm_mnoc_hf_disp, &qnm_pcie_disp },
16621670 };
16631671
16641672 static struct qcom_icc_bcm bcm_acv_cam_ife_0 = {
16651673 .name = "ACV",
1674+ .enable_mask = 0x0,
16661675 .num_nodes = 1,
16671676 .nodes = { &ebi_cam_ife_0 },
16681677 };
@@ -1681,6 +1690,7 @@ static struct qcom_icc_bcm bcm_mm0_cam_ife_0 = { · 12 unmodified lines
16811690
16821691 static struct qcom_icc_bcm bcm_mm1_cam_ife_0 = {
16831692 .name = "MM1",
1693+ .enable_mask = 0x1,
16841694 .num_nodes = 4,
16851695 .nodes = { &qnm_camnoc_hf_cam_ife_0, &qnm_camnoc_icp_cam_ife_0,
16861696 &qnm_camnoc_sf_cam_ife_0, &qns_mem_noc_sf_cam_ife_0 },
@@ -1694,6 +1704,7 @@ static struct qcom_icc_bcm bcm_sh0_cam_ife_0 = { · 7 unmodified lines
16941704
16951705 static struct qcom_icc_bcm bcm_sh1_cam_ife_0 = {
16961706 .name = "SH1",
1707+ .enable_mask = 0x1,
16971708 .num_nodes = 3,
16981709 .nodes = { &qnm_mnoc_hf_cam_ife_0, &qnm_mnoc_sf_cam_ife_0,
16991710 &qnm_pcie_cam_ife_0 },
@@ -1701,6 +1712,7 @@ static struct qcom_icc_bcm bcm_sh1_cam_ife_0 = { · 1 unmodified line
17011712
17021713 static struct qcom_icc_bcm bcm_acv_cam_ife_1 = {
17031714 .name = "ACV",
1715+ .enable_mask = 0x0,
17041716 .num_nodes = 1,
17051717 .nodes = { &ebi_cam_ife_1 },
17061718 };
@@ -1719,6 +1731,7 @@ static struct qcom_icc_bcm bcm_mm0_cam_ife_1 = { · 12 unmodified lines
17191731
17201732 static struct qcom_icc_bcm bcm_mm1_cam_ife_1 = {
17211733 .name = "MM1",
1734+ .enable_mask = 0x1,
17221735 .num_nodes = 4,
17231736 .nodes = { &qnm_camnoc_hf_cam_ife_1, &qnm_camnoc_icp_cam_ife_1,
17241737 &qnm_camnoc_sf_cam_ife_1, &qns_mem_noc_sf_cam_ife_1 },
@@ -1732,6 +1745,7 @@ static struct qcom_icc_bcm bcm_sh0_cam_ife_1 = { · 7 unmodified lines
17321745
17331746 static struct qcom_icc_bcm bcm_sh1_cam_ife_1 = {
17341747 .name = "SH1",
1748+ .enable_mask = 0x1,
17351749 .num_nodes = 3,
17361750 .nodes = { &qnm_mnoc_hf_cam_ife_1, &qnm_mnoc_sf_cam_ife_1,
17371751 &qnm_pcie_cam_ife_1 },
@@ -1739,6 +1753,7 @@ static struct qcom_icc_bcm bcm_sh1_cam_ife_1 = { · 1 unmodified line
17391753
17401754 static struct qcom_icc_bcm bcm_acv_cam_ife_2 = {
17411755 .name = "ACV",
1756+ .enable_mask = 0x0,
17421757 .num_nodes = 1,
17431758 .nodes = { &ebi_cam_ife_2 },
17441759 };
@@ -1757,6 +1772,7 @@ static struct qcom_icc_bcm bcm_mm0_cam_ife_2 = { · 12 unmodified lines
17571772
17581773 static struct qcom_icc_bcm bcm_mm1_cam_ife_2 = {
17591774 .name = "MM1",
1775+ .enable_mask = 0x1,
17601776 .num_nodes = 4,
17611777 .nodes = { &qnm_camnoc_hf_cam_ife_2, &qnm_camnoc_icp_cam_ife_2,
17621778 &qnm_camnoc_sf_cam_ife_2, &qns_mem_noc_sf_cam_ife_2 },
@@ -1770,6 +1786,7 @@ static struct qcom_icc_bcm bcm_sh0_cam_ife_2 = { · 7 unmodified lines
17701786
17711787 static struct qcom_icc_bcm bcm_sh1_cam_ife_2 = {
17721788 .name = "SH1",
1789+ .enable_mask = 0x1,
17731790 .num_nodes = 3,
17741791 .nodes = { &qnm_mnoc_hf_cam_ife_2, &qnm_mnoc_sf_cam_ife_2,
17751792 &qnm_pcie_cam_ife_2 },
drivers/iommu/iommufd/device.c+2−8
@@ -275,10 +275,7 @@ EXPORT_SYMBOL_NS_GPL(iommufd_ctx_has_group, IOMMUFD); · 274 unmodified lines
275275 */
276276 void iommufd_device_unbind(struct iommufd_device *idev)
277277 {
278− bool was_destroyed;
279−
280− was_destroyed = iommufd_object_destroy_user(idev->ictx, &idev->obj);
281− WARN_ON(!was_destroyed);
278+ iommufd_object_destroy_user(idev->ictx, &idev->obj);
282279 }
283280 EXPORT_SYMBOL_NS_GPL(iommufd_device_unbind, IOMMUFD);
284281
@@ -814,10 +811,7 @@ EXPORT_SYMBOL_NS_GPL(iommufd_access_create, IOMMUFD); · 529 unmodified lines
814811 */
815812 void iommufd_access_destroy(struct iommufd_access *access)
816813 {
817− bool was_destroyed;
818−
819− was_destroyed = iommufd_object_destroy_user(access->ictx, &access->obj);
820− WARN_ON(!was_destroyed);
814+ iommufd_object_destroy_user(access->ictx, &access->obj);
821815 }
822816 EXPORT_SYMBOL_NS_GPL(iommufd_access_destroy, IOMMUFD);
823817
drivers/iommu/iommufd/iommufd_private.h+14−3
@@ -177,8 +177,19 @@ void iommufd_object_abort_and_destroy(struct iommufd_ctx *ictx, · 176 unmodified lines
177177 struct iommufd_object *obj);
178178 void iommufd_object_finalize(struct iommufd_ctx *ictx,
179179 struct iommufd_object *obj);
180−bool iommufd_object_destroy_user(struct iommufd_ctx *ictx,
181− struct iommufd_object *obj);
180+void __iommufd_object_destroy_user(struct iommufd_ctx *ictx,
181+ struct iommufd_object *obj, bool allow_fail);
182+static inline void iommufd_object_destroy_user(struct iommufd_ctx *ictx,
183+ struct iommufd_object *obj)
184+{
185+ __iommufd_object_destroy_user(ictx, obj, false);
186+}
187+static inline void iommufd_object_deref_user(struct iommufd_ctx *ictx,
188+ struct iommufd_object *obj)
189+{
190+ __iommufd_object_destroy_user(ictx, obj, true);
191+}
192+
182193 struct iommufd_object *_iommufd_object_alloc(struct iommufd_ctx *ictx,
183194 size_t size,
184195 enum iommufd_object_type type);
@@ -269,7 +280,7 @@ static inline void iommufd_hw_pagetable_put(struct iommufd_ctx *ictx, · 84 unmodified lines
269280 {
270281 lockdep_assert_not_held(&hwpt->ioas->mutex);
271282 if (hwpt->auto_domain)
272− iommufd_object_destroy_user(ictx, &hwpt->obj);
283+ iommufd_object_deref_user(ictx, &hwpt->obj);
273284 else
274285 refcount_dec(&hwpt->obj.users);
275286 }
drivers/iommu/iommufd/main.c+59−19
@@ -129,14 +129,56 @@ struct iommufd_object *iommufd_get_object(struct iommufd_ctx *ictx, u32 id, · 128 unmodified lines
129129 return obj;
130130 }
131131
132+/*
133+ * Remove the given object id from the xarray if the only reference to the
134+ * object is held by the xarray. The caller must call ops destroy().
135+ */
136+static struct iommufd_object *iommufd_object_remove(struct iommufd_ctx *ictx,
137+ u32 id, bool extra_put)
138+{
139+ struct iommufd_object *obj;
140+ XA_STATE(xas, &ictx->objects, id);
141+
142+ xa_lock(&ictx->objects);
143+ obj = xas_load(&xas);
144+ if (xa_is_zero(obj) || !obj) {
145+ obj = ERR_PTR(-ENOENT);
146+ goto out_xa;
147+ }
148+
149+ /*
150+ * If the caller is holding a ref on obj we put it here under the
151+ * spinlock.
152+ */
153+ if (extra_put)
154+ refcount_dec(&obj->users);
155+
156+ if (!refcount_dec_if_one(&obj->users)) {
157+ obj = ERR_PTR(-EBUSY);
158+ goto out_xa;
159+ }
160+
161+ xas_store(&xas, NULL);
162+ if (ictx->vfio_ioas == container_of(obj, struct iommufd_ioas, obj))
163+ ictx->vfio_ioas = NULL;
164+
165+out_xa:
166+ xa_unlock(&ictx->objects);
167+
168+ /* The returned object reference count is zero */
169+ return obj;
170+}
171+
132172 /*
133173 * The caller holds a users refcount and wants to destroy the object. Returns
134174 * true if the object was destroyed. In all cases the caller no longer has a
135175 * reference on obj.
136176 */
137−bool iommufd_object_destroy_user(struct iommufd_ctx *ictx,
138− struct iommufd_object *obj)
177+void __iommufd_object_destroy_user(struct iommufd_ctx *ictx,
178+ struct iommufd_object *obj, bool allow_fail)
139179 {
180+ struct iommufd_object *ret;
181+
140182 /*
141183 * The purpose of the destroy_rwsem is to ensure deterministic
142184 * destruction of objects used by external drivers and destroyed by this
@@ -144,22 +186,22 @@ bool iommufd_object_destroy_user(struct iommufd_ctx *ictx, · 1 unmodified line
144186 * side of this, such as during ioctl execution.
145187 */
146188 down_write(&obj->destroy_rwsem);
147− xa_lock(&ictx->objects);
148− refcount_dec(&obj->users);
149− if (!refcount_dec_if_one(&obj->users)) {
150− xa_unlock(&ictx->objects);
151− up_write(&obj->destroy_rwsem);
152− return false;
153− }
154− __xa_erase(&ictx->objects, obj->id);
155− if (ictx->vfio_ioas && &ictx->vfio_ioas->obj == obj)
156− ictx->vfio_ioas = NULL;
157− xa_unlock(&ictx->objects);
189+ ret = iommufd_object_remove(ictx, obj->id, true);
158190 up_write(&obj->destroy_rwsem);
159191
192+ if (allow_fail && IS_ERR(ret))
193+ return;
194+
195+ /*
196+ * If there is a bug and we couldn't destroy the object then we did put
197+ * back the caller's refcount and will eventually try to free it again
198+ * during close.
199+ */
200+ if (WARN_ON(IS_ERR(ret)))
201+ return;
202+
160203 iommufd_object_ops[obj->type].destroy(obj);
161204 kfree(obj);
162− return true;
163205 }
164206
165207 static int iommufd_destroy(struct iommufd_ucmd *ucmd)
@@ -167,13 +209,11 @@ static int iommufd_destroy(struct iommufd_ucmd *ucmd) · 1 unmodified line
167209 struct iommu_destroy *cmd = ucmd->cmd;
168210 struct iommufd_object *obj;
169211
170− obj = iommufd_get_object(ucmd->ictx, cmd->id, IOMMUFD_OBJ_ANY);
212+ obj = iommufd_object_remove(ucmd->ictx, cmd->id, false);
171213 if (IS_ERR(obj))
172214 return PTR_ERR(obj);
173− iommufd_ref_to_users(obj);
174− /* See iommufd_ref_to_users() */
175− if (!iommufd_object_destroy_user(ucmd->ictx, obj))
176− return -EBUSY;
215+ iommufd_object_ops[obj->type].destroy(obj);
216+ kfree(obj);
177217 return 0;
178218 }
179219
drivers/iommu/iommufd/pages.c+1−1
@@ -297,7 +297,7 @@ static void batch_clear_carry(struct pfn_batch *batch, unsigned int keep_pfns) · 296 unmodified lines
297297 batch->pfns[0] = batch->pfns[batch->end - 1] +
298298 (batch->npfns[batch->end - 1] - keep_pfns);
299299 batch->npfns[0] = keep_pfns;
300− batch->end = 0;
300+ batch->end = 1;
301301 }
302302
303303 static void batch_skip_carry(struct pfn_batch *batch, unsigned int skip_pfns)
drivers/irqchip/irq-bcm6345-l1.c+5−9
@@ -82,6 +82,7 @@ struct bcm6345_l1_chip { · 81 unmodified lines
8282 };
8383
8484 struct bcm6345_l1_cpu {
85+ struct bcm6345_l1_chip *intc;
8586 void __iomem *map_base;
8687 unsigned int parent_irq;
8788 u32 enable_cache[];
@@ -115,17 +116,11 @@ static inline unsigned int cpu_for_irq(struct bcm6345_l1_chip *intc, · 27 unmodified lines
115116
116117 static void bcm6345_l1_irq_handle(struct irq_desc *desc)
117118 {
118− struct bcm6345_l1_chip *intc = irq_desc_get_handler_data(desc);
119− struct bcm6345_l1_cpu *cpu;
119+ struct bcm6345_l1_cpu *cpu = irq_desc_get_handler_data(desc);
120+ struct bcm6345_l1_chip *intc = cpu->intc;
120121 struct irq_chip *chip = irq_desc_get_chip(desc);
121122 unsigned int idx;
122123
123−#ifdef CONFIG_SMP
124− cpu = intc->cpus[cpu_logical_map(smp_processor_id())];
125−#else
126− cpu = intc->cpus[0];
127−#endif
128−
129124 chained_irq_enter(chip, desc);
130125
131126 for (idx = 0; idx < intc->n_words; idx++) {
@@ -253,6 +248,7 @@ static int __init bcm6345_l1_init_one(struct device_node *dn, · 121 unmodified lines
253248 if (!cpu)
254249 return -ENOMEM;
255250
251+ cpu->intc = intc;
256252 cpu->map_base = ioremap(res.start, sz);
257253 if (!cpu->map_base)
258254 return -ENOMEM;
@@ -271,7 +267,7 @@ static int __init bcm6345_l1_init_one(struct device_node *dn, · 12 unmodified lines
271267 return -EINVAL;
272268 }
273269 irq_set_chained_handler_and_data(cpu->parent_irq,
274− bcm6345_l1_irq_handle, intc);
270+ bcm6345_l1_irq_handle, cpu);
275271
276272 return 0;
277273 }
drivers/irqchip/irq-gic-v3-its.c+48−30
@@ -273,13 +273,23 @@ static void vpe_to_cpuid_unlock(struct its_vpe *vpe, unsigned long flags) · 272 unmodified lines
273273 raw_spin_unlock_irqrestore(&vpe->vpe_lock, flags);
274274 }
275275
276+static struct irq_chip its_vpe_irq_chip;
277+
276278 static int irq_to_cpuid_lock(struct irq_data *d, unsigned long *flags)
277279 {
278− struct its_vlpi_map *map = get_vlpi_map(d);
280+ struct its_vpe *vpe = NULL;
279281 int cpu;
280282
281− if (map) {
282− cpu = vpe_to_cpuid_lock(map->vpe, flags);
283+ if (d->chip == &its_vpe_irq_chip) {
284+ vpe = irq_data_get_irq_chip_data(d);
285+ } else {
286+ struct its_vlpi_map *map = get_vlpi_map(d);
287+ if (map)
288+ vpe = map->vpe;
289+ }
290+
291+ if (vpe) {
292+ cpu = vpe_to_cpuid_lock(vpe, flags);
283293 } else {
284294 /* Physical LPIs are already locked via the irq_desc lock */
285295 struct its_device *its_dev = irq_data_get_irq_chip_data(d);
@@ -293,10 +303,18 @@ static int irq_to_cpuid_lock(struct irq_data *d, unsigned long *flags) · 7 unmodified lines
293303
294304 static void irq_to_cpuid_unlock(struct irq_data *d, unsigned long flags)
295305 {
296− struct its_vlpi_map *map = get_vlpi_map(d);
306+ struct its_vpe *vpe = NULL;
307+
308+ if (d->chip == &its_vpe_irq_chip) {
309+ vpe = irq_data_get_irq_chip_data(d);
310+ } else {
311+ struct its_vlpi_map *map = get_vlpi_map(d);
312+ if (map)
313+ vpe = map->vpe;
314+ }
297315
298− if (map)
299− vpe_to_cpuid_unlock(map->vpe, flags);
316+ if (vpe)
317+ vpe_to_cpuid_unlock(vpe, flags);
300318 }
301319
302320 static struct its_collection *valid_col(struct its_collection *col)
@@ -1433,14 +1451,29 @@ static void wait_for_syncr(void __iomem *rdbase) · 1130 unmodified lines
14331451 cpu_relax();
14341452 }
14351453
1436−static void direct_lpi_inv(struct irq_data *d)
1454+static void __direct_lpi_inv(struct irq_data *d, u64 val)
14371455 {
1438− struct its_vlpi_map *map = get_vlpi_map(d);
14391456 void __iomem *rdbase;
14401457 unsigned long flags;
1441− u64 val;
14421458 int cpu;
14431459
1460+ /* Target the redistributor this LPI is currently routed to */
1461+ cpu = irq_to_cpuid_lock(d, &flags);
1462+ raw_spin_lock(&gic_data_rdist_cpu(cpu)->rd_lock);
1463+
1464+ rdbase = per_cpu_ptr(gic_rdists->rdist, cpu)->rd_base;
1465+ gic_write_lpir(val, rdbase + GICR_INVLPIR);
1466+ wait_for_syncr(rdbase);
1467+
1468+ raw_spin_unlock(&gic_data_rdist_cpu(cpu)->rd_lock);
1469+ irq_to_cpuid_unlock(d, flags);
1470+}
1471+
1472+static void direct_lpi_inv(struct irq_data *d)
1473+{
1474+ struct its_vlpi_map *map = get_vlpi_map(d);
1475+ u64 val;
1476+
14441477 if (map) {
14451478 struct its_device *its_dev = irq_data_get_irq_chip_data(d);
14461479
@@ -1453,15 +1486,7 @@ static void direct_lpi_inv(struct irq_data *d) · 6 unmodified lines
14531486 val = d->hwirq;
14541487 }
14551488
1456− /* Target the redistributor this LPI is currently routed to */
1457− cpu = irq_to_cpuid_lock(d, &flags);
1458− raw_spin_lock(&gic_data_rdist_cpu(cpu)->rd_lock);
1459− rdbase = per_cpu_ptr(gic_rdists->rdist, cpu)->rd_base;
1460− gic_write_lpir(val, rdbase + GICR_INVLPIR);
1461−
1462− wait_for_syncr(rdbase);
1463− raw_spin_unlock(&gic_data_rdist_cpu(cpu)->rd_lock);
1464− irq_to_cpuid_unlock(d, flags);
1489+ __direct_lpi_inv(d, val);
14651490 }
14661491
14671492 static void lpi_update_config(struct irq_data *d, u8 clr, u8 set)
@@ -3953,18 +3978,10 @@ static void its_vpe_send_inv(struct irq_data *d) · 2485 unmodified lines
39533978 {
39543979 struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
39553980
3956− if (gic_rdists->has_direct_lpi) {
3957− void __iomem *rdbase;
3958−
3959− /* Target the redistributor this VPE is currently known on */
3960− raw_spin_lock(&gic_data_rdist_cpu(vpe->col_idx)->rd_lock);
3961− rdbase = per_cpu_ptr(gic_rdists->rdist, vpe->col_idx)->rd_base;
3962− gic_write_lpir(d->parent_data->hwirq, rdbase + GICR_INVLPIR);
3963− wait_for_syncr(rdbase);
3964− raw_spin_unlock(&gic_data_rdist_cpu(vpe->col_idx)->rd_lock);
3965− } else {
3981+ if (gic_rdists->has_direct_lpi)
3982+ __direct_lpi_inv(d, d->parent_data->hwirq);
3983+ else
39663984 its_vpe_send_cmd(vpe, its_send_inv);
3967− }
39683985 }
39693986
39703987 static void its_vpe_mask_irq(struct irq_data *d)
@@ -4727,7 +4744,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) · 756 unmodified lines
47274744 {
47284745 struct its_node *its = data;
47294746
4730− if (!of_machine_is_compatible("rockchip,rk3588"))
4747+ if (!of_machine_is_compatible("rockchip,rk3588") &&
4748+ !of_machine_is_compatible("rockchip,rk3588s"))
47314749 return false;
47324750
47334751 its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
drivers/irqchip/irq-gic-v3.c+61−1
@@ -69,6 +69,8 @@ struct gic_chip_data { · 68 unmodified lines
6969 static void __iomem *t241_dist_base_alias[T241_CHIPS_MAX] __read_mostly;
7070 static DEFINE_STATIC_KEY_FALSE(gic_nvidia_t241_erratum);
7171
72+static DEFINE_STATIC_KEY_FALSE(gic_arm64_2941627_erratum);
73+
7274 static struct gic_chip_data gic_data __read_mostly;
7375 static DEFINE_STATIC_KEY_TRUE(supports_deactivate_key);
7476
@@ -592,10 +594,39 @@ static void gic_irq_nmi_teardown(struct irq_data *d) · 517 unmodified lines
592594 gic_irq_set_prio(d, GICD_INT_DEF_PRI);
593595 }
594596
597+static bool gic_arm64_erratum_2941627_needed(struct irq_data *d)
598+{
599+ enum gic_intid_range range;
600+
601+ if (!static_branch_unlikely(&gic_arm64_2941627_erratum))
602+ return false;
603+
604+ range = get_intid_range(d);
605+
606+ /*
607+ * The workaround is needed if the IRQ is an SPI and
608+ * the target cpu is different from the one we are
609+ * executing on.
610+ */
611+ return (range == SPI_RANGE || range == ESPI_RANGE) &&
612+ !cpumask_test_cpu(raw_smp_processor_id(),
613+ irq_data_get_effective_affinity_mask(d));
614+}
615+
595616 static void gic_eoi_irq(struct irq_data *d)
596617 {
597618 write_gicreg(gic_irq(d), ICC_EOIR1_EL1);
598619 isb();
620+
621+ if (gic_arm64_erratum_2941627_needed(d)) {
622+ /*
623+ * Make sure the GIC stream deactivate packet
624+ * issued by ICC_EOIR1_EL1 has completed before
625+ * deactivating through GICD_IACTIVER.
626+ */
627+ dsb(sy);
628+ gic_poke_irq(d, GICD_ICACTIVER);
629+ }
599630 }
600631
601632 static void gic_eoimode1_eoi_irq(struct irq_data *d)
@@ -606,7 +637,11 @@ static void gic_eoimode1_eoi_irq(struct irq_data *d) · 4 unmodified lines
606637 */
607638 if (gic_irq(d) >= 8192 || irqd_is_forwarded_to_vcpu(d))
608639 return;
609− gic_write_dir(gic_irq(d));
640+
641+ if (!gic_arm64_erratum_2941627_needed(d))
642+ gic_write_dir(gic_irq(d));
643+ else
644+ gic_poke_irq(d, GICD_ICACTIVER);
610645 }
611646
612647 static int gic_set_type(struct irq_data *d, unsigned int type)
@@ -1816,6 +1851,12 @@ static bool gic_enable_quirk_asr8601(void *data) · 1203 unmodified lines
18161851 return true;
18171852 }
18181853
1854+static bool gic_enable_quirk_arm64_2941627(void *data)
1855+{
1856+ static_branch_enable(&gic_arm64_2941627_erratum);
1857+ return true;
1858+}
1859+
18191860 static const struct gic_quirk gic_quirks[] = {
18201861 {
18211862 .desc = "GICv3: Qualcomm MSM8996 broken firmware",
@@ -1863,6 +1904,25 @@ static const struct gic_quirk gic_quirks[] = { · 41 unmodified lines
18631904 .mask = 0xffffffff,
18641905 .init = gic_enable_quirk_nvidia_t241,
18651906 },
1907+ {
1908+ /*
1909+ * GIC-700: 2941627 workaround - IP variant [0,1]
1910+ *
1911+ */
1912+ .desc = "GICv3: ARM64 erratum 2941627",
1913+ .iidr = 0x0400043b,
1914+ .mask = 0xff0e0fff,
1915+ .init = gic_enable_quirk_arm64_2941627,
1916+ },
1917+ {
1918+ /*
1919+ * GIC-700: 2941627 workaround - IP variant [2]
1920+ */
1921+ .desc = "GICv3: ARM64 erratum 2941627",
1922+ .iidr = 0x0402043b,
1923+ .mask = 0xff0f0fff,
1924+ .init = gic_enable_quirk_arm64_2941627,
1925+ },
18661926 {
18671927 }
18681928 };
drivers/isdn/hardware/mISDN/hfcpci.c+5−5
@@ -839,7 +839,7 @@ hfcpci_fill_fifo(struct bchannel *bch) · 838 unmodified lines
839839 *z1t = cpu_to_le16(new_z1); /* now send data */
840840 if (bch->tx_idx < bch->tx_skb->len)
841841 return;
842− dev_kfree_skb(bch->tx_skb);
842+ dev_kfree_skb_any(bch->tx_skb);
843843 if (get_next_bframe(bch))
844844 goto next_t_frame;
845845 return;
@@ -895,7 +895,7 @@ hfcpci_fill_fifo(struct bchannel *bch) · 49 unmodified lines
895895 }
896896 bz->za[new_f1].z1 = cpu_to_le16(new_z1); /* for next buffer */
897897 bz->f1 = new_f1; /* next frame */
898− dev_kfree_skb(bch->tx_skb);
898+ dev_kfree_skb_any(bch->tx_skb);
899899 get_next_bframe(bch);
900900 }
901901
@@ -1119,7 +1119,7 @@ tx_birq(struct bchannel *bch) · 217 unmodified lines
11191119 if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len)
11201120 hfcpci_fill_fifo(bch);
11211121 else {
1122− dev_kfree_skb(bch->tx_skb);
1122+ dev_kfree_skb_any(bch->tx_skb);
11231123 if (get_next_bframe(bch))
11241124 hfcpci_fill_fifo(bch);
11251125 }
@@ -2277,7 +2277,7 @@ _hfcpci_softirq(struct device *dev, void *unused) · 1151 unmodified lines
22772277 return 0;
22782278
22792279 if (hc->hw.int_m2 & HFCPCI_IRQ_ENABLE) {
2280− spin_lock(&hc->lock);
2280+ spin_lock_irq(&hc->lock);
22812281 bch = Sel_BCS(hc, hc->hw.bswapped ? 2 : 1);
22822282 if (bch && bch->state == ISDN_P_B_RAW) { /* B1 rx&tx */
22832283 main_rec_hfcpci(bch);
@@ -2288,7 +2288,7 @@ _hfcpci_softirq(struct device *dev, void *unused) · 4 unmodified lines
22882288 main_rec_hfcpci(bch);
22892289 tx_birq(bch);
22902290 }
2291− spin_unlock(&hc->lock);
2291+ spin_unlock_irq(&hc->lock);
22922292 }
22932293 return 0;
22942294 }
drivers/isdn/mISDN/dsp.h+1−1
@@ -247,7 +247,7 @@ extern void dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp); · 246 unmodified lines
247247 extern int dsp_cmx_conf(struct dsp *dsp, u32 conf_id);
248248 extern void dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb);
249249 extern void dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb);
250−extern void dsp_cmx_send(void *arg);
250+extern void dsp_cmx_send(struct timer_list *arg);
251251 extern void dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb);
252252 extern int dsp_cmx_del_conf_member(struct dsp *dsp);
253253 extern int dsp_cmx_del_conf(struct dsp_conf *conf);
drivers/isdn/mISDN/dsp_cmx.c+1−1
@@ -1614,7 +1614,7 @@ static u16 dsp_count; /* last sample count */ · 1613 unmodified lines
16141614 static int dsp_count_valid; /* if we have last sample count */
16151615
16161616 void
1617−dsp_cmx_send(void *arg)
1617+dsp_cmx_send(struct timer_list *arg)
16181618 {
16191619 struct dsp_conf *conf;
16201620 struct dsp_conf_member *member;
drivers/isdn/mISDN/dsp_core.c+1−1
@@ -1195,7 +1195,7 @@ static int __init dsp_init(void) · 1194 unmodified lines
11951195 }
11961196
11971197 /* set sample timer */
1198− timer_setup(&dsp_spl_tl, (void *)dsp_cmx_send, 0);
1198+ timer_setup(&dsp_spl_tl, dsp_cmx_send, 0);
11991199 dsp_spl_tl.expires = jiffies + dsp_tics;
12001200 dsp_spl_jiffies = dsp_spl_tl.expires;
12011201 add_timer(&dsp_spl_tl);
drivers/md/dm-cache-policy-smq.c+18−10
@@ -857,7 +857,13 @@ struct smq_policy { · 856 unmodified lines
857857
858858 struct background_tracker *bg_work;
859859
860− bool migrations_allowed;
860+ bool migrations_allowed:1;
861+
862+ /*
863+ * If this is set the policy will try and clean the whole cache
864+ * even if the device is not idle.
865+ */
866+ bool cleaner:1;
861867 };
862868
863869 /*----------------------------------------------------------------*/
@@ -1138,7 +1144,7 @@ static bool clean_target_met(struct smq_policy *mq, bool idle) · 274 unmodified lines
11381144 * Cache entries may not be populated. So we cannot rely on the
11391145 * size of the clean queue.
11401146 */
1141− if (idle) {
1147+ if (idle || mq->cleaner) {
11421148 /*
11431149 * We'd like to clean everything.
11441150 */
@@ -1722,11 +1728,9 @@ static void calc_hotspot_params(sector_t origin_size, · 577 unmodified lines
17221728 *hotspot_block_size /= 2u;
17231729 }
17241730
1725−static struct dm_cache_policy *__smq_create(dm_cblock_t cache_size,
1726− sector_t origin_size,
1727− sector_t cache_block_size,
1728− bool mimic_mq,
1729− bool migrations_allowed)
1731+static struct dm_cache_policy *
1732+__smq_create(dm_cblock_t cache_size, sector_t origin_size, sector_t cache_block_size,
1733+ bool mimic_mq, bool migrations_allowed, bool cleaner)
17301734 {
17311735 unsigned int i;
17321736 unsigned int nr_sentinels_per_queue = 2u * NR_CACHE_LEVELS;
@@ -1813,6 +1817,7 @@ static struct dm_cache_policy *__smq_create(dm_cblock_t cache_size, · 80 unmodified lines
18131817 goto bad_btracker;
18141818
18151819 mq->migrations_allowed = migrations_allowed;
1820+ mq->cleaner = cleaner;
18161821
18171822 return &mq->policy;
18181823
@@ -1836,21 +1841,24 @@ static struct dm_cache_policy *smq_create(dm_cblock_t cache_size, · 17 unmodified lines
18361841 sector_t origin_size,
18371842 sector_t cache_block_size)
18381843 {
1839− return __smq_create(cache_size, origin_size, cache_block_size, false, true);
1844+ return __smq_create(cache_size, origin_size, cache_block_size,
1845+ false, true, false);
18401846 }
18411847
18421848 static struct dm_cache_policy *mq_create(dm_cblock_t cache_size,
18431849 sector_t origin_size,
18441850 sector_t cache_block_size)
18451851 {
1846− return __smq_create(cache_size, origin_size, cache_block_size, true, true);
1852+ return __smq_create(cache_size, origin_size, cache_block_size,
1853+ true, true, false);
18471854 }
18481855
18491856 static struct dm_cache_policy *cleaner_create(dm_cblock_t cache_size,
18501857 sector_t origin_size,
18511858 sector_t cache_block_size)
18521859 {
1853− return __smq_create(cache_size, origin_size, cache_block_size, false, false);
1860+ return __smq_create(cache_size, origin_size, cache_block_size,
1861+ false, false, true);
18541862 }
18551863
18561864 /*----------------------------------------------------------------*/
drivers/md/dm-integrity.c+1−0
@@ -2676,6 +2676,7 @@ oom: · 2675 unmodified lines
26762676 recalc_tags = kvmalloc(recalc_tags_size, GFP_NOIO);
26772677 if (!recalc_tags) {
26782678 vfree(recalc_buffer);
2679+ recalc_buffer = NULL;
26792680 goto oom;
26802681 }
26812682
drivers/md/dm-raid.c+9−11
@@ -3251,8 +3251,7 @@ size_check: · 3250 unmodified lines
32513251 r = md_start(&rs->md);
32523252 if (r) {
32533253 ti->error = "Failed to start raid array";
3254− mddev_unlock(&rs->md);
3255− goto bad_md_start;
3254+ goto bad_unlock;
32563255 }
32573256
32583257 /* If raid4/5/6 journal mode explicitly requested (only possible with journal dev) -> set it */
@@ -3260,8 +3259,7 @@ size_check: · 1 unmodified line
32603259 r = r5c_journal_mode_set(&rs->md, rs->journal_dev.mode);
32613260 if (r) {
32623261 ti->error = "Failed to set raid4/5/6 journal mode";
3263− mddev_unlock(&rs->md);
3264− goto bad_journal_mode_set;
3262+ goto bad_unlock;
32653263 }
32663264 }
32673265
@@ -3272,14 +3270,14 @@ size_check: · 4 unmodified lines
32723270 if (rs_is_raid456(rs)) {
32733271 r = rs_set_raid456_stripe_cache(rs);
32743272 if (r)
3275− goto bad_stripe_cache;
3273+ goto bad_unlock;
32763274 }
32773275
32783276 /* Now do an early reshape check */
32793277 if (test_bit(RT_FLAG_RESHAPE_RS, &rs->runtime_flags)) {
32803278 r = rs_check_reshape(rs);
32813279 if (r)
3282− goto bad_check_reshape;
3280+ goto bad_unlock;
32833281
32843282 /* Restore new, ctr requested layout to perform check */
32853283 rs_config_restore(rs, &rs_layout);
@@ -3288,7 +3286,7 @@ size_check: · 2 unmodified lines
32883286 r = rs->md.pers->check_reshape(&rs->md);
32893287 if (r) {
32903288 ti->error = "Reshape check failed";
3291− goto bad_check_reshape;
3289+ goto bad_unlock;
32923290 }
32933291 }
32943292 }
@@ -3299,11 +3297,9 @@ size_check: · 4 unmodified lines
32993297 mddev_unlock(&rs->md);
33003298 return 0;
33013299
3302−bad_md_start:
3303−bad_journal_mode_set:
3304−bad_stripe_cache:
3305−bad_check_reshape:
3300+bad_unlock:
33063301 md_stop(&rs->md);
3302+ mddev_unlock(&rs->md);
33073303 bad:
33083304 raid_set_free(rs);
33093305
@@ -3314,7 +3310,9 @@ static void raid_dtr(struct dm_target *ti) · 4 unmodified lines
33143310 {
33153311 struct raid_set *rs = ti->private;
33163312
3313+ mddev_lock_nointr(&rs->md);
33173314 md_stop(&rs->md);
3315+ mddev_unlock(&rs->md);
33183316 raid_set_free(rs);
33193317 }
33203318
drivers/md/md.c+2−0
@@ -6247,6 +6247,8 @@ static void __md_stop(struct mddev *mddev) · 6246 unmodified lines
62476247
62486248 void md_stop(struct mddev *mddev)
62496249 {
6250+ lockdep_assert_held(&mddev->reconfig_mutex);
6251+
62506252 /* stop the array and free an attached data structures.
62516253 * This is called from dm-raid
62526254 */
drivers/media/cec/usb/pulse8/pulse8-cec.c+5−2
@@ -809,8 +809,11 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work) · 808 unmodified lines
809809
810810 mutex_lock(&pulse8->lock);
811811 cmd = MSGCODE_PING;
812− pulse8_send_and_wait(pulse8, &cmd, 1,
813− MSGCODE_COMMAND_ACCEPTED, 0);
812+ if (pulse8_send_and_wait(pulse8, &cmd, 1,
813+ MSGCODE_COMMAND_ACCEPTED, 0)) {
814+ dev_warn(pulse8->dev, "failed to ping EEPROM\n");
815+ goto unlock;
816+ }
814817
815818 if (pulse8->vers < 2)
816819 goto unlock;
drivers/media/i2c/tc358746.c+2−2
@@ -813,8 +813,8 @@ static unsigned long tc358746_find_pll_settings(struct tc358746 *tc358746, · 812 unmodified lines
813813 u32 min_delta = 0xffffffff;
814814 u16 prediv_max = 17;
815815 u16 prediv_min = 1;
816− u16 m_best, mul;
817− u16 p_best, p;
816+ u16 m_best = 0, mul;
817+ u16 p_best = 1, p;
818818 u8 postdiv;
819819
820820 if (fout > 1000 * HZ_PER_MHZ) {
drivers/media/pci/cx23885/cx23885-dvb.c+0−12
@@ -2459,16 +2459,10 @@ static int dvb_register(struct cx23885_tsport *port) · 2458 unmodified lines
24592459 request_module("%s", info.type);
24602460 client_tuner = i2c_new_client_device(&dev->i2c_bus[1].i2c_adap, &info);
24612461 if (!i2c_client_has_driver(client_tuner)) {
2462− module_put(client_demod->dev.driver->owner);
2463− i2c_unregister_device(client_demod);
2464− port->i2c_client_demod = NULL;
24652462 goto frontend_detach;
24662463 }
24672464 if (!try_module_get(client_tuner->dev.driver->owner)) {
24682465 i2c_unregister_device(client_tuner);
2469− module_put(client_demod->dev.driver->owner);
2470− i2c_unregister_device(client_demod);
2471− port->i2c_client_demod = NULL;
24722466 goto frontend_detach;
24732467 }
24742468 port->i2c_client_tuner = client_tuner;
@@ -2505,16 +2499,10 @@ static int dvb_register(struct cx23885_tsport *port) · 30 unmodified lines
25052499 request_module("%s", info.type);
25062500 client_tuner = i2c_new_client_device(&dev->i2c_bus[1].i2c_adap, &info);
25072501 if (!i2c_client_has_driver(client_tuner)) {
2508− module_put(client_demod->dev.driver->owner);
2509− i2c_unregister_device(client_demod);
2510− port->i2c_client_demod = NULL;
25112502 goto frontend_detach;
25122503 }
25132504 if (!try_module_get(client_tuner->dev.driver->owner)) {
25142505 i2c_unregister_device(client_tuner);
2515− module_put(client_demod->dev.driver->owner);
2516− i2c_unregister_device(client_demod);
2517− port->i2c_client_demod = NULL;
25182506 goto frontend_detach;
25192507 }
25202508 port->i2c_client_tuner = client_tuner;
drivers/media/platform/amphion/vpu_core.c+2−2
@@ -826,7 +826,7 @@ static const struct dev_pm_ops vpu_core_pm_ops = { · 825 unmodified lines
826826
827827 static struct vpu_core_resources imx8q_enc = {
828828 .type = VPU_CORE_TYPE_ENC,
829− .fwname = "vpu/vpu_fw_imx8_enc.bin",
829+ .fwname = "amphion/vpu/vpu_fw_imx8_enc.bin",
830830 .stride = 16,
831831 .max_width = 1920,
832832 .max_height = 1920,
@@ -841,7 +841,7 @@ static struct vpu_core_resources imx8q_enc = { · 8 unmodified lines
841841
842842 static struct vpu_core_resources imx8q_dec = {
843843 .type = VPU_CORE_TYPE_DEC,
844− .fwname = "vpu/vpu_fw_imx8_dec.bin",
844+ .fwname = "amphion/vpu/vpu_fw_imx8_dec.bin",
845845 .stride = 256,
846846 .max_width = 8188,
847847 .max_height = 8188,
drivers/media/platform/amphion/vpu_mbox.c+4−5
@@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device *dev, struct vpu_mbox *mbox) · 45 unmodified lines
4646 cl->rx_callback = vpu_mbox_rx_callback;
4747
4848 ch = mbox_request_channel_byname(cl, mbox->name);
49− if (IS_ERR(ch)) {
50− dev_err(dev, "Failed to request mbox chan %s, ret : %ld\n",
51− mbox->name, PTR_ERR(ch));
52− return PTR_ERR(ch);
53− }
49+ if (IS_ERR(ch))
50+ return dev_err_probe(dev, PTR_ERR(ch),
51+ "Failed to request mbox chan %s\n",
52+ mbox->name);
5453
5554 mbox->ch = ch;
5655 return 0;
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c+1−5
@@ -28,7 +28,6 @@ · 27 unmodified lines
2828 #include "mtk_jpeg_core.h"
2929 #include "mtk_jpeg_dec_parse.h"
3030
31−#if defined(CONFIG_OF)
3231 static struct mtk_jpeg_fmt mtk_jpeg_enc_formats[] = {
3332 {
3433 .fourcc = V4L2_PIX_FMT_JPEG,
@@ -102,7 +101,6 @@ static struct mtk_jpeg_fmt mtk_jpeg_dec_formats[] = { · 67 unmodified lines
102101 .flags = MTK_JPEG_FMT_FLAG_CAPTURE,
103102 },
104103 };
105−#endif
106104
107105 #define MTK_JPEG_ENC_NUM_FORMATS ARRAY_SIZE(mtk_jpeg_enc_formats)
108106 #define MTK_JPEG_DEC_NUM_FORMATS ARRAY_SIZE(mtk_jpeg_dec_formats)
@@ -1455,7 +1453,6 @@ static const struct dev_pm_ops mtk_jpeg_pm_ops = { · 1346 unmodified lines
14551453 SET_RUNTIME_PM_OPS(mtk_jpeg_pm_suspend, mtk_jpeg_pm_resume, NULL)
14561454 };
14571455
1458−#if defined(CONFIG_OF)
14591456 static int mtk_jpegenc_get_hw(struct mtk_jpeg_ctx *ctx)
14601457 {
14611458 struct mtk_jpegenc_comp_dev *comp_jpeg;
@@ -1951,14 +1948,13 @@ static const struct of_device_id mtk_jpeg_match[] = { · 489 unmodified lines
19511948 };
19521949
19531950 MODULE_DEVICE_TABLE(of, mtk_jpeg_match);
1954−#endif
19551951
19561952 static struct platform_driver mtk_jpeg_driver = {
19571953 .probe = mtk_jpeg_probe,
19581954 .remove_new = mtk_jpeg_remove,
19591955 .driver = {
19601956 .name = MTK_JPEG_NAME,
1961− .of_match_table = of_match_ptr(mtk_jpeg_match),
1957+ .of_match_table = mtk_jpeg_match,
19621958 .pm = &mtk_jpeg_pm_ops,
19631959 },
19641960 };
drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c+1−3
@@ -39,7 +39,6 @@ enum mtk_jpeg_color { · 38 unmodified lines
3939 MTK_JPEG_COLOR_400 = 0x00110000
4040 };
4141
42−#if defined(CONFIG_OF)
4342 static const struct of_device_id mtk_jpegdec_hw_ids[] = {
4443 {
4544 .compatible = "mediatek,mt8195-jpgdec-hw",
@@ -47,7 +46,6 @@ static const struct of_device_id mtk_jpegdec_hw_ids[] = { · 1 unmodified line
4746 {},
4847 };
4948 MODULE_DEVICE_TABLE(of, mtk_jpegdec_hw_ids);
50−#endif
5149
5250 static inline int mtk_jpeg_verify_align(u32 val, int align, u32 reg)
5351 {
@@ -653,7 +651,7 @@ static struct platform_driver mtk_jpegdec_hw_driver = { · 599 unmodified lines
653651 .probe = mtk_jpegdec_hw_probe,
654652 .driver = {
655653 .name = "mtk-jpegdec-hw",
656− .of_match_table = of_match_ptr(mtk_jpegdec_hw_ids),
654+ .of_match_table = mtk_jpegdec_hw_ids,
657655 },
658656 };
659657
drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c+1−3
@@ -46,7 +46,6 @@ static const struct mtk_jpeg_enc_qlt mtk_jpeg_enc_quality[] = { · 45 unmodified lines
4646 {.quality_param = 97, .hardware_value = JPEG_ENC_QUALITY_Q97},
4747 };
4848
49−#if defined(CONFIG_OF)
5049 static const struct of_device_id mtk_jpegenc_drv_ids[] = {
5150 {
5251 .compatible = "mediatek,mt8195-jpgenc-hw",
@@ -54,7 +53,6 @@ static const struct of_device_id mtk_jpegenc_drv_ids[] = { · 1 unmodified line
5453 {},
5554 };
5655 MODULE_DEVICE_TABLE(of, mtk_jpegenc_drv_ids);
57−#endif
5856
5957 void mtk_jpeg_enc_reset(void __iomem *base)
6058 {
@@ -377,7 +375,7 @@ static struct platform_driver mtk_jpegenc_hw_driver = { · 316 unmodified lines
377375 .probe = mtk_jpegenc_hw_probe,
378376 .driver = {
379377 .name = "mtk-jpegenc-hw",
380− .of_match_table = of_match_ptr(mtk_jpegenc_drv_ids),
378+ .of_match_table = mtk_jpegenc_drv_ids,
381379 },
382380 };
383381
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c+2−1
@@ -233,7 +233,8 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue, · 232 unmodified lines
233233 kfree(lat_buf->private_data);
234234 }
235235
236− cancel_work_sync(&msg_queue->core_work);
236+ if (msg_queue->wdma_addr.size)
237+ cancel_work_sync(&msg_queue->core_work);
237238 }
238239
239240 static void vdec_msg_queue_core_work(struct work_struct *work)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h+0−1
@@ -58,7 +58,6 @@ · 57 unmodified lines
5858 #define CAST_OFBSIZE_LO CAST_STATUS18
5959 #define CAST_OFBSIZE_HI CAST_STATUS19
6060
61−#define MXC_MAX_SLOTS 1 /* TODO use all 4 slots*/
6261 /* JPEG-Decoder Wrapper Slot Registers 0..3 */
6362 #define SLOT_BASE 0x10000
6463 #define SLOT_STATUS 0x0
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c+65−70
@@ -745,87 +745,77 @@ static void notify_src_chg(struct mxc_jpeg_ctx *ctx) · 744 unmodified lines
745745 v4l2_event_queue_fh(&ctx->fh, &ev);
746746 }
747747
748−static int mxc_get_free_slot(struct mxc_jpeg_slot_data slot_data[], int n)
748+static int mxc_get_free_slot(struct mxc_jpeg_slot_data *slot_data)
749749 {
750− int free_slot = 0;
751−
752− while (slot_data[free_slot].used && free_slot < n)
753− free_slot++;
754−
755− return free_slot; /* >=n when there are no more free slots */
750+ if (!slot_data->used)
751+ return slot_data->slot;
752+ return -1;
756753 }
757754
758−static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg,
759− unsigned int slot)
755+static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg)
760756 {
761757 struct mxc_jpeg_desc *desc;
762758 struct mxc_jpeg_desc *cfg_desc;
763759 void *cfg_stm;
764760
765− if (jpeg->slot_data[slot].desc)
761+ if (jpeg->slot_data.desc)
766762 goto skip_alloc; /* already allocated, reuse it */
767763
768764 /* allocate descriptor for decoding/encoding phase */
769765 desc = dma_alloc_coherent(jpeg->dev,
770766 sizeof(struct mxc_jpeg_desc),
771− &jpeg->slot_data[slot].desc_handle,
767+ &jpeg->slot_data.desc_handle,
772768 GFP_ATOMIC);
773769 if (!desc)
774770 goto err;
775− jpeg->slot_data[slot].desc = desc;
771+ jpeg->slot_data.desc = desc;
776772
777773 /* allocate descriptor for configuration phase (encoder only) */
778774 cfg_desc = dma_alloc_coherent(jpeg->dev,
779775 sizeof(struct mxc_jpeg_desc),
780− &jpeg->slot_data[slot].cfg_desc_handle,
776+ &jpeg->slot_data.cfg_desc_handle,
781777 GFP_ATOMIC);
782778 if (!cfg_desc)
783779 goto err;
784− jpeg->slot_data[slot].cfg_desc = cfg_desc;
780+ jpeg->slot_data.cfg_desc = cfg_desc;
785781
786782 /* allocate configuration stream */
787783 cfg_stm = dma_alloc_coherent(jpeg->dev,
788784 MXC_JPEG_MAX_CFG_STREAM,
789− &jpeg->slot_data[slot].cfg_stream_handle,
785+ &jpeg->slot_data.cfg_stream_handle,
790786 GFP_ATOMIC);
791787 if (!cfg_stm)
792788 goto err;
793− jpeg->slot_data[slot].cfg_stream_vaddr = cfg_stm;
789+ jpeg->slot_data.cfg_stream_vaddr = cfg_stm;
794790
795791 skip_alloc:
796− jpeg->slot_data[slot].used = true;
792+ jpeg->slot_data.used = true;
797793
798794 return true;
799795 err:
800− dev_err(jpeg->dev, "Could not allocate descriptors for slot %d", slot);
796+ dev_err(jpeg->dev, "Could not allocate descriptors for slot %d", jpeg->slot_data.slot);
801797
802798 return false;
803799 }
804800
805−static void mxc_jpeg_free_slot_data(struct mxc_jpeg_dev *jpeg,
806− unsigned int slot)
801+static void mxc_jpeg_free_slot_data(struct mxc_jpeg_dev *jpeg)
807802 {
808− if (slot >= MXC_MAX_SLOTS) {
809− dev_err(jpeg->dev, "Invalid slot %d, nothing to free.", slot);
810− return;
811− }
812−
813803 /* free descriptor for decoding/encoding phase */
814804 dma_free_coherent(jpeg->dev, sizeof(struct mxc_jpeg_desc),
815− jpeg->slot_data[slot].desc,
816− jpeg->slot_data[slot].desc_handle);
805+ jpeg->slot_data.desc,
806+ jpeg->slot_data.desc_handle);
817807
818808 /* free descriptor for encoder configuration phase / decoder DHT */
819809 dma_free_coherent(jpeg->dev, sizeof(struct mxc_jpeg_desc),
820− jpeg->slot_data[slot].cfg_desc,
821− jpeg->slot_data[slot].cfg_desc_handle);
810+ jpeg->slot_data.cfg_desc,
811+ jpeg->slot_data.cfg_desc_handle);
822812
823813 /* free configuration stream */
824814 dma_free_coherent(jpeg->dev, MXC_JPEG_MAX_CFG_STREAM,
825− jpeg->slot_data[slot].cfg_stream_vaddr,
826− jpeg->slot_data[slot].cfg_stream_handle);
815+ jpeg->slot_data.cfg_stream_vaddr,
816+ jpeg->slot_data.cfg_stream_handle);
827817
828− jpeg->slot_data[slot].used = false;
818+ jpeg->slot_data.used = false;
829819 }
830820
831821 static void mxc_jpeg_check_and_set_last_buffer(struct mxc_jpeg_ctx *ctx,
@@ -855,7 +845,7 @@ static void mxc_jpeg_job_finish(struct mxc_jpeg_ctx *ctx, enum vb2_buffer_state · 23 unmodified lines
855845 v4l2_m2m_buf_done(dst_buf, state);
856846
857847 mxc_jpeg_disable_irq(reg, ctx->slot);
858− ctx->mxc_jpeg->slot_data[ctx->slot].used = false;
848+ jpeg->slot_data.used = false;
859849 if (reset)
860850 mxc_jpeg_sw_reset(reg);
861851 }
@@ -919,7 +909,7 @@ static irqreturn_t mxc_jpeg_dec_irq(int irq, void *priv) · 57 unmodified lines
919909 goto job_unlock;
920910 }
921911
922− if (!jpeg->slot_data[slot].used)
912+ if (!jpeg->slot_data.used)
923913 goto job_unlock;
924914
925915 dec_ret = readl(reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
@@ -1179,13 +1169,13 @@ static void mxc_jpeg_config_dec_desc(struct vb2_buffer *out_buf, · 253 unmodified lines
11791169 struct mxc_jpeg_dev *jpeg = ctx->mxc_jpeg;
11801170 void __iomem *reg = jpeg->base_reg;
11811171 unsigned int slot = ctx->slot;
1182− struct mxc_jpeg_desc *desc = jpeg->slot_data[slot].desc;
1183− struct mxc_jpeg_desc *cfg_desc = jpeg->slot_data[slot].cfg_desc;
1184− dma_addr_t desc_handle = jpeg->slot_data[slot].desc_handle;
1185− dma_addr_t cfg_desc_handle = jpeg->slot_data[slot].cfg_desc_handle;
1186− dma_addr_t cfg_stream_handle = jpeg->slot_data[slot].cfg_stream_handle;
1187− unsigned int *cfg_size = &jpeg->slot_data[slot].cfg_stream_size;
1188− void *cfg_stream_vaddr = jpeg->slot_data[slot].cfg_stream_vaddr;
1172+ struct mxc_jpeg_desc *desc = jpeg->slot_data.desc;
1173+ struct mxc_jpeg_desc *cfg_desc = jpeg->slot_data.cfg_desc;
1174+ dma_addr_t desc_handle = jpeg->slot_data.desc_handle;
1175+ dma_addr_t cfg_desc_handle = jpeg->slot_data.cfg_desc_handle;
1176+ dma_addr_t cfg_stream_handle = jpeg->slot_data.cfg_stream_handle;
1177+ unsigned int *cfg_size = &jpeg->slot_data.cfg_stream_size;
1178+ void *cfg_stream_vaddr = jpeg->slot_data.cfg_stream_vaddr;
11891179 struct mxc_jpeg_src_buf *jpeg_src_buf;
11901180
11911181 jpeg_src_buf = vb2_to_mxc_buf(src_buf);
@@ -1245,18 +1235,18 @@ static void mxc_jpeg_config_enc_desc(struct vb2_buffer *out_buf, · 53 unmodified lines
12451235 struct mxc_jpeg_dev *jpeg = ctx->mxc_jpeg;
12461236 void __iomem *reg = jpeg->base_reg;
12471237 unsigned int slot = ctx->slot;
1248− struct mxc_jpeg_desc *desc = jpeg->slot_data[slot].desc;
1249− struct mxc_jpeg_desc *cfg_desc = jpeg->slot_data[slot].cfg_desc;
1250− dma_addr_t desc_handle = jpeg->slot_data[slot].desc_handle;
1251− dma_addr_t cfg_desc_handle = jpeg->slot_data[slot].cfg_desc_handle;
1252− void *cfg_stream_vaddr = jpeg->slot_data[slot].cfg_stream_vaddr;
1238+ struct mxc_jpeg_desc *desc = jpeg->slot_data.desc;
1239+ struct mxc_jpeg_desc *cfg_desc = jpeg->slot_data.cfg_desc;
1240+ dma_addr_t desc_handle = jpeg->slot_data.desc_handle;
1241+ dma_addr_t cfg_desc_handle = jpeg->slot_data.cfg_desc_handle;
1242+ void *cfg_stream_vaddr = jpeg->slot_data.cfg_stream_vaddr;
12531243 struct mxc_jpeg_q_data *q_data;
12541244 enum mxc_jpeg_image_format img_fmt;
12551245 int w, h;
12561246
12571247 q_data = mxc_jpeg_get_q_data(ctx, src_buf->vb2_queue->type);
12581248
1259− jpeg->slot_data[slot].cfg_stream_size =
1249+ jpeg->slot_data.cfg_stream_size =
12601250 mxc_jpeg_setup_cfg_stream(cfg_stream_vaddr,
12611251 q_data->fmt->fourcc,
12621252 q_data->crop.width,
@@ -1265,7 +1255,7 @@ static void mxc_jpeg_config_enc_desc(struct vb2_buffer *out_buf, · 2 unmodified lines
12651255 /* chain the config descriptor with the encoding descriptor */
12661256 cfg_desc->next_descpt_ptr = desc_handle | MXC_NXT_DESCPT_EN;
12671257
1268− cfg_desc->buf_base0 = jpeg->slot_data[slot].cfg_stream_handle;
1258+ cfg_desc->buf_base0 = jpeg->slot_data.cfg_stream_handle;
12691259 cfg_desc->buf_base1 = 0;
12701260 cfg_desc->line_pitch = 0;
12711261 cfg_desc->stm_bufbase = 0; /* no output expected */
@@ -1408,7 +1398,7 @@ static void mxc_jpeg_device_run_timeout(struct work_struct *work) · 136 unmodified lines
14081398 unsigned long flags;
14091399
14101400 spin_lock_irqsave(&ctx->mxc_jpeg->hw_lock, flags);
1411− if (ctx->slot < MXC_MAX_SLOTS && ctx->mxc_jpeg->slot_data[ctx->slot].used) {
1401+ if (ctx->mxc_jpeg->slot_data.used) {
14121402 dev_warn(jpeg->dev, "%s timeout, cancel it\n",
14131403 ctx->mxc_jpeg->mode == MXC_JPEG_DECODE ? "decode" : "encode");
14141404 mxc_jpeg_job_finish(ctx, VB2_BUF_STATE_ERROR, true);
@@ -1476,12 +1466,12 @@ static void mxc_jpeg_device_run(void *priv) · 61 unmodified lines
14761466 mxc_jpeg_enable(reg);
14771467 mxc_jpeg_set_l_endian(reg, 1);
14781468
1479− ctx->slot = mxc_get_free_slot(jpeg->slot_data, MXC_MAX_SLOTS);
1480− if (ctx->slot >= MXC_MAX_SLOTS) {
1469+ ctx->slot = mxc_get_free_slot(&jpeg->slot_data);
1470+ if (ctx->slot < 0) {
14811471 dev_err(dev, "No more free slots\n");
14821472 goto end;
14831473 }
1484− if (!mxc_jpeg_alloc_slot_data(jpeg, ctx->slot)) {
1474+ if (!mxc_jpeg_alloc_slot_data(jpeg)) {
14851475 dev_err(dev, "Cannot allocate slot data\n");
14861476 goto end;
14871477 }
@@ -2101,7 +2091,7 @@ static int mxc_jpeg_open(struct file *file) · 613 unmodified lines
21012091 }
21022092 ctx->fh.ctrl_handler = &ctx->ctrl_handler;
21032093 mxc_jpeg_set_default_params(ctx);
2104− ctx->slot = MXC_MAX_SLOTS; /* slot not allocated yet */
2094+ ctx->slot = -1; /* slot not allocated yet */
21052095 INIT_DELAYED_WORK(&ctx->task_timer, mxc_jpeg_device_run_timeout);
21062096
21072097 if (mxc_jpeg->mode == MXC_JPEG_DECODE)
@@ -2677,6 +2667,11 @@ static int mxc_jpeg_attach_pm_domains(struct mxc_jpeg_dev *jpeg) · 569 unmodified lines
26772667 dev_err(dev, "No power domains defined for jpeg node\n");
26782668 return jpeg->num_domains;
26792669 }
2670+ if (jpeg->num_domains == 1) {
2671+ /* genpd_dev_pm_attach() attach automatically if power domains count is 1 */
2672+ jpeg->num_domains = 0;
2673+ return 0;
2674+ }
26802675
26812676 jpeg->pd_dev = devm_kmalloc_array(dev, jpeg->num_domains,
26822677 sizeof(*jpeg->pd_dev), GFP_KERNEL);
@@ -2718,7 +2713,6 @@ static int mxc_jpeg_probe(struct platform_device *pdev) · 35 unmodified lines
27182713 int ret;
27192714 int mode;
27202715 const struct of_device_id *of_id;
2721− unsigned int slot;
27222716
27232717 of_id = of_match_node(mxc_jpeg_match, dev->of_node);
27242718 if (!of_id)
@@ -2742,19 +2736,22 @@ static int mxc_jpeg_probe(struct platform_device *pdev) · 17 unmodified lines
27422736 if (IS_ERR(jpeg->base_reg))
27432737 return PTR_ERR(jpeg->base_reg);
27442738
2745− for (slot = 0; slot < MXC_MAX_SLOTS; slot++) {
2746− dec_irq = platform_get_irq(pdev, slot);
2747− if (dec_irq < 0) {
2748− ret = dec_irq;
2749− goto err_irq;
2750− }
2751− ret = devm_request_irq(&pdev->dev, dec_irq, mxc_jpeg_dec_irq,
2752− 0, pdev->name, jpeg);
2753− if (ret) {
2754− dev_err(&pdev->dev, "Failed to request irq %d (%d)\n",
2755− dec_irq, ret);
2756− goto err_irq;
2757− }
2739+ ret = of_property_read_u32_index(pdev->dev.of_node, "slot", 0, &jpeg->slot_data.slot);
2740+ if (ret)
2741+ jpeg->slot_data.slot = 0;
2742+ dev_info(&pdev->dev, "choose slot %d\n", jpeg->slot_data.slot);
2743+ dec_irq = platform_get_irq(pdev, 0);
2744+ if (dec_irq < 0) {
2745+ dev_err(&pdev->dev, "Failed to get irq %d\n", dec_irq);
2746+ ret = dec_irq;
2747+ goto err_irq;
2748+ }
2749+ ret = devm_request_irq(&pdev->dev, dec_irq, mxc_jpeg_dec_irq,
2750+ 0, pdev->name, jpeg);
2751+ if (ret) {
2752+ dev_err(&pdev->dev, "Failed to request irq %d (%d)\n",
2753+ dec_irq, ret);
2754+ goto err_irq;
27582755 }
27592756
27602757 jpeg->pdev = pdev;
@@ -2914,11 +2911,9 @@ static const struct dev_pm_ops mxc_jpeg_pm_ops = { · 153 unmodified lines
29142911
29152912 static void mxc_jpeg_remove(struct platform_device *pdev)
29162913 {
2917− unsigned int slot;
29182914 struct mxc_jpeg_dev *jpeg = platform_get_drvdata(pdev);
29192915
2920− for (slot = 0; slot < MXC_MAX_SLOTS; slot++)
2921− mxc_jpeg_free_slot_data(jpeg, slot);
2916+ mxc_jpeg_free_slot_data(jpeg);
29222917
29232918 pm_runtime_disable(&pdev->dev);
29242919 video_unregister_device(jpeg->dec_vdev);
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h+3−2
@@ -97,7 +97,7 @@ struct mxc_jpeg_ctx { · 96 unmodified lines
9797 struct mxc_jpeg_q_data cap_q;
9898 struct v4l2_fh fh;
9999 enum mxc_jpeg_enc_state enc_state;
100− unsigned int slot;
100+ int slot;
101101 unsigned int source_change;
102102 bool header_parsed;
103103 struct v4l2_ctrl_handler ctrl_handler;
@@ -106,6 +106,7 @@ struct mxc_jpeg_ctx { · 2 unmodified lines
106106 };
107107
108108 struct mxc_jpeg_slot_data {
109+ int slot;
109110 bool used;
110111 struct mxc_jpeg_desc *desc; // enc/dec descriptor
111112 struct mxc_jpeg_desc *cfg_desc; // configuration descriptor
@@ -128,7 +129,7 @@ struct mxc_jpeg_dev { · 16 unmodified lines
128129 struct v4l2_device v4l2_dev;
129130 struct v4l2_m2m_dev *m2m_dev;
130131 struct video_device *dec_vdev;
131− struct mxc_jpeg_slot_data slot_data[MXC_MAX_SLOTS];
132+ struct mxc_jpeg_slot_data slot_data;
132133 int num_domains;
133134 struct device **pd_dev;
134135 struct device_link **pd_link;
drivers/media/platform/qcom/venus/hfi_cmds.c+2−2
@@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt, · 250 unmodified lines
251251
252252 pkt->extradata_size = 0;
253253 pkt->shdr.hdr.size =
254− struct_size((struct hfi_session_set_buffers_pkt *)0,
255− buffer_info, bd->num_buffers);
254+ struct_size_t(struct hfi_session_set_buffers_pkt,
255+ buffer_info, bd->num_buffers);
256256 }
257257
258258 pkt->response_req = bd->response_required;
drivers/media/platform/verisilicon/hantro.h+23−23
@@ -370,26 +370,26 @@ extern int hantro_debug; · 369 unmodified lines
370370 pr_err("%s:%d: " fmt, __func__, __LINE__, ##args)
371371
372372 /* Structure access helpers. */
373−static inline struct hantro_ctx *fh_to_ctx(struct v4l2_fh *fh)
373+static __always_inline struct hantro_ctx *fh_to_ctx(struct v4l2_fh *fh)
374374 {
375375 return container_of(fh, struct hantro_ctx, fh);
376376 }
377377
378378 /* Register accessors. */
379−static inline void vepu_write_relaxed(struct hantro_dev *vpu,
380− u32 val, u32 reg)
379+static __always_inline void vepu_write_relaxed(struct hantro_dev *vpu,
380+ u32 val, u32 reg)
381381 {
382382 vpu_debug(6, "0x%04x = 0x%08x\n", reg / 4, val);
383383 writel_relaxed(val, vpu->enc_base + reg);
384384 }
385385
386−static inline void vepu_write(struct hantro_dev *vpu, u32 val, u32 reg)
386+static __always_inline void vepu_write(struct hantro_dev *vpu, u32 val, u32 reg)
387387 {
388388 vpu_debug(6, "0x%04x = 0x%08x\n", reg / 4, val);
389389 writel(val, vpu->enc_base + reg);
390390 }
391391
392−static inline u32 vepu_read(struct hantro_dev *vpu, u32 reg)
392+static __always_inline u32 vepu_read(struct hantro_dev *vpu, u32 reg)
393393 {
394394 u32 val = readl(vpu->enc_base + reg);
395395
@@ -397,27 +397,27 @@ static inline u32 vepu_read(struct hantro_dev *vpu, u32 reg) · 1 unmodified line
397397 return val;
398398 }
399399
400−static inline void vdpu_write_relaxed(struct hantro_dev *vpu,
401− u32 val, u32 reg)
400+static __always_inline void vdpu_write_relaxed(struct hantro_dev *vpu,
401+ u32 val, u32 reg)
402402 {
403403 vpu_debug(6, "0x%04x = 0x%08x\n", reg / 4, val);
404404 writel_relaxed(val, vpu->dec_base + reg);
405405 }
406406
407−static inline void vdpu_write(struct hantro_dev *vpu, u32 val, u32 reg)
407+static __always_inline void vdpu_write(struct hantro_dev *vpu, u32 val, u32 reg)
408408 {
409409 vpu_debug(6, "0x%04x = 0x%08x\n", reg / 4, val);
410410 writel(val, vpu->dec_base + reg);
411411 }
412412
413−static inline void hantro_write_addr(struct hantro_dev *vpu,
414− unsigned long offset,
415− dma_addr_t addr)
413+static __always_inline void hantro_write_addr(struct hantro_dev *vpu,
414+ unsigned long offset,
415+ dma_addr_t addr)
416416 {
417417 vdpu_write(vpu, addr & 0xffffffff, offset);
418418 }
419419
420−static inline u32 vdpu_read(struct hantro_dev *vpu, u32 reg)
420+static __always_inline u32 vdpu_read(struct hantro_dev *vpu, u32 reg)
421421 {
422422 u32 val = readl(vpu->dec_base + reg);
423423
@@ -425,9 +425,9 @@ static inline u32 vdpu_read(struct hantro_dev *vpu, u32 reg) · 1 unmodified line
425425 return val;
426426 }
427427
428−static inline u32 vdpu_read_mask(struct hantro_dev *vpu,
429− const struct hantro_reg *reg,
430− u32 val)
428+static __always_inline u32 vdpu_read_mask(struct hantro_dev *vpu,
429+ const struct hantro_reg *reg,
430+ u32 val)
431431 {
432432 u32 v;
433433
@@ -437,18 +437,18 @@ static inline u32 vdpu_read_mask(struct hantro_dev *vpu, · 3 unmodified lines
437437 return v;
438438 }
439439
440−static inline void hantro_reg_write(struct hantro_dev *vpu,
441− const struct hantro_reg *reg,
442− u32 val)
440+static __always_inline void hantro_reg_write(struct hantro_dev *vpu,
441+ const struct hantro_reg *reg,
442+ u32 val)
443443 {
444− vdpu_write_relaxed(vpu, vdpu_read_mask(vpu, reg, val), reg->base);
444+ vdpu_write(vpu, vdpu_read_mask(vpu, reg, val), reg->base);
445445 }
446446
447−static inline void hantro_reg_write_s(struct hantro_dev *vpu,
448− const struct hantro_reg *reg,
449− u32 val)
447+static __always_inline void hantro_reg_write_relaxed(struct hantro_dev *vpu,
448+ const struct hantro_reg *reg,
449+ u32 val)
450450 {
451− vdpu_write(vpu, vdpu_read_mask(vpu, reg, val), reg->base);
451+ vdpu_write_relaxed(vpu, vdpu_read_mask(vpu, reg, val), reg->base);
452452 }
453453
454454 void *hantro_get_ctrl(struct hantro_ctx *ctx, u32 id);
drivers/media/platform/verisilicon/hantro_postproc.c+6−6
@@ -21,11 +21,11 @@ · 20 unmodified lines
2121 val); \
2222 }
2323
24−#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
24+#define HANTRO_PP_REG_WRITE_RELAXED(vpu, reg_name, val) \
2525 { \
26− hantro_reg_write_s(vpu, \
27− &hantro_g1_postproc_regs.reg_name, \
28− val); \
26+ hantro_reg_write_relaxed(vpu, \
27+ &hantro_g1_postproc_regs.reg_name, \
28+ val); \
2929 }
3030
3131 #define VPU_PP_IN_YUYV 0x0
@@ -72,7 +72,7 @@ static void hantro_postproc_g1_enable(struct hantro_ctx *ctx) · 40 unmodified lines
7272 dma_addr_t dst_dma;
7373
7474 /* Turn on pipeline mode. Must be done first. */
75− HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
75+ HANTRO_PP_REG_WRITE(vpu, pipeline_en, 0x1);
7676
7777 src_pp_fmt = VPU_PP_IN_NV12;
7878
@@ -242,7 +242,7 @@ static void hantro_postproc_g1_disable(struct hantro_ctx *ctx) · 163 unmodified lines
242242 {
243243 struct hantro_dev *vpu = ctx->dev;
244244
245− HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
245+ HANTRO_PP_REG_WRITE(vpu, pipeline_en, 0x0);
246246 }
247247
248248 static void hantro_postproc_g2_disable(struct hantro_ctx *ctx)
drivers/memory/tegra/mc.c+37−0
@@ -755,6 +755,43 @@ const char *const tegra_mc_error_names[8] = { · 754 unmodified lines
755755 [6] = "SMMU translation error",
756756 };
757757
758+struct icc_node *tegra_mc_icc_xlate(struct of_phandle_args *spec, void *data)
759+{
760+ struct tegra_mc *mc = icc_provider_to_tegra_mc(data);
761+ struct icc_node *node;
762+
763+ list_for_each_entry(node, &mc->provider.nodes, node_list) {
764+ if (node->id == spec->args[0])
765+ return node;
766+ }
767+
768+ /*
769+ * If a client driver calls devm_of_icc_get() before the MC driver
770+ * is probed, then return EPROBE_DEFER to the client driver.
771+ */
772+ return ERR_PTR(-EPROBE_DEFER);
773+}
774+
775+static int tegra_mc_icc_get(struct icc_node *node, u32 *average, u32 *peak)
776+{
777+ *average = 0;
778+ *peak = 0;
779+
780+ return 0;
781+}
782+
783+static int tegra_mc_icc_set(struct icc_node *src, struct icc_node *dst)
784+{
785+ return 0;
786+}
787+
788+const struct tegra_mc_icc_ops tegra_mc_icc_ops = {
789+ .xlate = tegra_mc_icc_xlate,
790+ .aggregate = icc_std_aggregate,
791+ .get_bw = tegra_mc_icc_get,
792+ .set = tegra_mc_icc_set,
793+};
794+
758795 /*
759796 * Memory Controller (MC) has few Memory Clients that are issuing memory
760797 * bandwidth allocation requests to the MC interconnect provider. The MC
drivers/memory/tegra/tegra194.c+1−0
@@ -1355,6 +1355,7 @@ const struct tegra_mc_soc tegra194_mc_soc = { · 1354 unmodified lines
13551355 MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
13561356 .has_addr_hi_reg = true,
13571357 .ops = &tegra186_mc_ops,
1358+ .icc_ops = &tegra_mc_icc_ops,
13581359 .ch_intmask = 0x00000f00,
13591360 .global_intstatus_channel_shift = 8,
13601361 };
drivers/memory/tegra/tegra234.c+3−24
@@ -827,7 +827,7 @@ static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst) · 826 unmodified lines
827827 return 0;
828828
829829 if (!mc->bwmgr_mrq_supported)
830− return -EINVAL;
830+ return 0;
831831
832832 if (!mc->bpmp) {
833833 dev_err(mc->dev, "BPMP reference NULL\n");
@@ -874,7 +874,7 @@ static int tegra234_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, · 40 unmodified lines
874874 struct tegra_mc *mc = icc_provider_to_tegra_mc(p);
875875
876876 if (!mc->bwmgr_mrq_supported)
877− return -EINVAL;
877+ return 0;
878878
879879 if (node->id == TEGRA_ICC_MC_CPU_CLUSTER0 ||
880880 node->id == TEGRA_ICC_MC_CPU_CLUSTER1 ||
@@ -889,27 +889,6 @@ static int tegra234_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, · 8 unmodified lines
889889 return 0;
890890 }
891891
892−static struct icc_node*
893−tegra234_mc_of_icc_xlate(struct of_phandle_args *spec, void *data)
894−{
895− struct tegra_mc *mc = icc_provider_to_tegra_mc(data);
896− unsigned int cl_id = spec->args[0];
897− struct icc_node *node;
898−
899− list_for_each_entry(node, &mc->provider.nodes, node_list) {
900− if (node->id != cl_id)
901− continue;
902−
903− return node;
904− }
905−
906− /*
907− * If a client driver calls devm_of_icc_get() before the MC driver
908− * is probed, then return EPROBE_DEFER to the client driver.
909− */
910− return ERR_PTR(-EPROBE_DEFER);
911−}
912−
913892 static int tegra234_mc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *peak)
914893 {
915894 *avg = 0;
@@ -919,7 +898,7 @@ static int tegra234_mc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *pea · 3 unmodified lines
919898 }
920899
921900 static const struct tegra_mc_icc_ops tegra234_mc_icc_ops = {
922− .xlate = tegra234_mc_of_icc_xlate,
901+ .xlate = tegra_mc_icc_xlate,
923902 .aggregate = tegra234_mc_icc_aggregate,
924903 .get_bw = tegra234_mc_icc_get_init_bw,
925904 .set = tegra234_mc_icc_set,
drivers/misc/cardreader/rts5227.c+1−1
@@ -195,7 +195,7 @@ static int rts5227_extra_init_hw(struct rtsx_pcr *pcr) · 194 unmodified lines
195195 }
196196 }
197197
198− if (option->force_clkreq_0)
198+ if (option->force_clkreq_0 && pcr->aspm_mode == ASPM_MODE_CFG)
199199 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG,
200200 FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
201201 else
drivers/misc/cardreader/rts5228.c+0−18
@@ -435,17 +435,10 @@ static void rts5228_init_from_cfg(struct rtsx_pcr *pcr) · 434 unmodified lines
435435 option->ltr_enabled = false;
436436 }
437437 }
438−
439− if (rtsx_check_dev_flag(pcr, ASPM_L1_1_EN | ASPM_L1_2_EN
440− | PM_L1_1_EN | PM_L1_2_EN))
441− option->force_clkreq_0 = false;
442− else
443− option->force_clkreq_0 = true;
444438 }
445439
446440 static int rts5228_extra_init_hw(struct rtsx_pcr *pcr)
447441 {
448− struct rtsx_cr_option *option = &pcr->option;
449442
450443 rtsx_pci_write_register(pcr, RTS5228_AUTOLOAD_CFG1,
451444 CD_RESUME_EN_MASK, CD_RESUME_EN_MASK);
@@ -476,17 +469,6 @@ static int rts5228_extra_init_hw(struct rtsx_pcr *pcr) · 24 unmodified lines
476469 else
477470 rtsx_pci_write_register(pcr, PETXCFG, 0x30, 0x00);
478471
479− /*
480− * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced
481− * to drive low, and we forcibly request clock.
482− */
483− if (option->force_clkreq_0)
484− rtsx_pci_write_register(pcr, PETXCFG,
485− FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
486− else
487− rtsx_pci_write_register(pcr, PETXCFG,
488− FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH);
489−
490472 rtsx_pci_write_register(pcr, PWD_SUSPEND_EN, 0xFF, 0xFB);
491473
492474 if (pcr->rtd3_en) {
drivers/misc/cardreader/rts5249.c+1−2
@@ -327,12 +327,11 @@ static int rts5249_extra_init_hw(struct rtsx_pcr *pcr) · 326 unmodified lines
327327 }
328328 }
329329
330−
331330 /*
332331 * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced
333332 * to drive low, and we forcibly request clock.
334333 */
335− if (option->force_clkreq_0)
334+ if (option->force_clkreq_0 && pcr->aspm_mode == ASPM_MODE_CFG)
336335 rtsx_pci_write_register(pcr, PETXCFG,
337336 FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
338337 else
drivers/misc/cardreader/rts5260.c+0−18
@@ -517,17 +517,10 @@ static void rts5260_init_from_cfg(struct rtsx_pcr *pcr) · 516 unmodified lines
517517 option->ltr_enabled = false;
518518 }
519519 }
520−
521− if (rtsx_check_dev_flag(pcr, ASPM_L1_1_EN | ASPM_L1_2_EN
522− | PM_L1_1_EN | PM_L1_2_EN))
523− option->force_clkreq_0 = false;
524− else
525− option->force_clkreq_0 = true;
526520 }
527521
528522 static int rts5260_extra_init_hw(struct rtsx_pcr *pcr)
529523 {
530− struct rtsx_cr_option *option = &pcr->option;
531524
532525 /* Set mcu_cnt to 7 to ensure data can be sampled properly */
533526 rtsx_pci_write_register(pcr, 0xFC03, 0x7F, 0x07);
@@ -546,17 +539,6 @@ static int rts5260_extra_init_hw(struct rtsx_pcr *pcr) · 12 unmodified lines
546539
547540 rts5260_init_hw(pcr);
548541
549− /*
550− * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced
551− * to drive low, and we forcibly request clock.
552− */
553− if (option->force_clkreq_0)
554− rtsx_pci_write_register(pcr, PETXCFG,
555− FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
556− else
557− rtsx_pci_write_register(pcr, PETXCFG,
558− FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH);
559−
560542 rtsx_pci_write_register(pcr, pcr->reg_pm_ctrl3, 0x10, 0x00);
561543
562544 return 0;
drivers/misc/cardreader/rts5261.c+0−18
@@ -498,17 +498,10 @@ static void rts5261_init_from_cfg(struct rtsx_pcr *pcr) · 497 unmodified lines
498498 option->ltr_enabled = false;
499499 }
500500 }
501−
502− if (rtsx_check_dev_flag(pcr, ASPM_L1_1_EN | ASPM_L1_2_EN
503− | PM_L1_1_EN | PM_L1_2_EN))
504− option->force_clkreq_0 = false;
505− else
506− option->force_clkreq_0 = true;
507501 }
508502
509503 static int rts5261_extra_init_hw(struct rtsx_pcr *pcr)
510504 {
511− struct rtsx_cr_option *option = &pcr->option;
512505 u32 val;
513506
514507 rtsx_pci_write_register(pcr, RTS5261_AUTOLOAD_CFG1,
@@ -554,17 +547,6 @@ static int rts5261_extra_init_hw(struct rtsx_pcr *pcr) · 39 unmodified lines
554547 else
555548 rtsx_pci_write_register(pcr, PETXCFG, 0x30, 0x00);
556549
557− /*
558− * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced
559− * to drive low, and we forcibly request clock.
560− */
561− if (option->force_clkreq_0)
562− rtsx_pci_write_register(pcr, PETXCFG,
563− FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
564− else
565− rtsx_pci_write_register(pcr, PETXCFG,
566− FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH);
567−
568550 rtsx_pci_write_register(pcr, PWD_SUSPEND_EN, 0xFF, 0xFB);
569551
570552 if (pcr->rtd3_en) {
drivers/misc/cardreader/rtsx_pcr.c+4−1
@@ -1326,8 +1326,11 @@ static int rtsx_pci_init_hw(struct rtsx_pcr *pcr) · 1325 unmodified lines
13261326 return err;
13271327 }
13281328
1329− if (pcr->aspm_mode == ASPM_MODE_REG)
1329+ if (pcr->aspm_mode == ASPM_MODE_REG) {
13301330 rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, 0x30, 0x30);
1331+ rtsx_pci_write_register(pcr, PETXCFG,
1332+ FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH);
1333+ }
13311334
13321335 /* No CD interrupt if probing driver with card inserted.
13331336 * So we need to initialize pcr->card_exist here.
drivers/misc/sram.c+1−1
@@ -236,7 +236,7 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res) · 235 unmodified lines
236236 }
237237 if (!label)
238238 block->label = devm_kasprintf(sram->dev, GFP_KERNEL,
239− "%s", dev_name(sram->dev));
239+ "%s", of_node_full_name(child));
240240 else
241241 block->label = devm_kstrdup(sram->dev,
242242 label, GFP_KERNEL);
drivers/misc/tps6594-esm.c+18−1
@@ -13,6 +13,8 @@ · 12 unmodified lines
1313
1414 #include <linux/mfd/tps6594.h>
1515
16+#define TPS6594_DEV_REV_1 0x08
17+
1618 static irqreturn_t tps6594_esm_isr(int irq, void *dev_id)
1719 {
1820 struct platform_device *pdev = dev_id;
@@ -32,11 +34,26 @@ static int tps6594_esm_probe(struct platform_device *pdev) · 13 unmodified lines
3234 {
3335 struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent);
3436 struct device *dev = &pdev->dev;
37+ unsigned int rev;
3538 int irq;
3639 int ret;
3740 int i;
3841
39− for (i = 0 ; i < pdev->num_resources ; i++) {
42+ /*
43+ * Due to a bug in revision 1 of the PMIC, the GPIO3 used for the
44+ * SoC ESM function is used to power the load switch instead.
45+ * As a consequence, ESM can not be used on those PMIC.
46+ * Check the version and return an error in case of revision 1.
47+ */
48+ ret = regmap_read(tps->regmap, TPS6594_REG_DEV_REV, &rev);
49+ if (ret)
50+ return dev_err_probe(dev, ret,
51+ "Failed to read PMIC revision\n");
52+ if (rev == TPS6594_DEV_REV_1)
53+ return dev_err_probe(dev, -ENODEV,
54+ "ESM not supported for revision 1 PMIC\n");
55+
56+ for (i = 0; i < pdev->num_resources; i++) {
4057 irq = platform_get_irq_byname(pdev, pdev->resource[i].name);
4158 if (irq < 0)
4259 return dev_err_probe(dev, irq, "Failed to get %s irq\n",
drivers/mmc/host/moxart-mmc.c+1−7
@@ -338,13 +338,7 @@ static void moxart_transfer_pio(struct moxart_host *host) · 337 unmodified lines
338338 return;
339339 }
340340 for (len = 0; len < remain && len < host->fifo_width;) {
341− /* SCR data must be read in big endian. */
342− if (data->mrq->cmd->opcode == SD_APP_SEND_SCR)
343− *sgp = ioread32be(host->base +
344− REG_DATA_WINDOW);
345− else
346− *sgp = ioread32(host->base +
347− REG_DATA_WINDOW);
341+ *sgp = ioread32(host->base + REG_DATA_WINDOW);
348342 sgp++;
349343 len += 4;
350344 }
drivers/mmc/host/sdhci_f_sdh30.c+27−33
@@ -29,9 +29,16 @@ struct f_sdhost_priv { · 28 unmodified lines
2929 bool enable_cmd_dat_delay;
3030 };
3131
32+static void *sdhci_f_sdhost_priv(struct sdhci_host *host)
33+{
34+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
35+
36+ return sdhci_pltfm_priv(pltfm_host);
37+}
38+
3239 static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host)
3340 {
34− struct f_sdhost_priv *priv = sdhci_priv(host);
41+ struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host);
3542 u32 ctrl = 0;
3643
3744 usleep_range(2500, 3000);
@@ -64,7 +71,7 @@ static unsigned int sdhci_f_sdh30_get_min_clock(struct sdhci_host *host) · 26 unmodified lines
6471
6572 static void sdhci_f_sdh30_reset(struct sdhci_host *host, u8 mask)
6673 {
67− struct f_sdhost_priv *priv = sdhci_priv(host);
74+ struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host);
6875 u32 ctl;
6976
7077 if (sdhci_readw(host, SDHCI_CLOCK_CONTROL) == 0)
@@ -95,30 +102,32 @@ static const struct sdhci_ops sdhci_f_sdh30_ops = { · 24 unmodified lines
95102 .set_uhs_signaling = sdhci_set_uhs_signaling,
96103 };
97104
105+static const struct sdhci_pltfm_data sdhci_f_sdh30_pltfm_data = {
106+ .ops = &sdhci_f_sdh30_ops,
107+ .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
108+ | SDHCI_QUIRK_INVERTED_WRITE_PROTECT,
109+ .quirks2 = SDHCI_QUIRK2_SUPPORT_SINGLE
110+ | SDHCI_QUIRK2_TUNING_WORK_AROUND,
111+};
112+
98113 static int sdhci_f_sdh30_probe(struct platform_device *pdev)
99114 {
100115 struct sdhci_host *host;
101116 struct device *dev = &pdev->dev;
102− int irq, ctrl = 0, ret = 0;
117+ int ctrl = 0, ret = 0;
103118 struct f_sdhost_priv *priv;
119+ struct sdhci_pltfm_host *pltfm_host;
104120 u32 reg = 0;
105121
106− irq = platform_get_irq(pdev, 0);
107− if (irq < 0)
108− return irq;
109−
110− host = sdhci_alloc_host(dev, sizeof(struct f_sdhost_priv));
122+ host = sdhci_pltfm_init(pdev, &sdhci_f_sdh30_pltfm_data,
123+ sizeof(struct f_sdhost_priv));
111124 if (IS_ERR(host))
112125 return PTR_ERR(host);
113126
114− priv = sdhci_priv(host);
127+ pltfm_host = sdhci_priv(host);
128+ priv = sdhci_pltfm_priv(pltfm_host);
115129 priv->dev = dev;
116130
117− host->quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC |
118− SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
119− host->quirks2 = SDHCI_QUIRK2_SUPPORT_SINGLE |
120− SDHCI_QUIRK2_TUNING_WORK_AROUND;
121−
122131 priv->enable_cmd_dat_delay = device_property_read_bool(dev,
123132 "fujitsu,cmd-dat-delay-select");
124133
@@ -126,18 +135,6 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) · 1 unmodified line
126135 if (ret)
127136 goto err;
128137
129− platform_set_drvdata(pdev, host);
130−
131− host->hw_name = "f_sdh30";
132− host->ops = &sdhci_f_sdh30_ops;
133− host->irq = irq;
134−
135− host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
136− if (IS_ERR(host->ioaddr)) {
137− ret = PTR_ERR(host->ioaddr);
138− goto err;
139− }
140−
141138 if (dev_of_node(dev)) {
142139 sdhci_get_of_property(pdev);
143140
@@ -204,24 +201,21 @@ err_rst: · 60 unmodified lines
204201 err_clk:
205202 clk_disable_unprepare(priv->clk_iface);
206203 err:
207− sdhci_free_host(host);
204+ sdhci_pltfm_free(pdev);
205+
208206 return ret;
209207 }
210208
211209 static int sdhci_f_sdh30_remove(struct platform_device *pdev)
212210 {
213211 struct sdhci_host *host = platform_get_drvdata(pdev);
214− struct f_sdhost_priv *priv = sdhci_priv(host);
215−
216− sdhci_remove_host(host, readl(host->ioaddr + SDHCI_INT_STATUS) ==
217− 0xffffffff);
212+ struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host);
218213
219214 reset_control_assert(priv->rst);
220215 clk_disable_unprepare(priv->clk);
221216 clk_disable_unprepare(priv->clk_iface);
222217
223− sdhci_free_host(host);
224− platform_set_drvdata(pdev, NULL);
218+ sdhci_pltfm_unregister(pdev);
225219
226220 return 0;
227221 }
drivers/mtd/nand/raw/fsl_upm.c+1−1
@@ -135,7 +135,7 @@ static int fun_exec_op(struct nand_chip *chip, const struct nand_operation *op, · 134 unmodified lines
135135 unsigned int i;
136136 int ret;
137137
138− if (op->cs > NAND_MAX_CHIPS)
138+ if (op->cs >= NAND_MAX_CHIPS)
139139 return -EINVAL;
140140
141141 if (check_only)
drivers/mtd/nand/raw/meson_nand.c+1−2
@@ -1278,7 +1278,6 @@ static int meson_nand_attach_chip(struct nand_chip *nand) · 1277 unmodified lines
12781278 struct meson_nfc *nfc = nand_get_controller_data(nand);
12791279 struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand);
12801280 struct mtd_info *mtd = nand_to_mtd(nand);
1281− int nsectors = mtd->writesize / 1024;
12821281 int raw_writesize;
12831282 int ret;
12841283
@@ -1304,7 +1303,7 @@ static int meson_nand_attach_chip(struct nand_chip *nand) · 19 unmodified lines
13041303 nand->options |= NAND_NO_SUBPAGE_WRITE;
13051304
13061305 ret = nand_ecc_choose_conf(nand, nfc->data->ecc_caps,
1307− mtd->oobsize - 2 * nsectors);
1306+ mtd->oobsize - 2);
13081307 if (ret) {
13091308 dev_err(nfc->dev, "failed to ECC init\n");
13101309 return -EINVAL;
drivers/mtd/nand/raw/omap_elm.c+12−12
@@ -177,17 +177,17 @@ static void elm_load_syndrome(struct elm_info *info, · 176 unmodified lines
177177 switch (info->bch_type) {
178178 case BCH8_ECC:
179179 /* syndrome fragment 0 = ecc[9-12B] */
180− val = cpu_to_be32(*(u32 *) &ecc[9]);
180+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[9]);
181181 elm_write_reg(info, offset, val);
182182
183183 /* syndrome fragment 1 = ecc[5-8B] */
184184 offset += 4;
185− val = cpu_to_be32(*(u32 *) &ecc[5]);
185+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[5]);
186186 elm_write_reg(info, offset, val);
187187
188188 /* syndrome fragment 2 = ecc[1-4B] */
189189 offset += 4;
190− val = cpu_to_be32(*(u32 *) &ecc[1]);
190+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[1]);
191191 elm_write_reg(info, offset, val);
192192
193193 /* syndrome fragment 3 = ecc[0B] */
@@ -197,35 +197,35 @@ static void elm_load_syndrome(struct elm_info *info, · 3 unmodified lines
197197 break;
198198 case BCH4_ECC:
199199 /* syndrome fragment 0 = ecc[20-52b] bits */
200− val = (cpu_to_be32(*(u32 *) &ecc[3]) >> 4) |
200+ val = ((__force u32)cpu_to_be32(*(u32 *)&ecc[3]) >> 4) |
201201 ((ecc[2] & 0xf) << 28);
202202 elm_write_reg(info, offset, val);
203203
204204 /* syndrome fragment 1 = ecc[0-20b] bits */
205205 offset += 4;
206− val = cpu_to_be32(*(u32 *) &ecc[0]) >> 12;
206+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[0]) >> 12;
207207 elm_write_reg(info, offset, val);
208208 break;
209209 case BCH16_ECC:
210− val = cpu_to_be32(*(u32 *) &ecc[22]);
210+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[22]);
211211 elm_write_reg(info, offset, val);
212212 offset += 4;
213− val = cpu_to_be32(*(u32 *) &ecc[18]);
213+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[18]);
214214 elm_write_reg(info, offset, val);
215215 offset += 4;
216− val = cpu_to_be32(*(u32 *) &ecc[14]);
216+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[14]);
217217 elm_write_reg(info, offset, val);
218218 offset += 4;
219− val = cpu_to_be32(*(u32 *) &ecc[10]);
219+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[10]);
220220 elm_write_reg(info, offset, val);
221221 offset += 4;
222− val = cpu_to_be32(*(u32 *) &ecc[6]);
222+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[6]);
223223 elm_write_reg(info, offset, val);
224224 offset += 4;
225− val = cpu_to_be32(*(u32 *) &ecc[2]);
225+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[2]);
226226 elm_write_reg(info, offset, val);
227227 offset += 4;
228− val = cpu_to_be32(*(u32 *) &ecc[0]) >> 16;
228+ val = (__force u32)cpu_to_be32(*(u32 *)&ecc[0]) >> 16;
229229 elm_write_reg(info, offset, val);
230230 break;
231231 default:
drivers/mtd/nand/raw/rockchip-nand-controller.c+25−20
@@ -562,9 +562,10 @@ static int rk_nfc_write_page_raw(struct nand_chip *chip, const u8 *buf, · 561 unmodified lines
562562 * BBM OOB1 OOB2 OOB3 |......| PA0 PA1 PA2 PA3
563563 *
564564 * The rk_nfc_ooblayout_free() function already has reserved
565− * these 4 bytes with:
565+ * these 4 bytes together with 2 bytes for BBM
566+ * by reducing it's length:
566567 *
567− * oob_region->offset = NFC_SYS_DATA_SIZE + 2;
568+ * oob_region->length = rknand->metadata_size - NFC_SYS_DATA_SIZE - 2;
568569 */
569570 if (!i)
570571 memcpy(rk_nfc_oob_ptr(chip, i),
@@ -597,7 +598,7 @@ static int rk_nfc_write_page_hwecc(struct nand_chip *chip, const u8 *buf, · 26 unmodified lines
597598 int pages_per_blk = mtd->erasesize / mtd->writesize;
598599 int ret = 0, i, boot_rom_mode = 0;
599600 dma_addr_t dma_data, dma_oob;
600− u32 reg;
601+ u32 tmp;
601602 u8 *oob;
602603
603604 nand_prog_page_begin_op(chip, page, 0, NULL, 0);
@@ -624,6 +625,13 @@ static int rk_nfc_write_page_hwecc(struct nand_chip *chip, const u8 *buf, · 20 unmodified lines
624625 *
625626 * 0xFF 0xFF 0xFF 0xFF | BBM OOB1 OOB2 OOB3 | ...
626627 *
628+ * The code here just swaps the first 4 bytes with the last
629+ * 4 bytes without losing any data.
630+ *
631+ * The chip->oob_poi data layout:
632+ *
633+ * BBM OOB1 OOB2 OOB3 |......| PA0 PA1 PA2 PA3
634+ *
627635 * Configure the ECC algorithm supported by the boot ROM.
628636 */
629637 if ((page < (pages_per_blk * rknand->boot_blks)) &&
@@ -634,21 +642,17 @@ static int rk_nfc_write_page_hwecc(struct nand_chip *chip, const u8 *buf, · 4 unmodified lines
634642 }
635643
636644 for (i = 0; i < ecc->steps; i++) {
637− if (!i) {
638− reg = 0xFFFFFFFF;
639− } else {
645+ if (!i)
646+ oob = chip->oob_poi + (ecc->steps - 1) * NFC_SYS_DATA_SIZE;
647+ else
640648 oob = chip->oob_poi + (i - 1) * NFC_SYS_DATA_SIZE;
641− reg = oob[0] | oob[1] << 8 | oob[2] << 16 |
642− oob[3] << 24;
643− }
644649
645− if (!i && boot_rom_mode)
646− reg = (page & (pages_per_blk - 1)) * 4;
650+ tmp = oob[0] | oob[1] << 8 | oob[2] << 16 | oob[3] << 24;
647651
648652 if (nfc->cfg->type == NFC_V9)
649− nfc->oob_buf[i] = reg;
653+ nfc->oob_buf[i] = tmp;
650654 else
651− nfc->oob_buf[i * (oob_step / 4)] = reg;
655+ nfc->oob_buf[i * (oob_step / 4)] = tmp;
652656 }
653657
654658 dma_data = dma_map_single(nfc->dev, (void *)nfc->page_buf,
@@ -811,12 +815,17 @@ static int rk_nfc_read_page_hwecc(struct nand_chip *chip, u8 *buf, int oob_on, · 156 unmodified lines
811815 goto timeout_err;
812816 }
813817
814− for (i = 1; i < ecc->steps; i++) {
815− oob = chip->oob_poi + (i - 1) * NFC_SYS_DATA_SIZE;
818+ for (i = 0; i < ecc->steps; i++) {
819+ if (!i)
820+ oob = chip->oob_poi + (ecc->steps - 1) * NFC_SYS_DATA_SIZE;
821+ else
822+ oob = chip->oob_poi + (i - 1) * NFC_SYS_DATA_SIZE;
823+
816824 if (nfc->cfg->type == NFC_V9)
817825 tmp = nfc->oob_buf[i];
818826 else
819827 tmp = nfc->oob_buf[i * (oob_step / 4)];
828+
820829 *oob++ = (u8)tmp;
821830 *oob++ = (u8)(tmp >> 8);
822831 *oob++ = (u8)(tmp >> 16);
@@ -933,12 +942,8 @@ static int rk_nfc_ooblayout_free(struct mtd_info *mtd, int section, · 110 unmodified lines
933942 if (section)
934943 return -ERANGE;
935944
936− /*
937− * The beginning of the OOB area stores the reserved data for the NFC,
938− * the size of the reserved data is NFC_SYS_DATA_SIZE bytes.
939− */
940945 oob_region->length = rknand->metadata_size - NFC_SYS_DATA_SIZE - 2;
941− oob_region->offset = NFC_SYS_DATA_SIZE + 2;
946+ oob_region->offset = 2;
942947
943948 return 0;
944949 }
drivers/mtd/nand/spi/toshiba.c+2−2
@@ -73,7 +73,7 @@ static int tx58cxgxsxraix_ecc_get_status(struct spinand_device *spinand, · 72 unmodified lines
7373 {
7474 struct nand_device *nand = spinand_to_nand(spinand);
7575 u8 mbf = 0;
76− struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf);
76+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf);
7777
7878 switch (status & STATUS_ECC_MASK) {
7979 case STATUS_ECC_NO_BITFLIPS:
@@ -92,7 +92,7 @@ static int tx58cxgxsxraix_ecc_get_status(struct spinand_device *spinand, · 12 unmodified lines
9292 if (spi_mem_exec_op(spinand->spimem, &op))
9393 return nanddev_get_ecc_conf(nand)->strength;
9494
95− mbf >>= 4;
95+ mbf = *(spinand->scratchbuf) >> 4;
9696
9797 if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf))
9898 return nanddev_get_ecc_conf(nand)->strength;
drivers/mtd/nand/spi/winbond.c+2−2
@@ -108,7 +108,7 @@ static int w25n02kv_ecc_get_status(struct spinand_device *spinand, · 107 unmodified lines
108108 {
109109 struct nand_device *nand = spinand_to_nand(spinand);
110110 u8 mbf = 0;
111− struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf);
111+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf);
112112
113113 switch (status & STATUS_ECC_MASK) {
114114 case STATUS_ECC_NO_BITFLIPS:
@@ -126,7 +126,7 @@ static int w25n02kv_ecc_get_status(struct spinand_device *spinand, · 11 unmodified lines
126126 if (spi_mem_exec_op(spinand->spimem, &op))
127127 return nanddev_get_ecc_conf(nand)->strength;
128128
129− mbf >>= 4;
129+ mbf = *(spinand->scratchbuf) >> 4;
130130
131131 if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf))
132132 return nanddev_get_ecc_conf(nand)->strength;
drivers/mtd/spi-nor/spansion.c+2−2
@@ -361,7 +361,7 @@ static int cypress_nor_determine_addr_mode_by_sr1(struct spi_nor *nor, · 360 unmodified lines
361361 */
362362 static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor)
363363 {
364− struct spi_mem_op op = {};
364+ struct spi_mem_op op;
365365 u8 addr_mode;
366366 int ret;
367367
@@ -492,7 +492,7 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, · 124 unmodified lines
492492 const struct sfdp_parameter_header *bfpt_header,
493493 const struct sfdp_bfpt *bfpt)
494494 {
495− struct spi_mem_op op = {};
495+ struct spi_mem_op op;
496496 int ret;
497497
498498 ret = cypress_nor_set_addr_mode_nbytes(nor);
drivers/net/bonding/bond_main.c+8−1
@@ -1508,6 +1508,11 @@ static void bond_setup_by_slave(struct net_device *bond_dev, · 1507 unmodified lines
15081508
15091509 memcpy(bond_dev->broadcast, slave_dev->broadcast,
15101510 slave_dev->addr_len);
1511+
1512+ if (slave_dev->flags & IFF_POINTOPOINT) {
1513+ bond_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
1514+ bond_dev->flags |= (IFF_POINTOPOINT | IFF_NOARP);
1515+ }
15111516 }
15121517
15131518 /* On bonding slaves other than the currently active slave, suppress
@@ -5896,7 +5901,9 @@ void bond_setup(struct net_device *bond_dev) · 4382 unmodified lines
58965901
58975902 bond_dev->hw_features = BOND_VLAN_FEATURES |
58985903 NETIF_F_HW_VLAN_CTAG_RX |
5899− NETIF_F_HW_VLAN_CTAG_FILTER;
5904+ NETIF_F_HW_VLAN_CTAG_FILTER |
5905+ NETIF_F_HW_VLAN_STAG_RX |
5906+ NETIF_F_HW_VLAN_STAG_FILTER;
59005907
59015908 bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL;
59025909 bond_dev->features |= bond_dev->hw_features;
drivers/net/can/usb/gs_usb.c+2−0
@@ -1030,6 +1030,8 @@ static int gs_can_close(struct net_device *netdev) · 1029 unmodified lines
10301030 usb_kill_anchored_urbs(&dev->tx_submitted);
10311031 atomic_set(&dev->active_tx_urbs, 0);
10321032
1033+ dev->can.state = CAN_STATE_STOPPED;
1034+
10331035 /* reset the device */
10341036 rc = gs_cmd_reset(dev);
10351037 if (rc < 0)
drivers/net/dsa/bcm_sf2.c+6−2
@@ -1436,7 +1436,9 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev) · 1435 unmodified lines
14361436 if (IS_ERR(priv->clk))
14371437 return PTR_ERR(priv->clk);
14381438
1439− clk_prepare_enable(priv->clk);
1439+ ret = clk_prepare_enable(priv->clk);
1440+ if (ret)
1441+ return ret;
14401442
14411443 priv->clk_mdiv = devm_clk_get_optional(&pdev->dev, "sw_switch_mdiv");
14421444 if (IS_ERR(priv->clk_mdiv)) {
@@ -1444,7 +1446,9 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev) · 1 unmodified line
14441446 goto out_clk;
14451447 }
14461448
1447− clk_prepare_enable(priv->clk_mdiv);
1449+ ret = clk_prepare_enable(priv->clk_mdiv);
1450+ if (ret)
1451+ goto out_clk;
14481452
14491453 ret = bcm_sf2_sw_rst(priv);
14501454 if (ret) {
drivers/net/dsa/microchip/ksz_common.c+15−20
@@ -635,10 +635,9 @@ static const struct regmap_range ksz9477_valid_regs[] = { · 634 unmodified lines
635635 regmap_reg_range(0x1030, 0x1030),
636636 regmap_reg_range(0x1100, 0x1115),
637637 regmap_reg_range(0x111a, 0x111f),
638− regmap_reg_range(0x1122, 0x1127),
639− regmap_reg_range(0x112a, 0x112b),
640− regmap_reg_range(0x1136, 0x1139),
641− regmap_reg_range(0x113e, 0x113f),
638+ regmap_reg_range(0x1120, 0x112b),
639+ regmap_reg_range(0x1134, 0x113b),
640+ regmap_reg_range(0x113c, 0x113f),
642641 regmap_reg_range(0x1400, 0x1401),
643642 regmap_reg_range(0x1403, 0x1403),
644643 regmap_reg_range(0x1410, 0x1417),
@@ -669,10 +668,9 @@ static const struct regmap_range ksz9477_valid_regs[] = { · 24 unmodified lines
669668 regmap_reg_range(0x2030, 0x2030),
670669 regmap_reg_range(0x2100, 0x2115),
671670 regmap_reg_range(0x211a, 0x211f),
672− regmap_reg_range(0x2122, 0x2127),
673− regmap_reg_range(0x212a, 0x212b),
674− regmap_reg_range(0x2136, 0x2139),
675− regmap_reg_range(0x213e, 0x213f),
671+ regmap_reg_range(0x2120, 0x212b),
672+ regmap_reg_range(0x2134, 0x213b),
673+ regmap_reg_range(0x213c, 0x213f),
676674 regmap_reg_range(0x2400, 0x2401),
677675 regmap_reg_range(0x2403, 0x2403),
678676 regmap_reg_range(0x2410, 0x2417),
@@ -703,10 +701,9 @@ static const struct regmap_range ksz9477_valid_regs[] = { · 24 unmodified lines
703701 regmap_reg_range(0x3030, 0x3030),
704702 regmap_reg_range(0x3100, 0x3115),
705703 regmap_reg_range(0x311a, 0x311f),
706− regmap_reg_range(0x3122, 0x3127),
707− regmap_reg_range(0x312a, 0x312b),
708− regmap_reg_range(0x3136, 0x3139),
709− regmap_reg_range(0x313e, 0x313f),
704+ regmap_reg_range(0x3120, 0x312b),
705+ regmap_reg_range(0x3134, 0x313b),
706+ regmap_reg_range(0x313c, 0x313f),
710707 regmap_reg_range(0x3400, 0x3401),
711708 regmap_reg_range(0x3403, 0x3403),
712709 regmap_reg_range(0x3410, 0x3417),
@@ -737,10 +734,9 @@ static const struct regmap_range ksz9477_valid_regs[] = { · 24 unmodified lines
737734 regmap_reg_range(0x4030, 0x4030),
738735 regmap_reg_range(0x4100, 0x4115),
739736 regmap_reg_range(0x411a, 0x411f),
740− regmap_reg_range(0x4122, 0x4127),
741− regmap_reg_range(0x412a, 0x412b),
742− regmap_reg_range(0x4136, 0x4139),
743− regmap_reg_range(0x413e, 0x413f),
737+ regmap_reg_range(0x4120, 0x412b),
738+ regmap_reg_range(0x4134, 0x413b),
739+ regmap_reg_range(0x413c, 0x413f),
744740 regmap_reg_range(0x4400, 0x4401),
745741 regmap_reg_range(0x4403, 0x4403),
746742 regmap_reg_range(0x4410, 0x4417),
@@ -771,10 +767,9 @@ static const struct regmap_range ksz9477_valid_regs[] = { · 24 unmodified lines
771767 regmap_reg_range(0x5030, 0x5030),
772768 regmap_reg_range(0x5100, 0x5115),
773769 regmap_reg_range(0x511a, 0x511f),
774− regmap_reg_range(0x5122, 0x5127),
775− regmap_reg_range(0x512a, 0x512b),
776− regmap_reg_range(0x5136, 0x5139),
777− regmap_reg_range(0x513e, 0x513f),
770+ regmap_reg_range(0x5120, 0x512b),
771+ regmap_reg_range(0x5134, 0x513b),
772+ regmap_reg_range(0x513c, 0x513f),
778773 regmap_reg_range(0x5400, 0x5401),
779774 regmap_reg_range(0x5403, 0x5403),
780775 regmap_reg_range(0x5410, 0x5417),
drivers/net/dsa/ocelot/felix.c+2−0
@@ -1625,8 +1625,10 @@ static void felix_teardown(struct dsa_switch *ds) · 1624 unmodified lines
16251625 struct felix *felix = ocelot_to_felix(ocelot);
16261626 struct dsa_port *dp;
16271627
1628+ rtnl_lock();
16281629 if (felix->tag_proto_ops)
16291630 felix->tag_proto_ops->teardown(ds);
1631+ rtnl_unlock();
16301632
16311633 dsa_switch_for_each_available_port(dp, ds)
16321634 ocelot_deinit_port(ocelot, dp->index);
drivers/net/dsa/qca/qca8k-8xxx.c+5−2
@@ -576,8 +576,11 @@ static struct regmap_config qca8k_regmap_config = { · 575 unmodified lines
576576 .rd_table = &qca8k_readable_table,
577577 .disable_locking = true, /* Locking is handled by qca8k read/write */
578578 .cache_type = REGCACHE_NONE, /* Explicitly disable CACHE */
579− .max_raw_read = 32, /* mgmt eth can read/write up to 8 registers at time */
580− .max_raw_write = 32,
579+ .max_raw_read = 32, /* mgmt eth can read up to 8 registers at time */
580+ /* ATU regs suffer from a bug where some data are not correctly
581+ * written. Disable bulk write to correctly write ATU entry.
582+ */
583+ .use_single_write = true,
581584 };
582585
583586 static int
drivers/net/dsa/qca/qca8k-common.c+16−3
@@ -244,7 +244,7 @@ void qca8k_fdb_flush(struct qca8k_priv *priv) · 243 unmodified lines
244244 }
245245
246246 static int qca8k_fdb_search_and_insert(struct qca8k_priv *priv, u8 port_mask,
247− const u8 *mac, u16 vid)
247+ const u8 *mac, u16 vid, u8 aging)
248248 {
249249 struct qca8k_fdb fdb = { 0 };
250250 int ret;
@@ -261,10 +261,12 @@ static int qca8k_fdb_search_and_insert(struct qca8k_priv *priv, u8 port_mask, · 10 unmodified lines
261261 goto exit;
262262
263263 /* Rule exist. Delete first */
264− if (!fdb.aging) {
264+ if (fdb.aging) {
265265 ret = qca8k_fdb_access(priv, QCA8K_FDB_PURGE, -1);
266266 if (ret)
267267 goto exit;
268+ } else {
269+ fdb.aging = aging;
268270 }
269271
270272 /* Add port to fdb portmask */
@@ -291,6 +293,10 @@ static int qca8k_fdb_search_and_del(struct qca8k_priv *priv, u8 port_mask, · 20 unmodified lines
291293 if (ret < 0)
292294 goto exit;
293295
296+ ret = qca8k_fdb_read(priv, &fdb);
297+ if (ret < 0)
298+ goto exit;
299+
294300 /* Rule doesn't exist. Why delete? */
295301 if (!fdb.aging) {
296302 ret = -EINVAL;
@@ -810,7 +816,11 @@ int qca8k_port_mdb_add(struct dsa_switch *ds, int port, · 513 unmodified lines
810816 const u8 *addr = mdb->addr;
811817 u16 vid = mdb->vid;
812818
813− return qca8k_fdb_search_and_insert(priv, BIT(port), addr, vid);
819+ if (!vid)
820+ vid = QCA8K_PORT_VID_DEF;
821+
822+ return qca8k_fdb_search_and_insert(priv, BIT(port), addr, vid,
823+ QCA8K_ATU_STATUS_STATIC);
814824 }
815825
816826 int qca8k_port_mdb_del(struct dsa_switch *ds, int port,
@@ -821,6 +831,9 @@ int qca8k_port_mdb_del(struct dsa_switch *ds, int port, · 4 unmodified lines
821831 const u8 *addr = mdb->addr;
822832 u16 vid = mdb->vid;
823833
834+ if (!vid)
835+ vid = QCA8K_PORT_VID_DEF;
836+
824837 return qca8k_fdb_search_and_del(priv, BIT(port), addr, vid);
825838 }
826839
drivers/net/ethernet/atheros/atl1c/atl1c_main.c+5−2
@@ -2094,8 +2094,11 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter, · 2093 unmodified lines
20942094 real_len = (((unsigned char *)ip_hdr(skb) - skb->data)
20952095 + ntohs(ip_hdr(skb)->tot_len));
20962096
2097− if (real_len < skb->len)
2098− pskb_trim(skb, real_len);
2097+ if (real_len < skb->len) {
2098+ err = pskb_trim(skb, real_len);
2099+ if (err)
2100+ return err;
2101+ }
20992102
21002103 hdr_len = skb_tcp_all_headers(skb);
21012104 if (unlikely(skb->len == hdr_len)) {
drivers/net/ethernet/atheros/atl1e/atl1e_main.c+5−2
@@ -1641,8 +1641,11 @@ static int atl1e_tso_csum(struct atl1e_adapter *adapter, · 1640 unmodified lines
16411641 real_len = (((unsigned char *)ip_hdr(skb) - skb->data)
16421642 + ntohs(ip_hdr(skb)->tot_len));
16431643
1644− if (real_len < skb->len)
1645− pskb_trim(skb, real_len);
1644+ if (real_len < skb->len) {
1645+ err = pskb_trim(skb, real_len);
1646+ if (err)
1647+ return err;
1648+ }
16461649
16471650 hdr_len = skb_tcp_all_headers(skb);
16481651 if (unlikely(skb->len == hdr_len)) {
drivers/net/ethernet/atheros/atlx/atl1.c+5−2
@@ -2113,8 +2113,11 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, · 2112 unmodified lines
21132113
21142114 real_len = (((unsigned char *)iph - skb->data) +
21152115 ntohs(iph->tot_len));
2116− if (real_len < skb->len)
2117− pskb_trim(skb, real_len);
2116+ if (real_len < skb->len) {
2117+ err = pskb_trim(skb, real_len);
2118+ if (err)
2119+ return err;
2120+ }
21182121 hdr_len = skb_tcp_all_headers(skb);
21192122 if (skb->len == hdr_len) {
21202123 iph->check = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt.c+51−34
@@ -633,12 +633,13 @@ tx_kick_pending: · 632 unmodified lines
633633 return NETDEV_TX_OK;
634634 }
635635
636−static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
636+static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
637637 {
638638 struct bnxt_tx_ring_info *txr = bnapi->tx_ring;
639639 struct netdev_queue *txq = netdev_get_tx_queue(bp->dev, txr->txq_index);
640640 u16 cons = txr->tx_cons;
641641 struct pci_dev *pdev = bp->pdev;
642+ int nr_pkts = bnapi->tx_pkts;
642643 int i;
643644 unsigned int tx_bytes = 0;
644645
@@ -688,6 +689,7 @@ next_tx_int: · 43 unmodified lines
688689 dev_kfree_skb_any(skb);
689690 }
690691
692+ bnapi->tx_pkts = 0;
691693 WRITE_ONCE(txr->tx_cons, cons);
692694
693695 __netif_txq_completed_wake(txq, nr_pkts, tx_bytes,
@@ -697,17 +699,24 @@ next_tx_int: · 3 unmodified lines
697699
698700 static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping,
699701 struct bnxt_rx_ring_info *rxr,
702+ unsigned int *offset,
700703 gfp_t gfp)
701704 {
702705 struct device *dev = &bp->pdev->dev;
703706 struct page *page;
704707
705− page = page_pool_dev_alloc_pages(rxr->page_pool);
708+ if (PAGE_SIZE > BNXT_RX_PAGE_SIZE) {
709+ page = page_pool_dev_alloc_frag(rxr->page_pool, offset,
710+ BNXT_RX_PAGE_SIZE);
711+ } else {
712+ page = page_pool_dev_alloc_pages(rxr->page_pool);
713+ *offset = 0;
714+ }
706715 if (!page)
707716 return NULL;
708717
709− *mapping = dma_map_page_attrs(dev, page, 0, PAGE_SIZE, bp->rx_dir,
710− DMA_ATTR_WEAK_ORDERING);
718+ *mapping = dma_map_page_attrs(dev, page, *offset, BNXT_RX_PAGE_SIZE,
719+ bp->rx_dir, DMA_ATTR_WEAK_ORDERING);
711720 if (dma_mapping_error(dev, *mapping)) {
712721 page_pool_recycle_direct(rxr->page_pool, page);
713722 return NULL;
@@ -747,15 +756,16 @@ int bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, · 33 unmodified lines
747756 dma_addr_t mapping;
748757
749758 if (BNXT_RX_PAGE_MODE(bp)) {
759+ unsigned int offset;
750760 struct page *page =
751− __bnxt_alloc_rx_page(bp, &mapping, rxr, gfp);
761+ __bnxt_alloc_rx_page(bp, &mapping, rxr, &offset, gfp);
752762
753763 if (!page)
754764 return -ENOMEM;
755765
756766 mapping += bp->rx_dma_offset;
757767 rx_buf->data = page;
758− rx_buf->data_ptr = page_address(page) + bp->rx_offset;
768+ rx_buf->data_ptr = page_address(page) + offset + bp->rx_offset;
759769 } else {
760770 u8 *data = __bnxt_alloc_rx_frag(bp, &mapping, gfp);
761771
@@ -815,7 +825,7 @@ static inline int bnxt_alloc_rx_page(struct bnxt *bp, · 53 unmodified lines
815825 unsigned int offset = 0;
816826
817827 if (BNXT_RX_PAGE_MODE(bp)) {
818− page = __bnxt_alloc_rx_page(bp, &mapping, rxr, gfp);
828+ page = __bnxt_alloc_rx_page(bp, &mapping, rxr, &offset, gfp);
819829
820830 if (!page)
821831 return -ENOMEM;
@@ -962,15 +972,15 @@ static struct sk_buff *bnxt_rx_multi_page_skb(struct bnxt *bp, · 140 unmodified lines
962972 return NULL;
963973 }
964974 dma_addr -= bp->rx_dma_offset;
965− dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
966− DMA_ATTR_WEAK_ORDERING);
967− skb = build_skb(page_address(page), PAGE_SIZE);
975+ dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, BNXT_RX_PAGE_SIZE,
976+ bp->rx_dir, DMA_ATTR_WEAK_ORDERING);
977+ skb = build_skb(data_ptr - bp->rx_offset, BNXT_RX_PAGE_SIZE);
968978 if (!skb) {
969979 page_pool_recycle_direct(rxr->page_pool, page);
970980 return NULL;
971981 }
972982 skb_mark_for_recycle(skb);
973− skb_reserve(skb, bp->rx_dma_offset);
983+ skb_reserve(skb, bp->rx_offset);
974984 __skb_put(skb, len);
975985
976986 return skb;
@@ -996,8 +1006,8 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp, · 19 unmodified lines
9961006 return NULL;
9971007 }
9981008 dma_addr -= bp->rx_dma_offset;
999− dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
1000− DMA_ATTR_WEAK_ORDERING);
1009+ dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, BNXT_RX_PAGE_SIZE,
1010+ bp->rx_dir, DMA_ATTR_WEAK_ORDERING);
10011011
10021012 if (unlikely(!payload))
10031013 payload = eth_get_headlen(bp->dev, data_ptr, len);
@@ -1010,7 +1020,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp, · 6 unmodified lines
10101020
10111021 skb_mark_for_recycle(skb);
10121022 off = (void *)data_ptr - page_address(page);
1013− skb_add_rx_frag(skb, 0, page, off, len, PAGE_SIZE);
1023+ skb_add_rx_frag(skb, 0, page, off, len, BNXT_RX_PAGE_SIZE);
10141024 memcpy(skb->data - NET_IP_ALIGN, data_ptr - NET_IP_ALIGN,
10151025 payload + NET_IP_ALIGN);
10161026
@@ -1141,7 +1151,7 @@ static struct sk_buff *bnxt_rx_agg_pages_skb(struct bnxt *bp, · 124 unmodified lines
11411151
11421152 skb->data_len += total_frag_len;
11431153 skb->len += total_frag_len;
1144− skb->truesize += PAGE_SIZE * agg_bufs;
1154+ skb->truesize += BNXT_RX_PAGE_SIZE * agg_bufs;
11451155 return skb;
11461156 }
11471157
@@ -2569,12 +2579,11 @@ static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, · 1421 unmodified lines
25692579 return rx_pkts;
25702580 }
25712581
2572−static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi)
2582+static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi,
2583+ int budget)
25732584 {
2574− if (bnapi->tx_pkts) {
2575− bnapi->tx_int(bp, bnapi, bnapi->tx_pkts);
2576− bnapi->tx_pkts = 0;
2577− }
2585+ if (bnapi->tx_pkts)
2586+ bnapi->tx_int(bp, bnapi, budget);
25782587
25792588 if ((bnapi->events & BNXT_RX_EVENT) && !(bnapi->in_reset)) {
25802589 struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
@@ -2603,7 +2612,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, · 22 unmodified lines
26032612 */
26042613 bnxt_db_cq(bp, &cpr->cp_db, cpr->cp_raw_cons);
26052614
2606− __bnxt_poll_work_done(bp, bnapi);
2615+ __bnxt_poll_work_done(bp, bnapi, budget);
26072616 return rx_pkts;
26082617 }
26092618
@@ -2734,7 +2743,7 @@ static int __bnxt_poll_cqs(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) · 124 unmodified lines
27342743 }
27352744
27362745 static void __bnxt_poll_cqs_done(struct bnxt *bp, struct bnxt_napi *bnapi,
2737− u64 dbr_type)
2746+ u64 dbr_type, int budget)
27382747 {
27392748 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring;
27402749 int i;
@@ -2750,7 +2759,7 @@ static void __bnxt_poll_cqs_done(struct bnxt *bp, struct bnxt_napi *bnapi, · 9 unmodified lines
27502759 cpr2->had_work_done = 0;
27512760 }
27522761 }
2753− __bnxt_poll_work_done(bp, bnapi);
2762+ __bnxt_poll_work_done(bp, bnapi, budget);
27542763 }
27552764
27562765 static int bnxt_poll_p5(struct napi_struct *napi, int budget)
@@ -2780,7 +2789,8 @@ static int bnxt_poll_p5(struct napi_struct *napi, int budget) · 23 unmodified lines
27802789 if (cpr->has_more_work)
27812790 break;
27822791
2783− __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL);
2792+ __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL,
2793+ budget);
27842794 cpr->cp_raw_cons = raw_cons;
27852795 if (napi_complete_done(napi, work_done))
27862796 BNXT_DB_NQ_ARM_P5(&cpr->cp_db,
@@ -2810,7 +2820,7 @@ static int bnxt_poll_p5(struct napi_struct *napi, int budget) · 23 unmodified lines
28102820 }
28112821 raw_cons = NEXT_RAW_CMP(raw_cons);
28122822 }
2813− __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ);
2823+ __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ, budget);
28142824 if (raw_cons != cpr->cp_raw_cons) {
28152825 cpr->cp_raw_cons = raw_cons;
28162826 BNXT_DB_NQ_P5(&cpr->cp_db, raw_cons);
@@ -2943,8 +2953,8 @@ skip_rx_tpa_free: · 126 unmodified lines
29432953 rx_buf->data = NULL;
29442954 if (BNXT_RX_PAGE_MODE(bp)) {
29452955 mapping -= bp->rx_dma_offset;
2946− dma_unmap_page_attrs(&pdev->dev, mapping, PAGE_SIZE,
2947− bp->rx_dir,
2956+ dma_unmap_page_attrs(&pdev->dev, mapping,
2957+ BNXT_RX_PAGE_SIZE, bp->rx_dir,
29482958 DMA_ATTR_WEAK_ORDERING);
29492959 page_pool_recycle_direct(rxr->page_pool, data);
29502960 } else {
@@ -3213,6 +3223,8 @@ static int bnxt_alloc_rx_page_pool(struct bnxt *bp, · 262 unmodified lines
32133223 pp.napi = &rxr->bnapi->napi;
32143224 pp.dev = &bp->pdev->dev;
32153225 pp.dma_dir = DMA_BIDIRECTIONAL;
3226+ if (PAGE_SIZE > BNXT_RX_PAGE_SIZE)
3227+ pp.flags |= PP_FLAG_PAGE_FRAG;
32163228
32173229 rxr->page_pool = page_pool_create(&pp);
32183230 if (IS_ERR(rxr->page_pool)) {
@@ -3989,26 +4001,29 @@ void bnxt_set_ring_params(struct bnxt *bp) · 770 unmodified lines
39894001 */
39904002 int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode)
39914003 {
4004+ struct net_device *dev = bp->dev;
4005+
39924006 if (page_mode) {
39934007 bp->flags &= ~BNXT_FLAG_AGG_RINGS;
39944008 bp->flags |= BNXT_FLAG_RX_PAGE_MODE;
39954009
3996− if (bp->dev->mtu > BNXT_MAX_PAGE_MODE_MTU) {
4010+ if (bp->xdp_prog->aux->xdp_has_frags)
4011+ dev->max_mtu = min_t(u16, bp->max_mtu, BNXT_MAX_MTU);
4012+ else
4013+ dev->max_mtu =
4014+ min_t(u16, bp->max_mtu, BNXT_MAX_PAGE_MODE_MTU);
4015+ if (dev->mtu > BNXT_MAX_PAGE_MODE_MTU) {
39974016 bp->flags |= BNXT_FLAG_JUMBO;
39984017 bp->rx_skb_func = bnxt_rx_multi_page_skb;
3999− bp->dev->max_mtu =
4000− min_t(u16, bp->max_mtu, BNXT_MAX_MTU);
40014018 } else {
40024019 bp->flags |= BNXT_FLAG_NO_AGG_RINGS;
40034020 bp->rx_skb_func = bnxt_rx_page_skb;
4004− bp->dev->max_mtu =
4005− min_t(u16, bp->max_mtu, BNXT_MAX_PAGE_MODE_MTU);
40064021 }
40074022 bp->rx_dir = DMA_BIDIRECTIONAL;
40084023 /* Disable LRO or GRO_HW */
4009− netdev_update_features(bp->dev);
4024+ netdev_update_features(dev);
40104025 } else {
4011− bp->dev->max_mtu = bp->max_mtu;
4026+ dev->max_mtu = bp->max_mtu;
40124027 bp->flags &= ~BNXT_FLAG_RX_PAGE_MODE;
40134028 bp->rx_dir = DMA_FROM_DEVICE;
40144029 bp->rx_skb_func = bnxt_rx_skb;
@@ -9429,6 +9444,8 @@ static void bnxt_enable_napi(struct bnxt *bp) · 5414 unmodified lines
94299444 cpr->sw_stats.rx.rx_resets++;
94309445 bnapi->in_reset = false;
94319446
9447+ bnapi->tx_pkts = 0;
9448+
94329449 if (bnapi->rx_ring) {
94339450 INIT_WORK(&cpr->dim.work, bnxt_dim_work);
94349451 cpr->dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
drivers/net/ethernet/broadcom/bnxt/bnxt.h+1−1
@@ -1005,7 +1005,7 @@ struct bnxt_napi { · 1004 unmodified lines
10051005 struct bnxt_tx_ring_info *tx_ring;
10061006
10071007 void (*tx_int)(struct bnxt *, struct bnxt_napi *,
1008− int);
1008+ int budget);
10091009 int tx_pkts;
10101010 u8 events;
10111011
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c+10−4
@@ -125,16 +125,20 @@ static void __bnxt_xmit_xdp_redirect(struct bnxt *bp, · 124 unmodified lines
125125 dma_unmap_len_set(tx_buf, len, 0);
126126 }
127127
128−void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
128+void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
129129 {
130130 struct bnxt_tx_ring_info *txr = bnapi->tx_ring;
131131 struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
132132 bool rx_doorbell_needed = false;
133+ int nr_pkts = bnapi->tx_pkts;
133134 struct bnxt_sw_tx_bd *tx_buf;
134135 u16 tx_cons = txr->tx_cons;
135136 u16 last_tx_cons = tx_cons;
136137 int i, j, frags;
137138
139+ if (!budget)
140+ return;
141+
138142 for (i = 0; i < nr_pkts; i++) {
139143 tx_buf = &txr->tx_buf_ring[tx_cons];
140144
@@ -161,6 +165,8 @@ void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts) · 20 unmodified lines
161165 }
162166 tx_cons = NEXT_TX(tx_cons);
163167 }
168+
169+ bnapi->tx_pkts = 0;
164170 WRITE_ONCE(txr->tx_cons, tx_cons);
165171 if (rx_doorbell_needed) {
166172 tx_buf = &txr->tx_buf_ring[last_tx_cons];
@@ -180,8 +186,8 @@ void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, · 13 unmodified lines
180186 u16 cons, u8 *data_ptr, unsigned int len,
181187 struct xdp_buff *xdp)
182188 {
189+ u32 buflen = BNXT_RX_PAGE_SIZE;
183190 struct bnxt_sw_rx_bd *rx_buf;
184− u32 buflen = PAGE_SIZE;
185191 struct pci_dev *pdev;
186192 dma_addr_t mapping;
187193 u32 offset;
@@ -297,7 +303,7 @@ bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, · 109 unmodified lines
297303 rx_buf = &rxr->rx_buf_ring[cons];
298304 mapping = rx_buf->mapping - bp->rx_dma_offset;
299305 dma_unmap_page_attrs(&pdev->dev, mapping,
300− PAGE_SIZE, bp->rx_dir,
306+ BNXT_RX_PAGE_SIZE, bp->rx_dir,
301307 DMA_ATTR_WEAK_ORDERING);
302308
303309 /* if we are unable to allocate a new buffer, abort and reuse */
@@ -480,7 +486,7 @@ bnxt_xdp_build_skb(struct bnxt *bp, struct sk_buff *skb, u8 num_frags, · 176 unmodified lines
480486 }
481487 xdp_update_skb_shared_info(skb, num_frags,
482488 sinfo->xdp_frags_size,
483− PAGE_SIZE * sinfo->nr_frags,
489+ BNXT_RX_PAGE_SIZE * sinfo->nr_frags,
484490 xdp_buff_is_frag_pfmemalloc(xdp));
485491 return skb;
486492 }
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h+1−1
@@ -16,7 +16,7 @@ struct bnxt_sw_tx_bd *bnxt_xmit_bd(struct bnxt *bp, · 15 unmodified lines
1616 struct bnxt_tx_ring_info *txr,
1717 dma_addr_t mapping, u32 len,
1818 struct xdp_buff *xdp);
19−void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts);
19+void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int budget);
2020 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
2121 struct xdp_buff xdp, struct page *page, u8 **data_ptr,
2222 unsigned int *len, u8 *event);
drivers/net/ethernet/emulex/benet/be_main.c+2−1
@@ -1138,7 +1138,8 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter, · 1137 unmodified lines
11381138 (lancer_chip(adapter) || BE3_chip(adapter) ||
11391139 skb_vlan_tag_present(skb)) && is_ipv4_pkt(skb)) {
11401140 ip = (struct iphdr *)ip_hdr(skb);
1141− pskb_trim(skb, eth_hdr_len + ntohs(ip->tot_len));
1141+ if (unlikely(pskb_trim(skb, eth_hdr_len + ntohs(ip->tot_len))))
1142+ goto tx_drop;
11421143 }
11431144
11441145 /* If vlan tag is already inlined in the packet, skip HW VLAN
drivers/net/ethernet/freescale/enetc/enetc_pf.c+71−40
@@ -1186,14 +1186,9 @@ static int enetc_init_port_rss_memory(struct enetc_si *si) · 1185 unmodified lines
11861186
11871187 static int enetc_pf_register_with_ierb(struct pci_dev *pdev)
11881188 {
1189− struct device_node *node = pdev->dev.of_node;
11901189 struct platform_device *ierb_pdev;
11911190 struct device_node *ierb_node;
11921191
1193− /* Don't register with the IERB if the PF itself is disabled */
1194− if (!node || !of_device_is_available(node))
1195− return 0;
1196−
11971192 ierb_node = of_find_compatible_node(NULL, NULL,
11981193 "fsl,ls1028a-enetc-ierb");
11991194 if (!ierb_node || !of_device_is_available(ierb_node))
@@ -1208,56 +1203,81 @@ static int enetc_pf_register_with_ierb(struct pci_dev *pdev) · 8 unmodified lines
12081203 return enetc_ierb_register_pf(ierb_pdev, pdev);
12091204 }
12101205
1211−static int enetc_pf_probe(struct pci_dev *pdev,
1212− const struct pci_device_id *ent)
1206+static struct enetc_si *enetc_psi_create(struct pci_dev *pdev)
12131207 {
1214− struct device_node *node = pdev->dev.of_node;
1215− struct enetc_ndev_priv *priv;
1216− struct net_device *ndev;
12171208 struct enetc_si *si;
1218− struct enetc_pf *pf;
12191209 int err;
12201210
1221− err = enetc_pf_register_with_ierb(pdev);
1222− if (err == -EPROBE_DEFER)
1223− return err;
1224− if (err)
1225− dev_warn(&pdev->dev,
1226− "Could not register with IERB driver: %pe, please update the device tree\n",
1227− ERR_PTR(err));
1228−
1229− err = enetc_pci_probe(pdev, KBUILD_MODNAME, sizeof(*pf));
1230− if (err)
1231− return dev_err_probe(&pdev->dev, err, "PCI probing failed\n");
1211+ err = enetc_pci_probe(pdev, KBUILD_MODNAME, sizeof(struct enetc_pf));
1212+ if (err) {
1213+ dev_err_probe(&pdev->dev, err, "PCI probing failed\n");
1214+ goto out;
1215+ }
12321216
12331217 si = pci_get_drvdata(pdev);
12341218 if (!si->hw.port || !si->hw.global) {
12351219 err = -ENODEV;
12361220 dev_err(&pdev->dev, "could not map PF space, probing a VF?\n");
1237− goto err_map_pf_space;
1221+ goto out_pci_remove;
12381222 }
12391223
12401224 err = enetc_setup_cbdr(&pdev->dev, &si->hw, ENETC_CBDR_DEFAULT_SIZE,
12411225 &si->cbd_ring);
12421226 if (err)
1243− goto err_setup_cbdr;
1227+ goto out_pci_remove;
12441228
12451229 err = enetc_init_port_rfs_memory(si);
12461230 if (err) {
12471231 dev_err(&pdev->dev, "Failed to initialize RFS memory\n");
1248− goto err_init_port_rfs;
1232+ goto out_teardown_cbdr;
12491233 }
12501234
12511235 err = enetc_init_port_rss_memory(si);
12521236 if (err) {
12531237 dev_err(&pdev->dev, "Failed to initialize RSS memory\n");
1254− goto err_init_port_rss;
1238+ goto out_teardown_cbdr;
12551239 }
12561240
1257− if (node && !of_device_is_available(node)) {
1258− dev_info(&pdev->dev, "device is disabled, skipping\n");
1259− err = -ENODEV;
1260− goto err_device_disabled;
1241+ return si;
1242+
1243+out_teardown_cbdr:
1244+ enetc_teardown_cbdr(&si->cbd_ring);
1245+out_pci_remove:
1246+ enetc_pci_remove(pdev);
1247+out:
1248+ return ERR_PTR(err);
1249+}
1250+
1251+static void enetc_psi_destroy(struct pci_dev *pdev)
1252+{
1253+ struct enetc_si *si = pci_get_drvdata(pdev);
1254+
1255+ enetc_teardown_cbdr(&si->cbd_ring);
1256+ enetc_pci_remove(pdev);
1257+}
1258+
1259+static int enetc_pf_probe(struct pci_dev *pdev,
1260+ const struct pci_device_id *ent)
1261+{
1262+ struct device_node *node = pdev->dev.of_node;
1263+ struct enetc_ndev_priv *priv;
1264+ struct net_device *ndev;
1265+ struct enetc_si *si;
1266+ struct enetc_pf *pf;
1267+ int err;
1268+
1269+ err = enetc_pf_register_with_ierb(pdev);
1270+ if (err == -EPROBE_DEFER)
1271+ return err;
1272+ if (err)
1273+ dev_warn(&pdev->dev,
1274+ "Could not register with IERB driver: %pe, please update the device tree\n",
1275+ ERR_PTR(err));
1276+
1277+ si = enetc_psi_create(pdev);
1278+ if (IS_ERR(si)) {
1279+ err = PTR_ERR(si);
1280+ goto err_psi_create;
12611281 }
12621282
12631283 pf = enetc_si_priv(si);
@@ -1339,15 +1359,9 @@ err_alloc_si_res: · 75 unmodified lines
13391359 si->ndev = NULL;
13401360 free_netdev(ndev);
13411361 err_alloc_netdev:
1342−err_init_port_rss:
1343−err_init_port_rfs:
1344−err_device_disabled:
13451362 err_setup_mac_addresses:
1346− enetc_teardown_cbdr(&si->cbd_ring);
1347−err_setup_cbdr:
1348−err_map_pf_space:
1349− enetc_pci_remove(pdev);
1350−
1363+ enetc_psi_destroy(pdev);
1364+err_psi_create:
13511365 return err;
13521366 }
13531367
@@ -1370,12 +1384,29 @@ static void enetc_pf_remove(struct pci_dev *pdev) · 16 unmodified lines
13701384 enetc_free_msix(priv);
13711385
13721386 enetc_free_si_resources(priv);
1373− enetc_teardown_cbdr(&si->cbd_ring);
13741387
13751388 free_netdev(si->ndev);
13761389
1377− enetc_pci_remove(pdev);
1390+ enetc_psi_destroy(pdev);
1391+}
1392+
1393+static void enetc_fixup_clear_rss_rfs(struct pci_dev *pdev)
1394+{
1395+ struct device_node *node = pdev->dev.of_node;
1396+ struct enetc_si *si;
1397+
1398+ /* Only apply quirk for disabled functions. For the ones
1399+ * that are enabled, enetc_pf_probe() will apply it.
1400+ */
1401+ if (node && of_device_is_available(node))
1402+ return;
1403+
1404+ si = enetc_psi_create(pdev);
1405+ if (si)
1406+ enetc_psi_destroy(pdev);
13781407 }
1408+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID_PF,
1409+ enetc_fixup_clear_rss_rfs);
13791410
13801411 static const struct pci_device_id enetc_pf_id_table[] = {
13811412 { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID_PF) },
drivers/net/ethernet/freescale/fec_main.c+14−4
@@ -1372,7 +1372,7 @@ fec_enet_hwtstamp(struct fec_enet_private *fep, unsigned ts, · 1371 unmodified lines
13721372 }
13731373
13741374 static void
1375−fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
1375+fec_enet_tx_queue(struct net_device *ndev, u16 queue_id, int budget)
13761376 {
13771377 struct fec_enet_private *fep;
13781378 struct xdp_frame *xdpf;
@@ -1416,6 +1416,14 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id) · 37 unmodified lines
14161416 if (!skb)
14171417 goto tx_buf_done;
14181418 } else {
1419+ /* Tx processing cannot call any XDP (or page pool) APIs if
1420+ * the "budget" is 0. Because NAPI is called with budget of
1421+ * 0 (such as netpoll) indicates we may be in an IRQ context,
1422+ * however, we can't use the page pool from IRQ context.
1423+ */
1424+ if (unlikely(!budget))
1425+ break;
1426+
14191427 xdpf = txq->tx_buf[index].xdp;
14201428 if (bdp->cbd_bufaddr)
14211429 dma_unmap_single(&fep->pdev->dev,
@@ -1508,14 +1516,14 @@ tx_buf_done: · 86 unmodified lines
15081516 writel(0, txq->bd.reg_desc_active);
15091517 }
15101518
1511−static void fec_enet_tx(struct net_device *ndev)
1519+static void fec_enet_tx(struct net_device *ndev, int budget)
15121520 {
15131521 struct fec_enet_private *fep = netdev_priv(ndev);
15141522 int i;
15151523
15161524 /* Make sure that AVB queues are processed first. */
15171525 for (i = fep->num_tx_queues - 1; i >= 0; i--)
1518− fec_enet_tx_queue(ndev, i);
1526+ fec_enet_tx_queue(ndev, i, budget);
15191527 }
15201528
15211529 static void fec_enet_update_cbd(struct fec_enet_priv_rx_q *rxq,
@@ -1858,7 +1866,7 @@ static int fec_enet_rx_napi(struct napi_struct *napi, int budget) · 336 unmodified lines
18581866
18591867 do {
18601868 done += fec_enet_rx(ndev, budget - done);
1861− fec_enet_tx(ndev);
1869+ fec_enet_tx(ndev, budget);
18621870 } while ((done < budget) && fec_enet_collect_events(fep));
18631871
18641872 if (done < budget) {
@@ -3916,6 +3924,8 @@ static int fec_enet_xdp_xmit(struct net_device *dev, · 2051 unmodified lines
39163924
39173925 __netif_tx_lock(nq, cpu);
39183926
3927+ /* Avoid tx timeout as XDP shares the queue with kernel stack */
3928+ txq_trans_cond_update(nq);
39193929 for (i = 0; i < num_frames; i++) {
39203930 if (fec_enet_txq_xmit_frame(fep, txq, frames[i]) < 0)
39213931 break;
drivers/net/ethernet/hisilicon/hns3/hnae3.h+6−1
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 #include <linux/pci.h>
3232 #include <linux/pkt_sched.h>
3333 #include <linux/types.h>
34+#include <linux/bitmap.h>
3435 #include <net/pkt_cls.h>
3536 #include <net/pkt_sched.h>
3637
@@ -101,6 +102,7 @@ enum HNAE3_DEV_CAP_BITS { · 64 unmodified lines
101102 HNAE3_DEV_SUPPORT_FEC_STATS_B,
102103 HNAE3_DEV_SUPPORT_LANE_NUM_B,
103104 HNAE3_DEV_SUPPORT_WOL_B,
105+ HNAE3_DEV_SUPPORT_TM_FLUSH_B,
104106 };
105107
106108 #define hnae3_ae_dev_fd_supported(ae_dev) \
@@ -172,6 +174,9 @@ enum HNAE3_DEV_CAP_BITS { · 65 unmodified lines
172174 #define hnae3_ae_dev_wol_supported(ae_dev) \
173175 test_bit(HNAE3_DEV_SUPPORT_WOL_B, (ae_dev)->caps)
174176
177+#define hnae3_ae_dev_tm_flush_supported(hdev) \
178+ test_bit(HNAE3_DEV_SUPPORT_TM_FLUSH_B, (hdev)->ae_dev->caps)
179+
175180 enum HNAE3_PF_CAP_BITS {
176181 HNAE3_PF_SUPPORT_VLAN_FLTR_MDF_B = 0,
177182 };
@@ -407,7 +412,7 @@ struct hnae3_ae_dev { · 229 unmodified lines
407412 unsigned long hw_err_reset_req;
408413 struct hnae3_dev_specs dev_specs;
409414 u32 dev_version;
410− unsigned long caps[BITS_TO_LONGS(HNAE3_DEV_CAPS_MAX_NUM)];
415+ DECLARE_BITMAP(caps, HNAE3_DEV_CAPS_MAX_NUM);
411416 void *priv;
412417 };
413418
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c+19−3
@@ -156,6 +156,7 @@ static const struct hclge_comm_caps_bit_map hclge_pf_cmd_caps[] = { · 155 unmodified lines
156156 {HCLGE_COMM_CAP_FEC_STATS_B, HNAE3_DEV_SUPPORT_FEC_STATS_B},
157157 {HCLGE_COMM_CAP_LANE_NUM_B, HNAE3_DEV_SUPPORT_LANE_NUM_B},
158158 {HCLGE_COMM_CAP_WOL_B, HNAE3_DEV_SUPPORT_WOL_B},
159+ {HCLGE_COMM_CAP_TM_FLUSH_B, HNAE3_DEV_SUPPORT_TM_FLUSH_B},
159160 };
160161
161162 static const struct hclge_comm_caps_bit_map hclge_vf_cmd_caps[] = {
@@ -171,6 +172,20 @@ static const struct hclge_comm_caps_bit_map hclge_vf_cmd_caps[] = { · 9 unmodified lines
171172 {HCLGE_COMM_CAP_GRO_B, HNAE3_DEV_SUPPORT_GRO_B},
172173 };
173174
175+static void
176+hclge_comm_capability_to_bitmap(unsigned long *bitmap, __le32 *caps)
177+{
178+ const unsigned int words = HCLGE_COMM_QUERY_CAP_LENGTH;
179+ u32 val[HCLGE_COMM_QUERY_CAP_LENGTH];
180+ unsigned int i;
181+
182+ for (i = 0; i < words; i++)
183+ val[i] = __le32_to_cpu(caps[i]);
184+
185+ bitmap_from_arr32(bitmap, val,
186+ HCLGE_COMM_QUERY_CAP_LENGTH * BITS_PER_TYPE(u32));
187+}
188+
174189 static void
175190 hclge_comm_parse_capability(struct hnae3_ae_dev *ae_dev, bool is_pf,
176191 struct hclge_comm_query_version_cmd *cmd)
@@ -179,11 +194,12 @@ hclge_comm_parse_capability(struct hnae3_ae_dev *ae_dev, bool is_pf, · 2 unmodified lines
179194 is_pf ? hclge_pf_cmd_caps : hclge_vf_cmd_caps;
180195 u32 size = is_pf ? ARRAY_SIZE(hclge_pf_cmd_caps) :
181196 ARRAY_SIZE(hclge_vf_cmd_caps);
182− u32 caps, i;
197+ DECLARE_BITMAP(caps, HCLGE_COMM_QUERY_CAP_LENGTH * BITS_PER_TYPE(u32));
198+ u32 i;
183199
184− caps = __le32_to_cpu(cmd->caps[0]);
200+ hclge_comm_capability_to_bitmap(caps, cmd->caps);
185201 for (i = 0; i < size; i++)
186− if (hnae3_get_bit(caps, caps_map[i].imp_bit))
202+ if (test_bit(caps_map[i].imp_bit, caps))
187203 set_bit(caps_map[i].local_bit, ae_dev->caps);
188204 }
189205
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h+2−0
@@ -153,6 +153,7 @@ enum hclge_opcode_type { · 152 unmodified lines
153153 HCLGE_OPC_TM_INTERNAL_STS = 0x0850,
154154 HCLGE_OPC_TM_INTERNAL_CNT = 0x0851,
155155 HCLGE_OPC_TM_INTERNAL_STS_1 = 0x0852,
156+ HCLGE_OPC_TM_FLUSH = 0x0872,
156157
157158 /* Packet buffer allocate commands */
158159 HCLGE_OPC_TX_BUFF_ALLOC = 0x0901,
@@ -349,6 +350,7 @@ enum HCLGE_COMM_CAP_BITS { · 190 unmodified lines
349350 HCLGE_COMM_CAP_FEC_STATS_B = 25,
350351 HCLGE_COMM_CAP_LANE_NUM_B = 27,
351352 HCLGE_COMM_CAP_WOL_B = 28,
353+ HCLGE_COMM_CAP_TM_FLUSH_B = 31,
352354 };
353355
354356 enum HCLGE_COMM_API_CAP_BITS {
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c+5−2
@@ -411,6 +411,9 @@ static struct hns3_dbg_cap_info hns3_dbg_cap[] = { · 410 unmodified lines
411411 }, {
412412 .name = "support wake on lan",
413413 .cap_bit = HNAE3_DEV_SUPPORT_WOL_B,
414+ }, {
415+ .name = "support tm flush",
416+ .cap_bit = HNAE3_DEV_SUPPORT_TM_FLUSH_B,
414417 }
415418 };
416419
@@ -461,9 +464,9 @@ static void hns3_dbg_fill_content(char *content, u16 len, · 44 unmodified lines
461464 if (result) {
462465 if (item_len < strlen(result[i]))
463466 break;
464− strscpy(pos, result[i], strlen(result[i]));
467+ memcpy(pos, result[i], strlen(result[i]));
465468 } else {
466− strscpy(pos, items[i].name, strlen(items[i].name));
469+ memcpy(pos, items[i].name, strlen(items[i].name));
467470 }
468471 pos += item_len;
469472 len -= item_len;
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c+13−1
@@ -5854,6 +5854,9 @@ void hns3_external_lb_prepare(struct net_device *ndev, bool if_running) · 5853 unmodified lines
58545854 if (!if_running)
58555855 return;
58565856
5857+ if (test_and_set_bit(HNS3_NIC_STATE_DOWN, &priv->state))
5858+ return;
5859+
58575860 netif_carrier_off(ndev);
58585861 netif_tx_disable(ndev);
58595862
@@ -5882,7 +5885,16 @@ void hns3_external_lb_restore(struct net_device *ndev, bool if_running) · 22 unmodified lines
58825885 if (!if_running)
58835886 return;
58845887
5885− hns3_nic_reset_all_ring(priv->ae_handle);
5888+ if (hns3_nic_resetting(ndev))
5889+ return;
5890+
5891+ if (!test_bit(HNS3_NIC_STATE_DOWN, &priv->state))
5892+ return;
5893+
5894+ if (hns3_nic_reset_all_ring(priv->ae_handle))
5895+ return;
5896+
5897+ clear_bit(HNS3_NIC_STATE_DOWN, &priv->state);
58865898
58875899 for (i = 0; i < priv->vector_num; i++)
58885900 hns3_vector_enable(&priv->tqp_vector[i]);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c+43−8
@@ -52,7 +52,10 @@ static void hclge_tm_info_to_ieee_ets(struct hclge_dev *hdev, · 51 unmodified lines
5252
5353 for (i = 0; i < HNAE3_MAX_TC; i++) {
5454 ets->prio_tc[i] = hdev->tm_info.prio_tc[i];
55− ets->tc_tx_bw[i] = hdev->tm_info.pg_info[0].tc_dwrr[i];
55+ if (i < hdev->tm_info.num_tc)
56+ ets->tc_tx_bw[i] = hdev->tm_info.pg_info[0].tc_dwrr[i];
57+ else
58+ ets->tc_tx_bw[i] = 0;
5659
5760 if (hdev->tm_info.tc_info[i].tc_sch_mode ==
5861 HCLGE_SCH_MODE_SP)
@@ -123,7 +126,8 @@ static u8 hclge_ets_tc_changed(struct hclge_dev *hdev, struct ieee_ets *ets, · 64 unmodified lines
123126 }
124127
125128 static int hclge_ets_sch_mode_validate(struct hclge_dev *hdev,
126− struct ieee_ets *ets, bool *changed)
129+ struct ieee_ets *ets, bool *changed,
130+ u8 tc_num)
127131 {
128132 bool has_ets_tc = false;
129133 u32 total_ets_bw = 0;
@@ -137,6 +141,13 @@ static int hclge_ets_sch_mode_validate(struct hclge_dev *hdev, · 7 unmodified lines
137141 *changed = true;
138142 break;
139143 case IEEE_8021QAZ_TSA_ETS:
144+ if (i >= tc_num) {
145+ dev_err(&hdev->pdev->dev,
146+ "tc%u is disabled, cannot set ets bw\n",
147+ i);
148+ return -EINVAL;
149+ }
150+
140151 /* The hardware will switch to sp mode if bandwidth is
141152 * 0, so limit ets bandwidth must be greater than 0.
142153 */
@@ -176,7 +187,7 @@ static int hclge_ets_validate(struct hclge_dev *hdev, struct ieee_ets *ets, · 33 unmodified lines
176187 if (ret)
177188 return ret;
178189
179− ret = hclge_ets_sch_mode_validate(hdev, ets, changed);
190+ ret = hclge_ets_sch_mode_validate(hdev, ets, changed, tc_num);
180191 if (ret)
181192 return ret;
182193
@@ -216,6 +227,10 @@ static int hclge_notify_down_uinit(struct hclge_dev *hdev) · 33 unmodified lines
216227 if (ret)
217228 return ret;
218229
230+ ret = hclge_tm_flush_cfg(hdev, true);
231+ if (ret)
232+ return ret;
233+
219234 return hclge_notify_client(hdev, HNAE3_UNINIT_CLIENT);
220235 }
221236
@@ -227,6 +242,10 @@ static int hclge_notify_init_up(struct hclge_dev *hdev) · 5 unmodified lines
227242 if (ret)
228243 return ret;
229244
245+ ret = hclge_tm_flush_cfg(hdev, false);
246+ if (ret)
247+ return ret;
248+
230249 return hclge_notify_client(hdev, HNAE3_UP_CLIENT);
231250 }
232251
@@ -313,6 +332,7 @@ static int hclge_ieee_setpfc(struct hnae3_handle *h, struct ieee_pfc *pfc) · 80 unmodified lines
313332 struct net_device *netdev = h->kinfo.netdev;
314333 struct hclge_dev *hdev = vport->back;
315334 u8 i, j, pfc_map, *prio_tc;
335+ int last_bad_ret = 0;
316336 int ret;
317337
318338 if (!(hdev->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))
@@ -350,13 +370,28 @@ static int hclge_ieee_setpfc(struct hnae3_handle *h, struct ieee_pfc *pfc) · 31 unmodified lines
350370 if (ret)
351371 return ret;
352372
353− ret = hclge_buffer_alloc(hdev);
354− if (ret) {
355− hclge_notify_client(hdev, HNAE3_UP_CLIENT);
373+ ret = hclge_tm_flush_cfg(hdev, true);
374+ if (ret)
356375 return ret;
357− }
358376
359− return hclge_notify_client(hdev, HNAE3_UP_CLIENT);
377+ /* No matter whether the following operations are performed
378+ * successfully or not, disabling the tm flush and notify
379+ * the network status to up are necessary.
380+ * Do not return immediately.
381+ */
382+ ret = hclge_buffer_alloc(hdev);
383+ if (ret)
384+ last_bad_ret = ret;
385+
386+ ret = hclge_tm_flush_cfg(hdev, false);
387+ if (ret)
388+ last_bad_ret = ret;
389+
390+ ret = hclge_notify_client(hdev, HNAE3_UP_CLIENT);
391+ if (ret)
392+ last_bad_ret = ret;
393+
394+ return last_bad_ret;
360395 }
361396
362397 static int hclge_ieee_setapp(struct hnae3_handle *h, struct dcb_app *app)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c+3−4
@@ -111,9 +111,9 @@ static void hclge_dbg_fill_content(char *content, u16 len, · 110 unmodified lines
111111 if (result) {
112112 if (item_len < strlen(result[i]))
113113 break;
114− strscpy(pos, result[i], strlen(result[i]));
114+ memcpy(pos, result[i], strlen(result[i]));
115115 } else {
116− strscpy(pos, items[i].name, strlen(items[i].name));
116+ memcpy(pos, items[i].name, strlen(items[i].name));
117117 }
118118 pos += item_len;
119119 len -= item_len;
@@ -693,8 +693,7 @@ static int hclge_dbg_dump_tc(struct hclge_dev *hdev, char *buf, int len) · 573 unmodified lines
693693 for (i = 0; i < HNAE3_MAX_TC; i++) {
694694 sch_mode_str = ets_weight->tc_weight[i] ? "dwrr" : "sp";
695695 pos += scnprintf(buf + pos, len - pos, "%u %4s %3u\n",
696− i, sch_mode_str,
697− hdev->tm_info.pg_info[0].tc_dwrr[i]);
696+ i, sch_mode_str, ets_weight->tc_weight[i]);
698697 }
699698
700699 return 0;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c+22−7
@@ -72,6 +72,8 @@ static void hclge_restore_hw_table(struct hclge_dev *hdev); · 71 unmodified lines
7272 static void hclge_sync_promisc_mode(struct hclge_dev *hdev);
7373 static void hclge_sync_fd_table(struct hclge_dev *hdev);
7474 static void hclge_update_fec_stats(struct hclge_dev *hdev);
75+static int hclge_mac_link_status_wait(struct hclge_dev *hdev, int link_ret,
76+ int wait_cnt);
7577
7678 static struct hnae3_ae_algo ae_algo;
7779
@@ -7558,6 +7560,8 @@ static void hclge_enable_fd(struct hnae3_handle *handle, bool enable) · 7480 unmodified lines
75587560
75597561 static void hclge_cfg_mac_mode(struct hclge_dev *hdev, bool enable)
75607562 {
7563+#define HCLGE_LINK_STATUS_WAIT_CNT 3
7564+
75617565 struct hclge_desc desc;
75627566 struct hclge_config_mac_mode_cmd *req =
75637567 (struct hclge_config_mac_mode_cmd *)desc.data;
@@ -7582,9 +7586,15 @@ static void hclge_cfg_mac_mode(struct hclge_dev *hdev, bool enable) · 18 unmodified lines
75827586 req->txrx_pad_fcs_loop_en = cpu_to_le32(loop_en);
75837587
75847588 ret = hclge_cmd_send(&hdev->hw, &desc, 1);
7585− if (ret)
7589+ if (ret) {
75867590 dev_err(&hdev->pdev->dev,
75877591 "mac enable fail, ret =%d.\n", ret);
7592+ return;
7593+ }
7594+
7595+ if (!enable)
7596+ hclge_mac_link_status_wait(hdev, HCLGE_LINK_STATUS_DOWN,
7597+ HCLGE_LINK_STATUS_WAIT_CNT);
75887598 }
75897599
75907600 static int hclge_config_switch_param(struct hclge_dev *hdev, int vfid,
@@ -7647,10 +7657,9 @@ static void hclge_phy_link_status_wait(struct hclge_dev *hdev, · 56 unmodified lines
76477657 } while (++i < HCLGE_PHY_LINK_STATUS_NUM);
76487658 }
76497659
7650−static int hclge_mac_link_status_wait(struct hclge_dev *hdev, int link_ret)
7660+static int hclge_mac_link_status_wait(struct hclge_dev *hdev, int link_ret,
7661+ int wait_cnt)
76517662 {
7652−#define HCLGE_MAC_LINK_STATUS_NUM 100
7653−
76547663 int link_status;
76557664 int i = 0;
76567665 int ret;
@@ -7663,13 +7672,15 @@ static int hclge_mac_link_status_wait(struct hclge_dev *hdev, int link_ret) · 6 unmodified lines
76637672 return 0;
76647673
76657674 msleep(HCLGE_LINK_STATUS_MS);
7666− } while (++i < HCLGE_MAC_LINK_STATUS_NUM);
7675+ } while (++i < wait_cnt);
76677676 return -EBUSY;
76687677 }
76697678
76707679 static int hclge_mac_phy_link_status_wait(struct hclge_dev *hdev, bool en,
76717680 bool is_phy)
76727681 {
7682+#define HCLGE_MAC_LINK_STATUS_NUM 100
7683+
76737684 int link_ret;
76747685
76757686 link_ret = en ? HCLGE_LINK_STATUS_UP : HCLGE_LINK_STATUS_DOWN;
@@ -7677,7 +7688,8 @@ static int hclge_mac_phy_link_status_wait(struct hclge_dev *hdev, bool en, · 1 unmodified line
76777688 if (is_phy)
76787689 hclge_phy_link_status_wait(hdev, link_ret);
76797690
7680− return hclge_mac_link_status_wait(hdev, link_ret);
7691+ return hclge_mac_link_status_wait(hdev, link_ret,
7692+ HCLGE_MAC_LINK_STATUS_NUM);
76817693 }
76827694
76837695 static int hclge_set_app_loopback(struct hclge_dev *hdev, bool en)
@@ -10915,9 +10927,12 @@ int hclge_cfg_flowctrl(struct hclge_dev *hdev) · 3231 unmodified lines
1091510927 u32 rx_pause, tx_pause;
1091610928 u8 flowctl;
1091710929
10918− if (!phydev->link || !phydev->autoneg)
10930+ if (!phydev->link)
1091910931 return 0;
1092010932
10933+ if (!phydev->autoneg)
10934+ return hclge_mac_pause_setup_hw(hdev);
10935+
1092110936 local_advertising = linkmode_adv_to_lcl_adv_t(phydev->advertising);
1092210937
1092310938 if (phydev->pause)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c+33−3
@@ -785,6 +785,7 @@ static void hclge_tm_tc_info_init(struct hclge_dev *hdev) · 784 unmodified lines
785785 static void hclge_tm_pg_info_init(struct hclge_dev *hdev)
786786 {
787787 #define BW_PERCENT 100
788+#define DEFAULT_BW_WEIGHT 1
788789
789790 u8 i;
790791
@@ -806,7 +807,7 @@ static void hclge_tm_pg_info_init(struct hclge_dev *hdev) · 15 unmodified lines
806807 for (k = 0; k < hdev->tm_info.num_tc; k++)
807808 hdev->tm_info.pg_info[i].tc_dwrr[k] = BW_PERCENT;
808809 for (; k < HNAE3_MAX_TC; k++)
809− hdev->tm_info.pg_info[i].tc_dwrr[k] = 0;
810+ hdev->tm_info.pg_info[i].tc_dwrr[k] = DEFAULT_BW_WEIGHT;
810811 }
811812 }
812813
@@ -1484,7 +1485,11 @@ int hclge_tm_schd_setup_hw(struct hclge_dev *hdev) · 671 unmodified lines
14841485 return ret;
14851486
14861487 /* Cfg schd mode for each level schd */
1487− return hclge_tm_schd_mode_hw(hdev);
1488+ ret = hclge_tm_schd_mode_hw(hdev);
1489+ if (ret)
1490+ return ret;
1491+
1492+ return hclge_tm_flush_cfg(hdev, false);
14881493 }
14891494
14901495 static int hclge_pause_param_setup_hw(struct hclge_dev *hdev)
@@ -1548,7 +1553,7 @@ static int hclge_bp_setup_hw(struct hclge_dev *hdev, u8 tc) · 57 unmodified lines
15481553 return 0;
15491554 }
15501555
1551−static int hclge_mac_pause_setup_hw(struct hclge_dev *hdev)
1556+int hclge_mac_pause_setup_hw(struct hclge_dev *hdev)
15521557 {
15531558 bool tx_en, rx_en;
15541559
@@ -2113,3 +2118,28 @@ int hclge_tm_get_port_shaper(struct hclge_dev *hdev, · 558 unmodified lines
21132118
21142119 return 0;
21152120 }
2121+
2122+int hclge_tm_flush_cfg(struct hclge_dev *hdev, bool enable)
2123+{
2124+ struct hclge_desc desc;
2125+ int ret;
2126+
2127+ if (!hnae3_ae_dev_tm_flush_supported(hdev))
2128+ return 0;
2129+
2130+ hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TM_FLUSH, false);
2131+
2132+ desc.data[0] = cpu_to_le32(enable ? HCLGE_TM_FLUSH_EN_MSK : 0);
2133+
2134+ ret = hclge_cmd_send(&hdev->hw, &desc, 1);
2135+ if (ret) {
2136+ dev_err(&hdev->pdev->dev,
2137+ "failed to config tm flush, ret = %d\n", ret);
2138+ return ret;
2139+ }
2140+
2141+ if (enable)
2142+ msleep(HCLGE_TM_FLUSH_TIME_MS);
2143+
2144+ return ret;
2145+}
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h+5−0
@@ -33,6 +33,9 @@ enum hclge_opcode_type; · 32 unmodified lines
3333 #define HCLGE_DSCP_MAP_TC_BD_NUM 2
3434 #define HCLGE_DSCP_TC_SHIFT(n) (((n) & 1) * 4)
3535
36+#define HCLGE_TM_FLUSH_TIME_MS 10
37+#define HCLGE_TM_FLUSH_EN_MSK BIT(0)
38+
3639 struct hclge_pg_to_pri_link_cmd {
3740 u8 pg_id;
3841 u8 rsvd1[3];
@@ -242,6 +245,7 @@ int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap, · 203 unmodified lines
242245 u8 pfc_bitmap);
243246 int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx);
244247 int hclge_pause_addr_cfg(struct hclge_dev *hdev, const u8 *mac_addr);
248+int hclge_mac_pause_setup_hw(struct hclge_dev *hdev);
245249 void hclge_pfc_rx_stats_get(struct hclge_dev *hdev, u64 *stats);
246250 void hclge_pfc_tx_stats_get(struct hclge_dev *hdev, u64 *stats);
247251 int hclge_tm_qs_shaper_cfg(struct hclge_vport *vport, int max_tx_rate);
@@ -272,4 +276,5 @@ int hclge_tm_get_port_shaper(struct hclge_dev *hdev, · 24 unmodified lines
272276 struct hclge_tm_shaper_para *para);
273277 int hclge_up_to_tc_map(struct hclge_dev *hdev);
274278 int hclge_dscp_to_tc_map(struct hclge_dev *hdev);
279+int hclge_tm_flush_cfg(struct hclge_dev *hdev, bool enable);
275280 #endif
drivers/net/ethernet/ibm/ibmvnic.c+99−13
@@ -97,6 +97,8 @@ static int pending_scrq(struct ibmvnic_adapter *, · 96 unmodified lines
9797 static union sub_crq *ibmvnic_next_scrq(struct ibmvnic_adapter *,
9898 struct ibmvnic_sub_crq_queue *);
9999 static int ibmvnic_poll(struct napi_struct *napi, int data);
100+static int reset_sub_crq_queues(struct ibmvnic_adapter *adapter);
101+static inline void reinit_init_done(struct ibmvnic_adapter *adapter);
100102 static void send_query_map(struct ibmvnic_adapter *adapter);
101103 static int send_request_map(struct ibmvnic_adapter *, dma_addr_t, u32, u8);
102104 static int send_request_unmap(struct ibmvnic_adapter *, u8);
@@ -114,6 +116,7 @@ static void ibmvnic_tx_scrq_clean_buffer(struct ibmvnic_adapter *adapter, · 11 unmodified lines
114116 static void free_long_term_buff(struct ibmvnic_adapter *adapter,
115117 struct ibmvnic_long_term_buff *ltb);
116118 static void ibmvnic_disable_irqs(struct ibmvnic_adapter *adapter);
119+static void flush_reset_queue(struct ibmvnic_adapter *adapter);
117120
118121 struct ibmvnic_stat {
119122 char name[ETH_GSTRING_LEN];
@@ -1505,8 +1508,8 @@ static const char *adapter_state_to_string(enum vnic_state state) · 1385 unmodified lines
15051508
15061509 static int ibmvnic_login(struct net_device *netdev)
15071510 {
1511+ unsigned long flags, timeout = msecs_to_jiffies(20000);
15081512 struct ibmvnic_adapter *adapter = netdev_priv(netdev);
1509− unsigned long timeout = msecs_to_jiffies(20000);
15101513 int retry_count = 0;
15111514 int retries = 10;
15121515 bool retry;
@@ -1527,11 +1530,9 @@ static int ibmvnic_login(struct net_device *netdev) · 14 unmodified lines
15271530
15281531 if (!wait_for_completion_timeout(&adapter->init_done,
15291532 timeout)) {
1530− netdev_warn(netdev, "Login timed out, retrying...\n");
1531− retry = true;
1532− adapter->init_done_rc = 0;
1533− retry_count++;
1534− continue;
1533+ netdev_warn(netdev, "Login timed out\n");
1534+ adapter->login_pending = false;
1535+ goto partial_reset;
15351536 }
15361537
15371538 if (adapter->init_done_rc == ABORTED) {
@@ -1573,10 +1574,69 @@ static int ibmvnic_login(struct net_device *netdev) · 35 unmodified lines
15731574 "SCRQ irq initialization failed\n");
15741575 return rc;
15751576 }
1577+ /* Default/timeout error handling, reset and start fresh */
15761578 } else if (adapter->init_done_rc) {
15771579 netdev_warn(netdev, "Adapter login failed, init_done_rc = %d\n",
15781580 adapter->init_done_rc);
1579− return -EIO;
1581+
1582+partial_reset:
1583+ /* adapter login failed, so free any CRQs or sub-CRQs
1584+ * and register again before attempting to login again.
1585+ * If we don't do this then the VIOS may think that
1586+ * we are already logged in and reject any subsequent
1587+ * attempts
1588+ */
1589+ netdev_warn(netdev,
1590+ "Freeing and re-registering CRQs before attempting to login again\n");
1591+ retry = true;
1592+ adapter->init_done_rc = 0;
1593+ release_sub_crqs(adapter, true);
1594+ /* Much of this is similar logic as ibmvnic_probe(),
1595+ * we are essentially re-initializing communication
1596+ * with the server. We really should not run any
1597+ * resets/failovers here because this is already a form
1598+ * of reset and we do not want parallel resets occurring
1599+ */
1600+ do {
1601+ reinit_init_done(adapter);
1602+ /* Clear any failovers we got in the previous
1603+ * pass since we are re-initializing the CRQ
1604+ */
1605+ adapter->failover_pending = false;
1606+ release_crq_queue(adapter);
1607+ /* If we don't sleep here then we risk an
1608+ * unnecessary failover event from the VIOS.
1609+ * This is a known VIOS issue caused by a vnic
1610+ * device freeing and registering a CRQ too
1611+ * quickly.
1612+ */
1613+ msleep(1500);
1614+ /* Avoid any resets, since we are currently
1615+ * resetting.
1616+ */
1617+ spin_lock_irqsave(&adapter->rwi_lock, flags);
1618+ flush_reset_queue(adapter);
1619+ spin_unlock_irqrestore(&adapter->rwi_lock,
1620+ flags);
1621+
1622+ rc = init_crq_queue(adapter);
1623+ if (rc) {
1624+ netdev_err(netdev, "login recovery: init CRQ failed %d\n",
1625+ rc);
1626+ return -EIO;
1627+ }
1628+
1629+ rc = ibmvnic_reset_init(adapter, false);
1630+ if (rc)
1631+ netdev_err(netdev, "login recovery: Reset init failed %d\n",
1632+ rc);
1633+ /* IBMVNIC_CRQ_INIT will return EAGAIN if it
1634+ * fails, since ibmvnic_reset_init will free
1635+ * irq's in failure, we won't be able to receive
1636+ * new CRQs so we need to keep trying. probe()
1637+ * handles this similarly.
1638+ */
1639+ } while (rc == -EAGAIN && retry_count++ < retries);
15801640 }
15811641 } while (retry);
15821642
@@ -1588,12 +1648,22 @@ static int ibmvnic_login(struct net_device *netdev) · 5 unmodified lines
15881648
15891649 static void release_login_buffer(struct ibmvnic_adapter *adapter)
15901650 {
1651+ if (!adapter->login_buf)
1652+ return;
1653+
1654+ dma_unmap_single(&adapter->vdev->dev, adapter->login_buf_token,
1655+ adapter->login_buf_sz, DMA_TO_DEVICE);
15911656 kfree(adapter->login_buf);
15921657 adapter->login_buf = NULL;
15931658 }
15941659
15951660 static void release_login_rsp_buffer(struct ibmvnic_adapter *adapter)
15961661 {
1662+ if (!adapter->login_rsp_buf)
1663+ return;
1664+
1665+ dma_unmap_single(&adapter->vdev->dev, adapter->login_rsp_buf_token,
1666+ adapter->login_rsp_buf_sz, DMA_FROM_DEVICE);
15971667 kfree(adapter->login_rsp_buf);
15981668 adapter->login_rsp_buf = NULL;
15991669 }
@@ -4830,11 +4900,14 @@ static int send_login(struct ibmvnic_adapter *adapter) · 3230 unmodified lines
48304900 if (rc) {
48314901 adapter->login_pending = false;
48324902 netdev_err(adapter->netdev, "Failed to send login, rc=%d\n", rc);
4833− goto buf_rsp_map_failed;
4903+ goto buf_send_failed;
48344904 }
48354905
48364906 return 0;
48374907
4908+buf_send_failed:
4909+ dma_unmap_single(dev, rsp_buffer_token, rsp_buffer_size,
4910+ DMA_FROM_DEVICE);
48384911 buf_rsp_map_failed:
48394912 kfree(login_rsp_buffer);
48404913 adapter->login_rsp_buf = NULL;
@@ -5396,6 +5469,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, · 555 unmodified lines
53965469 int num_tx_pools;
53975470 int num_rx_pools;
53985471 u64 *size_array;
5472+ u32 rsp_len;
53995473 int i;
54005474
54015475 /* CHECK: Test/set of login_pending does not need to be atomic
@@ -5407,11 +5481,6 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, · 5 unmodified lines
54075481 }
54085482 adapter->login_pending = false;
54095483
5410− dma_unmap_single(dev, adapter->login_buf_token, adapter->login_buf_sz,
5411− DMA_TO_DEVICE);
5412− dma_unmap_single(dev, adapter->login_rsp_buf_token,
5413− adapter->login_rsp_buf_sz, DMA_FROM_DEVICE);
5414−
54155484 /* If the number of queues requested can't be allocated by the
54165485 * server, the login response will return with code 1. We will need
54175486 * to resend the login buffer with fewer queues requested.
@@ -5447,6 +5516,23 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, · 29 unmodified lines
54475516 ibmvnic_reset(adapter, VNIC_RESET_FATAL);
54485517 return -EIO;
54495518 }
5519+
5520+ rsp_len = be32_to_cpu(login_rsp->len);
5521+ if (be32_to_cpu(login->login_rsp_len) < rsp_len ||
5522+ rsp_len <= be32_to_cpu(login_rsp->off_txsubm_subcrqs) ||
5523+ rsp_len <= be32_to_cpu(login_rsp->off_rxadd_subcrqs) ||
5524+ rsp_len <= be32_to_cpu(login_rsp->off_rxadd_buff_size) ||
5525+ rsp_len <= be32_to_cpu(login_rsp->off_supp_tx_desc)) {
5526+ /* This can happen if a login request times out and there are
5527+ * 2 outstanding login requests sent, the LOGIN_RSP crq
5528+ * could have been for the older login request. So we are
5529+ * parsing the newer response buffer which may be incomplete
5530+ */
5531+ dev_err(dev, "FATAL: Login rsp offsets/lengths invalid\n");
5532+ ibmvnic_reset(adapter, VNIC_RESET_FATAL);
5533+ return -EIO;
5534+ }
5535+
54505536 size_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
54515537 be32_to_cpu(adapter->login_rsp_buf->off_rxadd_buff_size));
54525538 /* variable buffer sizes are not supported, so just read the
drivers/net/ethernet/intel/i40e/i40e_debugfs.c+1−1
@@ -1839,7 +1839,7 @@ void i40e_dbg_pf_exit(struct i40e_pf *pf) · 1838 unmodified lines
18391839 void i40e_dbg_init(void)
18401840 {
18411841 i40e_dbg_root = debugfs_create_dir(i40e_driver_name, NULL);
1842− if (!i40e_dbg_root)
1842+ if (IS_ERR(i40e_dbg_root))
18431843 pr_info("init of debugfs failed\n");
18441844 }
18451845
drivers/net/ethernet/intel/iavf/iavf_ethtool.c+4−1
@@ -1401,14 +1401,15 @@ static int iavf_add_fdir_ethtool(struct iavf_adapter *adapter, struct ethtool_rx · 1400 unmodified lines
14011401 if (fsp->flow_type & FLOW_MAC_EXT)
14021402 return -EINVAL;
14031403
1404+ spin_lock_bh(&adapter->fdir_fltr_lock);
14041405 if (adapter->fdir_active_fltr >= IAVF_MAX_FDIR_FILTERS) {
1406+ spin_unlock_bh(&adapter->fdir_fltr_lock);
14051407 dev_err(&adapter->pdev->dev,
14061408 "Unable to add Flow Director filter because VF reached the limit of max allowed filters (%u)\n",
14071409 IAVF_MAX_FDIR_FILTERS);
14081410 return -ENOSPC;
14091411 }
14101412
1411− spin_lock_bh(&adapter->fdir_fltr_lock);
14121413 if (iavf_find_fdir_fltr_by_loc(adapter, fsp->location)) {
14131414 dev_err(&adapter->pdev->dev, "Failed to add Flow Director filter, it already exists\n");
14141415 spin_unlock_bh(&adapter->fdir_fltr_lock);
@@ -1781,7 +1782,9 @@ static int iavf_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd, · 366 unmodified lines
17811782 case ETHTOOL_GRXCLSRLCNT:
17821783 if (!FDIR_FLTR_SUPPORT(adapter))
17831784 break;
1785+ spin_lock_bh(&adapter->fdir_fltr_lock);
17841786 cmd->rule_cnt = adapter->fdir_active_fltr;
1787+ spin_unlock_bh(&adapter->fdir_fltr_lock);
17851788 cmd->data = IAVF_MAX_FDIR_FILTERS;
17861789 ret = 0;
17871790 break;
drivers/net/ethernet/intel/iavf/iavf_fdir.c+8−3
@@ -722,7 +722,9 @@ void iavf_print_fdir_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *f · 721 unmodified lines
722722 bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr)
723723 {
724724 struct iavf_fdir_fltr *tmp;
725+ bool ret = false;
725726
727+ spin_lock_bh(&adapter->fdir_fltr_lock);
726728 list_for_each_entry(tmp, &adapter->fdir_list_head, list) {
727729 if (tmp->flow_type != fltr->flow_type)
728730 continue;
@@ -732,11 +734,14 @@ bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr * · 3 unmodified lines
732734 !memcmp(&tmp->ip_data, &fltr->ip_data,
733735 sizeof(fltr->ip_data)) &&
734736 !memcmp(&tmp->ext_data, &fltr->ext_data,
735− sizeof(fltr->ext_data)))
736− return true;
737+ sizeof(fltr->ext_data))) {
738+ ret = true;
739+ break;
740+ }
737741 }
742+ spin_unlock_bh(&adapter->fdir_fltr_lock);
738743
739− return false;
744+ return ret;
740745 }
741746
742747 /**
drivers/net/ethernet/intel/iavf/iavf_main.c+6−5
@@ -3250,9 +3250,6 @@ static void iavf_adminq_task(struct work_struct *work) · 3249 unmodified lines
32503250 u32 val, oldval;
32513251 u16 pending;
32523252
3253− if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)
3254− goto out;
3255−
32563253 if (!mutex_trylock(&adapter->crit_lock)) {
32573254 if (adapter->state == __IAVF_REMOVE)
32583255 return;
@@ -3261,10 +3258,13 @@ static void iavf_adminq_task(struct work_struct *work) · 2 unmodified lines
32613258 goto out;
32623259 }
32633260
3261+ if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)
3262+ goto unlock;
3263+
32643264 event.buf_len = IAVF_MAX_AQ_BUF_SIZE;
32653265 event.msg_buf = kzalloc(event.buf_len, GFP_KERNEL);
32663266 if (!event.msg_buf)
3267− goto out;
3267+ goto unlock;
32683268
32693269 do {
32703270 ret = iavf_clean_arq_element(hw, &event, &pending);
@@ -3279,7 +3279,6 @@ static void iavf_adminq_task(struct work_struct *work) · 8 unmodified lines
32793279 if (pending != 0)
32803280 memset(event.msg_buf, 0, IAVF_MAX_AQ_BUF_SIZE);
32813281 } while (pending);
3282− mutex_unlock(&adapter->crit_lock);
32833282
32843283 if (iavf_is_reset_in_progress(adapter))
32853284 goto freedom;
@@ -3323,6 +3322,8 @@ static void iavf_adminq_task(struct work_struct *work) · 37 unmodified lines
33233322
33243323 freedom:
33253324 kfree(event.msg_buf);
3325+unlock:
3326+ mutex_unlock(&adapter->crit_lock);
33263327 out:
33273328 /* re-enable Admin queue interrupt cause */
33283329 iavf_misc_irq_enable(adapter);
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c+14−12
@@ -1281,16 +1281,21 @@ ice_cfg_fdir_xtrct_seq(struct ice_pf *pf, struct ethtool_rx_flow_spec *fsp, · 1280 unmodified lines
12811281 ICE_FLOW_FLD_OFF_INVAL);
12821282 }
12831283
1284− /* add filter for outer headers */
12851284 fltr_idx = ice_ethtool_flow_to_fltr(fsp->flow_type & ~FLOW_EXT);
1285+
1286+ assign_bit(fltr_idx, hw->fdir_perfect_fltr, perfect_filter);
1287+
1288+ /* add filter for outer headers */
12861289 ret = ice_fdir_set_hw_fltr_rule(pf, seg, fltr_idx,
12871290 ICE_FD_HW_SEG_NON_TUN);
1288− if (ret == -EEXIST)
1289− /* Rule already exists, free memory and continue */
1290− devm_kfree(dev, seg);
1291− else if (ret)
1291+ if (ret == -EEXIST) {
1292+ /* Rule already exists, free memory and count as success */
1293+ ret = 0;
1294+ goto err_exit;
1295+ } else if (ret) {
12921296 /* could not write filter, free memory */
12931297 goto err_exit;
1298+ }
12941299
12951300 /* make tunneled filter HW entries if possible */
12961301 memcpy(&tun_seg[1], seg, sizeof(*seg));
@@ -1305,18 +1310,13 @@ ice_cfg_fdir_xtrct_seq(struct ice_pf *pf, struct ethtool_rx_flow_spec *fsp, · 8 unmodified lines
13051310 devm_kfree(dev, tun_seg);
13061311 }
13071312
1308− if (perfect_filter)
1309− set_bit(fltr_idx, hw->fdir_perfect_fltr);
1310− else
1311− clear_bit(fltr_idx, hw->fdir_perfect_fltr);
1312−
13131313 return ret;
13141314
13151315 err_exit:
13161316 devm_kfree(dev, tun_seg);
13171317 devm_kfree(dev, seg);
13181318
1319− return -EOPNOTSUPP;
1319+ return ret;
13201320 }
13211321
13221322 /**
@@ -1914,7 +1914,9 @@ int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) · 591 unmodified lines
19141914 input->comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW_FAIL;
19151915
19161916 /* input struct is added to the HW filter list */
1917− ice_fdir_update_list_entry(pf, input, fsp->location);
1917+ ret = ice_fdir_update_list_entry(pf, input, fsp->location);
1918+ if (ret)
1919+ goto release_lock;
19181920
19191921 ret = ice_fdir_write_all_fltr(pf, input, true);
19201922 if (ret)
drivers/net/ethernet/intel/ice/ice_main.c+18−0
@@ -8813,6 +8813,7 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type, · 8812 unmodified lines
88138813 {
88148814 struct ice_netdev_priv *np = netdev_priv(netdev);
88158815 struct ice_pf *pf = np->vsi->back;
8816+ bool locked = false;
88168817 int err;
88178818
88188819 switch (type) {
@@ -8822,10 +8823,27 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type, · 3 unmodified lines
88228823 ice_setup_tc_block_cb,
88238824 np, np, true);
88248825 case TC_SETUP_QDISC_MQPRIO:
8826+ if (pf->adev) {
8827+ mutex_lock(&pf->adev_mutex);
8828+ device_lock(&pf->adev->dev);
8829+ locked = true;
8830+ if (pf->adev->dev.driver) {
8831+ netdev_err(netdev, "Cannot change qdisc when RDMA is active\n");
8832+ err = -EBUSY;
8833+ goto adev_unlock;
8834+ }
8835+ }
8836+
88258837 /* setup traffic classifier for receive side */
88268838 mutex_lock(&pf->tc_mutex);
88278839 err = ice_setup_tc_mqprio_qdisc(netdev, type_data);
88288840 mutex_unlock(&pf->tc_mutex);
8841+
8842+adev_unlock:
8843+ if (locked) {
8844+ device_unlock(&pf->adev->dev);
8845+ mutex_unlock(&pf->adev_mutex);
8846+ }
88298847 return err;
88308848 default:
88318849 return -EOPNOTSUPP;
drivers/net/ethernet/intel/igc/igc.h+4−0
@@ -195,6 +195,10 @@ struct igc_adapter { · 194 unmodified lines
195195 u32 qbv_config_change_errors;
196196 bool qbv_transition;
197197 unsigned int qbv_count;
198+ /* Access to oper_gate_closed, admin_gate_closed and qbv_transition
199+ * are protected by the qbv_tx_lock.
200+ */
201+ spinlock_t qbv_tx_lock;
198202
199203 /* OS defined structs */
200204 struct pci_dev *pdev;
drivers/net/ethernet/intel/igc/igc_main.c+60−14
@@ -316,6 +316,33 @@ static void igc_clean_all_tx_rings(struct igc_adapter *adapter) · 315 unmodified lines
316316 igc_clean_tx_ring(adapter->tx_ring[i]);
317317 }
318318
319+static void igc_disable_tx_ring_hw(struct igc_ring *ring)
320+{
321+ struct igc_hw *hw = &ring->q_vector->adapter->hw;
322+ u8 idx = ring->reg_idx;
323+ u32 txdctl;
324+
325+ txdctl = rd32(IGC_TXDCTL(idx));
326+ txdctl &= ~IGC_TXDCTL_QUEUE_ENABLE;
327+ txdctl |= IGC_TXDCTL_SWFLUSH;
328+ wr32(IGC_TXDCTL(idx), txdctl);
329+}
330+
331+/**
332+ * igc_disable_all_tx_rings_hw - Disable all transmit queue operation
333+ * @adapter: board private structure
334+ */
335+static void igc_disable_all_tx_rings_hw(struct igc_adapter *adapter)
336+{
337+ int i;
338+
339+ for (i = 0; i < adapter->num_tx_queues; i++) {
340+ struct igc_ring *tx_ring = adapter->tx_ring[i];
341+
342+ igc_disable_tx_ring_hw(tx_ring);
343+ }
344+}
345+
319346 /**
320347 * igc_setup_tx_resources - allocate Tx resources (Descriptors)
321348 * @tx_ring: tx descriptor ring (for a specific queue) to setup
@@ -4774,6 +4801,7 @@ static int igc_sw_init(struct igc_adapter *adapter) · 4452 unmodified lines
47744801 adapter->nfc_rule_count = 0;
47754802
47764803 spin_lock_init(&adapter->stats64_lock);
4804+ spin_lock_init(&adapter->qbv_tx_lock);
47774805 /* Assume MSI-X interrupts, will be checked during IRQ allocation */
47784806 adapter->flags |= IGC_FLAG_HAS_MSIX;
47794807
@@ -5058,6 +5086,7 @@ void igc_down(struct igc_adapter *adapter) · 278 unmodified lines
50585086 /* clear VLAN promisc flag so VFTA will be updated if necessary */
50595087 adapter->flags &= ~IGC_FLAG_VLAN_PROMISC;
50605088
5089+ igc_disable_all_tx_rings_hw(adapter);
50615090 igc_clean_all_tx_rings(adapter);
50625091 igc_clean_all_rx_rings(adapter);
50635092 }
@@ -6091,15 +6120,15 @@ static int igc_tsn_enable_launchtime(struct igc_adapter *adapter, · 1027 unmodified lines
60916120 return igc_tsn_offload_apply(adapter);
60926121 }
60936122
6094−static int igc_tsn_clear_schedule(struct igc_adapter *adapter)
6123+static int igc_qbv_clear_schedule(struct igc_adapter *adapter)
60956124 {
6125+ unsigned long flags;
60966126 int i;
60976127
60986128 adapter->base_time = 0;
60996129 adapter->cycle_time = NSEC_PER_SEC;
61006130 adapter->taprio_offload_enable = false;
61016131 adapter->qbv_config_change_errors = 0;
6102− adapter->qbv_transition = false;
61036132 adapter->qbv_count = 0;
61046133
61056134 for (i = 0; i < adapter->num_tx_queues; i++) {
@@ -6108,10 +6137,28 @@ static int igc_tsn_clear_schedule(struct igc_adapter *adapter) · 2 unmodified lines
61086137 ring->start_time = 0;
61096138 ring->end_time = NSEC_PER_SEC;
61106139 ring->max_sdu = 0;
6140+ }
6141+
6142+ spin_lock_irqsave(&adapter->qbv_tx_lock, flags);
6143+
6144+ adapter->qbv_transition = false;
6145+
6146+ for (i = 0; i < adapter->num_tx_queues; i++) {
6147+ struct igc_ring *ring = adapter->tx_ring[i];
6148+
61116149 ring->oper_gate_closed = false;
61126150 ring->admin_gate_closed = false;
61136151 }
61146152
6153+ spin_unlock_irqrestore(&adapter->qbv_tx_lock, flags);
6154+
6155+ return 0;
6156+}
6157+
6158+static int igc_tsn_clear_schedule(struct igc_adapter *adapter)
6159+{
6160+ igc_qbv_clear_schedule(adapter);
6161+
61156162 return 0;
61166163 }
61176164
@@ -6122,6 +6169,7 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter, · 4 unmodified lines
61226169 struct igc_hw *hw = &adapter->hw;
61236170 u32 start_time = 0, end_time = 0;
61246171 struct timespec64 now;
6172+ unsigned long flags;
61256173 size_t n;
61266174 int i;
61276175
@@ -6189,6 +6237,8 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter, · 61 unmodified lines
61896237 start_time += e->interval;
61906238 }
61916239
6240+ spin_lock_irqsave(&adapter->qbv_tx_lock, flags);
6241+
61926242 /* Check whether a queue gets configured.
61936243 * If not, set the start and end time to be end time.
61946244 */
@@ -6213,6 +6263,8 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter, · 18 unmodified lines
62136263 }
62146264 }
62156265
6266+ spin_unlock_irqrestore(&adapter->qbv_tx_lock, flags);
6267+
62166268 for (i = 0; i < adapter->num_tx_queues; i++) {
62176269 struct igc_ring *ring = adapter->tx_ring[i];
62186270 struct net_device *dev = adapter->netdev;
@@ -6591,8 +6643,11 @@ static enum hrtimer_restart igc_qbv_scheduling_timer(struct hrtimer *timer) · 372 unmodified lines
65916643 {
65926644 struct igc_adapter *adapter = container_of(timer, struct igc_adapter,
65936645 hrtimer);
6646+ unsigned long flags;
65946647 unsigned int i;
65956648
6649+ spin_lock_irqsave(&adapter->qbv_tx_lock, flags);
6650+
65966651 adapter->qbv_transition = true;
65976652 for (i = 0; i < adapter->num_tx_queues; i++) {
65986653 struct igc_ring *tx_ring = adapter->tx_ring[i];
@@ -6605,6 +6660,9 @@ static enum hrtimer_restart igc_qbv_scheduling_timer(struct hrtimer *timer) · 6 unmodified lines
66056660 }
66066661 }
66076662 adapter->qbv_transition = false;
6663+
6664+ spin_unlock_irqrestore(&adapter->qbv_tx_lock, flags);
6665+
66086666 return HRTIMER_NORESTART;
66096667 }
66106668
@@ -7290,18 +7348,6 @@ void igc_enable_rx_ring(struct igc_ring *ring) · 679 unmodified lines
72907348 igc_alloc_rx_buffers(ring, igc_desc_unused(ring));
72917349 }
72927350
7293−static void igc_disable_tx_ring_hw(struct igc_ring *ring)
7294−{
7295− struct igc_hw *hw = &ring->q_vector->adapter->hw;
7296− u8 idx = ring->reg_idx;
7297− u32 txdctl;
7298−
7299− txdctl = rd32(IGC_TXDCTL(idx));
7300− txdctl &= ~IGC_TXDCTL_QUEUE_ENABLE;
7301− txdctl |= IGC_TXDCTL_SWFLUSH;
7302− wr32(IGC_TXDCTL(idx), txdctl);
7303−}
7304−
73057351 void igc_disable_tx_ring(struct igc_ring *ring)
73067352 {
73077353 igc_disable_tx_ring_hw(ring);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+1−1
@@ -8479,7 +8479,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring, · 8478 unmodified lines
84798479 struct ixgbe_adapter *adapter = q_vector->adapter;
84808480
84818481 if (unlikely(skb_tail_pointer(skb) < hdr.network +
8482− VXLAN_HEADROOM))
8482+ vxlan_headroom(0)))
84838483 return;
84848484
84858485 /* verify the port is recognized as VXLAN */
drivers/net/ethernet/korina.c+1−2
@@ -1302,11 +1302,10 @@ static int korina_probe(struct platform_device *pdev) · 1301 unmodified lines
13021302 else if (of_get_ethdev_address(pdev->dev.of_node, dev) < 0)
13031303 eth_hw_addr_random(dev);
13041304
1305− clk = devm_clk_get_optional(&pdev->dev, "mdioclk");
1305+ clk = devm_clk_get_optional_enabled(&pdev->dev, "mdioclk");
13061306 if (IS_ERR(clk))
13071307 return PTR_ERR(clk);
13081308 if (clk) {
1309− clk_prepare_enable(clk);
13101309 lp->mii_clock_freq = clk_get_rate(clk);
13111310 } else {
13121311 lp->mii_clock_freq = 200000000; /* max possible input clk */
drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c+3−0
@@ -98,6 +98,9 @@ int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox) · 97 unmodified lines
9898 writeq(OCTEP_CTRL_MBOX_STATUS_INIT,
9999 OCTEP_CTRL_MBOX_INFO_HOST_STATUS(mbox->barmem));
100100
101+ mutex_init(&mbox->h2fq_lock);
102+ mutex_init(&mbox->f2hq_lock);
103+
101104 mbox->h2fq.sz = readl(OCTEP_CTRL_MBOX_H2FQ_SZ(mbox->barmem));
102105 mbox->h2fq.hw_prod = OCTEP_CTRL_MBOX_H2FQ_PROD(mbox->barmem);
103106 mbox->h2fq.hw_cons = OCTEP_CTRL_MBOX_H2FQ_CONS(mbox->barmem);
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c+42−1
@@ -218,13 +218,54 @@ void npc_config_secret_key(struct rvu *rvu, int blkaddr) · 217 unmodified lines
218218
219219 void npc_program_mkex_hash(struct rvu *rvu, int blkaddr)
220220 {
221+ struct npc_mcam_kex_hash *mh = rvu->kpu.mkex_hash;
221222 struct hw_cap *hwcap = &rvu->hw->cap;
223+ u8 intf, ld, hdr_offset, byte_len;
222224 struct rvu_hwinfo *hw = rvu->hw;
223− u8 intf;
225+ u64 cfg;
224226
227+ /* Check if hardware supports hash extraction */
225228 if (!hwcap->npc_hash_extract)
226229 return;
227230
231+ /* Check if IPv6 source/destination address
232+ * should be hash enabled.
233+ * Hashing reduces 128bit SIP/DIP fields to 32bit
234+ * so that 224 bit X2 key can be used for IPv6 based filters as well,
235+ * which in turn results in more number of MCAM entries available for
236+ * use.
237+ *
238+ * Hashing of IPV6 SIP/DIP is enabled in below scenarios
239+ * 1. If the silicon variant supports hashing feature
240+ * 2. If the number of bytes of IP addr being extracted is 4 bytes ie
241+ * 32bit. The assumption here is that if user wants 8bytes of LSB of
242+ * IP addr or full 16 bytes then his intention is not to use 32bit
243+ * hash.
244+ */
245+ for (intf = 0; intf < hw->npc_intfs; intf++) {
246+ for (ld = 0; ld < NPC_MAX_LD; ld++) {
247+ cfg = rvu_read64(rvu, blkaddr,
248+ NPC_AF_INTFX_LIDX_LTX_LDX_CFG(intf,
249+ NPC_LID_LC,
250+ NPC_LT_LC_IP6,
251+ ld));
252+ hdr_offset = FIELD_GET(NPC_HDR_OFFSET, cfg);
253+ byte_len = FIELD_GET(NPC_BYTESM, cfg);
254+ /* Hashing of IPv6 source/destination address should be
255+ * enabled if,
256+ * hdr_offset == 8 (offset of source IPv6 address) or
257+ * hdr_offset == 24 (offset of destination IPv6)
258+ * address) and the number of byte to be
259+ * extracted is 4. As per hardware configuration
260+ * byte_len should be == actual byte_len - 1.
261+ * Hence byte_len is checked against 3 but nor 4.
262+ */
263+ if ((hdr_offset == 8 || hdr_offset == 24) && byte_len == 3)
264+ mh->lid_lt_ld_hash_en[intf][NPC_LID_LC][NPC_LT_LC_IP6][ld] = true;
265+ }
266+ }
267+
268+ /* Update hash configuration if the field is hash enabled */
228269 for (intf = 0; intf < hw->npc_intfs; intf++) {
229270 npc_program_mkex_hash_rx(rvu, blkaddr, intf);
230271 npc_program_mkex_hash_tx(rvu, blkaddr, intf);
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.h+4−4
@@ -70,8 +70,8 @@ static struct npc_mcam_kex_hash npc_mkex_hash_default __maybe_unused = { · 69 unmodified lines
7070 [NIX_INTF_RX] = {
7171 [NPC_LID_LC] = {
7272 [NPC_LT_LC_IP6] = {
73− true,
74− true,
73+ false,
74+ false,
7575 },
7676 },
7777 },
@@ -79,8 +79,8 @@ static struct npc_mcam_kex_hash npc_mkex_hash_default __maybe_unused = { · 1 unmodified line
7979 [NIX_INTF_TX] = {
8080 [NPC_LID_LC] = {
8181 [NPC_LT_LC_IP6] = {
82− true,
83− true,
82+ false,
83+ false,
8484 },
8585 },
8686 },
drivers/net/ethernet/marvell/prestera/prestera_pci.c+2−1
@@ -727,7 +727,8 @@ pick_fw_ver: · 726 unmodified lines
727727
728728 err = request_firmware_direct(&fw->bin, fw_path, fw->dev.dev);
729729 if (err) {
730− if (ver_maj == PRESTERA_SUPP_FW_MAJ_VER) {
730+ if (ver_maj != PRESTERA_PREV_FW_MAJ_VER ||
731+ ver_min != PRESTERA_PREV_FW_MIN_VER) {
731732 ver_maj = PRESTERA_PREV_FW_MAJ_VER;
732733 ver_min = PRESTERA_PREV_FW_MIN_VER;
733734
drivers/net/ethernet/marvell/prestera/prestera_router.c+7−7
@@ -166,11 +166,11 @@ prestera_util_neigh2nc_key(struct prestera_switch *sw, struct neighbour *n, · 165 unmodified lines
166166
167167 static bool __prestera_fi_is_direct(struct fib_info *fi)
168168 {
169− struct fib_nh *fib_nh;
169+ struct fib_nh_common *fib_nhc;
170170
171171 if (fib_info_num_path(fi) == 1) {
172− fib_nh = fib_info_nh(fi, 0);
173− if (fib_nh->fib_nh_gw_family == AF_UNSPEC)
172+ fib_nhc = fib_info_nhc(fi, 0);
173+ if (fib_nhc->nhc_gw_family == AF_UNSPEC)
174174 return true;
175175 }
176176
@@ -261,7 +261,7 @@ static bool · 84 unmodified lines
261261 __prestera_util_kern_n_is_reachable_v4(u32 tb_id, __be32 *addr,
262262 struct net_device *dev)
263263 {
264− struct fib_nh *fib_nh;
264+ struct fib_nh_common *fib_nhc;
265265 struct fib_result res;
266266 bool reachable;
267267
@@ -269,8 +269,8 @@ __prestera_util_kern_n_is_reachable_v4(u32 tb_id, __be32 *addr, · 1 unmodified line
269269
270270 if (!prestera_util_kern_get_route(&res, tb_id, addr))
271271 if (prestera_fi_is_direct(res.fi)) {
272− fib_nh = fib_info_nh(res.fi, 0);
273− if (dev == fib_nh->fib_nh_dev)
272+ fib_nhc = fib_info_nhc(res.fi, 0);
273+ if (dev == fib_nhc->nhc_dev)
274274 reachable = true;
275275 }
276276
@@ -324,7 +324,7 @@ prestera_kern_fib_info_nhc(struct fib_notifier_info *info, int n) · 47 unmodified lines
324324 if (info->family == AF_INET) {
325325 fen4_info = container_of(info, struct fib_entry_notifier_info,
326326 info);
327− return &fib_info_nh(fen4_info->fi, n)->nh_common;
327+ return fib_info_nhc(fen4_info->fi, n);
328328 } else if (info->family == AF_INET6) {
329329 fen6_info = container_of(info, struct fib6_entry_notifier_info,
330330 info);
drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c+67−49
@@ -2,6 +2,7 @@ · 1 unmodified line
22 /* Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. */
33
44 #include "reporter_vnic.h"
5+#include "en_stats.h"
56 #include "devlink.h"
67
78 #define VNIC_ENV_GET64(vnic_env_stats, c) \
@@ -36,55 +37,72 @@ int mlx5_reporter_vnic_diagnose_counters(struct mlx5_core_dev *dev, · 28 unmodified lines
3637 if (err)
3738 return err;
3839
39− err = devlink_fmsg_u64_pair_put(fmsg, "total_error_queues",
40− VNIC_ENV_GET64(&vnic, total_error_queues));
41− if (err)
42− return err;
43−
44− err = devlink_fmsg_u64_pair_put(fmsg, "send_queue_priority_update_flow",
45− VNIC_ENV_GET64(&vnic, send_queue_priority_update_flow));
46− if (err)
47− return err;
48−
49− err = devlink_fmsg_u64_pair_put(fmsg, "comp_eq_overrun",
50− VNIC_ENV_GET64(&vnic, comp_eq_overrun));
51− if (err)
52− return err;
53−
54− err = devlink_fmsg_u64_pair_put(fmsg, "async_eq_overrun",
55− VNIC_ENV_GET64(&vnic, async_eq_overrun));
56− if (err)
57− return err;
58−
59− err = devlink_fmsg_u64_pair_put(fmsg, "cq_overrun",
60− VNIC_ENV_GET64(&vnic, cq_overrun));
61− if (err)
62− return err;
63−
64− err = devlink_fmsg_u64_pair_put(fmsg, "invalid_command",
65− VNIC_ENV_GET64(&vnic, invalid_command));
66− if (err)
67− return err;
68−
69− err = devlink_fmsg_u64_pair_put(fmsg, "quota_exceeded_command",
70− VNIC_ENV_GET64(&vnic, quota_exceeded_command));
71− if (err)
72− return err;
73−
74− err = devlink_fmsg_u64_pair_put(fmsg, "nic_receive_steering_discard",
75− VNIC_ENV_GET64(&vnic, nic_receive_steering_discard));
76− if (err)
77− return err;
78−
79− err = devlink_fmsg_u64_pair_put(fmsg, "generated_pkt_steering_fail",
80− VNIC_ENV_GET64(&vnic, generated_pkt_steering_fail));
81− if (err)
82− return err;
83−
84− err = devlink_fmsg_u64_pair_put(fmsg, "handled_pkt_steering_fail",
85− VNIC_ENV_GET64(&vnic, handled_pkt_steering_fail));
86− if (err)
87− return err;
40+ if (MLX5_CAP_GEN(dev, vnic_env_queue_counters)) {
41+ err = devlink_fmsg_u32_pair_put(fmsg, "total_error_queues",
42+ VNIC_ENV_GET(&vnic, total_error_queues));
43+ if (err)
44+ return err;
45+
46+ err = devlink_fmsg_u32_pair_put(fmsg, "send_queue_priority_update_flow",
47+ VNIC_ENV_GET(&vnic,
48+ send_queue_priority_update_flow));
49+ if (err)
50+ return err;
51+ }
52+
53+ if (MLX5_CAP_GEN(dev, eq_overrun_count)) {
54+ err = devlink_fmsg_u32_pair_put(fmsg, "comp_eq_overrun",
55+ VNIC_ENV_GET(&vnic, comp_eq_overrun));
56+ if (err)
57+ return err;
58+
59+ err = devlink_fmsg_u32_pair_put(fmsg, "async_eq_overrun",
60+ VNIC_ENV_GET(&vnic, async_eq_overrun));
61+ if (err)
62+ return err;
63+ }
64+
65+ if (MLX5_CAP_GEN(dev, vnic_env_cq_overrun)) {
66+ err = devlink_fmsg_u32_pair_put(fmsg, "cq_overrun",
67+ VNIC_ENV_GET(&vnic, cq_overrun));
68+ if (err)
69+ return err;
70+ }
71+
72+ if (MLX5_CAP_GEN(dev, invalid_command_count)) {
73+ err = devlink_fmsg_u32_pair_put(fmsg, "invalid_command",
74+ VNIC_ENV_GET(&vnic, invalid_command));
75+ if (err)
76+ return err;
77+ }
78+
79+ if (MLX5_CAP_GEN(dev, quota_exceeded_count)) {
80+ err = devlink_fmsg_u32_pair_put(fmsg, "quota_exceeded_command",
81+ VNIC_ENV_GET(&vnic, quota_exceeded_command));
82+ if (err)
83+ return err;
84+ }
85+
86+ if (MLX5_CAP_GEN(dev, nic_receive_steering_discard)) {
87+ err = devlink_fmsg_u64_pair_put(fmsg, "nic_receive_steering_discard",
88+ VNIC_ENV_GET64(&vnic,
89+ nic_receive_steering_discard));
90+ if (err)
91+ return err;
92+ }
93+
94+ if (MLX5_CAP_GEN(dev, vnic_env_cnt_steering_fail)) {
95+ err = devlink_fmsg_u64_pair_put(fmsg, "generated_pkt_steering_fail",
96+ VNIC_ENV_GET64(&vnic,
97+ generated_pkt_steering_fail));
98+ if (err)
99+ return err;
100+
101+ err = devlink_fmsg_u64_pair_put(fmsg, "handled_pkt_steering_fail",
102+ VNIC_ENV_GET64(&vnic, handled_pkt_steering_fail));
103+ if (err)
104+ return err;
105+ }
88106
89107 err = devlink_fmsg_obj_nest_end(fmsg);
90108 if (err)
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c+4−5
@@ -1030,9 +1030,6 @@ int mlx5e_tc_tun_encap_dests_set(struct mlx5e_priv *priv, · 1029 unmodified lines
10301030 int out_index;
10311031 int err = 0;
10321032
1033− if (!mlx5e_is_eswitch_flow(flow))
1034− return 0;
1035−
10361033 parse_attr = attr->parse_attr;
10371034 esw_attr = attr->esw_attr;
10381035 *vf_tun = false;
@@ -1464,10 +1461,12 @@ static void mlx5e_invalidate_encap(struct mlx5e_priv *priv, · 425 unmodified lines
14641461 attr = mlx5e_tc_get_encap_attr(flow);
14651462 esw_attr = attr->esw_attr;
14661463
1467− if (flow_flag_test(flow, SLOW))
1464+ if (flow_flag_test(flow, SLOW)) {
14681465 mlx5e_tc_unoffload_from_slow_path(esw, flow);
1469− else
1466+ } else {
14701467 mlx5e_tc_unoffload_fdb_rules(esw, flow, flow->attr);
1468+ mlx5e_tc_unoffload_flow_post_acts(flow);
1469+ }
14711470
14721471 mlx5e_tc_detach_mod_hdr(priv, flow, attr);
14731472 attr->modify_hdr = NULL;
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c+4−1
@@ -323,8 +323,11 @@ struct sk_buff *mlx5e_xsk_skb_from_cqe_linear(struct mlx5e_rq *rq, · 322 unmodified lines
323323 net_prefetch(mxbuf->xdp.data);
324324
325325 prog = rcu_dereference(rq->xdp_prog);
326− if (likely(prog && mlx5e_xdp_handle(rq, prog, mxbuf)))
326+ if (likely(prog && mlx5e_xdp_handle(rq, prog, mxbuf))) {
327+ if (likely(__test_and_clear_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags)))
328+ wi->flags |= BIT(MLX5E_WQE_FRAG_SKIP_RELEASE);
327329 return NULL; /* page/packet was consumed by XDP */
330+ }
328331
329332 /* XDP_PASS: copy the data from the UMEM to a new SKB. The frame reuse
330333 * will be handled by mlx5e_free_rx_wqe.
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c+2−2
@@ -808,9 +808,9 @@ static void setup_fte_upper_proto_match(struct mlx5_flow_spec *spec, struct upsp · 807 unmodified lines
808808 }
809809
810810 if (upspec->sport) {
811− MLX5_SET(fte_match_set_lyr_2_4, spec->match_criteria, udp_dport,
811+ MLX5_SET(fte_match_set_lyr_2_4, spec->match_criteria, udp_sport,
812812 upspec->sport_mask);
813− MLX5_SET(fte_match_set_lyr_2_4, spec->match_value, udp_dport, upspec->sport);
813+ MLX5_SET(fte_match_set_lyr_2_4, spec->match_value, udp_sport, upspec->sport);
814814 }
815815 }
816816
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c+3−1
@@ -58,7 +58,9 @@ static int mlx5e_ipsec_remove_trailer(struct sk_buff *skb, struct xfrm_state *x) · 57 unmodified lines
5858
5959 trailer_len = alen + plen + 2;
6060
61− pskb_trim(skb, skb->len - trailer_len);
61+ ret = pskb_trim(skb, skb->len - trailer_len);
62+ if (unlikely(ret))
63+ return ret;
6264 if (skb->protocol == htons(ETH_P_IP)) {
6365 ipv4hdr->tot_len = htons(ntohs(ipv4hdr->tot_len) - trailer_len);
6466 ip_send_check(ipv4hdr);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c+0−8
@@ -188,7 +188,6 @@ static void mlx5e_tls_debugfs_init(struct mlx5e_tls *tls, · 187 unmodified lines
188188
189189 int mlx5e_ktls_init(struct mlx5e_priv *priv)
190190 {
191− struct mlx5_crypto_dek_pool *dek_pool;
192191 struct mlx5e_tls *tls;
193192
194193 if (!mlx5e_is_ktls_device(priv->mdev))
@@ -199,12 +198,6 @@ int mlx5e_ktls_init(struct mlx5e_priv *priv) · 4 unmodified lines
199198 return -ENOMEM;
200199 tls->mdev = priv->mdev;
201200
202− dek_pool = mlx5_crypto_dek_pool_create(priv->mdev, MLX5_ACCEL_OBJ_TLS_KEY);
203− if (IS_ERR(dek_pool)) {
204− kfree(tls);
205− return PTR_ERR(dek_pool);
206− }
207− tls->dek_pool = dek_pool;
208201 priv->tls = tls;
209202
210203 mlx5e_tls_debugfs_init(tls, priv->dfs_root);
@@ -222,7 +215,6 @@ void mlx5e_ktls_cleanup(struct mlx5e_priv *priv) · 11 unmodified lines
222215 debugfs_remove_recursive(tls->debugfs.dfs);
223216 tls->debugfs.dfs = NULL;
224217
225− mlx5_crypto_dek_pool_destroy(tls->dek_pool);
226218 kfree(priv->tls);
227219 priv->tls = NULL;
228220 }
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c+26−3
@@ -908,28 +908,51 @@ static void mlx5e_tls_tx_debugfs_init(struct mlx5e_tls *tls, · 907 unmodified lines
908908
909909 int mlx5e_ktls_init_tx(struct mlx5e_priv *priv)
910910 {
911+ struct mlx5_crypto_dek_pool *dek_pool;
911912 struct mlx5e_tls *tls = priv->tls;
913+ int err;
914+
915+ if (!mlx5e_is_ktls_device(priv->mdev))
916+ return 0;
917+
918+ /* DEK pool could be used by either or both of TX and RX. But we have to
919+ * put the creation here to avoid syndrome when doing devlink reload.
920+ */
921+ dek_pool = mlx5_crypto_dek_pool_create(priv->mdev, MLX5_ACCEL_OBJ_TLS_KEY);
922+ if (IS_ERR(dek_pool))
923+ return PTR_ERR(dek_pool);
924+ tls->dek_pool = dek_pool;
912925
913926 if (!mlx5e_is_ktls_tx(priv->mdev))
914927 return 0;
915928
916929 priv->tls->tx_pool = mlx5e_tls_tx_pool_init(priv->mdev, &priv->tls->sw_stats);
917− if (!priv->tls->tx_pool)
918− return -ENOMEM;
930+ if (!priv->tls->tx_pool) {
931+ err = -ENOMEM;
932+ goto err_tx_pool_init;
933+ }
919934
920935 mlx5e_tls_tx_debugfs_init(tls, tls->debugfs.dfs);
921936
922937 return 0;
938+
939+err_tx_pool_init:
940+ mlx5_crypto_dek_pool_destroy(dek_pool);
941+ return err;
923942 }
924943
925944 void mlx5e_ktls_cleanup_tx(struct mlx5e_priv *priv)
926945 {
927946 if (!mlx5e_is_ktls_tx(priv->mdev))
928− return;
947+ goto dek_pool_destroy;
929948
930949 debugfs_remove_recursive(priv->tls->debugfs.dfs_tx);
931950 priv->tls->debugfs.dfs_tx = NULL;
932951
933952 mlx5e_tls_tx_pool_cleanup(priv->tls->tx_pool);
934953 priv->tls->tx_pool = NULL;
954+
955+dek_pool_destroy:
956+ if (mlx5e_is_ktls_device(priv->mdev))
957+ mlx5_crypto_dek_pool_destroy(priv->tls->dek_pool);
935958 }
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c+1−0
@@ -161,6 +161,7 @@ static int macsec_fs_tx_create_crypto_table_groups(struct mlx5e_flow_table *ft) · 160 unmodified lines
161161
162162 if (!in) {
163163 kfree(ft->g);
164+ ft->g = NULL;
164165 return -ENOMEM;
165166 }
166167
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c+10−0
@@ -135,6 +135,16 @@ static void arfs_del_rules(struct mlx5e_flow_steering *fs); · 134 unmodified lines
135135
136136 int mlx5e_arfs_disable(struct mlx5e_flow_steering *fs)
137137 {
138+ /* Moving to switchdev mode, fs->arfs is freed by mlx5e_nic_profile
139+ * cleanup_rx callback and it is not recreated when
140+ * mlx5e_uplink_rep_profile is loaded as mlx5e_create_flow_steering()
141+ * is not called by the uplink_rep profile init_rx callback. Thus, if
142+ * ntuple is set, moving to switchdev flow will enter this function
143+ * with fs->arfs nullified.
144+ */
145+ if (!mlx5e_fs_get_arfs(fs))
146+ return 0;
147+
138148 arfs_del_rules(fs);
139149
140150 return arfs_disable(fs);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c+32−8
@@ -1036,7 +1036,23 @@ static int mlx5e_modify_rq_state(struct mlx5e_rq *rq, int curr_state, int next_s · 1035 unmodified lines
10361036 return err;
10371037 }
10381038
1039−static int mlx5e_rq_to_ready(struct mlx5e_rq *rq, int curr_state)
1039+static void mlx5e_flush_rq_cq(struct mlx5e_rq *rq)
1040+{
1041+ struct mlx5_cqwq *cqwq = &rq->cq.wq;
1042+ struct mlx5_cqe64 *cqe;
1043+
1044+ if (test_bit(MLX5E_RQ_STATE_MINI_CQE_ENHANCED, &rq->state)) {
1045+ while ((cqe = mlx5_cqwq_get_cqe_enahnced_comp(cqwq)))
1046+ mlx5_cqwq_pop(cqwq);
1047+ } else {
1048+ while ((cqe = mlx5_cqwq_get_cqe(cqwq)))
1049+ mlx5_cqwq_pop(cqwq);
1050+ }
1051+
1052+ mlx5_cqwq_update_db_record(cqwq);
1053+}
1054+
1055+int mlx5e_flush_rq(struct mlx5e_rq *rq, int curr_state)
10401056 {
10411057 struct net_device *dev = rq->netdev;
10421058 int err;
@@ -1046,6 +1062,10 @@ static int mlx5e_rq_to_ready(struct mlx5e_rq *rq, int curr_state) · 3 unmodified lines
10461062 netdev_err(dev, "Failed to move rq 0x%x to reset\n", rq->rqn);
10471063 return err;
10481064 }
1065+
1066+ mlx5e_free_rx_descs(rq);
1067+ mlx5e_flush_rq_cq(rq);
1068+
10491069 err = mlx5e_modify_rq_state(rq, MLX5_RQC_STATE_RST, MLX5_RQC_STATE_RDY);
10501070 if (err) {
10511071 netdev_err(dev, "Failed to move rq 0x%x to ready\n", rq->rqn);
@@ -1055,13 +1075,6 @@ static int mlx5e_rq_to_ready(struct mlx5e_rq *rq, int curr_state) · 3 unmodified lines
10551075 return 0;
10561076 }
10571077
1058−int mlx5e_flush_rq(struct mlx5e_rq *rq, int curr_state)
1059−{
1060− mlx5e_free_rx_descs(rq);
1061−
1062− return mlx5e_rq_to_ready(rq, curr_state);
1063−}
1064−
10651078 static int mlx5e_modify_rq_vsd(struct mlx5e_rq *rq, bool vsd)
10661079 {
10671080 struct mlx5_core_dev *mdev = rq->mdev;
@@ -5253,6 +5266,7 @@ void mlx5e_destroy_q_counters(struct mlx5e_priv *priv) · 4185 unmodified lines
52535266 static int mlx5e_nic_init(struct mlx5_core_dev *mdev,
52545267 struct net_device *netdev)
52555268 {
5269+ const bool take_rtnl = netdev->reg_state == NETREG_REGISTERED;
52565270 struct mlx5e_priv *priv = netdev_priv(netdev);
52575271 struct mlx5e_flow_steering *fs;
52585272 int err;
@@ -5281,9 +5295,19 @@ static int mlx5e_nic_init(struct mlx5_core_dev *mdev, · 22 unmodified lines
52815295 mlx5_core_err(mdev, "TLS initialization failed, %d\n", err);
52825296
52835297 mlx5e_health_create_reporters(priv);
5298+
5299+ /* If netdev is already registered (e.g. move from uplink to nic profile),
5300+ * RTNL lock must be held before triggering netdev notifiers.
5301+ */
5302+ if (take_rtnl)
5303+ rtnl_lock();
5304+
52845305 /* update XDP supported features */
52855306 mlx5e_set_xdp_feature(netdev);
52865307
5308+ if (take_rtnl)
5309+ rtnl_unlock();
5310+
52875311 return 0;
52885312 }
52895313
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c+9−11
@@ -1012,7 +1012,7 @@ static int mlx5e_init_rep_rx(struct mlx5e_priv *priv) · 1011 unmodified lines
10121012 err = mlx5e_open_drop_rq(priv, &priv->drop_rq);
10131013 if (err) {
10141014 mlx5_core_err(mdev, "open drop rq failed, %d\n", err);
1015− return err;
1015+ goto err_rx_res_free;
10161016 }
10171017
10181018 err = mlx5e_rx_res_init(priv->rx_res, priv->mdev, 0,
@@ -1046,6 +1046,7 @@ err_destroy_rx_res: · 27 unmodified lines
10461046 mlx5e_rx_res_destroy(priv->rx_res);
10471047 err_close_drop_rq:
10481048 mlx5e_close_drop_rq(&priv->drop_rq);
1049+err_rx_res_free:
10491050 mlx5e_rx_res_free(priv->rx_res);
10501051 priv->rx_res = NULL;
10511052 err_free_fs:
@@ -1159,6 +1160,10 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv) · 107 unmodified lines
11591160 return err;
11601161 }
11611162
1163+ err = mlx5e_rep_neigh_init(rpriv);
1164+ if (err)
1165+ goto err_neigh_init;
1166+
11621167 if (rpriv->rep->vport == MLX5_VPORT_UPLINK) {
11631168 err = mlx5e_init_uplink_rep_tx(rpriv);
11641169 if (err)
@@ -1175,6 +1180,8 @@ err_ht_init: · 10 unmodified lines
11751180 if (rpriv->rep->vport == MLX5_VPORT_UPLINK)
11761181 mlx5e_cleanup_uplink_rep_tx(rpriv);
11771182 err_init_tx:
1183+ mlx5e_rep_neigh_cleanup(rpriv);
1184+err_neigh_init:
11781185 mlx5e_destroy_tises(priv);
11791186 return err;
11801187 }
@@ -1188,22 +1195,17 @@ static void mlx5e_cleanup_rep_tx(struct mlx5e_priv *priv) · 7 unmodified lines
11881195 if (rpriv->rep->vport == MLX5_VPORT_UPLINK)
11891196 mlx5e_cleanup_uplink_rep_tx(rpriv);
11901197
1198+ mlx5e_rep_neigh_cleanup(rpriv);
11911199 mlx5e_destroy_tises(priv);
11921200 }
11931201
11941202 static void mlx5e_rep_enable(struct mlx5e_priv *priv)
11951203 {
1196− struct mlx5e_rep_priv *rpriv = priv->ppriv;
1197−
11981204 mlx5e_set_netdev_mtu_boundaries(priv);
1199− mlx5e_rep_neigh_init(rpriv);
12001205 }
12011206
12021207 static void mlx5e_rep_disable(struct mlx5e_priv *priv)
12031208 {
1204− struct mlx5e_rep_priv *rpriv = priv->ppriv;
1205−
1206− mlx5e_rep_neigh_cleanup(rpriv);
12071209 }
12081210
12091211 static int mlx5e_update_rep_rx(struct mlx5e_priv *priv)
@@ -1253,7 +1255,6 @@ static int uplink_rep_async_event(struct notifier_block *nb, unsigned long event · 43 unmodified lines
12531255
12541256 static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
12551257 {
1256− struct mlx5e_rep_priv *rpriv = priv->ppriv;
12571258 struct net_device *netdev = priv->netdev;
12581259 struct mlx5_core_dev *mdev = priv->mdev;
12591260 u16 max_mtu;
@@ -1275,7 +1276,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv) · 15 unmodified lines
12751276 mlx5_notifier_register(mdev, &priv->events_nb);
12761277 mlx5e_dcbnl_initialize(priv);
12771278 mlx5e_dcbnl_init_app(priv);
1278− mlx5e_rep_neigh_init(rpriv);
12791279 mlx5e_rep_bridge_init(priv);
12801280
12811281 netdev->wanted_features |= NETIF_F_HW_TC;
@@ -1290,7 +1290,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv) · 8 unmodified lines
12901290
12911291 static void mlx5e_uplink_rep_disable(struct mlx5e_priv *priv)
12921292 {
1293− struct mlx5e_rep_priv *rpriv = priv->ppriv;
12941293 struct mlx5_core_dev *mdev = priv->mdev;
12951294
12961295 rtnl_lock();
@@ -1300,7 +1299,6 @@ static void mlx5e_uplink_rep_disable(struct mlx5e_priv *priv) · 3 unmodified lines
13001299 rtnl_unlock();
13011300
13021301 mlx5e_rep_bridge_cleanup(priv);
1303− mlx5e_rep_neigh_cleanup(rpriv);
13041302 mlx5e_dcbnl_delete_app(priv);
13051303 mlx5_notifier_unregister(mdev, &priv->events_nb);
13061304 mlx5e_rep_tc_disable(priv);
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c+31−11
@@ -1725,6 +1725,19 @@ verify_attr_actions(u32 actions, struct netlink_ext_ack *extack) · 1724 unmodified lines
17251725 return 0;
17261726 }
17271727
1728+static bool
1729+has_encap_dests(struct mlx5_flow_attr *attr)
1730+{
1731+ struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr;
1732+ int out_index;
1733+
1734+ for (out_index = 0; out_index < MLX5_MAX_FLOW_FWD_VPORTS; out_index++)
1735+ if (esw_attr->dests[out_index].flags & MLX5_ESW_DEST_ENCAP)
1736+ return true;
1737+
1738+ return false;
1739+}
1740+
17281741 static int
17291742 post_process_attr(struct mlx5e_tc_flow *flow,
17301743 struct mlx5_flow_attr *attr,
@@ -1737,9 +1750,11 @@ post_process_attr(struct mlx5e_tc_flow *flow, · 6 unmodified lines
17371750 if (err)
17381751 goto err_out;
17391752
1740− err = mlx5e_tc_tun_encap_dests_set(flow->priv, flow, attr, extack, &vf_tun);
1741− if (err)
1742− goto err_out;
1753+ if (mlx5e_is_eswitch_flow(flow) && has_encap_dests(attr)) {
1754+ err = mlx5e_tc_tun_encap_dests_set(flow->priv, flow, attr, extack, &vf_tun);
1755+ if (err)
1756+ goto err_out;
1757+ }
17431758
17441759 if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR) {
17451760 err = mlx5e_tc_attach_mod_hdr(flow->priv, flow, attr);
@@ -1928,9 +1943,7 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv, · 182 unmodified lines
19281943 {
19291944 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
19301945 struct mlx5_flow_attr *attr = flow->attr;
1931− struct mlx5_esw_flow_attr *esw_attr;
19321946
1933− esw_attr = attr->esw_attr;
19341947 mlx5e_put_flow_tunnel_id(flow);
19351948
19361949 remove_unready_flow(flow);
@@ -1951,12 +1964,6 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv, · 14 unmodified lines
19511964
19521965 mlx5_tc_ct_match_del(get_ct_priv(priv), &flow->attr->ct_attr);
19531966
1954− if (esw_attr->int_port)
1955− mlx5e_tc_int_port_put(mlx5e_get_int_port_priv(priv), esw_attr->int_port);
1956−
1957− if (esw_attr->dest_int_port)
1958− mlx5e_tc_int_port_put(mlx5e_get_int_port_priv(priv), esw_attr->dest_int_port);
1959−
19601967 if (flow_flag_test(flow, L3_TO_L2_DECAP))
19611968 mlx5e_detach_decap(priv, flow);
19621969
@@ -4253,6 +4260,7 @@ static void · 2290 unmodified lines
42534260 mlx5_free_flow_attr_actions(struct mlx5e_tc_flow *flow, struct mlx5_flow_attr *attr)
42544261 {
42554262 struct mlx5_core_dev *counter_dev = get_flow_counter_dev(flow);
4263+ struct mlx5_esw_flow_attr *esw_attr;
42564264
42574265 if (!attr)
42584266 return;
@@ -4270,6 +4278,18 @@ mlx5_free_flow_attr_actions(struct mlx5e_tc_flow *flow, struct mlx5_flow_attr *a · 11 unmodified lines
42704278 mlx5e_tc_detach_mod_hdr(flow->priv, flow, attr);
42714279 }
42724280
4281+ if (mlx5e_is_eswitch_flow(flow)) {
4282+ esw_attr = attr->esw_attr;
4283+
4284+ if (esw_attr->int_port)
4285+ mlx5e_tc_int_port_put(mlx5e_get_int_port_priv(flow->priv),
4286+ esw_attr->int_port);
4287+
4288+ if (esw_attr->dest_int_port)
4289+ mlx5e_tc_int_port_put(mlx5e_get_int_port_priv(flow->priv),
4290+ esw_attr->dest_int_port);
4291+ }
4292+
42734293 mlx5_tc_ct_delete_flow(get_ct_priv(flow->priv), attr);
42744294
42754295 free_branch_attr(flow, attr->branch_true);
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_debugfs.c+1−1
@@ -64,7 +64,7 @@ void mlx5_esw_bridge_debugfs_init(struct net_device *br_netdev, struct mlx5_esw_ · 63 unmodified lines
6464
6565 bridge->debugfs_dir = debugfs_create_dir(br_netdev->name,
6666 bridge->br_offloads->debugfs_root);
67− debugfs_create_file("fdb", 0444, bridge->debugfs_dir, bridge,
67+ debugfs_create_file("fdb", 0400, bridge->debugfs_dir, bridge,
6868 &mlx5_esw_bridge_debugfs_fops);
6969 }
7070
drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c+1−1
@@ -60,7 +60,7 @@ static struct devlink_port *mlx5_esw_dl_port_alloc(struct mlx5_eswitch *esw, u16 · 59 unmodified lines
6060 } else if (mlx5_core_is_ec_vf_vport(esw->dev, vport_num)) {
6161 memcpy(dl_port->attrs.switch_id.id, ppid.id, ppid.id_len);
6262 dl_port->attrs.switch_id.id_len = ppid.id_len;
63− devlink_port_attrs_pci_vf_set(dl_port, controller_num, pfnum,
63+ devlink_port_attrs_pci_vf_set(dl_port, 0, pfnum,
6464 vport_num - 1, false);
6565 }
6666 return dl_port;
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+8−9
@@ -1436,7 +1436,6 @@ esw_chains_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *miss_fdb) · 1435 unmodified lines
14361436
14371437 esw_init_chains_offload_flags(esw, &attr.flags);
14381438 attr.ns = MLX5_FLOW_NAMESPACE_FDB;
1439− attr.fs_base_prio = FDB_TC_OFFLOAD;
14401439 attr.max_grp_num = esw->params.large_group_num;
14411440 attr.default_ft = miss_fdb;
14421441 attr.mapping = esw->offloads.reg_c0_obj_pool;
@@ -2779,9 +2778,9 @@ static int mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw, · 1336 unmodified lines
27792778 struct mlx5_eswitch *peer_esw,
27802779 bool pair)
27812780 {
2782− u8 peer_idx = mlx5_get_dev_index(peer_esw->dev);
2781+ u16 peer_vhca_id = MLX5_CAP_GEN(peer_esw->dev, vhca_id);
2782+ u16 vhca_id = MLX5_CAP_GEN(esw->dev, vhca_id);
27832783 struct mlx5_flow_root_namespace *peer_ns;
2784− u8 idx = mlx5_get_dev_index(esw->dev);
27852784 struct mlx5_flow_root_namespace *ns;
27862785 int err;
27872786
@@ -2789,18 +2788,18 @@ static int mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw, · 1 unmodified line
27892788 ns = esw->dev->priv.steering->fdb_root_ns;
27902789
27912790 if (pair) {
2792− err = mlx5_flow_namespace_set_peer(ns, peer_ns, peer_idx);
2791+ err = mlx5_flow_namespace_set_peer(ns, peer_ns, peer_vhca_id);
27932792 if (err)
27942793 return err;
27952794
2796− err = mlx5_flow_namespace_set_peer(peer_ns, ns, idx);
2795+ err = mlx5_flow_namespace_set_peer(peer_ns, ns, vhca_id);
27972796 if (err) {
2798− mlx5_flow_namespace_set_peer(ns, NULL, peer_idx);
2797+ mlx5_flow_namespace_set_peer(ns, NULL, peer_vhca_id);
27992798 return err;
28002799 }
28012800 } else {
2802− mlx5_flow_namespace_set_peer(ns, NULL, peer_idx);
2803− mlx5_flow_namespace_set_peer(peer_ns, NULL, idx);
2801+ mlx5_flow_namespace_set_peer(ns, NULL, peer_vhca_id);
2802+ mlx5_flow_namespace_set_peer(peer_ns, NULL, vhca_id);
28042803 }
28052804
28062805 return 0;
@@ -4196,7 +4195,7 @@ int mlx5_devlink_port_fn_migratable_set(struct devlink_port *port, bool enable, · 1389 unmodified lines
41964195 }
41974196
41984197 hca_caps = MLX5_ADDR_OF(query_hca_cap_out, query_ctx, capability);
4199− MLX5_SET(cmd_hca_cap_2, hca_caps, migratable, 1);
4198+ MLX5_SET(cmd_hca_cap_2, hca_caps, migratable, enable);
42004199
42014200 err = mlx5_vport_set_other_func_cap(esw->dev, hca_caps, vport->vport,
42024201 MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE2);
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c+1−1
@@ -140,7 +140,7 @@ static void mlx5_cmd_stub_modify_header_dealloc(struct mlx5_flow_root_namespace · 139 unmodified lines
140140
141141 static int mlx5_cmd_stub_set_peer(struct mlx5_flow_root_namespace *ns,
142142 struct mlx5_flow_root_namespace *peer_ns,
143− u8 peer_idx)
143+ u16 peer_vhca_id)
144144 {
145145 return 0;
146146 }
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h+1−1
@@ -94,7 +94,7 @@ struct mlx5_flow_cmds { · 93 unmodified lines
9494
9595 int (*set_peer)(struct mlx5_flow_root_namespace *ns,
9696 struct mlx5_flow_root_namespace *peer_ns,
97− u8 peer_idx);
97+ u16 peer_vhca_id);
9898
9999 int (*create_ns)(struct mlx5_flow_root_namespace *ns);
100100 int (*destroy_ns)(struct mlx5_flow_root_namespace *ns);
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c+85−22
@@ -889,7 +889,7 @@ static struct mlx5_flow_table *find_closest_ft_recursive(struct fs_node *root, · 888 unmodified lines
889889 struct fs_node *iter = list_entry(start, struct fs_node, list);
890890 struct mlx5_flow_table *ft = NULL;
891891
892− if (!root || root->type == FS_TYPE_PRIO_CHAINS)
892+ if (!root)
893893 return NULL;
894894
895895 list_for_each_advance_continue(iter, &root->children, reverse) {
@@ -905,20 +905,42 @@ static struct mlx5_flow_table *find_closest_ft_recursive(struct fs_node *root, · 9 unmodified lines
905905 return ft;
906906 }
907907
908−/* If reverse is false then return the first flow table in next priority of
909− * prio in the tree, else return the last flow table in the previous priority
910− * of prio in the tree.
908+static struct fs_node *find_prio_chains_parent(struct fs_node *parent,
909+ struct fs_node **child)
910+{
911+ struct fs_node *node = NULL;
912+
913+ while (parent && parent->type != FS_TYPE_PRIO_CHAINS) {
914+ node = parent;
915+ parent = parent->parent;
916+ }
917+
918+ if (child)
919+ *child = node;
920+
921+ return parent;
922+}
923+
924+/* If reverse is false then return the first flow table next to the passed node
925+ * in the tree, else return the last flow table before the node in the tree.
926+ * If skip is true, skip the flow tables in the same prio_chains prio.
911927 */
912−static struct mlx5_flow_table *find_closest_ft(struct fs_prio *prio, bool reverse)
928+static struct mlx5_flow_table *find_closest_ft(struct fs_node *node, bool reverse,
929+ bool skip)
913930 {
931+ struct fs_node *prio_chains_parent = NULL;
914932 struct mlx5_flow_table *ft = NULL;
915933 struct fs_node *curr_node;
916934 struct fs_node *parent;
917935
918− parent = prio->node.parent;
919− curr_node = &prio->node;
936+ if (skip)
937+ prio_chains_parent = find_prio_chains_parent(node, NULL);
938+ parent = node->parent;
939+ curr_node = node;
920940 while (!ft && parent) {
921− ft = find_closest_ft_recursive(parent, &curr_node->list, reverse);
941+ if (parent != prio_chains_parent)
942+ ft = find_closest_ft_recursive(parent, &curr_node->list,
943+ reverse);
922944 curr_node = parent;
923945 parent = curr_node->parent;
924946 }
@@ -926,15 +948,15 @@ static struct mlx5_flow_table *find_closest_ft(struct fs_prio *prio, bool revers · 1 unmodified line
926948 }
927949
928950 /* Assuming all the tree is locked by mutex chain lock */
929−static struct mlx5_flow_table *find_next_chained_ft(struct fs_prio *prio)
951+static struct mlx5_flow_table *find_next_chained_ft(struct fs_node *node)
930952 {
931− return find_closest_ft(prio, false);
953+ return find_closest_ft(node, false, true);
932954 }
933955
934956 /* Assuming all the tree is locked by mutex chain lock */
935−static struct mlx5_flow_table *find_prev_chained_ft(struct fs_prio *prio)
957+static struct mlx5_flow_table *find_prev_chained_ft(struct fs_node *node)
936958 {
937− return find_closest_ft(prio, true);
959+ return find_closest_ft(node, true, true);
938960 }
939961
940962 static struct mlx5_flow_table *find_next_fwd_ft(struct mlx5_flow_table *ft,
@@ -946,7 +968,7 @@ static struct mlx5_flow_table *find_next_fwd_ft(struct mlx5_flow_table *ft, · 5 unmodified lines
946968 next_ns = flow_act->action & MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_NS;
947969 fs_get_obj(prio, next_ns ? ft->ns->node.parent : ft->node.parent);
948970
949− return find_next_chained_ft(prio);
971+ return find_next_chained_ft(&prio->node);
950972 }
951973
952974 static int connect_fts_in_prio(struct mlx5_core_dev *dev,
@@ -970,21 +992,55 @@ static int connect_fts_in_prio(struct mlx5_core_dev *dev, · 17 unmodified lines
970992 return 0;
971993 }
972994
995+static struct mlx5_flow_table *find_closet_ft_prio_chains(struct fs_node *node,
996+ struct fs_node *parent,
997+ struct fs_node **child,
998+ bool reverse)
999+{
1000+ struct mlx5_flow_table *ft;
1001+
1002+ ft = find_closest_ft(node, reverse, false);
1003+
1004+ if (ft && parent == find_prio_chains_parent(&ft->node, child))
1005+ return ft;
1006+
1007+ return NULL;
1008+}
1009+
9731010 /* Connect flow tables from previous priority of prio to ft */
9741011 static int connect_prev_fts(struct mlx5_core_dev *dev,
9751012 struct mlx5_flow_table *ft,
9761013 struct fs_prio *prio)
9771014 {
1015+ struct fs_node *prio_parent, *parent = NULL, *child, *node;
9781016 struct mlx5_flow_table *prev_ft;
1017+ int err = 0;
1018+
1019+ prio_parent = find_prio_chains_parent(&prio->node, &child);
1020+
1021+ /* return directly if not under the first sub ns of prio_chains prio */
1022+ if (prio_parent && !list_is_first(&child->list, &prio_parent->children))
1023+ return 0;
9791024
980− prev_ft = find_prev_chained_ft(prio);
981− if (prev_ft) {
1025+ prev_ft = find_prev_chained_ft(&prio->node);
1026+ while (prev_ft) {
9821027 struct fs_prio *prev_prio;
9831028
9841029 fs_get_obj(prev_prio, prev_ft->node.parent);
985− return connect_fts_in_prio(dev, prev_prio, ft);
1030+ err = connect_fts_in_prio(dev, prev_prio, ft);
1031+ if (err)
1032+ break;
1033+
1034+ if (!parent) {
1035+ parent = find_prio_chains_parent(&prev_prio->node, &child);
1036+ if (!parent)
1037+ break;
1038+ }
1039+
1040+ node = child;
1041+ prev_ft = find_closet_ft_prio_chains(node, parent, &child, true);
9861042 }
987− return 0;
1043+ return err;
9881044 }
9891045
9901046 static int update_root_ft_create(struct mlx5_flow_table *ft, struct fs_prio
@@ -1123,7 +1179,7 @@ static int connect_flow_table(struct mlx5_core_dev *dev, struct mlx5_flow_table · 132 unmodified lines
11231179 if (err)
11241180 return err;
11251181
1126− next_ft = first_ft ? first_ft : find_next_chained_ft(prio);
1182+ next_ft = first_ft ? first_ft : find_next_chained_ft(&prio->node);
11271183 err = connect_fwd_rules(dev, ft, next_ft);
11281184 if (err)
11291185 return err;
@@ -1198,7 +1254,7 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa · 68 unmodified lines
11981254
11991255 tree_init_node(&ft->node, del_hw_flow_table, del_sw_flow_table);
12001256 next_ft = unmanaged ? ft_attr->next_ft :
1201− find_next_chained_ft(fs_prio);
1257+ find_next_chained_ft(&fs_prio->node);
12021258 ft->def_miss_action = ns->def_miss_action;
12031259 ft->ns = ns;
12041260 err = root->cmds->create_flow_table(root, ft, ft_attr, next_ft);
@@ -2195,13 +2251,20 @@ EXPORT_SYMBOL(mlx5_del_flow_rules); · 990 unmodified lines
21952251 /* Assuming prio->node.children(flow tables) is sorted by level */
21962252 static struct mlx5_flow_table *find_next_ft(struct mlx5_flow_table *ft)
21972253 {
2254+ struct fs_node *prio_parent, *child;
21982255 struct fs_prio *prio;
21992256
22002257 fs_get_obj(prio, ft->node.parent);
22012258
22022259 if (!list_is_last(&ft->node.list, &prio->node.children))
22032260 return list_next_entry(ft, node.list);
2204− return find_next_chained_ft(prio);
2261+
2262+ prio_parent = find_prio_chains_parent(&prio->node, &child);
2263+
2264+ if (prio_parent && list_is_first(&child->list, &prio_parent->children))
2265+ return find_closest_ft(&prio->node, false, false);
2266+
2267+ return find_next_chained_ft(&prio->node);
22052268 }
22062269
22072270 static int update_root_ft_destroy(struct mlx5_flow_table *ft)
@@ -3621,7 +3684,7 @@ void mlx5_destroy_match_definer(struct mlx5_core_dev *dev, · 1413 unmodified lines
36213684
36223685 int mlx5_flow_namespace_set_peer(struct mlx5_flow_root_namespace *ns,
36233686 struct mlx5_flow_root_namespace *peer_ns,
3624− u8 peer_idx)
3687+ u16 peer_vhca_id)
36253688 {
36263689 if (peer_ns && ns->mode != peer_ns->mode) {
36273690 mlx5_core_err(ns->dev,
@@ -3629,7 +3692,7 @@ int mlx5_flow_namespace_set_peer(struct mlx5_flow_root_namespace *ns, · 1 unmodified line
36293692 return -EINVAL;
36303693 }
36313694
3632− return ns->cmds->set_peer(ns, peer_ns, peer_idx);
3695+ return ns->cmds->set_peer(ns, peer_ns, peer_vhca_id);
36333696 }
36343697
36353698 /* This function should be called only at init stage of the namespace.
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h+1−1
@@ -303,7 +303,7 @@ const struct mlx5_flow_cmds *mlx5_fs_cmd_get_fw_cmds(void); · 302 unmodified lines
303303
304304 int mlx5_flow_namespace_set_peer(struct mlx5_flow_root_namespace *ns,
305305 struct mlx5_flow_root_namespace *peer_ns,
306− u8 peer_idx);
306+ u16 peer_vhca_id);
307307
308308 int mlx5_flow_namespace_set_mode(struct mlx5_flow_namespace *ns,
309309 enum mlx5_flow_steering_mode mode);
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c+1−1
@@ -574,7 +574,7 @@ static int __mlx5_lag_modify_definers_destinations(struct mlx5_lag *ldev, · 573 unmodified lines
574574 for (i = 0; i < ldev->ports; i++) {
575575 for (j = 0; j < ldev->buckets; j++) {
576576 idx = i * ldev->buckets + j;
577− if (ldev->v2p_map[i] == ports[i])
577+ if (ldev->v2p_map[idx] == ports[idx])
578578 continue;
579579
580580 dest.vport.vhca_id = MLX5_CAP_GEN(ldev->pf[ports[idx] - 1].dev,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c+5−0
@@ -227,10 +227,15 @@ static void mlx5_timestamp_overflow(struct work_struct *work) · 226 unmodified lines
227227 clock = container_of(timer, struct mlx5_clock, timer);
228228 mdev = container_of(clock, struct mlx5_core_dev, clock);
229229
230+ if (mdev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
231+ goto out;
232+
230233 write_seqlock_irqsave(&clock->lock, flags);
231234 timecounter_read(&timer->tc);
232235 mlx5_update_clock_info_page(mdev);
233236 write_sequnlock_irqrestore(&clock->lock, flags);
237+
238+out:
234239 schedule_delayed_work(&timer->overflow_work, timer->overflow_period);
235240 }
236241
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c+1−1
@@ -178,7 +178,7 @@ mlx5_chains_create_table(struct mlx5_fs_chains *chains, · 177 unmodified lines
178178 if (!mlx5_chains_ignore_flow_level_supported(chains) ||
179179 (chain == 0 && prio == 1 && level == 0)) {
180180 ft_attr.level = chains->fs_base_level;
181− ft_attr.prio = chains->fs_base_prio;
181+ ft_attr.prio = chains->fs_base_prio + prio - 1;
182182 ns = (chains->ns == MLX5_FLOW_NAMESPACE_FDB) ?
183183 mlx5_get_fdb_sub_ns(chains->dev, chain) :
184184 mlx5_get_flow_namespace(chains->dev, chains->ns);
drivers/net/ethernet/mellanox/mlx5/core/main.c+2−1
@@ -1506,6 +1506,7 @@ void mlx5_uninit_one(struct mlx5_core_dev *dev) · 1505 unmodified lines
15061506 if (!test_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state)) {
15071507 mlx5_core_warn(dev, "%s: interface is down, NOP\n",
15081508 __func__);
1509+ mlx5_devlink_params_unregister(priv_to_devlink(dev));
15091510 mlx5_cleanup_once(dev);
15101511 goto out;
15111512 }
@@ -1988,7 +1989,7 @@ static pci_ers_result_t mlx5_pci_err_detected(struct pci_dev *pdev, · 476 unmodified lines
19881989
19891990 mlx5_enter_error_state(dev, false);
19901991 mlx5_error_sw_reset(dev);
1991− mlx5_unload_one(dev, true);
1992+ mlx5_unload_one(dev, false);
19921993 mlx5_drain_health_wq(dev);
19931994 mlx5_pci_disable_device(dev);
19941995
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h+1−1
@@ -361,7 +361,7 @@ static inline bool mlx5_core_is_ec_vf_vport(const struct mlx5_core_dev *dev, u16 · 360 unmodified lines
361361
362362 static inline int mlx5_vport_to_func_id(const struct mlx5_core_dev *dev, u16 vport, bool ec_vf_func)
363363 {
364− return ec_vf_func ? vport - mlx5_core_ec_vf_vport_base(dev)
364+ return ec_vf_func ? vport - mlx5_core_ec_vf_vport_base(dev) + 1
365365 : vport;
366366 }
367367
drivers/net/ethernet/mellanox/mlx5/core/sriov.c+1−2
@@ -285,8 +285,7 @@ static u16 mlx5_get_max_vfs(struct mlx5_core_dev *dev) · 284 unmodified lines
285285 host_total_vfs = MLX5_GET(query_esw_functions_out, out,
286286 host_params_context.host_total_vfs);
287287 kvfree(out);
288− if (host_total_vfs)
289− return host_total_vfs;
288+ return host_total_vfs;
290289 }
291290
292291 done:
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c+1−1
@@ -2079,7 +2079,7 @@ mlx5dr_action_create_dest_vport(struct mlx5dr_domain *dmn, · 2078 unmodified lines
20792079
20802080 peer_vport = vhca_id_valid && mlx5_core_is_pf(dmn->mdev) &&
20812081 (vhca_id != dmn->info.caps.gvmi);
2082− vport_dmn = peer_vport ? dmn->peer_dmn[vhca_id] : dmn;
2082+ vport_dmn = peer_vport ? xa_load(&dmn->peer_dmn_xa, vhca_id) : dmn;
20832083 if (!vport_dmn) {
20842084 mlx5dr_dbg(dmn, "No peer vport domain for given vhca_id\n");
20852085 return NULL;
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c+3−2
@@ -564,11 +564,12 @@ int mlx5dr_cmd_create_reformat_ctx(struct mlx5_core_dev *mdev, · 563 unmodified lines
564564
565565 err = mlx5_cmd_exec(mdev, in, inlen, out, sizeof(out));
566566 if (err)
567− return err;
567+ goto err_free_in;
568568
569569 *reformat_id = MLX5_GET(alloc_packet_reformat_context_out, out, packet_reformat_id);
570− kvfree(in);
571570
571+err_free_in:
572+ kvfree(in);
572573 return err;
573574 }
574575
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c+13−6
@@ -475,6 +475,7 @@ mlx5dr_domain_create(struct mlx5_core_dev *mdev, enum mlx5dr_domain_type type) · 474 unmodified lines
475475 mutex_init(&dmn->info.rx.mutex);
476476 mutex_init(&dmn->info.tx.mutex);
477477 xa_init(&dmn->definers_xa);
478+ xa_init(&dmn->peer_dmn_xa);
478479
479480 if (dr_domain_caps_init(mdev, dmn)) {
480481 mlx5dr_err(dmn, "Failed init domain, no caps\n");
@@ -507,6 +508,7 @@ mlx5dr_domain_create(struct mlx5_core_dev *mdev, enum mlx5dr_domain_type type) · 26 unmodified lines
507508 uninit_caps:
508509 dr_domain_caps_uninit(dmn);
509510 def_xa_destroy:
511+ xa_destroy(&dmn->peer_dmn_xa);
510512 xa_destroy(&dmn->definers_xa);
511513 kfree(dmn);
512514 return NULL;
@@ -547,6 +549,7 @@ int mlx5dr_domain_destroy(struct mlx5dr_domain *dmn) · 34 unmodified lines
547549 dr_domain_uninit_csum_recalc_fts(dmn);
548550 dr_domain_uninit_resources(dmn);
549551 dr_domain_caps_uninit(dmn);
552+ xa_destroy(&dmn->peer_dmn_xa);
550553 xa_destroy(&dmn->definers_xa);
551554 mutex_destroy(&dmn->info.tx.mutex);
552555 mutex_destroy(&dmn->info.rx.mutex);
@@ -556,17 +559,21 @@ int mlx5dr_domain_destroy(struct mlx5dr_domain *dmn) · 3 unmodified lines
556559
557560 void mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn,
558561 struct mlx5dr_domain *peer_dmn,
559− u8 peer_idx)
562+ u16 peer_vhca_id)
560563 {
564+ struct mlx5dr_domain *peer;
565+
561566 mlx5dr_domain_lock(dmn);
562567
563− if (dmn->peer_dmn[peer_idx])
564− refcount_dec(&dmn->peer_dmn[peer_idx]->refcount);
568+ peer = xa_load(&dmn->peer_dmn_xa, peer_vhca_id);
569+ if (peer)
570+ refcount_dec(&peer->refcount);
565571
566− dmn->peer_dmn[peer_idx] = peer_dmn;
572+ WARN_ON(xa_err(xa_store(&dmn->peer_dmn_xa, peer_vhca_id, peer_dmn, GFP_KERNEL)));
567573
568− if (dmn->peer_dmn[peer_idx])
569− refcount_inc(&dmn->peer_dmn[peer_idx]->refcount);
574+ peer = xa_load(&dmn->peer_dmn_xa, peer_vhca_id);
575+ if (peer)
576+ refcount_inc(&peer->refcount);
570577
571578 mlx5dr_domain_unlock(dmn);
572579 }
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ptrn.c+1−1
@@ -82,7 +82,7 @@ dr_ptrn_alloc_pattern(struct mlx5dr_ptrn_mgr *mgr, · 81 unmodified lines
8282 u32 chunk_size;
8383 u32 index;
8484
85− chunk_size = ilog2(num_of_actions);
85+ chunk_size = ilog2(roundup_pow_of_two(num_of_actions));
8686 /* HW modify action index granularity is at least 64B */
8787 chunk_size = max_t(u32, chunk_size, DR_CHUNK_SIZE_8);
8888
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v0.c+4−3
@@ -1652,17 +1652,18 @@ dr_ste_v0_build_src_gvmi_qpn_tag(struct mlx5dr_match_param *value, · 1651 unmodified lines
16521652 struct mlx5dr_domain *dmn = sb->dmn;
16531653 struct mlx5dr_domain *vport_dmn;
16541654 u8 *bit_mask = sb->bit_mask;
1655+ struct mlx5dr_domain *peer;
16551656 bool source_gvmi_set;
16561657
16571658 DR_STE_SET_TAG(src_gvmi_qp, tag, source_qp, misc, source_sqn);
16581659
16591660 if (sb->vhca_id_valid) {
1661+ peer = xa_load(&dmn->peer_dmn_xa, id);
16601662 /* Find port GVMI based on the eswitch_owner_vhca_id */
16611663 if (id == dmn->info.caps.gvmi)
16621664 vport_dmn = dmn;
1663− else if (id < MLX5_MAX_PORTS && dmn->peer_dmn[id] &&
1664− (id == dmn->peer_dmn[id]->info.caps.gvmi))
1665− vport_dmn = dmn->peer_dmn[id];
1665+ else if (peer && (id == peer->info.caps.gvmi))
1666+ vport_dmn = peer;
16661667 else
16671668 return -EINVAL;
16681669
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c+4−3
@@ -1984,16 +1984,17 @@ static int dr_ste_v1_build_src_gvmi_qpn_tag(struct mlx5dr_match_param *value, · 1983 unmodified lines
19841984 struct mlx5dr_domain *dmn = sb->dmn;
19851985 struct mlx5dr_domain *vport_dmn;
19861986 u8 *bit_mask = sb->bit_mask;
1987+ struct mlx5dr_domain *peer;
19871988
19881989 DR_STE_SET_TAG(src_gvmi_qp_v1, tag, source_qp, misc, source_sqn);
19891990
19901991 if (sb->vhca_id_valid) {
1992+ peer = xa_load(&dmn->peer_dmn_xa, id);
19911993 /* Find port GVMI based on the eswitch_owner_vhca_id */
19921994 if (id == dmn->info.caps.gvmi)
19931995 vport_dmn = dmn;
1994− else if (id < MLX5_MAX_PORTS && dmn->peer_dmn[id] &&
1995− (id == dmn->peer_dmn[id]->info.caps.gvmi))
1996− vport_dmn = dmn->peer_dmn[id];
1996+ else if (peer && (id == peer->info.caps.gvmi))
1997+ vport_dmn = peer;
19971998 else
19981999 return -EINVAL;
19992000
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h+1−1
@@ -935,7 +935,6 @@ struct mlx5dr_domain_info { · 934 unmodified lines
935935 };
936936
937937 struct mlx5dr_domain {
938− struct mlx5dr_domain *peer_dmn[MLX5_MAX_PORTS];
939938 struct mlx5_core_dev *mdev;
940939 u32 pdn;
941940 struct mlx5_uars_page *uar;
@@ -956,6 +955,7 @@ struct mlx5dr_domain { · 14 unmodified lines
956955 struct list_head dbg_tbl_list;
957956 struct mlx5dr_dbg_dump_info dump_info;
958957 struct xarray definers_xa;
958+ struct xarray peer_dmn_xa;
959959 /* memory management statistics */
960960 u32 num_buddies[DR_ICM_TYPE_MAX];
961961 };
drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c+2−2
@@ -781,14 +781,14 @@ restore_fte: · 780 unmodified lines
781781
782782 static int mlx5_cmd_dr_set_peer(struct mlx5_flow_root_namespace *ns,
783783 struct mlx5_flow_root_namespace *peer_ns,
784− u8 peer_idx)
784+ u16 peer_vhca_id)
785785 {
786786 struct mlx5dr_domain *peer_domain = NULL;
787787
788788 if (peer_ns)
789789 peer_domain = peer_ns->fs_dr_domain.dr_domain;
790790 mlx5dr_domain_set_peer(ns->fs_dr_domain.dr_domain,
791− peer_domain, peer_idx);
791+ peer_domain, peer_vhca_id);
792792 return 0;
793793 }
794794
drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h+1−1
@@ -49,7 +49,7 @@ int mlx5dr_domain_sync(struct mlx5dr_domain *domain, u32 flags); · 48 unmodified lines
4949
5050 void mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn,
5151 struct mlx5dr_domain *peer_dmn,
52− u8 peer_idx);
52+ u16 peer_vhca_id);
5353
5454 struct mlx5dr_table *
5555 mlx5dr_table_create(struct mlx5dr_domain *domain, u32 level, u32 flags,
drivers/net/ethernet/microsoft/mana/mana_en.c+33−4
@@ -8,6 +8,7 @@ · 7 unmodified lines
88 #include <linux/ethtool.h>
99 #include <linux/filter.h>
1010 #include <linux/mm.h>
11+#include <linux/pci.h>
1112
1213 #include <net/checksum.h>
1314 #include <net/ip6_checksum.h>
@@ -2345,9 +2346,12 @@ int mana_attach(struct net_device *ndev) · 2331 unmodified lines
23452346 static int mana_dealloc_queues(struct net_device *ndev)
23462347 {
23472348 struct mana_port_context *apc = netdev_priv(ndev);
2349+ unsigned long timeout = jiffies + 120 * HZ;
23482350 struct gdma_dev *gd = apc->ac->gdma_dev;
23492351 struct mana_txq *txq;
2352+ struct sk_buff *skb;
23502353 int i, err;
2354+ u32 tsleep;
23512355
23522356 if (apc->port_is_up)
23532357 return -EINVAL;
@@ -2363,15 +2367,40 @@ static int mana_dealloc_queues(struct net_device *ndev) · 9 unmodified lines
23632367 * to false, but it doesn't matter since mana_start_xmit() drops any
23642368 * new packets due to apc->port_is_up being false.
23652369 *
2366− * Drain all the in-flight TX packets
2370+ * Drain all the in-flight TX packets.
2371+ * A timeout of 120 seconds for all the queues is used.
2372+ * This will break the while loop when h/w is not responding.
2373+ * This value of 120 has been decided here considering max
2374+ * number of queues.
23672375 */
2376+
23682377 for (i = 0; i < apc->num_queues; i++) {
23692378 txq = &apc->tx_qp[i].txq;
2370−
2371− while (atomic_read(&txq->pending_sends) > 0)
2372− usleep_range(1000, 2000);
2379+ tsleep = 1000;
2380+ while (atomic_read(&txq->pending_sends) > 0 &&
2381+ time_before(jiffies, timeout)) {
2382+ usleep_range(tsleep, tsleep + 1000);
2383+ tsleep <<= 1;
2384+ }
2385+ if (atomic_read(&txq->pending_sends)) {
2386+ err = pcie_flr(to_pci_dev(gd->gdma_context->dev));
2387+ if (err) {
2388+ netdev_err(ndev, "flr failed %d with %d pkts pending in txq %u\n",
2389+ err, atomic_read(&txq->pending_sends),
2390+ txq->gdma_txq_id);
2391+ }
2392+ break;
2393+ }
23732394 }
23742395
2396+ for (i = 0; i < apc->num_queues; i++) {
2397+ txq = &apc->tx_qp[i].txq;
2398+ while ((skb = skb_dequeue(&txq->pending_skbs))) {
2399+ mana_unmap_skb(skb, apc);
2400+ dev_kfree_skb_any(skb);
2401+ }
2402+ atomic_set(&txq->pending_sends, 0);
2403+ }
23752404 /* We're 100% sure the queues can no longer be woken up, because
23762405 * we're sure now mana_poll_tx_cq() can't be running.
23772406 */
drivers/net/ethernet/pensando/ionic/ionic_lif.c+16−7
@@ -1817,6 +1817,7 @@ static int ionic_change_mtu(struct net_device *netdev, int new_mtu) · 1816 unmodified lines
18171817 static void ionic_tx_timeout_work(struct work_struct *ws)
18181818 {
18191819 struct ionic_lif *lif = container_of(ws, struct ionic_lif, tx_timeout_work);
1820+ int err;
18201821
18211822 if (test_bit(IONIC_LIF_F_FW_RESET, lif->state))
18221823 return;
@@ -1829,8 +1830,11 @@ static void ionic_tx_timeout_work(struct work_struct *ws) · 6 unmodified lines
18291830
18301831 mutex_lock(&lif->queue_lock);
18311832 ionic_stop_queues_reconfig(lif);
1832− ionic_start_queues_reconfig(lif);
1833+ err = ionic_start_queues_reconfig(lif);
18331834 mutex_unlock(&lif->queue_lock);
1835+
1836+ if (err)
1837+ dev_err(lif->ionic->dev, "%s: Restarting queues failed\n", __func__);
18341838 }
18351839
18361840 static void ionic_tx_timeout(struct net_device *netdev, unsigned int txqueue)
@@ -2800,17 +2804,22 @@ static int ionic_cmb_reconfig(struct ionic_lif *lif, · 963 unmodified lines
28002804 if (err) {
28012805 dev_err(lif->ionic->dev,
28022806 "CMB restore failed: %d\n", err);
2803− goto errout;
2807+ goto err_out;
28042808 }
28052809 }
28062810
2807− ionic_start_queues_reconfig(lif);
2808− } else {
2809− /* This was detached in ionic_stop_queues_reconfig() */
2810− netif_device_attach(lif->netdev);
2811+ err = ionic_start_queues_reconfig(lif);
2812+ if (err) {
2813+ dev_err(lif->ionic->dev,
2814+ "CMB reconfig failed: %d\n", err);
2815+ goto err_out;
2816+ }
28112817 }
28122818
2813−errout:
2819+err_out:
2820+ /* This was detached in ionic_stop_queues_reconfig() */
2821+ netif_device_attach(lif->netdev);
2822+
28142823 return err;
28152824 }
28162825
drivers/net/ethernet/qlogic/qed/qed_dev_api.h+16−0
@@ -193,6 +193,22 @@ void qed_hw_remove(struct qed_dev *cdev); · 192 unmodified lines
193193 */
194194 struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn);
195195
196+/**
197+ * qed_ptt_acquire_context(): Allocate a PTT window honoring the context
198+ * atomicy.
199+ *
200+ * @p_hwfn: HW device data.
201+ * @is_atomic: Hint from the caller - if the func can sleep or not.
202+ *
203+ * Context: The function should not sleep in case is_atomic == true.
204+ * Return: struct qed_ptt.
205+ *
206+ * Should be called at the entry point to the driver
207+ * (at the beginning of an exported function).
208+ */
209+struct qed_ptt *qed_ptt_acquire_context(struct qed_hwfn *p_hwfn,
210+ bool is_atomic);
211+
196212 /**
197213 * qed_ptt_release(): Release PTT Window.
198214 *
drivers/net/ethernet/qlogic/qed/qed_fcoe.c+14−5
@@ -693,13 +693,14 @@ static void _qed_fcoe_get_pstats(struct qed_hwfn *p_hwfn, · 692 unmodified lines
693693 }
694694
695695 static int qed_fcoe_get_stats(struct qed_hwfn *p_hwfn,
696− struct qed_fcoe_stats *p_stats)
696+ struct qed_fcoe_stats *p_stats,
697+ bool is_atomic)
697698 {
698699 struct qed_ptt *p_ptt;
699700
700701 memset(p_stats, 0, sizeof(*p_stats));
701702
702− p_ptt = qed_ptt_acquire(p_hwfn);
703+ p_ptt = qed_ptt_acquire_context(p_hwfn, is_atomic);
703704
704705 if (!p_ptt) {
705706 DP_ERR(p_hwfn, "Failed to acquire ptt\n");
@@ -973,19 +974,27 @@ static int qed_fcoe_destroy_conn(struct qed_dev *cdev, · 267 unmodified lines
973974 QED_SPQ_MODE_EBLOCK, NULL);
974975 }
975976
977+static int qed_fcoe_stats_context(struct qed_dev *cdev,
978+ struct qed_fcoe_stats *stats,
979+ bool is_atomic)
980+{
981+ return qed_fcoe_get_stats(QED_AFFIN_HWFN(cdev), stats, is_atomic);
982+}
983+
976984 static int qed_fcoe_stats(struct qed_dev *cdev, struct qed_fcoe_stats *stats)
977985 {
978− return qed_fcoe_get_stats(QED_AFFIN_HWFN(cdev), stats);
986+ return qed_fcoe_stats_context(cdev, stats, false);
979987 }
980988
981989 void qed_get_protocol_stats_fcoe(struct qed_dev *cdev,
982− struct qed_mcp_fcoe_stats *stats)
990+ struct qed_mcp_fcoe_stats *stats,
991+ bool is_atomic)
983992 {
984993 struct qed_fcoe_stats proto_stats;
985994
986995 /* Retrieve FW statistics */
987996 memset(&proto_stats, 0, sizeof(proto_stats));
988− if (qed_fcoe_stats(cdev, &proto_stats)) {
997+ if (qed_fcoe_stats_context(cdev, &proto_stats, is_atomic)) {
989998 DP_VERBOSE(cdev, QED_MSG_STORAGE,
990999 "Failed to collect FCoE statistics\n");
9911000 return;
drivers/net/ethernet/qlogic/qed/qed_fcoe.h+15−2
@@ -28,8 +28,20 @@ int qed_fcoe_alloc(struct qed_hwfn *p_hwfn); · 27 unmodified lines
2828 void qed_fcoe_setup(struct qed_hwfn *p_hwfn);
2929
3030 void qed_fcoe_free(struct qed_hwfn *p_hwfn);
31+/**
32+ * qed_get_protocol_stats_fcoe(): Fills provided statistics
33+ * struct with statistics.
34+ *
35+ * @cdev: Qed dev pointer.
36+ * @stats: Points to struct that will be filled with statistics.
37+ * @is_atomic: Hint from the caller - if the func can sleep or not.
38+ *
39+ * Context: The function should not sleep in case is_atomic == true.
40+ * Return: Void.
41+ */
3142 void qed_get_protocol_stats_fcoe(struct qed_dev *cdev,
32− struct qed_mcp_fcoe_stats *stats);
43+ struct qed_mcp_fcoe_stats *stats,
44+ bool is_atomic);
3345 #else /* CONFIG_QED_FCOE */
3446 static inline int qed_fcoe_alloc(struct qed_hwfn *p_hwfn)
3547 {
@@ -40,7 +52,8 @@ static inline void qed_fcoe_setup(struct qed_hwfn *p_hwfn) {} · 4 unmodified lines
4052 static inline void qed_fcoe_free(struct qed_hwfn *p_hwfn) {}
4153
4254 static inline void qed_get_protocol_stats_fcoe(struct qed_dev *cdev,
43− struct qed_mcp_fcoe_stats *stats)
55+ struct qed_mcp_fcoe_stats *stats,
56+ bool is_atomic)
4457 {
4558 }
4659 #endif /* CONFIG_QED_FCOE */
drivers/net/ethernet/qlogic/qed/qed_hw.c+22−4
@@ -23,7 +23,10 @@ · 22 unmodified lines
2323 #include "qed_reg_addr.h"
2424 #include "qed_sriov.h"
2525
26−#define QED_BAR_ACQUIRE_TIMEOUT 1000
26+#define QED_BAR_ACQUIRE_TIMEOUT_USLEEP_CNT 1000
27+#define QED_BAR_ACQUIRE_TIMEOUT_USLEEP 1000
28+#define QED_BAR_ACQUIRE_TIMEOUT_UDELAY_CNT 100000
29+#define QED_BAR_ACQUIRE_TIMEOUT_UDELAY 10
2730
2831 /* Invalid values */
2932 #define QED_BAR_INVALID_OFFSET (cpu_to_le32(-1))
@@ -84,12 +87,22 @@ void qed_ptt_pool_free(struct qed_hwfn *p_hwfn) · 54 unmodified lines
8487 }
8588
8689 struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn)
90+{
91+ return qed_ptt_acquire_context(p_hwfn, false);
92+}
93+
94+struct qed_ptt *qed_ptt_acquire_context(struct qed_hwfn *p_hwfn, bool is_atomic)
8795 {
8896 struct qed_ptt *p_ptt;
89− unsigned int i;
97+ unsigned int i, count;
98+
99+ if (is_atomic)
100+ count = QED_BAR_ACQUIRE_TIMEOUT_UDELAY_CNT;
101+ else
102+ count = QED_BAR_ACQUIRE_TIMEOUT_USLEEP_CNT;
90103
91104 /* Take the free PTT from the list */
92− for (i = 0; i < QED_BAR_ACQUIRE_TIMEOUT; i++) {
105+ for (i = 0; i < count; i++) {
93106 spin_lock_bh(&p_hwfn->p_ptt_pool->lock);
94107
95108 if (!list_empty(&p_hwfn->p_ptt_pool->free_list)) {
@@ -105,7 +118,12 @@ struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn) · 9 unmodified lines
105118 }
106119
107120 spin_unlock_bh(&p_hwfn->p_ptt_pool->lock);
108− usleep_range(1000, 2000);
121+
122+ if (is_atomic)
123+ udelay(QED_BAR_ACQUIRE_TIMEOUT_UDELAY);
124+ else
125+ usleep_range(QED_BAR_ACQUIRE_TIMEOUT_USLEEP,
126+ QED_BAR_ACQUIRE_TIMEOUT_USLEEP * 2);
109127 }
110128
111129 DP_NOTICE(p_hwfn, "PTT acquire timeout - failed to allocate PTT\n");
drivers/net/ethernet/qlogic/qed/qed_iscsi.c+14−5
@@ -999,13 +999,14 @@ static void _qed_iscsi_get_pstats(struct qed_hwfn *p_hwfn, · 998 unmodified lines
999999 }
10001000
10011001 static int qed_iscsi_get_stats(struct qed_hwfn *p_hwfn,
1002− struct qed_iscsi_stats *stats)
1002+ struct qed_iscsi_stats *stats,
1003+ bool is_atomic)
10031004 {
10041005 struct qed_ptt *p_ptt;
10051006
10061007 memset(stats, 0, sizeof(*stats));
10071008
1008− p_ptt = qed_ptt_acquire(p_hwfn);
1009+ p_ptt = qed_ptt_acquire_context(p_hwfn, is_atomic);
10091010 if (!p_ptt) {
10101011 DP_ERR(p_hwfn, "Failed to acquire ptt\n");
10111012 return -EAGAIN;
@@ -1336,9 +1337,16 @@ static int qed_iscsi_destroy_conn(struct qed_dev *cdev, · 324 unmodified lines
13361337 QED_SPQ_MODE_EBLOCK, NULL);
13371338 }
13381339
1340+static int qed_iscsi_stats_context(struct qed_dev *cdev,
1341+ struct qed_iscsi_stats *stats,
1342+ bool is_atomic)
1343+{
1344+ return qed_iscsi_get_stats(QED_AFFIN_HWFN(cdev), stats, is_atomic);
1345+}
1346+
13391347 static int qed_iscsi_stats(struct qed_dev *cdev, struct qed_iscsi_stats *stats)
13401348 {
1341− return qed_iscsi_get_stats(QED_AFFIN_HWFN(cdev), stats);
1349+ return qed_iscsi_stats_context(cdev, stats, false);
13421350 }
13431351
13441352 static int qed_iscsi_change_mac(struct qed_dev *cdev,
@@ -1358,13 +1366,14 @@ static int qed_iscsi_change_mac(struct qed_dev *cdev, · 13 unmodified lines
13581366 }
13591367
13601368 void qed_get_protocol_stats_iscsi(struct qed_dev *cdev,
1361− struct qed_mcp_iscsi_stats *stats)
1369+ struct qed_mcp_iscsi_stats *stats,
1370+ bool is_atomic)
13621371 {
13631372 struct qed_iscsi_stats proto_stats;
13641373
13651374 /* Retrieve FW statistics */
13661375 memset(&proto_stats, 0, sizeof(proto_stats));
1367− if (qed_iscsi_stats(cdev, &proto_stats)) {
1376+ if (qed_iscsi_stats_context(cdev, &proto_stats, is_atomic)) {
13681377 DP_VERBOSE(cdev, QED_MSG_STORAGE,
13691378 "Failed to collect ISCSI statistics\n");
13701379 return;
drivers/net/ethernet/qlogic/qed/qed_iscsi.h+6−2
@@ -39,11 +39,14 @@ void qed_iscsi_free(struct qed_hwfn *p_hwfn); · 38 unmodified lines
3939 *
4040 * @cdev: Qed dev pointer.
4141 * @stats: Points to struct that will be filled with statistics.
42+ * @is_atomic: Hint from the caller - if the func can sleep or not.
4243 *
44+ * Context: The function should not sleep in case is_atomic == true.
4345 * Return: Void.
4446 */
4547 void qed_get_protocol_stats_iscsi(struct qed_dev *cdev,
46− struct qed_mcp_iscsi_stats *stats);
48+ struct qed_mcp_iscsi_stats *stats,
49+ bool is_atomic);
4750 #else /* IS_ENABLED(CONFIG_QED_ISCSI) */
4851 static inline int qed_iscsi_alloc(struct qed_hwfn *p_hwfn)
4952 {
@@ -56,7 +59,8 @@ static inline void qed_iscsi_free(struct qed_hwfn *p_hwfn) {} · 6 unmodified lines
5659
5760 static inline void
5861 qed_get_protocol_stats_iscsi(struct qed_dev *cdev,
59− struct qed_mcp_iscsi_stats *stats) {}
62+ struct qed_mcp_iscsi_stats *stats,
63+ bool is_atomic) {}
6064 #endif /* IS_ENABLED(CONFIG_QED_ISCSI) */
6165
6266 #endif
drivers/net/ethernet/qlogic/qed/qed_l2.c+14−5
@@ -1863,7 +1863,8 @@ static void __qed_get_vport_stats(struct qed_hwfn *p_hwfn, · 1862 unmodified lines
18631863 }
18641864
18651865 static void _qed_get_vport_stats(struct qed_dev *cdev,
1866− struct qed_eth_stats *stats)
1866+ struct qed_eth_stats *stats,
1867+ bool is_atomic)
18671868 {
18681869 u8 fw_vport = 0;
18691870 int i;
@@ -1872,10 +1873,11 @@ static void _qed_get_vport_stats(struct qed_dev *cdev, · 2 unmodified lines
18721873
18731874 for_each_hwfn(cdev, i) {
18741875 struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
1875− struct qed_ptt *p_ptt = IS_PF(cdev) ? qed_ptt_acquire(p_hwfn)
1876− : NULL;
1876+ struct qed_ptt *p_ptt;
18771877 bool b_get_port_stats;
18781878
1879+ p_ptt = IS_PF(cdev) ? qed_ptt_acquire_context(p_hwfn, is_atomic)
1880+ : NULL;
18791881 if (IS_PF(cdev)) {
18801882 /* The main vport index is relative first */
18811883 if (qed_fw_vport(p_hwfn, 0, &fw_vport)) {
@@ -1900,6 +1902,13 @@ out: · 18 unmodified lines
19001902 }
19011903
19021904 void qed_get_vport_stats(struct qed_dev *cdev, struct qed_eth_stats *stats)
1905+{
1906+ qed_get_vport_stats_context(cdev, stats, false);
1907+}
1908+
1909+void qed_get_vport_stats_context(struct qed_dev *cdev,
1910+ struct qed_eth_stats *stats,
1911+ bool is_atomic)
19031912 {
19041913 u32 i;
19051914
@@ -1908,7 +1917,7 @@ void qed_get_vport_stats(struct qed_dev *cdev, struct qed_eth_stats *stats) · 2 unmodified lines
19081917 return;
19091918 }
19101919
1911− _qed_get_vport_stats(cdev, stats);
1920+ _qed_get_vport_stats(cdev, stats, is_atomic);
19121921
19131922 if (!cdev->reset_stats)
19141923 return;
@@ -1960,7 +1969,7 @@ void qed_reset_vport_stats(struct qed_dev *cdev) · 45 unmodified lines
19601969 if (!cdev->reset_stats) {
19611970 DP_INFO(cdev, "Reset stats not allocated\n");
19621971 } else {
1963− _qed_get_vport_stats(cdev, cdev->reset_stats);
1972+ _qed_get_vport_stats(cdev, cdev->reset_stats, false);
19641973 cdev->reset_stats->common.link_change_count = 0;
19651974 }
19661975 }
drivers/net/ethernet/qlogic/qed/qed_l2.h+24−0
@@ -249,8 +249,32 @@ qed_sp_eth_rx_queues_update(struct qed_hwfn *p_hwfn, · 248 unmodified lines
249249 enum spq_mode comp_mode,
250250 struct qed_spq_comp_cb *p_comp_data);
251251
252+/**
253+ * qed_get_vport_stats(): Fills provided statistics
254+ * struct with statistics.
255+ *
256+ * @cdev: Qed dev pointer.
257+ * @stats: Points to struct that will be filled with statistics.
258+ *
259+ * Return: Void.
260+ */
252261 void qed_get_vport_stats(struct qed_dev *cdev, struct qed_eth_stats *stats);
253262
263+/**
264+ * qed_get_vport_stats_context(): Fills provided statistics
265+ * struct with statistics.
266+ *
267+ * @cdev: Qed dev pointer.
268+ * @stats: Points to struct that will be filled with statistics.
269+ * @is_atomic: Hint from the caller - if the func can sleep or not.
270+ *
271+ * Context: The function should not sleep in case is_atomic == true.
272+ * Return: Void.
273+ */
274+void qed_get_vport_stats_context(struct qed_dev *cdev,
275+ struct qed_eth_stats *stats,
276+ bool is_atomic);
277+
254278 void qed_reset_vport_stats(struct qed_dev *cdev);
255279
256280 /**
drivers/net/ethernet/qlogic/qed/qed_main.c+3−3
@@ -3092,7 +3092,7 @@ void qed_get_protocol_stats(struct qed_dev *cdev, · 3091 unmodified lines
30923092
30933093 switch (type) {
30943094 case QED_MCP_LAN_STATS:
3095− qed_get_vport_stats(cdev, &eth_stats);
3095+ qed_get_vport_stats_context(cdev, &eth_stats, true);
30963096 stats->lan_stats.ucast_rx_pkts =
30973097 eth_stats.common.rx_ucast_pkts;
30983098 stats->lan_stats.ucast_tx_pkts =
@@ -3100,10 +3100,10 @@ void qed_get_protocol_stats(struct qed_dev *cdev, · 1 unmodified line
31003100 stats->lan_stats.fcs_err = -1;
31013101 break;
31023102 case QED_MCP_FCOE_STATS:
3103− qed_get_protocol_stats_fcoe(cdev, &stats->fcoe_stats);
3103+ qed_get_protocol_stats_fcoe(cdev, &stats->fcoe_stats, true);
31043104 break;
31053105 case QED_MCP_ISCSI_STATS:
3106− qed_get_protocol_stats_iscsi(cdev, &stats->iscsi_stats);
3106+ qed_get_protocol_stats_iscsi(cdev, &stats->iscsi_stats, true);
31073107 break;
31083108 default:
31093109 DP_VERBOSE(cdev, QED_MSG_SP,
drivers/net/ethernet/sfc/falcon/selftest.c+13−10
@@ -40,15 +40,16 @@ · 39 unmodified lines
4040 */
4141 struct ef4_loopback_payload {
4242 char pad[2]; /* Ensures ip is 4-byte aligned */
43− struct ethhdr header;
44− struct iphdr ip;
45− struct udphdr udp;
46− __be16 iteration;
47− char msg[64];
43+ struct_group_attr(packet, __packed,
44+ struct ethhdr header;
45+ struct iphdr ip;
46+ struct udphdr udp;
47+ __be16 iteration;
48+ char msg[64];
49+ );
4850 } __packed __aligned(4);
49−#define EF4_LOOPBACK_PAYLOAD_LEN (sizeof(struct ef4_loopback_payload) - \
50− offsetof(struct ef4_loopback_payload, \
51− header))
51+#define EF4_LOOPBACK_PAYLOAD_LEN \
52+ sizeof_field(struct ef4_loopback_payload, packet)
5253
5354 /* Loopback test source MAC address */
5455 static const u8 payload_source[ETH_ALEN] __aligned(2) = {
@@ -299,7 +300,7 @@ void ef4_loopback_rx_packet(struct ef4_nic *efx, · 244 unmodified lines
299300
300301 payload = &state->payload;
301302
302− memcpy(&received.header, buf_ptr,
303+ memcpy(&received.packet, buf_ptr,
303304 min_t(int, pkt_len, EF4_LOOPBACK_PAYLOAD_LEN));
304305 received.ip.saddr = payload->ip.saddr;
305306 if (state->offload_csum)
@@ -370,7 +371,7 @@ void ef4_loopback_rx_packet(struct ef4_nic *efx, · 64 unmodified lines
370371 buf_ptr, pkt_len, 0);
371372 netif_err(efx, drv, efx->net_dev, "expected packet:\n");
372373 print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 0x10, 1,
373− &state->payload.header, EF4_LOOPBACK_PAYLOAD_LEN,
374+ &state->payload.packet, EF4_LOOPBACK_PAYLOAD_LEN,
374375 0);
375376 }
376377 #endif
@@ -440,6 +441,8 @@ static int ef4_begin_loopback(struct ef4_tx_queue *tx_queue) · 63 unmodified lines
440441 payload->ip.saddr = htonl(INADDR_LOOPBACK | (i << 2));
441442 /* Strip off the leading padding */
442443 skb_pull(skb, offsetof(struct ef4_loopback_payload, header));
444+ /* Strip off the trailing padding */
445+ skb_trim(skb, EF4_LOOPBACK_PAYLOAD_LEN);
443446
444447 /* Ensure everything we've written is visible to the
445448 * interrupt handler. */
drivers/net/ethernet/sfc/selftest.c+13−10
@@ -43,15 +43,16 @@ · 42 unmodified lines
4343 */
4444 struct efx_loopback_payload {
4545 char pad[2]; /* Ensures ip is 4-byte aligned */
46− struct ethhdr header;
47− struct iphdr ip;
48− struct udphdr udp;
49− __be16 iteration;
50− char msg[64];
46+ struct_group_attr(packet, __packed,
47+ struct ethhdr header;
48+ struct iphdr ip;
49+ struct udphdr udp;
50+ __be16 iteration;
51+ char msg[64];
52+ );
5153 } __packed __aligned(4);
52−#define EFX_LOOPBACK_PAYLOAD_LEN (sizeof(struct efx_loopback_payload) - \
53− offsetof(struct efx_loopback_payload, \
54− header))
54+#define EFX_LOOPBACK_PAYLOAD_LEN \
55+ sizeof_field(struct efx_loopback_payload, packet)
5556
5657 /* Loopback test source MAC address */
5758 static const u8 payload_source[ETH_ALEN] __aligned(2) = {
@@ -297,7 +298,7 @@ void efx_loopback_rx_packet(struct efx_nic *efx, · 239 unmodified lines
297298
298299 payload = &state->payload;
299300
300− memcpy(&received.header, buf_ptr,
301+ memcpy(&received.packet, buf_ptr,
301302 min_t(int, pkt_len, EFX_LOOPBACK_PAYLOAD_LEN));
302303 received.ip.saddr = payload->ip.saddr;
303304 if (state->offload_csum)
@@ -368,7 +369,7 @@ void efx_loopback_rx_packet(struct efx_nic *efx, · 64 unmodified lines
368369 buf_ptr, pkt_len, 0);
369370 netif_err(efx, drv, efx->net_dev, "expected packet:\n");
370371 print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 0x10, 1,
371− &state->payload.header, EFX_LOOPBACK_PAYLOAD_LEN,
372+ &state->payload.packet, EFX_LOOPBACK_PAYLOAD_LEN,
372373 0);
373374 }
374375 #endif
@@ -438,6 +439,8 @@ static int efx_begin_loopback(struct efx_tx_queue *tx_queue) · 63 unmodified lines
438439 payload->ip.saddr = htonl(INADDR_LOOPBACK | (i << 2));
439440 /* Strip off the leading padding */
440441 skb_pull(skb, offsetof(struct efx_loopback_payload, header));
442+ /* Strip off the trailing padding */
443+ skb_trim(skb, EFX_LOOPBACK_PAYLOAD_LEN);
441444
442445 /* Ensure everything we've written is visible to the
443446 * interrupt handler. */
drivers/net/ethernet/sfc/siena/selftest.c+13−10
@@ -43,15 +43,16 @@ · 42 unmodified lines
4343 */
4444 struct efx_loopback_payload {
4545 char pad[2]; /* Ensures ip is 4-byte aligned */
46− struct ethhdr header;
47− struct iphdr ip;
48− struct udphdr udp;
49− __be16 iteration;
50− char msg[64];
46+ struct_group_attr(packet, __packed,
47+ struct ethhdr header;
48+ struct iphdr ip;
49+ struct udphdr udp;
50+ __be16 iteration;
51+ char msg[64];
52+ );
5153 } __packed __aligned(4);
52−#define EFX_LOOPBACK_PAYLOAD_LEN (sizeof(struct efx_loopback_payload) - \
53− offsetof(struct efx_loopback_payload, \
54− header))
54+#define EFX_LOOPBACK_PAYLOAD_LEN \
55+ sizeof_field(struct efx_loopback_payload, packet)
5556
5657 /* Loopback test source MAC address */
5758 static const u8 payload_source[ETH_ALEN] __aligned(2) = {
@@ -297,7 +298,7 @@ void efx_siena_loopback_rx_packet(struct efx_nic *efx, · 239 unmodified lines
297298
298299 payload = &state->payload;
299300
300− memcpy(&received.header, buf_ptr,
301+ memcpy(&received.packet, buf_ptr,
301302 min_t(int, pkt_len, EFX_LOOPBACK_PAYLOAD_LEN));
302303 received.ip.saddr = payload->ip.saddr;
303304 if (state->offload_csum)
@@ -368,7 +369,7 @@ void efx_siena_loopback_rx_packet(struct efx_nic *efx, · 64 unmodified lines
368369 buf_ptr, pkt_len, 0);
369370 netif_err(efx, drv, efx->net_dev, "expected packet:\n");
370371 print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 0x10, 1,
371− &state->payload.header, EFX_LOOPBACK_PAYLOAD_LEN,
372+ &state->payload.packet, EFX_LOOPBACK_PAYLOAD_LEN,
372373 0);
373374 }
374375 #endif
@@ -438,6 +439,8 @@ static int efx_begin_loopback(struct efx_tx_queue *tx_queue) · 63 unmodified lines
438439 payload->ip.saddr = htonl(INADDR_LOOPBACK | (i << 2));
439440 /* Strip off the leading padding */
440441 skb_pull(skb, offsetof(struct efx_loopback_payload, header));
442+ /* Strip off the trailing padding */
443+ skb_trim(skb, EFX_LOOPBACK_PAYLOAD_LEN);
441444
442445 /* Ensure everything we've written is visible to the
443446 * interrupt handler. */
drivers/net/ethernet/socionext/netsec.c+11−0
@@ -1851,6 +1851,17 @@ static int netsec_of_probe(struct platform_device *pdev, · 1850 unmodified lines
18511851 return err;
18521852 }
18531853
1854+ /*
1855+ * SynQuacer is physically configured with TX and RX delays
1856+ * but the standard firmware claimed otherwise for a long
1857+ * time, ignore it.
1858+ */
1859+ if (of_machine_is_compatible("socionext,developer-box") &&
1860+ priv->phy_interface != PHY_INTERFACE_MODE_RGMII_ID) {
1861+ dev_warn(&pdev->dev, "Outdated firmware reports incorrect PHY mode, overriding\n");
1862+ priv->phy_interface = PHY_INTERFACE_MODE_RGMII_ID;
1863+ }
1864+
18541865 priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
18551866 if (!priv->phy_np) {
18561867 dev_err(&pdev->dev, "missing required property 'phy-handle'\n");
drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c+2−1
@@ -234,7 +234,8 @@ static int tegra_mgbe_probe(struct platform_device *pdev) · 233 unmodified lines
234234 res.addr = mgbe->regs;
235235 res.irq = irq;
236236
237− mgbe->clks = devm_kzalloc(&pdev->dev, sizeof(*mgbe->clks), GFP_KERNEL);
237+ mgbe->clks = devm_kcalloc(&pdev->dev, ARRAY_SIZE(mgbe_clks),
238+ sizeof(*mgbe->clks), GFP_KERNEL);
238239 if (!mgbe->clks)
239240 return -ENOMEM;
240241
drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c+3−1
@@ -240,13 +240,15 @@ void stmmac_dwmac4_set_mac_addr(void __iomem *ioaddr, const u8 addr[6], · 239 unmodified lines
240240 void stmmac_dwmac4_set_mac(void __iomem *ioaddr, bool enable)
241241 {
242242 u32 value = readl(ioaddr + GMAC_CONFIG);
243+ u32 old_val = value;
243244
244245 if (enable)
245246 value |= GMAC_CONFIG_RE | GMAC_CONFIG_TE;
246247 else
247248 value &= ~(GMAC_CONFIG_TE | GMAC_CONFIG_RE);
248249
249− writel(value, ioaddr + GMAC_CONFIG);
250+ if (value != old_val)
251+ writel(value, ioaddr + GMAC_CONFIG);
250252 }
251253
252254 void stmmac_dwmac4_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,
drivers/net/ethernet/xilinx/ll_temac_main.c+8−4
@@ -1567,12 +1567,16 @@ static int temac_probe(struct platform_device *pdev) · 1566 unmodified lines
15671567 }
15681568
15691569 /* Error handle returned DMA RX and TX interrupts */
1570− if (lp->rx_irq < 0)
1571− return dev_err_probe(&pdev->dev, lp->rx_irq,
1570+ if (lp->rx_irq <= 0) {
1571+ rc = lp->rx_irq ?: -EINVAL;
1572+ return dev_err_probe(&pdev->dev, rc,
15721573 "could not get DMA RX irq\n");
1573− if (lp->tx_irq < 0)
1574− return dev_err_probe(&pdev->dev, lp->tx_irq,
1574+ }
1575+ if (lp->tx_irq <= 0) {
1576+ rc = lp->tx_irq ?: -EINVAL;
1577+ return dev_err_probe(&pdev->dev, rc,
15751578 "could not get DMA TX irq\n");
1579+ }
15761580
15771581 if (temac_np) {
15781582 /* Retrieve the MAC address */
drivers/net/ipa/ipa_table.c+11−9
@@ -273,16 +273,15 @@ static int ipa_filter_reset(struct ipa *ipa, bool modem) · 272 unmodified lines
273273 if (ret)
274274 return ret;
275275
276− ret = ipa_filter_reset_table(ipa, true, false, modem);
277− if (ret)
276+ ret = ipa_filter_reset_table(ipa, false, true, modem);
277+ if (ret || !ipa_table_hash_support(ipa))
278278 return ret;
279279
280− ret = ipa_filter_reset_table(ipa, false, true, modem);
280+ ret = ipa_filter_reset_table(ipa, true, false, modem);
281281 if (ret)
282282 return ret;
283− ret = ipa_filter_reset_table(ipa, true, true, modem);
284283
285− return ret;
284+ return ipa_filter_reset_table(ipa, true, true, modem);
286285 }
287286
288287 /* The AP routes and modem routes are each contiguous within the
@@ -291,12 +290,13 @@ static int ipa_filter_reset(struct ipa *ipa, bool modem) · 2 unmodified lines
291290 * */
292291 static int ipa_route_reset(struct ipa *ipa, bool modem)
293292 {
293+ bool hash_support = ipa_table_hash_support(ipa);
294294 u32 modem_route_count = ipa->modem_route_count;
295295 struct gsi_trans *trans;
296296 u16 first;
297297 u16 count;
298298
299− trans = ipa_cmd_trans_alloc(ipa, 4);
299+ trans = ipa_cmd_trans_alloc(ipa, hash_support ? 4 : 2);
300300 if (!trans) {
301301 dev_err(&ipa->pdev->dev,
302302 "no transaction for %s route reset\n",
@@ -313,10 +313,12 @@ static int ipa_route_reset(struct ipa *ipa, bool modem) · 10 unmodified lines
313313 }
314314
315315 ipa_table_reset_add(trans, false, false, false, first, count);
316− ipa_table_reset_add(trans, false, true, false, first, count);
317−
318316 ipa_table_reset_add(trans, false, false, true, first, count);
319− ipa_table_reset_add(trans, false, true, true, first, count);
317+
318+ if (hash_support) {
319+ ipa_table_reset_add(trans, false, true, false, first, count);
320+ ipa_table_reset_add(trans, false, true, true, first, count);
321+ }
320322
321323 gsi_trans_commit_wait(trans);
322324
drivers/net/macsec.c+14−14
@@ -743,7 +743,7 @@ static bool macsec_post_decrypt(struct sk_buff *skb, struct macsec_secy *secy, u · 742 unmodified lines
743743 u64_stats_update_begin(&rxsc_stats->syncp);
744744 rxsc_stats->stats.InPktsLate++;
745745 u64_stats_update_end(&rxsc_stats->syncp);
746− secy->netdev->stats.rx_dropped++;
746+ DEV_STATS_INC(secy->netdev, rx_dropped);
747747 return false;
748748 }
749749
@@ -767,7 +767,7 @@ static bool macsec_post_decrypt(struct sk_buff *skb, struct macsec_secy *secy, u · 17 unmodified lines
767767 rxsc_stats->stats.InPktsNotValid++;
768768 u64_stats_update_end(&rxsc_stats->syncp);
769769 this_cpu_inc(rx_sa->stats->InPktsNotValid);
770− secy->netdev->stats.rx_errors++;
770+ DEV_STATS_INC(secy->netdev, rx_errors);
771771 return false;
772772 }
773773
@@ -1069,7 +1069,7 @@ static enum rx_handler_result handle_not_macsec(struct sk_buff *skb) · 295 unmodified lines
10691069 u64_stats_update_begin(&secy_stats->syncp);
10701070 secy_stats->stats.InPktsNoTag++;
10711071 u64_stats_update_end(&secy_stats->syncp);
1072− macsec->secy.netdev->stats.rx_dropped++;
1072+ DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
10731073 continue;
10741074 }
10751075
@@ -1179,7 +1179,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb) · 103 unmodified lines
11791179 u64_stats_update_begin(&secy_stats->syncp);
11801180 secy_stats->stats.InPktsBadTag++;
11811181 u64_stats_update_end(&secy_stats->syncp);
1182− secy->netdev->stats.rx_errors++;
1182+ DEV_STATS_INC(secy->netdev, rx_errors);
11831183 goto drop_nosa;
11841184 }
11851185
@@ -1196,7 +1196,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb) · 10 unmodified lines
11961196 u64_stats_update_begin(&rxsc_stats->syncp);
11971197 rxsc_stats->stats.InPktsNotUsingSA++;
11981198 u64_stats_update_end(&rxsc_stats->syncp);
1199− secy->netdev->stats.rx_errors++;
1199+ DEV_STATS_INC(secy->netdev, rx_errors);
12001200 if (active_rx_sa)
12011201 this_cpu_inc(active_rx_sa->stats->InPktsNotUsingSA);
12021202 goto drop_nosa;
@@ -1230,7 +1230,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb) · 27 unmodified lines
12301230 u64_stats_update_begin(&rxsc_stats->syncp);
12311231 rxsc_stats->stats.InPktsLate++;
12321232 u64_stats_update_end(&rxsc_stats->syncp);
1233− macsec->secy.netdev->stats.rx_dropped++;
1233+ DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
12341234 goto drop;
12351235 }
12361236 }
@@ -1271,7 +1271,7 @@ deliver: · 34 unmodified lines
12711271 if (ret == NET_RX_SUCCESS)
12721272 count_rx(dev, len);
12731273 else
1274− macsec->secy.netdev->stats.rx_dropped++;
1274+ DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
12751275
12761276 rcu_read_unlock();
12771277
@@ -1308,7 +1308,7 @@ nosci: · 30 unmodified lines
13081308 u64_stats_update_begin(&secy_stats->syncp);
13091309 secy_stats->stats.InPktsNoSCI++;
13101310 u64_stats_update_end(&secy_stats->syncp);
1311− macsec->secy.netdev->stats.rx_errors++;
1311+ DEV_STATS_INC(macsec->secy.netdev, rx_errors);
13121312 continue;
13131313 }
13141314
@@ -1327,7 +1327,7 @@ nosci: · 12 unmodified lines
13271327 secy_stats->stats.InPktsUnknownSCI++;
13281328 u64_stats_update_end(&secy_stats->syncp);
13291329 } else {
1330− macsec->secy.netdev->stats.rx_dropped++;
1330+ DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
13311331 }
13321332 }
13331333
@@ -3422,7 +3422,7 @@ static netdev_tx_t macsec_start_xmit(struct sk_buff *skb, · 2088 unmodified lines
34223422
34233423 if (!secy->operational) {
34243424 kfree_skb(skb);
3425− dev->stats.tx_dropped++;
3425+ DEV_STATS_INC(dev, tx_dropped);
34263426 return NETDEV_TX_OK;
34273427 }
34283428
@@ -3430,7 +3430,7 @@ static netdev_tx_t macsec_start_xmit(struct sk_buff *skb, · 1 unmodified line
34303430 skb = macsec_encrypt(skb, dev);
34313431 if (IS_ERR(skb)) {
34323432 if (PTR_ERR(skb) != -EINPROGRESS)
3433− dev->stats.tx_dropped++;
3433+ DEV_STATS_INC(dev, tx_dropped);
34343434 return NETDEV_TX_OK;
34353435 }
34363436
@@ -3667,9 +3667,9 @@ static void macsec_get_stats64(struct net_device *dev, · 230 unmodified lines
36673667
36683668 dev_fetch_sw_netstats(s, dev->tstats);
36693669
3670− s->rx_dropped = dev->stats.rx_dropped;
3671− s->tx_dropped = dev->stats.tx_dropped;
3672− s->rx_errors = dev->stats.rx_errors;
3670+ s->rx_dropped = atomic_long_read(&dev->stats.__rx_dropped);
3671+ s->tx_dropped = atomic_long_read(&dev->stats.__tx_dropped);
3672+ s->rx_errors = atomic_long_read(&dev->stats.__rx_errors);
36733673 }
36743674
36753675 static int macsec_get_iflink(const struct net_device *dev)
drivers/net/macvlan.c+1−0
@@ -1746,6 +1746,7 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = { · 1745 unmodified lines
17461746 [IFLA_MACVLAN_MACADDR_COUNT] = { .type = NLA_U32 },
17471747 [IFLA_MACVLAN_BC_QUEUE_LEN] = { .type = NLA_U32 },
17481748 [IFLA_MACVLAN_BC_QUEUE_LEN_USED] = { .type = NLA_REJECT },
1749+ [IFLA_MACVLAN_BC_CUTOFF] = { .type = NLA_S32 },
17491750 };
17501751
17511752 int macvlan_link_register(struct rtnl_link_ops *ops)
drivers/net/phy/at803x.c+25−22
@@ -459,21 +459,27 @@ static int at803x_set_wol(struct phy_device *phydev, · 458 unmodified lines
459459 phy_write_mmd(phydev, MDIO_MMD_PCS, offsets[i],
460460 mac[(i * 2) + 1] | (mac[(i * 2)] << 8));
461461
462− /* Enable WOL function */
463− ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, AT803X_PHY_MMD3_WOL_CTRL,
464− 0, AT803X_WOL_EN);
465− if (ret)
466− return ret;
462+ /* Enable WOL function for 1588 */
463+ if (phydev->drv->phy_id == ATH8031_PHY_ID) {
464+ ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
465+ AT803X_PHY_MMD3_WOL_CTRL,
466+ 0, AT803X_WOL_EN);
467+ if (ret)
468+ return ret;
469+ }
467470 /* Enable WOL interrupt */
468471 ret = phy_modify(phydev, AT803X_INTR_ENABLE, 0, AT803X_INTR_ENABLE_WOL);
469472 if (ret)
470473 return ret;
471474 } else {
472− /* Disable WoL function */
473− ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, AT803X_PHY_MMD3_WOL_CTRL,
474− AT803X_WOL_EN, 0);
475− if (ret)
476− return ret;
475+ /* Disable WoL function for 1588 */
476+ if (phydev->drv->phy_id == ATH8031_PHY_ID) {
477+ ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
478+ AT803X_PHY_MMD3_WOL_CTRL,
479+ AT803X_WOL_EN, 0);
480+ if (ret)
481+ return ret;
482+ }
477483 /* Disable WOL interrupt */
478484 ret = phy_modify(phydev, AT803X_INTR_ENABLE, AT803X_INTR_ENABLE_WOL, 0);
479485 if (ret)
@@ -508,11 +514,11 @@ static void at803x_get_wol(struct phy_device *phydev, · 28 unmodified lines
508514 wol->supported = WAKE_MAGIC;
509515 wol->wolopts = 0;
510516
511− value = phy_read_mmd(phydev, MDIO_MMD_PCS, AT803X_PHY_MMD3_WOL_CTRL);
517+ value = phy_read(phydev, AT803X_INTR_ENABLE);
512518 if (value < 0)
513519 return;
514520
515− if (value & AT803X_WOL_EN)
521+ if (value & AT803X_INTR_ENABLE_WOL)
516522 wol->wolopts |= WAKE_MAGIC;
517523 }
518524
@@ -858,9 +864,6 @@ static int at803x_probe(struct phy_device *phydev) · 339 unmodified lines
858864 if (phydev->drv->phy_id == ATH8031_PHY_ID) {
859865 int ccr = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
860866 int mode_cfg;
861− struct ethtool_wolinfo wol = {
862− .wolopts = 0,
863− };
864867
865868 if (ccr < 0)
866869 return ccr;
@@ -877,12 +880,14 @@ static int at803x_probe(struct phy_device *phydev) · 10 unmodified lines
877880 break;
878881 }
879882
880− /* Disable WOL by default */
881− ret = at803x_set_wol(phydev, &wol);
882− if (ret < 0) {
883− phydev_err(phydev, "failed to disable WOL on probe: %d\n", ret);
883+ /* Disable WoL in 1588 register which is enabled
884+ * by default
885+ */
886+ ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
887+ AT803X_PHY_MMD3_WOL_CTRL,
888+ AT803X_WOL_EN, 0);
889+ if (ret)
884890 return ret;
885− }
886891 }
887892
888893 return 0;
@@ -2059,8 +2064,6 @@ static struct phy_driver at803x_driver[] = { · 1170 unmodified lines
20592064 .flags = PHY_POLL_CABLE_TEST,
20602065 .config_init = at803x_config_init,
20612066 .link_change_notify = at803x_link_change_notify,
2062− .set_wol = at803x_set_wol,
2063− .get_wol = at803x_get_wol,
20642067 .suspend = at803x_suspend,
20652068 .resume = at803x_resume,
20662069 /* PHY_BASIC_FEATURES */
drivers/net/phy/marvell10g.c+7−0
@@ -328,6 +328,13 @@ static int mv3310_power_up(struct phy_device *phydev) · 327 unmodified lines
328328 ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL,
329329 MV_V2_PORT_CTRL_PWRDOWN);
330330
331+ /* Sometimes, the power down bit doesn't clear immediately, and
332+ * a read of this register causes the bit not to clear. Delay
333+ * 100us to allow the PHY to come out of power down mode before
334+ * the next access.
335+ */
336+ udelay(100);
337+
331338 if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310 ||
332339 priv->firmware_ver < 0x00030000)
333340 return ret;
drivers/net/tap.c+1−1
@@ -534,7 +534,7 @@ static int tap_open(struct inode *inode, struct file *file) · 533 unmodified lines
534534 q->sock.state = SS_CONNECTED;
535535 q->sock.file = file;
536536 q->sock.ops = &tap_socket_ops;
537− sock_init_data_uid(&q->sock, &q->sk, inode->i_uid);
537+ sock_init_data_uid(&q->sock, &q->sk, current_fsuid());
538538 q->sk.sk_write_space = tap_sock_write_space;
539539 q->sk.sk_destruct = tap_sock_destruct;
540540 q->flags = IFF_VNET_HDR | IFF_NO_PI | IFF_TAP;
drivers/net/team/team.c+9−0
@@ -2135,6 +2135,15 @@ static void team_setup_by_port(struct net_device *dev, · 2134 unmodified lines
21352135 dev->mtu = port_dev->mtu;
21362136 memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len);
21372137 eth_hw_addr_inherit(dev, port_dev);
2138+
2139+ if (port_dev->flags & IFF_POINTOPOINT) {
2140+ dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
2141+ dev->flags |= (IFF_POINTOPOINT | IFF_NOARP);
2142+ } else if ((port_dev->flags & (IFF_BROADCAST | IFF_MULTICAST)) ==
2143+ (IFF_BROADCAST | IFF_MULTICAST)) {
2144+ dev->flags |= (IFF_BROADCAST | IFF_MULTICAST);
2145+ dev->flags &= ~(IFF_POINTOPOINT | IFF_NOARP);
2146+ }
21382147 }
21392148
21402149 static int team_dev_type_check_change(struct net_device *dev,
drivers/net/tun.c+2−2
@@ -1594,7 +1594,7 @@ static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile, · 1593 unmodified lines
15941594 if (zerocopy)
15951595 return false;
15961596
1597− if (SKB_DATA_ALIGN(len + TUN_RX_PAD) +
1597+ if (SKB_DATA_ALIGN(len + TUN_RX_PAD + XDP_PACKET_HEADROOM) +
15981598 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) > PAGE_SIZE)
15991599 return false;
16001600
@@ -3469,7 +3469,7 @@ static int tun_chr_open(struct inode *inode, struct file * file) · 1868 unmodified lines
34693469 tfile->socket.file = file;
34703470 tfile->socket.ops = &tun_socket_ops;
34713471
3472− sock_init_data_uid(&tfile->socket, &tfile->sk, inode->i_uid);
3472+ sock_init_data_uid(&tfile->socket, &tfile->sk, current_fsuid());
34733473
34743474 tfile->sk.sk_write_space = tun_sock_write_space;
34753475 tfile->sk.sk_sndbuf = INT_MAX;
drivers/net/usb/cdc_ether.c+21−0
@@ -618,9 +618,23 @@ static const struct usb_device_id products[] = { · 617 unmodified lines
618618 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
619619 | USB_DEVICE_ID_MATCH_DEVICE,
620620 .idVendor = 0x04DD,
621+ .idProduct = 0x8005, /* A-300 */
622+ ZAURUS_FAKE_INTERFACE,
623+ .driver_info = 0,
624+}, {
625+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
626+ | USB_DEVICE_ID_MATCH_DEVICE,
627+ .idVendor = 0x04DD,
621628 .idProduct = 0x8006, /* B-500/SL-5600 */
622629 ZAURUS_MASTER_INTERFACE,
623630 .driver_info = 0,
631+}, {
632+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
633+ | USB_DEVICE_ID_MATCH_DEVICE,
634+ .idVendor = 0x04DD,
635+ .idProduct = 0x8006, /* B-500/SL-5600 */
636+ ZAURUS_FAKE_INTERFACE,
637+ .driver_info = 0,
624638 }, {
625639 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
626640 | USB_DEVICE_ID_MATCH_DEVICE,
@@ -628,6 +642,13 @@ static const struct usb_device_id products[] = { · 1 unmodified line
628642 .idProduct = 0x8007, /* C-700 */
629643 ZAURUS_MASTER_INTERFACE,
630644 .driver_info = 0,
645+}, {
646+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
647+ | USB_DEVICE_ID_MATCH_DEVICE,
648+ .idVendor = 0x04DD,
649+ .idProduct = 0x8007, /* C-700 */
650+ ZAURUS_FAKE_INTERFACE,
651+ .driver_info = 0,
631652 }, {
632653 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
633654 | USB_DEVICE_ID_MATCH_DEVICE,
drivers/net/usb/lan78xx.c+2−5
@@ -4224,8 +4224,6 @@ static void lan78xx_disconnect(struct usb_interface *intf) · 4223 unmodified lines
42244224 if (!dev)
42254225 return;
42264226
4227− set_bit(EVENT_DEV_DISCONNECT, &dev->flags);
4228−
42294227 netif_napi_del(&dev->napi);
42304228
42314229 udev = interface_to_usbdev(intf);
@@ -4233,6 +4231,8 @@ static void lan78xx_disconnect(struct usb_interface *intf) · 1 unmodified line
42334231
42344232 unregister_netdev(net);
42354233
4234+ timer_shutdown_sync(&dev->stat_monitor);
4235+ set_bit(EVENT_DEV_DISCONNECT, &dev->flags);
42364236 cancel_delayed_work_sync(&dev->wq);
42374237
42384238 phydev = net->phydev;
@@ -4247,9 +4247,6 @@ static void lan78xx_disconnect(struct usb_interface *intf) · 8 unmodified lines
42474247
42484248 usb_scuttle_anchored_urbs(&dev->deferred);
42494249
4250− if (timer_pending(&dev->stat_monitor))
4251− del_timer_sync(&dev->stat_monitor);
4252−
42534250 lan78xx_unbind(dev, intf);
42544251
42554252 lan78xx_free_tx_resources(dev);
drivers/net/usb/qmi_wwan.c+1−0
@@ -1423,6 +1423,7 @@ static const struct usb_device_id products[] = { · 1422 unmodified lines
14231423 {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */
14241424 {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
14251425 {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */
1426+ {QMI_QUIRK_SET_DTR(0x2c7c, 0x030e, 4)}, /* Quectel EM05GV2 */
14261427 {QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)}, /* Fibocom NL678 series */
14271428 {QMI_FIXED_INTF(0x0489, 0xe0b4, 0)}, /* Foxconn T77W968 LTE */
14281429 {QMI_FIXED_INTF(0x0489, 0xe0b5, 0)}, /* Foxconn T77W968 LTE with eSIM support*/
drivers/net/usb/zaurus.c+21−0
@@ -289,9 +289,23 @@ static const struct usb_device_id products [] = { · 288 unmodified lines
289289 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
290290 | USB_DEVICE_ID_MATCH_DEVICE,
291291 .idVendor = 0x04DD,
292+ .idProduct = 0x8005, /* A-300 */
293+ ZAURUS_FAKE_INTERFACE,
294+ .driver_info = (unsigned long)&bogus_mdlm_info,
295+}, {
296+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
297+ | USB_DEVICE_ID_MATCH_DEVICE,
298+ .idVendor = 0x04DD,
292299 .idProduct = 0x8006, /* B-500/SL-5600 */
293300 ZAURUS_MASTER_INTERFACE,
294301 .driver_info = ZAURUS_PXA_INFO,
302+}, {
303+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
304+ | USB_DEVICE_ID_MATCH_DEVICE,
305+ .idVendor = 0x04DD,
306+ .idProduct = 0x8006, /* B-500/SL-5600 */
307+ ZAURUS_FAKE_INTERFACE,
308+ .driver_info = (unsigned long)&bogus_mdlm_info,
295309 }, {
296310 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
297311 | USB_DEVICE_ID_MATCH_DEVICE,
@@ -299,6 +313,13 @@ static const struct usb_device_id products [] = { · 1 unmodified line
299313 .idProduct = 0x8007, /* C-700 */
300314 ZAURUS_MASTER_INTERFACE,
301315 .driver_info = ZAURUS_PXA_INFO,
316+}, {
317+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
318+ | USB_DEVICE_ID_MATCH_DEVICE,
319+ .idVendor = 0x04DD,
320+ .idProduct = 0x8007, /* C-700 */
321+ ZAURUS_FAKE_INTERFACE,
322+ .driver_info = (unsigned long)&bogus_mdlm_info,
302323 }, {
303324 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
304325 | USB_DEVICE_ID_MATCH_DEVICE,
drivers/net/virtio_net.c+2−2
@@ -4219,6 +4219,8 @@ static int virtnet_probe(struct virtio_device *vdev) · 4218 unmodified lines
42194219 if (vi->has_rss || vi->has_rss_hash_report)
42204220 virtnet_init_default_rss(vi);
42214221
4222+ _virtnet_set_queues(vi, vi->curr_queue_pairs);
4223+
42224224 /* serialize netdev register + virtio_device_ready() with ndo_open() */
42234225 rtnl_lock();
42244226
@@ -4257,8 +4259,6 @@ static int virtnet_probe(struct virtio_device *vdev) · 32 unmodified lines
42574259 goto free_unregister_netdev;
42584260 }
42594261
4260− virtnet_set_queues(vi, vi->curr_queue_pairs);
4261−
42624262 /* Assume link up if device can't report link status,
42634263 otherwise get link status from config. */
42644264 netif_carrier_off(dev);
drivers/net/vxlan/vxlan_core.c+107−58
@@ -623,6 +623,32 @@ static int vxlan_fdb_append(struct vxlan_fdb *f, · 622 unmodified lines
623623 return 1;
624624 }
625625
626+static bool vxlan_parse_gpe_proto(struct vxlanhdr *hdr, __be16 *protocol)
627+{
628+ struct vxlanhdr_gpe *gpe = (struct vxlanhdr_gpe *)hdr;
629+
630+ /* Need to have Next Protocol set for interfaces in GPE mode. */
631+ if (!gpe->np_applied)
632+ return false;
633+ /* "The initial version is 0. If a receiver does not support the
634+ * version indicated it MUST drop the packet.
635+ */
636+ if (gpe->version != 0)
637+ return false;
638+ /* "When the O bit is set to 1, the packet is an OAM packet and OAM
639+ * processing MUST occur." However, we don't implement OAM
640+ * processing, thus drop the packet.
641+ */
642+ if (gpe->oam_flag)
643+ return false;
644+
645+ *protocol = tun_p_to_eth_p(gpe->next_protocol);
646+ if (!*protocol)
647+ return false;
648+
649+ return true;
650+}
651+
626652 static struct vxlanhdr *vxlan_gro_remcsum(struct sk_buff *skb,
627653 unsigned int off,
628654 struct vxlanhdr *vh, size_t hdrlen,
@@ -649,26 +675,24 @@ static struct vxlanhdr *vxlan_gro_remcsum(struct sk_buff *skb, · 20 unmodified lines
649675 return vh;
650676 }
651677
652−static struct sk_buff *vxlan_gro_receive(struct sock *sk,
653− struct list_head *head,
654− struct sk_buff *skb)
678+static struct vxlanhdr *vxlan_gro_prepare_receive(struct sock *sk,
679+ struct list_head *head,
680+ struct sk_buff *skb,
681+ struct gro_remcsum *grc)
655682 {
656− struct sk_buff *pp = NULL;
657683 struct sk_buff *p;
658684 struct vxlanhdr *vh, *vh2;
659685 unsigned int hlen, off_vx;
660− int flush = 1;
661686 struct vxlan_sock *vs = rcu_dereference_sk_user_data(sk);
662687 __be32 flags;
663− struct gro_remcsum grc;
664688
665− skb_gro_remcsum_init(&grc);
689+ skb_gro_remcsum_init(grc);
666690
667691 off_vx = skb_gro_offset(skb);
668692 hlen = off_vx + sizeof(*vh);
669693 vh = skb_gro_header(skb, hlen, off_vx);
670694 if (unlikely(!vh))
671− goto out;
695+ return NULL;
672696
673697 skb_gro_postpull_rcsum(skb, vh, sizeof(struct vxlanhdr));
674698
@@ -676,12 +700,12 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk, · 1 unmodified line
676700
677701 if ((flags & VXLAN_HF_RCO) && (vs->flags & VXLAN_F_REMCSUM_RX)) {
678702 vh = vxlan_gro_remcsum(skb, off_vx, vh, sizeof(struct vxlanhdr),
679− vh->vx_vni, &grc,
703+ vh->vx_vni, grc,
680704 !!(vs->flags &
681705 VXLAN_F_REMCSUM_NOPARTIAL));
682706
683707 if (!vh)
684− goto out;
708+ return NULL;
685709 }
686710
687711 skb_gro_pull(skb, sizeof(struct vxlanhdr)); /* pull vxlan header */
@@ -698,12 +722,48 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk, · 10 unmodified lines
698722 }
699723 }
700724
701− pp = call_gro_receive(eth_gro_receive, head, skb);
702− flush = 0;
725+ return vh;
726+}
703727
704−out:
728+static struct sk_buff *vxlan_gro_receive(struct sock *sk,
729+ struct list_head *head,
730+ struct sk_buff *skb)
731+{
732+ struct sk_buff *pp = NULL;
733+ struct gro_remcsum grc;
734+ int flush = 1;
735+
736+ if (vxlan_gro_prepare_receive(sk, head, skb, &grc)) {
737+ pp = call_gro_receive(eth_gro_receive, head, skb);
738+ flush = 0;
739+ }
705740 skb_gro_flush_final_remcsum(skb, pp, flush, &grc);
741+ return pp;
742+}
743+
744+static struct sk_buff *vxlan_gpe_gro_receive(struct sock *sk,
745+ struct list_head *head,
746+ struct sk_buff *skb)
747+{
748+ const struct packet_offload *ptype;
749+ struct sk_buff *pp = NULL;
750+ struct gro_remcsum grc;
751+ struct vxlanhdr *vh;
752+ __be16 protocol;
753+ int flush = 1;
706754
755+ vh = vxlan_gro_prepare_receive(sk, head, skb, &grc);
756+ if (vh) {
757+ if (!vxlan_parse_gpe_proto(vh, &protocol))
758+ goto out;
759+ ptype = gro_find_receive_by_type(protocol);
760+ if (!ptype)
761+ goto out;
762+ pp = call_gro_receive(ptype->callbacks.gro_receive, head, skb);
763+ flush = 0;
764+ }
765+out:
766+ skb_gro_flush_final_remcsum(skb, pp, flush, &grc);
707767 return pp;
708768 }
709769
@@ -715,6 +775,21 @@ static int vxlan_gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff) · 5 unmodified lines
715775 return eth_gro_complete(skb, nhoff + sizeof(struct vxlanhdr));
716776 }
717777
778+static int vxlan_gpe_gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff)
779+{
780+ struct vxlanhdr *vh = (struct vxlanhdr *)(skb->data + nhoff);
781+ const struct packet_offload *ptype;
782+ int err = -ENOSYS;
783+ __be16 protocol;
784+
785+ if (!vxlan_parse_gpe_proto(vh, &protocol))
786+ return err;
787+ ptype = gro_find_complete_by_type(protocol);
788+ if (ptype)
789+ err = ptype->callbacks.gro_complete(skb, nhoff + sizeof(struct vxlanhdr));
790+ return err;
791+}
792+
718793 static struct vxlan_fdb *vxlan_fdb_alloc(struct vxlan_dev *vxlan, const u8 *mac,
719794 __u16 state, __be32 src_vni,
720795 __u16 ndm_flags)
@@ -1525,35 +1600,6 @@ out: · 804 unmodified lines
15251600 unparsed->vx_flags &= ~VXLAN_GBP_USED_BITS;
15261601 }
15271602
1528−static bool vxlan_parse_gpe_hdr(struct vxlanhdr *unparsed,
1529− __be16 *protocol,
1530− struct sk_buff *skb, u32 vxflags)
1531−{
1532− struct vxlanhdr_gpe *gpe = (struct vxlanhdr_gpe *)unparsed;
1533−
1534− /* Need to have Next Protocol set for interfaces in GPE mode. */
1535− if (!gpe->np_applied)
1536− return false;
1537− /* "The initial version is 0. If a receiver does not support the
1538− * version indicated it MUST drop the packet.
1539− */
1540− if (gpe->version != 0)
1541− return false;
1542− /* "When the O bit is set to 1, the packet is an OAM packet and OAM
1543− * processing MUST occur." However, we don't implement OAM
1544− * processing, thus drop the packet.
1545− */
1546− if (gpe->oam_flag)
1547− return false;
1548−
1549− *protocol = tun_p_to_eth_p(gpe->next_protocol);
1550− if (!*protocol)
1551− return false;
1552−
1553− unparsed->vx_flags &= ~VXLAN_GPE_USED_BITS;
1554− return true;
1555−}
1556−
15571603 static bool vxlan_set_mac(struct vxlan_dev *vxlan,
15581604 struct vxlan_sock *vs,
15591605 struct sk_buff *skb, __be32 vni)
@@ -1655,8 +1701,9 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) · 95 unmodified lines
16551701 * used by VXLAN extensions if explicitly requested.
16561702 */
16571703 if (vs->flags & VXLAN_F_GPE) {
1658− if (!vxlan_parse_gpe_hdr(&unparsed, &protocol, skb, vs->flags))
1704+ if (!vxlan_parse_gpe_proto(&unparsed, &protocol))
16591705 goto drop;
1706+ unparsed.vx_flags &= ~VXLAN_GPE_USED_BITS;
16601707 raw_proto = true;
16611708 }
16621709
@@ -2516,7 +2563,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, · 853 unmodified lines
25162563 }
25172564
25182565 ndst = &rt->dst;
2519− err = skb_tunnel_check_pmtu(skb, ndst, VXLAN_HEADROOM,
2566+ err = skb_tunnel_check_pmtu(skb, ndst, vxlan_headroom(flags & VXLAN_F_GPE),
25202567 netif_is_any_bridge_port(dev));
25212568 if (err < 0) {
25222569 goto tx_error;
@@ -2577,7 +2624,8 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, · 54 unmodified lines
25772624 goto out_unlock;
25782625 }
25792626
2580− err = skb_tunnel_check_pmtu(skb, ndst, VXLAN6_HEADROOM,
2627+ err = skb_tunnel_check_pmtu(skb, ndst,
2628+ vxlan_headroom((flags & VXLAN_F_GPE) | VXLAN_F_IPV6),
25812629 netif_is_any_bridge_port(dev));
25822630 if (err < 0) {
25832631 goto tx_error;
@@ -2989,14 +3037,12 @@ static int vxlan_change_mtu(struct net_device *dev, int new_mtu) · 405 unmodified lines
29893037 struct vxlan_rdst *dst = &vxlan->default_dst;
29903038 struct net_device *lowerdev = __dev_get_by_index(vxlan->net,
29913039 dst->remote_ifindex);
2992− bool use_ipv6 = !!(vxlan->cfg.flags & VXLAN_F_IPV6);
29933040
29943041 /* This check is different than dev->max_mtu, because it looks at
29953042 * the lowerdev->mtu, rather than the static dev->max_mtu
29963043 */
29973044 if (lowerdev) {
2998− int max_mtu = lowerdev->mtu -
2999− (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM);
3045+ int max_mtu = lowerdev->mtu - vxlan_headroom(vxlan->cfg.flags);
30003046 if (new_mtu > max_mtu)
30013047 return -EINVAL;
30023048 }
@@ -3379,8 +3425,13 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, bool ipv6, · 376 unmodified lines
33793425 tunnel_cfg.encap_rcv = vxlan_rcv;
33803426 tunnel_cfg.encap_err_lookup = vxlan_err_lookup;
33813427 tunnel_cfg.encap_destroy = NULL;
3382− tunnel_cfg.gro_receive = vxlan_gro_receive;
3383− tunnel_cfg.gro_complete = vxlan_gro_complete;
3428+ if (vs->flags & VXLAN_F_GPE) {
3429+ tunnel_cfg.gro_receive = vxlan_gpe_gro_receive;
3430+ tunnel_cfg.gro_complete = vxlan_gpe_gro_complete;
3431+ } else {
3432+ tunnel_cfg.gro_receive = vxlan_gro_receive;
3433+ tunnel_cfg.gro_complete = vxlan_gro_complete;
3434+ }
33843435
33853436 setup_udp_tunnel_sock(net, sock, &tunnel_cfg);
33863437
@@ -3644,11 +3695,11 @@ static void vxlan_config_apply(struct net_device *dev, · 257 unmodified lines
36443695 struct vxlan_dev *vxlan = netdev_priv(dev);
36453696 struct vxlan_rdst *dst = &vxlan->default_dst;
36463697 unsigned short needed_headroom = ETH_HLEN;
3647− bool use_ipv6 = !!(conf->flags & VXLAN_F_IPV6);
36483698 int max_mtu = ETH_MAX_MTU;
3699+ u32 flags = conf->flags;
36493700
36503701 if (!changelink) {
3651− if (conf->flags & VXLAN_F_GPE)
3702+ if (flags & VXLAN_F_GPE)
36523703 vxlan_raw_setup(dev);
36533704 else
36543705 vxlan_ether_setup(dev);
@@ -3673,8 +3724,7 @@ static void vxlan_config_apply(struct net_device *dev, · 18 unmodified lines
36733724
36743725 dev->needed_tailroom = lowerdev->needed_tailroom;
36753726
3676− max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM :
3677− VXLAN_HEADROOM);
3727+ max_mtu = lowerdev->mtu - vxlan_headroom(flags);
36783728 if (max_mtu < ETH_MIN_MTU)
36793729 max_mtu = ETH_MIN_MTU;
36803730
@@ -3685,10 +3735,9 @@ static void vxlan_config_apply(struct net_device *dev, · 4 unmodified lines
36853735 if (dev->mtu > max_mtu)
36863736 dev->mtu = max_mtu;
36873737
3688− if (use_ipv6 || conf->flags & VXLAN_F_COLLECT_METADATA)
3689− needed_headroom += VXLAN6_HEADROOM;
3690− else
3691− needed_headroom += VXLAN_HEADROOM;
3738+ if (flags & VXLAN_F_COLLECT_METADATA)
3739+ flags |= VXLAN_F_IPV6;
3740+ needed_headroom += vxlan_headroom(flags);
36923741 dev->needed_headroom = needed_headroom;
36933742
36943743 memcpy(&vxlan->cfg, conf, sizeof(*conf));
drivers/net/vxlan/vxlan_vnifilter.c+8−3
@@ -713,6 +713,12 @@ static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan, · 712 unmodified lines
713713 return vninode;
714714 }
715715
716+static void vxlan_vni_free(struct vxlan_vni_node *vninode)
717+{
718+ free_percpu(vninode->stats);
719+ kfree(vninode);
720+}
721+
716722 static int vxlan_vni_add(struct vxlan_dev *vxlan,
717723 struct vxlan_vni_group *vg,
718724 u32 vni, union vxlan_addr *group,
@@ -740,7 +746,7 @@ static int vxlan_vni_add(struct vxlan_dev *vxlan, · 21 unmodified lines
740746 &vninode->vnode,
741747 vxlan_vni_rht_params);
742748 if (err) {
743− kfree(vninode);
749+ vxlan_vni_free(vninode);
744750 return err;
745751 }
746752
@@ -763,8 +769,7 @@ static void vxlan_vni_node_rcu_free(struct rcu_head *rcu) · 16 unmodified lines
763769 struct vxlan_vni_node *v;
764770
765771 v = container_of(rcu, struct vxlan_vni_node, rcu);
766− free_percpu(v->stats);
767− kfree(v);
772+ vxlan_vni_free(v);
768773 }
769774
770775 static int vxlan_vni_del(struct vxlan_dev *vxlan,
drivers/net/wireguard/allowedips.c+4−4
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 #include "allowedips.h"
77 #include "peer.h"
88
9−enum { MAX_ALLOWEDIPS_BITS = 128 };
9+enum { MAX_ALLOWEDIPS_DEPTH = 129 };
1010
1111 static struct kmem_cache *node_cache;
1212
@@ -42,7 +42,7 @@ static void push_rcu(struct allowedips_node **stack, · 29 unmodified lines
4242 struct allowedips_node __rcu *p, unsigned int *len)
4343 {
4444 if (rcu_access_pointer(p)) {
45− if (WARN_ON(IS_ENABLED(DEBUG) && *len >= MAX_ALLOWEDIPS_BITS))
45+ if (WARN_ON(IS_ENABLED(DEBUG) && *len >= MAX_ALLOWEDIPS_DEPTH))
4646 return;
4747 stack[(*len)++] = rcu_dereference_raw(p);
4848 }
@@ -55,7 +55,7 @@ static void node_free_rcu(struct rcu_head *rcu) · 6 unmodified lines
5555
5656 static void root_free_rcu(struct rcu_head *rcu)
5757 {
58− struct allowedips_node *node, *stack[MAX_ALLOWEDIPS_BITS] = {
58+ struct allowedips_node *node, *stack[MAX_ALLOWEDIPS_DEPTH] = {
5959 container_of(rcu, struct allowedips_node, rcu) };
6060 unsigned int len = 1;
6161
@@ -68,7 +68,7 @@ static void root_free_rcu(struct rcu_head *rcu) · 6 unmodified lines
6868
6969 static void root_remove_peer_lists(struct allowedips_node *root)
7070 {
71− struct allowedips_node *node, *stack[MAX_ALLOWEDIPS_BITS] = { root };
71+ struct allowedips_node *node, *stack[MAX_ALLOWEDIPS_DEPTH] = { root };
7272 unsigned int len = 1;
7373
7474 while (len > 0 && (node = stack[--len])) {
drivers/net/wireguard/selftest/allowedips.c+10−6
@@ -593,16 +593,20 @@ bool __init wg_allowedips_selftest(void) · 592 unmodified lines
593593 wg_allowedips_remove_by_peer(&t, a, &mutex);
594594 test_negative(4, a, 192, 168, 0, 1);
595595
596− /* These will hit the WARN_ON(len >= MAX_ALLOWEDIPS_BITS) in free_node
596+ /* These will hit the WARN_ON(len >= MAX_ALLOWEDIPS_DEPTH) in free_node
597597 * if something goes wrong.
598598 */
599− for (i = 0; i < MAX_ALLOWEDIPS_BITS; ++i) {
600− part = cpu_to_be64(~(1LLU << (i % 64)));
601− memset(&ip, 0xff, 16);
602− memcpy((u8 *)&ip + (i < 64) * 8, &part, 8);
599+ for (i = 0; i < 64; ++i) {
600+ part = cpu_to_be64(~0LLU << i);
601+ memset(&ip, 0xff, 8);
602+ memcpy((u8 *)&ip + 8, &part, 8);
603+ wg_allowedips_insert_v6(&t, &ip, 128, a, &mutex);
604+ memcpy(&ip, &part, 8);
605+ memset((u8 *)&ip + 8, 0, 8);
603606 wg_allowedips_insert_v6(&t, &ip, 128, a, &mutex);
604607 }
605−
608+ memset(&ip, 0, 16);
609+ wg_allowedips_insert_v6(&t, &ip, 128, a, &mutex);
606610 wg_allowedips_free(&t, &mutex);
607611
608612 wg_allowedips_init(&t);
drivers/net/wireless/ath/ath11k/ahb.c+0−1
@@ -376,7 +376,6 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab) · 375 unmodified lines
376376 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
377377
378378 if (!irq_grp->napi_enabled) {
379− dev_set_threaded(&irq_grp->napi_ndev, true);
380379 napi_enable(&irq_grp->napi);
381380 irq_grp->napi_enabled = true;
382381 }
drivers/net/wireless/ath/ath11k/pcic.c+0−1
@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab) · 465 unmodified lines
466466 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
467467
468468 if (!irq_grp->napi_enabled) {
469− dev_set_threaded(&irq_grp->napi_ndev, true);
470469 napi_enable(&irq_grp->napi);
471470 irq_grp->napi_enabled = true;
472471 }
drivers/net/wireless/ath/ath12k/wmi.c+1−2
@@ -2144,8 +2144,7 @@ int ath12k_wmi_send_scan_start_cmd(struct ath12k *ar, · 2143 unmodified lines
21442144 struct wmi_tlv *tlv;
21452145 void *ptr;
21462146 int i, ret, len;
2147− u32 *tmp_ptr;
2148− u8 extraie_len_with_pad = 0;
2147+ u32 *tmp_ptr, extraie_len_with_pad = 0;
21492148 struct ath12k_wmi_hint_short_ssid_arg *s_ssid = NULL;
21502149 struct ath12k_wmi_hint_bssid_arg *hint_bssid = NULL;
21512150
drivers/net/wireless/ath/ath6kl/Makefile+0−5
@@ -36,11 +36,6 @@ ath6kl_core-y += wmi.o · 35 unmodified lines
3636 ath6kl_core-y += core.o
3737 ath6kl_core-y += recovery.o
3838
39−# FIXME: temporarily silence -Wdangling-pointer on non W=1+ builds
40−ifndef KBUILD_EXTRA_WARN
41−CFLAGS_htc_mbox.o += $(call cc-disable-warning, dangling-pointer)
42−endif
43−
4439 ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
4540 ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o
4641
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c+5−0
@@ -1456,6 +1456,10 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, · 1455 unmodified lines
14561456 params_size -= BRCMF_SCAN_PARAMS_V2_FIXED_SIZE;
14571457 params_size += BRCMF_SCAN_PARAMS_FIXED_SIZE;
14581458 params_v1 = kzalloc(params_size, GFP_KERNEL);
1459+ if (!params_v1) {
1460+ err = -ENOMEM;
1461+ goto exit_params;
1462+ }
14591463 params_v1->version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION);
14601464 brcmf_scan_params_v2_to_v1(&params->params_v2_le, &params_v1->params_le);
14611465 kfree(params);
@@ -1473,6 +1477,7 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, · 11 unmodified lines
14731477 bphy_err(drvr, "error (%d)\n", err);
14741478 }
14751479
1480+exit_params:
14761481 kfree(params);
14771482 exit:
14781483 return err;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h+6−1
@@ -398,7 +398,12 @@ struct brcmf_scan_params_le { · 397 unmodified lines
398398 * fixed parameter portion is assumed, otherwise
399399 * ssid in the fixed portion is ignored
400400 */
401− __le16 channel_list[1]; /* list of chanspecs */
401+ union {
402+ __le16 padding; /* Reserve space for at least 1 entry for abort
403+ * which uses an on stack brcmf_scan_params_le
404+ */
405+ DECLARE_FLEX_ARRAY(__le16, channel_list); /* chanspecs */
406+ };
402407 };
403408
404409 struct brcmf_scan_params_v2_le {
drivers/net/wireless/legacy/rayctl.h+1−1
@@ -577,7 +577,7 @@ struct tx_msg { · 576 unmodified lines
577577 struct tib_structure tib;
578578 struct phy_header phy;
579579 struct mac_header mac;
580− UCHAR var[1];
580+ UCHAR var[];
581581 };
582582
583583 /****** ECF Receive Control Structure (RCS) Area at Shared RAM offset 0x0800 */
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c+3−3
@@ -128,12 +128,12 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev) · 127 unmodified lines
128128 case MT_EE_5GHZ:
129129 dev->mphy.cap.has_5ghz = true;
130130 break;
131− case MT_EE_2GHZ:
132− dev->mphy.cap.has_2ghz = true;
133− break;
134131 case MT_EE_DBDC:
135132 dev->dbdc_support = true;
136133 fallthrough;
134+ case MT_EE_2GHZ:
135+ dev->mphy.cap.has_2ghz = true;
136+ break;
137137 default:
138138 dev->mphy.cap.has_2ghz = true;
139139 dev->mphy.cap.has_5ghz = true;
drivers/net/wireless/realtek/rtw89/mac.c+1−1
@@ -2524,7 +2524,7 @@ static int cmac_dma_init(struct rtw89_dev *rtwdev, u8 mac_idx) · 2523 unmodified lines
25242524 u32 reg;
25252525 int ret;
25262526
2527− if (chip_id != RTL8852A && chip_id != RTL8852B)
2527+ if (chip_id != RTL8852B)
25282528 return 0;
25292529
25302530 ret = rtw89_mac_check_mac_en(rtwdev, mac_idx, RTW89_CMAC_SEL);
drivers/net/xen-netback/netback.c+10−5
@@ -396,7 +396,7 @@ static void xenvif_get_requests(struct xenvif_queue *queue, · 395 unmodified lines
396396 struct gnttab_map_grant_ref *gop = queue->tx_map_ops + *map_ops;
397397 struct xen_netif_tx_request *txp = first;
398398
399− nr_slots = shinfo->nr_frags + 1;
399+ nr_slots = shinfo->nr_frags + frag_overflow + 1;
400400
401401 copy_count(skb) = 0;
402402 XENVIF_TX_CB(skb)->split_mask = 0;
@@ -462,8 +462,8 @@ static void xenvif_get_requests(struct xenvif_queue *queue, · 59 unmodified lines
462462 }
463463 }
464464
465− for (shinfo->nr_frags = 0; shinfo->nr_frags < nr_slots;
466− shinfo->nr_frags++, gop++) {
465+ for (shinfo->nr_frags = 0; nr_slots > 0 && shinfo->nr_frags < MAX_SKB_FRAGS;
466+ shinfo->nr_frags++, gop++, nr_slots--) {
467467 index = pending_index(queue->pending_cons++);
468468 pending_idx = queue->pending_ring[index];
469469 xenvif_tx_create_map_op(queue, pending_idx, txp,
@@ -476,12 +476,12 @@ static void xenvif_get_requests(struct xenvif_queue *queue, · 6 unmodified lines
476476 txp++;
477477 }
478478
479− if (frag_overflow) {
479+ if (nr_slots > 0) {
480480
481481 shinfo = skb_shinfo(nskb);
482482 frags = shinfo->frags;
483483
484− for (shinfo->nr_frags = 0; shinfo->nr_frags < frag_overflow;
484+ for (shinfo->nr_frags = 0; shinfo->nr_frags < nr_slots;
485485 shinfo->nr_frags++, txp++, gop++) {
486486 index = pending_index(queue->pending_cons++);
487487 pending_idx = queue->pending_ring[index];
@@ -492,6 +492,11 @@ static void xenvif_get_requests(struct xenvif_queue *queue, · 4 unmodified lines
492492 }
493493
494494 skb_shinfo(skb)->frag_list = nskb;
495+ } else if (nskb) {
496+ /* A frag_list skb was allocated but it is no longer needed
497+ * because enough slots were converted to copy ops above.
498+ */
499+ kfree_skb(nskb);
495500 }
496501
497502 (*copy_ops) = cop - queue->tx_copy_ops;
drivers/nvme/host/core.c+7−3
@@ -3933,6 +3933,12 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl) · 3932 unmodified lines
39333933 */
39343934 nvme_mpath_clear_ctrl_paths(ctrl);
39353935
3936+ /*
3937+ * Unquiesce io queues so any pending IO won't hang, especially
3938+ * those submitted from scan work
3939+ */
3940+ nvme_unquiesce_io_queues(ctrl);
3941+
39363942 /* prevent racing with ns scanning */
39373943 flush_work(&ctrl->scan_work);
39383944
@@ -3942,10 +3948,8 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl) · 3 unmodified lines
39423948 * removing the namespaces' disks; fail all the queues now to avoid
39433949 * potentially having to clean up the failed sync later.
39443950 */
3945− if (ctrl->state == NVME_CTRL_DEAD) {
3951+ if (ctrl->state == NVME_CTRL_DEAD)
39463952 nvme_mark_namespaces_dead(ctrl);
3947− nvme_unquiesce_io_queues(ctrl);
3948− }
39493953
39503954 /* this is a no-op when called from the controller reset handler */
39513955 nvme_change_ctrl_state(ctrl, NVME_CTRL_DELETING_NOIO);
drivers/nvme/host/ioctl.c+0−2
@@ -786,11 +786,9 @@ int nvme_ns_chr_uring_cmd_iopoll(struct io_uring_cmd *ioucmd, · 785 unmodified lines
786786 if (!(ioucmd->flags & IORING_URING_CMD_POLLED))
787787 return 0;
788788
789− rcu_read_lock();
790789 req = READ_ONCE(ioucmd->cookie);
791790 if (req && blk_rq_is_poll(req))
792791 ret = blk_rq_poll(req, iob, poll_flags);
793− rcu_read_unlock();
794792 return ret;
795793 }
796794 #ifdef CONFIG_NVME_MULTIPATH
drivers/nvme/host/pci.c+2−1
@@ -3402,7 +3402,8 @@ static const struct pci_device_id nvme_id_table[] = { · 3401 unmodified lines
34023402 { PCI_DEVICE(0x1d97, 0x2263), /* SPCC */
34033403 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
34043404 { PCI_DEVICE(0x144d, 0xa80b), /* Samsung PM9B1 256G and 512G */
3405− .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
3405+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES |
3406+ NVME_QUIRK_BOGUS_NID, },
34063407 { PCI_DEVICE(0x144d, 0xa809), /* Samsung MZALQ256HBJD 256G */
34073408 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
34083409 { PCI_DEVICE(0x144d, 0xa802), /* Samsung SM953 */
drivers/nvme/host/rdma.c+2−1
@@ -883,6 +883,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new) · 882 unmodified lines
883883 goto out_cleanup_tagset;
884884
885885 if (!new) {
886+ nvme_start_freeze(&ctrl->ctrl);
886887 nvme_unquiesce_io_queues(&ctrl->ctrl);
887888 if (!nvme_wait_freeze_timeout(&ctrl->ctrl, NVME_IO_TIMEOUT)) {
888889 /*
@@ -891,6 +892,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new) · 2 unmodified lines
891892 * to be safe.
892893 */
893894 ret = -ENODEV;
895+ nvme_unfreeze(&ctrl->ctrl);
894896 goto out_wait_freeze_timed_out;
895897 }
896898 blk_mq_update_nr_hw_queues(ctrl->ctrl.tagset,
@@ -940,7 +942,6 @@ static void nvme_rdma_teardown_io_queues(struct nvme_rdma_ctrl *ctrl, · 43 unmodified lines
940942 bool remove)
941943 {
942944 if (ctrl->ctrl.queue_count > 1) {
943− nvme_start_freeze(&ctrl->ctrl);
944945 nvme_quiesce_io_queues(&ctrl->ctrl);
945946 nvme_sync_io_queues(&ctrl->ctrl);
946947 nvme_rdma_stop_io_queues(ctrl);
drivers/nvme/host/tcp.c+2−1
@@ -1868,6 +1868,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new) · 1867 unmodified lines
18681868 goto out_cleanup_connect_q;
18691869
18701870 if (!new) {
1871+ nvme_start_freeze(ctrl);
18711872 nvme_unquiesce_io_queues(ctrl);
18721873 if (!nvme_wait_freeze_timeout(ctrl, NVME_IO_TIMEOUT)) {
18731874 /*
@@ -1876,6 +1877,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new) · 2 unmodified lines
18761877 * to be safe.
18771878 */
18781879 ret = -ENODEV;
1880+ nvme_unfreeze(ctrl);
18791881 goto out_wait_freeze_timed_out;
18801882 }
18811883 blk_mq_update_nr_hw_queues(ctrl->tagset,
@@ -1980,7 +1982,6 @@ static void nvme_tcp_teardown_io_queues(struct nvme_ctrl *ctrl, · 98 unmodified lines
19801982 if (ctrl->queue_count <= 1)
19811983 return;
19821984 nvme_quiesce_admin_queue(ctrl);
1983− nvme_start_freeze(ctrl);
19841985 nvme_quiesce_io_queues(ctrl);
19851986 nvme_sync_io_queues(ctrl);
19861987 nvme_tcp_stop_io_queues(ctrl);
drivers/parisc/sba_iommu.c+6−0
@@ -121,6 +121,8 @@ module_param(sba_reserve_agpgart, int, 0444); · 120 unmodified lines
121121 MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
122122 #endif
123123
124+struct proc_dir_entry *proc_runway_root __ro_after_init;
125+struct proc_dir_entry *proc_mckinley_root __ro_after_init;
124126
125127 /************************************
126128 ** SBA register read and write support
@@ -1968,11 +1970,15 @@ static int __init sba_driver_callback(struct parisc_device *dev) · 1841 unmodified lines
19681970 #ifdef CONFIG_PROC_FS
19691971 switch (dev->id.hversion) {
19701972 case PLUTO_MCKINLEY_PORT:
1973+ if (!proc_mckinley_root)
1974+ proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
19711975 root = proc_mckinley_root;
19721976 break;
19731977 case ASTRO_RUNWAY_PORT:
19741978 case IKE_MERCED_PORT:
19751979 default:
1980+ if (!proc_runway_root)
1981+ proc_runway_root = proc_mkdir("bus/runway", NULL);
19761982 root = proc_runway_root;
19771983 break;
19781984 }
drivers/parport/parport_gsc.c+4−24
@@ -28,7 +28,6 @@ · 27 unmodified lines
2828 #include <linux/sysctl.h>
2929
3030 #include <asm/io.h>
31−#include <asm/dma.h>
3231 #include <linux/uaccess.h>
3332 #include <asm/superio.h>
3433
@@ -226,9 +225,9 @@ static int parport_PS2_supported(struct parport *pb) · 191 unmodified lines
226225
227226 /* --- Initialisation code -------------------------------- */
228227
229−struct parport *parport_gsc_probe_port(unsigned long base,
228+static struct parport *parport_gsc_probe_port(unsigned long base,
230229 unsigned long base_hi, int irq,
231− int dma, struct parisc_device *padev)
230+ struct parisc_device *padev)
232231 {
233232 struct parport_gsc_private *priv;
234233 struct parport_operations *ops;
@@ -250,12 +249,9 @@ struct parport *parport_gsc_probe_port(unsigned long base, · 15 unmodified lines
250249 }
251250 priv->ctr = 0xc;
252251 priv->ctr_writable = 0xff;
253− priv->dma_buf = NULL;
254− priv->dma_handle = 0;
255252 p->base = base;
256253 p->base_hi = base_hi;
257254 p->irq = irq;
258− p->dma = dma;
259255 p->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT;
260256 p->ops = ops;
261257 p->private_data = priv;
@@ -286,17 +282,9 @@ struct parport *parport_gsc_probe_port(unsigned long base, · 24 unmodified lines
286282 if (p->irq == PARPORT_IRQ_AUTO) {
287283 p->irq = PARPORT_IRQ_NONE;
288284 }
289− if (p->irq != PARPORT_IRQ_NONE) {
285+ if (p->irq != PARPORT_IRQ_NONE)
290286 pr_cont(", irq %d", p->irq);
291287
292− if (p->dma == PARPORT_DMA_AUTO) {
293− p->dma = PARPORT_DMA_NONE;
294− }
295− }
296− if (p->dma == PARPORT_DMA_AUTO) /* To use DMA, giving the irq
297− is mandatory (see above) */
298− p->dma = PARPORT_DMA_NONE;
299−
300288 pr_cont(" [");
301289 #define printmode(x) \
302290 do { \
@@ -321,7 +309,6 @@ do { \ · 18 unmodified lines
321309 pr_warn("%s: irq %d in use, resorting to polled operation\n",
322310 p->name, p->irq);
323311 p->irq = PARPORT_IRQ_NONE;
324− p->dma = PARPORT_DMA_NONE;
325312 }
326313 }
327314
@@ -369,8 +356,7 @@ static int __init parport_init_chip(struct parisc_device *dev) · 41 unmodified lines
369356 pr_info("%s: enhanced parport-modes not supported\n", __func__);
370357 }
371358
372− p = parport_gsc_probe_port(port, 0, dev->irq,
373− /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, dev);
359+ p = parport_gsc_probe_port(port, 0, dev->irq, dev);
374360 if (p)
375361 parport_count++;
376362 dev_set_drvdata(&dev->dev, p);
@@ -382,16 +368,10 @@ static void __exit parport_remove_chip(struct parisc_device *dev) · 5 unmodified lines
382368 {
383369 struct parport *p = dev_get_drvdata(&dev->dev);
384370 if (p) {
385− struct parport_gsc_private *priv = p->private_data;
386371 struct parport_operations *ops = p->ops;
387372 parport_remove_port(p);
388− if (p->dma != PARPORT_DMA_NONE)
389− free_dma(p->dma);
390373 if (p->irq != PARPORT_IRQ_NONE)
391374 free_irq(p->irq, p);
392− if (priv->dma_buf)
393− dma_free_coherent(&priv->dev->dev, PAGE_SIZE,
394− priv->dma_buf, priv->dma_handle);
395375 kfree (p->private_data);
396376 parport_put_port(p);
397377 kfree (ops); /* hope no-one cached it */
drivers/parport/parport_gsc.h+0−7
@@ -63,8 +63,6 @@ struct parport_gsc_private { · 62 unmodified lines
6363 int writeIntrThreshold;
6464
6565 /* buffer suitable for DMA, if DMA enabled */
66− char *dma_buf;
67− dma_addr_t dma_handle;
6866 struct pci_dev *dev;
6967 };
7068
@@ -199,9 +197,4 @@ extern void parport_gsc_inc_use_count(void); · 128 unmodified lines
199197
200198 extern void parport_gsc_dec_use_count(void);
201199
202−extern struct parport *parport_gsc_probe_port(unsigned long base,
203− unsigned long base_hi,
204− int irq, int dma,
205− struct parisc_device *padev);
206−
207200 #endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */
drivers/pci/bus.c+3−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/pci.h>
1212 #include <linux/errno.h>
1313 #include <linux/ioport.h>
14+#include <linux/of.h>
1415 #include <linux/proc_fs.h>
1516 #include <linux/slab.h>
1617
@@ -332,6 +333,7 @@ void __weak pcibios_bus_add_device(struct pci_dev *pdev) { } · 315 unmodified lines
332333 */
333334 void pci_bus_add_device(struct pci_dev *dev)
334335 {
336+ struct device_node *dn = dev->dev.of_node;
335337 int retval;
336338
337339 /*
@@ -344,7 +346,7 @@ void pci_bus_add_device(struct pci_dev *dev) · 6 unmodified lines
344346 pci_proc_attach_device(dev);
345347 pci_bridge_d3_update(dev);
346348
347− dev->match_driver = true;
349+ dev->match_driver = !dn || of_device_is_available(dn);
348350 retval = device_attach(&dev->dev);
349351 if (retval < 0 && retval != -EPROBE_DEFER)
350352 pci_warn(dev, "device attach failed (%d)\n", retval);
drivers/pci/controller/Kconfig+0−1
@@ -179,7 +179,6 @@ config PCI_MVEBU · 178 unmodified lines
179179 depends on MVEBU_MBUS
180180 depends on ARM
181181 depends on OF
182− depends on BROKEN
183182 select PCI_BRIDGE_EMUL
184183 help
185184 Add support for Marvell EBU PCIe controller. This PCIe controller
drivers/pci/controller/dwc/pcie-designware-host.c+4−9
@@ -485,20 +485,15 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) · 484 unmodified lines
485485 if (ret)
486486 goto err_remove_edma;
487487
488− if (dw_pcie_link_up(pci)) {
489− dw_pcie_print_link_status(pci);
490− } else {
488+ if (!dw_pcie_link_up(pci)) {
491489 ret = dw_pcie_start_link(pci);
492490 if (ret)
493491 goto err_remove_edma;
494−
495− if (pci->ops && pci->ops->start_link) {
496− ret = dw_pcie_wait_for_link(pci);
497− if (ret)
498− goto err_stop_link;
499− }
500492 }
501493
494+ /* Ignore errors, the link may come up later */
495+ dw_pcie_wait_for_link(pci);
496+
502497 bridge->sysdata = pp;
503498
504499 ret = pci_host_probe(bridge);
drivers/pci/controller/dwc/pcie-designware.c+7−13
@@ -644,20 +644,9 @@ void dw_pcie_disable_atu(struct dw_pcie *pci, u32 dir, int index) · 643 unmodified lines
644644 dw_pcie_writel_atu(pci, dir, index, PCIE_ATU_REGION_CTRL2, 0);
645645 }
646646
647−void dw_pcie_print_link_status(struct dw_pcie *pci)
648−{
649− u32 offset, val;
650−
651− offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
652− val = dw_pcie_readw_dbi(pci, offset + PCI_EXP_LNKSTA);
653−
654− dev_info(pci->dev, "PCIe Gen.%u x%u link up\n",
655− FIELD_GET(PCI_EXP_LNKSTA_CLS, val),
656− FIELD_GET(PCI_EXP_LNKSTA_NLW, val));
657−}
658−
659647 int dw_pcie_wait_for_link(struct dw_pcie *pci)
660648 {
649+ u32 offset, val;
661650 int retries;
662651
663652 /* Check if the link is up or not */
@@ -673,7 +662,12 @@ int dw_pcie_wait_for_link(struct dw_pcie *pci) · 9 unmodified lines
673662 return -ETIMEDOUT;
674663 }
675664
676− dw_pcie_print_link_status(pci);
665+ offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
666+ val = dw_pcie_readw_dbi(pci, offset + PCI_EXP_LNKSTA);
667+
668+ dev_info(pci->dev, "PCIe Gen.%u x%u link up\n",
669+ FIELD_GET(PCI_EXP_LNKSTA_CLS, val),
670+ FIELD_GET(PCI_EXP_LNKSTA_NLW, val));
677671
678672 return 0;
679673 }
drivers/pci/controller/dwc/pcie-designware.h+0−1
@@ -429,7 +429,6 @@ void dw_pcie_setup(struct dw_pcie *pci); · 428 unmodified lines
429429 void dw_pcie_iatu_detect(struct dw_pcie *pci);
430430 int dw_pcie_edma_detect(struct dw_pcie *pci);
431431 void dw_pcie_edma_remove(struct dw_pcie *pci);
432−void dw_pcie_print_link_status(struct dw_pcie *pci);
433432
434433 static inline void dw_pcie_writel_dbi(struct dw_pcie *pci, u32 reg, u32 val)
435434 {
drivers/pci/hotplug/acpiphp_glue.c+7−1
@@ -498,6 +498,7 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge) · 497 unmodified lines
498498 acpiphp_native_scan_bridge(dev);
499499 }
500500 } else {
501+ LIST_HEAD(add_list);
501502 int max, pass;
502503
503504 acpiphp_rescan_slot(slot);
@@ -511,10 +512,15 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge) · 7 unmodified lines
511512 if (pass && dev->subordinate) {
512513 check_hotplug_bridge(slot, dev);
513514 pcibios_resource_survey_bus(dev->subordinate);
515+ if (pci_is_root_bus(bus))
516+ __pci_bus_size_bridges(dev->subordinate, &add_list);
514517 }
515518 }
516519 }
517− pci_assign_unassigned_bridge_resources(bus->self);
520+ if (pci_is_root_bus(bus))
521+ __pci_bus_assign_resources(bus, &add_list, NULL);
522+ else
523+ pci_assign_unassigned_bridge_resources(bus->self);
518524 }
519525
520526 acpiphp_sanitize_bus(bus);
drivers/pci/of.c+0−5
@@ -34,11 +34,6 @@ int pci_set_of_node(struct pci_dev *dev) · 33 unmodified lines
3434 if (!node)
3535 return 0;
3636
37− if (!of_device_is_available(node)) {
38− of_node_put(node);
39− return -ENODEV;
40− }
41−
4237 device_set_node(&dev->dev, of_fwnode_handle(node));
4338 return 0;
4439 }
drivers/phy/hisilicon/phy-hisi-inno-usb2.c+1−1
@@ -184,7 +184,7 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) · 183 unmodified lines
184184 phy_set_drvdata(phy, &priv->ports[i]);
185185 i++;
186186
187− if (i > INNO_PHY_PORT_NUM) {
187+ if (i >= INNO_PHY_PORT_NUM) {
188188 dev_warn(dev, "Support %d ports in maximum\n", i);
189189 of_node_put(child);
190190 break;
drivers/phy/mediatek/phy-mtk-dp.c+1−1
@@ -169,7 +169,7 @@ static int mtk_dp_phy_probe(struct platform_device *pdev) · 168 unmodified lines
169169
170170 regs = *(struct regmap **)dev->platform_data;
171171 if (!regs)
172− return dev_err_probe(dev, EINVAL,
172+ return dev_err_probe(dev, -EINVAL,
173173 "No data passed, requires struct regmap**\n");
174174
175175 dp_phy = devm_kzalloc(dev, sizeof(*dp_phy), GFP_KERNEL);
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c+1−1
@@ -253,7 +253,7 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw, · 252 unmodified lines
253253 for (i = 0; i < ARRAY_SIZE(txpredivs); i++) {
254254 ns_hdmipll_ck = 5 * tmds_clk * txposdiv * txpredivs[i];
255255 if (ns_hdmipll_ck >= 5 * GIGA &&
256− ns_hdmipll_ck <= 1 * GIGA)
256+ ns_hdmipll_ck <= 12 * GIGA)
257257 break;
258258 }
259259 if (i == (ARRAY_SIZE(txpredivs) - 1) &&
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c+50−28
@@ -110,11 +110,13 @@ struct phy_override_seq { · 109 unmodified lines
110110 /**
111111 * struct qcom_snps_hsphy - snps hs phy attributes
112112 *
113+ * @dev: device structure
114+ *
113115 * @phy: generic phy
114116 * @base: iomapped memory space for snps hs phy
115117 *
116− * @cfg_ahb_clk: AHB2PHY interface clock
117− * @ref_clk: phy reference clock
118+ * @num_clks: number of clocks
119+ * @clks: array of clocks
118120 * @phy_reset: phy reset control
119121 * @vregs: regulator supplies bulk data
120122 * @phy_initialized: if PHY has been initialized correctly
@@ -122,11 +124,13 @@ struct phy_override_seq { · 1 unmodified line
122124 * @update_seq_cfg: tuning parameters for phy init
123125 */
124126 struct qcom_snps_hsphy {
127+ struct device *dev;
128+
125129 struct phy *phy;
126130 void __iomem *base;
127131
128− struct clk *cfg_ahb_clk;
129− struct clk *ref_clk;
132+ int num_clks;
133+ struct clk_bulk_data *clks;
130134 struct reset_control *phy_reset;
131135 struct regulator_bulk_data vregs[SNPS_HS_NUM_VREGS];
132136
@@ -135,6 +139,34 @@ struct qcom_snps_hsphy { · 2 unmodified lines
135139 struct phy_override_seq update_seq_cfg[NUM_HSPHY_TUNING_PARAMS];
136140 };
137141
142+static int qcom_snps_hsphy_clk_init(struct qcom_snps_hsphy *hsphy)
143+{
144+ struct device *dev = hsphy->dev;
145+
146+ hsphy->num_clks = 2;
147+ hsphy->clks = devm_kcalloc(dev, hsphy->num_clks, sizeof(*hsphy->clks), GFP_KERNEL);
148+ if (!hsphy->clks)
149+ return -ENOMEM;
150+
151+ /*
152+ * TODO: Currently no device tree instantiation of the PHY is using the clock.
153+ * This needs to be fixed in order for this code to be able to use devm_clk_bulk_get().
154+ */
155+ hsphy->clks[0].id = "cfg_ahb";
156+ hsphy->clks[0].clk = devm_clk_get_optional(dev, "cfg_ahb");
157+ if (IS_ERR(hsphy->clks[0].clk))
158+ return dev_err_probe(dev, PTR_ERR(hsphy->clks[0].clk),
159+ "failed to get cfg_ahb clk\n");
160+
161+ hsphy->clks[1].id = "ref";
162+ hsphy->clks[1].clk = devm_clk_get(dev, "ref");
163+ if (IS_ERR(hsphy->clks[1].clk))
164+ return dev_err_probe(dev, PTR_ERR(hsphy->clks[1].clk),
165+ "failed to get ref clk\n");
166+
167+ return 0;
168+}
169+
138170 static inline void qcom_snps_hsphy_write_mask(void __iomem *base, u32 offset,
139171 u32 mask, u32 val)
140172 {
@@ -165,22 +197,13 @@ static int qcom_snps_hsphy_suspend(struct qcom_snps_hsphy *hsphy) · 24 unmodified lines
165197 0, USB2_AUTO_RESUME);
166198 }
167199
168− clk_disable_unprepare(hsphy->cfg_ahb_clk);
169200 return 0;
170201 }
171202
172203 static int qcom_snps_hsphy_resume(struct qcom_snps_hsphy *hsphy)
173204 {
174− int ret;
175−
176205 dev_dbg(&hsphy->phy->dev, "Resume QCOM SNPS PHY, mode\n");
177206
178− ret = clk_prepare_enable(hsphy->cfg_ahb_clk);
179− if (ret) {
180− dev_err(&hsphy->phy->dev, "failed to enable cfg ahb clock\n");
181− return ret;
182− }
183−
184207 return 0;
185208 }
186209
@@ -191,8 +214,7 @@ static int __maybe_unused qcom_snps_hsphy_runtime_suspend(struct device *dev) · 4 unmodified lines
191214 if (!hsphy->phy_initialized)
192215 return 0;
193216
194− qcom_snps_hsphy_suspend(hsphy);
195− return 0;
217+ return qcom_snps_hsphy_suspend(hsphy);
196218 }
197219
198220 static int __maybe_unused qcom_snps_hsphy_runtime_resume(struct device *dev)
@@ -202,8 +224,7 @@ static int __maybe_unused qcom_snps_hsphy_runtime_resume(struct device *dev) · 3 unmodified lines
202224 if (!hsphy->phy_initialized)
203225 return 0;
204226
205− qcom_snps_hsphy_resume(hsphy);
206− return 0;
227+ return qcom_snps_hsphy_resume(hsphy);
207228 }
208229
209230 static int qcom_snps_hsphy_set_mode(struct phy *phy, enum phy_mode mode,
@@ -374,16 +395,16 @@ static int qcom_snps_hsphy_init(struct phy *phy) · 164 unmodified lines
374395 if (ret)
375396 return ret;
376397
377− ret = clk_prepare_enable(hsphy->cfg_ahb_clk);
398+ ret = clk_bulk_prepare_enable(hsphy->num_clks, hsphy->clks);
378399 if (ret) {
379− dev_err(&phy->dev, "failed to enable cfg ahb clock, %d\n", ret);
400+ dev_err(&phy->dev, "failed to enable clocks, %d\n", ret);
380401 goto poweroff_phy;
381402 }
382403
383404 ret = reset_control_assert(hsphy->phy_reset);
384405 if (ret) {
385406 dev_err(&phy->dev, "failed to assert phy_reset, %d\n", ret);
386− goto disable_ahb_clk;
407+ goto disable_clks;
387408 }
388409
389410 usleep_range(100, 150);
@@ -391,7 +412,7 @@ static int qcom_snps_hsphy_init(struct phy *phy) · 1 unmodified line
391412 ret = reset_control_deassert(hsphy->phy_reset);
392413 if (ret) {
393414 dev_err(&phy->dev, "failed to de-assert phy_reset, %d\n", ret);
394− goto disable_ahb_clk;
415+ goto disable_clks;
395416 }
396417
397418 qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_CFG0,
@@ -448,8 +469,8 @@ static int qcom_snps_hsphy_init(struct phy *phy) · 50 unmodified lines
448469
449470 return 0;
450471
451−disable_ahb_clk:
452− clk_disable_unprepare(hsphy->cfg_ahb_clk);
472+disable_clks:
473+ clk_bulk_disable_unprepare(hsphy->num_clks, hsphy->clks);
453474 poweroff_phy:
454475 regulator_bulk_disable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs);
455476
@@ -461,7 +482,7 @@ static int qcom_snps_hsphy_exit(struct phy *phy) · 5 unmodified lines
461482 struct qcom_snps_hsphy *hsphy = phy_get_drvdata(phy);
462483
463484 reset_control_assert(hsphy->phy_reset);
464− clk_disable_unprepare(hsphy->cfg_ahb_clk);
485+ clk_bulk_disable_unprepare(hsphy->num_clks, hsphy->clks);
465486 regulator_bulk_disable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs);
466487 hsphy->phy_initialized = false;
467488
@@ -554,14 +575,15 @@ static int qcom_snps_hsphy_probe(struct platform_device *pdev) · 86 unmodified lines
554575 if (!hsphy)
555576 return -ENOMEM;
556577
578+ hsphy->dev = dev;
579+
557580 hsphy->base = devm_platform_ioremap_resource(pdev, 0);
558581 if (IS_ERR(hsphy->base))
559582 return PTR_ERR(hsphy->base);
560583
561− hsphy->ref_clk = devm_clk_get(dev, "ref");
562− if (IS_ERR(hsphy->ref_clk))
563− return dev_err_probe(dev, PTR_ERR(hsphy->ref_clk),
564− "failed to get ref clk\n");
584+ ret = qcom_snps_hsphy_clk_init(hsphy);
585+ if (ret)
586+ return dev_err_probe(dev, ret, "failed to initialize clocks\n");
565587
566588 hsphy->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);
567589 if (IS_ERR(hsphy->phy_reset)) {
drivers/platform/x86/amd/pmc-quirks.c+2−6
@@ -11,7 +11,6 @@ · 10 unmodified lines
1111 #include <linux/dmi.h>
1212 #include <linux/io.h>
1313 #include <linux/ioport.h>
14−#include <linux/slab.h>
1514
1615 #include "pmc.h"
1716
@@ -135,12 +134,10 @@ static const struct dmi_system_id fwbug_list[] = { · 117 unmodified lines
135134 */
136135 static void amd_pmc_skip_nvme_smi_handler(u32 s2idle_bug_mmio)
137136 {
138− struct resource *res;
139137 void __iomem *addr;
140138 u8 val;
141139
142− res = request_mem_region_muxed(s2idle_bug_mmio, 1, "amd_pmc_pm80");
143− if (!res)
140+ if (!request_mem_region_muxed(s2idle_bug_mmio, 1, "amd_pmc_pm80"))
144141 return;
145142
146143 addr = ioremap(s2idle_bug_mmio, 1);
@@ -152,8 +149,7 @@ static void amd_pmc_skip_nvme_smi_handler(u32 s2idle_bug_mmio) · 5 unmodified lines
152149
153150 iounmap(addr);
154151 cleanup_resource:
155− release_resource(res);
156− kfree(res);
152+ release_mem_region(s2idle_bug_mmio, 1);
157153 }
158154
159155 void amd_pmc_process_restore_quirks(struct amd_pmc_dev *dev)
drivers/platform/x86/amd/pmf/acpi.c+22−1
@@ -106,6 +106,27 @@ int apmf_get_static_slider_granular(struct amd_pmf_dev *pdev, · 105 unmodified lines
106106 data, sizeof(*data));
107107 }
108108
109+int apmf_os_power_slider_update(struct amd_pmf_dev *pdev, u8 event)
110+{
111+ struct os_power_slider args;
112+ struct acpi_buffer params;
113+ union acpi_object *info;
114+ int err = 0;
115+
116+ args.size = sizeof(args);
117+ args.slider_event = event;
118+
119+ params.length = sizeof(args);
120+ params.pointer = (void *)&args;
121+
122+ info = apmf_if_call(pdev, APMF_FUNC_OS_POWER_SLIDER_UPDATE, &params);
123+ if (!info)
124+ err = -EIO;
125+
126+ kfree(info);
127+ return err;
128+}
129+
109130 static void apmf_sbios_heartbeat_notify(struct work_struct *work)
110131 {
111132 struct amd_pmf_dev *dev = container_of(work, struct amd_pmf_dev, heart_beat.work);
@@ -289,7 +310,7 @@ int apmf_acpi_init(struct amd_pmf_dev *pmf_dev) · 177 unmodified lines
289310
290311 ret = apmf_get_system_params(pmf_dev);
291312 if (ret) {
292− dev_err(pmf_dev->dev, "APMF apmf_get_system_params failed :%d\n", ret);
313+ dev_dbg(pmf_dev->dev, "APMF apmf_get_system_params failed :%d\n", ret);
293314 goto out;
294315 }
295316
drivers/platform/x86/amd/pmf/core.c+7−2
@@ -72,7 +72,11 @@ static int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long · 71 unmodified lines
7272 return NOTIFY_DONE;
7373 }
7474
75− amd_pmf_set_sps_power_limits(pmf);
75+ if (is_apmf_func_supported(pmf, APMF_FUNC_STATIC_SLIDER_GRANULAR))
76+ amd_pmf_set_sps_power_limits(pmf);
77+
78+ if (is_apmf_func_supported(pmf, APMF_FUNC_OS_POWER_SLIDER_UPDATE))
79+ amd_pmf_power_slider_update_event(pmf);
7680
7781 return NOTIFY_OK;
7882 }
@@ -297,7 +301,8 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev) · 218 unmodified lines
297301 int ret;
298302
299303 /* Enable Static Slider */
300− if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) {
304+ if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR) ||
305+ is_apmf_func_supported(dev, APMF_FUNC_OS_POWER_SLIDER_UPDATE)) {
301306 amd_pmf_init_sps(dev);
302307 dev->pwr_src_notifier.notifier_call = amd_pmf_pwr_src_notify_call;
303308 power_supply_reg_notifier(&dev->pwr_src_notifier);
drivers/platform/x86/amd/pmf/pmf.h+16−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 #define APMF_FUNC_SBIOS_HEARTBEAT 4
2222 #define APMF_FUNC_AUTO_MODE 5
2323 #define APMF_FUNC_SET_FAN_IDX 7
24+#define APMF_FUNC_OS_POWER_SLIDER_UPDATE 8
2425 #define APMF_FUNC_STATIC_SLIDER_GRANULAR 9
2526 #define APMF_FUNC_DYN_SLIDER_AC 11
2627 #define APMF_FUNC_DYN_SLIDER_DC 12
@@ -44,6 +45,14 @@ · 17 unmodified lines
4445 #define GET_STT_LIMIT_APU 0x20
4546 #define GET_STT_LIMIT_HS2 0x21
4647
48+/* OS slider update notification */
49+#define DC_BEST_PERF 0
50+#define DC_BETTER_PERF 1
51+#define DC_BATTERY_SAVER 3
52+#define AC_BEST_PERF 4
53+#define AC_BETTER_PERF 5
54+#define AC_BETTER_BATTERY 6
55+
4756 /* Fan Index for Auto Mode */
4857 #define FAN_INDEX_AUTO 0xFFFFFFFF
4958
@@ -193,6 +202,11 @@ struct amd_pmf_static_slider_granular { · 143 unmodified lines
193202 struct apmf_sps_prop_granular prop[POWER_SOURCE_MAX][POWER_MODE_MAX];
194203 };
195204
205+struct os_power_slider {
206+ u16 size;
207+ u8 slider_event;
208+} __packed;
209+
196210 struct fan_table_control {
197211 bool manual;
198212 unsigned long fan_id;
@@ -383,6 +397,7 @@ int amd_pmf_send_cmd(struct amd_pmf_dev *dev, u8 message, bool get, u32 arg, u32 · 184 unmodified lines
383397 int amd_pmf_init_metrics_table(struct amd_pmf_dev *dev);
384398 int amd_pmf_get_power_source(void);
385399 int apmf_install_handler(struct amd_pmf_dev *pmf_dev);
400+int apmf_os_power_slider_update(struct amd_pmf_dev *dev, u8 flag);
386401
387402 /* SPS Layer */
388403 int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);
@@ -393,6 +408,7 @@ void amd_pmf_deinit_sps(struct amd_pmf_dev *dev); · 4 unmodified lines
393408 int apmf_get_static_slider_granular(struct amd_pmf_dev *pdev,
394409 struct apmf_static_slider_granular_output *output);
395410 bool is_pprof_balanced(struct amd_pmf_dev *pmf);
411+int amd_pmf_power_slider_update_event(struct amd_pmf_dev *dev);
396412
397413
398414 int apmf_update_fan_idx(struct amd_pmf_dev *pdev, bool manual, u32 idx);
drivers/platform/x86/amd/pmf/sps.c+71−4
@@ -174,14 +174,78 @@ int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf) · 173 unmodified lines
174174 return mode;
175175 }
176176
177+int amd_pmf_power_slider_update_event(struct amd_pmf_dev *dev)
178+{
179+ u8 flag = 0;
180+ int mode;
181+ int src;
182+
183+ mode = amd_pmf_get_pprof_modes(dev);
184+ if (mode < 0)
185+ return mode;
186+
187+ src = amd_pmf_get_power_source();
188+
189+ if (src == POWER_SOURCE_AC) {
190+ switch (mode) {
191+ case POWER_MODE_PERFORMANCE:
192+ flag |= BIT(AC_BEST_PERF);
193+ break;
194+ case POWER_MODE_BALANCED_POWER:
195+ flag |= BIT(AC_BETTER_PERF);
196+ break;
197+ case POWER_MODE_POWER_SAVER:
198+ flag |= BIT(AC_BETTER_BATTERY);
199+ break;
200+ default:
201+ dev_err(dev->dev, "unsupported platform profile\n");
202+ return -EOPNOTSUPP;
203+ }
204+
205+ } else if (src == POWER_SOURCE_DC) {
206+ switch (mode) {
207+ case POWER_MODE_PERFORMANCE:
208+ flag |= BIT(DC_BEST_PERF);
209+ break;
210+ case POWER_MODE_BALANCED_POWER:
211+ flag |= BIT(DC_BETTER_PERF);
212+ break;
213+ case POWER_MODE_POWER_SAVER:
214+ flag |= BIT(DC_BATTERY_SAVER);
215+ break;
216+ default:
217+ dev_err(dev->dev, "unsupported platform profile\n");
218+ return -EOPNOTSUPP;
219+ }
220+ }
221+
222+ apmf_os_power_slider_update(dev, flag);
223+
224+ return 0;
225+}
226+
177227 static int amd_pmf_profile_set(struct platform_profile_handler *pprof,
178228 enum platform_profile_option profile)
179229 {
180230 struct amd_pmf_dev *pmf = container_of(pprof, struct amd_pmf_dev, pprof);
231+ int ret = 0;
181232
182233 pmf->current_profile = profile;
183234
184− return amd_pmf_set_sps_power_limits(pmf);
235+ /* Notify EC about the slider position change */
236+ if (is_apmf_func_supported(pmf, APMF_FUNC_OS_POWER_SLIDER_UPDATE)) {
237+ ret = amd_pmf_power_slider_update_event(pmf);
238+ if (ret)
239+ return ret;
240+ }
241+
242+ if (is_apmf_func_supported(pmf, APMF_FUNC_STATIC_SLIDER_GRANULAR)) {
243+ ret = amd_pmf_set_sps_power_limits(pmf);
244+ if (ret)
245+ return ret;
246+ }
247+
248+ return 0;
185249 }
186250
187251 int amd_pmf_init_sps(struct amd_pmf_dev *dev)
@@ -189,10 +253,13 @@ int amd_pmf_init_sps(struct amd_pmf_dev *dev) · 1 unmodified line
189253 int err;
190254
191255 dev->current_profile = PLATFORM_PROFILE_BALANCED;
192− amd_pmf_load_defaults_sps(dev);
193256
194− /* update SPS balanced power mode thermals */
195− amd_pmf_set_sps_power_limits(dev);
257+ if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) {
258+ amd_pmf_load_defaults_sps(dev);
259+
260+ /* update SPS balanced power mode thermals */
261+ amd_pmf_set_sps_power_limits(dev);
262+ }
196263
197264 dev->pprof.profile_get = amd_pmf_profile_get;
198265 dev->pprof.profile_set = amd_pmf_profile_set;
drivers/platform/x86/asus-wmi.c+12−2
@@ -738,13 +738,23 @@ static ssize_t kbd_rgb_mode_store(struct device *dev, · 737 unmodified lines
738738 struct device_attribute *attr,
739739 const char *buf, size_t count)
740740 {
741− u32 cmd, mode, r, g, b, speed;
741+ u32 cmd, mode, r, g, b, speed;
742742 int err;
743743
744744 if (sscanf(buf, "%d %d %d %d %d %d", &cmd, &mode, &r, &g, &b, &speed) != 6)
745745 return -EINVAL;
746746
747− cmd = !!cmd;
747+ /* B3 is set and B4 is save to BIOS */
748+ switch (cmd) {
749+ case 0:
750+ cmd = 0xb3;
751+ break;
752+ case 1:
753+ cmd = 0xb4;
754+ break;
755+ default:
756+ return -EINVAL;
757+ }
748758
749759 /* These are the known usable modes across all TUF/ROG */
750760 if (mode >= 12 || mode == 9)
drivers/platform/x86/huawei-wmi.c+2−0
@@ -85,6 +85,8 @@ static const struct key_entry huawei_wmi_keymap[] = { · 84 unmodified lines
8585 { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } },
8686 { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } },
8787 { KE_IGNORE, 0x295, { KEY_KBDILLUMUP } },
88+ // Ignore Ambient Light Sensoring
89+ { KE_KEY, 0x2c1, { KEY_RESERVED } },
8890 { KE_END, 0 }
8991 };
9092
drivers/platform/x86/intel/hid.c+15−12
@@ -150,6 +150,12 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = { · 149 unmodified lines
150150 DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go"),
151151 },
152152 },
153+ {
154+ .matches = {
155+ DMI_MATCH(DMI_SYS_VENDOR, "HP"),
156+ DMI_MATCH(DMI_PRODUCT_NAME, "HP Elite Dragonfly G2 Notebook PC"),
157+ },
158+ },
153159 { }
154160 };
155161
@@ -620,7 +626,7 @@ static bool button_array_present(struct platform_device *device) · 464 unmodified lines
620626 static int intel_hid_probe(struct platform_device *device)
621627 {
622628 acpi_handle handle = ACPI_HANDLE(&device->dev);
623− unsigned long long mode;
629+ unsigned long long mode, dummy;
624630 struct intel_hid_priv *priv;
625631 acpi_status status;
626632 int err;
@@ -692,18 +698,15 @@ static int intel_hid_probe(struct platform_device *device) · 65 unmodified lines
692698 if (err)
693699 goto err_remove_notify;
694700
695− if (priv->array) {
696− unsigned long long dummy;
701+ intel_button_array_enable(&device->dev, true);
697702
698− intel_button_array_enable(&device->dev, true);
699−
700− /* Call button load method to enable HID power button */
701− if (!intel_hid_evaluate_method(handle, INTEL_HID_DSM_BTNL_FN,
702− &dummy)) {
703− dev_warn(&device->dev,
704− "failed to enable HID power button\n");
705− }
706− }
703+ /*
704+ * Call button load method to enable HID power button
705+ * Always do this since it activates events on some devices without
706+ * a button array too.
707+ */
708+ if (!intel_hid_evaluate_method(handle, INTEL_HID_DSM_BTNL_FN, &dummy))
709+ dev_warn(&device->dev, "failed to enable HID power button\n");
707710
708711 device_init_wakeup(&device->dev, true);
709712 /*
drivers/platform/x86/intel/speed_select_if/isst_if_common.c+2−2
@@ -335,8 +335,8 @@ static struct pci_dev *_isst_if_get_pci_dev(int cpu, int bus_no, int dev, int fn · 334 unmodified lines
335335
336336 node = dev_to_node(&_pci_dev->dev);
337337 if (node == NUMA_NO_NODE) {
338− pr_info("Fail to get numa node for CPU:%d bus:%d dev:%d fn:%d\n",
339− cpu, bus_no, dev, fn);
338+ pr_info_once("Fail to get numa node for CPU:%d bus:%d dev:%d fn:%d\n",
339+ cpu, bus_no, dev, fn);
340340 continue;
341341 }
342342
drivers/platform/x86/lenovo-ymc.c+25−0
@@ -24,6 +24,10 @@ static bool ec_trigger __read_mostly; · 23 unmodified lines
2424 module_param(ec_trigger, bool, 0444);
2525 MODULE_PARM_DESC(ec_trigger, "Enable EC triggering work-around to force emitting tablet mode events");
2626
27+static bool force;
28+module_param(force, bool, 0444);
29+MODULE_PARM_DESC(force, "Force loading on boards without a convertible DMI chassis-type");
30+
2731 static const struct dmi_system_id ec_trigger_quirk_dmi_table[] = {
2832 {
2933 /* Lenovo Yoga 7 14ARB7 */
@@ -35,6 +39,20 @@ static const struct dmi_system_id ec_trigger_quirk_dmi_table[] = { · 5 unmodified lines
3539 { }
3640 };
3741
42+static const struct dmi_system_id allowed_chasis_types_dmi_table[] = {
43+ {
44+ .matches = {
45+ DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "31" /* Convertible */),
46+ },
47+ },
48+ {
49+ .matches = {
50+ DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */),
51+ },
52+ },
53+ { }
54+};
55+
3856 struct lenovo_ymc_private {
3957 struct input_dev *input_dev;
4058 struct acpi_device *ec_acpi_dev;
@@ -111,6 +129,13 @@ static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx) · 70 unmodified lines
111129 struct input_dev *input_dev;
112130 int err;
113131
132+ if (!dmi_check_system(allowed_chasis_types_dmi_table)) {
133+ if (force)
134+ dev_info(&wdev->dev, "Force loading Lenovo YMC support\n");
135+ else
136+ return -ENODEV;
137+ }
138+
114139 ec_trigger |= dmi_check_system(ec_trigger_quirk_dmi_table);
115140
116141 priv = devm_kzalloc(&wdev->dev, sizeof(*priv), GFP_KERNEL);
drivers/platform/x86/mlx-platform.c+11−12
@@ -62,10 +62,6 @@ · 61 unmodified lines
6262 #define MLXPLAT_CPLD_LPC_REG_PWM_CONTROL_OFFSET 0x37
6363 #define MLXPLAT_CPLD_LPC_REG_AGGR_OFFSET 0x3a
6464 #define MLXPLAT_CPLD_LPC_REG_AGGR_MASK_OFFSET 0x3b
65−#define MLXPLAT_CPLD_LPC_REG_DBG1_OFFSET 0x3c
66−#define MLXPLAT_CPLD_LPC_REG_DBG2_OFFSET 0x3d
67−#define MLXPLAT_CPLD_LPC_REG_DBG3_OFFSET 0x3e
68−#define MLXPLAT_CPLD_LPC_REG_DBG4_OFFSET 0x3f
6965 #define MLXPLAT_CPLD_LPC_REG_AGGRLO_OFFSET 0x40
7066 #define MLXPLAT_CPLD_LPC_REG_AGGRLO_MASK_OFFSET 0x41
7167 #define MLXPLAT_CPLD_LPC_REG_AGGRCO_OFFSET 0x42
@@ -126,6 +122,10 @@ · 54 unmodified lines
126122 #define MLXPLAT_CPLD_LPC_REG_LC_SD_EVENT_OFFSET 0xaa
127123 #define MLXPLAT_CPLD_LPC_REG_LC_SD_MASK_OFFSET 0xab
128124 #define MLXPLAT_CPLD_LPC_REG_LC_PWR_ON 0xb2
125+#define MLXPLAT_CPLD_LPC_REG_DBG1_OFFSET 0xb6
126+#define MLXPLAT_CPLD_LPC_REG_DBG2_OFFSET 0xb7
127+#define MLXPLAT_CPLD_LPC_REG_DBG3_OFFSET 0xb8
128+#define MLXPLAT_CPLD_LPC_REG_DBG4_OFFSET 0xb9
129129 #define MLXPLAT_CPLD_LPC_REG_GP4_RO_OFFSET 0xc2
130130 #define MLXPLAT_CPLD_LPC_REG_SPI_CHNL_SELECT 0xc3
131131 #define MLXPLAT_CPLD_LPC_REG_WD_CLEAR_OFFSET 0xc7
@@ -222,7 +222,7 @@ · 90 unmodified lines
222222 MLXPLAT_CPLD_AGGR_MASK_LC_SDWN)
223223 #define MLXPLAT_CPLD_LOW_AGGR_MASK_LOW 0xc1
224224 #define MLXPLAT_CPLD_LOW_AGGR_MASK_ASIC2 BIT(2)
225−#define MLXPLAT_CPLD_LOW_AGGR_MASK_PWR_BUT BIT(4)
225+#define MLXPLAT_CPLD_LOW_AGGR_MASK_PWR_BUT GENMASK(5, 4)
226226 #define MLXPLAT_CPLD_LOW_AGGR_MASK_I2C BIT(6)
227227 #define MLXPLAT_CPLD_PSU_MASK GENMASK(1, 0)
228228 #define MLXPLAT_CPLD_PWR_MASK GENMASK(1, 0)
@@ -237,7 +237,7 @@ · 8 unmodified lines
237237 #define MLXPLAT_CPLD_GWP_MASK GENMASK(0, 0)
238238 #define MLXPLAT_CPLD_EROT_MASK GENMASK(1, 0)
239239 #define MLXPLAT_CPLD_PWR_BUTTON_MASK BIT(0)
240−#define MLXPLAT_CPLD_LATCH_RST_MASK BIT(5)
240+#define MLXPLAT_CPLD_LATCH_RST_MASK BIT(6)
241241 #define MLXPLAT_CPLD_THERMAL1_PDB_MASK BIT(3)
242242 #define MLXPLAT_CPLD_THERMAL2_PDB_MASK BIT(4)
243243 #define MLXPLAT_CPLD_INTRUSION_MASK BIT(6)
@@ -2356,7 +2356,7 @@ mlxplat_mlxcpld_l1_switch_pwr_events_handler(void *handle, enum mlxreg_hotplug_k · 2112 unmodified lines
23562356 u8 action)
23572357 {
23582358 dev_info(&mlxplat_dev->dev, "System shutdown due to short press of power button");
2359− kernel_halt();
2359+ kernel_power_off();
23602360 return 0;
23612361 }
23622362
@@ -2475,7 +2475,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_l1_switch_events_items[] = { · 112 unmodified lines
24752475 .reg = MLXPLAT_CPLD_LPC_REG_PWRB_OFFSET,
24762476 .mask = MLXPLAT_CPLD_PWR_BUTTON_MASK,
24772477 .count = ARRAY_SIZE(mlxplat_mlxcpld_l1_switch_pwr_events_items_data),
2478− .inversed = 0,
2478+ .inversed = 1,
24792479 .health = false,
24802480 },
24812481 {
@@ -2484,7 +2484,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_l1_switch_events_items[] = { · 2 unmodified lines
24842484 .reg = MLXPLAT_CPLD_LPC_REG_BRD_OFFSET,
24852485 .mask = MLXPLAT_CPLD_L1_CHA_HEALTH_MASK,
24862486 .count = ARRAY_SIZE(mlxplat_mlxcpld_l1_switch_health_events_items_data),
2487− .inversed = 0,
2487+ .inversed = 1,
24882488 .health = false,
24892489 .ind = 8,
24902490 },
@@ -3677,7 +3677,7 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = { · 1186 unmodified lines
36773677 {
36783678 .label = "latch_reset",
36793679 .reg = MLXPLAT_CPLD_LPC_REG_GP1_OFFSET,
3680− .mask = GENMASK(7, 0) & ~BIT(5),
3680+ .mask = GENMASK(7, 0) & ~BIT(6),
36813681 .mode = 0200,
36823682 },
36833683 {
@@ -6238,8 +6238,6 @@ static void mlxplat_i2c_mux_topolgy_exit(struct mlxplat_priv *priv) · 2554 unmodified lines
62386238 if (priv->pdev_mux[i])
62396239 platform_device_unregister(priv->pdev_mux[i]);
62406240 }
6241−
6242− mlxplat_post_exit();
62436241 }
62446242
62456243 static int mlxplat_i2c_main_complition_notify(void *handle, int id)
@@ -6369,6 +6367,7 @@ static void __exit mlxplat_exit(void) · 123 unmodified lines
63696367 pm_power_off = NULL;
63706368 mlxplat_pre_exit(priv);
63716369 mlxplat_i2c_main_exit(priv);
6370+ mlxplat_post_exit();
63726371 }
63736372 module_exit(mlxplat_exit);
63746373
drivers/platform/x86/msi-ec.c+9−9
@@ -27,15 +27,15 @@ · 26 unmodified lines
2727 #include <linux/seq_file.h>
2828 #include <linux/string.h>
2929
30−static const char *const SM_ECO_NAME = "eco";
31−static const char *const SM_COMFORT_NAME = "comfort";
32−static const char *const SM_SPORT_NAME = "sport";
33−static const char *const SM_TURBO_NAME = "turbo";
34−
35−static const char *const FM_AUTO_NAME = "auto";
36−static const char *const FM_SILENT_NAME = "silent";
37−static const char *const FM_BASIC_NAME = "basic";
38−static const char *const FM_ADVANCED_NAME = "advanced";
30+#define SM_ECO_NAME "eco"
31+#define SM_COMFORT_NAME "comfort"
32+#define SM_SPORT_NAME "sport"
33+#define SM_TURBO_NAME "turbo"
34+
35+#define FM_AUTO_NAME "auto"
36+#define FM_SILENT_NAME "silent"
37+#define FM_BASIC_NAME "basic"
38+#define FM_ADVANCED_NAME "advanced"
3939
4040 static const char * const ALLOWED_FW_0[] __initconst = {
4141 "14C1EMS1.012",
drivers/platform/x86/msi-laptop.c+4−4
@@ -208,7 +208,7 @@ static ssize_t set_device_state(const char *buf, size_t count, u8 mask) · 207 unmodified lines
208208 return -EINVAL;
209209
210210 if (quirks->ec_read_only)
211− return -EOPNOTSUPP;
211+ return 0;
212212
213213 /* read current device state */
214214 result = ec_read(MSI_STANDARD_EC_COMMAND_ADDRESS, &rdata);
@@ -838,15 +838,15 @@ static bool msi_laptop_i8042_filter(unsigned char data, unsigned char str, · 623 unmodified lines
838838 static void msi_init_rfkill(struct work_struct *ignored)
839839 {
840840 if (rfk_wlan) {
841− rfkill_set_sw_state(rfk_wlan, !wlan_s);
841+ msi_rfkill_set_state(rfk_wlan, !wlan_s);
842842 rfkill_wlan_set(NULL, !wlan_s);
843843 }
844844 if (rfk_bluetooth) {
845− rfkill_set_sw_state(rfk_bluetooth, !bluetooth_s);
845+ msi_rfkill_set_state(rfk_bluetooth, !bluetooth_s);
846846 rfkill_bluetooth_set(NULL, !bluetooth_s);
847847 }
848848 if (rfk_threeg) {
849− rfkill_set_sw_state(rfk_threeg, !threeg_s);
849+ msi_rfkill_set_state(rfk_threeg, !threeg_s);
850850 rfkill_threeg_set(NULL, !threeg_s);
851851 }
852852 }
drivers/platform/x86/serial-multi-instantiate.c+31−4
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 #define IRQ_RESOURCE_NONE 0
2222 #define IRQ_RESOURCE_GPIO 1
2323 #define IRQ_RESOURCE_APIC 2
24+#define IRQ_RESOURCE_AUTO 3
2425
2526 enum smi_bus_type {
2627 SMI_I2C,
@@ -52,6 +53,18 @@ static int smi_get_irq(struct platform_device *pdev, struct acpi_device *adev, · 25 unmodified lines
5253 int ret;
5354
5455 switch (inst->flags & IRQ_RESOURCE_TYPE) {
56+ case IRQ_RESOURCE_AUTO:
57+ ret = acpi_dev_gpio_irq_get(adev, inst->irq_idx);
58+ if (ret > 0) {
59+ dev_dbg(&pdev->dev, "Using gpio irq\n");
60+ break;
61+ }
62+ ret = platform_get_irq(pdev, inst->irq_idx);
63+ if (ret > 0) {
64+ dev_dbg(&pdev->dev, "Using platform irq\n");
65+ break;
66+ }
67+ break;
5568 case IRQ_RESOURCE_GPIO:
5669 ret = acpi_dev_gpio_irq_get(adev, inst->irq_idx);
5770 break;
@@ -307,10 +320,23 @@ static const struct smi_node int3515_data = { · 249 unmodified lines
307320
308321 static const struct smi_node cs35l41_hda = {
309322 .instances = {
310− { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 },
311− { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 },
312− { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 },
313− { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 },
323+ { "cs35l41-hda", IRQ_RESOURCE_AUTO, 0 },
324+ { "cs35l41-hda", IRQ_RESOURCE_AUTO, 0 },
325+ { "cs35l41-hda", IRQ_RESOURCE_AUTO, 0 },
326+ { "cs35l41-hda", IRQ_RESOURCE_AUTO, 0 },
327+ {}
328+ },
329+ .bus_type = SMI_AUTO_DETECT,
330+};
331+
332+static const struct smi_node cs35l56_hda = {
333+ .instances = {
334+ { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
335+ { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
336+ { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
337+ { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
338+ /* a 5th entry is an alias address, not a real device */
339+ { "cs35l56-hda_dummy_dev" },
314340 {}
315341 },
316342 .bus_type = SMI_AUTO_DETECT,
@@ -324,6 +350,7 @@ static const struct acpi_device_id smi_acpi_ids[] = { · 7 unmodified lines
324350 { "BSG1160", (unsigned long)&bsg1160_data },
325351 { "BSG2150", (unsigned long)&bsg2150_data },
326352 { "CSC3551", (unsigned long)&cs35l41_hda },
353+ { "CSC3556", (unsigned long)&cs35l56_hda },
327354 { "INT3515", (unsigned long)&int3515_data },
328355 /* Non-conforming _HID for Cirrus Logic already released */
329356 { "CLSA0100", (unsigned long)&cs35l41_hda },
drivers/platform/x86/think-lmi.c+2−2
@@ -719,12 +719,12 @@ static ssize_t cert_to_password_store(struct kobject *kobj, · 718 unmodified lines
719719 /* Format: 'Password,Signature' */
720720 auth_str = kasprintf(GFP_KERNEL, "%s,%s", passwd, setting->signature);
721721 if (!auth_str) {
722− kfree(passwd);
722+ kfree_sensitive(passwd);
723723 return -ENOMEM;
724724 }
725725 ret = tlmi_simple_call(LENOVO_CERT_TO_PASSWORD_GUID, auth_str);
726726 kfree(auth_str);
727− kfree(passwd);
727+ kfree_sensitive(passwd);
728728
729729 return ret ?: count;
730730 }
drivers/platform/x86/touchscreen_dmi.c+4−3
@@ -27,11 +27,12 @@ struct ts_dmi_data { · 26 unmodified lines
2727 /* NOTE: Please keep all entries sorted alphabetically */
2828
2929 static const struct property_entry archos_101_cesium_educ_props[] = {
30− PROPERTY_ENTRY_U32("touchscreen-size-x", 1280),
31− PROPERTY_ENTRY_U32("touchscreen-size-y", 1850),
32− PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
30+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1850),
31+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
32+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
3333 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
3434 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
35+ PROPERTY_ENTRY_BOOL("silead,home-button"),
3536 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-archos-101-cesium-educ.fw"),
3637 { }
3738 };
drivers/powercap/intel_rapl_common.c+7−7
@@ -818,7 +818,7 @@ static int rapl_read_data_raw(struct rapl_domain *rd, · 817 unmodified lines
818818 return -EINVAL;
819819
820820 ra.reg = rd->regs[rpi->id];
821− if (!ra.reg)
821+ if (!ra.reg.val)
822822 return -EINVAL;
823823
824824 /* non-hardware data are collected by the polling thread */
@@ -830,7 +830,7 @@ static int rapl_read_data_raw(struct rapl_domain *rd, · 5 unmodified lines
830830 ra.mask = rpi->mask;
831831
832832 if (rd->rp->priv->read_raw(get_rid(rd->rp), &ra)) {
833− pr_debug("failed to read reg 0x%llx for %s:%s\n", ra.reg, rd->rp->name, rd->name);
833+ pr_debug("failed to read reg 0x%llx for %s:%s\n", ra.reg.val, rd->rp->name, rd->name);
834834 return -EIO;
835835 }
836836
@@ -920,7 +920,7 @@ static int rapl_check_unit_core(struct rapl_domain *rd) · 83 unmodified lines
920920 ra.mask = ~0;
921921 if (rd->rp->priv->read_raw(get_rid(rd->rp), &ra)) {
922922 pr_err("Failed to read power unit REG 0x%llx on %s:%s, exit.\n",
923− ra.reg, rd->rp->name, rd->name);
923+ ra.reg.val, rd->rp->name, rd->name);
924924 return -ENODEV;
925925 }
926926
@@ -948,7 +948,7 @@ static int rapl_check_unit_atom(struct rapl_domain *rd) · 21 unmodified lines
948948 ra.mask = ~0;
949949 if (rd->rp->priv->read_raw(get_rid(rd->rp), &ra)) {
950950 pr_err("Failed to read power unit REG 0x%llx on %s:%s, exit.\n",
951− ra.reg, rd->rp->name, rd->name);
951+ ra.reg.val, rd->rp->name, rd->name);
952952 return -ENODEV;
953953 }
954954
@@ -1135,7 +1135,7 @@ static int rapl_check_unit_tpmi(struct rapl_domain *rd) · 180 unmodified lines
11351135 ra.mask = ~0;
11361136 if (rd->rp->priv->read_raw(get_rid(rd->rp), &ra)) {
11371137 pr_err("Failed to read power unit REG 0x%llx on %s:%s, exit.\n",
1138− ra.reg, rd->rp->name, rd->name);
1138+ ra.reg.val, rd->rp->name, rd->name);
11391139 return -ENODEV;
11401140 }
11411141
@@ -1411,8 +1411,8 @@ static int rapl_get_domain_unit(struct rapl_domain *rd) · 269 unmodified lines
14111411 struct rapl_defaults *defaults = get_defaults(rd->rp);
14121412 int ret;
14131413
1414− if (!rd->regs[RAPL_DOMAIN_REG_UNIT]) {
1415− if (!rd->rp->priv->reg_unit) {
1414+ if (!rd->regs[RAPL_DOMAIN_REG_UNIT].val) {
1415+ if (!rd->rp->priv->reg_unit.val) {
14161416 pr_err("No valid Unit register found\n");
14171417 return -ENODEV;
14181418 }
drivers/powercap/intel_rapl_msr.c+25−24
@@ -34,28 +34,32 @@ static struct rapl_if_priv *rapl_msr_priv; · 33 unmodified lines
3434
3535 static struct rapl_if_priv rapl_msr_priv_intel = {
3636 .type = RAPL_IF_MSR,
37− .reg_unit = MSR_RAPL_POWER_UNIT,
38− .regs[RAPL_DOMAIN_PACKAGE] = {
39− MSR_PKG_POWER_LIMIT, MSR_PKG_ENERGY_STATUS, MSR_PKG_PERF_STATUS, 0, MSR_PKG_POWER_INFO },
40− .regs[RAPL_DOMAIN_PP0] = {
41− MSR_PP0_POWER_LIMIT, MSR_PP0_ENERGY_STATUS, 0, MSR_PP0_POLICY, 0 },
42− .regs[RAPL_DOMAIN_PP1] = {
43− MSR_PP1_POWER_LIMIT, MSR_PP1_ENERGY_STATUS, 0, MSR_PP1_POLICY, 0 },
44− .regs[RAPL_DOMAIN_DRAM] = {
45− MSR_DRAM_POWER_LIMIT, MSR_DRAM_ENERGY_STATUS, MSR_DRAM_PERF_STATUS, 0, MSR_DRAM_POWER_INFO },
46− .regs[RAPL_DOMAIN_PLATFORM] = {
47− MSR_PLATFORM_POWER_LIMIT, MSR_PLATFORM_ENERGY_STATUS, 0, 0, 0},
37+ .reg_unit.msr = MSR_RAPL_POWER_UNIT,
38+ .regs[RAPL_DOMAIN_PACKAGE][RAPL_DOMAIN_REG_LIMIT].msr = MSR_PKG_POWER_LIMIT,
39+ .regs[RAPL_DOMAIN_PACKAGE][RAPL_DOMAIN_REG_STATUS].msr = MSR_PKG_ENERGY_STATUS,
40+ .regs[RAPL_DOMAIN_PACKAGE][RAPL_DOMAIN_REG_PERF].msr = MSR_PKG_PERF_STATUS,
41+ .regs[RAPL_DOMAIN_PACKAGE][RAPL_DOMAIN_REG_INFO].msr = MSR_PKG_POWER_INFO,
42+ .regs[RAPL_DOMAIN_PP0][RAPL_DOMAIN_REG_LIMIT].msr = MSR_PP0_POWER_LIMIT,
43+ .regs[RAPL_DOMAIN_PP0][RAPL_DOMAIN_REG_STATUS].msr = MSR_PP0_ENERGY_STATUS,
44+ .regs[RAPL_DOMAIN_PP0][RAPL_DOMAIN_REG_POLICY].msr = MSR_PP0_POLICY,
45+ .regs[RAPL_DOMAIN_PP1][RAPL_DOMAIN_REG_LIMIT].msr = MSR_PP1_POWER_LIMIT,
46+ .regs[RAPL_DOMAIN_PP1][RAPL_DOMAIN_REG_STATUS].msr = MSR_PP1_ENERGY_STATUS,
47+ .regs[RAPL_DOMAIN_PP1][RAPL_DOMAIN_REG_POLICY].msr = MSR_PP1_POLICY,
48+ .regs[RAPL_DOMAIN_DRAM][RAPL_DOMAIN_REG_LIMIT].msr = MSR_DRAM_POWER_LIMIT,
49+ .regs[RAPL_DOMAIN_DRAM][RAPL_DOMAIN_REG_STATUS].msr = MSR_DRAM_ENERGY_STATUS,
50+ .regs[RAPL_DOMAIN_DRAM][RAPL_DOMAIN_REG_PERF].msr = MSR_DRAM_PERF_STATUS,
51+ .regs[RAPL_DOMAIN_DRAM][RAPL_DOMAIN_REG_INFO].msr = MSR_DRAM_POWER_INFO,
52+ .regs[RAPL_DOMAIN_PLATFORM][RAPL_DOMAIN_REG_LIMIT].msr = MSR_PLATFORM_POWER_LIMIT,
53+ .regs[RAPL_DOMAIN_PLATFORM][RAPL_DOMAIN_REG_STATUS].msr = MSR_PLATFORM_ENERGY_STATUS,
4854 .limits[RAPL_DOMAIN_PACKAGE] = BIT(POWER_LIMIT2),
4955 .limits[RAPL_DOMAIN_PLATFORM] = BIT(POWER_LIMIT2),
5056 };
5157
5258 static struct rapl_if_priv rapl_msr_priv_amd = {
5359 .type = RAPL_IF_MSR,
54− .reg_unit = MSR_AMD_RAPL_POWER_UNIT,
55− .regs[RAPL_DOMAIN_PACKAGE] = {
56− 0, MSR_AMD_PKG_ENERGY_STATUS, 0, 0, 0 },
57− .regs[RAPL_DOMAIN_PP0] = {
58− 0, MSR_AMD_CORE_ENERGY_STATUS, 0, 0, 0 },
60+ .reg_unit.msr = MSR_AMD_RAPL_POWER_UNIT,
61+ .regs[RAPL_DOMAIN_PACKAGE][RAPL_DOMAIN_REG_STATUS].msr = MSR_AMD_PKG_ENERGY_STATUS,
62+ .regs[RAPL_DOMAIN_PP0][RAPL_DOMAIN_REG_STATUS].msr = MSR_AMD_CORE_ENERGY_STATUS,
5963 };
6064

43 more lines aren’t shown here.

drivers/powercap/intel_rapl_tpmi.c+8−9

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

drivers/regulator/mt6358-regulator.c+5−5

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

drivers/s390/block/dasd.c+48−77

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

drivers/s390/block/dasd_3990_erp.c+2−2

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

drivers/s390/block/dasd_ioctl.c+1−0

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

drivers/s390/net/qeth_core.h+0−1

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

drivers/s390/net/qeth_core_main.c+0−2

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

drivers/s390/net/qeth_l2_main.c+6−3

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

drivers/s390/net/qeth_l3_main.c+5−3

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

drivers/s390/scsi/zfcp_fc.c+1−5

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

drivers/scsi/53c700.c+1−1

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

drivers/scsi/fnic/fnic.h+1−1

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

drivers/scsi/fnic/fnic_scsi.c+4−2

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

drivers/scsi/lpfc/lpfc_scsi.c+3−17

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

drivers/scsi/pm8001/pm8001_init.c+2−1

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

drivers/scsi/qedf/qedf_main.c+18−0

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

drivers/scsi/qedi/qedi_main.c+21−2

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

drivers/scsi/raid_class.c+1−0

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

drivers/scsi/scsi_proc.c+17−13

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

drivers/scsi/sd.c+6−3

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

drivers/scsi/sg.c+4−3

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

drivers/scsi/snic/snic_disc.c+1−0

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

drivers/scsi/storvsc_drv.c+4−4

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

drivers/soc/imx/imx8mp-blk-ctrl.c+1−1

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

drivers/soundwire/amd_manager.c+2−2

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

drivers/soundwire/bus.c+4−4

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

drivers/soundwire/qcom.c+1−1

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

drivers/spi/spi-qcom-qspi.c+49−5

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

drivers/staging/fbtft/fb_ili9341.c+1−1

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

drivers/staging/ks7010/ks_wlan_net.c+4−2

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

drivers/staging/media/atomisp/Kconfig+1−0

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

drivers/staging/rtl8712/rtl871x_xmit.c+34−9

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

drivers/staging/rtl8712/xmit_linux.c+6−0

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

drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c+8−8

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

drivers/thermal/thermal_core.c+2−2

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

drivers/thermal/thermal_of.c+6−21

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

drivers/thunderbolt/tb.c+2−0

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

drivers/thunderbolt/tmu.c+3−1

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

drivers/tty/n_gsm.c+3−1

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

drivers/tty/serial/8250/8250_dwlib.c+4−2

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

drivers/tty/serial/qcom_geni_serial.c+0−7

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

drivers/tty/serial/sh-sci.c+1−1

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

drivers/tty/serial/sifive.c+1−1

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

drivers/tty/serial/ucc_uart.c+1−1

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

drivers/tty/tty_io.c+1−1

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

drivers/ufs/host/ufs-renesas.c+1−1

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

drivers/usb/cdns3/cdns3-gadget.c+3−1

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

drivers/usb/common/usb-conn-gpio.c+5−1

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

drivers/usb/core/quirks.c+4−0

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

drivers/usb/dwc3/core.c+2−18

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

drivers/usb/dwc3/core.h+0−3

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

drivers/usb/dwc3/dwc3-pci.c+4−2

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

drivers/usb/dwc3/gadget.c+8−1

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

drivers/usb/gadget/composite.c+4−0

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

drivers/usb/gadget/legacy/raw_gadget.c+6−4

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

drivers/usb/gadget/udc/core.c+9−1

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

drivers/usb/gadget/udc/tegra-xudc.c+4−4

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

drivers/usb/host/ohci-at91.c+7−1

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

drivers/usb/host/xhci-mtk.c+1−0

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

drivers/usb/host/xhci-pci.c+1−3

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

drivers/usb/host/xhci-ring.c+1−24

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

drivers/usb/host/xhci-tegra.c+4−4

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

drivers/usb/misc/ehset.c+4−4

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

drivers/usb/serial/option.c+6−0

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

drivers/usb/serial/usb-serial-simple.c+40−33

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

drivers/usb/storage/alauda.c+9−3

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

drivers/usb/typec/altmodes/displayport.c+17−1

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

drivers/usb/typec/class.c+8−7

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

drivers/usb/typec/mux/Kconfig+1−0

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

drivers/usb/typec/mux/nb7vpq904m.c+18−7

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

drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c+2−2

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

drivers/usb/typec/tcpm/tcpm.c+7−0

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

drivers/usb/typec/ucsi/ucsi.c+2−2

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

drivers/xen/events/events_base.c+5−11

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

drivers/xen/evtchn.c+26−9

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

drivers/xen/grant-table.c+29−11

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

drivers/xen/xenbus/xenbus_probe.c+3−0

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

fs/9p/fid.h+3−3

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

fs/9p/v9fs.c+0−2

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

fs/9p/v9fs.h+1−1

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

fs/9p/vfs_dir.c+3−2

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

fs/9p/vfs_file.c+1−4

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

fs/9p/vfs_inode.c+0−6

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

fs/9p/vfs_inode_dotl.c+0−1

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

fs/autofs/Kconfig+0−12

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

fs/btrfs/block-group.c+49−19

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

fs/btrfs/block-group.h+4−2

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

fs/btrfs/block-rsv.c+5−0

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

fs/btrfs/disk-io.c+18−2

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

fs/btrfs/extent-tree.c+4−1

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

fs/btrfs/extent_io.c+10−3

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

fs/btrfs/free-space-tree.c+17−7

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

fs/btrfs/inode.c+5−5

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

fs/btrfs/relocation.c+37−8

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

fs/btrfs/transaction.c+8−2

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

fs/btrfs/tree-checker.c+14−0

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

fs/btrfs/zoned.c+3−0

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

fs/ceph/dir.c+3−2

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

fs/ceph/mds_client.c+2−2

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

fs/ceph/mds_client.h+5−0

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

fs/ceph/metric.c+1−1

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

fs/ceph/super.c+10−0

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

fs/coda/dir.c+7−13

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

fs/erofs/super.c+0−2

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

fs/erofs/zdata.c+4−3

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

fs/exfat/balloc.c+3−3

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

fs/exfat/dir.c+21−18

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

fs/exportfs/expfs.c+1−1

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

fs/file.c+19−5

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

fs/gfs2/file.c+2−2

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

fs/gfs2/trans.c+10−4

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

fs/inode.c+0−3

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

fs/jfs/namei.c+2−1

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

fs/nfsd/nfs4state.c+0−2

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

fs/nfsd/vfs.c+6−3

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

fs/nilfs2/inode.c+8−0

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

fs/nilfs2/segment.c+2−0

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

fs/nilfs2/the_nilfs.h+2−0

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

fs/nls/nls_base.c+2−2

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

fs/ntfs/dir.c+2−1

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

fs/ocfs2/file.c+3−2

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

fs/open.c+1−1

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

fs/overlayfs/readdir.c+2−1

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

fs/overlayfs/super.c+1−1

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

fs/proc/base.c+1−1

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

fs/proc/kcore.c+27−3

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

fs/proc/vmcore.c+1−1

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

fs/readdir.c+52−16

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

fs/smb/client/cifsglob.h+1−0

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

fs/smb/client/cifssmb.c+1−2

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

fs/smb/client/connect.c+5−0

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

fs/smb/client/dfs.c+5−1

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

fs/smb/client/ioctl.c+5−0

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

fs/smb/client/misc.c+1−0

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

fs/smb/client/sess.c+3−1

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

fs/smb/client/smb2pdu.c+1−2

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

fs/smb/server/ksmbd_netlink.h+2−1

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

fs/smb/server/server.c+6−1

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

fs/smb/server/smb2misc.c+5−5

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

fs/smb/server/smb2pdu.c+37−19

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

fs/smb/server/smb_common.c+11−8

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

fs/smb/server/smb_common.h+1−1

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

fs/smb/server/vfs.c+37−28

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

fs/smb/server/vfs.h+2−2

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

fs/splice.c+2−0

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

fs/vboxsf/dir.c+2−1

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

fs/vboxsf/shfl_hostintf.h+3−3

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

fs/zonefs/file.c+3−108

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

fs/zonefs/super.c+1−8

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

fs/zonefs/zonefs.h+0−2

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

include/asm-generic/mshyperv.h+1−1

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

include/asm-generic/word-at-a-time.h+1−1

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

include/drm/drm_fb_helper.h+0−5

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

include/linux/bio.h+1−1

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

include/linux/blkdev.h+0−1

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

include/linux/cpu.h+4−0

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

include/linux/cpumask.h+6−2

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

include/linux/fs.h+7−1

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

include/linux/ftrace.h+0−4

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

include/linux/hyperv.h+0−3

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

include/linux/intel_rapl.h+10−4

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

include/linux/mm.h+23−6

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

include/linux/mm_types.h+28−0

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

include/linux/mmap_lock.h+8−2

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

include/linux/nls.h+1−1

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

include/linux/pm_wakeirq.h+0−10

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

include/linux/prefetch.h+1−6

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

include/linux/skmsg.h+1−0

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

include/linux/spi/corgi_lcd.h+2−0

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

include/linux/spi/spi-mem.h+4−0

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

include/linux/thermal.h+3−3

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

include/linux/tpm.h+1−0

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

include/net/cfg80211.h+3−0

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

include/net/gro.h+43−0

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

include/net/inet_sock.h+4−3

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

include/net/ip.h+1−1

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

include/net/ipv6.h+2−6

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

include/net/netfilter/nf_tables.h+45−75

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

include/net/route.h+2−2

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

include/net/vxlan.h+11−6

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

include/scsi/scsi_device.h+1−0

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

include/soc/tegra/mc.h+3−0

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

include/trace/events/tcp.h+4−1

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

include/uapi/linux/blkzoned.h+5−5

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

include/uapi/linux/if_packet.h+5−1

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

include/uapi/linux/pkt_cls.h+3−1

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

include/uapi/xen/evtchn.h+9−0

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

include/xen/events.h+10−1

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

io_uring/io_uring.c+20−6

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

io_uring/openclose.c+4−2

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

kernel/bpf/cpumap.c+21−14

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

kernel/kprobes.c+13−1

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

kernel/locking/rtmutex.c+114−56

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

kernel/locking/rtmutex_api.c+1−1

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

kernel/locking/rtmutex_common.h+34−13

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

kernel/locking/ww_mutex.h+6−6

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

kernel/power/hibernate.c+1−1

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

kernel/signal.c+4−0

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

kernel/trace/bpf_trace.c+12−5

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

kernel/trace/ring_buffer.c+13−12

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

kernel/trace/trace_events.c+4−10

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

kernel/trace/trace_events_synth.c+1−0

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

kernel/trace/trace_events_trigger.c+2−0

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

kernel/trace/trace_probe.c+4−4

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

kernel/trace/trace_seq.c+1−0

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

kernel/workqueue.c+42−1

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

lib/Kconfig.debug+1−1

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

lib/Makefile+6−0

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

lib/cpumask.c+4−1

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

lib/genalloc.c+1−1

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

lib/scatterlist.c+1−1

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

lib/test_bitmap.c+4−4

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

mm/compaction.c+5−3

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

mm/damon/core-test.h+5−5

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

mm/damon/core.c+1−0

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

mm/hugetlb.c+51−24

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

mm/ksm.c+2−0

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

mm/memory-failure.c+17−14

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

mm/memory.c+19−12

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

mm/mempolicy.c+14−1

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

mm/mmap.c+1−0

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

mm/pagewalk.c+4−1

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

mm/shmem.c+6−3

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

mm/swapfile.c+4−4

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

mm/zsmalloc.c+9−5

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

net/8021q/vlan.c+1−2

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

net/9p/client.c+12−34

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

net/9p/trans_virtio.c+4−4

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

net/can/raw.c+4−3

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

net/ceph/messenger.c+1−0

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

net/ceph/osd_client.c+14−6

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

net/core/bpf_sk_storage.c+4−1

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

net/core/filter.c+0−6

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

net/core/rtnetlink.c+6−2

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

net/core/skmsg.c+8−2

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

net/core/sock.c+41−30

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

net/core/sock_map.c+5−7

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

net/dcb/dcbnl.c+1−1

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

net/dccp/ipv6.c+2−2

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

net/dccp/output.c+1−1

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

net/dccp/proto.c+8−2

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

net/dsa/port.c+8−1

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

net/ipv4/inet_diag.c+2−2

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

net/ipv4/ip_output.c+13−4

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

net/ipv4/ip_sockglue.c+1−1

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

net/ipv4/ip_tunnel_core.c+1−1

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

net/ipv4/nexthop.c+7−21

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

net/ipv4/raw.c+1−1

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

net/ipv4/route.c+2−2

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

net/ipv4/tcp_ipv4.c+2−2

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

net/ipv4/tcp_metrics.c+44−26

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

net/ipv4/udp.c+6−2

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

net/ipv4/udp_offload.c+5−2

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

net/ipv6/addrconf.c+10−4

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

net/ipv6/ip6mr.c+1−1

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

net/ipv6/ndisc.c+2−1

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

net/ipv6/ping.c+1−1

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

net/ipv6/raw.c+3−3

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

net/ipv6/route.c+4−3

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

net/ipv6/tcp_ipv6.c+5−4

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

net/ipv6/udp.c+8−4

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

net/ipv6/udp_offload.c+5−2

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

net/l2tp/l2tp_ip6.c+1−1

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

net/mptcp/protocol.c+3−4

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

net/mptcp/protocol.h+0−1

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

net/mptcp/sockopt.c+1−1

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

net/mptcp/subflow.c+29−29

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

net/netfilter/nf_tables_api.c+247−65

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

net/netfilter/nft_immediate.c+18−9

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

net/netfilter/nft_set_hash.c+52−33

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

net/netfilter/nft_set_pipapo.c+48−18

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

net/netfilter/nft_set_rbtree.c+100−64

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

net/netfilter/nft_socket.c+1−1

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

net/netfilter/xt_socket.c+2−2

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

net/packet/af_packet.c+17−13

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

net/sched/cls_flower.c+3−2

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

net/sched/cls_fw.c+0−1

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

net/sched/cls_route.c+0−1

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

net/sched/cls_u32.c+50−7

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

net/sched/em_meta.c+2−2

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

net/sched/sch_mqprio.c+14−0

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

net/sched/sch_taprio.c+13−2

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

net/smc/af_smc.c+54−25

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

net/smc/smc.h+1−1

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

net/smc/smc_clc.c+2−2

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

net/smc/smc_core.c+12−13

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

net/smc/smc_sysctl.c+8−2

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

net/tipc/crypto.c+2−1

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

net/tipc/node.c+1−1

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

net/tls/tls_device.c+33−31

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

net/tls/tls_main.c+0−3

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

net/unix/af_unix.c+17−8

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

net/wireless/nl80211.c+4−1

This diff is large: its 13 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+2−1

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

net/xfrm/xfrm_policy.c+1−1

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

rust/Makefile+1−1

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

rust/bindings/bindings_helper.h+1−0

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

rust/kernel/allocator.rs+59−15

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

rust/kernel/sync/arc.rs+1−2

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

rust/kernel/types.rs+2−20

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

scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci+0−68

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

scripts/kallsyms.c+1−0

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

scripts/spelling.txt+0−1

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

security/keys/keyctl.c+8−3

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

security/keys/sysctl.c+1−1

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

sound/core/seq/seq_ump_client.c+1−2

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

sound/pci/hda/patch_realtek.c+2−0

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

sound/soc/atmel/atmel-i2s.c+4−1

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

sound/soc/codecs/da7219-aad.c+9−3

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

sound/soc/codecs/es8316.c+1−1

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

sound/soc/codecs/nau8821.c+41−0

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

sound/soc/codecs/rt5682-sdw.c+8−1

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

sound/soc/codecs/rt711-sdca-sdw.c+9−1

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

sound/soc/codecs/rt711-sdw.c+8−1

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

sound/soc/codecs/rt712-sdca-sdw.c+9−1

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

sound/soc/codecs/rt722-sdca-sdw.c+9−1

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

sound/soc/codecs/wm8904.c+3−0

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

sound/soc/fsl/fsl_spdif.c+2−0

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

sound/usb/mixer_maps.c+14−0

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

sound/usb/quirks.c+31−6

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

tools/arch/x86/include/asm/cpufeatures.h+1−1

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

tools/arch/x86/include/asm/msr-index.h+1−0

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

tools/counter/Makefile+2−1

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

tools/hv/vmbus_testing+2−2

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

tools/net/ynl/lib/ynl.py+8−8

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

tools/objtool/arch/x86/decode.c+4−1

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

tools/perf/arch/arm64/util/pmu.c+4−3

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

tools/perf/arch/powerpc/util/skip-callchain-idx.c+4−0

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

tools/perf/tests/parse-events.c+11−1

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

tools/perf/tests/shell/test_uprobe_from_different_cu.sh+7−1

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

tools/perf/util/machine.c+0−5

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

tools/perf/util/parse-events.c+36−22

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

tools/perf/util/pmu.c+11−0

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

tools/perf/util/pmu.h+1−0

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

tools/perf/util/pmus.c+7−9

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

tools/perf/util/stat-display.c+5−0

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

tools/testing/cxl/test/cxl.c+0−4

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

tools/testing/radix-tree/regression1.c+1−1

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

tools/testing/selftests/bpf/prog_tests/sockmap_listen.c+73−1

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

tools/testing/selftests/bpf/progs/test_sockmap_listen.c+14−0

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

tools/testing/selftests/cgroup/test_kmem.c+4−0

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

tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc+1−1

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

tools/testing/selftests/kvm/include/kvm_util_base.h+4−2

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

tools/testing/selftests/kvm/kvm_binary_stats_test.c+45−23

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

tools/testing/selftests/kvm/x86_64/set_sregs_test.c+39−31

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

tools/testing/selftests/mm/ksm_tests.c+1−0

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

tools/testing/selftests/net/fib_nexthops.sh+10−0

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

tools/testing/selftests/net/forwarding/bridge_mdb.sh+33−26

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

tools/testing/selftests/net/forwarding/bridge_mdb_max.sh+15−4

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

tools/testing/selftests/net/forwarding/ethtool.sh+2−0

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

tools/testing/selftests/net/forwarding/ethtool_extended_state.sh+2−0

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

tools/testing/selftests/net/forwarding/ethtool_mm.sh+13−5

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

tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh+2−0

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

tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh+2−0

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

tools/testing/selftests/net/forwarding/lib.sh+17−0

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

tools/testing/selftests/net/forwarding/settings+1−0

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

tools/testing/selftests/net/forwarding/tc_actions.sh+4−2

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

tools/testing/selftests/net/forwarding/tc_flower.sh+4−4

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

tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh+8−5

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

tools/testing/selftests/net/forwarding/tc_tunnel_key.sh+6−3

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

tools/testing/selftests/net/mptcp/mptcp_join.sh+5−5

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

tools/testing/selftests/net/pmtu.sh+35−0

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

tools/testing/selftests/net/so_incoming_cpu.c+1−1

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

tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c+0−2

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

tools/testing/selftests/rseq/Makefile+3−1

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

tools/testing/selftests/rseq/rseq.c+24−6

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

tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json+25−0

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

tools/testing/vsock/Makefile+1−1

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

virt/kvm/kvm_main.c+24−0

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t