History

Merge drm/drm-next into drm-xe-next

Sync drm-xe-next with drm-next to unblock some topic branches.

Rodrigo Vivi committed 7 months ago

Commit af35e742 parents 5150b57 45164322283 files · +50956 −20795Browse files

Unified · Split

2283 files
  1. .get_maintainer.ignore +1 −0
  2. .mailmap +6 −1
  3. Documentation/ABI/testing/sysfs-block-zram +2 −2
  4. Documentation/PCI/pcieaer-howto.rst +10 −0
  5. Documentation/admin-guide/blockdev/zram.rst +3 −3
  6. Documentation/admin-guide/kernel-parameters.txt +3 −0
  7. Documentation/core-api/dma-attributes.rst +30 −8
  8. Documentation/dev-tools/kunit/run_wrapper.rst +2 −0
  9. Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml +1 −1
  10. Documentation/devicetree/bindings/connector/usb-connector.yaml +1 −0
  11. Documentation/devicetree/bindings/display/arm,komeda.yaml +3 −1
  12. Documentation/devicetree/bindings/display/bridge/lontium,lt8713sx.yaml +113 −0
  13. Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml +1 −0
  14. Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml +1 −0
  15. Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml +3 −1
  16. Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml +1 −0
  17. Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml +1 −0
  18. Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml +1 −0
  19. Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml +1 −0
  20. Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml +3 −1
  21. Documentation/devicetree/bindings/display/msm/dp-controller.yaml +21 −1
  22. Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +5 −0
  23. Documentation/devicetree/bindings/display/msm/gmu.yaml +1 −0
  24. Documentation/devicetree/bindings/display/msm/gpu.yaml +0 −7
  25. Documentation/devicetree/bindings/display/msm/qcom,eliza-mdss.yaml +494 −0
  26. Documentation/devicetree/bindings/display/msm/qcom,glymur-mdss.yaml +10 −6
  27. Documentation/devicetree/bindings/display/msm/qcom,sc8280xp-mdss.yaml +30 −0
  28. Documentation/devicetree/bindings/display/msm/qcom,sm8650-dpu.yaml +1 −0
  29. Documentation/devicetree/bindings/display/msm/qcom,sm8750-mdss.yaml +1 −1
  30. Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml +0 −1
  31. Documentation/devicetree/bindings/display/panel/himax,hx83102.yaml +2 −0
  32. Documentation/devicetree/bindings/display/panel/himax,hx83121a.yaml +91 −0
  33. Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml +0 −3
  34. Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml +36 −2
  35. Documentation/devicetree/bindings/display/panel/leadtek,ltk050h3146w.yaml +1 −0
  36. Documentation/devicetree/bindings/display/panel/leadtek,ltk500hd1829.yaml +1 −0
  37. Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml +2 −3
  38. Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml +2 −1
  39. Documentation/devicetree/bindings/display/panel/panel-lvds.yaml +4 −0
  40. Documentation/devicetree/bindings/display/panel/panel-simple.yaml +4 −0
  41. Documentation/devicetree/bindings/display/panel/renesas,r61307.yaml +1 −2
  42. Documentation/devicetree/bindings/display/panel/renesas,r69328.yaml +0 −1
  43. Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +2 −3
  44. Documentation/devicetree/bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml +4 −1
  45. Documentation/devicetree/bindings/display/panel/sony,tulip-truly-nt35521.yaml +0 −2
  46. Documentation/devicetree/bindings/display/panel/startek,kd070fhfid015.yaml +2 −5
  47. Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml +2 −2
  48. Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml +1 −1
  49. Documentation/devicetree/bindings/mtd/st,spear600-smi.yaml +19 −7
  50. Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml +1 −0
  51. Documentation/devicetree/bindings/phy/qcom,dsi-phy-10nm.yaml +2 −2
  52. Documentation/devicetree/bindings/phy/qcom,dsi-phy-14nm.yaml +2 −2
  53. Documentation/devicetree/bindings/phy/qcom,dsi-phy-20nm.yaml +2 −2
  54. Documentation/devicetree/bindings/phy/qcom,dsi-phy-28nm.yaml +2 −2
  55. Documentation/devicetree/bindings/phy/qcom,dsi-phy-7nm.yaml +7 −2
  56. Documentation/devicetree/bindings/phy/qcom,dsi-phy-common.yaml +1 −1
  57. Documentation/devicetree/bindings/powerpc/fsl/fsl,mpc83xx.yaml +93 −0
  58. Documentation/devicetree/bindings/regulator/regulator.yaml +2 −2
  59. Documentation/devicetree/bindings/sound/rockchip-spdif.yaml +1 −0
  60. Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +1 −1
  61. Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml +24 −5
  62. Documentation/devicetree/bindings/vendor-prefixes.yaml +6 −0
  63. Documentation/driver-api/driver-model/binding.rst +48 −0
  64. Documentation/filesystems/overlayfs.rst +50 −0
  65. Documentation/filesystems/proc.rst +8 −0
  66. Documentation/gpu/drm-kms-helpers.rst +0 −12
  67. Documentation/gpu/drm-uapi.rst +8 −8
  68. Documentation/gpu/introduction.rst +0 −6
  69. Documentation/gpu/nova/core/todo.rst +0 −76
  70. Documentation/gpu/todo.rst +32 −0
  71. Documentation/hwmon/adm1177.rst +4 −4
  72. Documentation/hwmon/peci-cputemp.rst +6 −4
  73. Documentation/netlink/specs/net_shaper.yaml +6 −6
  74. Documentation/process/security-bugs.rst +139 −15
  75. Documentation/scheduler/sched-ext.rst +27 −3
  76. Documentation/userspace-api/landlock.rst +19 −4
  77. Documentation/virt/kvm/api.rst +117 −109
  78. Documentation/virt/kvm/locking.rst +2 −0
  79. MAINTAINERS +72 −28
  80. Makefile +6 −2
  81. arch/arm/configs/multi_v7_defconfig +0 −1
  82. arch/arm64/Kconfig +1 −0
  83. arch/arm64/boot/dts/renesas/r8a78000.dtsi +8 −8
  84. arch/arm64/boot/dts/renesas/r9a09g057.dtsi +0 −30
  85. arch/arm64/boot/dts/renesas/r9a09g077.dtsi +2 −2
  86. arch/arm64/boot/dts/renesas/r9a09g087.dtsi +2 −2
  87. arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi +1 −1
  88. arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi +1 −0
  89. arch/arm64/boot/dts/renesas/rzv2-evk-cn15-sd.dtso +1 −0
  90. arch/arm64/crypto/aes-neonbs-glue.c +23 −14
  91. arch/arm64/include/asm/kvm_host.h +3 −0
  92. arch/arm64/include/asm/static_call.h +31 −0
  93. arch/arm64/kernel/Makefile +1 −0
  94. arch/arm64/kernel/cpufeature.c +9 −0
  95. arch/arm64/kernel/pi/patch-scs.c +8 −0
  96. arch/arm64/kernel/rsi.c +2 −1
  97. arch/arm64/kernel/static_call.c +23 −0
  98. arch/arm64/kernel/vmlinux.lds.S +1 −0
  99. arch/arm64/kvm/at.c +1 −3
  100. arch/arm64/kvm/guest.c +2 −2
  101. arch/arm64/kvm/hyp/nvhe/mem_protect.c +1 −1
  102. arch/arm64/kvm/mmu.c +9 −5
  103. arch/arm64/kvm/nested.c +16 −11
  104. arch/arm64/kvm/reset.c +14 −0
  105. arch/arm64/kvm/vgic/vgic-init.c +16 −16
  106. arch/arm64/kvm/vgic/vgic-v2.c +2 −2
  107. arch/arm64/kvm/vgic/vgic-v3.c +6 −6
  108. arch/arm64/kvm/vgic/vgic.c +6 −0
  109. arch/loongarch/Kconfig +3 −0
  110. arch/loongarch/include/asm/cmpxchg.h +5 −0
  111. arch/loongarch/include/asm/linkage.h +36 −0
  112. arch/loongarch/include/asm/sigframe.h +9 −0
  113. arch/loongarch/include/asm/uaccess.h +12 −2
  114. arch/loongarch/kernel/asm-offsets.c +2 −0
  115. arch/loongarch/kernel/env.c +3 −4
  116. arch/loongarch/kernel/inst.c +25 −6
  117. arch/loongarch/kernel/signal.c +1 −5
  118. arch/loongarch/kvm/intc/eiointc.c +8 −8
  119. arch/loongarch/kvm/vcpu.c +4 −1
  120. arch/loongarch/kvm/vm.c +3 −3
  121. arch/loongarch/net/bpf_jit.c +11 −0
  122. arch/loongarch/pci/pci.c +80 −0
  123. arch/loongarch/vdso/Makefile +2 −2
  124. arch/loongarch/vdso/sigreturn.S +3 −3
  125. arch/mips/include/asm/cpu-features.h +0 −1
  126. arch/mips/include/asm/cpu-info.h +0 −2
  127. arch/mips/include/asm/mipsregs.h +2 −0
  128. arch/mips/kernel/cpu-probe.c +8 −5
  129. arch/mips/kernel/cpu-r3k-probe.c +2 −0
  130. arch/mips/kvm/mips.c +2 −2
  131. arch/mips/lib/multi3.c +3 −3
  132. arch/mips/loongson64/env.c +17 −1
  133. arch/mips/mm/cache.c +2 −1
  134. arch/mips/mm/tlb-r4k.c +230 −55
  135. arch/mips/ralink/clk.c +4 −4
  136. arch/parisc/kernel/cache.c +2 −2
  137. arch/powerpc/Kconfig +2 −2
  138. arch/powerpc/boot/dts/asp834x-redboot.dts +1 −1
  139. arch/powerpc/boot/dts/fsl/interlaken-lac-portals.dtsi +0 −156
  140. arch/powerpc/boot/dts/fsl/interlaken-lac.dtsi +0 −45
  141. arch/powerpc/boot/dts/fsl/pq3-mpic-message-B.dtsi +0 −43
  142. arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi +0 −80
  143. arch/powerpc/boot/dts/mpc8308_p1m.dts +1 −1
  144. arch/powerpc/boot/dts/mpc8308rdb.dts +1 −1
  145. arch/powerpc/boot/dts/mpc8313erdb.dts +35 −26
  146. arch/powerpc/boot/dts/mpc8315erdb.dts +64 −55
  147. arch/powerpc/boot/dts/mpc832x_rdb.dts +1 −1
  148. arch/powerpc/boot/dts/mpc8349emitx.dts +1 −1
  149. arch/powerpc/boot/dts/mpc8349emitxgp.dts +1 −1
  150. arch/powerpc/boot/dts/mpc8377_rdb.dts +1 −1
  151. arch/powerpc/boot/dts/mpc8377_wlan.dts +1 −1
  152. arch/powerpc/boot/dts/mpc8378_rdb.dts +1 −1
  153. arch/powerpc/boot/dts/mpc8379_rdb.dts +1 −1
  154. arch/powerpc/include/asm/nohash/32/pgtable.h +1 −3
  155. arch/powerpc/include/asm/nohash/32/pte-85xx.h +0 −59
  156. arch/powerpc/include/asm/pgtable-types.h +1 −1
  157. arch/powerpc/include/asm/uaccess.h +46 −21
  158. arch/powerpc/kernel/dma-iommu.c +2 −2
  159. arch/powerpc/kernel/head_85xx.S +1 −45
  160. arch/powerpc/kernel/iommu.c +1 −1
  161. arch/powerpc/kernel/prom_init.c +2 −1
  162. arch/powerpc/kernel/setup-common.c +0 −10
  163. arch/powerpc/kernel/trace/ftrace.c +22 −4
  164. arch/powerpc/kexec/core.c +9 −8
  165. arch/powerpc/kexec/file_load_64.c +13 −1
  166. arch/powerpc/kvm/book3s.c +2 −2
  167. arch/powerpc/kvm/booke.c +2 −2
  168. arch/powerpc/kvm/e500.h +1 −5
  169. arch/powerpc/kvm/e500_mmu.c +2 −2
  170. arch/powerpc/kvm/e500_mmu_host.c +44 −47
  171. arch/powerpc/lib/copyuser_64.S +1 −0
  172. arch/powerpc/lib/copyuser_power7.S +15 −30
  173. arch/powerpc/lib/vmx-helper.c +2 −0
  174. arch/powerpc/mm/mem.c +14 −0
  175. arch/powerpc/net/bpf_jit.h +0 −5
  176. arch/powerpc/net/bpf_jit_comp.c +56 −71
  177. arch/powerpc/net/bpf_jit_comp64.c +143 −38
  178. arch/powerpc/perf/callchain.c +5 −0
  179. arch/powerpc/perf/callchain_32.c +0 −1
  180. arch/powerpc/perf/callchain_64.c +0 −1
  181. arch/powerpc/platforms/83xx/km83xx.c +2 −2
  182. arch/powerpc/platforms/Kconfig.cputype +2 −2
  183. arch/powerpc/platforms/pseries/msi.c +1 −1
  184. arch/powerpc/tools/check-fpatchable-function-entry.sh +0 −0
  185. arch/powerpc/tools/ftrace-gen-ool-stubs.sh +2 −2
  186. arch/riscv/boot/dts/microchip/mpfs.dtsi +2 −0
  187. arch/riscv/include/asm/runtime-const.h +4 −0
  188. arch/riscv/include/uapi/asm/ptrace.h +7 −6
  189. arch/riscv/kernel/kgdb.c +4 −3
  190. arch/riscv/kernel/patch.c +11 −10
  191. arch/riscv/kernel/process.c +3 −1
  192. arch/riscv/kvm/aia.c +13 −2
  193. arch/riscv/kvm/aia_aplic.c +12 −11
  194. arch/riscv/kvm/aia_device.c +14 −4
  195. arch/riscv/kvm/aia_imsic.c +4 −0
  196. arch/riscv/kvm/mmu.c +5 −1
  197. arch/riscv/kvm/vcpu.c +1 −1
  198. arch/riscv/kvm/vcpu_fp.c +13 −4
  199. arch/riscv/kvm/vcpu_onereg.c +36 −18
  200. arch/riscv/kvm/vcpu_pmu.c +12 −4
  201. arch/riscv/kvm/vm.c +1 −1
  202. arch/s390/include/asm/barrier.h +2 −2
  203. arch/s390/include/asm/kvm_host.h +3 −0
  204. arch/s390/include/asm/stacktrace.h +1 −1
  205. arch/s390/kernel/asm-offsets.c +1 −1
  206. arch/s390/kernel/entry.S +5 −2
  207. arch/s390/kernel/irq.c +8 −6
  208. arch/s390/kernel/nmi.c +2 −2
  209. arch/s390/kernel/perf_cpum_sf.c +5 −1
  210. arch/s390/kernel/syscall.c +4 −1
  211. arch/s390/kvm/dat.c +15 −85
  212. arch/s390/kvm/dat.h +12 −11
  213. arch/s390/kvm/gaccess.c +55 −22
  214. arch/s390/kvm/gmap.c +114 −46
  215. arch/s390/kvm/gmap.h +21 −12
  216. arch/s390/kvm/interrupt.c +18 −0
  217. arch/s390/kvm/kvm-s390.c +25 −13
  218. arch/s390/kvm/vsie.c +8 −4
  219. arch/s390/mm/fault.c +9 −2
  220. arch/sh/drivers/platform_early.c +0 −4
  221. arch/x86/coco/sev/noinstr.c +6 −0
  222. arch/x86/entry/entry_fred.c +14 −0
  223. arch/x86/entry/vdso/common/vclock_gettime.c +1 −1
  224. arch/x86/events/core.c +5 −2
  225. arch/x86/events/intel/core.c +25 −12
  226. arch/x86/events/intel/ds.c +7 −4
  227. arch/x86/hyperv/hv_crash.c +52 −48
  228. arch/x86/include/asm/kvm_host.h +2 −1
  229. arch/x86/include/uapi/asm/kvm.h +1 −0
  230. arch/x86/kernel/Makefile +14 −0
  231. arch/x86/kernel/apic/apic.c +6 −0
  232. arch/x86/kernel/apic/x2apic_uv_x.c +16 −2
  233. arch/x86/kernel/cpu/common.c +26 −7
  234. arch/x86/kernel/cpu/mce/amd.c +11 −6
  235. arch/x86/kernel/cpu/mshyperv.c +3 −2
  236. arch/x86/kvm/cpuid.c +4 −1
  237. arch/x86/kvm/hyperv.c +5 −4
  238. arch/x86/kvm/ioapic.c +2 −1
  239. arch/x86/kvm/mmu/mmu.c +10 −7
  240. arch/x86/kvm/svm/avic.c +6 −3
  241. arch/x86/kvm/svm/nested.c +10 −2
  242. arch/x86/kvm/svm/svm.c +11 −6
  243. arch/x86/kvm/svm/svm.h +1 −0
  244. arch/x86/kvm/vmx/nested.c +45 −16
  245. arch/x86/kvm/vmx/nested.h +1 −0
  246. arch/x86/kvm/vmx/vmx.c +7 −3
  247. arch/x86/kvm/x86.c +2 −2
  248. arch/x86/mm/Makefile +2 −0
  249. arch/x86/platform/efi/quirks.c +1 −1
  250. arch/x86/platform/geode/geode-common.c +18 −6
  251. crypto/af_alg.c +13 −40
  252. crypto/algif_aead.c +19 −81
  253. crypto/algif_skcipher.c +3 −3
  254. crypto/authencesn.c +29 −19
  255. crypto/deflate.c +7 −4
  256. drivers/accel/amdxdna/Makefile +1 −0
  257. drivers/accel/amdxdna/aie2_ctx.c +85 −24
  258. drivers/accel/amdxdna/aie2_error.c +2 −3
  259. drivers/accel/amdxdna/aie2_message.c +115 −24
  260. drivers/accel/amdxdna/aie2_msg_priv.h +52 −0
  261. drivers/accel/amdxdna/aie2_pci.c +18 −0
  262. drivers/accel/amdxdna/aie2_pci.h +7 −3
  263. drivers/accel/amdxdna/amdxdna_ctx.c +32 −7
  264. drivers/accel/amdxdna/amdxdna_ctx.h +29 −4
  265. drivers/accel/amdxdna/amdxdna_gem.c +323 −192
  266. drivers/accel/amdxdna/amdxdna_gem.h +28 −11
  267. drivers/accel/amdxdna/amdxdna_iommu.c +184 −0
  268. drivers/accel/amdxdna/amdxdna_mailbox.c +1 −1
  269. drivers/accel/amdxdna/amdxdna_pci_drv.c +36 −19
  270. drivers/accel/amdxdna/amdxdna_pci_drv.h +28 −0
  271. drivers/accel/amdxdna/amdxdna_ubuf.c +4 −13
  272. drivers/accel/amdxdna/amdxdna_ubuf.h +0 −5
  273. drivers/accel/amdxdna/npu4_regs.c +2 −1
  274. drivers/accel/ivpu/ivpu_debugfs.c +12 −2
  275. drivers/accel/ivpu/ivpu_drv.c +1 −0
  276. drivers/accel/ivpu/ivpu_drv.h +3 −1
  277. drivers/accel/ivpu/ivpu_hw.c +4 −2
  278. drivers/accel/ivpu/ivpu_job.c +48 −2
  279. drivers/accel/ivpu/ivpu_jsm_msg.c +15 −4
  280. drivers/accel/ivpu/ivpu_jsm_msg.h +2 −1
  281. drivers/accel/ivpu/ivpu_mmu.c +2 −1
  282. drivers/accel/ivpu/ivpu_pm.c +9 −6
  283. drivers/accel/ivpu/ivpu_pm.h +1 −0
  284. drivers/accel/qaic/qaic_control.c +45 −2
  285. drivers/acpi/Kconfig +1 −0
  286. drivers/acpi/acpi_platform.c +1 −1
  287. drivers/acpi/acpi_processor.c +8 −7
  288. drivers/acpi/acpi_video.c +22 −23
  289. drivers/acpi/acpica/acpredef.h +1 −1
  290. drivers/acpi/bus.c +0 −3
  291. drivers/acpi/ec.c +2 −0
  292. drivers/acpi/osl.c +1 −1
  293. drivers/acpi/riscv/rimt.c +7 −0
  294. drivers/acpi/scan.c +45 −0
  295. drivers/android/binder/page_range.rs +66 −20
  296. drivers/android/binder/process.rs +2 −1
  297. drivers/android/binder/range_alloc/array.rs +33 −2
  298. drivers/android/binder/range_alloc/mod.rs +2 −2
  299. drivers/android/binder/range_alloc/tree.rs +9 −9
  300. drivers/android/binder/rust_binder_main.rs +1 −1
  301. drivers/android/binder/thread.rs +6 −11
  302. drivers/ata/libata-core.c +3 −0
  303. drivers/ata/libata-scsi.c +1 −1
  304. drivers/auxdisplay/lcd2s.c +12 −3
  305. drivers/auxdisplay/line-display.c +1 −1
  306. drivers/base/bus.c +42 −1
  307. drivers/base/core.c +2 −0
  308. drivers/base/dd.c +60 −0
  309. drivers/base/node.c +5 −0
  310. drivers/base/platform.c +5 −32
  311. drivers/base/power/runtime.c +1 −0
  312. drivers/base/regmap/regmap.c +26 −4
  313. drivers/block/ublk_drv.c +12 −4
  314. drivers/block/zram/zram_drv.c +24 −35
  315. drivers/block/zram/zram_drv.h +1 −1
  316. drivers/bluetooth/btintel.c +8 −3
  317. drivers/bluetooth/btqca.c +2 −0
  318. drivers/bluetooth/btusb.c +4 −1
  319. drivers/bluetooth/hci_h4.c +0 −3
  320. drivers/bluetooth/hci_ll.c +2 −0
  321. drivers/bus/simple-pm-bus.c +2 −2
  322. drivers/cache/ax45mp_cache.c +2 −2
  323. drivers/cache/starfive_starlink_cache.c +2 −2
  324. drivers/clk/imx/clk-scu.c +1 −2
  325. drivers/comedi/comedi_fops.c +5 −3
  326. drivers/comedi/drivers.c +8 −0
  327. drivers/comedi/drivers/dt2815.c +12 −0
  328. drivers/comedi/drivers/me4000.c +12 −4
  329. drivers/comedi/drivers/me_daq.c +19 −16
  330. drivers/comedi/drivers/ni_atmio16d.c +2 −1
  331. drivers/counter/rz-mtu3-cnt.c +35 −32
  332. drivers/cpufreq/cpufreq.c +3 −6
  333. drivers/cpufreq/cpufreq_conservative.c +12 −0
  334. drivers/cpufreq/cpufreq_governor.c +6 −3
  335. drivers/cpufreq/cpufreq_governor.h +1 −0
  336. drivers/cpufreq/freq_table.c +4 −0
  337. drivers/cpuidle/cpuidle.c +0 −10
  338. drivers/crypto/caam/caamalg_qi2.c +2 −1
  339. drivers/crypto/caam/caamhash.c +2 −1
  340. drivers/crypto/ccp/sev-dev.c +1 −3
  341. drivers/crypto/padlock-sha.c +7 −0
  342. drivers/crypto/tegra/tegra-se-aes.c +7 −4
  343. drivers/crypto/tegra/tegra-se-hash.c +17 −13
  344. drivers/cxl/Kconfig +1 −0
  345. drivers/cxl/core/hdm.c +9 −16
  346. drivers/cxl/core/mbox.c +1 −1
  347. drivers/cxl/core/port.c +6 −2
  348. drivers/cxl/core/region.c +3 −1
  349. drivers/cxl/pmem.c +1 −1
  350. drivers/dma/dw-edma/dw-edma-core.c +6 −2
  351. drivers/dma/dw-edma/dw-hdma-v0-core.c +3 −3
  352. drivers/dma/fsl-edma-main.c +11 −15
  353. drivers/dma/idxd/cdev.c +4 −4
  354. drivers/dma/idxd/device.c +31 −14
  355. drivers/dma/idxd/dma.c +18 −0
  356. drivers/dma/idxd/idxd.h +1 −0
  357. drivers/dma/idxd/init.c +7 −7
  358. drivers/dma/idxd/irq.c +16 −0
  359. drivers/dma/idxd/submit.c +1 −1
  360. drivers/dma/idxd/sysfs.c +1 −0
  361. drivers/dma/sh/rz-dmac.c +36 −30
  362. drivers/dma/xilinx/xdma.c +2 −2
  363. drivers/dma/xilinx/xilinx_dma.c +30 −16
  364. drivers/firewire/net.c +3 −2
  365. drivers/firmware/arm_ffa/driver.c +4 −4
  366. drivers/firmware/arm_scmi/notify.c +2 −2
  367. drivers/firmware/arm_scmi/protocols.h +2 −2
  368. drivers/firmware/arm_scpi.c +3 −2
  369. drivers/firmware/cirrus/cs_dsp.c +18 −6
  370. drivers/firmware/stratix10-rsu.c +2 −0
  371. drivers/firmware/stratix10-svc.c +126 −102
  372. drivers/gpib/Kconfig +1 −0
  373. drivers/gpib/common/gpib_os.c +73 −23
  374. drivers/gpib/include/gpib_types.h +8 −0
  375. drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +6 −5
  376. drivers/gpio/gpio-mxc.c +9 −1
  377. drivers/gpio/gpio-qixis-fpga.c +2 −2
  378. drivers/gpio/gpiolib-shared.c +41 −16
  379. drivers/gpio/gpiolib-shared.h +7 −4
  380. drivers/gpio/gpiolib.c +55 −58
  381. drivers/gpu/drm/Kconfig +7 −0
  382. drivers/gpu/drm/Kconfig.debug +0 −1
  383. drivers/gpu/drm/amd/amdgpu/Makefile +2 −0
  384. drivers/gpu/drm/amd/amdgpu/amdgpu.h +7 −0
  385. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +2 −2
  386. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c +1 −1
  387. drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +245 −214
  388. drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +4 −0
  389. drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +4 −0
  390. drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +2 −0
  391. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +9 −3
  392. drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +112 −0
  393. drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +95 −13
  394. drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h +8 −0
  395. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +29 −5
  396. drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +48 −24
  397. drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h +1 −1
  398. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +12 −6
  399. drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c +92 −145
  400. drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h +29 −26
  401. drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +1 −1
  402. drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 −0
  403. drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +44 −0
  404. drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h +2 −0
  405. drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +46 −52
  406. drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 −0
  407. drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +33 −6
  408. drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +2 −0
  409. drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +35 −13
  410. drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h +1 −0
  411. drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 −4
  412. drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.h +26 −0
  413. drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +5 −0
  414. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 −1
  415. drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +6 −1
  416. drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +8 −0
  417. drivers/gpu/drm/amd/amdgpu/amdgpu_reg_access.c +0 −1
  418. drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +1 −3
  419. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +85 −46
  420. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +7 −2
  421. drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 −1
  422. drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +11 −0
  423. drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h +3 −0
  424. drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +49 −61
  425. drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h +2 −2
  426. drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +336 −270
  427. drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 −2
  428. drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 −7
  429. drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +2 −4
  430. drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +115 −73
  431. drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +9 −10
  432. drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +4 −0
  433. drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +6 −6
  434. drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 −1
  435. drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +15 −1
  436. drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +49 −31
  437. drivers/gpu/drm/amd/amdgpu/gfx_v12_1_pkt.h +101 −122
  438. drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c +83 −110
  439. drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 −1
  440. drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1 −1
  441. drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +61 −17
  442. drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +20 −9
  443. drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +81 −55
  444. drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c +2 −2
  445. drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c +840 −0
  446. drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.h +111 −0
  447. drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +12 −4
  448. drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +352 −40
  449. drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +29 −17
  450. drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +6 −11
  451. drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c +6 −10
  452. drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c +6 −11
  453. drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c +6 −3
  454. drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c +31 −24
  455. drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c +6 −9
  456. drivers/gpu/drm/amd/amdgpu/mmhub_v4_2_0.c +116 −78
  457. drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +2 −1
  458. drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c +15 −6
  459. drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +68 −1
  460. drivers/gpu/drm/amd/amdgpu/soc_v1_0.h +2 −0
  461. drivers/gpu/drm/amd/amdgpu/umc_v12_0.c +80 −33
  462. drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +5 −0
  463. drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +18 −1
  464. drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c +1219 −0
  465. drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.h +29 −0
  466. drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c +3 −3
  467. drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +3 −3
  468. drivers/gpu/drm/amd/amdkfd/kfd_events.c +8 −4
  469. drivers/gpu/drm/amd/amdkfd/kfd_events.h +2 −1
  470. drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c +3 −3
  471. drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c +3 −3
  472. drivers/gpu/drm/amd/amdkfd/kfd_int_process_v12_1.c +30 −16
  473. drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +3 −3
  474. drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +1 −1
  475. drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +15 −8
  476. drivers/gpu/drm/amd/amdkfd/kfd_priv.h +3 −3
  477. drivers/gpu/drm/amd/amdkfd/kfd_process.c +2 −1
  478. drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +2 −1
  479. drivers/gpu/drm/amd/amdkfd/kfd_queue.c +6 −5
  480. drivers/gpu/drm/amd/amdkfd/kfd_svm.c +18 −15
  481. drivers/gpu/drm/amd/display/amdgpu_dm/Makefile +2 −1
  482. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +113 −59
  483. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +22 −0
  484. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c +3 −3
  485. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +0 −7
  486. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h +0 −1
  487. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +53 −37
  488. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h +6 −0
  489. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +52 −0
  490. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_ism.c +598 −0
  491. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_ism.h +151 −0
  492. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +3 −1
  493. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +22 −11
  494. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h +63 −0
  495. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c +2 −4
  496. drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c +22 −3
  497. drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h +16 −1
  498. drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c +4 −4
  499. drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c +1 −0
  500. drivers/gpu/drm/amd/display/dc/basics/vector.c +1 −0
  501. drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +2 −1
  502. drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +9 −0
  503. drivers/gpu/drm/amd/display/dc/bios/command_table2.c +2 −0
  504. drivers/gpu/drm/amd/display/dc/bios/dce110/command_table_helper_dce110.c +1 −0
  505. drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper2_dce112.c +1 −0
  506. drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper_dce112.c +1 −0
  507. drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +7 −6
  508. drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +1 −1
  509. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +2 −1
  510. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +1 −2
  511. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c +4 −3
  512. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +7 −3
  513. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c +5 −1
  514. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +7 −3
  515. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c +7 −3
  516. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +2 −2
  517. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +4 −3
  518. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c +3 −0
  519. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +155 −137
  520. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h +8 −1
  521. drivers/gpu/drm/amd/display/dc/core/dc.c +109 −34
  522. drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +1 −0
  523. drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c +2 −2
  524. drivers/gpu/drm/amd/display/dc/core/dc_resource.c +10 −3
  525. drivers/gpu/drm/amd/display/dc/core/dc_state.c +57 −20
  526. drivers/gpu/drm/amd/display/dc/core/dc_stream.c +15 −28
  527. drivers/gpu/drm/amd/display/dc/core/dc_surface.c +1 −0
  528. drivers/gpu/drm/amd/display/dc/dc.h +15 −3
  529. drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +36 −2
  530. drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +9 −0
  531. drivers/gpu/drm/amd/display/dc/dc_helper.c +1 −0
  532. drivers/gpu/drm/amd/display/dc/dc_hw_types.h +5 −1
  533. drivers/gpu/drm/amd/display/dc/dc_spl_translate.c +2 −1
  534. drivers/gpu/drm/amd/display/dc/dc_types.h +6 −2
  535. drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c +2 −0
  536. drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c +1 −0
  537. drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c +2 −0
  538. drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c +4 −4
  539. drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c +1 −0
  540. drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.h +1 −0
  541. drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +1 −0
  542. drivers/gpu/drm/amd/display/dc/dce/dce_audio.c +3 −0
  543. drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +7 −3
  544. drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +1 −0
  545. drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c +1 −0
  546. drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c +2 −0
  547. drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c +3 −0
  548. drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c +1 −0
  549. drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +63 −2
  550. drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c +4 −0
  551. drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +1 −0
  552. drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +4 −0
  553. drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +2 −0
  554. drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c +2 −2
  555. drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c +1 −0
  556. drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +1 −1
  557. drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +1 −0
  558. drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c +10 −0
  559. drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c +1 −0
  560. drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c +2 −0
  561. drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c +9 −0
  562. drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c +9 −0
  563. drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c +6 −0
  564. drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c +1 −0
  565. drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c +7 −0
  566. drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c +6 −0
  567. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +4 −4
  568. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c +2 −0
  569. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c +2 −2
  570. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c +2 −2
  571. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c +1 −0
  572. drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c +2 −0
  573. drivers/gpu/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c +2 −0
  574. drivers/gpu/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c +2 −0
  575. drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c +1 −0
  576. drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c +3 −0
  577. drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.c +53 −12
  578. drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c +79 −32
  579. drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c +1 −0
  580. drivers/gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c +1 −1
  581. drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +2 −1
  582. drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c +4 −0
  583. drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c +5 −0
  584. drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c +5 −0
  585. drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c +5 −0
  586. drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +20 −1
  587. drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c +5 −0
  588. drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c +2 −0
  589. drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +23 −0
  590. drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c +5 −0
  591. drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c +24 −0
  592. drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c +8 −0
  593. drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +1 −5
  594. drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +24 −0
  595. drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +8 −0
  596. drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +2 −0
  597. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +26 −3
  598. drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +2 −6
  599. drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +1 −6
  600. drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c +1 −0
  601. drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_helpers.c +14 −0
  602. drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c +3 −0
  603. drivers/gpu/drm/amd/display/dc/dml2_0/Makefile +22 −52
  604. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +25 −14
  605. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c +11 −4
  606. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c +6 −374
  607. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h +0 −30
  608. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c +381 −0
  609. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h +60 −0
  610. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h +1 −0
  611. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +1 −0
  612. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +38 −16
  613. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +20 −0
  614. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c +6 −3
  615. drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c +6 −3
  616. drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c +18 −12
  617. drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.c +2 −1
  618. drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c +6 −6
  619. drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c +2 −1
  620. drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +16 −7
  621. drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper_fpu.c +3 −6
  622. drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +1 −0
  623. drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c +2 −2
  624. drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c +9 −2
  625. drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c +1 −0
  626. drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +1 −0
  627. drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c +1 −0
  628. drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c +5 −0
  629. drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c +2 −2
  630. drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c +5 −0
  631. drivers/gpu/drm/amd/display/dc/dsc/dsc.h +5 −0
  632. drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c +1 −0
  633. drivers/gpu/drm/amd/display/dc/gpio/dcn42/hw_translate_dcn42.c +1 −0
  634. drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 −0
  635. drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c +1 −0
  636. drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 −0
  637. drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c +1 −0
  638. drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c +1 −0
  639. drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c +4 −0
  640. drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c +51 −14
  641. drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c +2 −0
  642. drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c +2 −0
  643. drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c +2 −0
  644. drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c +1 −0
  645. drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +7 −3
  646. drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.c +35 −1
  647. drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.h +6 −0
  648. drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +31 −9
  649. drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c +4 −0
  650. drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +22 −1
  651. drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +11 −2
  652. drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +4 −1
  653. drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.c +11 −0
  654. drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +3 −1
  655. drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c +1 −0
  656. drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +14 −7
  657. drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +4 −2
  658. drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +20 −8
  659. drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c +23 −10
  660. drivers/gpu/drm/amd/display/dc/inc/core_types.h +1 −0
  661. drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +1 −1
  662. drivers/gpu/drm/amd/display/dc/inc/hw/transform.h +1 −1
  663. drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +7 −5
  664. drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c +1 −1
  665. drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c +5 −5
  666. drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c +4 −1
  667. drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c +4 −1
  668. drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c +4 −1
  669. drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c +4 −1
  670. drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c +5 −2
  671. drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c +4 −1
  672. drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c +5 −2
  673. drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c +5 −2
  674. drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c +5 −2
  675. drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c +5 −2
  676. drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c +5 −2
  677. drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c +5 −2
  678. drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c +5 −2
  679. drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c +5 −2
  680. drivers/gpu/drm/amd/display/dc/irq/dcn42/irq_service_dcn42.c +5 −2
  681. drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +2 −0
  682. drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dpia.c +15 −7
  683. drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c +6 −0
  684. drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_fixed_vs_pe_retimer_dp.c +1 −0
  685. drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.c +6 −0
  686. drivers/gpu/drm/amd/display/dc/link/link_detection.c +2 −0
  687. drivers/gpu/drm/amd/display/dc/link/link_validation.c +1 −0
  688. drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +2 −0
  689. drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_128b_132b.c +1 −0
  690. drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c +6 −0
  691. drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c +1 −0
  692. drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c +5 −1
  693. drivers/gpu/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c +1 −0
  694. drivers/gpu/drm/amd/display/dc/opp/dcn10/dcn10_opp.c +1 −0
  695. drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c +4 −0
  696. drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.c +2 −0
  697. drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.c +1 −0
  698. drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c +1 −0
  699. drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c +1 −0
  700. drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c +1 −0
  701. drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c +1 −0
  702. drivers/gpu/drm/amd/display/dc/pg/dcn42/dcn42_pg_cntl.c +5 −4
  703. drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +9 −6
  704. drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c +9 −2
  705. drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +9 −3
  706. drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +5 −3
  707. drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +6 −8
  708. drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +6 −7
  709. drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +53 −2
  710. drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.h +2 −0
  711. drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +65 −4
  712. drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c +43 −1
  713. drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +56 −14
  714. drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.h +2 −1
  715. drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +48 −2
  716. drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +46 −2
  717. drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +45 −2
  718. drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +45 −2
  719. drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +49 −6
  720. drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +47 −2
  721. drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +47 −4
  722. drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +48 −4
  723. drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +48 −1
  724. drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c +1 −0
  725. drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +45 −1
  726. drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +58 −3
  727. drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.h +1 −0
  728. drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +58 −3
  729. drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +49 −3
  730. drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +32 −11
  731. drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.h +3 −0
  732. drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +30 −9
  733. drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.h +3 −0
  734. drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c +9 −0
  735. drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 −0
  736. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c +14 −6
  737. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn30.c +1 −0
  738. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +16 −7
  739. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +12 −5
  740. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +12 −6
  741. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c +15 −7
  742. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c +22 −15
  743. drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.h +134 −2
  744. drivers/gpu/drm/amd/display/dmub/src/dmub_reg.c +3 −1
  745. drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +4 −4
  746. drivers/gpu/drm/amd/display/modules/color/color_gamma.c +2 −0
  747. drivers/gpu/drm/amd/display/modules/freesync/freesync.c +6 −0
  748. drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h +1 −0
  749. drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_offset.h +6 −0
  750. drivers/gpu/drm/amd/include/atomfirmware.h +4 −1
  751. drivers/gpu/drm/amd/include/kgd_pp_interface.h +67 −0
  752. drivers/gpu/drm/amd/pm/amdgpu_pm.c +24 −35
  753. drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +3 −1
  754. drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c +15 −0
  755. drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +109 −14
  756. drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.h +1 −0
  757. drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c +0 −83
  758. drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.h +0 −2
  759. drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h +1 −1
  760. drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +11 −4
  761. drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +8 −0
  762. drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h +1 −0
  763. drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu15_driver_if_v15_0_8.h +295 −0
  764. drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v15_0_8_pmfw.h +427 −0
  765. drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v15_0_8_ppsmc.h +100 −0
  766. drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +18 −1
  767. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h +0 −14
  768. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v12_0.h +0 −2
  769. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +0 −2
  770. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h +0 −7
  771. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v15_0.h +21 −36
  772. drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c +4 −1
  773. drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c +2 −1
  774. drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +20 −1
  775. drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +24 −1
  776. drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +0 −76
  777. drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 −1
  778. drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +1 −1
  779. drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c +0 −37
  780. drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +1 −1
  781. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2 −43
  782. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +33 −2
  783. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +1 −1
  784. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c +1 −1
  785. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +95 −11
  786. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +33 −2
  787. drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +1 −1
  788. drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +0 −61
  789. drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +17 −1
  790. drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +36 −2
  791. drivers/gpu/drm/amd/pm/swsmu/smu15/Makefile +1 −1
  792. drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c +67 −145
  793. drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c +2 −1
  794. drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c +2270 −0
  795. drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h +313 −0
  796. drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +35 −0
  797. drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h +2 −0
  798. drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +31 −0
  799. drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.h +1 −0
  800. drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c +10 −0
  801. drivers/gpu/drm/amd/ras/rascore/ras_core.c +30 −3
  802. drivers/gpu/drm/amd/ras/rascore/ras_umc.c +1 −1
  803. drivers/gpu/drm/arm/display/include/malidp_product.h +1 −0
  804. drivers/gpu/drm/arm/display/komeda/d71/d71_component.c +7 −7
  805. drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c +1 −0
  806. drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +1 −1
  807. drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1 −0
  808. drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h +3 −2
  809. drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c +1 −1
  810. drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c +8 −8
  811. drivers/gpu/drm/ast/ast_dp501.c +1 −1
  812. drivers/gpu/drm/bridge/Kconfig +11 −0
  813. drivers/gpu/drm/bridge/Makefile +1 −0
  814. drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +1 −1
  815. drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +22 −113
  816. drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +12 −12
  817. drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h +1 −1
  818. drivers/gpu/drm/bridge/inno-hdmi.c +3 −3
  819. drivers/gpu/drm/bridge/ite-it6263.c +1 −1
  820. drivers/gpu/drm/bridge/lontium-lt8713sx.c +598 −0
  821. drivers/gpu/drm/bridge/samsung-dsim.c +2 −5
  822. drivers/gpu/drm/bridge/synopsys/dw-dp.c +36 −35
  823. drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +8 −8
  824. drivers/gpu/drm/bridge/ti-sn65dsi83.c +7 −6
  825. drivers/gpu/drm/bridge/waveshare-dsi.c +5 −3
  826. drivers/gpu/drm/ci/arm64.config +6 −0
  827. drivers/gpu/drm/ci/build.sh +5 −8
  828. drivers/gpu/drm/ci/build.yml +13 −9
  829. drivers/gpu/drm/ci/container.yml +22 −6
  830. drivers/gpu/drm/ci/gitlab-ci.yml +77 −19
  831. drivers/gpu/drm/ci/igt_runner.sh +4 −2
  832. drivers/gpu/drm/ci/image-tags.yml +13 −9
  833. drivers/gpu/drm/ci/lava-submit.sh +47 −54
  834. drivers/gpu/drm/ci/static-checks.yml +1 −0
  835. drivers/gpu/drm/ci/test.yml +65 −54
  836. drivers/gpu/drm/ci/xfails/amdgpu-stoney-fails.txt +9 −4
  837. drivers/gpu/drm/ci/xfails/amdgpu-stoney-flakes.txt +7 −0
  838. drivers/gpu/drm/ci/xfails/i915-amly-fails.txt +1 −26
  839. drivers/gpu/drm/ci/xfails/i915-apl-fails.txt +2 −22
  840. drivers/gpu/drm/ci/xfails/i915-cml-fails.txt +7 −30
  841. drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt +7 −0
  842. drivers/gpu/drm/ci/xfails/i915-glk-fails.txt +6 −16
  843. drivers/gpu/drm/ci/xfails/i915-jsl-fails.txt +3 −24
  844. drivers/gpu/drm/ci/xfails/i915-kbl-fails.txt +4 −1
  845. drivers/gpu/drm/ci/xfails/i915-tgl-fails.txt +2 −3
  846. drivers/gpu/drm/ci/xfails/i915-tgl-flakes.txt +6 −0
  847. drivers/gpu/drm/ci/xfails/i915-whl-fails.txt +5 −8
  848. drivers/gpu/drm/ci/xfails/mediatek-mt8173-fails.txt +5 −7
  849. drivers/gpu/drm/ci/xfails/mediatek-mt8173-flakes.txt +35 −0
  850. drivers/gpu/drm/ci/xfails/msm-apq8016-fails.txt +4 −0
  851. drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt +2 −0
  852. drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt +3 −2
  853. drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt +3 −2
  854. drivers/gpu/drm/ci/xfails/msm-sm8350-hdk-fails.txt +1 −0
  855. drivers/gpu/drm/ci/xfails/panfrost-mt8183-fails.txt +1 −0
  856. drivers/gpu/drm/ci/xfails/panfrost-rk3288-fails.txt +1 −0
  857. drivers/gpu/drm/ci/xfails/panfrost-rk3399-fails.txt +1 −0
  858. drivers/gpu/drm/ci/xfails/panthor-rk3588-fails.txt +5 −0
  859. drivers/gpu/drm/ci/xfails/panthor-rk3588-skips.txt +20 −0
  860. drivers/gpu/drm/ci/xfails/rockchip-rk3288-fails.txt +12 −3
  861. drivers/gpu/drm/ci/xfails/rockchip-rk3288-flakes.txt +21 −0
  862. drivers/gpu/drm/ci/xfails/rockchip-rk3399-fails.txt +7 −5
  863. drivers/gpu/drm/ci/xfails/rockchip-rk3399-flakes.txt +35 −0
  864. drivers/gpu/drm/ci/xfails/rockchip-rk3588-fails.txt +9 −0
  865. drivers/gpu/drm/ci/xfails/rockchip-rk3588-skips.txt +14 −0
  866. drivers/gpu/drm/ci/xfails/virtio_gpu-none-fails.txt +8 −58
  867. drivers/gpu/drm/ci/xfails/vkms-none-fails.txt +2 −0
  868. drivers/gpu/drm/display/drm_bridge_connector.c +2 −2
  869. drivers/gpu/drm/display/drm_dp_mst_topology.c +0 −1
  870. drivers/gpu/drm/display/drm_dp_tunnel.c +1 −1
  871. drivers/gpu/drm/display/drm_hdmi_helper.c +4 −3
  872. drivers/gpu/drm/display/drm_hdmi_state_helper.c +41 −19
  873. drivers/gpu/drm/drm_atomic.c +13 −17
  874. drivers/gpu/drm/drm_atomic_state_helper.c +1 −0
  875. drivers/gpu/drm/drm_atomic_uapi.c +4 −0
  876. drivers/gpu/drm/drm_blend.c +35 −4
  877. drivers/gpu/drm/drm_bridge.c +46 −7
  878. drivers/gpu/drm/drm_colorop.c +19 −9
  879. drivers/gpu/drm/drm_connector.c +8 −8
  880. drivers/gpu/drm/drm_crtc.c +2 −4
  881. drivers/gpu/drm/drm_drv.c +1 −1
  882. drivers/gpu/drm/drm_edid.c +9 −9
  883. drivers/gpu/drm/drm_gem.c +6 −5
  884. drivers/gpu/drm/drm_gem_atomic_helper.c +0 −22
  885. drivers/gpu/drm/drm_gem_dma_helper.c +13 −10
  886. drivers/gpu/drm/drm_gem_shmem_helper.c +28 −17
  887. drivers/gpu/drm/drm_ioc32.c +2 −0
  888. drivers/gpu/drm/drm_mipi_dbi.c +120 −256
  889. drivers/gpu/drm/drm_mode_config.c +6 −0
  890. drivers/gpu/drm/drm_modeset_helper.c +0 −3
  891. drivers/gpu/drm/drm_pagemap_util.c +5 −9
  892. drivers/gpu/drm/drm_prime.c +1 −1
  893. drivers/gpu/drm/drm_simple_kms_helper.c +0 −83
  894. drivers/gpu/drm/drm_syncobj.c +2 −2
  895. drivers/gpu/drm/gud/gud_drv.c +8 −1
  896. drivers/gpu/drm/gud/gud_internal.h +4 −0
  897. drivers/gpu/drm/gud/gud_pipe.c +36 −18
  898. drivers/gpu/drm/i915/Makefile +1 −0
  899. drivers/gpu/drm/i915/display/g4x_dp.c +1 −1
  900. drivers/gpu/drm/i915/display/icl_dsi.c +14 −7
  901. drivers/gpu/drm/i915/display/icl_dsi_regs.h +2 −1
  902. drivers/gpu/drm/i915/display/intel_cdclk.c +54 −0
  903. drivers/gpu/drm/i915/display/intel_cx0_phy.c +6 −4
  904. drivers/gpu/drm/i915/display/intel_cx0_phy.h +1 −0
  905. drivers/gpu/drm/i915/display/intel_ddi.c +7 −19
  906. drivers/gpu/drm/i915/display/intel_de.c +178 −0
  907. drivers/gpu/drm/i915/display/intel_de.h +23 −98
  908. drivers/gpu/drm/i915/display/intel_display.c +9 −34
  909. drivers/gpu/drm/i915/display/intel_display_device.c +25 −3
  910. drivers/gpu/drm/i915/display/intel_display_device.h +1 −0
  911. drivers/gpu/drm/i915/display/intel_display_types.h +2 −2
  912. drivers/gpu/drm/i915/display/intel_dmc.c +8 −11
  913. drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +31 −1
  914. drivers/gpu/drm/i915/display/intel_dp_tunnel.c +14 −6
  915. drivers/gpu/drm/i915/display/intel_dp_tunnel.h +7 −4
  916. drivers/gpu/drm/i915/display/intel_dpll.c +2 −24
  917. drivers/gpu/drm/i915/display/intel_dpll_mgr.c +181 −5
  918. drivers/gpu/drm/i915/display/intel_dpll_mgr.h +1 −0
  919. drivers/gpu/drm/i915/display/intel_dsi.h +4 −3
  920. drivers/gpu/drm/i915/display/intel_dsi_vbt.c +8 −4
  921. drivers/gpu/drm/i915/display/intel_gmbus.c +4 −2
  922. drivers/gpu/drm/i915/display/intel_lt_phy.c +107 −86
  923. drivers/gpu/drm/i915/display/intel_lt_phy.h +15 −8
  924. drivers/gpu/drm/i915/display/intel_modeset_verify.c +0 −1
  925. drivers/gpu/drm/i915/display/intel_pch.c +93 −0
  926. drivers/gpu/drm/i915/display/intel_pch.h +1 −0
  927. drivers/gpu/drm/i915/display/intel_plane.c +27 −34
  928. drivers/gpu/drm/i915/display/intel_psr.c +13 −2
  929. drivers/gpu/drm/i915/display/intel_quirks.c +22 −3
  930. drivers/gpu/drm/i915/display/intel_quirks.h +1 −0
  931. drivers/gpu/drm/i915/display/skl_watermark.c +104 −56
  932. drivers/gpu/drm/i915/display/vlv_dsi.c +1 −1
  933. drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +2 −0
  934. drivers/gpu/drm/i915/gvt/edid.c +8 −10
  935. drivers/gpu/drm/i915/i915_initial_plane.c +2 −1
  936. drivers/gpu/drm/i915/i915_wait_util.h +1 −1
  937. drivers/gpu/drm/i915/intel_clock_gating.c +7 −79
  938. drivers/gpu/drm/i915/intel_step.h +2 −55
  939. drivers/gpu/drm/i915/intel_uncore.c +50 −22
  940. drivers/gpu/drm/i915/selftests/intel_uncore.c +0 −62
  941. drivers/gpu/drm/imagination/Makefile +1 −0
  942. drivers/gpu/drm/imagination/pvr_ccb.c +5 −0
  943. drivers/gpu/drm/imagination/pvr_device.c +0 −17
  944. drivers/gpu/drm/imagination/pvr_dump.c +113 −0
  945. drivers/gpu/drm/imagination/pvr_dump.h +17 −0
  946. drivers/gpu/drm/imagination/pvr_fw_startstop.c +66 −34
  947. drivers/gpu/drm/imagination/pvr_power.c +39 −12
  948. drivers/gpu/drm/imagination/pvr_rogue_fwif.h +6 −2
  949. drivers/gpu/drm/imagination/pvr_rogue_fwif_shared.h +17 −1
  950. drivers/gpu/drm/imx/ipuv3/Kconfig +1 −0
  951. drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c +11 −12
  952. drivers/gpu/drm/imx/ipuv3/parallel-display.c +12 −3
  953. drivers/gpu/drm/ingenic/ingenic-drm-drv.c +1 −1
  954. drivers/gpu/drm/ingenic/ingenic-ipu.c +1 −1
  955. drivers/gpu/drm/mediatek/Makefile +0 −1
  956. drivers/gpu/drm/mediatek/mtk_crtc.c +0 −1
  957. drivers/gpu/drm/mediatek/mtk_disp_ovl.c +12 −0
  958. drivers/gpu/drm/mediatek/mtk_dp.c +2 −2
  959. drivers/gpu/drm/mediatek/mtk_drm_drv.c +8 −18
  960. drivers/gpu/drm/mediatek/mtk_drm_drv.h +0 −1
  961. drivers/gpu/drm/mediatek/mtk_dsi.c +22 −22
  962. drivers/gpu/drm/mediatek/mtk_gem.c +0 −231
  963. drivers/gpu/drm/mediatek/mtk_gem.h +0 −17
  964. drivers/gpu/drm/mediatek/mtk_hdmi_v2.c +4 −4
  965. drivers/gpu/drm/meson/meson_dw_mipi_dsi.c +2 −4
  966. drivers/gpu/drm/msm/Makefile +1 −0
  967. drivers/gpu/drm/msm/adreno/a2xx_gpummu.c +1 −1
  968. drivers/gpu/drm/msm/adreno/a4xx_gpu.c +2 −4
  969. drivers/gpu/drm/msm/adreno/a5xx_gpu.c +8 −4
  970. drivers/gpu/drm/msm/adreno/a6xx_catalog.c +242 −4
  971. drivers/gpu/drm/msm/adreno/a6xx_gmu.c +116 −24
  972. drivers/gpu/drm/msm/adreno/a6xx_gmu.h +7 −2
  973. drivers/gpu/drm/msm/adreno/a6xx_gpu.c +78 −92
  974. drivers/gpu/drm/msm/adreno/a6xx_gpu.h +6 −1
  975. drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +10 −10
  976. drivers/gpu/drm/msm/adreno/a6xx_hfi.c +23 −10
  977. drivers/gpu/drm/msm/adreno/a6xx_hfi.h +133 −22
  978. drivers/gpu/drm/msm/adreno/a6xx_preempt.c +1 −76
  979. drivers/gpu/drm/msm/adreno/a6xx_preempt.h +82 −0
  980. drivers/gpu/drm/msm/adreno/a8xx_gpu.c +168 −18
  981. drivers/gpu/drm/msm/adreno/a8xx_preempt.c +259 −0
  982. drivers/gpu/drm/msm/adreno/adreno_device.c +1 −0
  983. drivers/gpu/drm/msm/adreno/adreno_gpu.c +8 −11
  984. drivers/gpu/drm/msm/adreno/adreno_gpu.h +6 −7
  985. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h +2 −4
  986. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h +2 −4
  987. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h +4 −6
  988. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_4_eliza.h +363 −0
  989. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h +2 −4
  990. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h +1 −2
  991. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h +1 −2
  992. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h +1 −9
  993. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h +1 −2
  994. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h +1 −2
  995. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h +1 −2
  996. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h +1 −2
  997. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +2 −3
  998. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h +1 −2
  999. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +2 −4
  1000. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +1 −3
  1001. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h +2 −4
  1002. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h +2 −4
  1003. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +1 −3
  1004. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +2 −4
  1005. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +1 −3
  1006. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h +1 −2
  1007. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +1 −3
  1008. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h +1 −2
  1009. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h +1 −2
  1010. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +2 −4
  1011. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +1 −3
  1012. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +13 −15
  1013. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +8 −10
  1014. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h +7 −10
  1015. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +8 −10
  1016. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h +8 −10
  1017. drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h +10 −13
  1018. drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +39 −18
  1019. drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h +2 −0
  1020. drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +6 −0
  1021. drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +2 −0
  1022. drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c +3 −4
  1023. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +11 −25
  1024. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +3 −6
  1025. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c +1 −1
  1026. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +21 −5
  1027. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h +1 −0
  1028. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c +13 −8
  1029. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h +1 −1
  1030. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +0 −6
  1031. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c +3 −1
  1032. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c +1 −2
  1033. drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h +0 −1
  1034. drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +25 −51
  1035. drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +2 −2
  1036. drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +183 −120
  1037. drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +14 −38
  1038. drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h +7 −12
  1039. drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +63 −100
  1040. drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h +0 −4
  1041. drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +2 −92
  1042. drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c +0 −90
  1043. drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.h +0 −1
  1044. drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +0 −1
  1045. drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1 −7
  1046. drivers/gpu/drm/msm/dp/dp_ctrl.c +0 −18
  1047. drivers/gpu/drm/msm/dp/dp_display.c +1 −0
  1048. drivers/gpu/drm/msm/dsi/dsi.c +1 −0
  1049. drivers/gpu/drm/msm/dsi/dsi_cfg.c +2 −2
  1050. drivers/gpu/drm/msm/dsi/dsi_cfg.h +1 −1
  1051. drivers/gpu/drm/msm/dsi/dsi_host.c +70 −15
  1052. drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +1 −0
  1053. drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +19 −19
  1054. drivers/gpu/drm/msm/hdmi/hdmi.c +16 −19
  1055. drivers/gpu/drm/msm/hdmi/hdmi.h +3 −3
  1056. drivers/gpu/drm/msm/hdmi/hdmi_audio.c +2 −3
  1057. drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +4 −4
  1058. drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +2 −2
  1059. drivers/gpu/drm/msm/hdmi/hdmi_i2c.c +6 −6
  1060. drivers/gpu/drm/msm/hdmi/hdmi_phy.c +2 −1
  1061. drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c +1 −1
  1062. drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c +1 −1
  1063. drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c +1 −1
  1064. drivers/gpu/drm/msm/msm_drv.c +6 −1
  1065. drivers/gpu/drm/msm/msm_fb.c +6 −1
  1066. drivers/gpu/drm/msm/msm_gem.c +3 −0
  1067. drivers/gpu/drm/msm/msm_gem.h +1 −0
  1068. drivers/gpu/drm/msm/msm_gem_shrinker.c +2 −3
  1069. drivers/gpu/drm/msm/msm_gem_submit.c +3 −1
  1070. drivers/gpu/drm/msm/msm_gem_vma.c +13 −4
  1071. drivers/gpu/drm/msm/msm_gpu.c +31 −22
  1072. drivers/gpu/drm/msm/msm_mdss.c +9 −0
  1073. drivers/gpu/drm/msm/registers/adreno/a6xx.xml +4 −0
  1074. drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml +4 −2
  1075. drivers/gpu/drm/msm/registers/display/dsi.xml +4 −1
  1076. drivers/gpu/drm/nova/gem.rs +3 −2
  1077. drivers/gpu/drm/omapdrm/omap_drv.c +16 −6
  1078. drivers/gpu/drm/panel/Kconfig +43 −3
  1079. drivers/gpu/drm/panel/Makefile +5 −1
  1080. drivers/gpu/drm/panel/panel-edp.c +3 −0
  1081. drivers/gpu/drm/panel/panel-himax-hx83102.c +151 −0
  1082. drivers/gpu/drm/panel/panel-himax-hx83121a.c +749 −0
  1083. drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c +134 −0
  1084. drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.h +15 −0
  1085. drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c +44 −109
  1086. drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c +323 −0
  1087. drivers/gpu/drm/panel/panel-novatek-nt36672a.c +30 −64
  1088. drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c +301 −0
  1089. drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +1 −0
  1090. drivers/gpu/drm/panel/panel-simple.c +36 −1
  1091. drivers/gpu/drm/panthor/panthor_drv.c +128 −6
  1092. drivers/gpu/drm/panthor/panthor_fw.c +2 −2
  1093. drivers/gpu/drm/radeon/si_dpm.c +3 −1
  1094. drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c +13 −13
  1095. drivers/gpu/drm/renesas/rcar-du/rcar_cmm.h +9 −9
  1096. drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c +8 −8
  1097. drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.h +2 −1
  1098. drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.h +7 −1
  1099. drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c +24 −28
  1100. drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c +16 −0
  1101. drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.h +2 −0
  1102. drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c +1 −2
  1103. drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +2 −2
  1104. drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +23 −1
  1105. drivers/gpu/drm/rockchip/rockchip_drm_vop2.h +4 −0
  1106. drivers/gpu/drm/sitronix/st7586.c +144 −54
  1107. drivers/gpu/drm/sitronix/st7735r.c +121 −21
  1108. drivers/gpu/drm/sun4i/sun4i_backend.c +17 −13
  1109. drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +1 −1
  1110. drivers/gpu/drm/sun4i/sun8i_mixer.c +15 −12
  1111. drivers/gpu/drm/sun4i/sun8i_ui_layer.c +2 −14
  1112. drivers/gpu/drm/sun4i/sun8i_vi_layer.c +2 −25
  1113. drivers/gpu/drm/sysfb/efidrm.c +31 −15
  1114. drivers/gpu/drm/tegra/hub.c +16 −6
  1115. drivers/gpu/drm/tests/drm_connector_test.c +40 −40
  1116. drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c +91 −91
  1117. drivers/gpu/drm/tilcdc/tilcdc_panel.c +0 −408
  1118. drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c +2 −2
  1119. drivers/gpu/drm/tiny/hx8357d.c +124 −14
  1120. drivers/gpu/drm/tiny/ili9163.c +124 −14
  1121. drivers/gpu/drm/tiny/ili9225.c +145 −47
  1122. drivers/gpu/drm/tiny/ili9341.c +124 −14
  1123. drivers/gpu/drm/tiny/ili9486.c +124 −15
  1124. drivers/gpu/drm/tiny/mi0283qt.c +124 −14
  1125. drivers/gpu/drm/tiny/panel-mipi-dbi.c +124 −17
  1126. drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c +41 −0
  1127. drivers/gpu/drm/ttm/tests/ttm_device_test.c +1 −1
  1128. drivers/gpu/drm/ttm/tests/ttm_pool_test.c +16 −16
  1129. drivers/gpu/drm/ttm/ttm_backup.c +4 −2
  1130. drivers/gpu/drm/ttm/ttm_bo.c +4 −2
  1131. drivers/gpu/drm/ttm/ttm_pool.c +145 −72
  1132. drivers/gpu/drm/tyr/driver.rs +56 −44
  1133. drivers/gpu/drm/tyr/file.rs +20 −16
  1134. drivers/gpu/drm/tyr/gem.rs +12 −6
  1135. drivers/gpu/drm/tyr/gpu.rs +32 −26
  1136. drivers/gpu/drm/tyr/regs.rs +10 −6
  1137. drivers/gpu/drm/tyr/tyr.rs +2 −2
  1138. drivers/gpu/drm/v3d/v3d_drv.c +29 −26
  1139. drivers/gpu/drm/v3d/v3d_drv.h +31 −15
  1140. drivers/gpu/drm/v3d/v3d_fence.c +1 −1
  1141. drivers/gpu/drm/v3d/v3d_gem.c +27 −16
  1142. drivers/gpu/drm/v3d/v3d_irq.c +1 −1
  1143. drivers/gpu/drm/v3d/v3d_sched.c +51 −82
  1144. drivers/gpu/drm/v3d/v3d_submit.c +6 −0
  1145. drivers/gpu/drm/v3d/v3d_sysfs.c +1 −1
  1146. drivers/gpu/drm/vc4/vc4_hdmi.c +9 −9
  1147. drivers/gpu/drm/vc4/vc4_hdmi.h +1 −1
  1148. drivers/gpu/drm/vc4/vc4_kms.c +1 −3
  1149. drivers/gpu/drm/verisilicon/vs_dc.c +1 −1
  1150. drivers/gpu/drm/vkms/vkms_composer.c +8 −2
  1151. drivers/gpu/drm/vkms/vkms_crtc.c +3 −0
  1152. drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +57 −36
  1153. drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +2 −1
  1154. drivers/gpu/drm/xe/Makefile +1 −0
  1155. drivers/gpu/drm/xe/compat-i915-headers/intel_step.h +1 −2
  1156. drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h +0 −31
  1157. drivers/gpu/drm/xe/xe_device.c +8 −1
  1158. drivers/gpu/nova-core/Kconfig +1 −1
  1159. drivers/gpu/nova-core/dma.rs +0 −54
  1160. drivers/gpu/nova-core/driver.rs +14 −3
  1161. drivers/gpu/nova-core/falcon.rs +452 −337
  1162. drivers/gpu/nova-core/falcon/gsp.rs +15 −12
  1163. drivers/gpu/nova-core/falcon/hal.rs +5 −1
  1164. drivers/gpu/nova-core/falcon/hal/ga102.rs +43 −27
  1165. drivers/gpu/nova-core/falcon/hal/tu102.rs +8 −4
  1166. drivers/gpu/nova-core/falcon/sec2.rs +7 −10
  1167. drivers/gpu/nova-core/fb.rs +80 −21
  1168. drivers/gpu/nova-core/fb/hal/ga100.rs +23 −14
  1169. drivers/gpu/nova-core/fb/hal/ga102.rs +5 −2
  1170. drivers/gpu/nova-core/fb/hal/tu102.rs +10 −7
  1171. drivers/gpu/nova-core/firmware.rs +146 −48
  1172. drivers/gpu/nova-core/firmware/booter.rs +45 −42
  1173. drivers/gpu/nova-core/firmware/fwsec.rs +82 −99
  1174. drivers/gpu/nova-core/firmware/fwsec/bootloader.rs +350 −0
  1175. drivers/gpu/nova-core/firmware/gsp.rs +19 −99
  1176. drivers/gpu/nova-core/firmware/riscv.rs +6 −4
  1177. drivers/gpu/nova-core/gfw.rs +8 −3
  1178. drivers/gpu/nova-core/gpu.rs +26 −40
  1179. drivers/gpu/nova-core/gsp.rs +86 −58
  1180. drivers/gpu/nova-core/gsp/boot.rs +37 −45
  1181. drivers/gpu/nova-core/gsp/cmdq.rs +316 −166
  1182. drivers/gpu/nova-core/gsp/cmdq/continuation.rs +307 −0
  1183. drivers/gpu/nova-core/gsp/commands.rs +9 −14
  1184. drivers/gpu/nova-core/gsp/fw.rs +166 −182
  1185. drivers/gpu/nova-core/gsp/fw/commands.rs +10 −7
  1186. drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs +1 −0
  1187. drivers/gpu/nova-core/gsp/sequencer.rs +9 −13
  1188. drivers/gpu/nova-core/nova_core.rs +50 −4
  1189. drivers/gpu/nova-core/num.rs +80 −0
  1190. drivers/gpu/nova-core/regs.rs +319 −230
  1191. drivers/gpu/nova-core/regs/macros.rs +0 −739
  1192. drivers/hid/bpf/hid_bpf_dispatch.c +2 −0
  1193. drivers/hid/hid-appletb-kbd.c +3 −2
  1194. drivers/hid/hid-asus.c +3 −0
  1195. drivers/hid/hid-core.c +4 −3
  1196. drivers/hid/hid-ids.h +1 −2
  1197. drivers/hid/hid-input.c +11 −7
  1198. drivers/hid/hid-logitech-hidpp.c +5 −1
  1199. drivers/hid/hid-multitouch.c +7 −0
  1200. drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c +1 −0
  1201. drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +1 −0
  1202. drivers/hid/wacom_wac.c +10 −0
  1203. drivers/hv/mshv_regions.c +4 −2
  1204. drivers/hv/mshv_root.h +2 −3
  1205. drivers/hv/mshv_root_main.c +22 −71
  1206. drivers/hv/mshv_synic.c +173 −15
  1207. drivers/hwmon/Kconfig +2 −4
  1208. drivers/hwmon/adm1177.c +31 −23
  1209. drivers/hwmon/asus-ec-sensors.c +6 −1
  1210. drivers/hwmon/axi-fan-control.c +1 −1
  1211. drivers/hwmon/max6639.c +5 −5
  1212. drivers/hwmon/occ/common.c +9 −10
  1213. drivers/hwmon/peci/cputemp.c +2 −2
  1214. drivers/hwmon/pmbus/hac300s.c +2 −0
  1215. drivers/hwmon/pmbus/ina233.c +4 −1
  1216. drivers/hwmon/pmbus/isl68137.c +23 −5
  1217. drivers/hwmon/pmbus/ltc4286.c +1 −0
  1218. drivers/hwmon/pmbus/mp2869.c +21 −14
  1219. drivers/hwmon/pmbus/mp2975.c +2 −0
  1220. drivers/hwmon/pmbus/pmbus_core.c +154 −38
  1221. drivers/hwmon/pmbus/pxe1610.c +4 −1
  1222. drivers/hwmon/pmbus/tps53679.c +5 −5
  1223. drivers/i2c/busses/Kconfig +2 −0
  1224. drivers/i2c/busses/i2c-cp2615.c +3 −0
  1225. drivers/i2c/busses/i2c-designware-amdisp.c +5 −6
  1226. drivers/i2c/busses/i2c-fsi.c +1 −0
  1227. drivers/i2c/busses/i2c-imx.c +32 −19
  1228. drivers/i2c/busses/i2c-pxa.c +16 −1
  1229. drivers/i2c/busses/i2c-tegra.c +4 −1
  1230. drivers/i3c/Kconfig +12 −0
  1231. drivers/i3c/master/dw-i3c-master.c +4 −2
  1232. drivers/i3c/master/mipi-i3c-hci/cmd.h +1 −0
  1233. drivers/i3c/master/mipi-i3c-hci/cmd_v1.c +3 −5
  1234. drivers/i3c/master/mipi-i3c-hci/cmd_v2.c +3 −5
  1235. drivers/i3c/master/mipi-i3c-hci/core.c +90 −53
  1236. drivers/i3c/master/mipi-i3c-hci/dma.c +84 −74
  1237. drivers/i3c/master/mipi-i3c-hci/hci.h +5 −0
  1238. drivers/i3c/master/mipi-i3c-hci/pio.c +5 −11
  1239. drivers/iio/accel/adxl313_core.c +2 −0
  1240. drivers/iio/accel/adxl355_core.c +1 −1
  1241. drivers/iio/accel/adxl380.c +1 −1
  1242. drivers/iio/adc/ad4062.c +3 −5
  1243. drivers/iio/adc/ad7768-1.c +11 −2
  1244. drivers/iio/adc/ade9000.c +6 −6
  1245. drivers/iio/adc/aspeed_adc.c +1 −0
  1246. drivers/iio/adc/nxp-sar-adc.c +5 −4
  1247. drivers/iio/adc/ti-adc161s626.c +20 −21
  1248. drivers/iio/adc/ti-ads1018.c +1 −1
  1249. drivers/iio/adc/ti-ads1119.c +6 −5
  1250. drivers/iio/adc/ti-ads7950.c +5 −3
  1251. drivers/iio/chemical/bme680_core.c +1 −1
  1252. drivers/iio/chemical/sps30_i2c.c +1 −1
  1253. drivers/iio/chemical/sps30_serial.c +1 −1
  1254. drivers/iio/common/hid-sensors/hid-sensor-trigger.c +30 −18
  1255. drivers/iio/dac/ad5770r.c +1 −1
  1256. drivers/iio/dac/ds4424.c +1 −1
  1257. drivers/iio/dac/mcp47feb02.c +22 −29
  1258. drivers/iio/frequency/adf4377.c +1 −1
  1259. drivers/iio/gyro/mpu3050-core.c +34 −16
  1260. drivers/iio/gyro/mpu3050-i2c.c +1 −2
  1261. drivers/iio/imu/adis.c +1 −1
  1262. drivers/iio/imu/adis16550.c +4 −4
  1263. drivers/iio/imu/bmi160/bmi160_core.c +5 −10
  1264. drivers/iio/imu/bno055/bno055.c +1 −1
  1265. drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c +2 −0
  1266. drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +4 −0
  1267. drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c +2 −0
  1268. drivers/iio/imu/inv_icm45600/inv_icm45600.h +1 −1
  1269. drivers/iio/imu/inv_icm45600/inv_icm45600_core.c +8 −3
  1270. drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +8 −0
  1271. drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +2 −0
  1272. drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +4 −1
  1273. drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +14 −1
  1274. drivers/iio/industrialio-buffer.c +4 −2
  1275. drivers/iio/light/bh1780.c +1 −1
  1276. drivers/iio/light/vcnl4035.c +12 −6
  1277. drivers/iio/light/veml6070.c +1 −3
  1278. drivers/iio/magnetometer/Kconfig +1 −2
  1279. drivers/iio/magnetometer/tlv493d.c +1 −1
  1280. drivers/iio/orientation/hid-sensor-rotation.c +20 −4
  1281. drivers/iio/potentiometer/mcp4131.c +1 −1
  1282. drivers/iio/pressure/abp2030pa.c +1 −1
  1283. drivers/iio/proximity/hx9023s.c +4 −2
  1284. drivers/iio/proximity/rfd77402.c +4 −3
  1285. drivers/infiniband/core/rw.c +27 −10
  1286. drivers/infiniband/core/umem.c +3 −2
  1287. drivers/infiniband/hw/bng_re/bng_dev.c +9 −5
  1288. drivers/infiniband/hw/efa/efa_com.c +40 −48
  1289. drivers/infiniband/hw/ionic/ionic_controlpath.c +3 −1
  1290. drivers/infiniband/hw/irdma/cm.c +16 −13
  1291. drivers/infiniband/hw/irdma/uk.c +22 −17
  1292. drivers/infiniband/hw/irdma/utils.c +0 −2
  1293. drivers/infiniband/hw/irdma/verbs.c +6 −4
  1294. drivers/input/joystick/xpad.c +5 −0
  1295. drivers/input/mouse/bcm5974.c +41 −1
  1296. drivers/input/rmi4/rmi_f54.c +2 −2
  1297. drivers/input/serio/i8042-acpipnpio.h +7 −0
  1298. drivers/interconnect/qcom/sm8450.c +2 −2
  1299. drivers/iommu/amd/iommu.c +14 −1
  1300. drivers/iommu/dma-iommu.c +17 −4
  1301. drivers/iommu/generic_pt/fmt/amdv1.h +1 −1
  1302. drivers/iommu/generic_pt/iommu_pt.h +1 −1
  1303. drivers/iommu/intel/dmar.c +1 −2
  1304. drivers/iommu/intel/svm.c +8 −4
  1305. drivers/iommu/iommu-sva.c +6 −6
  1306. drivers/iommu/iommu.c +5 −1
  1307. drivers/irqchip/irq-qcom-mpm.c +3 −0
  1308. drivers/irqchip/irq-renesas-rzv2h.c +1 −1
  1309. drivers/irqchip/irq-riscv-aplic-main.c +19 −6
  1310. drivers/irqchip/irq-riscv-rpmi-sysmsi.c +1 −0
  1311. drivers/media/i2c/ccs/ccs-core.c +0 −2
  1312. drivers/media/mc/mc-request.c +5 −0
  1313. drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c +4 −0
  1314. drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c +27 −23
  1315. drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c +2 −1
  1316. drivers/media/platform/synopsys/Kconfig +1 −0
  1317. drivers/media/platform/synopsys/dw-mipi-csi2rx.c +1 −1
  1318. drivers/media/platform/verisilicon/imx8m_vpu_hw.c +1 −1
  1319. drivers/media/usb/uvc/uvc_video.c +5 −4
  1320. drivers/media/v4l2-core/v4l2-ioctl.c +3 −2
  1321. drivers/misc/amd-sbi/Kconfig +1 −2
  1322. drivers/misc/fastrpc.c +4 −1
  1323. drivers/misc/lis3lv02d/lis3lv02d.c +4 −2
  1324. drivers/misc/mei/Kconfig +1 −0
  1325. drivers/misc/mei/hw-me.c +4 −10
  1326. drivers/mmc/host/sdhci-pci-gli.c +9 −0
  1327. drivers/mmc/host/sdhci.c +8 −1
  1328. drivers/mtd/nand/raw/brcmnand/brcmnand.c +2 −4
  1329. drivers/mtd/nand/raw/cadence-nand-controller.c +1 −1
  1330. drivers/mtd/nand/raw/nand_base.c +12 −2
  1331. drivers/mtd/nand/raw/pl35x-nand-controller.c +3 −0
  1332. drivers/mtd/parsers/redboot.c +3 −3
  1333. drivers/mtd/spi-nor/core.c +7 −7
  1334. drivers/net/bonding/bond_debugfs.c +11 −5
  1335. drivers/net/bonding/bond_main.c +66 −8
  1336. drivers/net/caif/caif_serial.c +3 −0
  1337. drivers/net/can/dev/calc_bittiming.c +1 −1
  1338. drivers/net/can/dev/netlink.c +3 −1
  1339. drivers/net/can/spi/hi311x.c +4 −1
  1340. drivers/net/can/spi/mcp251x.c +24 −5
  1341. drivers/net/dsa/bcm_sf2.c +6 −2
  1342. drivers/net/dsa/microchip/ksz_ptp.c +8 −3
  1343. drivers/net/dsa/mxl862xx/mxl862xx.c +0 −1
  1344. drivers/net/dsa/realtek/rtl8365mb.c +1 −2
  1345. drivers/net/dsa/realtek/rtl8366rb-leds.c +3 −3
  1346. drivers/net/dsa/sja1105/sja1105_main.c +3 −4
  1347. drivers/net/ethernet/airoha/airoha_eth.c +19 −2
  1348. drivers/net/ethernet/airoha/airoha_eth.h +1 −0
  1349. drivers/net/ethernet/airoha/airoha_ppe.c +9 −0
  1350. drivers/net/ethernet/amd/xgbe/xgbe-drv.c +10 −9
  1351. drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +75 −7
  1352. drivers/net/ethernet/amd/xgbe/xgbe.h +4 −0
  1353. drivers/net/ethernet/arc/emac_main.c +11 −0
  1354. drivers/net/ethernet/broadcom/Kconfig +1 −1
  1355. drivers/net/ethernet/broadcom/asp2/bcmasp.c +23 −18
  1356. drivers/net/ethernet/broadcom/bnxt/bnxt.c +54 −24
  1357. drivers/net/ethernet/broadcom/bnxt/bnxt.h +2 −1
  1358. drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +3 −6
  1359. drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +2 −3
  1360. drivers/net/ethernet/broadcom/genet/bcmgenet.c +12 −19
  1361. drivers/net/ethernet/broadcom/genet/bcmgenet.h +1 −4
  1362. drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c +1 −1
  1363. drivers/net/ethernet/broadcom/genet/bcmmii.c +5 −5
  1364. drivers/net/ethernet/broadcom/tg3.c +12 −1
  1365. drivers/net/ethernet/cadence/macb_main.c +142 −23
  1366. drivers/net/ethernet/cadence/macb_pci.c +6 −4
  1367. drivers/net/ethernet/cadence/macb_ptp.c +3 −1
  1368. drivers/net/ethernet/faraday/ftgmac100.c +24 −4
  1369. drivers/net/ethernet/freescale/enetc/enetc.c +12 −1
  1370. drivers/net/ethernet/freescale/enetc/enetc4_hw.h +11 −0
  1371. drivers/net/ethernet/freescale/enetc/enetc4_pf.c +104 −14
  1372. drivers/net/ethernet/freescale/enetc/enetc_ethtool.c +11 −1
  1373. drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c +10 −14
  1374. drivers/net/ethernet/freescale/fec_ptp.c +0 −3
  1375. drivers/net/ethernet/intel/e1000/e1000_main.c +0 −2
  1376. drivers/net/ethernet/intel/e1000e/netdev.c +0 −2
  1377. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +7 −7
  1378. drivers/net/ethernet/intel/iavf/iavf.h +1 −2
  1379. drivers/net/ethernet/intel/iavf/iavf_ethtool.c +21 −29
  1380. drivers/net/ethernet/intel/iavf/iavf_main.c +34 −56
  1381. drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +0 −1
  1382. drivers/net/ethernet/intel/ice/devlink/devlink.c +2 −2
  1383. drivers/net/ethernet/intel/ice/ice.h +22 −0
  1384. drivers/net/ethernet/intel/ice/ice_ethtool.c +11 −21
  1385. drivers/net/ethernet/intel/ice/ice_main.c +2 −2
  1386. drivers/net/ethernet/intel/ice/ice_repr.c +3 −2
  1387. drivers/net/ethernet/intel/idpf/idpf.h +1 −1
  1388. drivers/net/ethernet/intel/idpf/idpf_idc.c +4 −2
  1389. drivers/net/ethernet/intel/idpf/idpf_txrx.c +1 −1
  1390. drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +1 −1
  1391. drivers/net/ethernet/intel/igc/igc.h +2 −0
  1392. drivers/net/ethernet/intel/igc/igc_main.c +9 −5
  1393. drivers/net/ethernet/intel/igc/igc_ptp.c +33 −0
  1394. drivers/net/ethernet/intel/libie/fwlog.c +36 −13
  1395. drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +2 −2
  1396. drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c +3 −3
  1397. drivers/net/ethernet/mediatek/mtk_ppe_offload.c +20 −1
  1398. drivers/net/ethernet/mellanox/mlx5/core/devlink.c +1 −3
  1399. drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +0 −1
  1400. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h +1 −0
  1401. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c +1 −1
  1402. drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c +22 −28
  1403. drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +9 −14
  1404. drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +9 −14
  1405. drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +4 −3
  1406. drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +2 −0
  1407. drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +27 −20
  1408. drivers/net/ethernet/mellanox/mlx5/core/fw.c +34 −19
  1409. drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c +3 −0
  1410. drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +2 −2
  1411. drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c +1 −1
  1412. drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +3 −3
  1413. drivers/net/ethernet/meta/fbnic/fbnic_txrx.h +1 −1
  1414. drivers/net/ethernet/microchip/lan743x_main.c +5 −0
  1415. drivers/net/ethernet/microsoft/mana/gdma_main.c +1 −0
  1416. drivers/net/ethernet/microsoft/mana/hw_channel.c +3 −3
  1417. drivers/net/ethernet/microsoft/mana/mana_en.c +11 −2
  1418. drivers/net/ethernet/pensando/ionic/ionic_lif.c +11 −6
  1419. drivers/net/ethernet/spacemit/k1_emac.c +13 −6
  1420. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4 −10
  1421. drivers/net/ethernet/ti/am65-cpsw-nuss.c +9 −7
  1422. drivers/net/ethernet/ti/am65-cpsw-nuss.h +1 −1
  1423. drivers/net/ethernet/ti/icssg/icssg_common.c +8 −3
  1424. drivers/net/ethernet/xilinx/xilinx_axienet.h +2 −2
  1425. drivers/net/ethernet/xilinx/xilinx_axienet_main.c +4 −5
  1426. drivers/net/mctp/mctp-i2c.c +1 −0
  1427. drivers/net/mctp/mctp-usb.c +1 −2
  1428. drivers/net/netdevsim/netdev.c +4 −1
  1429. drivers/net/phy/sfp.c +13 −2
  1430. drivers/net/team/team_core.c +64 −1
  1431. drivers/net/tun_vnet.h +1 −1
  1432. drivers/net/usb/aqc111.c +6 −6
  1433. drivers/net/usb/cdc_ncm.c +6 −4
  1434. drivers/net/usb/lan78xx.c +8 −4
  1435. drivers/net/usb/lan78xx.h +3 −0
  1436. drivers/net/usb/qmi_wwan.c +2 −2
  1437. drivers/net/usb/usbnet.c +4 −3
  1438. drivers/net/virtio_net.c +15 −12
  1439. drivers/net/vxlan/vxlan_core.c +4 −2
  1440. drivers/net/wireless/ath/ath11k/dp_rx.c +7 −8
  1441. drivers/net/wireless/ath/ath12k/dp_rx.c +3 −1
  1442. drivers/net/wireless/ath/ath9k/channel.c +2 −4
  1443. drivers/net/wireless/intel/iwlwifi/fw/api/commands.h +5 −0
  1444. drivers/net/wireless/intel/iwlwifi/fw/api/scan.h +10 −0
  1445. drivers/net/wireless/intel/iwlwifi/mld/iface.c +69 −32
  1446. drivers/net/wireless/intel/iwlwifi/mld/mac80211.c +19 −0
  1447. drivers/net/wireless/intel/iwlwifi/mld/mld.c +1 −0
  1448. drivers/net/wireless/intel/iwlwifi/mld/mlo.c +2 −2
  1449. drivers/net/wireless/intel/iwlwifi/mld/notif.c +5 −0
  1450. drivers/net/wireless/intel/iwlwifi/mld/scan.c +27 −3
  1451. drivers/net/wireless/intel/iwlwifi/mld/scan.h +6 −3
  1452. drivers/net/wireless/intel/iwlwifi/mvm/d3.c +1 −1
  1453. drivers/net/wireless/intel/iwlwifi/mvm/fw.c +2 −1
  1454. drivers/net/wireless/mediatek/mt76/scan.c +1 −3
  1455. drivers/net/wireless/microchip/wilc1000/hif.c +1 −1
  1456. drivers/net/wireless/ti/wl1251/tx.c +5 −3
  1457. drivers/net/wireless/ti/wlcore/tx.c +1 −1
  1458. drivers/net/wireless/virtual/mac80211_hwsim.c +1 −2
  1459. drivers/net/wireless/virtual/virt_wifi.c +0 −1
  1460. drivers/nfc/nxp-nci/i2c.c +2 −2
  1461. drivers/nfc/pn533/uart.c +3 −0
  1462. drivers/nvdimm/bus.c +3 −2
  1463. drivers/nvme/host/core.c +1 −2
  1464. drivers/nvme/host/pci.c +5 −3
  1465. drivers/nvme/target/admin-cmd.c +1 −1
  1466. drivers/nvme/target/core.c +12 −2
  1467. drivers/nvme/target/nvmet.h +1 −0
  1468. drivers/nvme/target/rdma.c +1 −0
  1469. drivers/nvmem/imx-ocotp-ele.c +1 −0
  1470. drivers/nvmem/imx-ocotp.c +1 −0
  1471. drivers/nvmem/zynqmp_nvmem.c +4 −4
  1472. drivers/pci/endpoint/functions/pci-epf-test.c +5 −0
  1473. drivers/pci/pwrctrl/core.c +43 −13
  1474. drivers/pci/pwrctrl/pci-pwrctrl-pwrseq.c +0 −12
  1475. drivers/pci/pwrctrl/slot.c +0 −1
  1476. drivers/phy/Kconfig +2 −3
  1477. drivers/phy/freescale/phy-fsl-lynx-28g.c +2 −0
  1478. drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +1 −2
  1479. drivers/phy/spacemit/phy-k1-usb2.c +14 −0
  1480. drivers/phy/ti/phy-j721e-wiz.c +2 −0
  1481. drivers/pinctrl/mediatek/pinctrl-mtk-common.c +6 −3
  1482. drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +16 −0
  1483. drivers/pinctrl/renesas/pinctrl-rza1.c +1 −1
  1484. drivers/pinctrl/renesas/pinctrl-rzt2h.c +8 −7
  1485. drivers/pinctrl/stm32/Kconfig +1 −0
  1486. drivers/pinctrl/sunxi/pinctrl-sunxi.c +32 −11
  1487. drivers/pinctrl/sunxi/pinctrl-sunxi.h +3 −1
  1488. drivers/platform/olpc/olpc-xo175-ec.c +1 −1
  1489. drivers/platform/x86/amd/hsmp/hsmp.c +1 −1
  1490. drivers/platform/x86/asus-armoury.h +77 −0
  1491. drivers/platform/x86/asus-nb-wmi.c +1 −1
  1492. drivers/platform/x86/hp/hp-wmi.c +19 −0
  1493. drivers/platform/x86/intel/hid.c +9 −1
  1494. drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +4 −1
  1495. drivers/platform/x86/lenovo/wmi-gamezone.c +0 −2
  1496. drivers/pmdomain/bcm/bcm2835-power.c +4 −8
  1497. drivers/pmdomain/mediatek/mtk-pm-domains.c +1 −1
  1498. drivers/power/sequencing/pwrseq-pcie-m2.c +1 −1
  1499. drivers/regulator/pca9450-regulator.c +10 −4
  1500. drivers/remoteproc/imx_rproc.c +1 −1
  1501. drivers/remoteproc/mtk_scp.c +39 −0
  1502. drivers/remoteproc/qcom_sysmon.c +1 −1
  1503. drivers/remoteproc/qcom_wcnss.c +1 −1
  1504. drivers/resctrl/mpam_devices.c +2 −0
  1505. drivers/resctrl/test_mpam_devices.c +15 −7
  1506. drivers/reset/reset-rzg2l-usbphy-ctrl.c +3 −0
  1507. drivers/s390/block/dasd_eckd.c +16 −0
  1508. drivers/s390/crypto/zcrypt_ccamisc.c +7 −5
  1509. drivers/s390/crypto/zcrypt_cex4.c +1 −2
  1510. drivers/s390/crypto/zcrypt_msgtype6.c +14 −18
  1511. drivers/scsi/hisi_sas/hisi_sas_main.c +1 −1
  1512. drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +1 −1
  1513. drivers/scsi/ibmvscsi/ibmvfc.c +2 −1
  1514. drivers/scsi/qla2xxx/qla_iocb.c +0 −2
  1515. drivers/scsi/scsi_scan.c +2 −6
  1516. drivers/scsi/scsi_transport_sas.c +1 −1
  1517. drivers/scsi/ses.c +1 −1
  1518. drivers/slimbus/qcom-ngd-ctrl.c +2 −4
  1519. drivers/soc/fsl/qbman/qman.c +22 −2
  1520. drivers/soc/fsl/qe/qmc.c +2 −2
  1521. drivers/soc/microchip/mpfs-sys-controller.c +9 −4
  1522. drivers/soc/rockchip/grf.c +1 −0
  1523. drivers/spi/spi-amlogic-spifc-a4.c +21 −42
  1524. drivers/spi/spi-amlogic-spisg.c +4 −8
  1525. drivers/spi/spi-atcspi200.c +16 −22
  1526. drivers/spi/spi-axiado.c +11 −20
  1527. drivers/spi/spi-cadence-quadspi.c +15 −8
  1528. drivers/spi/spi-fsl-lpspi.c +2 −1
  1529. drivers/spi/spi-geni-qcom.c +7 −6
  1530. drivers/spi/spi-intel-pci.c +1 −0
  1531. drivers/spi/spi-meson-spicc.c +0 −2
  1532. drivers/spi/spi-rockchip-sfc.c +1 −1
  1533. drivers/spi/spi-sn-f-ospi.c +10 −32
  1534. drivers/spi/spi-stm32-ospi.c +6 −6
  1535. drivers/spi/spi.c +31 −26
  1536. drivers/staging/rtl8723bs/core/rtw_ieee80211.c +10 −5
  1537. drivers/staging/rtl8723bs/core/rtw_mlme.c +4 −1
  1538. drivers/staging/sm750fb/sm750.c +1 −0
  1539. drivers/staging/sm750fb/sm750_hw.c +11 −11
  1540. drivers/target/loopback/tcm_loop.c +46 −6
  1541. drivers/target/target_core_file.c +1 −1
  1542. drivers/tee/tee_shm.c +0 −27
  1543. drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c +7 −1
  1544. drivers/thermal/thermal_core.c +27 −5
  1545. drivers/thunderbolt/nhi.c +1 −1
  1546. drivers/tty/serial/8250/8250.h +25 −0
  1547. drivers/tty/serial/8250/8250_dma.c +15 −0
  1548. drivers/tty/serial/8250/8250_dw.c +235 −61
  1549. drivers/tty/serial/8250/8250_pci.c +17 −0
  1550. drivers/tty/serial/8250/8250_port.c +45 −30
  1551. drivers/tty/serial/serial_core.c +4 −1
  1552. drivers/tty/serial/uartlite.c +1 −0
  1553. drivers/tty/vt/vt.c +26 −0
  1554. drivers/ufs/core/ufshcd.c +1 −1
  1555. drivers/usb/cdns3/cdns3-gadget.c +4 −0
  1556. drivers/usb/class/cdc-acm.c +14 −0
  1557. drivers/usb/class/cdc-acm.h +2 −0
  1558. drivers/usb/class/cdc-wdm.c +3 −1
  1559. drivers/usb/class/usbtmc.c +6 −3
  1560. drivers/usb/common/ulpi.c +2 −3
  1561. drivers/usb/core/config.c +5 −1
  1562. drivers/usb/core/driver.c +14 −9
  1563. drivers/usb/core/hcd.c +1 −1
  1564. drivers/usb/core/message.c +79 −21
  1565. drivers/usb/core/offload.c +59 −43
  1566. drivers/usb/core/phy.c +12 −8
  1567. drivers/usb/core/quirks.c +24 −0
  1568. drivers/usb/core/usb.c +1 −0
  1569. drivers/usb/dwc2/gadget.c +2 −0
  1570. drivers/usb/dwc3/dwc3-google.c +3 −2
  1571. drivers/usb/dwc3/dwc3-imx8mp.c +1 −1
  1572. drivers/usb/dwc3/dwc3-pci.c +2 −0
  1573. drivers/usb/gadget/function/f_ecm.c +24 −13
  1574. drivers/usb/gadget/function/f_eem.c +31 −28
  1575. drivers/usb/gadget/function/f_hid.c +14 −9
  1576. drivers/usb/gadget/function/f_mass_storage.c +10 −2
  1577. drivers/usb/gadget/function/f_ncm.c +80 −66
  1578. drivers/usb/gadget/function/f_rndis.c +31 −20
  1579. drivers/usb/gadget/function/f_subset.c +35 −28
  1580. drivers/usb/gadget/function/f_tcm.c +14 −0
  1581. drivers/usb/gadget/function/f_uac1_legacy.c +37 −10
  1582. drivers/usb/gadget/function/f_uvc.c +36 −3
  1583. drivers/usb/gadget/function/u_ecm.h +15 −6
  1584. drivers/usb/gadget/function/u_eem.h +15 −6
  1585. drivers/usb/gadget/function/u_ether.c +31 −52
  1586. drivers/usb/gadget/function/u_ether.h +26 −30
  1587. drivers/usb/gadget/function/u_ether_configfs.h +0 −177
  1588. drivers/usb/gadget/function/u_gether.h +15 −7
  1589. drivers/usb/gadget/function/u_ncm.h +16 −9
  1590. drivers/usb/gadget/function/u_rndis.h +23 −8
  1591. drivers/usb/gadget/function/uvc.h +3 −0
  1592. drivers/usb/gadget/function/uvc_v4l2.c +4 −1
  1593. drivers/usb/gadget/function/uvc_video.c +1 −1
  1594. drivers/usb/gadget/udc/dummy_hcd.c +26 −16
  1595. drivers/usb/host/ehci-brcm.c +2 −2
  1596. drivers/usb/host/xhci-debugfs.c +9 −1
  1597. drivers/usb/host/xhci-ring.c +1 −0
  1598. drivers/usb/host/xhci-sideband.c +3 −15
  1599. drivers/usb/host/xhci.c +2 −2
  1600. drivers/usb/image/mdc800.c +4 −2
  1601. drivers/usb/misc/usbio.c +5 −2
  1602. drivers/usb/misc/uss720.c +1 −1
  1603. drivers/usb/misc/yurex.c +1 −1
  1604. drivers/usb/renesas_usbhs/common.c +9 −0
  1605. drivers/usb/roles/class.c +6 −1
  1606. drivers/usb/serial/io_edgeport.c +3 −0
  1607. drivers/usb/serial/io_usbvend.h +1 −0
  1608. drivers/usb/serial/option.c +4 −0
  1609. drivers/usb/typec/altmodes/displayport.c +6 −1
  1610. drivers/usb/typec/altmodes/thunderbolt.c +22 −22
  1611. drivers/usb/typec/class.c +0 −4
  1612. drivers/usb/typec/tcpm/tcpm.c +1 −1
  1613. drivers/usb/typec/ucsi/ucsi.c +7 −2
  1614. drivers/vfio/pci/vfio_pci_dmabuf.c +2 −3
  1615. drivers/virt/coco/tdx-guest/tdx-guest.c +10 −2
  1616. drivers/virtio/virtio_ring.c +5 −5
  1617. drivers/xen/privcmd.c +73 −3
  1618. fs/afs/addr_list.c +4 −4
  1619. fs/binfmt_elf_fdpic.c +6 −0
  1620. fs/btrfs/backref.c +28 −0
  1621. fs/btrfs/block-group.c +37 −1
  1622. fs/btrfs/compression.c +8 −3
  1623. fs/btrfs/disk-io.c +25 −6
  1624. fs/btrfs/extent-tree.c +94 −6
  1625. fs/btrfs/extent_io.c +1 −0
  1626. fs/btrfs/file-item.c +7 −0
  1627. fs/btrfs/free-space-tree.c +8 −1
  1628. fs/btrfs/inode.c +39 −5
  1629. fs/btrfs/ioctl.c +37 −7
  1630. fs/btrfs/lzo.c +2 −2
  1631. fs/btrfs/messages.h +0 −3
  1632. fs/btrfs/print-tree.c +10 −0
  1633. fs/btrfs/qgroup.c +8 −0
  1634. fs/btrfs/raid56.c +10 −2
  1635. fs/btrfs/relocation.c +34 −7
  1636. fs/btrfs/space-info.c +4 −1
  1637. fs/btrfs/transaction.c +16 −0
  1638. fs/btrfs/tree-checker.c +18 −1
  1639. fs/btrfs/tree-log.c +92 −33
  1640. fs/btrfs/uuid-tree.c +38 −0
  1641. fs/btrfs/uuid-tree.h +2 −0
  1642. fs/btrfs/volumes.c +21 −11
  1643. fs/btrfs/zlib.c +3 −1
  1644. fs/btrfs/zoned.c +11 −2
  1645. fs/btrfs/zstd.c +1 −1
  1646. fs/ceph/addr.c +0 −1
  1647. fs/ceph/debugfs.c +2 −2
  1648. fs/ceph/dir.c +15 −2
  1649. fs/ceph/file.c +2 −2
  1650. fs/ceph/inode.c +1 −1
  1651. fs/ceph/mds_client.c +3 −0
  1652. fs/erofs/Kconfig +30 −15
  1653. fs/erofs/fileio.c +2 −4
  1654. fs/erofs/ishare.c +13 −2
  1655. fs/erofs/zdata.c +3 −0
  1656. fs/ext4/Makefile +3 −2
  1657. fs/ext4/crypto.c +8 −1
  1658. fs/ext4/ext4.h +6 −0
  1659. fs/ext4/ext4_extents.h +12 −0
  1660. fs/ext4/extents-test.c +7 −5
  1661. fs/ext4/extents.c +68 −12
  1662. fs/ext4/fast_commit.c +10 −7
  1663. fs/ext4/fsync.c +14 −2
  1664. fs/ext4/ialloc.c +6 −0
  1665. fs/ext4/inline.c +9 −1
  1666. fs/ext4/inode.c +60 −15
  1667. fs/ext4/mballoc-test.c +41 −40
  1668. fs/ext4/mballoc.c +114 −18
  1669. fs/ext4/mballoc.h +30 −0
  1670. fs/ext4/page-io.c +8 −2
  1671. fs/ext4/super.c +31 −6
  1672. fs/ext4/sysfs.c +9 −1
  1673. fs/fs-writeback.c +27 −9
  1674. fs/fuse/file.c +1 −3
  1675. fs/fuse/inode.c +1 −0
  1676. fs/iomap/bio.c +50 −1
  1677. fs/iomap/buffered-io.c +10 −5
  1678. fs/jbd2/checkpoint.c +13 −2
  1679. fs/mpage.c +24 −6
  1680. fs/namei.c +8 −2
  1681. fs/netfs/buffered_read.c +1 −2
  1682. fs/netfs/direct_read.c +1 −2
  1683. fs/netfs/direct_write.c +11 −4
  1684. fs/netfs/iterator.c +43 −0
  1685. fs/netfs/read_collect.c +2 −2
  1686. fs/netfs/read_retry.c +4 −1
  1687. fs/netfs/read_single.c +0 −1
  1688. fs/netfs/write_collect.c +2 −2
  1689. fs/netfs/write_issue.c +1 −2
  1690. fs/nfs/Kconfig +2 −1
  1691. fs/nfs/nfs3proc.c +6 −1
  1692. fs/nfsd/export.c +54 −9
  1693. fs/nfsd/export.h +5 −2
  1694. fs/nfsd/nfs4xdr.c +7 −2
  1695. fs/nfsd/nfsctl.c +19 −3
  1696. fs/nfsd/state.h +12 −5
  1697. fs/overlayfs/copy_up.c +3 −3
  1698. fs/overlayfs/overlayfs.h +21 −0
  1699. fs/overlayfs/ovl_entry.h +1 −6
  1700. fs/overlayfs/params.c +28 −5
  1701. fs/overlayfs/super.c +1 −1
  1702. fs/overlayfs/util.c +4 −1
  1703. fs/proc/meminfo.c +6 −0
  1704. fs/smb/client/Makefile +4 −3
  1705. fs/smb/client/cifsacl.c +1 −1
  1706. fs/smb/client/cifsfs.c +1 −1
  1707. fs/smb/client/cifsglob.h +23 −6
  1708. fs/smb/client/cifsproto.h +22 −4
  1709. fs/smb/client/connect.c +4 −0
  1710. fs/smb/client/dir.c +2 −2
  1711. fs/smb/client/file.c +70 −62
  1712. fs/smb/client/fs_context.c +5 −1
  1713. fs/smb/client/inode.c +9 −18
  1714. fs/smb/client/smb1ops.c +1 −1
  1715. fs/smb/client/smb1transport.c +1 −1
  1716. fs/smb/client/smb2inode.c +10 −12
  1717. fs/smb/client/smb2maperror.c +6 −3
  1718. fs/smb/client/smb2ops.c +18 −20
  1719. fs/smb/client/smb2pdu.c +4 −1
  1720. fs/smb/server/auth.c +2 −20
  1721. fs/smb/server/mgmt/tree_connect.c +6 −3
  1722. fs/smb/server/oplock.c +65 −32
  1723. fs/smb/server/oplock.h +3 −2
  1724. fs/smb/server/smb2pdu.c +157 −62
  1725. fs/smb/server/smbacl.c +43 −0
  1726. fs/smb/server/smbacl.h +2 −0
  1727. fs/smb/server/vfs_cache.c +5 −5
  1728. fs/tests/exec_kunit.c +0 −3
  1729. fs/udf/inode.c +15 −18
  1730. fs/xfs/libxfs/xfs_attr.h +2 −1
  1731. fs/xfs/libxfs/xfs_attr_leaf.c +22 −0
  1732. fs/xfs/libxfs/xfs_attr_leaf.h +3 −0
  1733. fs/xfs/libxfs/xfs_da_btree.c +44 −17
  1734. fs/xfs/libxfs/xfs_da_btree.h +2 −0
  1735. fs/xfs/libxfs/xfs_defer.c +1 −1
  1736. fs/xfs/scrub/quota.c +3 −1
  1737. fs/xfs/scrub/trace.h +2 −10
  1738. fs/xfs/xfs_attr_inactive.c +57 −38
  1739. fs/xfs/xfs_attr_item.c +2 −49
  1740. fs/xfs/xfs_bmap_item.c +1 −1
  1741. fs/xfs/xfs_dquot.c +7 −1
  1742. fs/xfs/xfs_dquot_item.c +7 −2
  1743. fs/xfs/xfs_handle.c +1 −1
  1744. fs/xfs/xfs_healthmon.c +10 −7
  1745. fs/xfs/xfs_icache.c +0 −1
  1746. fs/xfs/xfs_inode.c +2 −1
  1747. fs/xfs/xfs_inode_item.c +7 −2
  1748. fs/xfs/xfs_log.c +2 −0
  1749. fs/xfs/xfs_mount.c +4 −3
  1750. fs/xfs/xfs_trace.h +34 −13
  1751. fs/xfs/xfs_trans_ail.c +75 −52
  1752. fs/xfs/xfs_verify_media.c +8 −10
  1753. fs/xfs/xfs_xattr.c +1 −1
  1754. fs/xfs/xfs_zone_gc.c +0 −2
  1755. include/crypto/if_alg.h +2 −3
  1756. include/drm/bridge/dw_hdmi_qp.h +1 −1
  1757. include/drm/display/drm_hdmi_helper.h +2 −1
  1758. include/drm/drm_atomic.h +0 −1
  1759. include/drm/drm_blend.h +3 −1
  1760. include/drm/drm_bridge.h +4 −2
  1761. include/drm/drm_connector.h +35 −13
  1762. include/drm/drm_crtc.h +12 −0
  1763. include/drm/drm_mipi_dbi.h +89 −56
  1764. include/drm/drm_mipi_dsi.h +4 −0
  1765. include/drm/drm_mode_config.h +5 −0
  1766. include/drm/drm_simple_kms_helper.h +5 −211
  1767. include/drm/intel/step.h +62 −0
  1768. include/drm/ttm/ttm_backup.h +1 −1
  1769. include/drm/ttm/ttm_bo.h +19 −9
  1770. include/drm/ttm/ttm_pool.h +3 −4
  1771. include/hyperv/hvgdk_mini.h +2 −1
  1772. include/linux/auxvec.h +1 −1
  1773. include/linux/bpf.h +4 −0
  1774. include/linux/build_bug.h +3 −1
  1775. include/linux/cgroup-defs.h +3 −0
  1776. include/linux/console_struct.h +1 −0
  1777. include/linux/damon.h +6 −0
  1778. include/linux/device.h +54 −0
  1779. include/linux/device/bus.h +4 −0
  1780. include/linux/dma-mapping.h +13 −6
  1781. include/linux/etherdevice.h +2 −1
  1782. include/linux/firmware/intel/stratix10-svc-client.h +4 −4
  1783. include/linux/fs/super_types.h +1 −0
  1784. include/linux/gpio/gpio-nomadik.h +5 −7
  1785. include/linux/hid.h +1 −0
  1786. include/linux/if_ether.h +2 −1
  1787. include/linux/iio/iio.h +12 −0
  1788. include/linux/io-pgtable.h +8 −2
  1789. include/linux/io_uring_types.h +4 −0
  1790. include/linux/iommu.h +2 −1
  1791. include/linux/ipv6.h +6 −1
  1792. include/linux/kvm_host.h +35 −48
  1793. include/linux/leafops.h +21 −11
  1794. include/linux/lis3lv02d.h +2 −2
  1795. include/linux/local_lock_internal.h +1 −1
  1796. include/linux/math.h +1 −17
  1797. include/linux/mempolicy.h +1 −0
  1798. include/linux/mm.h +6 −11
  1799. include/linux/mmu_notifier.h +16 −15
  1800. include/linux/mmzone.h +2 −0
  1801. include/linux/mpage.h +9 −2
  1802. include/linux/netdevice.h +37 −4
  1803. include/linux/netfilter/ipset/ip_set.h +1 −1
  1804. include/linux/netfs.h +0 −1
  1805. include/linux/nvme-auth.h +1 −1
  1806. include/linux/pagemap.h +0 −11
  1807. include/linux/platform_device.h +0 −5
  1808. include/linux/rseq_types.h +5 −1
  1809. include/linux/sched.h +0 −2
  1810. include/linux/security.h +1 −0
  1811. include/linux/serial_8250.h +1 −0
  1812. include/linux/skbuff.h +1 −0
  1813. include/linux/spi/spi.h +0 −5
  1814. include/linux/srcutiny.h +4 −0
  1815. include/linux/srcutree.h +5 −4
  1816. include/linux/timb_gpio.h +3 −3
  1817. include/linux/tracepoint.h +20 −0
  1818. include/linux/uaccess.h +2 −2
  1819. include/linux/usb.h +14 −4
  1820. include/linux/usb/quirks.h +3 −0
  1821. include/linux/usb/usbnet.h +1 −0
  1822. include/linux/virtio_net.h +49 −4
  1823. include/net/bluetooth/l2cap.h +1 −0
  1824. include/net/codel_impl.h +1 −0
  1825. include/net/inet_hashtables.h +14 −0
  1826. include/net/ip6_fib.h +20 −1
  1827. include/net/ip6_tunnel.h +14 −0
  1828. include/net/ip_tunnels.h +30 −7
  1829. include/net/mac80211.h +3 −1
  1830. include/net/netfilter/nf_conntrack_core.h +5 −0
  1831. include/net/netfilter/nf_conntrack_expect.h +18 −2
  1832. include/net/netfilter/nf_tables.h +2 −4
  1833. include/net/netns/mpls.h +1 −0
  1834. include/net/netns/xfrm.h +1 −1
  1835. include/net/page_pool/types.h +1 −1
  1836. include/net/sch_generic.h +33 −0
  1837. include/net/udp_tunnel.h +1 −1
  1838. include/sound/sdca_function.h +0 −5
  1839. include/trace/events/btrfs.h +7 −4
  1840. include/trace/events/dma.h +3 −1
  1841. include/trace/events/netfs.h +4 −4
  1842. include/trace/events/task.h +5 −2
  1843. include/uapi/drm/amdxdna_accel.h +40 −4
  1844. include/uapi/drm/drm_mode.h +80 −0
  1845. include/uapi/drm/msm_drm.h +1 −0
  1846. include/uapi/drm/panthor_drm.h +61 −2
  1847. include/uapi/linux/const.h +18 −0
  1848. include/uapi/linux/kvm.h +8 −0
  1849. include/uapi/linux/netfilter/nf_conntrack_common.h +4 −0
  1850. init/Kconfig +1 −1
  1851. io_uring/bpf_filter.c +1 −1
  1852. io_uring/eventfd.c +7 −3
  1853. io_uring/fdinfo.c +3 −1
  1854. io_uring/io_uring.c +8 −3
  1855. io_uring/io_uring.h +29 −5
  1856. io_uring/kbuf.c +22 −5
  1857. io_uring/net.c +4 −0
  1858. io_uring/poll.c +7 −2
  1859. io_uring/register.c +22 −3
  1860. io_uring/rsrc.c +4 −0
  1861. io_uring/tw.c +20 −2
  1862. io_uring/wait.c +31 −19
  1863. io_uring/wait.h +5 −2
  1864. kernel/bpf/btf.c +20 −4
  1865. kernel/bpf/core.c +35 −8
  1866. kernel/bpf/syscall.c +23 −2
  1867. kernel/bpf/verifier.c +57 −13
  1868. kernel/cgroup/cgroup.c +91 −3
  1869. kernel/cgroup/cpuset.c +51 −37
  1870. kernel/crash_dump_dm_crypt.c +2 −2
  1871. kernel/dma/debug.c +5 −4
  1872. kernel/dma/direct.h +4 −3
  1873. kernel/dma/mapping.c +6 −0
  1874. kernel/dma/swiotlb.c +19 −2
  1875. kernel/events/core.c +8 −11
  1876. kernel/fork.c +1 −2
  1877. kernel/futex/core.c +1 −1
  1878. kernel/futex/pi.c +2 −1
  1879. kernel/futex/syscalls.c +8 −0
  1880. kernel/kprobes.c +6 −2
  1881. kernel/power/em_netlink.c +2 −0
  1882. kernel/power/main.c +1 −1
  1883. kernel/power/snapshot.c +11 −0
  1884. kernel/rcu/rcu.h +9 −0
  1885. kernel/rcu/srcutiny.c +18 −1
  1886. kernel/rcu/srcutree.c +102 −109
  1887. kernel/sched/core.c +28 −51
  1888. kernel/sched/debug.c +3 −1
  1889. kernel/sched/ext.c +116 −50
  1890. kernel/sched/ext_idle.c +20 −13
  1891. kernel/sched/ext_internal.h +98 −16
  1892. kernel/sched/fair.c +3 −7
  1893. kernel/sched/idle.c +30 −9
  1894. kernel/sched/sched.h +3 −0
  1895. kernel/sysctl.c +1 −1
  1896. kernel/time/alarmtimer.c +1 −1
  1897. kernel/time/time.c +1 −1
  1898. kernel/trace/bpf_trace.c +4 −0
  1899. kernel/trace/ftrace.c +2 −2
  1900. kernel/trace/ring_buffer.c +1 −1
  1901. kernel/trace/trace.c +27 −9
  1902. kernel/trace/trace_events_trigger.c +66 −13
  1903. kernel/trace/trace_osnoise.c +5 −5
  1904. kernel/workqueue.c +50 −30
  1905. kernel/workqueue_internal.h +1 −0
  1906. lib/bootconfig.c +5 −4
  1907. lib/bug.c +2 −5
  1908. lib/crypto/Makefile +3 −0
  1909. lib/crypto/chacha-block-generic.c +4 −0
  1910. mm/cma.c +4 −1
  1911. mm/damon/core.c +14 −1
  1912. mm/damon/stat.c +50 −3
  1913. mm/damon/sysfs.c +9 −1
  1914. mm/hmm.c +2 −2
  1915. mm/huge_memory.c +11 −5
  1916. mm/hugetlb.c +2 −2
  1917. mm/list_lru.c +1 −0
  1918. mm/memcontrol.c +1 −1
  1919. mm/memfd_luo.c +43 −6
  1920. mm/memory.c +15 −3
  1921. mm/mempolicy.c +8 −2
  1922. mm/mseal.c +1 −2
  1923. mm/pagewalk.c +22 −3
  1924. mm/rmap.c +24 −4
  1925. mm/show_mem.c +5 −1
  1926. mm/slub.c +4 −7
  1927. mm/swap_state.c +4 −5
  1928. mm/vmstat.c +2 −0
  1929. mm/zswap.c +7 −1
  1930. net/atm/lec.c +47 −25
  1931. net/atm/lec.h +1 −1
  1932. net/batman-adv/bat_iv_ogm.c +3 −0
  1933. net/bluetooth/hci_conn.c +10 −4
  1934. net/bluetooth/hci_core.c +1 −1
  1935. net/bluetooth/hci_event.c +55 −72
  1936. net/bluetooth/hci_sync.c +73 −37
  1937. net/bluetooth/hidp/core.c +14 −2
  1938. net/bluetooth/l2cap_core.c +84 −38
  1939. net/bluetooth/l2cap_sock.c +3 −0
  1940. net/bluetooth/mgmt.c +17 −9
  1941. net/bluetooth/sco.c +28 −8
  1942. net/bluetooth/smp.c +7 −6
  1943. net/bridge/br_arp_nd_proxy.c +11 −7
  1944. net/bridge/br_cfm.c +2 −2
  1945. net/bridge/br_mrp_netlink.c +2 −2
  1946. net/can/af_can.c +2 −2
  1947. net/can/af_can.h +1 −1
  1948. net/can/gw.c +3 −3
  1949. net/can/isotp.c +18 −6
  1950. net/can/proc.c +2 −1
  1951. net/ceph/auth.c +4 −2
  1952. net/ceph/messenger_v2.c +21 −10
  1953. net/ceph/mon_client.c +3 −3
  1954. net/core/dev.c +25 −8
  1955. net/core/dev.h +0 −35
  1956. net/core/filter.c +7 −0
  1957. net/core/neighbour.c +2 −1
  1958. net/core/page_pool_user.c +2 −2
  1959. net/core/rtnetlink.c +25 −3
  1960. net/core/skmsg.c +8 −5
  1961. net/ethernet/eth.c +3 −6
  1962. net/hsr/hsr_device.c +17 −15
  1963. net/hsr/hsr_framereg.c +36 −2
  1964. net/ipv4/af_inet.c +6 −0
  1965. net/ipv4/esp4.c +6 −3
  1966. net/ipv4/icmp.c +3 −1
  1967. net/ipv4/inet_connection_sock.c +3 −17
  1968. net/ipv4/ip_gre.c +2 −1
  1969. net/ipv4/ip_tunnel_core.c +15 −0
  1970. net/ipv4/nexthop.c +11 −3
  1971. net/ipv4/udp.c +1 −1
  1972. net/ipv6/addrconf.c +5 −5
  1973. net/ipv6/af_inet6.c +0 −8
  1974. net/ipv6/datagram.c +10 −0
  1975. net/ipv6/esp6.c +6 −3
  1976. net/ipv6/exthdrs.c +4 −0
  1977. net/ipv6/icmp.c +3 −0
  1978. net/ipv6/ioam6.c +2 −2
  1979. net/ipv6/ip6_fib.c +24 −5
  1980. net/ipv6/ip6_flowlabel.c +0 −5
  1981. net/ipv6/ip6_tunnel.c +5 −0
  1982. net/ipv6/ndisc.c +3 −0
  1983. net/ipv6/netfilter/ip6t_rt.c +4 −0
  1984. net/ipv6/route.c +1 −1
  1985. net/ipv6/seg6_hmac.c +2 −0
  1986. net/key/af_key.c +12 −7
  1987. net/mac80211/cfg.c +6 −6
  1988. net/mac80211/chan.c +4 −2
  1989. net/mac80211/debugfs.c +5 −9
  1990. net/mac80211/mesh.c +3 −0
  1991. net/mac80211/sta_info.c +5 −2
  1992. net/mac80211/tdls.c +1 −1
  1993. net/mac80211/tx.c +3 −1
  1994. net/mac802154/iface.c +3 −1
  1995. net/mctp/route.c +7 −4
  1996. net/mpls/af_mpls.c +26 −4
  1997. net/mptcp/pm_kernel.c +1 −1
  1998. net/mptcp/protocol.c +8 −3
  1999. net/ncsi/ncsi-aen.c +2 −1
  2000. net/ncsi/ncsi-rsp.c +12 −4
  2001. net/netfilter/ipset/ip_set_core.c +2 −2
  2002. net/netfilter/ipset/ip_set_hash_gen.h +1 −1
  2003. net/netfilter/ipset/ip_set_list_set.c +2 −2
  2004. net/netfilter/nf_bpf_link.c +1 −1
  2005. net/netfilter/nf_conntrack_broadcast.c +6 −2
  2006. net/netfilter/nf_conntrack_ecache.c +2 −0
  2007. net/netfilter/nf_conntrack_expect.c +34 −5
  2008. net/netfilter/nf_conntrack_h323_asn1.c +4 −0
  2009. net/netfilter/nf_conntrack_h323_main.c +6 −6
  2010. net/netfilter/nf_conntrack_helper.c +7 −6
  2011. net/netfilter/nf_conntrack_netlink.c +79 −80
  2012. net/netfilter/nf_conntrack_proto_sctp.c +2 −1
  2013. net/netfilter/nf_conntrack_proto_tcp.c +3 −7
  2014. net/netfilter/nf_conntrack_sip.c +17 −7
  2015. net/netfilter/nf_flow_table_ip.c +1 −0
  2016. net/netfilter/nf_flow_table_offload.c +130 −66
  2017. net/netfilter/nf_tables_api.c +13 −24
  2018. net/netfilter/nfnetlink_cthelper.c +4 −4
  2019. net/netfilter/nfnetlink_log.c +3 −7
  2020. net/netfilter/nfnetlink_osf.c +13 −0
  2021. net/netfilter/nfnetlink_queue.c +3 −1
  2022. net/netfilter/nft_chain_filter.c +1 −1
  2023. net/netfilter/nft_ct.c +4 −0
  2024. net/netfilter/nft_dynset.c +9 −1
  2025. net/netfilter/nft_set_pipapo.c +2 −1
  2026. net/netfilter/nft_set_pipapo_avx2.c +10 −10
  2027. net/netfilter/nft_set_rbtree.c +85 −78
  2028. net/netfilter/x_tables.c +23 −0
  2029. net/netfilter/xt_CT.c +4 −0
  2030. net/netfilter/xt_IDLETIMER.c +6 −0
  2031. net/netfilter/xt_cgroup.c +6 −0
  2032. net/netfilter/xt_dccp.c +2 −2
  2033. net/netfilter/xt_rateest.c +5 −0
  2034. net/netfilter/xt_tcpudp.c +4 −2
  2035. net/netfilter/xt_time.c +2 −2
  2036. net/nfc/nci/core.c +6 −4
  2037. net/openvswitch/flow_netlink.c +2 −0
  2038. net/openvswitch/vport-netdev.c +8 −3
  2039. net/packet/af_packet.c +1 −0
  2040. net/phonet/af_phonet.c +4 −1
  2041. net/qrtr/af_qrtr.c +13 −18
  2042. net/rds/ib_rdma.c +6 −1
  2043. net/rose/af_rose.c +5 −0
  2044. net/rxrpc/af_rxrpc.c +5 −3
  2045. net/sched/cls_api.c +1 −0
  2046. net/sched/cls_flow.c +9 −1
  2047. net/sched/cls_fw.c +12 −2
  2048. net/sched/sch_generic.c +0 −27
  2049. net/sched/sch_hfsc.c +2 −2
  2050. net/sched/sch_ingress.c +8 −6
  2051. net/sched/sch_netem.c +3 −2
  2052. net/sched/sch_teql.c +3 −5
  2053. net/shaper/shaper.c +95 −74
  2054. net/shaper/shaper_nl_gen.c +6 −6
  2055. net/shaper/shaper_nl_gen.h +5 −0
  2056. net/smc/af_smc.c +17 −6
  2057. net/smc/smc.h +5 −0
  2058. net/smc/smc_close.c +1 −1
  2059. net/smc/smc_rx.c +8 −1
  2060. net/sunrpc/cache.c +21 −5
  2061. net/sunrpc/xprtrdma/verbs.c +4 −3
  2062. net/tipc/socket.c +2 −0
  2063. net/tls/tls_sw.c +1 −1
  2064. net/unix/af_unix.c +2 −0
  2065. net/unix/af_unix.h +1 −0
  2066. net/unix/garbage.c +51 −28
  2067. net/vmw_vsock/af_vsock.c +1 −0
  2068. net/wireless/pmsr.c +1 −0
  2069. net/x25/x25_in.c +6 −3
  2070. net/x25/x25_subr.c +1 −0
  2071. net/xfrm/xfrm_input.c +4 −1
  2072. net/xfrm/xfrm_iptfs.c +14 −3
  2073. net/xfrm/xfrm_nat_keepalive.c +1 −1
  2074. net/xfrm/xfrm_policy.c +7 −5
  2075. net/xfrm/xfrm_state.c +64 −52
  2076. net/xfrm/xfrm_user.c +22 −10
  2077. rust/Makefile +5 −6
  2078. rust/bindings/bindings_helper.h +14 −0
  2079. rust/helpers/device.c +5 −0
  2080. rust/helpers/dma-resv.c +14 −0
  2081. rust/helpers/drm.c +55 −1
  2082. rust/helpers/gpu.c +17 −0
  2083. rust/helpers/helpers.c +3 −0
  2084. rust/helpers/list.c +17 −0
  2085. rust/kernel/cpufreq.rs +1 −0
  2086. rust/kernel/device.rs +13 −2
  2087. rust/kernel/dma.rs +718 −263
  2088. rust/kernel/drm/device.rs +82 −5
  2089. rust/kernel/drm/driver.rs +6 −4
  2090. rust/kernel/drm/file.rs +6 −2
  2091. rust/kernel/drm/gem/mod.rs +80 −24
  2092. rust/kernel/drm/gem/shmem.rs +228 −0
  2093. rust/kernel/error.rs +1 −0
  2094. rust/kernel/gpu.rs +6 −0
  2095. rust/kernel/gpu/buddy.rs +614 −0
  2096. rust/kernel/interop.rs +9 −0
  2097. rust/kernel/interop/list.rs +339 −0
  2098. rust/kernel/io.rs +490 −290
  2099. rust/kernel/io/mem.rs +6 −4
  2100. rust/kernel/io/register.rs +1260 −0
  2101. rust/kernel/lib.rs +12 −0
  2102. rust/kernel/num/bounded.rs +68 −2
  2103. rust/kernel/pci/io.rs +30 −69
  2104. rust/kernel/ptr.rs +29 −1
  2105. rust/kernel/ptr/projection.rs +305 −0
  2106. rust/kernel/regulator.rs +18 −15
  2107. rust/kernel/str.rs +2 −2
  2108. rust/kernel/uaccess.rs +81 −10
  2109. rust/kernel/workqueue.rs +97 −7
  2110. rust/pin-init/internal/src/init.rs +23 −46
  2111. rust/pin-init/src/__internal.rs +24 −4
  2112. samples/landlock/sandboxer.c +3 −2
  2113. samples/rust/rust_dma.rs +25 −18
  2114. samples/rust/rust_driver_pci.rs +68 −22
  2115. samples/workqueue/stall_detector/Makefile +1 −0
  2116. samples/workqueue/stall_detector/wq_stall.c +98 −0
  2117. scripts/Makefile.build +4 −1
  2118. scripts/coccinelle/api/kmalloc_objs.cocci +11 −0
  2119. scripts/kconfig/merge_config.sh +10 −14
  2120. scripts/livepatch/klp-build +4 −5
  2121. security/apparmor/apparmorfs.c +134 −91
  2122. security/apparmor/include/label.h +8 −8
  2123. security/apparmor/include/lib.h +12 −0
  2124. security/apparmor/include/match.h +1 −0
  2125. security/apparmor/include/policy.h +5 −5
  2126. security/apparmor/include/policy_ns.h +2 −0
  2127. security/apparmor/include/policy_unpack.h +45 −30
  2128. security/apparmor/label.c +8 −4
  2129. security/apparmor/match.c +42 −16
  2130. security/apparmor/policy.c +67 −10
  2131. security/apparmor/policy_ns.c +2 −0
  2132. security/apparmor/policy_unpack.c +37 −12
  2133. security/landlock/domain.c +1 −2
  2134. security/landlock/ruleset.c +4 −5
  2135. security/landlock/tsync.c +73 −19
  2136. security/security.c +1 −0
  2137. sound/core/pcm_native.c +16 −3
  2138. sound/firewire/amdtp-stream.c +1 −1
  2139. sound/hda/codecs/realtek/alc269.c +89 −8
  2140. sound/hda/codecs/realtek/alc662.c +9 −0
  2141. sound/hda/controllers/intel.c +13 −1
  2142. sound/pci/asihpi/hpimsgx.c +4 −2
  2143. sound/pci/ctxfi/ctatc.c +7 −3
  2144. sound/pci/ctxfi/ctdaio.c +53 −33
  2145. sound/soc/amd/acp-config.c +14 −1
  2146. sound/soc/amd/acp/acp-mach-common.c +14 −4
  2147. sound/soc/amd/acp/acp-sdw-legacy-mach.c +8 −0
  2148. sound/soc/amd/acp/amd-acp70-acpi-match.c +61 −0
  2149. sound/soc/amd/acp3x-rt5682-max9836.c +7 −2
  2150. sound/soc/amd/ps/pci-ps.c +1 −1
  2151. sound/soc/amd/yc/acp6x-mach.c +28 −0
  2152. sound/soc/cirrus/ep93xx-i2s.c +24 −10
  2153. sound/soc/codecs/adau1372.c +24 −10
  2154. sound/soc/codecs/rt1011.c +1 −1
  2155. sound/soc/codecs/sma1307.c +4 −2
  2156. sound/soc/codecs/tas2781-fmwlib.c +3 −0
  2157. sound/soc/codecs/wcd934x.c +1 −1
  2158. sound/soc/fsl/imx-card.c +2 −0
  2159. sound/soc/generic/simple-card-utils.c +10 −6
  2160. sound/soc/intel/boards/Kconfig +0 −2
  2161. sound/soc/intel/boards/ehl_rt5660.c +1 −1
  2162. sound/soc/intel/catpt/device.c +9 −1
  2163. sound/soc/intel/catpt/dsp.c +0 −3
  2164. sound/soc/qcom/qdsp6/q6apm-dai.c +1 −0
  2165. sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +1 −0
  2166. sound/soc/qcom/qdsp6/q6apm.c +1 −0
  2167. sound/soc/samsung/i2s.c +3 −3
  2168. sound/soc/sdca/sdca_functions.c +10 −4
  2169. sound/soc/soc-core.c +9 −3
  2170. sound/soc/sof/ipc4-topology.c +1 −1
  2171. sound/soc/sof/topology.c +1 −1
  2172. sound/soc/tegra/tegra_audio_graph_card.c +11 −0
  2173. sound/usb/Kconfig +1 −0
  2174. sound/usb/caiaq/device.c +1 −1
  2175. sound/usb/mixer_scarlett2.c +2 −0
  2176. sound/usb/qcom/qc_audio_offload.c +10 −2
  2177. sound/usb/quirks.c +10 −0
  2178. tools/arch/x86/include/asm/amd/ibs.h +1 −1
  2179. tools/arch/x86/include/asm/cpufeatures.h +3 −1
  2180. tools/arch/x86/include/asm/msr-index.h +10 −1
  2181. tools/arch/x86/include/uapi/asm/kvm.h +7 −2
  2182. tools/bootconfig/main.c +5 −2
  2183. tools/bootconfig/samples/bad-non-closed-brace.bconf +4 −0
  2184. tools/bootconfig/samples/bad-over-max-brace.bconf +19 −0
  2185. tools/bootconfig/samples/exp-good-nested-brace.bconf +1 −0
  2186. tools/bootconfig/samples/good-nested-brace.bconf +18 −0
  2187. tools/bootconfig/test-bootconfig.sh +9 −0
  2188. tools/build/Build.include +9 −0
  2189. tools/build/Makefile.build +4 −2
  2190. tools/include/linux/build_bug.h +3 −1
  2191. tools/include/linux/coresight-pmu.h +0 −24
  2192. tools/include/linux/gfp.h +4 −0
  2193. tools/include/linux/gfp_types.h +7 −2
  2194. tools/include/linux/overflow.h +19 −0
  2195. tools/include/linux/slab.h +9 −0
  2196. tools/include/uapi/asm-generic/unistd.h +4 −1
  2197. tools/include/uapi/linux/kvm.h +31 −1
  2198. tools/include/uapi/linux/perf_event.h +1 −1
  2199. tools/objtool/Makefile +1 −1
  2200. tools/objtool/arch/x86/decode.c +23 −39
  2201. tools/objtool/check.c +21 −8
  2202. tools/objtool/elf.c +4 −21
  2203. tools/objtool/include/objtool/warn.h +1 −1
  2204. tools/objtool/klp-diff.c +28 −14
  2205. tools/perf/Makefile.config +18 −0
  2206. tools/perf/Makefile.perf +1 −1
  2207. tools/perf/arch/arm/entry/syscalls/syscall.tbl +1 −0
  2208. tools/perf/arch/arm/util/cs-etm.c +0 −14
  2209. tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl +1 −0
  2210. tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +1 −0
  2211. tools/perf/arch/s390/entry/syscalls/syscall.tbl +392 −467
  2212. tools/perf/arch/sh/entry/syscalls/syscall.tbl +1 −0
  2213. tools/perf/arch/sparc/entry/syscalls/syscall.tbl +2 −1
  2214. tools/perf/arch/x86/entry/syscalls/syscall_32.tbl +1 −0
  2215. tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +1 −0
  2216. tools/perf/arch/xtensa/entry/syscalls/syscall.tbl +1 −0
  2217. tools/perf/builtin-ftrace.c +7 −2
  2218. tools/perf/check-headers.sh +0 −1
  2219. tools/perf/pmu-events/Build +2 −1
  2220. tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h +1 −0
  2221. tools/perf/trace/beauty/include/uapi/linux/fs.h +1 −0
  2222. tools/perf/trace/beauty/include/uapi/linux/mount.h +11 −2
  2223. tools/perf/trace/beauty/include/uapi/linux/prctl.h +37 −0
  2224. tools/perf/util/annotate-arch/annotate-loongarch.c +1 −1
  2225. tools/perf/util/annotate.c +4 −1
  2226. tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +1 −1
  2227. tools/perf/util/cs-etm.c +13 −23
  2228. tools/perf/util/cs-etm.h +15 −0
  2229. tools/perf/util/disasm.c +1 −1
  2230. tools/perf/util/kvm-stat-arch/kvm-stat-x86.c +3 −3
  2231. tools/perf/util/metricgroup.c +3 −3
  2232. tools/perf/util/parse-events.c +65 −17
  2233. tools/perf/util/synthetic-events.c +5 −0
  2234. tools/power/cpupower/cpupower-service.conf +5 −0
  2235. tools/power/cpupower/cpupower.sh +6 −0
  2236. tools/power/cpupower/utils/cpupower-set.c +5 −1
  2237. tools/power/cpupower/utils/helpers/helpers.h +4 −1
  2238. tools/power/cpupower/utils/helpers/misc.c +39 −2
  2239. tools/power/cpupower/utils/powercap-info.c +2 −2
  2240. tools/scripts/syscall.tbl +1 −0
  2241. tools/testing/selftests/bpf/Makefile +1 −1
  2242. tools/testing/selftests/bpf/progs/exceptions_fail.c +53 −3
  2243. tools/testing/selftests/bpf/progs/verifier_bounds.c +94 −0
  2244. tools/testing/selftests/bpf/progs/verifier_bswap.c +22 −0
  2245. tools/testing/selftests/bpf/progs/verifier_linked_scalars.c +108 −0
  2246. tools/testing/selftests/bpf/progs/verifier_precision.c +341 −0
  2247. tools/testing/selftests/bpf/progs/verifier_sdiv.c +58 −0
  2248. tools/testing/selftests/cgroup/lib/cgroup_util.c +15 −0
  2249. tools/testing/selftests/cgroup/lib/include/cgroup_util.h +2 −0
  2250. tools/testing/selftests/cgroup/test_core.c +2 −1
  2251. tools/testing/selftests/cgroup/test_kill.c +4 −3
  2252. tools/testing/selftests/drivers/net/team/Makefile +1 −0
  2253. tools/testing/selftests/drivers/net/team/config +2 −0
  2254. tools/testing/selftests/drivers/net/team/non_ether_header_ops.sh +41 −0
  2255. tools/testing/selftests/hid/progs/hid_bpf_helpers.h +12 −0
  2256. tools/testing/selftests/kvm/Makefile.kvm +2 −0
  2257. tools/testing/selftests/kvm/guest_memfd_test.c +1 −1
  2258. tools/testing/selftests/kvm/include/x86/processor.h +23 −0
  2259. tools/testing/selftests/kvm/include/x86/smm.h +17 −0
  2260. tools/testing/selftests/kvm/lib/x86/processor.c +26 −0
  2261. tools/testing/selftests/kvm/s390/irq_routing.c +75 −0
  2262. tools/testing/selftests/kvm/x86/evmcs_smm_controls_test.c +150 −0
  2263. tools/testing/selftests/kvm/x86/sev_smoke_test.c +30 −0
  2264. tools/testing/selftests/kvm/x86/smm_test.c +2 −25
  2265. tools/testing/selftests/landlock/tsync_test.c +90 −1
  2266. tools/testing/selftests/mount_setattr/mount_setattr_test.c +1 −1
  2267. tools/testing/selftests/net/fib_tests.sh +58 −3
  2268. tools/testing/selftests/net/netfilter/nft_concat_range.sh +69 −1
  2269. tools/testing/selftests/net/rtnetlink.sh +55 −0
  2270. tools/testing/selftests/powerpc/copyloops/.gitignore +2 −2
  2271. tools/testing/selftests/powerpc/copyloops/Makefile +8 −3
  2272. tools/testing/selftests/powerpc/copyloops/stubs.S +0 −8
  2273. tools/testing/selftests/powerpc/copyloops/validate.c +14 −1
  2274. tools/testing/selftests/riscv/vector/validate_v_ptrace.c +11 −8
  2275. tools/testing/selftests/sched_ext/Makefile +1 −0
  2276. tools/testing/selftests/sched_ext/cyclic_kick_wait.bpf.c +68 −0
  2277. tools/testing/selftests/sched_ext/cyclic_kick_wait.c +194 −0
  2278. tools/testing/selftests/sched_ext/util.c +2 −2
  2279. tools/testing/selftests/tc-testing/tc-tests/infra/filter.json +44 −0
  2280. tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json +25 −0
  2281. tools/tracing/rtla/src/timerlat_bpf.h +0 −1
  2282. virt/kvm/binary_stats.c +1 −1
  2283. virt/kvm/kvm_main.c +10 −10
.get_maintainer.ignore+1−0
@@ -1,6 +1,7 @@
11 Alan Cox <alan@lxorguk.ukuu.org.uk>
22 Alan Cox <root@hraefn.swansea.linux.org.uk>
33 Alyssa Rosenzweig <alyssa@rosenzweig.io>
4+Askar Safin <safinaskar@gmail.com>
45 Christoph Hellwig <hch@lst.de>
56 Jeff Kirsher <jeffrey.t.kirsher@intel.com>
67 Marc Gonzalez <marc.w.gonzalez@free.fr>
.mailmap+6−1
@@ -196,6 +196,7 @@ Christophe Leroy <chleroy@kernel.org> <christophe.leroy2@cs-soprasteria.com> · 195 unmodified lines
196196 Christophe Ricard <christophe.ricard@gmail.com>
197197 Christopher Obbard <christopher.obbard@linaro.org> <chris.obbard@collabora.com>
198198 Christoph Hellwig <hch@lst.de>
199+Christoph Manszewski <c.manszewski@gmail.com> <christoph.manszewski@intel.com>
199200 Chuck Lever <chuck.lever@oracle.com> <cel@kernel.org>
200201 Chuck Lever <chuck.lever@oracle.com> <cel@netapp.com>
201202 Chuck Lever <chuck.lever@oracle.com> <cel@citi.umich.edu>
@@ -316,6 +317,7 @@ Hans Verkuil <hverkuil@kernel.org> <hverkuil-cisco@xs4all.nl> · 114 unmodified lines
316317 Hans Verkuil <hverkuil@kernel.org> <hansverk@cisco.com>
317318 Hao Ge <hao.ge@linux.dev> <gehao@kylinos.cn>
318319 Harry Yoo <harry.yoo@oracle.com> <42.hyeyoo@gmail.com>
320+Harry Yoo <harry@kernel.org> <harry.yoo@oracle.com>
319321 Heiko Carstens <hca@linux.ibm.com> <h.carstens@de.ibm.com>
320322 Heiko Carstens <hca@linux.ibm.com> <heiko.carstens@de.ibm.com>
321323 Heiko Stuebner <heiko@sntech.de> <heiko.stuebner@bqreaders.com>
@@ -327,6 +329,7 @@ Henrik Rydberg <rydberg@bitmath.org> · 5 unmodified lines
327329 Herbert Xu <herbert@gondor.apana.org.au>
328330 Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com>
329331 Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn>
332+Ignat Korchagin <ignat@linux.win> <ignat@cloudflare.com>
330333 Ike Panhc <ikepanhc@gmail.com> <ike.pan@canonical.com>
331334 J. Bruce Fields <bfields@fieldses.org> <bfields@redhat.com>
332335 J. Bruce Fields <bfields@fieldses.org> <bfields@citi.umich.edu>
@@ -498,7 +501,8 @@ Lior David <quic_liord@quicinc.com> <liord@codeaurora.org> · 165 unmodified lines
498501 Loic Poulain <loic.poulain@oss.qualcomm.com> <loic.poulain@linaro.org>
499502 Loic Poulain <loic.poulain@oss.qualcomm.com> <loic.poulain@intel.com>
500503 Lorenzo Pieralisi <lpieralisi@kernel.org> <lorenzo.pieralisi@arm.com>
501−Lorenzo Stoakes <lorenzo.stoakes@oracle.com> <lstoakes@gmail.com>
504+Lorenzo Stoakes <ljs@kernel.org> <lstoakes@gmail.com>
505+Lorenzo Stoakes <ljs@kernel.org> <lorenzo.stoakes@oracle.com>
502506 Luca Ceresoli <luca.ceresoli@bootlin.com> <luca@lucaceresoli.net>
503507 Luca Weiss <luca@lucaweiss.eu> <luca@z3ntu.xyz>
504508 Lucas De Marchi <demarchi@kernel.org> <lucas.demarchi@intel.com>
@@ -585,6 +589,7 @@ Morten Welinder <terra@gnome.org> · 80 unmodified lines
585589 Morten Welinder <welinder@anemone.rentec.com>
586590 Morten Welinder <welinder@darter.rentec.com>
587591 Morten Welinder <welinder@troll.com>
592+Muhammad Usama Anjum <usama.anjum@arm.com> <usama.anjum@collabora.com>
588593 Mukesh Ojha <quic_mojha@quicinc.com> <mojha@codeaurora.org>
589594 Muna Sinada <quic_msinada@quicinc.com> <msinada@codeaurora.org>
590595 Murali Nalajala <quic_mnalajal@quicinc.com> <mnalajal@codeaurora.org>
Documentation/ABI/testing/sysfs-block-zram+2−2
@@ -151,11 +151,11 @@ Description: · 150 unmodified lines
151151 The algorithm_params file is write-only and is used to setup
152152 compression algorithm parameters.
153153
154−What: /sys/block/zram<id>/writeback_compressed
154+What: /sys/block/zram<id>/compressed_writeback
155155 Date: Decemeber 2025
156156 Contact: Richard Chang <richardycc@google.com>
157157 Description:
158− The writeback_compressed device atrribute toggles compressed
158+ The compressed_writeback device atrribute toggles compressed
159159 writeback feature.
160160
161161 What: /sys/block/zram<id>/writeback_batch_size
Documentation/PCI/pcieaer-howto.rst+10−0
@@ -85,6 +85,16 @@ In the example, 'Requester ID' means the ID of the device that sent · 84 unmodified lines
8585 the error message to the Root Port. Please refer to PCIe specs for other
8686 fields.
8787
88+The 'TLP Header' is the prefix/header of the TLP that caused the error
89+in raw hex format. To decode the TLP Header into human-readable form
90+one may use tlp-tool:
91+
92+https://github.com/mmpg-x86/tlp-tool
93+
94+Example usage::
95+
96+ curl -L https://git.kernel.org/linus/2ca1c94ce0b6 | rtlp-tool --aer
97+
8898 AER Ratelimits
8999 --------------
90100
Documentation/admin-guide/blockdev/zram.rst+3−3
@@ -216,7 +216,7 @@ writeback_limit WO specifies the maximum amount of write IO zram · 215 unmodified lines
216216 writeback_limit_enable RW show and set writeback_limit feature
217217 writeback_batch_size RW show and set maximum number of in-flight
218218 writeback operations
219−writeback_compressed RW show and set compressed writeback feature
219+compressed_writeback RW show and set compressed writeback feature
220220 comp_algorithm RW show and change the compression algorithm
221221 algorithm_params WO setup compression algorithm parameters
222222 compact WO trigger memory compaction
@@ -439,11 +439,11 @@ budget in next setting is user's job. · 216 unmodified lines
439439 By default zram stores written back pages in decompressed (raw) form, which
440440 means that writeback operation involves decompression of the page before
441441 writing it to the backing device. This behavior can be changed by enabling
442−`writeback_compressed` feature, which causes zram to write compressed pages
442+`compressed_writeback` feature, which causes zram to write compressed pages
443443 to the backing device, thus avoiding decompression overhead. To enable
444444 this feature, execute::
445445
446− $ echo yes > /sys/block/zramX/writeback_compressed
446+ $ echo yes > /sys/block/zramX/compressed_writeback
447447
448448 Note that this feature should be configured before the `zramX` device is
449449 initialized.
Documentation/admin-guide/kernel-parameters.txt+3−0
@@ -8196,6 +8196,9 @@ Kernel parameters · 8195 unmodified lines
81968196 p = USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT
81978197 (Reduce timeout of the SET_ADDRESS
81988198 request from 5000 ms to 500 ms);
8199+ q = USB_QUIRK_FORCE_ONE_CONFIG (Device
8200+ claims zero configurations,
8201+ forcing to 1);
81998202 Example: quirks=0781:5580:bk,0a5c:5834:gij
82008203
82018204 usbhid.mousepoll=
Documentation/core-api/dma-attributes.rst+30−8
@@ -149,11 +149,33 @@ For architectures that require cache flushing for DMA coherence · 148 unmodified lines
149149 DMA_ATTR_MMIO will not perform any cache flushing. The address
150150 provided must never be mapped cacheable into the CPU.
151151
152−DMA_ATTR_CPU_CACHE_CLEAN
153−------------------------
154−
155−This attribute indicates the CPU will not dirty any cacheline overlapping this
156−DMA_FROM_DEVICE/DMA_BIDIRECTIONAL buffer while it is mapped. This allows
157−multiple small buffers to safely share a cacheline without risk of data
158−corruption, suppressing DMA debug warnings about overlapping mappings.
159−All mappings sharing a cacheline should have this attribute.
152+DMA_ATTR_DEBUGGING_IGNORE_CACHELINES
153+------------------------------------
154+
155+This attribute indicates that CPU cache lines may overlap for buffers mapped
156+with DMA_FROM_DEVICE or DMA_BIDIRECTIONAL.
157+
158+Such overlap may occur when callers map multiple small buffers that reside
159+within the same cache line. In this case, callers must guarantee that the CPU
160+will not dirty these cache lines after the mappings are established. When this
161+condition is met, multiple buffers can safely share a cache line without risking
162+data corruption.
163+
164+All mappings that share a cache line must set this attribute to suppress DMA
165+debug warnings about overlapping mappings.
166+
167+DMA_ATTR_REQUIRE_COHERENT
168+-------------------------
169+
170+DMA mapping requests with the DMA_ATTR_REQUIRE_COHERENT fail on any
171+system where SWIOTLB or cache management is required. This should only
172+be used to support uAPI designs that require continuous HW DMA
173+coherence with userspace processes, for example RDMA and DRM. At a
174+minimum the memory being mapped must be userspace memory from
175+pin_user_pages() or similar.
176+
177+Drivers should consider using dma_mmap_pages() instead of this
178+interface when building their uAPIs, when possible.
179+
180+It must never be used in an in-kernel driver that only works with
181+kernel memory.
Documentation/dev-tools/kunit/run_wrapper.rst+2−0
@@ -336,6 +336,8 @@ command line arguments: · 335 unmodified lines
336336 - ``--list_tests_attr``: If set, lists all tests that will be run and all of their
337337 attributes.
338338
339+- ``--list_suites``: If set, lists all suites that will be run.
340+
339341 Command-line completion
340342 ==============================
341343
Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml+1−1
@@ -66,7 +66,7 @@ then: · 65 unmodified lines
6666 required:
6767 - refresh-rate-hz
6868
69−additionalProperties: false
69+unevaluatedProperties: false
7070
7171 examples:
7272 - |
Documentation/devicetree/bindings/connector/usb-connector.yaml+1−0
@@ -301,6 +301,7 @@ properties: · 300 unmodified lines
301301 maxItems: 4
302302
303303 dependencies:
304+ pd-disable: [typec-power-opmode]
304305 sink-vdos-v1: [ sink-vdos ]
305306 sink-vdos: [ sink-vdos-v1 ]
306307
Documentation/devicetree/bindings/display/arm,komeda.yaml+3−1
@@ -19,7 +19,9 @@ properties: · 18 unmodified lines
1919 compatible:
2020 oneOf:
2121 - items:
22− - const: arm,mali-d32
22+ - enum:
23+ - arm,mali-d32
24+ - armchina,linlon-d6
2325 - const: arm,mali-d71
2426 - const: arm,mali-d71
2527
Documentation/devicetree/bindings/display/bridge/lontium,lt8713sx.yaml+113−0
@@ -0,0 +1,113 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/display/bridge/lontium,lt8713sx.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: Lontium LT8713SX Type-C/DP1.4 to Type-C/DP1.4/HDMI2.0/DP++ bridge-hub
8+
9+maintainers:
10+ - Vishnu Saini <vishnu.saini@oss.qualcomm.com>
11+
12+description:
13+ The Lontium LT8713SX is a Type-C/DP1.4 to Type-C/DP1.4/HDMI2.0 converter
14+ that integrates one DP input and up to three configurable output interfaces
15+ (DP1.4 / HDMI2.0 / DP++), with SST/MST functionality and audio support.
16+
17+properties:
18+ compatible:
19+ enum:
20+ - lontium,lt8713sx
21+
22+ reg:
23+ maxItems: 1
24+
25+ vcc-supply:
26+ description: Regulator for 3.3V vcc.
27+
28+ vdd-supply:
29+ description: Regulator for 1.1V vdd.
30+
31+ reset-gpios:
32+ description: GPIO connected to active low RESET pin.
33+
34+ ports:
35+ $ref: /schemas/graph.yaml#/properties/ports
36+
37+ properties:
38+ port@0:
39+ $ref: /schemas/graph.yaml#/properties/port
40+ description:
41+ DP port for DP input from soc to bridge chip
42+
43+ port@1:
44+ $ref: /schemas/graph.yaml#/properties/port
45+ description:
46+ DP port for DP output from bridge
47+
48+ port@2:
49+ $ref: /schemas/graph.yaml#/properties/port
50+ description:
51+ Additional DP port for DP output from bridge
52+
53+ port@3:
54+ $ref: /schemas/graph.yaml#/properties/port
55+ description:
56+ Additional DP port for DP output from bridge
57+
58+ required:
59+ - port@0
60+
61+required:
62+ - compatible
63+ - reg
64+ - ports
65+
66+additionalProperties: false
67+
68+examples:
69+ - |
70+ #include <dt-bindings/gpio/gpio.h>
71+
72+ i2c {
73+ #address-cells = <1>;
74+ #size-cells = <0>;
75+ bridge@4f {
76+ compatible = "lontium,lt8713sx";
77+ reg = <0x4f>;
78+ reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
79+
80+ ports {
81+ #address-cells = <1>;
82+ #size-cells = <0>;
83+
84+ port@0 {
85+ reg = <0>;
86+ lt8713sx_dp_in: endpoint {
87+ remote-endpoint = <&mdss_dp0_out>;
88+ };
89+ };
90+
91+ port@1 {
92+ reg = <1>;
93+ lt8713sx_dp0_out: endpoint {
94+ remote-endpoint = <&dp0_connector_in>;
95+ };
96+ };
97+
98+ port@2 {
99+ reg = <2>;
100+ lt8713sx_dp1_out: endpoint {
101+ remote-endpoint = <&dp1_connector_in>;
102+ };
103+ };
104+
105+ port@3 {
106+ reg = <3>;
107+ lt8713sx_dp2_out: endpoint {
108+ remote-endpoint = <&dp2_connector_in>;
109+ };
110+ };
111+ };
112+ };
113+ };
Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml+1−0
@@ -33,6 +33,7 @@ properties: · 32 unmodified lines
3333 oneOf:
3434 - items:
3535 - enum:
36+ - doestek,dtc34lm85am # For the Doestek DTC34LM85AM Flat Panel Display (FPD) Transmitter
3637 - onnn,fin3385 # OnSemi FIN3385
3738 - ti,ds90c185 # For the TI DS90C185 FPD-Link Serializer
3839 - ti,ds90c187 # For the TI DS90C187 FPD-Link Serializer
Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml+1−0
@@ -33,6 +33,7 @@ properties: · 32 unmodified lines
3333 - enum:
3434 - mediatek,mt2712-disp-aal
3535 - mediatek,mt6795-disp-aal
36+ - mediatek,mt8167-disp-aal
3637 - const: mediatek,mt8173-disp-aal
3738 - items:
3839 - enum:
Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml+3−1
@@ -25,7 +25,9 @@ properties: · 24 unmodified lines
2525 - mediatek,mt8183-disp-ccorr
2626 - mediatek,mt8192-disp-ccorr
2727 - items:
28− - const: mediatek,mt8365-disp-ccorr
28+ - enum:
29+ - mediatek,mt8167-disp-ccorr
30+ - mediatek,mt8365-disp-ccorr
2931 - const: mediatek,mt8183-disp-ccorr
3032 - items:
3133 - enum:
Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml+1−0
@@ -26,6 +26,7 @@ properties: · 25 unmodified lines
2626 - mediatek,mt8183-disp-dither
2727 - items:
2828 - enum:
29+ - mediatek,mt8167-disp-dither
2930 - mediatek,mt8186-disp-dither
3031 - mediatek,mt8188-disp-dither
3132 - mediatek,mt8192-disp-dither
Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml+1−0
@@ -28,6 +28,7 @@ properties: · 27 unmodified lines
2828 - items:
2929 - enum:
3030 - mediatek,mt6795-disp-gamma
31+ - mediatek,mt8167-disp-gamma
3132 - const: mediatek,mt8173-disp-gamma
3233 - items:
3334 - enum:
Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml+1−0
@@ -23,6 +23,7 @@ properties: · 22 unmodified lines
2323 oneOf:
2424 - enum:
2525 - mediatek,mt2701-disp-ovl
26+ - mediatek,mt8167-disp-ovl
2627 - mediatek,mt8173-disp-ovl
2728 - mediatek,mt8183-disp-ovl
2829 - mediatek,mt8192-disp-ovl
Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml+1−0
@@ -36,6 +36,7 @@ properties: · 35 unmodified lines
3636 - enum:
3737 - mediatek,mt7623-disp-rdma
3838 - mediatek,mt2712-disp-rdma
39+ - mediatek,mt8167-disp-rdma
3940 - const: mediatek,mt2701-disp-rdma
4041 - items:
4142 - enum:
Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml+3−1
@@ -24,7 +24,9 @@ properties: · 23 unmodified lines
2424 - enum:
2525 - mediatek,mt8173-disp-wdma
2626 - items:
27− - const: mediatek,mt6795-disp-wdma
27+ - enum:
28+ - mediatek,mt6795-disp-wdma
29+ - mediatek,mt8167-disp-wdma
2830 - const: mediatek,mt8173-disp-wdma
2931
3032 reg:
Documentation/devicetree/bindings/display/msm/dp-controller.yaml+21−1
@@ -67,6 +67,7 @@ properties: · 66 unmodified lines
6767
6868 - items:
6969 - enum:
70+ - qcom,eliza-dp
7071 - qcom,sm8750-dp
7172 - const: qcom,sm8650-dp
7273
@@ -253,7 +254,6 @@ allOf: · 180 unmodified lines
253254 enum:
254255 # these platforms support 2 streams MST on some interfaces,
255256 # others are SST only
256− - qcom,glymur-dp
257257 - qcom,sc8280xp-dp
258258 - qcom,x1e80100-dp
259259 then:
@@ -310,6 +310,26 @@ allOf: · 50 unmodified lines
310310 minItems: 6
311311 maxItems: 8
312312
313+ - if:
314+ properties:
315+ compatible:
316+ contains:
317+ enum:
318+ # these platforms support 2 streams MST on some interfaces,
319+ # others are SST only, but all controllers have 4 ports
320+ - qcom,glymur-dp
321+ then:
322+ properties:
323+ reg:
324+ minItems: 9
325+ maxItems: 9
326+ clocks:
327+ minItems: 5
328+ maxItems: 6
329+ clocks-names:
330+ minItems: 5
331+ maxItems: 6
332+
313333 unevaluatedProperties: false
314334
315335 examples:
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml+5−0
@@ -49,8 +49,13 @@ properties: · 48 unmodified lines
4949 - items:
5050 - enum:
5151 - qcom,qcs8300-dsi-ctrl
52+ - qcom,sc8280xp-dsi-ctrl
5253 - const: qcom,sa8775p-dsi-ctrl
5354 - const: qcom,mdss-dsi-ctrl
55+ - items:
56+ - const: qcom,eliza-dsi-ctrl
57+ - const: qcom,sm8750-dsi-ctrl
58+ - const: qcom,mdss-dsi-ctrl
5459 - enum:
5560 - qcom,dsi-ctrl-6g-qcm2290
5661 - qcom,mdss-dsi-ctrl # This should always come with an SoC-specific compatible
Documentation/devicetree/bindings/display/msm/gmu.yaml+1−0
@@ -91,6 +91,7 @@ allOf: · 90 unmodified lines
9191 compatible:
9292 contains:
9393 enum:
94+ - qcom,adreno-gmu-615.0
9495 - qcom,adreno-gmu-618.0
9596 - qcom,adreno-gmu-630.2
9697 then:
Documentation/devicetree/bindings/display/msm/gpu.yaml+0−7
@@ -440,13 +440,6 @@ allOf: · 439 unmodified lines
440440 clocks: false
441441 clock-names: false
442442
443− reg-names:
444− minItems: 1
445− items:
446− - const: kgsl_3d0_reg_memory
447− - const: cx_mem
448− - const: cx_dbgc
449−
450443 examples:
451444 - |
452445
Documentation/devicetree/bindings/display/msm/qcom,eliza-mdss.yaml+494−0
@@ -0,0 +1,494 @@
1+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/display/msm/qcom,eliza-mdss.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: Qualcomm Eliza SoC Display MDSS
8+
9+maintainers:
10+ - Krzysztof Kozlowski <krzk@kernel.org>
11+
12+description:
13+ Eliza SoC Mobile Display Subsystem (MDSS) encapsulates sub-blocks like DPU
14+ display controller, DSI and DP interfaces etc.
15+
16+$ref: /schemas/display/msm/mdss-common.yaml#
17+
18+properties:
19+ compatible:
20+ const: qcom,eliza-mdss
21+
22+ clocks:
23+ items:
24+ - description: Display AHB
25+ - description: Display hf AXI
26+ - description: Display core
27+
28+ iommus:
29+ maxItems: 1
30+
31+ interconnects:
32+ items:
33+ - description: Interconnect path from mdp0 port to the data bus
34+ - description: Interconnect path from CPU to the reg bus
35+
36+ interconnect-names:
37+ items:
38+ - const: mdp0-mem
39+ - const: cpu-cfg
40+
41+patternProperties:
42+ "^display-controller@[0-9a-f]+$":
43+ type: object
44+ additionalProperties: true
45+ properties:
46+ compatible:
47+ contains:
48+ const: qcom,eliza-dpu
49+
50+ "^displayport-controller@[0-9a-f]+$":
51+ type: object
52+ additionalProperties: true
53+ properties:
54+ compatible:
55+ contains:
56+ const: qcom,eliza-dp
57+
58+ "^dsi@[0-9a-f]+$":
59+ type: object
60+ additionalProperties: true
61+ properties:
62+ compatible:
63+ contains:
64+ const: qcom,eliza-dsi-ctrl
65+
66+ "^phy@[0-9a-f]+$":
67+ type: object
68+ additionalProperties: true
69+ properties:
70+ compatible:
71+ contains:
72+ const: qcom,eliza-dsi-phy-4nm
73+
74+required:
75+ - compatible
76+
77+unevaluatedProperties: false
78+
79+examples:
80+ - |
81+ #include <dt-bindings/clock/qcom,dsi-phy-28nm.h>
82+ #include <dt-bindings/clock/qcom,rpmh.h>
83+ #include <dt-bindings/interconnect/qcom,icc.h>
84+ #include <dt-bindings/interrupt-controller/arm-gic.h>
85+ #include <dt-bindings/phy/phy-qcom-qmp.h>
86+ #include <dt-bindings/power/qcom,rpmhpd.h>
87+
88+ display-subsystem@ae00000 {
89+ compatible = "qcom,eliza-mdss";
90+ reg = <0x0ae00000 0x1000>;
91+ reg-names = "mdss";
92+ ranges;
93+
94+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
95+
96+ clocks = <&disp_cc_mdss_ahb_clk>,
97+ <&gcc_disp_hf_axi_clk>,
98+ <&disp_cc_mdss_mdp_clk>;
99+
100+ resets = <&disp_cc_mdss_core_bcr>;
101+
102+ interconnects = <&mmss_noc_master_mdp QCOM_ICC_TAG_ALWAYS
103+ &mc_virt_slave_ebi1 QCOM_ICC_TAG_ALWAYS>,
104+ <&gem_noc_master_appss_proc QCOM_ICC_TAG_ACTIVE_ONLY
105+ &config_noc_slave_display_cfg QCOM_ICC_TAG_ACTIVE_ONLY>;
106+ interconnect-names = "mdp0-mem",
107+ "cpu-cfg";
108+
109+ power-domains = <&mdss_gdsc>;
110+
111+ iommus = <&apps_smmu 0x800 0x2>;
112+
113+ interrupt-controller;
114+ #interrupt-cells = <1>;
115+
116+ #address-cells = <1>;
117+ #size-cells = <1>;
118+
119+ mdss_mdp: display-controller@ae01000 {
120+ compatible = "qcom,eliza-dpu";
121+ reg = <0x0ae01000 0x93000>,
122+ <0x0aeb0000 0x2008>;
123+ reg-names = "mdp",
124+ "vbif";
125+
126+ interrupts-extended = <&mdss 0>;
127+
128+ clocks = <&gcc_disp_hf_axi_clk>,
129+ <&disp_cc_mdss_ahb_clk>,
130+ <&disp_cc_mdss_mdp_lut_clk>,
131+ <&disp_cc_mdss_mdp_clk>,
132+ <&disp_cc_mdss_vsync_clk>;
133+ clock-names = "nrt_bus",
134+ "iface",
135+ "lut",
136+ "core",
137+ "vsync";
138+
139+ assigned-clocks = <&disp_cc_mdss_vsync_clk>;
140+ assigned-clock-rates = <19200000>;
141+
142+ operating-points-v2 = <&mdp_opp_table>;
143+
144+ power-domains = <&rpmhpd RPMHPD_MMCX>;
145+
146+ ports {
147+ #address-cells = <1>;
148+ #size-cells = <0>;
149+
150+ port@0 {
151+ reg = <0>;
152+
153+ dpu_intf1_out: endpoint {
154+ remote-endpoint = <&mdss_dsi0_in>;
155+ };
156+ };
157+
158+ port@1 {
159+ reg = <1>;
160+
161+ dpu_intf2_out: endpoint {
162+ remote-endpoint = <&mdss_dsi1_in>;
163+ };
164+ };
165+
166+ port@2 {
167+ reg = <2>;
168+
169+ dpu_intf0_out: endpoint {
170+ remote-endpoint = <&mdss_dp0_in>;
171+ };
172+ };
173+ };
174+
175+ mdp_opp_table: opp-table {
176+ compatible = "operating-points-v2";
177+
178+ opp-150000000 {
179+ opp-hz = /bits/ 64 <150000000>;
180+ required-opps = <&rpmhpd_opp_low_svs_d1>;
181+ };
182+
183+ opp-207000000 {
184+ opp-hz = /bits/ 64 <207000000>;
185+ required-opps = <&rpmhpd_opp_low_svs>;
186+ };
187+
188+ opp-342000000 {
189+ opp-hz = /bits/ 64 <342000000>;
190+ required-opps = <&rpmhpd_opp_svs>;
191+ };
192+
193+ opp-417000000 {
194+ opp-hz = /bits/ 64 <417000000>;
195+ required-opps = <&rpmhpd_opp_svs_l1>;
196+ };
197+
198+ opp-532000000 {
199+ opp-hz = /bits/ 64 <532000000>;
200+ required-opps = <&rpmhpd_opp_nom>;
201+ };
202+
203+ opp-600000000 {
204+ opp-hz = /bits/ 64 <600000000>;
205+ required-opps = <&rpmhpd_opp_nom_l1>;
206+ };
207+
208+ opp-660000000 {
209+ opp-hz = /bits/ 64 <660000000>;
210+ required-opps = <&rpmhpd_opp_turbo>;
211+ };
212+ };
213+ };
214+
215+ dsi@ae94000 {
216+ compatible = "qcom,eliza-dsi-ctrl", "qcom,sm8750-dsi-ctrl", "qcom,mdss-dsi-ctrl";
217+ reg = <0x0ae94000 0x400>;
218+ reg-names = "dsi_ctrl";
219+
220+ interrupts-extended = <&mdss 4>;
221+
222+ clocks = <&disp_cc_mdss_byte0_clk>,
223+ <&disp_cc_mdss_byte0_intf_clk>,
224+ <&disp_cc_mdss_pclk0_clk>,
225+ <&disp_cc_mdss_esc0_clk>,
226+ <&disp_cc_mdss_ahb_clk>,
227+ <&gcc_disp_hf_axi_clk>,
228+ <&mdss_dsi0_phy DSI_PIXEL_PLL_CLK>,
229+ <&mdss_dsi0_phy DSI_BYTE_PLL_CLK>,
230+ <&disp_cc_esync0_clk>,
231+ <&disp_cc_osc_clk>,
232+ <&disp_cc_mdss_byte0_clk_src>,
233+ <&disp_cc_mdss_pclk0_clk_src>;
234+ clock-names = "byte",
235+ "byte_intf",
236+ "pixel",
237+ "core",
238+ "iface",
239+ "bus",
240+ "dsi_pll_pixel",
241+ "dsi_pll_byte",
242+ "esync",
243+ "osc",
244+ "byte_src",
245+ "pixel_src";
246+
247+ operating-points-v2 = <&mdss_dsi_opp_table>;
248+
249+ power-domains = <&rpmhpd RPMHPD_MMCX>;
250+
251+ phys = <&mdss_dsi0_phy>;
252+ phy-names = "dsi";
253+
254+ #address-cells = <1>;
255+ #size-cells = <0>;
256+
257+ ports {
258+ #address-cells = <1>;
259+ #size-cells = <0>;
260+
261+ port@0 {
262+ reg = <0>;
263+
264+ mdss_dsi0_in: endpoint {
265+ remote-endpoint = <&dpu_intf1_out>;
266+ };
267+ };
268+
269+ port@1 {
270+ reg = <1>;
271+
272+ mdss_dsi0_out: endpoint {
273+ remote-endpoint = <&panel0_in>;
274+ data-lanes = <0 1 2 3>;
275+ };
276+ };
277+ };
278+
279+ mdss_dsi_opp_table: opp-table {
280+ compatible = "operating-points-v2";
281+
282+ opp-140630000 {
283+ opp-hz = /bits/ 64 <140630000>;
284+ required-opps = <&rpmhpd_opp_low_svs_d1>;
285+ };
286+
287+ opp-187500000 {
288+ opp-hz = /bits/ 64 <187500000>;
289+ required-opps = <&rpmhpd_opp_low_svs>;
290+ };
291+
292+ opp-300000000 {
293+ opp-hz = /bits/ 64 <300000000>;
294+ required-opps = <&rpmhpd_opp_svs>;
295+ };
296+
297+ opp-358000000 {
298+ opp-hz = /bits/ 64 <358000000>;
299+ required-opps = <&rpmhpd_opp_svs_l1>;
300+ };
301+ };
302+ };
303+
304+ mdss_dsi0_phy: phy@ae95000 {
305+ compatible = "qcom,eliza-dsi-phy-4nm", "qcom,sm8650-dsi-phy-4nm";
306+ reg = <0x0ae95000 0x200>,
307+ <0x0ae95200 0x280>,
308+ <0x0ae95500 0x400>;
309+ reg-names = "dsi_phy",
310+ "dsi_phy_lane",
311+ "dsi_pll";
312+
313+ clocks = <&disp_cc_mdss_ahb_clk>,
314+ <&bi_tcxo_div2>;
315+ clock-names = "iface",
316+ "ref";
317+
318+ #clock-cells = <1>;
319+ #phy-cells = <0>;
320+
321+ vdds-supply = <&vreg_l2b>;
322+ };
323+
324+ dsi@ae96000 {
325+ compatible = "qcom,eliza-dsi-ctrl", "qcom,sm8750-dsi-ctrl", "qcom,mdss-dsi-ctrl";
326+ reg = <0x0ae96000 0x400>;
327+ reg-names = "dsi_ctrl";
328+
329+ interrupts-extended = <&mdss 5>;
330+
331+ clocks = <&disp_cc_mdss_byte1_clk>,
332+ <&disp_cc_mdss_byte1_intf_clk>,
333+ <&disp_cc_mdss_pclk1_clk>,
334+ <&disp_cc_mdss_esc1_clk>,
335+ <&disp_cc_mdss_ahb_clk>,
336+ <&gcc_disp_hf_axi_clk>,
337+ <&mdss_dsi1_phy DSI_PIXEL_PLL_CLK>,
338+ <&mdss_dsi1_phy DSI_BYTE_PLL_CLK>,
339+ <&disp_cc_esync1_clk>,
340+ <&disp_cc_osc_clk>,
341+ <&disp_cc_mdss_byte1_clk_src>,
342+ <&disp_cc_mdss_pclk1_clk_src>;
343+ clock-names = "byte",
344+ "byte_intf",
345+ "pixel",
346+ "core",
347+ "iface",
348+ "bus",
349+ "dsi_pll_pixel",
350+ "dsi_pll_byte",
351+ "esync",
352+ "osc",
353+ "byte_src",
354+ "pixel_src";
355+
356+ operating-points-v2 = <&mdss_dsi_opp_table>;
357+
358+ power-domains = <&rpmhpd RPMHPD_MMCX>;
359+
360+ phys = <&mdss_dsi1_phy>;
361+ phy-names = "dsi";
362+
363+ vdda-supply = <&vreg_l4b>;
364+
365+ ports {
366+ #address-cells = <1>;
367+ #size-cells = <0>;
368+
369+ port@0 {
370+ reg = <0>;
371+
372+ mdss_dsi1_in: endpoint {
373+ remote-endpoint = <&dpu_intf2_out>;
374+ };
375+ };
376+
377+ port@1 {
378+ reg = <1>;
379+
380+ mdss_dsi1_out: endpoint {
381+ remote-endpoint = <&panel1_in>;
382+ data-lanes = <0 1 2 3>;
383+ };
384+ };
385+ };
386+ };
387+
388+ mdss_dsi1_phy: phy@ae97000 {
389+ compatible = "qcom,eliza-dsi-phy-4nm", "qcom,sm8650-dsi-phy-4nm";
390+ reg = <0x0ae97000 0x200>,
391+ <0x0ae97200 0x280>,
392+ <0x0ae97500 0x400>;
393+ reg-names = "dsi_phy",
394+ "dsi_phy_lane",
395+ "dsi_pll";
396+
397+ clocks = <&disp_cc_mdss_ahb_clk>,
398+ <&rpmhcc RPMH_CXO_CLK>;
399+ clock-names = "iface",
400+ "ref";
401+
402+ #clock-cells = <1>;
403+ #phy-cells = <0>;
404+
405+ vdds-supply = <&vreg_l2b>;
406+ };
407+
408+ displayport-controller@af54000 {
409+ compatible = "qcom,eliza-dp", "qcom,sm8650-dp";
410+ reg = <0xaf54000 0x104>,
411+ <0xaf54200 0xc0>,
412+ <0xaf55000 0x770>,
413+ <0xaf56000 0x9c>,
414+ <0xaf57000 0x9c>;
415+
416+ interrupts-extended = <&mdss 12>;
417+
418+ clocks = <&disp_cc_mdss_ahb_clk>,
419+ <&disp_cc_mdss_dptx0_aux_clk>,
420+ <&disp_cc_mdss_dptx0_link_clk>,
421+ <&disp_cc_mdss_dptx0_link_intf_clk>,
422+ <&disp_cc_mdss_dptx0_pixel0_clk>,
423+ <&disp_cc_mdss_dptx0_pixel1_clk>;
424+ clock-names = "core_iface",
425+ "core_aux",
426+ "ctrl_link",
427+ "ctrl_link_iface",
428+ "stream_pixel",
429+ "stream_1_pixel";
430+
431+ assigned-clocks = <&disp_cc_mdss_dptx0_link_clk_src>,
432+ <&disp_cc_mdss_dptx0_pixel0_clk_src>,
433+ <&disp_cc_mdss_dptx0_pixel1_clk_src>;
434+ assigned-clock-parents = <&usb_dp_qmpphy QMP_USB43DP_DP_LINK_CLK>,
435+ <&usb_dp_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>,
436+ <&usb_dp_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
437+
438+ operating-points-v2 = <&dp_opp_table>;
439+
440+ power-domains = <&rpmhpd RPMHPD_MMCX>;
441+
442+ phys = <&usb_dp_qmpphy QMP_USB43DP_DP_PHY>;
443+ phy-names = "dp";
444+
445+ #sound-dai-cells = <0>;
446+
447+ dp_opp_table: opp-table {
448+ compatible = "operating-points-v2";
449+
450+ opp-192000000 {
451+ opp-hz = /bits/ 64 <192000000>;
452+ required-opps = <&rpmhpd_opp_low_svs_d1>;
453+ };
454+
455+ opp-270000000 {
456+ opp-hz = /bits/ 64 <270000000>;
457+ required-opps = <&rpmhpd_opp_low_svs>;
458+ };
459+
460+ opp-540000000 {
461+ opp-hz = /bits/ 64 <540000000>;
462+ required-opps = <&rpmhpd_opp_svs_l1>;
463+ };
464+
465+ opp-810000000 {
466+ opp-hz = /bits/ 64 <810000000>;
467+ required-opps = <&rpmhpd_opp_nom>;
468+ };
469+ };
470+
471+ ports {
472+ #address-cells = <1>;
473+ #size-cells = <0>;
474+
475+ port@0 {
476+ reg = <0>;
477+
478+ mdss_dp0_in: endpoint {
479+ remote-endpoint = <&dpu_intf0_out>;
480+ };
481+ };
482+
483+ port@1 {
484+ reg = <1>;
485+
486+ mdss_dp0_out: endpoint {
487+ data-lanes = <0 1 2 3>;
488+ remote-endpoint = <&usb_dp_qmpphy_dp_in>;
489+ link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
490+ };
491+ };
492+ };
493+ };
494+ };
Documentation/devicetree/bindings/display/msm/qcom,glymur-mdss.yaml+10−6
@@ -176,13 +176,17 @@ examples: · 175 unmodified lines
176176 };
177177 };
178178
179− displayport-controller@ae90000 {
179+ displayport-controller@af54000 {
180180 compatible = "qcom,glymur-dp";
181− reg = <0xae90000 0x200>,
182− <0xae90200 0x200>,
183− <0xae90400 0x600>,
184− <0xae91000 0x400>,
185− <0xae91400 0x400>;
181+ reg = <0xaf54000 0x200>,
182+ <0xaf54200 0x200>,
183+ <0xaf55000 0xc00>,
184+ <0xaf56000 0x400>,
185+ <0xaf57000 0x400>,
186+ <0xaf58000 0x400>,
187+ <0xaf59000 0x400>,
188+ <0xaf5a000 0x600>,
189+ <0xaf5b000 0x600>;
186190
187191 interrupt-parent = <&mdss>;
188192 interrupts = <12>;
Documentation/devicetree/bindings/display/msm/qcom,sc8280xp-mdss.yaml+30−0
@@ -50,6 +50,22 @@ patternProperties: · 49 unmodified lines
5050 - qcom,sc8280xp-dp
5151 - qcom,sc8280xp-edp
5252
53+ "^dsi@[0-9a-f]+$":
54+ type: object
55+ additionalProperties: true
56+ properties:
57+ compatible:
58+ contains:
59+ const: qcom,sc8280xp-dsi-ctrl
60+
61+ "^phy@[0-9a-f]+$":
62+ type: object
63+ additionalProperties: true
64+ properties:
65+ compatible:
66+ contains:
67+ const: qcom,sc8280xp-dsi-phy-5nm
68+
5369 unevaluatedProperties: false
5470
5571 examples:
@@ -129,6 +145,20 @@ examples: · 73 unmodified lines
129145 };
130146 };
131147
148+ port@1 {
149+ reg = <1>;
150+ dpu_intf1_out: endpoint {
151+ remote-endpoint = <&mdss0_dsi0_in>;
152+ };
153+ };
154+
155+ port@2 {
156+ reg = <2>;
157+ dpu_intf2_out: endpoint {
158+ remote-endpoint = <&mdss0_dsi1_in>;
159+ };
160+ };
161+
132162 port@4 {
133163 reg = <4>;
134164 endpoint {
Documentation/devicetree/bindings/display/msm/qcom,sm8650-dpu.yaml+1−0
@@ -15,6 +15,7 @@ properties: · 14 unmodified lines
1515 compatible:
1616 oneOf:
1717 - enum:
18+ - qcom,eliza-dpu
1819 - qcom,glymur-dpu
1920 - qcom,kaanapali-dpu
2021 - qcom,sa8775p-dpu
Documentation/devicetree/bindings/display/msm/qcom,sm8750-mdss.yaml+1−1
@@ -10,7 +10,7 @@ maintainers: · 9 unmodified lines
1010 - Krzysztof Kozlowski <krzk@kernel.org>
1111
1212 description:
13− SM8650 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like
13+ SM8750 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like
1414 DPU display controller, DSI and DP interfaces etc.
1515
1616 $ref: /schemas/display/msm/mdss-common.yaml#
Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml+0−1
@@ -28,7 +28,6 @@ properties: · 27 unmodified lines
2828
2929 port: true
3030 reset-gpios: true
31−
3231 backlight: true
3332
3433 required:
Documentation/devicetree/bindings/display/panel/himax,hx83102.yaml+2−0
@@ -20,6 +20,8 @@ properties: · 19 unmodified lines
2020 - boe,nv110wum-l60
2121 # CSOT pna957qt1-1 10.95" WUXGA TFT LCD panel
2222 - csot,pna957qt1-1
23+ # Holitech HTF065H045 6.517" 720x1600 TFT LCD panel
24+ - holitech,htf065h045
2325 # IVO t109nw41 11.0" WUXGA TFT LCD panel
2426 - ivo,t109nw41
2527 # KINGDISPLAY KD110N11-51IE 10.95" WUXGA TFT LCD panel
Documentation/devicetree/bindings/display/panel/himax,hx83121a.yaml+91−0
@@ -0,0 +1,91 @@
1+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/display/panel/himax,hx83121a.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: Himax HX83121A based DSI display Panels
8+
9+maintainers:
10+ - Pengyu Luo <mitltlatltl@gmail.com>
11+
12+description:
13+ The Himax HX83121A is a generic DSI Panel IC used to drive dsi
14+ panels. Support video mode panels from China Star Optoelectronics
15+ Technology (CSOT) and BOE Technology.
16+
17+allOf:
18+ - $ref: panel-common-dual.yaml#
19+
20+properties:
21+ compatible:
22+ items:
23+ - enum:
24+ - boe,ppc357db1-4
25+ - csot,ppc357db1-4
26+ - const: himax,hx83121a
27+
28+ reg:
29+ maxItems: 1
30+
31+ reset-gpios:
32+ maxItems: 1
33+
34+ avdd-supply:
35+ description: analog positive supply for IC
36+
37+ avee-supply:
38+ description: analog negative supply for IC
39+
40+ vddi-supply:
41+ description: power supply for IC
42+
43+ backlight: true
44+ ports: true
45+
46+required:
47+ - compatible
48+ - reg
49+ - vddi-supply
50+ - reset-gpios
51+ - ports
52+
53+additionalProperties: false
54+
55+examples:
56+ - |
57+ #include <dt-bindings/gpio/gpio.h>
58+
59+ dsi {
60+ #address-cells = <1>;
61+ #size-cells = <0>;
62+
63+ panel@0 {
64+ compatible = "csot,ppc357db1-4", "himax,hx83121a";
65+ reg = <0>;
66+
67+ vddi-supply = <&vreg_l2b>;
68+ reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
69+
70+ ports {
71+ #address-cells = <1>;
72+ #size-cells = <0>;
73+
74+ port@0 {
75+ reg = <0>;
76+ panel_in_0: endpoint {
77+ remote-endpoint = <&dsi0_out>;
78+ };
79+ };
80+
81+ port@1{
82+ reg = <1>;
83+ panel_in_1: endpoint {
84+ remote-endpoint = <&dsi1_out>;
85+ };
86+ };
87+ };
88+ };
89+ };
90+
91+...
Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml+0−3
@@ -33,11 +33,8 @@ properties: · 32 unmodified lines
3333 maxItems: 1
3434
3535 reset-gpios: true
36−
3736 backlight: true
38−
3937 rotation: true
40−
4138 port: true
4239
4340 vcc-supply:
Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml+36−2
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 $id: http://devicetree.org/schemas/display/panel/ilitek,ili9806e.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
7−title: Ilitek ILI9806E based MIPI-DSI panels
7+title: Ilitek ILI9806E based panels
88
99 maintainers:
1010 - Michael Walle <mwalle@kernel.org>
@@ -18,6 +18,7 @@ properties: · 7 unmodified lines
1818 - enum:
1919 - densitron,dmt028vghmcmi-1d
2020 - ortustech,com35h3p70ulc
21+ - rocktech,rk050hr345-ct106a
2122 - const: ilitek,ili9806e
2223
2324 reg:
@@ -30,11 +31,24 @@ required: · 6 unmodified lines
3031 - compatible
3132 - reg
3233 - vdd-supply
33− - vccio-supply
3434 - reset-gpios
3535 - backlight
3636 - port
3737
38+if:
39+ properties:
40+ compatible:
41+ contains:
42+ enum:
43+ - rocktech,rk050hr345-ct106a
44+then:
45+ $ref: /schemas/spi/spi-peripheral-props.yaml#
46+ required:
47+ - spi-max-frequency
48+else:
49+ required:
50+ - vccio-supply
51+
3852 unevaluatedProperties: false
3953
4054 examples:
@@ -60,5 +74,25 @@ examples: · 19 unmodified lines
6074 };
6175 };
6276 };
77+ - |
78+ #include <dt-bindings/gpio/gpio.h>
79+
80+ spi {
81+ #address-cells = <1>;
82+ #size-cells = <0>;
6383
84+ panel@0 {
85+ compatible = "rocktech,rk050hr345-ct106a", "ilitek,ili9806e";
86+ reg = <0>;
87+ vdd-supply = <&reg_vdd_panel>;
88+ spi-max-frequency = <10000000>;
89+ reset-gpios = <&gpiob 6 GPIO_ACTIVE_LOW>;
90+ backlight = <&backlight>;
91+ port {
92+ panel_in_rgb: endpoint {
93+ remote-endpoint = <&ltdc_out_rgb>;
94+ };
95+ };
96+ };
97+ };
6498 ...
Documentation/devicetree/bindings/display/panel/leadtek,ltk050h3146w.yaml+1−0
@@ -25,6 +25,7 @@ properties: · 24 unmodified lines
2525 backlight: true
2626 port: true
2727 reset-gpios: true
28+
2829 iovcc-supply:
2930 description: regulator that supplies the iovcc voltage
3031 vci-supply:
Documentation/devicetree/bindings/display/panel/leadtek,ltk500hd1829.yaml+1−0
@@ -24,6 +24,7 @@ properties: · 23 unmodified lines
2424 backlight: true
2525 port: true
2626 reset-gpios: true
27+
2728 iovcc-supply:
2829 description: regulator that supplies the iovcc voltage
2930 vcc-supply:
Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml+2−3
@@ -22,7 +22,6 @@ properties: · 21 unmodified lines
2222 - mantix,mlaf057we51-x
2323 - ys,ys57pss36bh5gq
2424
25− port: true
2625 reg:
2726 maxItems: 1
2827 description: DSI virtual channel
@@ -36,13 +35,13 @@ properties: · 7 unmodified lines
3635 vddi-supply:
3736 description: 1.8V I/O voltage supply
3837
39− reset-gpios: true
40−
4138 mantix,tp-rstn-gpios:
4239 maxItems: 1
4340 description: second reset line that triggers DSI config load
4441
4542 backlight: true
43+ port: true
44+ reset-gpios: true
4645
4746 required:
4847 - compatible
Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml+2−1
@@ -28,13 +28,14 @@ properties: · 27 unmodified lines
2828 reg:
2929 maxItems: 1
3030
31− reset-gpios: true
3231 vdd-supply:
3332 description: regulator that supplies the vdd voltage
3433 vddi-supply:
3534 description: regulator that supplies the vddi voltage
35+
3636 backlight: true
3737 port: true
38+ reset-gpios: true
3839
3940 required:
4041 - compatible
Documentation/devicetree/bindings/display/panel/panel-lvds.yaml+4−0
@@ -58,6 +58,10 @@ properties: · 57 unmodified lines
5858 - hydis,hv070wx2-1e0
5959 # Jenson Display BL-JT60050-01A 7" WSVGA (1024x600) color TFT LCD LVDS panel
6060 - jenson,bl-jt60050-01a
61+ # Samsung LTN070NL01 7.0" WSVGA (1024x600) TFT LCD LVDS panel
62+ - samsung,ltn070nl01
63+ # Samsung LTN101AL03 10.1" WXGA (800x1280) TFT LCD LVDS panel
64+ - samsung,ltn101al03
6165 - tbs,a711-panel
6266 # Winstar WF70A8SYJHLNGA 7" WSVGA (1024x600) color TFT LCD LVDS panel
6367 - winstar,wf70a8syjhlnga
Documentation/devicetree/bindings/display/panel/panel-simple.yaml+4−0
@@ -188,6 +188,8 @@ properties: · 187 unmodified lines
188188 - innolux,n156bge-l21
189189 # Innolux Corporation 7.0" WSVGA (1024x600) TFT LCD panel
190190 - innolux,zj070na-01p
191+ # JuTouch Technology Co.. 7" JT070TM041 WSVGA (1024 x 600) LVDS panel
192+ - jutouch,jt070tm041
191193 # JuTouch Technology Co.. 10" JT101TM023 WXGA (1280 x 800) LVDS panel
192194 - jutouch,jt101tm023
193195 # Kaohsiung Opto-Electronics Inc. 5.7" QVGA (320 x 240) TFT LCD panel
@@ -310,6 +312,8 @@ properties: · 116 unmodified lines
310312 - team-source-display,tst043015cmhx
311313 # Tianma Micro-electronics P0700WXF1MBAA 7.0" WXGA (1280x800) LVDS TFT LCD panel
312314 - tianma,p0700wxf1mbaa
315+ # Tianma Micro-electronics TM050RDH03 5.0" WVGA TFT LCD panel
316+ - tianma,tm050rdh03
313317 # Tianma Micro-electronics TM070JDHG30 7.0" WXGA TFT LCD panel
314318 - tianma,tm070jdhg30
315319 # Tianma Micro-electronics TM070JDHG34-00 7.0" WXGA (1280x800) LVDS TFT LCD panel
Documentation/devicetree/bindings/display/panel/renesas,r61307.yaml+1−2
@@ -33,8 +33,6 @@ properties: · 32 unmodified lines
3333 iovcc-supply:
3434 description: Regulator for 1.8V IO power supply.
3535
36− backlight: true
37−
3836 renesas,gamma:
3937 $ref: /schemas/types.yaml#/definitions/uint32
4038 description:
@@ -51,6 +49,7 @@ properties: · 10 unmodified lines
5149 type: boolean
5250 description: digital contrast adjustment
5351
52+ backlight: true
5453 reset-gpios: true
5554 port: true
5655
Documentation/devicetree/bindings/display/panel/renesas,r69328.yaml+0−1
@@ -33,7 +33,6 @@ properties: · 32 unmodified lines
3333 description: Regulator for 1.8V IO power supply.
3434
3535 backlight: true
36−
3736 reset-gpios: true
3837 port: true
3938
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml+2−3
@@ -33,7 +33,6 @@ properties: · 32 unmodified lines
3333 # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel
3434 - xingbangda,xbd599
3535
36− port: true
3736 reg:
3837 maxItems: 1
3938 description: DSI virtual channel
@@ -44,9 +43,9 @@ properties: · 4 unmodified lines
4443 iovcc-supply:
4544 description: I/O voltage supply
4645
47− reset-gpios: true
48−
4946 backlight: true
47+ port: true
48+ reset-gpios: true
5049 rotation: true
5150
5251 required:
Documentation/devicetree/bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml+4−1
@@ -8,13 +8,16 @@ title: Samsung AMS561RA01 panel with S6E8AA5X01 controller · 7 unmodified lines
88
99 maintainers:
1010 - Kaustabh Chakraborty <kauschluss@disroot.org>
11+ - Yedaya Katsman <yedaya.ka@gmail.com>
1112
1213 allOf:
1314 - $ref: panel-common.yaml#
1415
1516 properties:
1617 compatible:
17− const: samsung,s6e8aa5x01-ams561ra01
18+ enum:
19+ - samsung,s6e8aa5x01-ams561ra01
20+ - samsung,s6e8fc0-m1906f9
1821
1922 reg:
2023 maxItems: 1
Documentation/devicetree/bindings/display/panel/sony,tulip-truly-nt35521.yaml+0−2
@@ -31,9 +31,7 @@ properties: · 30 unmodified lines
3131 description: Negative 5V supply
3232
3333 reset-gpios: true
34−
3534 enable-gpios: true
36−
3735 port: true
3836
3937 required:
Documentation/devicetree/bindings/display/panel/startek,kd070fhfid015.yaml+2−5
@@ -16,8 +16,6 @@ properties: · 15 unmodified lines
1616 compatible:
1717 const: startek,kd070fhfid015
1818
19− enable-gpios: true
20−
2119 iovcc-supply:
2220 description: Reference to the regulator powering the panel IO pins.
2321
@@ -25,11 +23,10 @@ properties: · 1 unmodified line
2523 maxItems: 1
2624 description: DSI virtual channel
2725
28− reset-gpios: true
29−
26+ enable-gpios: true
3027 port: true
31−
3228 power-supply: true
29+ reset-gpios: true
3330
3431 required:
3532 - compatible
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml+2−2
@@ -37,7 +37,7 @@ properties: · 36 unmodified lines
3737 const: 2
3838
3939 "#interrupt-cells":
40− const: 1
40+ const: 2
4141
4242 ngpios:
4343 description:
@@ -86,7 +86,7 @@ examples: · 42 unmodified lines
8686 gpio-controller;
8787 #gpio-cells = <2>;
8888 interrupt-controller;
89− #interrupt-cells = <1>;
89+ #interrupt-cells = <2>;
9090 interrupts = <53>, <53>, <53>, <53>,
9191 <53>, <53>, <53>, <53>,
9292 <53>, <53>, <53>, <53>,
Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml+1−1
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 6 unmodified lines
77 title: Synopsys DesignWare APB I2C Controller
88
99 maintainers:
10− - Jarkko Nikula <jarkko.nikula@linux.intel.com>
10+ - Mika Westerberg <mika.westerberg@linux.intel.com>
1111
1212 allOf:
1313 - $ref: /schemas/i2c/i2c-controller.yaml#
Documentation/devicetree/bindings/mtd/st,spear600-smi.yaml+19−7
@@ -19,9 +19,6 @@ description: · 18 unmodified lines
1919 Flash sub nodes describe the memory range and optional per-flash
2020 properties.
2121
22−allOf:
23− - $ref: mtd.yaml#
24−
2522 properties:
2623 compatible:
2724 const: st,spear600-smi
@@ -42,14 +39,29 @@ properties: · 14 unmodified lines
4239 $ref: /schemas/types.yaml#/definitions/uint32
4340 description: Functional clock rate of the SMI controller in Hz.
4441
45− st,smi-fast-mode:
46− type: boolean
47− description: Indicates that the attached flash supports fast read mode.
42+patternProperties:
43+ "^flash@.*$":
44+ $ref: /schemas/mtd/mtd.yaml#
45+
46+ properties:
47+ reg:
48+ maxItems: 1
49+
50+ st,smi-fast-mode:
51+ type: boolean
52+ description: Indicates that the attached flash supports fast read mode.
53+
54+ unevaluatedProperties: false
55+
56+ required:
57+ - reg
4858
4959 required:
5060 - compatible
5161 - reg
5262 - clock-rate
63+ - "#address-cells"
64+ - "#size-cells"
5365
5466 unevaluatedProperties: false
5567
@@ -64,7 +76,7 @@ examples: · 8 unmodified lines
6476 interrupts = <12>;
6577 clock-rate = <50000000>; /* 50 MHz */
6678
67− flash@f8000000 {
79+ flash@fc000000 {
6880 reg = <0xfc000000 0x1000>;
6981 st,smi-fast-mode;
7082 };
Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml+1−0
@@ -23,6 +23,7 @@ properties: · 22 unmodified lines
2323 - items:
2424 - enum:
2525 - mediatek,mt7623-mipi-tx
26+ - mediatek,mt8167-mipi-tx
2627 - const: mediatek,mt2701-mipi-tx
2728 - items:
2829 - enum:
Documentation/devicetree/bindings/phy/qcom,dsi-phy-10nm.yamlrenamed from Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml+2−2
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/display/msm/dsi-phy-10nm.yaml#
4+$id: http://devicetree.org/schemas/phy/qcom,dsi-phy-10nm.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Qualcomm Display DSI 10nm PHY
@@ -10,7 +10,7 @@ maintainers: · 2 unmodified lines
1010 - Krishna Manikandan <quic_mkrishn@quicinc.com>
1111
1212 allOf:
13− - $ref: dsi-phy-common.yaml#
13+ - $ref: qcom,dsi-phy-common.yaml#
1414
1515 properties:
1616 compatible:
Documentation/devicetree/bindings/phy/qcom,dsi-phy-14nm.yamlrenamed from Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml+2−2
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/display/msm/dsi-phy-14nm.yaml#
4+$id: http://devicetree.org/schemas/phy/qcom,dsi-phy-14nm.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Qualcomm Display DSI 14nm PHY
@@ -10,7 +10,7 @@ maintainers: · 2 unmodified lines
1010 - Krishna Manikandan <quic_mkrishn@quicinc.com>
1111
1212 allOf:
13− - $ref: dsi-phy-common.yaml#
13+ - $ref: qcom,dsi-phy-common.yaml#
1414
1515 properties:
1616 compatible:
Documentation/devicetree/bindings/phy/qcom,dsi-phy-20nm.yamlrenamed from Documentation/devicetree/bindings/display/msm/dsi-phy-20nm.yaml+2−2
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/display/msm/dsi-phy-20nm.yaml#
4+$id: http://devicetree.org/schemas/phy/qcom,dsi-phy-20nm.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Qualcomm Display DSI 20nm PHY
@@ -10,7 +10,7 @@ maintainers: · 2 unmodified lines
1010 - Krishna Manikandan <quic_mkrishn@quicinc.com>
1111
1212 allOf:
13− - $ref: dsi-phy-common.yaml#
13+ - $ref: qcom,dsi-phy-common.yaml#
1414
1515 properties:
1616 compatible:
Documentation/devicetree/bindings/phy/qcom,dsi-phy-28nm.yamlrenamed from Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml+2−2
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/display/msm/dsi-phy-28nm.yaml#
4+$id: http://devicetree.org/schemas/phy/qcom,dsi-phy-28nm.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Qualcomm Display DSI 28nm PHY
@@ -10,7 +10,7 @@ maintainers: · 2 unmodified lines
1010 - Krishna Manikandan <quic_mkrishn@quicinc.com>
1111
1212 allOf:
13− - $ref: dsi-phy-common.yaml#
13+ - $ref: qcom,dsi-phy-common.yaml#
1414
1515 properties:
1616 compatible:
Documentation/devicetree/bindings/phy/qcom,dsi-phy-7nm.yamlrenamed from Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml+7−2
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/display/msm/dsi-phy-7nm.yaml#
4+$id: http://devicetree.org/schemas/phy/qcom,dsi-phy-7nm.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Qualcomm Display DSI 7nm PHY
@@ -10,7 +10,7 @@ maintainers: · 2 unmodified lines
1010 - Jonathan Marek <jonathan@marek.ca>
1111
1212 allOf:
13− - $ref: dsi-phy-common.yaml#
13+ - $ref: qcom,dsi-phy-common.yaml#
1414
1515 properties:
1616 compatible:
@@ -29,9 +29,14 @@ properties: · 12 unmodified lines
2929 - qcom,sm8550-dsi-phy-4nm
3030 - qcom,sm8650-dsi-phy-4nm
3131 - qcom,sm8750-dsi-phy-3nm
32+ - items:
33+ - enum:
34+ - qcom,eliza-dsi-phy-4nm
35+ - const: qcom,sm8650-dsi-phy-4nm
3236 - items:
3337 - enum:
3438 - qcom,qcs8300-dsi-phy-5nm
39+ - qcom,sc8280xp-dsi-phy-5nm
3540 - const: qcom,sa8775p-dsi-phy-5nm
3641
3742 reg:
Documentation/devicetree/bindings/phy/qcom,dsi-phy-common.yamlrenamed from Documentation/devicetree/bindings/display/msm/dsi-phy-common.yaml+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/display/msm/dsi-phy-common.yaml#
4+$id: http://devicetree.org/schemas/phy/qcom,dsi-phy-common.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: Qualcomm Display DSI PHY Common Properties
Documentation/devicetree/bindings/powerpc/fsl/fsl,mpc83xx.yaml+93−0
@@ -0,0 +1,93 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/powerpc/fsl/fsl,mpc83xx.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: Freescale PowerQUICC II Pro (MPC83xx) platforms
8+
9+maintainers:
10+ - J. Neuschäfer <j.ne@posteo.net>
11+
12+properties:
13+ $nodename:
14+ const: '/'
15+ compatible:
16+ oneOf:
17+ - description: MPC83xx Reference Design Boards
18+ items:
19+ - enum:
20+ - fsl,mpc8308rdb
21+ - fsl,mpc8315erdb
22+ - fsl,mpc8360rdk
23+ - fsl,mpc8377rdb
24+ - fsl,mpc8377wlan
25+ - fsl,mpc8378rdb
26+ - fsl,mpc8379rdb
27+
28+ - description: MPC8313E Reference Design Board
29+ items:
30+ - const: MPC8313ERDB
31+ - const: MPC831xRDB
32+ - const: MPC83xxRDB
33+
34+ - description: MPC8323E Reference Design Board
35+ items:
36+ - const: MPC8323ERDB
37+ - const: MPC832xRDB
38+ - const: MPC83xxRDB
39+
40+ - description: MPC8349E-mITX(-GP) Reference Design Platform
41+ items:
42+ - enum:
43+ - MPC8349EMITX
44+ - MPC8349EMITXGP
45+ - const: MPC834xMITX
46+ - const: MPC83xxMITX
47+
48+ - description: Keymile KMETER1 board
49+ const: keymile,KMETER1
50+
51+ - description: MPC8308 P1M board
52+ const: denx,mpc8308_p1m
53+
54+patternProperties:
55+ "^soc@.*$":
56+ type: object
57+ properties:
58+ compatible:
59+ oneOf:
60+ - items:
61+ - enum:
62+ - fsl,mpc8315-immr
63+ - fsl,mpc8308-immr
64+ - const: simple-bus
65+ - items:
66+ - const: fsl,mpc8360-immr
67+ - const: fsl,immr
68+ - const: fsl,soc
69+ - const: simple-bus
70+ - const: simple-bus
71+
72+additionalProperties: true
73+
74+examples:
75+ - |
76+ / {
77+ compatible = "fsl,mpc8315erdb";
78+ model = "MPC8315E-RDB";
79+ #address-cells = <1>;
80+ #size-cells = <1>;
81+
82+ soc@e0000000 {
83+ compatible = "fsl,mpc8315-immr", "simple-bus";
84+ reg = <0xe0000000 0x00000200>;
85+ #address-cells = <1>;
86+ #size-cells = <1>;
87+ device_type = "soc";
88+ ranges = <0 0xe0000000 0x00100000>;
89+ bus-frequency = <0>;
90+ };
91+ };
92+
93+...
Documentation/devicetree/bindings/regulator/regulator.yaml+2−2
@@ -168,7 +168,7 @@ properties: · 167 unmodified lines
168168 offset from voltage set to regulator.
169169
170170 regulator-uv-protection-microvolt:
171− description: Set over under voltage protection limit. This is a limit where
171+ description: Set under voltage protection limit. This is a limit where
172172 hardware performs emergency shutdown. Zero can be passed to disable
173173 protection and value '1' indicates that protection should be enabled but
174174 limit setting can be omitted. Limit is given as microvolt offset from
@@ -182,7 +182,7 @@ properties: · 7 unmodified lines
182182 is given as microvolt offset from voltage set to regulator.
183183
184184 regulator-uv-warn-microvolt:
185− description: Set over under voltage warning limit. This is a limit where
185+ description: Set under voltage warning limit. This is a limit where
186186 hardware is assumed still to be functional but approaching limit where
187187 it gets damaged. Recovery actions should be initiated. Zero can be passed
188188 to disable detection and value '1' indicates that detection should
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml+1−0
@@ -33,6 +33,7 @@ properties: · 32 unmodified lines
3333 - const: rockchip,rk3066-spdif
3434 - items:
3535 - enum:
36+ - rockchip,rk3576-spdif
3637 - rockchip,rk3588-spdif
3738 - const: rockchip,rk3568-spdif
3839
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml+1−1
@@ -164,7 +164,7 @@ allOf: · 163 unmodified lines
164164 properties:
165165 compatible:
166166 contains:
167− const: st,stm32mph7-sai
167+ const: st,stm32h7-sai
168168 then:
169169 properties:
170170 clocks:
Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml+24−5
@@ -6,9 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# · 5 unmodified lines
66
77 title: Allwinner A31 SPI Controller
88
9−allOf:
10− - $ref: spi-controller.yaml
11−
129 maintainers:
1310 - Chen-Yu Tsai <wens@csie.org>
1411 - Maxime Ripard <mripard@kernel.org>
@@ -82,11 +79,11 @@ patternProperties: · 67 unmodified lines
8279
8380 spi-rx-bus-width:
8481 items:
85− - const: 1
82+ enum: [0, 1, 2, 4]
8683
8784 spi-tx-bus-width:
8885 items:
89− - const: 1
86+ enum: [0, 1, 2, 4]
9087
9188 required:
9289 - compatible
@@ -95,6 +92,28 @@ required: · 2 unmodified lines
9592 - clocks
9693 - clock-names
9794
95+allOf:
96+ - $ref: spi-controller.yaml
97+ - if:
98+ not:
99+ properties:
100+ compatible:
101+ contains:
102+ enum:
103+ - allwinner,sun50i-r329-spi
104+ - allwinner,sun55i-a523-spi
105+ then:
106+ patternProperties:
107+ "^.*@[0-9a-f]+":
108+ properties:
109+ spi-rx-bus-width:
110+ items:
111+ enum: [0, 1]
112+
113+ spi-tx-bus-width:
114+ items:
115+ enum: [0, 1]
116+
98117 unevaluatedProperties: false
99118
100119 examples:
Documentation/devicetree/bindings/vendor-prefixes.yaml+6−0
@@ -172,6 +172,8 @@ patternProperties: · 171 unmodified lines
172172 description: ARM Ltd.
173173 "^armadeus,.*":
174174 description: ARMadeus Systems SARL
175+ "^armchina,.*":
176+ description: Arm Technology (China) Co., Ltd.
175177 "^armsom,.*":
176178 description: ArmSoM Technology Co., Ltd.
177179 "^arrow,.*":
@@ -441,6 +443,8 @@ patternProperties: · 263 unmodified lines
441443 description: D-Link Corporation
442444 "^dmo,.*":
443445 description: Data Modul AG
446+ "^doestek,.*":
447+ description: Doestek Co., Ltd.
444448 "^domintech,.*":
445449 description: Domintech Co., Ltd.
446450 "^dongwoon,.*":
@@ -709,6 +713,8 @@ patternProperties: · 262 unmodified lines
709713 description: Hitex Development Tools
710714 "^hitron,.*":
711715 description: HiTRON Electronics Corporation
716+ "^holitech,.*":
717+ description: Jiangxi Holitech Technology Co., Ltd.
712718 "^holt,.*":
713719 description: Holt Integrated Circuits, Inc.
714720 "^holtek,.*":
Documentation/driver-api/driver-model/binding.rst+48−0
@@ -99,3 +99,51 @@ of the driver is decremented. All symlinks between the two are removed. · 98 unmodified lines
9999 When a driver is removed, the list of devices that it supports is
100100 iterated over, and the driver's remove callback is called for each
101101 one. The device is removed from that list and the symlinks removed.
102+
103+
104+Driver Override
105+~~~~~~~~~~~~~~~
106+
107+Userspace may override the standard matching by writing a driver name to
108+a device's ``driver_override`` sysfs attribute. When set, only a driver
109+whose name matches the override will be considered during binding. This
110+bypasses all bus-specific matching (OF, ACPI, ID tables, etc.).
111+
112+The override may be cleared by writing an empty string, which returns
113+the device to standard matching rules. Writing to ``driver_override``
114+does not automatically unbind the device from its current driver or
115+make any attempt to load the specified driver.
116+
117+Buses opt into this mechanism by setting the ``driver_override`` flag in
118+their ``struct bus_type``::
119+
120+ const struct bus_type example_bus_type = {
121+ ...
122+ .driver_override = true,
123+ };
124+
125+When the flag is set, the driver core automatically creates the
126+``driver_override`` sysfs attribute for every device on that bus.
127+
128+The bus's ``match()`` callback should check the override before performing
129+its own matching, using ``device_match_driver_override()``::
130+
131+ static int example_match(struct device *dev, const struct device_driver *drv)
132+ {
133+ int ret;
134+
135+ ret = device_match_driver_override(dev, drv);
136+ if (ret >= 0)
137+ return ret;
138+
139+ /* Fall through to bus-specific matching... */
140+ }
141+
142+``device_match_driver_override()`` returns > 0 if the override matches
143+the given driver, 0 if the override is set but does not match, or < 0 if
144+no override is set at all.
145+
146+Additional helpers are available:
147+
148+- ``device_set_driver_override()`` - set or clear the override from kernel code.
149+- ``device_has_driver_override()`` - check whether an override is set.
Documentation/filesystems/overlayfs.rst+50−0
@@ -783,6 +783,56 @@ controlled by the "uuid" mount option, which supports these values: · 782 unmodified lines
783783 mounted with "uuid=on".
784784
785785
786+Durability and copy up
787+----------------------
788+
789+The fsync(2) system call ensures that the data and metadata of a file
790+are safely written to the backing storage, which is expected to
791+guarantee the existence of the information post system crash.
792+
793+Without an fsync(2) call, there is no guarantee that the observed
794+data after a system crash will be either the old or the new data, but
795+in practice, the observed data after crash is often the old or new data
796+or a mix of both.
797+
798+When an overlayfs file is modified for the first time, copy up will
799+create a copy of the lower file and its parent directories in the upper
800+layer. Since the Linux filesystem API does not enforce any particular
801+ordering on storing changes without explicit fsync(2) calls, in case
802+of a system crash, the upper file could end up with no data at all
803+(i.e. zeros), which would be an unusual outcome. To avoid this
804+experience, overlayfs calls fsync(2) on the upper file before completing
805+data copy up with rename(2) or link(2) to make the copy up "atomic".
806+
807+By default, overlayfs does not explicitly call fsync(2) on copied up
808+directories or on metadata-only copy up, so it provides no guarantee to
809+persist the user's modification unless the user calls fsync(2).
810+The fsync during copy up only guarantees that if a copy up is observed
811+after a crash, the observed data is not zeroes or intermediate values
812+from the copy up staging area.
813+
814+On traditional local filesystems with a single journal (e.g. ext4, xfs),
815+fsync on a file also persists the parent directory changes, because they
816+are usually modified in the same transaction, so metadata durability during
817+data copy up effectively comes for free. Overlayfs further limits risk by
818+disallowing network filesystems as upper layer.
819+
820+Overlayfs can be tuned to prefer performance or durability when storing
821+to the underlying upper layer. This is controlled by the "fsync" mount
822+option, which supports these values:
823+
824+- "auto": (default)
825+ Call fsync(2) on upper file before completion of data copy up.
826+ No explicit fsync(2) on directory or metadata-only copy up.
827+- "strict":
828+ Call fsync(2) on upper file and directories before completion of any
829+ copy up.
830+- "volatile": [*]
831+ Prefer performance over durability (see `Volatile mount`_)
832+
833+[*] The mount option "volatile" is an alias to "fsync=volatile".
834+
835+
786836 Volatile mount
787837 --------------
788838
Documentation/filesystems/proc.rst+8−0
@@ -1089,6 +1089,8 @@ Example output. You may not have all of these fields. · 1088 unmodified lines
10891089 CmaFree: 0 kB
10901090 Unaccepted: 0 kB
10911091 Balloon: 0 kB
1092+ GPUActive: 0 kB
1093+ GPUReclaim: 0 kB
10921094 HugePages_Total: 0
10931095 HugePages_Free: 0
10941096 HugePages_Rsvd: 0
@@ -1269,6 +1271,12 @@ Unaccepted · 174 unmodified lines
12691271 Memory that has not been accepted by the guest
12701272 Balloon
12711273 Memory returned to Host by VM Balloon Drivers
1274+GPUActive
1275+ System memory allocated to active GPU objects
1276+GPUReclaim
1277+ System memory stored in GPU pools for reuse. This memory is not
1278+ counted in GPUActive. It is shrinker reclaimable memory kept in a reuse
1279+ pool because it has non-standard page table attributes, like WC or UC.
12721280 HugePages_Total, HugePages_Free, HugePages_Rsvd, HugePages_Surp, Hugepagesize, Hugetlb
12731281 See Documentation/admin-guide/mm/hugetlbpage.rst.
12741282 DirectMap4k, DirectMap2M, DirectMap1G
Documentation/gpu/drm-kms-helpers.rst+0−12
@@ -104,18 +104,6 @@ VBLANK Helper Reference · 103 unmodified lines
104104 .. kernel-doc:: drivers/gpu/drm/drm_vblank_helper.c
105105 :export:
106106
107−Simple KMS Helper Reference
108−===========================
109−
110−.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
111− :doc: overview
112−
113−.. kernel-doc:: include/drm/drm_simple_kms_helper.h
114− :internal:
115−
116−.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
117− :export:
118−
119107 fbdev Helper Functions Reference
120108 ================================
121109
Documentation/gpu/drm-uapi.rst+8−8
@@ -438,14 +438,14 @@ following expectations. · 437 unmodified lines
438438 unknown consumer policy
439439 =============== ========================================
440440
441−The only exception to this is ``WEDGED=none``, which signifies that the device
442−was temporarily 'wedged' at some point but was recovered from driver context
443−using device specific methods like reset. No explicit recovery is expected from
444−the consumer in this case, but it can still take additional steps like gathering
445−telemetry information (devcoredump, syslog). This is useful because the first
446−hang is usually the most critical one which can result in consequential hangs or
447−complete wedging.
448−
441+No Recovery
442+-----------
443+
444+Here ``WEDGED=none`` signifies that no recovery is expected from the consumer
445+but it can still try to gather telemetry information (devcoredump, syslog) for
446+debug purpose in order to root cause the hang. This is useful because the first
447+hang is usually the most critical one which can result in consequential hangs
448+or complete wedging.
449449
450450 Vendor Specific Recovery
451451 ------------------------
Documentation/gpu/introduction.rst+0−6
@@ -119,12 +119,6 @@ Simple DRM drivers to use as examples · 118 unmodified lines
119119 The DRM subsystem contains a lot of helper functions to ease writing drivers for
120120 simple graphic devices. For example, the `drivers/gpu/drm/tiny/` directory has a
121121 set of drivers that are simple enough to be implemented in a single source file.
122−
123−These drivers make use of the `struct drm_simple_display_pipe_funcs`, that hides
124−any complexity of the DRM subsystem and just requires drivers to implement a few
125−functions needed to operate the device. This could be used for devices that just
126−need a display pipeline with one full-screen scanout buffer feeding one output.
127−
128122 The tiny DRM drivers are good examples to understand how DRM drivers should look
129123 like. Since are just a few hundreds lines of code, they are quite easy to read.
130124
Documentation/gpu/nova/core/todo.rst+0−76
@@ -51,82 +51,6 @@ There also have been considerations of ToPrimitive [2]. · 50 unmodified lines
5151 | Link: https://lore.kernel.org/all/cover.1750689857.git.y.j3ms.n@gmail.com/ [1]
5252 | Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Implement.20.60FromPrimitive.60.20trait.20.2B.20derive.20macro.20for.20nova-core/with/541971854 [2]
5353
54−Generic register abstraction [REGA]
55−-----------------------------------
56−
57−Work out how register constants and structures can be automatically generated
58−through generalized macros.
59−
60−Example:
61−
62−.. code-block:: rust
63−
64− register!(BOOT0, 0x0, u32, pci::Bar<SIZE>, Fields [
65− MINOR_REVISION(3:0, RO),
66− MAJOR_REVISION(7:4, RO),
67− REVISION(7:0, RO), // Virtual register combining major and minor rev.
68− ])
69−
70−This could expand to something like:
71−
72−.. code-block:: rust
73−
74− const BOOT0_OFFSET: usize = 0x00000000;
75− const BOOT0_MINOR_REVISION_SHIFT: u8 = 0;
76− const BOOT0_MINOR_REVISION_MASK: u32 = 0x0000000f;
77− const BOOT0_MAJOR_REVISION_SHIFT: u8 = 4;
78− const BOOT0_MAJOR_REVISION_MASK: u32 = 0x000000f0;
79− const BOOT0_REVISION_SHIFT: u8 = BOOT0_MINOR_REVISION_SHIFT;
80− const BOOT0_REVISION_MASK: u32 = BOOT0_MINOR_REVISION_MASK | BOOT0_MAJOR_REVISION_MASK;
81−
82− struct Boot0(u32);
83−
84− impl Boot0 {
85− #[inline]
86− fn read(bar: &RevocableGuard<'_, pci::Bar<SIZE>>) -> Self {
87− Self(bar.readl(BOOT0_OFFSET))
88− }
89−
90− #[inline]
91− fn minor_revision(&self) -> u32 {
92− (self.0 & BOOT0_MINOR_REVISION_MASK) >> BOOT0_MINOR_REVISION_SHIFT
93− }
94−
95− #[inline]
96− fn major_revision(&self) -> u32 {
97− (self.0 & BOOT0_MAJOR_REVISION_MASK) >> BOOT0_MAJOR_REVISION_SHIFT
98− }
99−
100− #[inline]
101− fn revision(&self) -> u32 {
102− (self.0 & BOOT0_REVISION_MASK) >> BOOT0_REVISION_SHIFT
103− }
104− }
105−
106−Usage:
107−
108−.. code-block:: rust
109−
110− let bar = bar.try_access().ok_or(ENXIO)?;
111−
112− let boot0 = Boot0::read(&bar);
113− pr_info!("Revision: {}\n", boot0.revision());
114−
115−A work-in-progress implementation currently resides in
116−`drivers/gpu/nova-core/regs/macros.rs` and is used in nova-core. It would be
117−nice to improve it (possibly using proc macros) and move it to the `kernel`
118−crate so it can be used by other components as well.
119−
120−Features desired before this happens:
121−
122−* Make I/O optional I/O (for field values that are not registers),
123−* Support other sizes than `u32`,
124−* Allow visibility control for registers and individual fields,
125−* Use Rust slice syntax to express fields ranges.
126−
127−| Complexity: Advanced
128−| Contact: Alexandre Courbot
129−
13054 Numerical operations [NUMM]
13155 ---------------------------
13256
Documentation/gpu/todo.rst+32−0
@@ -29,6 +29,38 @@ refactorings already and are an expert in the specific area · 28 unmodified lines
2929 Subsystem-wide refactorings
3030 ===========================
3131
32+Open-code drm_simple_encoder_init()
33+-----------------------------------
34+
35+The helper drm_simple_encoder_init() was supposed to simplify encoder
36+initialization. Instead it only added an intermediate layer between atomic
37+modesetting and the DRM driver.
38+
39+The task here is to remove drm_simple_encoder_init(). Search for a driver
40+that calls drm_simple_encoder_init() and inline the helper. The driver will
41+also need its own instance of drm_encoder_funcs.
42+
43+Contact: Thomas Zimmermann, respective driver maintainer
44+
45+Level: Easy
46+
47+Replace struct drm_simple_display_pipe with regular atomic helpers
48+------------------------------------------------------------------
49+
50+The data type struct drm_simple_display_pipe and its helpers were supposed
51+to simplify driver development. Instead they only added an intermediate layer
52+between atomic modesetting and the DRM driver.
53+
54+There are still drivers that use drm_simple_display_pipe. The task here is to
55+convert them to use regular atomic helpers. Search for a driver that calls
56+drm_simple_display_pipe_init() and inline all helpers from drm_simple_kms_helper.c
57+into the driver, such that no simple-KMS interfaces are required. Please also
58+rename all inlined fucntions according to driver conventions.
59+
60+Contact: Thomas Zimmermann, respective driver maintainer
61+
62+Level: Easy
63+
3264 Remove custom dumb_map_offset implementations
3365 ---------------------------------------------
3466
Documentation/hwmon/adm1177.rst+4−4
@@ -27,10 +27,10 @@ for details. · 26 unmodified lines
2727 Sysfs entries
2828 -------------
2929
30−The following attributes are supported. Current maxim attribute
30+The following attributes are supported. Current maximum attribute
3131 is read-write, all other attributes are read-only.
3232
33−in0_input Measured voltage in microvolts.
33+in0_input Measured voltage in millivolts.
3434
35−curr1_input Measured current in microamperes.
36−curr1_max_alarm Overcurrent alarm in microamperes.
35+curr1_input Measured current in milliamperes.
36+curr1_max Overcurrent shutdown threshold in milliamperes.
Documentation/hwmon/peci-cputemp.rst+6−4
@@ -51,8 +51,9 @@ temp1_max Provides thermal control temperature of the CPU package · 50 unmodified lines
5151 temp1_crit Provides shutdown temperature of the CPU package which
5252 is also known as the maximum processor junction
5353 temperature, Tjmax or Tprochot.
54−temp1_crit_hyst Provides the hysteresis value from Tcontrol to Tjmax of
55− the CPU package.
54+temp1_crit_hyst Provides the hysteresis temperature of the CPU
55+ package. Returns Tcontrol, the temperature at which
56+ the critical condition clears.
5657
5758 temp2_label "DTS"
5859 temp2_input Provides current temperature of the CPU package scaled
@@ -62,8 +63,9 @@ temp2_max Provides thermal control temperature of the CPU package · 3 unmodified lines
6263 temp2_crit Provides shutdown temperature of the CPU package which
6364 is also known as the maximum processor junction
6465 temperature, Tjmax or Tprochot.
65−temp2_crit_hyst Provides the hysteresis value from Tcontrol to Tjmax of
66− the CPU package.
66+temp2_crit_hyst Provides the hysteresis temperature of the CPU
67+ package. Returns Tcontrol, the temperature at which
68+ the critical condition clears.
6769
6870 temp3_label "Tcontrol"
6971 temp3_input Provides current Tcontrol temperature of the CPU
Documentation/netlink/specs/net_shaper.yaml+6−6
@@ -247,8 +247,8 @@ operations: · 246 unmodified lines
247247 flags: [admin-perm]
248248
249249 do:
250− pre: net-shaper-nl-pre-doit
251− post: net-shaper-nl-post-doit
250+ pre: net-shaper-nl-pre-doit-write
251+ post: net-shaper-nl-post-doit-write
252252 request:
253253 attributes:
254254 - ifindex
@@ -278,8 +278,8 @@ operations: · 23 unmodified lines
278278 flags: [admin-perm]
279279
280280 do:
281− pre: net-shaper-nl-pre-doit
282− post: net-shaper-nl-post-doit
281+ pre: net-shaper-nl-pre-doit-write
282+ post: net-shaper-nl-post-doit-write
283283 request:
284284 attributes: *ns-binding
285285
@@ -309,8 +309,8 @@ operations: · 23 unmodified lines
309309 flags: [admin-perm]
310310
311311 do:
312− pre: net-shaper-nl-pre-doit
313− post: net-shaper-nl-post-doit
312+ pre: net-shaper-nl-pre-doit-write
313+ post: net-shaper-nl-post-doit-write
314314 request:
315315 attributes:
316316 - ifindex
Documentation/process/security-bugs.rst+139−15
@@ -5,8 +5,138 @@ Security bugs · 4 unmodified lines
55
66 Linux kernel developers take security very seriously. As such, we'd
77 like to know when a security bug is found so that it can be fixed and
8−disclosed as quickly as possible. Please report security bugs to the
9−Linux kernel security team.
8+disclosed as quickly as possible.
9+
10+Preparing your report
11+---------------------
12+
13+Like with any bug report, a security bug report requires a lot of analysis work
14+from the developers, so the more information you can share about the issue, the
15+better. Please review the procedure outlined in
16+Documentation/admin-guide/reporting-issues.rst if you are unclear about what
17+information is helpful. The following information are absolutely necessary in
18+**any** security bug report:
19+
20+ * **affected kernel version range**: with no version indication, your report
21+ will not be processed. A significant part of reports are for bugs that
22+ have already been fixed, so it is extremely important that vulnerabilities
23+ are verified on recent versions (development tree or latest stable
24+ version), at least by verifying that the code has not changed since the
25+ version where it was detected.
26+
27+ * **description of the problem**: a detailed description of the problem, with
28+ traces showing its manifestation, and why you consider that the observed
29+ behavior as a problem in the kernel, is necessary.
30+
31+ * **reproducer**: developers will need to be able to reproduce the problem to
32+ consider a fix as effective. This includes both a way to trigger the issue
33+ and a way to confirm it happens. A reproducer with low complexity
34+ dependencies will be needed (source code, shell script, sequence of
35+ instructions, file-system image etc). Binary-only executables are not
36+ accepted. Working exploits are extremely helpful and will not be released
37+ without consent from the reporter, unless they are already public. By
38+ definition if an issue cannot be reproduced, it is not exploitable, thus it
39+ is not a security bug.
40+
41+ * **conditions**: if the bug depends on certain configuration options,
42+ sysctls, permissions, timing, code modifications etc, these should be
43+ indicated.
44+
45+In addition, the following information are highly desirable:
46+
47+ * **suspected location of the bug**: the file names and functions where the
48+ bug is suspected to be present are very important, at least to help forward
49+ the report to the appropriate maintainers. When not possible (for example,
50+ "system freezes each time I run this command"), the security team will help
51+ identify the source of the bug.
52+
53+ * **a proposed fix**: bug reporters who have analyzed the cause of a bug in
54+ the source code almost always have an accurate idea on how to fix it,
55+ because they spent a long time studying it and its implications. Proposing
56+ a tested fix will save maintainers a lot of time, even if the fix ends up
57+ not being the right one, because it helps understand the bug. When
58+ proposing a tested fix, please always format it in a way that can be
59+ immediately merged (see Documentation/process/submitting-patches.rst).
60+ This will save some back-and-forth exchanges if it is accepted, and you
61+ will be credited for finding and fixing this issue. Note that in this case
62+ only a ``Signed-off-by:`` tag is needed, without ``Reported-by:`` when the
63+ reporter and author are the same.
64+
65+ * **mitigations**: very often during a bug analysis, some ways of mitigating
66+ the issue appear. It is useful to share them, as they can be helpful to
67+ keep end users protected during the time it takes them to apply the fix.
68+
69+Identifying contacts
70+--------------------
71+
72+The most effective way to report a security bug is to send it directly to the
73+affected subsystem's maintainers and Cc: the Linux kernel security team. Do
74+not send it to a public list at this stage, unless you have good reasons to
75+consider the issue as being public or trivial to discover (e.g. result of a
76+widely available automated vulnerability scanning tool that can be repeated by
77+anyone).
78+
79+If you're sending a report for issues affecting multiple parts in the kernel,
80+even if they're fairly similar issues, please send individual messages (think
81+that maintainers will not all work on the issues at the same time). The only
82+exception is when an issue concerns closely related parts maintained by the
83+exact same subset of maintainers, and these parts are expected to be fixed all
84+at once by the same commit, then it may be acceptable to report them at once.
85+
86+One difficulty for most first-time reporters is to figure the right list of
87+recipients to send a report to. In the Linux kernel, all official maintainers
88+are trusted, so the consequences of accidentally including the wrong maintainer
89+are essentially a bit more noise for that person, i.e. nothing dramatic. As
90+such, a suitable method to figure the list of maintainers (which kernel
91+security officers use) is to rely on the get_maintainer.pl script, tuned to
92+only report maintainers. This script, when passed a file name, will look for
93+its path in the MAINTAINERS file to figure a hierarchical list of relevant
94+maintainers. Calling it a first time with the finest level of filtering will
95+most of the time return a short list of this specific file's maintainers::
96+
97+ $ ./scripts/get_maintainer.pl --no-l --no-r --pattern-depth 1 \
98+ drivers/example.c
99+ Developer One <dev1@example.com> (maintainer:example driver)
100+ Developer Two <dev2@example.org> (maintainer:example driver)
101+
102+These two maintainers should then receive the message. If the command does not
103+return anything, it means the affected file is part of a wider subsystem, so we
104+should be less specific::
105+
106+ $ ./scripts/get_maintainer.pl --no-l --no-r drivers/example.c
107+ Developer One <dev1@example.com> (maintainer:example subsystem)
108+ Developer Two <dev2@example.org> (maintainer:example subsystem)
109+ Developer Three <dev3@example.com> (maintainer:example subsystem [GENERAL])
110+ Developer Four <dev4@example.org> (maintainer:example subsystem [GENERAL])
111+
112+Here, picking the first, most specific ones, is sufficient. When the list is
113+long, it is possible to produce a comma-delimited e-mail address list on a
114+single line suitable for use in the To: field of a mailer like this::
115+
116+ $ ./scripts/get_maintainer.pl --no-tree --no-l --no-r --no-n --m \
117+ --no-git-fallback --no-substatus --no-rolestats --no-multiline \
118+ --pattern-depth 1 drivers/example.c
119+ dev1@example.com, dev2@example.org
120+
121+or this for the wider list::
122+
123+ $ ./scripts/get_maintainer.pl --no-tree --no-l --no-r --no-n --m \
124+ --no-git-fallback --no-substatus --no-rolestats --no-multiline \
125+ drivers/example.c
126+ dev1@example.com, dev2@example.org, dev3@example.com, dev4@example.org
127+
128+If at this point you're still facing difficulties spotting the right
129+maintainers, **and only in this case**, it's possible to send your report to
130+the Linux kernel security team only. Your message will be triaged, and you
131+will receive instructions about whom to contact, if needed. Your message may
132+equally be forwarded as-is to the relevant maintainers.
133+
134+Sending the report
135+------------------
136+
137+Reports are to be sent over e-mail exclusively. Please use a working e-mail
138+address, preferably the same that you want to appear in ``Reported-by`` tags
139+if any. If unsure, send your report to yourself first.
10140
11141 The security team and maintainers almost always require additional
12142 information beyond what was initially provided in a report and rely on
@@ -18,20 +148,12 @@ run additional tests. Reports where the reporter does not respond promptly · 5 unmodified lines
18148 or cannot effectively discuss their findings may be abandoned if the
19149 communication does not quickly improve.
20150
21−As it is with any bug, the more information provided the easier it
22−will be to diagnose and fix. Please review the procedure outlined in
23−'Documentation/admin-guide/reporting-issues.rst' if you are unclear about what
24−information is helpful. Any exploit code is very helpful and will not
25−be released without consent from the reporter unless it has already been
26−made public.
27−
151+The report must be sent to maintainers, with the security team in ``Cc:``.
28152 The Linux kernel security team can be contacted by email at
29153 <security@kernel.org>. This is a private list of security officers
30−who will help verify the bug report and develop and release a fix.
31−If you already have a fix, please include it with your report, as
32−that can speed up the process considerably. It is possible that the
33−security team will bring in extra help from area maintainers to
34−understand and fix the security vulnerability.
154+who will help verify the bug report and assist developers working on a fix.
155+It is possible that the security team will bring in extra help from area
156+maintainers to understand and fix the security vulnerability.
35157
36158 Please send **plain text** emails without attachments where possible.
37159 It is much harder to have a context-quoted discussion about a complex
@@ -42,7 +164,9 @@ reproduction steps, and follow it with a proposed fix, all in plain text. · 4 unmodified lines
42164 Markdown, HTML and RST formatted reports are particularly frowned upon since
43165 they're quite hard to read for humans and encourage to use dedicated viewers,
44166 sometimes online, which by definition is not acceptable for a confidential
45−security report.
167+security report. Note that some mailers tend to mangle formatting of plain
168+text by default, please consult Documentation/process/email-clients.rst for
169+more info.
46170
47171 Disclosure and embargoed information
48172 ------------------------------------
Documentation/scheduler/sched-ext.rst+27−3
@@ -43,7 +43,6 @@ options should be enabled to use sched_ext: · 42 unmodified lines
4343 CONFIG_DEBUG_INFO_BTF=y
4444 CONFIG_BPF_JIT_ALWAYS_ON=y
4545 CONFIG_BPF_JIT_DEFAULT_ON=y
46− CONFIG_PAHOLE_HAS_BTF_TAG=y
4746
4847 sched_ext is used only when the BPF scheduler is loaded and running.
4948
@@ -58,7 +57,8 @@ in ``ops->flags``, all ``SCHED_NORMAL``, ``SCHED_BATCH``, ``SCHED_IDLE``, and · 8 unmodified lines
5857 However, when the BPF scheduler is loaded and ``SCX_OPS_SWITCH_PARTIAL`` is
5958 set in ``ops->flags``, only tasks with the ``SCHED_EXT`` policy are scheduled
6059 by sched_ext, while tasks with ``SCHED_NORMAL``, ``SCHED_BATCH`` and
61−``SCHED_IDLE`` policies are scheduled by the fair-class scheduler.
60+``SCHED_IDLE`` policies are scheduled by the fair-class scheduler which has
61+higher sched_class precedence than ``SCHED_EXT``.
6262
6363 Terminating the sched_ext scheduler program, triggering `SysRq-S`, or
6464 detection of any internal error including stalled runnable tasks aborts the
@@ -345,6 +345,8 @@ Where to Look · 280 unmodified lines
345345 The functions prefixed with ``scx_bpf_`` can be called from the BPF
346346 scheduler.
347347
348+* ``kernel/sched/ext_idle.c`` contains the built-in idle CPU selection policy.
349+
348350 * ``tools/sched_ext/`` hosts example BPF scheduler implementations.
349351
350352 * ``scx_simple[.bpf].c``: Minimal global FIFO scheduler example using a
@@ -353,13 +355,35 @@ Where to Look · 2 unmodified lines
353355 * ``scx_qmap[.bpf].c``: A multi-level FIFO scheduler supporting five
354356 levels of priority implemented with ``BPF_MAP_TYPE_QUEUE``.
355357
358+ * ``scx_central[.bpf].c``: A central FIFO scheduler where all scheduling
359+ decisions are made on one CPU, demonstrating ``LOCAL_ON`` dispatching,
360+ tickless operation, and kthread preemption.
361+
362+ * ``scx_cpu0[.bpf].c``: A scheduler that queues all tasks to a shared DSQ
363+ and only dispatches them on CPU0 in FIFO order. Useful for testing bypass
364+ behavior.
365+
366+ * ``scx_flatcg[.bpf].c``: A flattened cgroup hierarchy scheduler
367+ implementing hierarchical weight-based cgroup CPU control by compounding
368+ each cgroup's share at every level into a single flat scheduling layer.
369+
370+ * ``scx_pair[.bpf].c``: A core-scheduling example that always makes
371+ sibling CPU pairs execute tasks from the same CPU cgroup.
372+
373+ * ``scx_sdt[.bpf].c``: A variation of ``scx_simple`` demonstrating BPF
374+ arena memory management for per-task data.
375+
376+ * ``scx_userland[.bpf].c``: A minimal scheduler demonstrating user space
377+ scheduling. Tasks with CPU affinity are direct-dispatched in FIFO order;
378+ all others are scheduled in user space by a simple vruntime scheduler.
379+
356380 ABI Instability
357381 ===============
358382
359383 The APIs provided by sched_ext to BPF schedulers programs have no stability
360384 guarantees. This includes the ops table callbacks and constants defined in
361385 ``include/linux/sched/ext.h``, as well as the ``scx_bpf_`` kfuncs defined in
362−``kernel/sched/ext.c``.
386+``kernel/sched/ext.c`` and ``kernel/sched/ext_idle.c``.
363387
364388 While we will attempt to provide a relatively stable API surface when
365389 possible, they are subject to change without warning between kernel
Documentation/userspace-api/landlock.rst+19−4
@@ -8,7 +8,7 @@ Landlock: unprivileged access control · 7 unmodified lines
88 =====================================
99
1010 :Author: Mickaël Salaün
11−:Date: January 2026
11+:Date: March 2026
1212
1313 The goal of Landlock is to enable restriction of ambient rights (e.g. global
1414 filesystem or network access) for a set of processes. Because Landlock
@@ -197,12 +197,27 @@ similar backwards compatibility check is needed for the restrict flags · 182 unmodified lines
197197
198198 .. code-block:: c
199199
200− __u32 restrict_flags = LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON;
201− if (abi < 7) {
202− /* Clear logging flags unsupported before ABI 7. */
200+ __u32 restrict_flags =
201+ LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON |
202+ LANDLOCK_RESTRICT_SELF_TSYNC;
203+ switch (abi) {
204+ case 1 ... 6:
205+ /* Removes logging flags for ABI < 7 */
203206 restrict_flags &= ~(LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF |
204207 LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON |
205208 LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF);
209+ __attribute__((fallthrough));
210+ case 7:
211+ /*
212+ * Removes multithreaded enforcement flag for ABI < 8
213+ *
214+ * WARNING: Without this flag, calling landlock_restrict_self(2) is
215+ * only equivalent if the calling process is single-threaded. Below
216+ * ABI v8 (and as of ABI v8, when not using this flag), a Landlock
217+ * policy would only be enforced for the calling thread and its
218+ * children (and not for all threads, including parents and siblings).
219+ */
220+ restrict_flags &= ~LANDLOCK_RESTRICT_SELF_TSYNC;
206221 }
207222
208223 The next step is to restrict the current thread from gaining more privileges
Documentation/virt/kvm/api.rst+117−109
@@ -8435,115 +8435,123 @@ KVM_CHECK_EXTENSION. · 8434 unmodified lines
84358435
84368436 The valid bits in cap.args[0] are:
84378437
8438−=================================== ============================================
8439− KVM_X86_QUIRK_LINT0_REENABLED By default, the reset value for the LVT
8440− LINT0 register is 0x700 (APIC_MODE_EXTINT).
8441− When this quirk is disabled, the reset value
8442− is 0x10000 (APIC_LVT_MASKED).
8443−
8444− KVM_X86_QUIRK_CD_NW_CLEARED By default, KVM clears CR0.CD and CR0.NW on
8445− AMD CPUs to workaround buggy guest firmware
8446− that runs in perpetuity with CR0.CD, i.e.
8447− with caches in "no fill" mode.
8448−
8449− When this quirk is disabled, KVM does not
8450− change the value of CR0.CD and CR0.NW.
8451−
8452− KVM_X86_QUIRK_LAPIC_MMIO_HOLE By default, the MMIO LAPIC interface is
8453− available even when configured for x2APIC
8454− mode. When this quirk is disabled, KVM
8455− disables the MMIO LAPIC interface if the
8456− LAPIC is in x2APIC mode.
8457−
8458− KVM_X86_QUIRK_OUT_7E_INC_RIP By default, KVM pre-increments %rip before
8459− exiting to userspace for an OUT instruction
8460− to port 0x7e. When this quirk is disabled,
8461− KVM does not pre-increment %rip before
8462− exiting to userspace.
8463−
8464− KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT When this quirk is disabled, KVM sets
8465− CPUID.01H:ECX[bit 3] (MONITOR/MWAIT) if
8466− IA32_MISC_ENABLE[bit 18] (MWAIT) is set.
8467− Additionally, when this quirk is disabled,
8468− KVM clears CPUID.01H:ECX[bit 3] if
8469− IA32_MISC_ENABLE[bit 18] is cleared.
8470−
8471− KVM_X86_QUIRK_FIX_HYPERCALL_INSN By default, KVM rewrites guest
8472− VMMCALL/VMCALL instructions to match the
8473− vendor's hypercall instruction for the
8474− system. When this quirk is disabled, KVM
8475− will no longer rewrite invalid guest
8476− hypercall instructions. Executing the
8477− incorrect hypercall instruction will
8478− generate a #UD within the guest.
8479−
8480−KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if
8481− they are intercepted) as NOPs regardless of
8482− whether or not MONITOR/MWAIT are supported
8483− according to guest CPUID. When this quirk
8484− is disabled and KVM_X86_DISABLE_EXITS_MWAIT
8485− is not set (MONITOR/MWAIT are intercepted),
8486− KVM will inject a #UD on MONITOR/MWAIT if
8487− they're unsupported per guest CPUID. Note,
8488− KVM will modify MONITOR/MWAIT support in
8489− guest CPUID on writes to MISC_ENABLE if
8490− KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is
8491− disabled.
8492−
8493−KVM_X86_QUIRK_SLOT_ZAP_ALL By default, for KVM_X86_DEFAULT_VM VMs, KVM
8494− invalidates all SPTEs in all memslots and
8495− address spaces when a memslot is deleted or
8496− moved. When this quirk is disabled (or the
8497− VM type isn't KVM_X86_DEFAULT_VM), KVM only
8498− ensures the backing memory of the deleted
8499− or moved memslot isn't reachable, i.e KVM
8500− _may_ invalidate only SPTEs related to the
8501− memslot.
8502−
8503−KVM_X86_QUIRK_STUFF_FEATURE_MSRS By default, at vCPU creation, KVM sets the
8504− vCPU's MSR_IA32_PERF_CAPABILITIES (0x345),
8505− MSR_IA32_ARCH_CAPABILITIES (0x10a),
8506− MSR_PLATFORM_INFO (0xce), and all VMX MSRs
8507− (0x480..0x492) to the maximal capabilities
8508− supported by KVM. KVM also sets
8509− MSR_IA32_UCODE_REV (0x8b) to an arbitrary
8510− value (which is different for Intel vs.
8511− AMD). Lastly, when guest CPUID is set (by
8512− userspace), KVM modifies select VMX MSR
8513− fields to force consistency between guest
8514− CPUID and L2's effective ISA. When this
8515− quirk is disabled, KVM zeroes the vCPU's MSR
8516− values (with two exceptions, see below),
8517− i.e. treats the feature MSRs like CPUID
8518− leaves and gives userspace full control of
8519− the vCPU model definition. This quirk does
8520− not affect VMX MSRs CR0/CR4_FIXED1 (0x487
8521− and 0x489), as KVM does now allow them to
8522− be set by userspace (KVM sets them based on
8523− guest CPUID, for safety purposes).
8524−
8525−KVM_X86_QUIRK_IGNORE_GUEST_PAT By default, on Intel platforms, KVM ignores
8526− guest PAT and forces the effective memory
8527− type to WB in EPT. The quirk is not available
8528− on Intel platforms which are incapable of
8529− safely honoring guest PAT (i.e., without CPU
8530− self-snoop, KVM always ignores guest PAT and
8531− forces effective memory type to WB). It is
8532− also ignored on AMD platforms or, on Intel,
8533− when a VM has non-coherent DMA devices
8534− assigned; KVM always honors guest PAT in
8535− such case. The quirk is needed to avoid
8536− slowdowns on certain Intel Xeon platforms
8537− (e.g. ICX, SPR) where self-snoop feature is
8538− supported but UC is slow enough to cause
8539− issues with some older guests that use
8540− UC instead of WC to map the video RAM.
8541− Userspace can disable the quirk to honor
8542− guest PAT if it knows that there is no such
8543− guest software, for example if it does not
8544− expose a bochs graphics device (which is
8545− known to have had a buggy driver).
8546−=================================== ============================================
8438+======================================== ================================================
8439+KVM_X86_QUIRK_LINT0_REENABLED By default, the reset value for the LVT
8440+ LINT0 register is 0x700 (APIC_MODE_EXTINT).
8441+ When this quirk is disabled, the reset value
8442+ is 0x10000 (APIC_LVT_MASKED).
8443+
8444+KVM_X86_QUIRK_CD_NW_CLEARED By default, KVM clears CR0.CD and CR0.NW on
8445+ AMD CPUs to workaround buggy guest firmware
8446+ that runs in perpetuity with CR0.CD, i.e.
8447+ with caches in "no fill" mode.
8448+
8449+ When this quirk is disabled, KVM does not
8450+ change the value of CR0.CD and CR0.NW.
8451+
8452+KVM_X86_QUIRK_LAPIC_MMIO_HOLE By default, the MMIO LAPIC interface is
8453+ available even when configured for x2APIC
8454+ mode. When this quirk is disabled, KVM
8455+ disables the MMIO LAPIC interface if the
8456+ LAPIC is in x2APIC mode.
8457+
8458+KVM_X86_QUIRK_OUT_7E_INC_RIP By default, KVM pre-increments %rip before
8459+ exiting to userspace for an OUT instruction
8460+ to port 0x7e. When this quirk is disabled,
8461+ KVM does not pre-increment %rip before
8462+ exiting to userspace.
8463+
8464+KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT When this quirk is disabled, KVM sets
8465+ CPUID.01H:ECX[bit 3] (MONITOR/MWAIT) if
8466+ IA32_MISC_ENABLE[bit 18] (MWAIT) is set.
8467+ Additionally, when this quirk is disabled,
8468+ KVM clears CPUID.01H:ECX[bit 3] if
8469+ IA32_MISC_ENABLE[bit 18] is cleared.
8470+
8471+KVM_X86_QUIRK_FIX_HYPERCALL_INSN By default, KVM rewrites guest
8472+ VMMCALL/VMCALL instructions to match the
8473+ vendor's hypercall instruction for the
8474+ system. When this quirk is disabled, KVM
8475+ will no longer rewrite invalid guest
8476+ hypercall instructions. Executing the
8477+ incorrect hypercall instruction will
8478+ generate a #UD within the guest.
8479+
8480+KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if
8481+ they are intercepted) as NOPs regardless of
8482+ whether or not MONITOR/MWAIT are supported
8483+ according to guest CPUID. When this quirk
8484+ is disabled and KVM_X86_DISABLE_EXITS_MWAIT
8485+ is not set (MONITOR/MWAIT are intercepted),
8486+ KVM will inject a #UD on MONITOR/MWAIT if
8487+ they're unsupported per guest CPUID. Note,
8488+ KVM will modify MONITOR/MWAIT support in
8489+ guest CPUID on writes to MISC_ENABLE if
8490+ KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is
8491+ disabled.
8492+
8493+KVM_X86_QUIRK_SLOT_ZAP_ALL By default, for KVM_X86_DEFAULT_VM VMs, KVM
8494+ invalidates all SPTEs in all memslots and
8495+ address spaces when a memslot is deleted or
8496+ moved. When this quirk is disabled (or the
8497+ VM type isn't KVM_X86_DEFAULT_VM), KVM only
8498+ ensures the backing memory of the deleted
8499+ or moved memslot isn't reachable, i.e KVM
8500+ _may_ invalidate only SPTEs related to the
8501+ memslot.
8502+
8503+KVM_X86_QUIRK_STUFF_FEATURE_MSRS By default, at vCPU creation, KVM sets the
8504+ vCPU's MSR_IA32_PERF_CAPABILITIES (0x345),
8505+ MSR_IA32_ARCH_CAPABILITIES (0x10a),
8506+ MSR_PLATFORM_INFO (0xce), and all VMX MSRs
8507+ (0x480..0x492) to the maximal capabilities
8508+ supported by KVM. KVM also sets
8509+ MSR_IA32_UCODE_REV (0x8b) to an arbitrary
8510+ value (which is different for Intel vs.
8511+ AMD). Lastly, when guest CPUID is set (by
8512+ userspace), KVM modifies select VMX MSR
8513+ fields to force consistency between guest
8514+ CPUID and L2's effective ISA. When this
8515+ quirk is disabled, KVM zeroes the vCPU's MSR
8516+ values (with two exceptions, see below),
8517+ i.e. treats the feature MSRs like CPUID
8518+ leaves and gives userspace full control of
8519+ the vCPU model definition. This quirk does
8520+ not affect VMX MSRs CR0/CR4_FIXED1 (0x487
8521+ and 0x489), as KVM does now allow them to
8522+ be set by userspace (KVM sets them based on
8523+ guest CPUID, for safety purposes).
8524+
8525+KVM_X86_QUIRK_IGNORE_GUEST_PAT By default, on Intel platforms, KVM ignores
8526+ guest PAT and forces the effective memory
8527+ type to WB in EPT. The quirk is not available
8528+ on Intel platforms which are incapable of
8529+ safely honoring guest PAT (i.e., without CPU
8530+ self-snoop, KVM always ignores guest PAT and
8531+ forces effective memory type to WB). It is
8532+ also ignored on AMD platforms or, on Intel,
8533+ when a VM has non-coherent DMA devices
8534+ assigned; KVM always honors guest PAT in
8535+ such case. The quirk is needed to avoid
8536+ slowdowns on certain Intel Xeon platforms
8537+ (e.g. ICX, SPR) where self-snoop feature is
8538+ supported but UC is slow enough to cause
8539+ issues with some older guests that use
8540+ UC instead of WC to map the video RAM.
8541+ Userspace can disable the quirk to honor
8542+ guest PAT if it knows that there is no such
8543+ guest software, for example if it does not
8544+ expose a bochs graphics device (which is
8545+ known to have had a buggy driver).
8546+
8547+KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM By default, KVM relaxes the consistency
8548+ check for GUEST_IA32_DEBUGCTL in vmcs12
8549+ to allow FREEZE_IN_SMM to be set. When
8550+ this quirk is disabled, KVM requires this
8551+ bit to be cleared. Note that the vmcs02
8552+ bit is still completely controlled by the
8553+ host, regardless of the quirk setting.
8554+======================================== ================================================
85478555
85488556 7.32 KVM_CAP_MAX_VCPU_ID
85498557 ------------------------
Documentation/virt/kvm/locking.rst+2−0
@@ -17,6 +17,8 @@ The acquisition orders for mutexes are as follows: · 16 unmodified lines
1717
1818 - kvm->lock is taken outside kvm->slots_lock and kvm->irq_lock
1919
20+- vcpu->mutex is taken outside kvm->slots_lock and kvm->slots_arch_lock
21+
2022 - kvm->slots_lock is taken outside kvm->irq_lock, though acquiring
2123 them together is quite rare.
2224
MAINTAINERS+72−28
@@ -2195,6 +2195,7 @@ L: dri-devel@lists.freedesktop.org · 2194 unmodified lines
21952195 S: Supported
21962196 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
21972197 F: Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
2198+F: drivers/gpu/drm/ci/xfails/panthor*
21982199 F: drivers/gpu/drm/panthor/
21992200 F: include/uapi/drm/panthor_drm.h
22002201
@@ -3986,7 +3987,7 @@ F: drivers/hwmon/asus-ec-sensors.c · 1785 unmodified lines
39863987 ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
39873988 M: Corentin Chary <corentin.chary@gmail.com>
39883989 M: Luke D. Jones <luke@ljones.dev>
3989−M: Denis Benato <benato.denis96@gmail.com>
3990+M: Denis Benato <denis.benato@linux.dev>
39903991 L: platform-driver-x86@vger.kernel.org
39913992 S: Maintained
39923993 W: https://asus-linux.org/
@@ -4022,7 +4023,7 @@ F: drivers/hwmon/asus_wmi_sensors.c · 29 unmodified lines
40224023 ASYMMETRIC KEYS
40234024 M: David Howells <dhowells@redhat.com>
40244025 M: Lukas Wunner <lukas@wunner.de>
4025−M: Ignat Korchagin <ignat@cloudflare.com>
4026+M: Ignat Korchagin <ignat@linux.win>
40264027 L: keyrings@vger.kernel.org
40274028 L: linux-crypto@vger.kernel.org
40284029 S: Maintained
@@ -4035,7 +4036,7 @@ F: include/linux/verification.h · 6 unmodified lines
40354036
40364037 ASYMMETRIC KEYS - ECDSA
40374038 M: Lukas Wunner <lukas@wunner.de>
4038−M: Ignat Korchagin <ignat@cloudflare.com>
4039+M: Ignat Korchagin <ignat@linux.win>
40394040 R: Stefan Berger <stefanb@linux.ibm.com>
40404041 L: linux-crypto@vger.kernel.org
40414042 S: Maintained
@@ -4045,14 +4046,14 @@ F: include/crypto/ecc* · 3 unmodified lines
40454046
40464047 ASYMMETRIC KEYS - GOST
40474048 M: Lukas Wunner <lukas@wunner.de>
4048−M: Ignat Korchagin <ignat@cloudflare.com>
4049+M: Ignat Korchagin <ignat@linux.win>
40494050 L: linux-crypto@vger.kernel.org
40504051 S: Odd fixes
40514052 F: crypto/ecrdsa*
40524053
40534054 ASYMMETRIC KEYS - RSA
40544055 M: Lukas Wunner <lukas@wunner.de>
4055−M: Ignat Korchagin <ignat@cloudflare.com>
4056+M: Ignat Korchagin <ignat@linux.win>
40564057 L: linux-crypto@vger.kernel.org
40574058 S: Maintained
40584059 F: crypto/rsa*
@@ -7534,6 +7535,7 @@ F: include/linux/*fence.h · 3475 unmodified lines
75347535 F: include/linux/dma-buf.h
75357536 F: include/linux/dma-buf/
75367537 F: include/linux/dma-resv.h
7538+F: rust/helpers/dma-resv.c
75377539 K: \bdma_(?:buf|fence|resv)\b
75387540
75397541 DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
@@ -7998,7 +8000,9 @@ F: Documentation/devicetree/bindings/display/himax,hx8357.yaml · 458 unmodified lines
79988000 F: drivers/gpu/drm/tiny/hx8357d.c
79998001
80008002 DRM DRIVER FOR HYPERV SYNTHETIC VIDEO DEVICE
8001−M: Deepak Rawat <drawat.floss@gmail.com>
8003+M: Dexuan Cui <decui@microsoft.com>
8004+M: Long Li <longli@microsoft.com>
8005+M: Saurabh Sengar <ssengar@linux.microsoft.com>
80028006 L: linux-hyperv@vger.kernel.org
80038007 L: dri-devel@lists.freedesktop.org
80048008 S: Maintained
@@ -8027,8 +8031,9 @@ F: drivers/gpu/drm/panel/panel-ilitek-ili9805.c · 22 unmodified lines
80278031
80288032 DRM DRIVER FOR ILITEK ILI9806E PANELS
80298033 M: Michael Walle <mwalle@kernel.org>
8034+M: Dario Binacchi <dario.binacchi@amarulasolutions.com>
80308035 S: Maintained
8031−F: drivers/gpu/drm/panel/panel-ilitek-ili9806e.c
8036+F: drivers/gpu/drm/panel/panel-ilitek-ili9806e-*
80328037
80338038 DRM DRIVER FOR JADARD JD9365DA-H3 MIPI-DSI LCD PANELS
80348039 M: Jagan Teki <jagan@edgeble.ai>
@@ -8301,6 +8306,11 @@ S: Maintained · 266 unmodified lines
83018306 F: Documentation/devicetree/bindings/display/panel/samsung,s6e3ha8.yaml
83028307 F: drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c
83038308
8309+DRM DRIVER FOR SAMSUNG S6E8FC0 PANELS
8310+M: Yedaya Katsman <yedaya.ka@gmail.com>
8311+S: Maintained
8312+F: drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c
8313+
83048314 DRM DRIVER FOR SAMSUNG SOFEF00 DDIC
83058315 M: David Heidelberg <david@ixit.cz>
83068316 M: Casey Connolly <casey.connolly@linaro.org>
@@ -8505,7 +8515,10 @@ T: git https://gitlab.freedesktop.org/drm/rust/kernel.git · 198 unmodified lines
85058515 F: drivers/gpu/drm/nova/
85068516 F: drivers/gpu/drm/tyr/
85078517 F: drivers/gpu/nova-core/
8518+F: rust/helpers/gpu.c
85088519 F: rust/kernel/drm/
8520+F: rust/kernel/gpu.rs
8521+F: rust/kernel/gpu/
85098522
85108523 DRM DRIVERS FOR ALLWINNER A10
85118524 M: Chen-Yu Tsai <wens@kernel.org>
@@ -8632,9 +8645,14 @@ F: drivers/gpu/drm/lima/ · 120 unmodified lines
86328645 F: include/uapi/drm/lima_drm.h
86338646
86348647 DRM DRIVERS FOR LOONGSON
8635−M: Sui Jingfeng <suijingfeng@loongson.cn>
8648+M: Jianmin Lv <lvjianmin@loongson.cn>
8649+M: Qianhai Wu <wuqianhai@loongson.cn>
8650+R: Huacai Chen <chenhuacai@kernel.org>
8651+R: Mingcong Bai <jeffbai@aosc.io>
8652+R: Xi Ruoyao <xry111@xry111.site>
8653+R: Icenowy Zheng <zhengxingda@iscas.ac.cn>
86368654 L: dri-devel@lists.freedesktop.org
8637−S: Supported
8655+S: Maintained
86388656 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
86398657 F: drivers/gpu/drm/loongson/
86408658
@@ -8918,7 +8936,7 @@ F: include/drm/ttm/ · 277 unmodified lines
89188936 GPU BUDDY ALLOCATOR
89198937 M: Matthew Auld <matthew.auld@intel.com>
89208938 M: Arun Pravin <arunpravin.paneerselvam@amd.com>
8921−R: Christian Koenig <christian.koenig@amd.com>
8939+R: Joel Fernandes <joelagnelf@nvidia.com>
89228940 L: dri-devel@lists.freedesktop.org
89238941 S: Maintained
89248942 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
@@ -8927,6 +8945,9 @@ F: drivers/gpu/drm/drm_buddy.c · 2 unmodified lines
89278945 F: drivers/gpu/tests/gpu_buddy_test.c
89288946 F: include/drm/drm_buddy.h
89298947 F: include/linux/gpu_buddy.h
8948+F: rust/helpers/gpu.c
8949+F: rust/kernel/gpu.rs
8950+F: rust/kernel/gpu/
89308951
89318952 DRM AUTOMATED TESTING
89328953 M: Helen Koike <helen.fornazier@gmail.com>
@@ -9628,7 +9649,12 @@ F: include/linux/ext2* · 695 unmodified lines
96289649
96299650 EXT4 FILE SYSTEM
96309651 M: "Theodore Ts'o" <tytso@mit.edu>
9631−M: Andreas Dilger <adilger.kernel@dilger.ca>
9652+R: Andreas Dilger <adilger.kernel@dilger.ca>
9653+R: Baokun Li <libaokun@linux.alibaba.com>
9654+R: Jan Kara <jack@suse.cz>
9655+R: Ojaswin Mujoo <ojaswin@linux.ibm.com>
9656+R: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
9657+R: Zhang Yi <yi.zhang@huawei.com>
96329658 L: linux-ext4@vger.kernel.org
96339659 S: Maintained
96349660 W: http://ext4.wiki.kernel.org
@@ -12025,7 +12051,6 @@ I2C SUBSYSTEM · 2390 unmodified lines
1202512051 M: Wolfram Sang <wsa+renesas@sang-engineering.com>
1202612052 L: linux-i2c@vger.kernel.org
1202712053 S: Maintained
12028−W: https://i2c.wiki.kernel.org/
1202912054 Q: https://patchwork.ozlabs.org/project/linux-i2c/list/
1203012055 T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
1203112056 F: Documentation/i2c/
@@ -12051,7 +12076,6 @@ I2C SUBSYSTEM HOST DRIVERS · 19 unmodified lines
1205112076 M: Andi Shyti <andi.shyti@kernel.org>
1205212077 L: linux-i2c@vger.kernel.org
1205312078 S: Maintained
12054−W: https://i2c.wiki.kernel.org/
1205512079 Q: https://patchwork.ozlabs.org/project/linux-i2c/list/
1205612080 T: git git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
1205712081 F: Documentation/devicetree/bindings/i2c/
@@ -16374,7 +16398,6 @@ F: net/dsa/tag_mtk.c · 4316 unmodified lines
1637416398
1637516399 MEDIATEK T7XX 5G WWAN MODEM DRIVER
1637616400 M: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
16377−R: Chiranjeevi Rapolu <chiranjeevi.rapolu@linux.intel.com>
1637816401 R: Liu Haijun <haijun.liu@mediatek.com>
1637916402 R: Ricardo Martinez <ricardo.martinez@linux.intel.com>
1638016403 L: netdev@vger.kernel.org
@@ -16659,7 +16682,7 @@ F: mm/balloon.c · 278 unmodified lines
1665916682 MEMORY MANAGEMENT - CORE
1666016683 M: Andrew Morton <akpm@linux-foundation.org>
1666116684 M: David Hildenbrand <david@kernel.org>
16662−R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
16685+R: Lorenzo Stoakes <ljs@kernel.org>
1666316686 R: Liam R. Howlett <Liam.Howlett@oracle.com>
1666416687 R: Vlastimil Babka <vbabka@kernel.org>
1666516688 R: Mike Rapoport <rppt@kernel.org>
@@ -16789,7 +16812,7 @@ F: mm/workingset.c · 123 unmodified lines
1678916812 MEMORY MANAGEMENT - MISC
1679016813 M: Andrew Morton <akpm@linux-foundation.org>
1679116814 M: David Hildenbrand <david@kernel.org>
16792−R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
16815+R: Lorenzo Stoakes <ljs@kernel.org>
1679316816 R: Liam R. Howlett <Liam.Howlett@oracle.com>
1679416817 R: Vlastimil Babka <vbabka@kernel.org>
1679516818 R: Mike Rapoport <rppt@kernel.org>
@@ -16880,7 +16903,7 @@ R: David Hildenbrand <david@kernel.org> · 84 unmodified lines
1688016903 R: Michal Hocko <mhocko@kernel.org>
1688116904 R: Qi Zheng <zhengqi.arch@bytedance.com>
1688216905 R: Shakeel Butt <shakeel.butt@linux.dev>
16883−R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
16906+R: Lorenzo Stoakes <ljs@kernel.org>
1688416907 L: linux-mm@kvack.org
1688516908 S: Maintained
1688616909 F: mm/vmscan.c
@@ -16889,11 +16912,11 @@ F: mm/workingset.c · 2 unmodified lines
1688916912 MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)
1689016913 M: Andrew Morton <akpm@linux-foundation.org>
1689116914 M: David Hildenbrand <david@kernel.org>
16892−M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
16915+M: Lorenzo Stoakes <ljs@kernel.org>
1689316916 R: Rik van Riel <riel@surriel.com>
1689416917 R: Liam R. Howlett <Liam.Howlett@oracle.com>
1689516918 R: Vlastimil Babka <vbabka@kernel.org>
16896−R: Harry Yoo <harry.yoo@oracle.com>
16919+R: Harry Yoo <harry@kernel.org>
1689716920 R: Jann Horn <jannh@google.com>
1689816921 L: linux-mm@kvack.org
1689916922 S: Maintained
@@ -16934,7 +16957,7 @@ F: mm/swapfile.c · 34 unmodified lines
1693416957 MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE)
1693516958 M: Andrew Morton <akpm@linux-foundation.org>
1693616959 M: David Hildenbrand <david@kernel.org>
16937−M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
16960+M: Lorenzo Stoakes <ljs@kernel.org>
1693816961 R: Zi Yan <ziy@nvidia.com>
1693916962 R: Baolin Wang <baolin.wang@linux.alibaba.com>
1694016963 R: Liam R. Howlett <Liam.Howlett@oracle.com>
@@ -16974,7 +16997,7 @@ F: tools/testing/selftests/mm/uffd-*.[ch] · 33 unmodified lines
1697416997
1697516998 MEMORY MANAGEMENT - RUST
1697616999 M: Alice Ryhl <aliceryhl@google.com>
16977−R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
17000+R: Lorenzo Stoakes <ljs@kernel.org>
1697817001 R: Liam R. Howlett <Liam.Howlett@oracle.com>
1697917002 L: linux-mm@kvack.org
1698017003 L: rust-for-linux@vger.kernel.org
@@ -16990,7 +17013,7 @@ F: rust/kernel/page.rs · 9 unmodified lines
1699017013 MEMORY MAPPING
1699117014 M: Andrew Morton <akpm@linux-foundation.org>
1699217015 M: Liam R. Howlett <Liam.Howlett@oracle.com>
16993−M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
17016+M: Lorenzo Stoakes <ljs@kernel.org>
1699417017 R: Vlastimil Babka <vbabka@kernel.org>
1699517018 R: Jann Horn <jannh@google.com>
1699617019 R: Pedro Falcato <pfalcato@suse.de>
@@ -17020,7 +17043,7 @@ MEMORY MAPPING - LOCKING · 23 unmodified lines
1702017043 M: Andrew Morton <akpm@linux-foundation.org>
1702117044 M: Suren Baghdasaryan <surenb@google.com>
1702217045 M: Liam R. Howlett <Liam.Howlett@oracle.com>
17023−M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
17046+M: Lorenzo Stoakes <ljs@kernel.org>
1702417047 R: Vlastimil Babka <vbabka@kernel.org>
1702517048 R: Shakeel Butt <shakeel.butt@linux.dev>
1702617049 L: linux-mm@kvack.org
@@ -17035,7 +17058,7 @@ F: mm/mmap_lock.c · 8 unmodified lines
1703517058 MEMORY MAPPING - MADVISE (MEMORY ADVICE)
1703617059 M: Andrew Morton <akpm@linux-foundation.org>
1703717060 M: Liam R. Howlett <Liam.Howlett@oracle.com>
17038−M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
17061+M: Lorenzo Stoakes <ljs@kernel.org>
1703917062 M: David Hildenbrand <david@kernel.org>
1704017063 R: Vlastimil Babka <vbabka@kernel.org>
1704117064 R: Jann Horn <jannh@google.com>
@@ -21954,7 +21977,7 @@ F: drivers/media/radio/radio-tea5777.c · 4912 unmodified lines
2195421977
2195521978 RADOS BLOCK DEVICE (RBD)
2195621979 M: Ilya Dryomov <idryomov@gmail.com>
21957−R: Dongsheng Yang <dongsheng.yang@easystack.cn>
21980+R: Dongsheng Yang <dongsheng.yang@linux.dev>
2195821981 L: ceph-devel@vger.kernel.org
2195921982 S: Supported
2196021983 W: http://ceph.com/
@@ -22283,6 +22306,16 @@ L: linux-wireless@vger.kernel.org · 322 unmodified lines
2228322306 S: Orphan
2228422307 F: drivers/net/wireless/rsi/
2228522308
22309+RELAY
22310+M: Andrew Morton <akpm@linux-foundation.org>
22311+M: Jens Axboe <axboe@kernel.dk>
22312+M: Jason Xing <kernelxing@tencent.com>
22313+L: linux-kernel@vger.kernel.org
22314+S: Maintained
22315+F: Documentation/filesystems/relay.rst
22316+F: include/linux/relay.h
22317+F: kernel/relay.c
22318+
2228622319 REGISTER MAP ABSTRACTION
2228722320 M: Mark Brown <broonie@kernel.org>
2228822321 L: linux-kernel@vger.kernel.org
@@ -23173,7 +23206,7 @@ K: \b(?i:rust)\b · 884 unmodified lines
2317323206
2317423207 RUST [ALLOC]
2317523208 M: Danilo Krummrich <dakr@kernel.org>
23176−R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
23209+R: Lorenzo Stoakes <ljs@kernel.org>
2317723210 R: Vlastimil Babka <vbabka@kernel.org>
2317823211 R: Liam R. Howlett <Liam.Howlett@oracle.com>
2317923212 R: Uladzislau Rezki <urezki@gmail.com>
@@ -23183,6 +23216,15 @@ T: git https://github.com/Rust-for-Linux/linux.git alloc-next · 3 unmodified lines
2318323216 F: rust/kernel/alloc.rs
2318423217 F: rust/kernel/alloc/
2318523218
23219+RUST [INTEROP]
23220+M: Joel Fernandes <joelagnelf@nvidia.com>
23221+M: Alexandre Courbot <acourbot@nvidia.com>
23222+L: rust-for-linux@vger.kernel.org
23223+S: Maintained
23224+T: git https://github.com/Rust-for-Linux/linux.git interop-next
23225+F: rust/kernel/interop.rs
23226+F: rust/kernel/interop/
23227+
2318623228 RUST [NUM]
2318723229 M: Alexandre Courbot <acourbot@nvidia.com>
2318823230 R: Yury Norov <yury.norov@gmail.com>
@@ -24350,11 +24392,12 @@ F: drivers/nvmem/layouts/sl28vpd.c · 1161 unmodified lines
2435024392
2435124393 SLAB ALLOCATOR
2435224394 M: Vlastimil Babka <vbabka@kernel.org>
24395+M: Harry Yoo <harry@kernel.org>
2435324396 M: Andrew Morton <akpm@linux-foundation.org>
24397+R: Hao Li <hao.li@linux.dev>
2435424398 R: Christoph Lameter <cl@gentwo.org>
2435524399 R: David Rientjes <rientjes@google.com>
2435624400 R: Roman Gushchin <roman.gushchin@linux.dev>
24357−R: Harry Yoo <harry.yoo@oracle.com>
2435824401 L: linux-mm@kvack.org
2435924402 S: Maintained
2436024403 T: git git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git
@@ -24908,9 +24951,9 @@ F: drivers/clk/spear/ · 547 unmodified lines
2490824951 F: drivers/pinctrl/spear/
2490924952
2491024953 SPI NOR SUBSYSTEM
24911−M: Tudor Ambarus <tudor.ambarus@linaro.org>
2491224954 M: Pratyush Yadav <pratyush@kernel.org>
2491324955 M: Michael Walle <mwalle@kernel.org>
24956+R: Takahiro Kuwano <takahiro.kuwano@infineon.com>
2491424957 L: linux-mtd@lists.infradead.org
2491524958 S: Maintained
2491624959 W: http://www.linux-mtd.infradead.org/
@@ -25765,6 +25808,7 @@ F: include/net/pkt_cls.h · 848 unmodified lines
2576525808 F: include/net/pkt_sched.h
2576625809 F: include/net/sch_priv.h
2576725810 F: include/net/tc_act/
25811+F: include/net/tc_wrapper.h
2576825812 F: include/uapi/linux/pkt_cls.h
2576925813 F: include/uapi/linux/pkt_sched.h
2577025814 F: include/uapi/linux/tc_act/
Makefile+6−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 7
33 PATCHLEVEL = 0
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc3
5+EXTRAVERSION = -rc7
66 NAME = Baby Opossum Posse
77
88 # *DOCUMENTATION*
@@ -476,6 +476,7 @@ KBUILD_USERLDFLAGS := $(USERLDFLAGS) · 467 unmodified lines
476476 export rust_common_flags := --edition=2021 \
477477 -Zbinary_dep_depinfo=y \
478478 -Astable_features \
479+ -Aunused_features \
479480 -Dnon_ascii_idents \
480481 -Dunsafe_op_in_unsafe_fn \
481482 -Wmissing_docs \
@@ -1113,6 +1114,9 @@ KBUILD_CFLAGS += -fno-builtin-wcslen · 631 unmodified lines
11131114 # change __FILE__ to the relative path to the source directory
11141115 ifdef building_out_of_srctree
11151116 KBUILD_CPPFLAGS += -fmacro-prefix-map=$(srcroot)/=
1117+ifeq ($(call rustc-option-yn, --remap-path-scope=macro),y)
1118+KBUILD_RUSTFLAGS += --remap-path-prefix=$(srcroot)/= --remap-path-scope=macro
1119+endif
11161120 endif
11171121
11181122 # include additional Makefiles when needed
@@ -1650,7 +1654,7 @@ CLEAN_FILES += vmlinux.symvers modules-only.symvers \ · 531 unmodified lines
16501654 modules.builtin.ranges vmlinux.o.map vmlinux.unstripped \
16511655 compile_commands.json rust/test \
16521656 rust-project.json .vmlinux.objs .vmlinux.export.c \
1653− .builtin-dtbs-list .builtin-dtb.S
1657+ .builtin-dtbs-list .builtin-dtbs.S
16541658
16551659 # Directories & files removed with 'make mrproper'
16561660 MRPROPER_FILES += include/config include/generated \
arch/arm/configs/multi_v7_defconfig+0−1
@@ -279,7 +279,6 @@ CONFIG_TI_CPSW_SWITCHDEV=y · 278 unmodified lines
279279 CONFIG_TI_CPTS=y
280280 CONFIG_TI_KEYSTONE_NETCP=y
281281 CONFIG_TI_KEYSTONE_NETCP_ETHSS=y
282−CONFIG_TI_PRUSS=m
283282 CONFIG_TI_PRUETH=m
284283 CONFIG_XILINX_EMACLITE=y
285284 CONFIG_SFP=m
arch/arm64/Kconfig+1−0
@@ -252,6 +252,7 @@ config ARM64 · 251 unmodified lines
252252 select HAVE_RSEQ
253253 select HAVE_RUST if RUSTC_SUPPORTS_ARM64
254254 select HAVE_STACKPROTECTOR
255+ select HAVE_STATIC_CALL if CFI
255256 select HAVE_SYSCALL_TRACEPOINTS
256257 select HAVE_KPROBES
257258 select HAVE_KRETPROBES
arch/arm64/boot/dts/renesas/r8a78000.dtsi+8−8
@@ -698,7 +698,7 @@ · 697 unmodified lines
698698 compatible = "renesas,scif-r8a78000",
699699 "renesas,rcar-gen5-scif", "renesas,scif";
700700 reg = <0 0xc0700000 0 0x40>;
701− interrupts = <GIC_SPI 4074 IRQ_TYPE_LEVEL_HIGH>;
701+ interrupts = <GIC_ESPI 10 IRQ_TYPE_LEVEL_HIGH>;
702702 clocks = <&dummy_clk_sgasyncd16>, <&dummy_clk_sgasyncd16>, <&scif_clk>;
703703 clock-names = "fck", "brg_int", "scif_clk";
704704 status = "disabled";
@@ -708,7 +708,7 @@ · 3 unmodified lines
708708 compatible = "renesas,scif-r8a78000",
709709 "renesas,rcar-gen5-scif", "renesas,scif";
710710 reg = <0 0xc0704000 0 0x40>;
711− interrupts = <GIC_SPI 4075 IRQ_TYPE_LEVEL_HIGH>;
711+ interrupts = <GIC_ESPI 11 IRQ_TYPE_LEVEL_HIGH>;
712712 clocks = <&dummy_clk_sgasyncd16>, <&dummy_clk_sgasyncd16>, <&scif_clk>;
713713 clock-names = "fck", "brg_int", "scif_clk";
714714 status = "disabled";
@@ -718,7 +718,7 @@ · 3 unmodified lines
718718 compatible = "renesas,scif-r8a78000",
719719 "renesas,rcar-gen5-scif", "renesas,scif";
720720 reg = <0 0xc0708000 0 0x40>;
721− interrupts = <GIC_SPI 4076 IRQ_TYPE_LEVEL_HIGH>;
721+ interrupts = <GIC_ESPI 12 IRQ_TYPE_LEVEL_HIGH>;
722722 clocks = <&dummy_clk_sgasyncd16>, <&dummy_clk_sgasyncd16>, <&scif_clk>;
723723 clock-names = "fck", "brg_int", "scif_clk";
724724 status = "disabled";
@@ -728,7 +728,7 @@ · 3 unmodified lines
728728 compatible = "renesas,scif-r8a78000",
729729 "renesas,rcar-gen5-scif", "renesas,scif";
730730 reg = <0 0xc070c000 0 0x40>;
731− interrupts = <GIC_SPI 4077 IRQ_TYPE_LEVEL_HIGH>;
731+ interrupts = <GIC_ESPI 13 IRQ_TYPE_LEVEL_HIGH>;
732732 clocks = <&dummy_clk_sgasyncd16>, <&dummy_clk_sgasyncd16>, <&scif_clk>;
733733 clock-names = "fck", "brg_int", "scif_clk";
734734 status = "disabled";
@@ -738,7 +738,7 @@ · 3 unmodified lines
738738 compatible = "renesas,hscif-r8a78000",
739739 "renesas,rcar-gen5-hscif", "renesas,hscif";
740740 reg = <0 0xc0710000 0 0x60>;
741− interrupts = <GIC_SPI 4078 IRQ_TYPE_LEVEL_HIGH>;
741+ interrupts = <GIC_ESPI 14 IRQ_TYPE_LEVEL_HIGH>;
742742 clocks = <&dummy_clk_sgasyncd4>, <&dummy_clk_sgasyncd4>, <&scif_clk>;
743743 clock-names = "fck", "brg_int", "scif_clk";
744744 status = "disabled";
@@ -748,7 +748,7 @@ · 3 unmodified lines
748748 compatible = "renesas,hscif-r8a78000",
749749 "renesas,rcar-gen5-hscif", "renesas,hscif";
750750 reg = <0 0xc0714000 0 0x60>;
751− interrupts = <GIC_SPI 4079 IRQ_TYPE_LEVEL_HIGH>;
751+ interrupts = <GIC_ESPI 15 IRQ_TYPE_LEVEL_HIGH>;
752752 clocks = <&dummy_clk_sgasyncd4>, <&dummy_clk_sgasyncd4>, <&scif_clk>;
753753 clock-names = "fck", "brg_int", "scif_clk";
754754 status = "disabled";
@@ -758,7 +758,7 @@ · 3 unmodified lines
758758 compatible = "renesas,hscif-r8a78000",
759759 "renesas,rcar-gen5-hscif", "renesas,hscif";
760760 reg = <0 0xc0718000 0 0x60>;
761− interrupts = <GIC_SPI 4080 IRQ_TYPE_LEVEL_HIGH>;
761+ interrupts = <GIC_ESPI 16 IRQ_TYPE_LEVEL_HIGH>;
762762 clocks = <&dummy_clk_sgasyncd4>, <&dummy_clk_sgasyncd4>, <&scif_clk>;
763763 clock-names = "fck", "brg_int", "scif_clk";
764764 status = "disabled";
@@ -768,7 +768,7 @@ · 3 unmodified lines
768768 compatible = "renesas,hscif-r8a78000",
769769 "renesas,rcar-gen5-hscif", "renesas,hscif";
770770 reg = <0 0xc071c000 0 0x60>;
771− interrupts = <GIC_SPI 4081 IRQ_TYPE_LEVEL_HIGH>;
771+ interrupts = <GIC_ESPI 17 IRQ_TYPE_LEVEL_HIGH>;
772772 clocks = <&dummy_clk_sgasyncd4>, <&dummy_clk_sgasyncd4>, <&scif_clk>;
773773 clock-names = "fck", "brg_int", "scif_clk";
774774 status = "disabled";
arch/arm64/boot/dts/renesas/r9a09g057.dtsi+0−30
@@ -581,16 +581,6 @@ · 580 unmodified lines
581581 status = "disabled";
582582 };
583583
584− wdt0: watchdog@11c00400 {
585− compatible = "renesas,r9a09g057-wdt";
586− reg = <0 0x11c00400 0 0x400>;
587− clocks = <&cpg CPG_MOD 0x4b>, <&cpg CPG_MOD 0x4c>;
588− clock-names = "pclk", "oscclk";
589− resets = <&cpg 0x75>;
590− power-domains = <&cpg>;
591− status = "disabled";
592− };
593−
594584 wdt1: watchdog@14400000 {
595585 compatible = "renesas,r9a09g057-wdt";
596586 reg = <0 0x14400000 0 0x400>;
@@ -601,26 +591,6 @@ · 4 unmodified lines
601591 status = "disabled";
602592 };
603593
604− wdt2: watchdog@13000000 {
605− compatible = "renesas,r9a09g057-wdt";
606− reg = <0 0x13000000 0 0x400>;
607− clocks = <&cpg CPG_MOD 0x4f>, <&cpg CPG_MOD 0x50>;
608− clock-names = "pclk", "oscclk";
609− resets = <&cpg 0x77>;
610− power-domains = <&cpg>;
611− status = "disabled";
612− };
613−
614− wdt3: watchdog@13000400 {
615− compatible = "renesas,r9a09g057-wdt";
616− reg = <0 0x13000400 0 0x400>;
617− clocks = <&cpg CPG_MOD 0x51>, <&cpg CPG_MOD 0x52>;
618− clock-names = "pclk", "oscclk";
619− resets = <&cpg 0x78>;
620− power-domains = <&cpg>;
621− status = "disabled";
622− };
623−
624594 rtc: rtc@11c00800 {
625595 compatible = "renesas,r9a09g057-rtca3", "renesas,rz-rtca3";
626596 reg = <0 0x11c00800 0 0x400>;
arch/arm64/boot/dts/renesas/r9a09g077.dtsi+2−2
@@ -974,8 +974,8 @@ · 973 unmodified lines
974974
975975 cpg: clock-controller@80280000 {
976976 compatible = "renesas,r9a09g077-cpg-mssr";
977− reg = <0 0x80280000 0 0x1000>,
978− <0 0x81280000 0 0x9000>;
977+ reg = <0 0x80280000 0 0x10000>,
978+ <0 0x81280000 0 0x10000>;
979979 clocks = <&extal_clk>;
980980 clock-names = "extal";
981981 #clock-cells = <2>;
arch/arm64/boot/dts/renesas/r9a09g087.dtsi+2−2
@@ -977,8 +977,8 @@ · 976 unmodified lines
977977
978978 cpg: clock-controller@80280000 {
979979 compatible = "renesas,r9a09g087-cpg-mssr";
980− reg = <0 0x80280000 0 0x1000>,
981− <0 0x81280000 0 0x9000>;
980+ reg = <0 0x80280000 0 0x10000>,
981+ <0 0x81280000 0 0x10000>;
982982 clocks = <&extal_clk>;
983983 clock-names = "extal";
984984 #clock-cells = <2>;
arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi+1−1
@@ -162,7 +162,7 @@ · 161 unmodified lines
162162 <100000000>;
163163 renesas,settings = [
164164 80 00 11 19 4c 42 dc 2f 06 7d 20 1a 5f 1e f2 27
165− 00 40 00 00 00 00 00 00 06 0c 19 02 3f f0 90 86
165+ 00 40 00 00 00 00 00 00 06 0c 19 02 3b f0 90 86
166166 a0 80 30 30 9c
167167 ];
168168 };
arch/arm64/boot/dts/renesas/rzt2h-n2h-evk-common.dtsi+1−0
@@ -53,6 +53,7 @@ · 52 unmodified lines
5353 regulator-max-microvolt = <3300000>;
5454 gpios-states = <0>;
5555 states = <3300000 0>, <1800000 1>;
56+ regulator-ramp-delay = <60>;
5657 };
5758 #endif
5859
arch/arm64/boot/dts/renesas/rzv2-evk-cn15-sd.dtso+1−0
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 regulator-max-microvolt = <3300000>;
2626 gpios-states = <0>;
2727 states = <3300000 0>, <1800000 1>;
28+ regulator-ramp-delay = <60>;
2829 };
2930 };
3031
arch/arm64/crypto/aes-neonbs-glue.c+23−14
@@ -76,19 +76,24 @@ static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, · 75 unmodified lines
7676 unsigned int key_len)
7777 {
7878 struct aesbs_ctx *ctx = crypto_skcipher_ctx(tfm);
79− struct crypto_aes_ctx rk;
79+ struct crypto_aes_ctx *rk;
8080 int err;
8181
82− err = aes_expandkey(&rk, in_key, key_len);
82+ rk = kmalloc(sizeof(*rk), GFP_KERNEL);
83+ if (!rk)
84+ return -ENOMEM;
85+
86+ err = aes_expandkey(rk, in_key, key_len);
8387 if (err)
84− return err;
88+ goto out;
8589
8690 ctx->rounds = 6 + key_len / 4;
8791
8892 scoped_ksimd()
89− aesbs_convert_key(ctx->rk, rk.key_enc, ctx->rounds);
90−
91− return 0;
93+ aesbs_convert_key(ctx->rk, rk->key_enc, ctx->rounds);
94+out:
95+ kfree_sensitive(rk);
96+ return err;
9297 }
9398
9499 static int __ecb_crypt(struct skcipher_request *req,
@@ -133,22 +138,26 @@ static int aesbs_cbc_ctr_setkey(struct crypto_skcipher *tfm, const u8 *in_key, · 38 unmodified lines
133138 unsigned int key_len)
134139 {
135140 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm);
136− struct crypto_aes_ctx rk;
141+ struct crypto_aes_ctx *rk;
137142 int err;
138143
139− err = aes_expandkey(&rk, in_key, key_len);
144+ rk = kmalloc(sizeof(*rk), GFP_KERNEL);
145+ if (!rk)
146+ return -ENOMEM;
147+
148+ err = aes_expandkey(rk, in_key, key_len);
140149 if (err)
141− return err;
150+ goto out;
142151
143152 ctx->key.rounds = 6 + key_len / 4;
144153
145− memcpy(ctx->enc, rk.key_enc, sizeof(ctx->enc));
154+ memcpy(ctx->enc, rk->key_enc, sizeof(ctx->enc));
146155
147156 scoped_ksimd()
148− aesbs_convert_key(ctx->key.rk, rk.key_enc, ctx->key.rounds);
149− memzero_explicit(&rk, sizeof(rk));
150−
151− return 0;
157+ aesbs_convert_key(ctx->key.rk, rk->key_enc, ctx->key.rounds);
158+out:
159+ kfree_sensitive(rk);
160+ return err;
152161 }
153162
154163 static int cbc_encrypt(struct skcipher_request *req)
arch/arm64/include/asm/kvm_host.h+3−0
@@ -784,6 +784,9 @@ struct kvm_host_data { · 783 unmodified lines
784784 /* Number of debug breakpoints/watchpoints for this CPU (minus 1) */
785785 unsigned int debug_brps;
786786 unsigned int debug_wrps;
787+
788+ /* Last vgic_irq part of the AP list recorded in an LR */
789+ struct vgic_irq *last_lr_irq;
787790 };
788791
789792 struct kvm_host_psci_config {
arch/arm64/include/asm/static_call.h+31−0
@@ -0,0 +1,31 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef _ASM_STATIC_CALL_H
3+#define _ASM_STATIC_CALL_H
4+
5+#define __ARCH_DEFINE_STATIC_CALL_TRAMP(name, target) \
6+ asm(" .pushsection .static_call.text, \"ax\" \n" \
7+ " .align 4 \n" \
8+ " .globl " name " \n" \
9+ name ": \n" \
10+ " hint 34 /* BTI C */ \n" \
11+ " adrp x16, 1f \n" \
12+ " ldr x16, [x16, :lo12:1f] \n" \
13+ " br x16 \n" \
14+ " .type " name ", %function \n" \
15+ " .size " name ", . - " name " \n" \
16+ " .popsection \n" \
17+ " .pushsection .rodata, \"a\" \n" \
18+ " .align 3 \n" \
19+ "1: .quad " target " \n" \
20+ " .popsection \n")
21+
22+#define ARCH_DEFINE_STATIC_CALL_TRAMP(name, func) \
23+ __ARCH_DEFINE_STATIC_CALL_TRAMP(STATIC_CALL_TRAMP_STR(name), #func)
24+
25+#define ARCH_DEFINE_STATIC_CALL_NULL_TRAMP(name) \
26+ ARCH_DEFINE_STATIC_CALL_TRAMP(name, __static_call_return0)
27+
28+#define ARCH_DEFINE_STATIC_CALL_RET0_TRAMP(name) \
29+ ARCH_DEFINE_STATIC_CALL_TRAMP(name, __static_call_return0)
30+
31+#endif /* _ASM_STATIC_CALL_H */
arch/arm64/kernel/Makefile+1−0
@@ -46,6 +46,7 @@ obj-$(CONFIG_MODULES) += module.o module-plts.o · 45 unmodified lines
4646 obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
4747 obj-$(CONFIG_HARDLOCKUP_DETECTOR_PERF) += watchdog_hld.o
4848 obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
49+obj-$(CONFIG_HAVE_STATIC_CALL) += static_call.o
4950 obj-$(CONFIG_CPU_PM) += sleep.o suspend.o
5051 obj-$(CONFIG_KGDB) += kgdb.o
5152 obj-$(CONFIG_EFI) += efi.o efi-rt-wrapper.o
arch/arm64/kernel/cpufeature.c+9−0
@@ -2345,6 +2345,15 @@ static bool can_trap_icv_dir_el1(const struct arm64_cpu_capabilities *entry, · 2344 unmodified lines
23452345 !is_midr_in_range_list(has_vgic_v3))
23462346 return false;
23472347
2348+ /*
2349+ * pKVM prevents late onlining of CPUs. This means that whatever
2350+ * state the capability is in after deprivilege cannot be affected
2351+ * by a new CPU booting -- this is garanteed to be a CPU we have
2352+ * already seen, and the cap is therefore unchanged.
2353+ */
2354+ if (system_capabilities_finalized() && is_protected_kvm_enabled())
2355+ return cpus_have_final_cap(ARM64_HAS_ICH_HCR_EL2_TDIR);
2356+
23482357 if (is_kernel_in_hyp_mode())
23492358 res.a1 = read_sysreg_s(SYS_ICH_VTR_EL2);
23502359 else
arch/arm64/kernel/pi/patch-scs.c+8−0
@@ -192,6 +192,14 @@ static int scs_handle_fde_frame(const struct eh_frame *frame, · 191 unmodified lines
192192 size -= 2;
193193 break;
194194
195+ case DW_CFA_advance_loc4:
196+ loc += *opcode++ * code_alignment_factor;
197+ loc += (*opcode++ << 8) * code_alignment_factor;
198+ loc += (*opcode++ << 16) * code_alignment_factor;
199+ loc += (*opcode++ << 24) * code_alignment_factor;
200+ size -= 4;
201+ break;
202+
195203 case DW_CFA_def_cfa:
196204 case DW_CFA_offset_extended:
197205 size = skip_xleb128(&opcode, size);
arch/arm64/kernel/rsi.c+2−1
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212
1313 #include <asm/io.h>
1414 #include <asm/mem_encrypt.h>
15+#include <asm/pgtable.h>
1516 #include <asm/rsi.h>
1617
1718 static struct realm_config config;
@@ -146,7 +147,7 @@ void __init arm64_rsi_init(void) · 128 unmodified lines
146147 return;
147148 if (WARN_ON(rsi_get_realm_config(&config)))
148149 return;
149− prot_ns_shared = BIT(config.ipa_bits - 1);
150+ prot_ns_shared = __phys_to_pte_val(BIT(config.ipa_bits - 1));
150151
151152 if (arm64_ioremap_prot_hook_register(realm_ioremap_hook))
152153 return;
arch/arm64/kernel/static_call.c+23−0
@@ -0,0 +1,23 @@
1+// SPDX-License-Identifier: GPL-2.0
2+#include <linux/static_call.h>
3+#include <linux/memory.h>
4+#include <asm/text-patching.h>
5+
6+void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
7+{
8+ u64 literal;
9+ int ret;
10+
11+ if (!func)
12+ func = __static_call_return0;
13+
14+ /* decode the instructions to discover the literal address */
15+ literal = ALIGN_DOWN((u64)tramp + 4, SZ_4K) +
16+ aarch64_insn_adrp_get_offset(le32_to_cpup(tramp + 4)) +
17+ 8 * aarch64_insn_decode_immediate(AARCH64_INSN_IMM_12,
18+ le32_to_cpup(tramp + 8));
19+
20+ ret = aarch64_insn_write_literal_u64((void *)literal, (u64)func);
21+ WARN_ON_ONCE(ret);
22+}
23+EXPORT_SYMBOL_GPL(arch_static_call_transform);
arch/arm64/kernel/vmlinux.lds.S+1−0
@@ -191,6 +191,7 @@ SECTIONS · 190 unmodified lines
191191 LOCK_TEXT
192192 KPROBES_TEXT
193193 HYPERVISOR_TEXT
194+ STATIC_CALL_TEXT
194195 *(.gnu.warning)
195196 }
196197
arch/arm64/kvm/at.c+1−3
@@ -1504,8 +1504,6 @@ int __kvm_at_s1e2(struct kvm_vcpu *vcpu, u32 op, u64 vaddr) · 1503 unmodified lines
15041504 fail = true;
15051505 }
15061506
1507− isb();
1508−
15091507 if (!fail)
15101508 par = read_sysreg_par();
15111509
@@ -1755,7 +1753,7 @@ int __kvm_at_swap_desc(struct kvm *kvm, gpa_t ipa, u64 old, u64 new) · 243 unmodified lines
17551753 if (!writable)
17561754 return -EPERM;
17571755
1758− ptep = (u64 __user *)hva + offset;
1756+ ptep = (void __user *)hva + offset;
17591757 if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS))
17601758 r = __lse_swap_desc(ptep, old, new);
17611759 else
arch/arm64/kvm/guest.c+2−2
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929
3030 #include "trace.h"
3131
32−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
32+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
3333 KVM_GENERIC_VM_STATS()
3434 };
3535
@@ -42,7 +42,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 6 unmodified lines
4242 sizeof(kvm_vm_stats_desc),
4343 };
4444
45−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
45+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
4646 KVM_GENERIC_VCPU_STATS(),
4747 STATS_DESC_COUNTER(VCPU, hvc_exit_stat),
4848 STATS_DESC_COUNTER(VCPU, wfe_exit_stat),
arch/arm64/kvm/hyp/nvhe/mem_protect.c+1−1
@@ -518,7 +518,7 @@ static int host_stage2_adjust_range(u64 addr, struct kvm_mem_range *range) · 517 unmodified lines
518518 granule = kvm_granule_size(level);
519519 cur.start = ALIGN_DOWN(addr, granule);
520520 cur.end = cur.start + granule;
521− if (!range_included(&cur, range))
521+ if (!range_included(&cur, range) && level < KVM_PGTABLE_LAST_LEVEL)
522522 continue;
523523 *range = cur;
524524 return 0;
arch/arm64/kvm/mmu.c+9−5
@@ -1751,6 +1751,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 1750 unmodified lines
17511751
17521752 force_pte = (max_map_size == PAGE_SIZE);
17531753 vma_pagesize = min_t(long, vma_pagesize, max_map_size);
1754+ vma_shift = __ffs(vma_pagesize);
17541755 }
17551756
17561757 /*
@@ -1837,10 +1838,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 80 unmodified lines
18371838 if (exec_fault && s2_force_noncacheable)
18381839 ret = -ENOEXEC;
18391840
1840− if (ret) {
1841− kvm_release_page_unused(page);
1842− return ret;
1843− }
1841+ if (ret)
1842+ goto out_put_page;
18441843
18451844 /*
18461845 * Guest performs atomic/exclusive operations on memory with unsupported
@@ -1850,7 +1849,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 3 unmodified lines
18501849 */
18511850 if (esr_fsc_is_excl_atomic_fault(kvm_vcpu_get_esr(vcpu))) {
18521851 kvm_inject_dabt_excl_atomic(vcpu, kvm_vcpu_get_hfar(vcpu));
1853− return 1;
1852+ ret = 1;
1853+ goto out_put_page;
18541854 }
18551855
18561856 if (nested)
@@ -1936,6 +1936,10 @@ out_unlock: · 79 unmodified lines
19361936 mark_page_dirty_in_slot(kvm, memslot, gfn);
19371937
19381938 return ret != -EAGAIN ? ret : 0;
1939+
1940+out_put_page:
1941+ kvm_release_page_unused(page);
1942+ return ret;
19391943 }
19401944
19411945 /* Resolve the access fault by making the page young again. */
arch/arm64/kvm/nested.c+16−11
@@ -152,31 +152,31 @@ static int get_ia_size(struct s2_walk_info *wi) · 151 unmodified lines
152152 return 64 - wi->t0sz;
153153 }
154154
155−static int check_base_s2_limits(struct s2_walk_info *wi,
155+static int check_base_s2_limits(struct kvm_vcpu *vcpu, struct s2_walk_info *wi,
156156 int level, int input_size, int stride)
157157 {
158− int start_size, ia_size;
158+ int start_size, pa_max;
159159
160− ia_size = get_ia_size(wi);
160+ pa_max = kvm_get_pa_bits(vcpu->kvm);
161161
162162 /* Check translation limits */
163163 switch (BIT(wi->pgshift)) {
164164 case SZ_64K:
165− if (level == 0 || (level == 1 && ia_size <= 42))
165+ if (level == 0 || (level == 1 && pa_max <= 42))
166166 return -EFAULT;
167167 break;
168168 case SZ_16K:
169− if (level == 0 || (level == 1 && ia_size <= 40))
169+ if (level == 0 || (level == 1 && pa_max <= 40))
170170 return -EFAULT;
171171 break;
172172 case SZ_4K:
173− if (level < 0 || (level == 0 && ia_size <= 42))
173+ if (level < 0 || (level == 0 && pa_max <= 42))
174174 return -EFAULT;
175175 break;
176176 }
177177
178178 /* Check input size limits */
179− if (input_size > ia_size)
179+ if (input_size > pa_max)
180180 return -EFAULT;
181181
182182 /* Check number of entries in starting level table */
@@ -269,16 +269,19 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa, · 86 unmodified lines
269269 if (input_size > 48 || input_size < 25)
270270 return -EFAULT;
271271
272− ret = check_base_s2_limits(wi, level, input_size, stride);
273− if (WARN_ON(ret))
272+ ret = check_base_s2_limits(vcpu, wi, level, input_size, stride);
273+ if (WARN_ON(ret)) {
274+ out->esr = compute_fsc(0, ESR_ELx_FSC_FAULT);
274275 return ret;
276+ }
275277
276278 base_lower_bound = 3 + input_size - ((3 - level) * stride +
277279 wi->pgshift);
278280 base_addr = wi->baddr & GENMASK_ULL(47, base_lower_bound);
279281
280282 if (check_output_size(wi, base_addr)) {
281− out->esr = compute_fsc(level, ESR_ELx_FSC_ADDRSZ);
283+ /* R_BFHQH */
284+ out->esr = compute_fsc(0, ESR_ELx_FSC_ADDRSZ);
282285 return 1;
283286 }
284287
@@ -293,8 +296,10 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa, · 8 unmodified lines
293296
294297 paddr = base_addr | index;
295298 ret = read_guest_s2_desc(vcpu, paddr, &desc, wi);
296− if (ret < 0)
299+ if (ret < 0) {
300+ out->esr = ESR_ELx_FSC_SEA_TTW(level);
297301 return ret;
302+ }
298303
299304 new_desc = desc;
300305
arch/arm64/kvm/reset.c+14−0
@@ -247,6 +247,20 @@ void kvm_reset_vcpu(struct kvm_vcpu *vcpu) · 246 unmodified lines
247247 kvm_vcpu_set_be(vcpu);
248248
249249 *vcpu_pc(vcpu) = target_pc;
250+
251+ /*
252+ * We may come from a state where either a PC update was
253+ * pending (SMC call resulting in PC being increpented to
254+ * skip the SMC) or a pending exception. Make sure we get
255+ * rid of all that, as this cannot be valid out of reset.
256+ *
257+ * Note that clearing the exception mask also clears PC
258+ * updates, but that's an implementation detail, and we
259+ * really want to make it explicit.
260+ */
261+ vcpu_clear_flag(vcpu, PENDING_EXCEPTION);
262+ vcpu_clear_flag(vcpu, EXCEPT_MASK);
263+ vcpu_clear_flag(vcpu, INCREMENT_PC);
250264 vcpu_set_reg(vcpu, 0, reset_state.r0);
251265 }
252266
arch/arm64/kvm/vgic/vgic-init.c+16−16
@@ -143,6 +143,21 @@ int kvm_vgic_create(struct kvm *kvm, u32 type) · 142 unmodified lines
143143 kvm->arch.vgic.in_kernel = true;
144144 kvm->arch.vgic.vgic_model = type;
145145 kvm->arch.vgic.implementation_rev = KVM_VGIC_IMP_REV_LATEST;
146+ kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
147+
148+ aa64pfr0 = kvm_read_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1) & ~ID_AA64PFR0_EL1_GIC;
149+ pfr1 = kvm_read_vm_id_reg(kvm, SYS_ID_PFR1_EL1) & ~ID_PFR1_EL1_GIC;
150+
151+ if (type == KVM_DEV_TYPE_ARM_VGIC_V2) {
152+ kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
153+ } else {
154+ INIT_LIST_HEAD(&kvm->arch.vgic.rd_regions);
155+ aa64pfr0 |= SYS_FIELD_PREP_ENUM(ID_AA64PFR0_EL1, GIC, IMP);
156+ pfr1 |= SYS_FIELD_PREP_ENUM(ID_PFR1_EL1, GIC, GICv3);
157+ }
158+
159+ kvm_set_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1, aa64pfr0);
160+ kvm_set_vm_id_reg(kvm, SYS_ID_PFR1_EL1, pfr1);
146161
147162 kvm_for_each_vcpu(i, vcpu, kvm) {
148163 ret = vgic_allocate_private_irqs_locked(vcpu, type);
@@ -157,25 +172,10 @@ int kvm_vgic_create(struct kvm *kvm, u32 type) · 8 unmodified lines
157172 vgic_cpu->private_irqs = NULL;
158173 }
159174
175+ kvm->arch.vgic.vgic_model = 0;
160176 goto out_unlock;
161177 }
162178
163− kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
164−
165− aa64pfr0 = kvm_read_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1) & ~ID_AA64PFR0_EL1_GIC;
166− pfr1 = kvm_read_vm_id_reg(kvm, SYS_ID_PFR1_EL1) & ~ID_PFR1_EL1_GIC;
167−
168− if (type == KVM_DEV_TYPE_ARM_VGIC_V2) {
169− kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
170− } else {
171− INIT_LIST_HEAD(&kvm->arch.vgic.rd_regions);
172− aa64pfr0 |= SYS_FIELD_PREP_ENUM(ID_AA64PFR0_EL1, GIC, IMP);
173− pfr1 |= SYS_FIELD_PREP_ENUM(ID_PFR1_EL1, GIC, GICv3);
174− }
175−
176− kvm_set_vm_id_reg(kvm, SYS_ID_AA64PFR0_EL1, aa64pfr0);
177− kvm_set_vm_id_reg(kvm, SYS_ID_PFR1_EL1, pfr1);
178−
179179 if (type == KVM_DEV_TYPE_ARM_VGIC_V3)
180180 kvm->arch.vgic.nassgicap = system_supports_direct_sgis();
181181
arch/arm64/kvm/vgic/vgic-v2.c+2−2
@@ -115,7 +115,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu) · 114 unmodified lines
115115 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
116116 struct vgic_v2_cpu_if *cpuif = &vgic_cpu->vgic_v2;
117117 u32 eoicount = FIELD_GET(GICH_HCR_EOICOUNT, cpuif->vgic_hcr);
118− struct vgic_irq *irq;
118+ struct vgic_irq *irq = *host_data_ptr(last_lr_irq);
119119
120120 DEBUG_SPINLOCK_BUG_ON(!irqs_disabled());
121121
@@ -123,7 +123,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu) · 1 unmodified line
123123 vgic_v2_fold_lr(vcpu, cpuif->vgic_lr[lr]);
124124
125125 /* See the GICv3 equivalent for the EOIcount handling rationale */
126− list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) {
126+ list_for_each_entry_continue(irq, &vgic_cpu->ap_list_head, ap_list) {
127127 u32 lr;
128128
129129 if (!eoicount) {
arch/arm64/kvm/vgic/vgic-v3.c+6−6
@@ -148,7 +148,7 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu) · 147 unmodified lines
148148 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
149149 struct vgic_v3_cpu_if *cpuif = &vgic_cpu->vgic_v3;
150150 u32 eoicount = FIELD_GET(ICH_HCR_EL2_EOIcount, cpuif->vgic_hcr);
151− struct vgic_irq *irq;
151+ struct vgic_irq *irq = *host_data_ptr(last_lr_irq);
152152
153153 DEBUG_SPINLOCK_BUG_ON(!irqs_disabled());
154154
@@ -158,12 +158,12 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu) · 3 unmodified lines
158158 /*
159159 * EOIMode=0: use EOIcount to emulate deactivation. We are
160160 * guaranteed to deactivate in reverse order of the activation, so
161− * just pick one active interrupt after the other in the ap_list,
162− * and replay the deactivation as if the CPU was doing it. We also
163− * rely on priority drop to have taken place, and the list to be
164− * sorted by priority.
161+ * just pick one active interrupt after the other in the tail part
162+ * of the ap_list, past the LRs, and replay the deactivation as if
163+ * the CPU was doing it. We also rely on priority drop to have taken
164+ * place, and the list to be sorted by priority.
165165 */
166− list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) {
166+ list_for_each_entry_continue(irq, &vgic_cpu->ap_list_head, ap_list) {
167167 u64 lr;
168168
169169 /*
arch/arm64/kvm/vgic/vgic.c+6−0
@@ -814,6 +814,9 @@ retry: · 813 unmodified lines
814814
815815 static inline void vgic_fold_lr_state(struct kvm_vcpu *vcpu)
816816 {
817+ if (!*host_data_ptr(last_lr_irq))
818+ return;
819+
817820 if (kvm_vgic_global_state.type == VGIC_V2)
818821 vgic_v2_fold_lr_state(vcpu);
819822 else
@@ -960,10 +963,13 @@ static void vgic_flush_lr_state(struct kvm_vcpu *vcpu) · 140 unmodified lines
960963 if (irqs_outside_lrs(&als))
961964 vgic_sort_ap_list(vcpu);
962965
966+ *host_data_ptr(last_lr_irq) = NULL;
967+
963968 list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) {
964969 scoped_guard(raw_spinlock, &irq->irq_lock) {
965970 if (likely(vgic_target_oracle(irq) == vcpu)) {
966971 vgic_populate_lr(vcpu, irq, count++);
972+ *host_data_ptr(last_lr_irq) = irq;
967973 }
968974 }
969975
arch/loongarch/Kconfig+3−0
@@ -304,6 +304,9 @@ config AS_HAS_LBT_EXTENSION · 303 unmodified lines
304304 config AS_HAS_LVZ_EXTENSION
305305 def_bool $(as-instr,hvcl 0)
306306
307+config AS_HAS_SCQ_EXTENSION
308+ def_bool $(as-instr,sc.q \$t0$(comma)\$t1$(comma)\$t2)
309+
307310 config CC_HAS_ANNOTATE_TABLEJUMP
308311 def_bool $(cc-option,-mannotate-tablejump)
309312
arch/loongarch/include/asm/cmpxchg.h+5−0
@@ -238,6 +238,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, unsigned int · 237 unmodified lines
238238 arch_cmpxchg((ptr), (o), (n)); \
239239 })
240240
241+#ifdef CONFIG_AS_HAS_SCQ_EXTENSION
242+
241243 union __u128_halves {
242244 u128 full;
243245 struct {
@@ -290,6 +292,9 @@ union __u128_halves { · 46 unmodified lines
290292 BUILD_BUG_ON(sizeof(*(ptr)) != 16); \
291293 __arch_cmpxchg128(ptr, o, n, ""); \
292294 })
295+
296+#endif /* CONFIG_AS_HAS_SCQ_EXTENSION */
297+
293298 #else
294299 #include <asm-generic/cmpxchg-local.h>
295300 #define arch_cmpxchg64_local(ptr, o, n) __generic_cmpxchg64_local((ptr), (o), (n))
arch/loongarch/include/asm/linkage.h+36−0
@@ -41,4 +41,40 @@ · 40 unmodified lines
4141 .cfi_endproc; \
4242 SYM_END(name, SYM_T_NONE)
4343
44+/*
45+ * This is for the signal handler trampoline, which is used as the return
46+ * address of the signal handlers in userspace instead of called normally.
47+ * The long standing libgcc bug https://gcc.gnu.org/PR124050 requires a
48+ * nop between .cfi_startproc and the actual address of the trampoline, so
49+ * we cannot simply use SYM_FUNC_START.
50+ *
51+ * This wrapper also contains all the .cfi_* directives for recovering
52+ * the content of the GPRs and the "return address" (where the rt_sigreturn
53+ * syscall will jump to), assuming there is a struct rt_sigframe (where
54+ * a struct sigcontext containing those information we need to recover) at
55+ * $sp. The "DWARF for the LoongArch(TM) Architecture" manual states
56+ * column 0 is for $zero, but it does not make too much sense to
57+ * save/restore the hardware zero register. Repurpose this column here
58+ * for the return address (here it's not the content of $ra we cannot use
59+ * the default column 3).
60+ */
61+#define SYM_SIGFUNC_START(name) \
62+ .cfi_startproc; \
63+ .cfi_signal_frame; \
64+ .cfi_def_cfa 3, RT_SIGFRAME_SC; \
65+ .cfi_return_column 0; \
66+ .cfi_offset 0, SC_PC; \
67+ \
68+ .irp num, 1, 2, 3, 4, 5, 6, 7, 8, \
69+ 9, 10, 11, 12, 13, 14, 15, 16, \
70+ 17, 18, 19, 20, 21, 22, 23, 24, \
71+ 25, 26, 27, 28, 29, 30, 31; \
72+ .cfi_offset \num, SC_REGS + \num * SZREG; \
73+ .endr; \
74+ \
75+ nop; \
76+ SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
77+
78+#define SYM_SIGFUNC_END(name) SYM_FUNC_END(name)
79+
4480 #endif
arch/loongarch/include/asm/sigframe.h+9−0
@@ -0,0 +1,9 @@
1+/* SPDX-License-Identifier: GPL-2.0+ */
2+
3+#include <asm/siginfo.h>
4+#include <asm/ucontext.h>
5+
6+struct rt_sigframe {
7+ struct siginfo rs_info;
8+ struct ucontext rs_uctx;
9+};
arch/loongarch/include/asm/uaccess.h+12−2
@@ -253,8 +253,13 @@ do { \ · 252 unmodified lines
253253 \
254254 __get_kernel_common(*((type *)(dst)), sizeof(type), \
255255 (__force type *)(src)); \
256− if (unlikely(__gu_err)) \
256+ if (unlikely(__gu_err)) { \
257+ pr_info("%s: memory access failed, ecode 0x%x\n", \
258+ __func__, read_csr_excode()); \
259+ pr_info("%s: the caller is %pS\n", \
260+ __func__, __builtin_return_address(0)); \
257261 goto err_label; \
262+ } \
258263 } while (0)
259264
260265 #define __put_kernel_nofault(dst, src, type, err_label) \
@@ -264,8 +269,13 @@ do { \ · 3 unmodified lines
264269 \
265270 __pu_val = *(__force type *)(src); \
266271 __put_kernel_common(((type *)(dst)), sizeof(type)); \
267− if (unlikely(__pu_err)) \
272+ if (unlikely(__pu_err)) { \
273+ pr_info("%s: memory access failed, ecode 0x%x\n", \
274+ __func__, read_csr_excode()); \
275+ pr_info("%s: the caller is %pS\n", \
276+ __func__, __builtin_return_address(0)); \
268277 goto err_label; \
278+ } \
269279 } while (0)
270280
271281 extern unsigned long __copy_user(void *to, const void *from, __kernel_size_t n);
arch/loongarch/kernel/asm-offsets.c+2−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include <asm/ptrace.h>
1717 #include <asm/processor.h>
1818 #include <asm/ftrace.h>
19+#include <asm/sigframe.h>
1920 #include <vdso/datapage.h>
2021
2122 static void __used output_ptreg_defines(void)
@@ -220,6 +221,7 @@ static void __used output_sc_defines(void) · 198 unmodified lines
220221 COMMENT("Linux sigcontext offsets.");
221222 OFFSET(SC_REGS, sigcontext, sc_regs);
222223 OFFSET(SC_PC, sigcontext, sc_pc);
224+ OFFSET(RT_SIGFRAME_SC, rt_sigframe, rs_uctx.uc_mcontext);
223225 BLANK();
224226 }
225227
arch/loongarch/kernel/env.c+3−4
@@ -42,16 +42,15 @@ static int __init init_cpu_fullname(void) · 41 unmodified lines
4242 int cpu, ret;
4343 char *cpuname;
4444 const char *model;
45− struct device_node *root;
4645
4746 /* Parsing cpuname from DTS model property */
48− root = of_find_node_by_path("/");
49− ret = of_property_read_string(root, "model", &model);
47+ ret = of_property_read_string(of_root, "model", &model);
5048 if (ret == 0) {
5149 cpuname = kstrdup(model, GFP_KERNEL);
50+ if (!cpuname)
51+ return -ENOMEM;
5252 loongson_sysconf.cpuname = strsep(&cpuname, " ");
5353 }
54− of_node_put(root);
5554
5655 if (loongson_sysconf.cpuname && !strncmp(loongson_sysconf.cpuname, "Loongson", 8)) {
5756 for (cpu = 0; cpu < NR_CPUS; cpu++)
arch/loongarch/kernel/inst.c+25−6
@@ -246,32 +246,51 @@ static int text_copy_cb(void *data) · 245 unmodified lines
246246
247247 if (smp_processor_id() == copy->cpu) {
248248 ret = copy_to_kernel_nofault(copy->dst, copy->src, copy->len);
249− if (ret)
249+ if (ret) {
250250 pr_err("%s: operation failed\n", __func__);
251+ return ret;
252+ }
251253 }
252254
253255 flush_icache_range((unsigned long)copy->dst, (unsigned long)copy->dst + copy->len);
254256
255− return ret;
257+ return 0;
256258 }
257259
258260 int larch_insn_text_copy(void *dst, void *src, size_t len)
259261 {
260262 int ret = 0;
263+ int err = 0;
261264 size_t start, end;
262265 struct insn_copy copy = {
263266 .dst = dst,
264267 .src = src,
265268 .len = len,
266− .cpu = smp_processor_id(),
269+ .cpu = raw_smp_processor_id(),
267270 };
268271
272+ /*
273+ * Ensure copy.cpu won't be hot removed before stop_machine.
274+ * If it is removed nobody will really update the text.
275+ */
276+ lockdep_assert_cpus_held();
277+
269278 start = round_down((size_t)dst, PAGE_SIZE);
270279 end = round_up((size_t)dst + len, PAGE_SIZE);
271280
272− set_memory_rw(start, (end - start) / PAGE_SIZE);
273− ret = stop_machine(text_copy_cb, &copy, cpu_online_mask);
274− set_memory_rox(start, (end - start) / PAGE_SIZE);
281+ err = set_memory_rw(start, (end - start) / PAGE_SIZE);
282+ if (err) {
283+ pr_info("%s: set_memory_rw() failed\n", __func__);
284+ return err;
285+ }
286+
287+ ret = stop_machine_cpuslocked(text_copy_cb, &copy, cpu_online_mask);
288+
289+ err = set_memory_rox(start, (end - start) / PAGE_SIZE);
290+ if (err) {
291+ pr_info("%s: set_memory_rox() failed\n", __func__);
292+ return err;
293+ }
275294
276295 return ret;
277296 }
arch/loongarch/kernel/signal.c+1−5
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include <asm/cpu-features.h>
3636 #include <asm/fpu.h>
3737 #include <asm/lbt.h>
38+#include <asm/sigframe.h>
3839 #include <asm/ucontext.h>
3940 #include <asm/vdso.h>
4041
@@ -51,11 +52,6 @@ · 10 unmodified lines
5152 #define lock_lbt_owner() ({ preempt_disable(); pagefault_disable(); })
5253 #define unlock_lbt_owner() ({ pagefault_enable(); preempt_enable(); })
5354
54−struct rt_sigframe {
55− struct siginfo rs_info;
56− struct ucontext rs_uctx;
57−};
58−
5955 struct _ctx_layout {
6056 struct sctx_info *addr;
6157 unsigned int size;
arch/loongarch/kvm/intc/eiointc.c+8−8
@@ -83,7 +83,7 @@ static inline void eiointc_update_sw_coremap(struct loongarch_eiointc *s, · 82 unmodified lines
8383
8484 if (!(s->status & BIT(EIOINTC_ENABLE_CPU_ENCODE))) {
8585 cpuid = ffs(cpuid) - 1;
86− cpuid = (cpuid >= 4) ? 0 : cpuid;
86+ cpuid = ((cpuid < 0) || (cpuid >= 4)) ? 0 : cpuid;
8787 }
8888
8989 vcpu = kvm_get_vcpu_by_cpuid(s->kvm, cpuid);
@@ -472,34 +472,34 @@ static int kvm_eiointc_regs_access(struct kvm_device *dev, · 382 unmodified lines
472472 switch (addr) {
473473 case EIOINTC_NODETYPE_START ... EIOINTC_NODETYPE_END:
474474 offset = (addr - EIOINTC_NODETYPE_START) / 4;
475− p = s->nodetype + offset * 4;
475+ p = (void *)s->nodetype + offset * 4;
476476 break;
477477 case EIOINTC_IPMAP_START ... EIOINTC_IPMAP_END:
478478 offset = (addr - EIOINTC_IPMAP_START) / 4;
479− p = &s->ipmap + offset * 4;
479+ p = (void *)&s->ipmap + offset * 4;
480480 break;
481481 case EIOINTC_ENABLE_START ... EIOINTC_ENABLE_END:
482482 offset = (addr - EIOINTC_ENABLE_START) / 4;
483− p = s->enable + offset * 4;
483+ p = (void *)s->enable + offset * 4;
484484 break;
485485 case EIOINTC_BOUNCE_START ... EIOINTC_BOUNCE_END:
486486 offset = (addr - EIOINTC_BOUNCE_START) / 4;
487− p = s->bounce + offset * 4;
487+ p = (void *)s->bounce + offset * 4;
488488 break;
489489 case EIOINTC_ISR_START ... EIOINTC_ISR_END:
490490 offset = (addr - EIOINTC_ISR_START) / 4;
491− p = s->isr + offset * 4;
491+ p = (void *)s->isr + offset * 4;
492492 break;
493493 case EIOINTC_COREISR_START ... EIOINTC_COREISR_END:
494494 if (cpu >= s->num_cpu)
495495 return -EINVAL;
496496
497497 offset = (addr - EIOINTC_COREISR_START) / 4;
498− p = s->coreisr[cpu] + offset * 4;
498+ p = (void *)s->coreisr[cpu] + offset * 4;
499499 break;
500500 case EIOINTC_COREMAP_START ... EIOINTC_COREMAP_END:
501501 offset = (addr - EIOINTC_COREMAP_START) / 4;
502− p = s->coremap + offset * 4;
502+ p = (void *)s->coremap + offset * 4;
503503 break;
504504 default:
505505 kvm_err("%s: unknown eiointc register, addr = %d\n", __func__, addr);
arch/loongarch/kvm/vcpu.c+4−1
@@ -14,7 +14,7 @@ · 13 unmodified lines
1414 #define CREATE_TRACE_POINTS
1515 #include "trace.h"
1616
17−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
17+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
1818 KVM_GENERIC_VCPU_STATS(),
1919 STATS_DESC_COUNTER(VCPU, int_exits),
2020 STATS_DESC_COUNTER(VCPU, idle_exits),
@@ -588,6 +588,9 @@ struct kvm_vcpu *kvm_get_vcpu_by_cpuid(struct kvm *kvm, int cpuid) · 567 unmodified lines
588588 {
589589 struct kvm_phyid_map *map;
590590
591+ if (cpuid < 0)
592+ return NULL;
593+
591594 if (cpuid >= KVM_MAX_PHYID)
592595 return NULL;
593596
arch/loongarch/kvm/vm.c+3−3
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 #include <asm/kvm_eiointc.h>
1111 #include <asm/kvm_pch_pic.h>
1212
13−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
13+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
1414 KVM_GENERIC_VM_STATS(),
1515 STATS_DESC_ICOUNTER(VM, pages),
1616 STATS_DESC_ICOUNTER(VM, hugepages),
@@ -49,8 +49,8 @@ static void kvm_vm_init_features(struct kvm *kvm) · 32 unmodified lines
4949 kvm->arch.kvm_features |= BIT(KVM_LOONGARCH_VM_FEAT_PMU);
5050
5151 /* Enable all PV features by default */
52− kvm->arch.pv_features = BIT(KVM_FEATURE_IPI);
53− kvm->arch.kvm_features = BIT(KVM_LOONGARCH_VM_FEAT_PV_IPI);
52+ kvm->arch.pv_features |= BIT(KVM_FEATURE_IPI);
53+ kvm->arch.kvm_features |= BIT(KVM_LOONGARCH_VM_FEAT_PV_IPI);
5454 if (kvm_pvtime_supported()) {
5555 kvm->arch.pv_features |= BIT(KVM_FEATURE_PREEMPT);
5656 kvm->arch.pv_features |= BIT(KVM_FEATURE_STEAL_TIME);
arch/loongarch/net/bpf_jit.c+11−0
@@ -1379,9 +1379,11 @@ void *bpf_arch_text_copy(void *dst, void *src, size_t len) · 1378 unmodified lines
13791379 {
13801380 int ret;
13811381
1382+ cpus_read_lock();
13821383 mutex_lock(&text_mutex);
13831384 ret = larch_insn_text_copy(dst, src, len);
13841385 mutex_unlock(&text_mutex);
1386+ cpus_read_unlock();
13851387
13861388 return ret ? ERR_PTR(-EINVAL) : dst;
13871389 }
@@ -1429,10 +1431,12 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type old_t, · 41 unmodified lines
14291431 if (ret)
14301432 return ret;
14311433
1434+ cpus_read_lock();
14321435 mutex_lock(&text_mutex);
14331436 if (memcmp(ip, new_insns, LOONGARCH_LONG_JUMP_NBYTES))
14341437 ret = larch_insn_text_copy(ip, new_insns, LOONGARCH_LONG_JUMP_NBYTES);
14351438 mutex_unlock(&text_mutex);
1439+ cpus_read_unlock();
14361440
14371441 return ret;
14381442 }
@@ -1450,10 +1454,12 @@ int bpf_arch_text_invalidate(void *dst, size_t len) · 11 unmodified lines
14501454 for (i = 0; i < (len / sizeof(u32)); i++)
14511455 inst[i] = INSN_BREAK;
14521456
1457+ cpus_read_lock();
14531458 mutex_lock(&text_mutex);
14541459 if (larch_insn_text_copy(dst, inst, len))
14551460 ret = -EINVAL;
14561461 mutex_unlock(&text_mutex);
1462+ cpus_read_unlock();
14571463
14581464 kvfree(inst);
14591465
@@ -1568,6 +1574,11 @@ void arch_free_bpf_trampoline(void *image, unsigned int size) · 108 unmodified lines
15681574 bpf_prog_pack_free(image, size);
15691575 }
15701576
1577+int arch_protect_bpf_trampoline(void *image, unsigned int size)
1578+{
1579+ return 0;
1580+}
1581+
15711582 /*
15721583 * Sign-extend the register if necessary
15731584 */
arch/loongarch/pci/pci.c+80−0
@@ -5,9 +5,11 @@ · 4 unmodified lines
55 #include <linux/kernel.h>
66 #include <linux/init.h>
77 #include <linux/acpi.h>
8+#include <linux/delay.h>
89 #include <linux/types.h>
910 #include <linux/pci.h>
1011 #include <linux/vgaarb.h>
12+#include <linux/io-64-nonatomic-lo-hi.h>
1113 #include <asm/cacheflush.h>
1214 #include <asm/loongson.h>
1315
@@ -15,6 +17,9 @@ · 1 unmodified line
1517 #define PCI_DEVICE_ID_LOONGSON_DC1 0x7a06
1618 #define PCI_DEVICE_ID_LOONGSON_DC2 0x7a36
1719 #define PCI_DEVICE_ID_LOONGSON_DC3 0x7a46
20+#define PCI_DEVICE_ID_LOONGSON_GPU1 0x7a15
21+#define PCI_DEVICE_ID_LOONGSON_GPU2 0x7a25
22+#define PCI_DEVICE_ID_LOONGSON_GPU3 0x7a35
1823
1924 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
2025 int reg, int len, u32 *val)
@@ -99,3 +104,78 @@ static void pci_fixup_vgadev(struct pci_dev *pdev) · 78 unmodified lines
99104 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_DC1, pci_fixup_vgadev);
100105 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_DC2, pci_fixup_vgadev);
101106 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_DC3, pci_fixup_vgadev);
107+
108+#define CRTC_NUM_MAX 2
109+#define CRTC_OUTPUT_ENABLE 0x100
110+
111+static void loongson_gpu_fixup_dma_hang(struct pci_dev *pdev, bool on)
112+{
113+ u32 i, val, count, crtc_offset, device;
114+ void __iomem *crtc_reg, *base, *regbase;
115+ static u32 crtc_status[CRTC_NUM_MAX] = { 0 };
116+
117+ base = pdev->bus->ops->map_bus(pdev->bus, pdev->devfn + 1, 0);
118+ device = readw(base + PCI_DEVICE_ID);
119+
120+ regbase = ioremap(readq(base + PCI_BASE_ADDRESS_0) & ~0xffull, SZ_64K);
121+ if (!regbase) {
122+ pci_err(pdev, "Failed to ioremap()\n");
123+ return;
124+ }
125+
126+ switch (device) {
127+ case PCI_DEVICE_ID_LOONGSON_DC2:
128+ crtc_reg = regbase + 0x1240;
129+ crtc_offset = 0x10;
130+ break;
131+ case PCI_DEVICE_ID_LOONGSON_DC3:
132+ crtc_reg = regbase;
133+ crtc_offset = 0x400;
134+ break;
135+ }
136+
137+ for (i = 0; i < CRTC_NUM_MAX; i++, crtc_reg += crtc_offset) {
138+ val = readl(crtc_reg);
139+
140+ if (!on)
141+ crtc_status[i] = val;
142+
143+ /* No need to fixup if the status is off at startup. */
144+ if (!(crtc_status[i] & CRTC_OUTPUT_ENABLE))
145+ continue;
146+
147+ if (on)
148+ val |= CRTC_OUTPUT_ENABLE;
149+ else
150+ val &= ~CRTC_OUTPUT_ENABLE;
151+
152+ mb();
153+ writel(val, crtc_reg);
154+
155+ for (count = 0; count < 40; count++) {
156+ val = readl(crtc_reg) & CRTC_OUTPUT_ENABLE;
157+ if ((on && val) || (!on && !val))
158+ break;
159+ udelay(1000);
160+ }
161+
162+ pci_info(pdev, "DMA hang fixup at reg[0x%lx]: 0x%x\n",
163+ (unsigned long)crtc_reg & 0xffff, readl(crtc_reg));
164+ }
165+
166+ iounmap(regbase);
167+}
168+
169+static void pci_fixup_dma_hang_early(struct pci_dev *pdev)
170+{
171+ loongson_gpu_fixup_dma_hang(pdev, false);
172+}
173+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_GPU2, pci_fixup_dma_hang_early);
174+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_GPU3, pci_fixup_dma_hang_early);
175+
176+static void pci_fixup_dma_hang_final(struct pci_dev *pdev)
177+{
178+ loongson_gpu_fixup_dma_hang(pdev, true);
179+}
180+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_GPU2, pci_fixup_dma_hang_final);
181+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_GPU3, pci_fixup_dma_hang_final);
arch/loongarch/vdso/Makefile+2−2
@@ -26,7 +26,7 @@ cflags-vdso := $(ccflags-vdso) \ · 25 unmodified lines
2626 $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
2727 -std=gnu11 -fms-extensions -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \
2828 -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
29− $(call cc-option, -fno-asynchronous-unwind-tables) \
29+ $(call cc-option, -fasynchronous-unwind-tables) \
3030 $(call cc-option, -fno-stack-protector)
3131 aflags-vdso := $(ccflags-vdso) \
3232 -D__ASSEMBLY__ -Wa,-gdwarf-2
@@ -41,7 +41,7 @@ endif · 8 unmodified lines
4141
4242 # VDSO linker flags.
4343 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
44− $(filter -E%,$(KBUILD_CFLAGS)) -shared --build-id -T
44+ $(filter -E%,$(KBUILD_CFLAGS)) -shared --build-id --eh-frame-hdr -T
4545
4646 #
4747 # Shared build commands.
arch/loongarch/vdso/sigreturn.S+3−3
@@ -12,13 +12,13 @@ · 11 unmodified lines
1212
1313 #include <asm/regdef.h>
1414 #include <asm/asm.h>
15+#include <asm/asm-offsets.h>
1516
1617 .section .text
17− .cfi_sections .debug_frame
1818
19−SYM_FUNC_START(__vdso_rt_sigreturn)
19+SYM_SIGFUNC_START(__vdso_rt_sigreturn)
2020
2121 li.w a7, __NR_rt_sigreturn
2222 syscall 0
2323
24−SYM_FUNC_END(__vdso_rt_sigreturn)
24+SYM_SIGFUNC_END(__vdso_rt_sigreturn)
arch/mips/include/asm/cpu-features.h+0−1
@@ -484,7 +484,6 @@ · 483 unmodified lines
484484 # endif
485485 # ifndef cpu_vmbits
486486 # define cpu_vmbits cpu_data[0].vmbits
487−# define __NEED_VMBITS_PROBE
488487 # endif
489488 #endif
490489
arch/mips/include/asm/cpu-info.h+0−2
@@ -80,9 +80,7 @@ struct cpuinfo_mips { · 79 unmodified lines
8080 int srsets; /* Shadow register sets */
8181 int package;/* physical package number */
8282 unsigned int globalnumber;
83−#ifdef CONFIG_64BIT
8483 int vmbits; /* Virtual memory size in bits */
85−#endif
8684 void *data; /* Additional data */
8785 unsigned int watch_reg_count; /* Number that exist */
8886 unsigned int watch_reg_use_cnt; /* Usable by ptrace */
arch/mips/include/asm/mipsregs.h+2−0
@@ -1871,6 +1871,8 @@ do { \ · 1870 unmodified lines
18711871
18721872 #define read_c0_entryhi() __read_ulong_c0_register($10, 0)
18731873 #define write_c0_entryhi(val) __write_ulong_c0_register($10, 0, val)
1874+#define read_c0_entryhi_64() __read_64bit_c0_register($10, 0)
1875+#define write_c0_entryhi_64(val) __write_64bit_c0_register($10, 0, val)
18741876
18751877 #define read_c0_guestctl1() __read_32bit_c0_register($10, 4)
18761878 #define write_c0_guestctl1(val) __write_32bit_c0_register($10, 4, val)
arch/mips/kernel/cpu-probe.c+8−5
@@ -210,11 +210,14 @@ static inline void set_elf_base_platform(const char *plat) · 209 unmodified lines
210210
211211 static inline void cpu_probe_vmbits(struct cpuinfo_mips *c)
212212 {
213−#ifdef __NEED_VMBITS_PROBE
214− write_c0_entryhi(0x3fffffffffffe000ULL);
215− back_to_back_c0_hazard();
216− c->vmbits = fls64(read_c0_entryhi() & 0x3fffffffffffe000ULL);
217−#endif
213+ int vmbits = 31;
214+
215+ if (cpu_has_64bits) {
216+ write_c0_entryhi_64(0x3fffffffffffe000ULL);
217+ back_to_back_c0_hazard();
218+ vmbits = fls64(read_c0_entryhi_64() & 0x3fffffffffffe000ULL);
219+ }
220+ c->vmbits = vmbits;
218221 }
219222
220223 static void set_isa(struct cpuinfo_mips *c, unsigned int isa)
arch/mips/kernel/cpu-r3k-probe.c+2−0
@@ -137,6 +137,8 @@ void cpu_probe(void) · 136 unmodified lines
137137 else
138138 cpu_set_nofpu_opts(c);
139139
140+ c->vmbits = 31;
141+
140142 reserve_exception_space(0, 0x400);
141143 }
142144
arch/mips/kvm/mips.c+2−2
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838 #define VECTORSPACING 0x100 /* for EI/VI mode */
3939 #endif
4040
41−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
41+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
4242 KVM_GENERIC_VM_STATS()
4343 };
4444
@@ -51,7 +51,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 6 unmodified lines
5151 sizeof(kvm_vm_stats_desc),
5252 };
5353
54−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
54+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
5555 KVM_GENERIC_VCPU_STATS(),
5656 STATS_DESC_COUNTER(VCPU, wait_exits),
5757 STATS_DESC_COUNTER(VCPU, cache_exits),
arch/mips/lib/multi3.c+3−3
@@ -4,12 +4,12 @@ · 3 unmodified lines
44 #include "libgcc.h"
55
66 /*
7− * GCC 7 & older can suboptimally generate __multi3 calls for mips64r6, so for
7+ * GCC 9 & older can suboptimally generate __multi3 calls for mips64r6, so for
88 * that specific case only we implement that intrinsic here.
99 *
1010 * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981
1111 */
12−#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6) && (__GNUC__ < 8)
12+#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6) && (__GNUC__ < 10)
1313
1414 /* multiply 64-bit values, low 64-bits returned */
1515 static inline long long notrace dmulu(long long a, long long b)
@@ -51,4 +51,4 @@ ti_type notrace __multi3(ti_type a, ti_type b) · 35 unmodified lines
5151 }
5252 EXPORT_SYMBOL(__multi3);
5353
54−#endif /* 64BIT && CPU_MIPSR6 && GCC7 */
54+#endif /* 64BIT && CPU_MIPSR6 && GCC9 */
arch/mips/loongson64/env.c+17−1
@@ -17,7 +17,9 @@ · 16 unmodified lines
1717 #include <linux/dma-map-ops.h>
1818 #include <linux/export.h>
1919 #include <linux/libfdt.h>
20+#include <linux/minmax.h>
2021 #include <linux/pci_ids.h>
22+#include <linux/serial_core.h>
2123 #include <linux/string_choices.h>
2224 #include <asm/bootinfo.h>
2325 #include <loongson.h>
@@ -106,9 +108,23 @@ static void __init lefi_fixup_fdt(struct system_loongson *system) · 82 unmodified lines
106108
107109 is_loongson64g = (read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64G;
108110
109− for (i = 0; i < system->nr_uarts; i++) {
111+ for (i = 0; i < min(system->nr_uarts, MAX_UARTS); i++) {
110112 uartdev = &system->uarts[i];
111113
114+ /*
115+ * Some firmware does not set nr_uarts properly and passes empty
116+ * items. Ignore them silently.
117+ */
118+ if (uartdev->uart_base == 0)
119+ continue;
120+
121+ /* Our DT only works with UPIO_MEM. */
122+ if (uartdev->iotype != UPIO_MEM) {
123+ pr_warn("Ignore UART 0x%llx with iotype %u passed by firmware\n",
124+ uartdev->uart_base, uartdev->iotype);
125+ continue;
126+ }
127+
112128 ret = lefi_fixup_fdt_serial(fdt_buf, uartdev->uart_base,
113129 uartdev->uartclk);
114130 /*
arch/mips/mm/cache.c+2−1
@@ -207,7 +207,8 @@ void cpu_cache_init(void) · 206 unmodified lines
207207 {
208208 if (IS_ENABLED(CONFIG_CPU_R3000) && cpu_has_3k_cache)
209209 r3k_cache_init();
210− if (IS_ENABLED(CONFIG_CPU_R4K_CACHE_TLB) && cpu_has_4k_cache)
210+ if ((IS_ENABLED(CONFIG_CPU_R4K_CACHE_TLB) ||
211+ IS_ENABLED(CONFIG_CPU_SB1)) && cpu_has_4k_cache)
211212 r4k_cache_init();
212213
213214 if (IS_ENABLED(CONFIG_CPU_CAVIUM_OCTEON) && cpu_has_octeon_cache)
arch/mips/mm/tlb-r4k.c+230−55
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #include <linux/sched.h>
1414 #include <linux/smp.h>
1515 #include <linux/memblock.h>
16+#include <linux/minmax.h>
1617 #include <linux/mm.h>
1718 #include <linux/hugetlb.h>
1819 #include <linux/export.h>
@@ -24,6 +25,7 @@ · 5 unmodified lines
2425 #include <asm/hazards.h>
2526 #include <asm/mmu_context.h>
2627 #include <asm/tlb.h>
28+#include <asm/tlbdebug.h>
2729 #include <asm/tlbex.h>
2830 #include <asm/tlbmisc.h>
2931 #include <asm/setup.h>
@@ -511,87 +513,259 @@ static int __init set_ntlb(char *str) · 481 unmodified lines
511513 __setup("ntlb=", set_ntlb);
512514
513515
514−/* Comparison function for EntryHi VPN fields. */
515−static int r4k_vpn_cmp(const void *a, const void *b)
516+/* The start bit position of VPN2 and Mask in EntryHi/PageMask registers. */
517+#define VPN2_SHIFT 13
518+
519+/* Read full EntryHi even with CONFIG_32BIT. */
520+static inline unsigned long long read_c0_entryhi_native(void)
521+{
522+ return cpu_has_64bits ? read_c0_entryhi_64() : read_c0_entryhi();
523+}
524+
525+/* Write full EntryHi even with CONFIG_32BIT. */
526+static inline void write_c0_entryhi_native(unsigned long long v)
516527 {
517− long v = *(unsigned long *)a - *(unsigned long *)b;
518− int s = sizeof(long) > sizeof(int) ? sizeof(long) * 8 - 1: 0;
519− return s ? (v != 0) | v >> s : v;
528+ if (cpu_has_64bits)
529+ write_c0_entryhi_64(v);
530+ else
531+ write_c0_entryhi(v);
520532 }
521533
534+/* TLB entry state for uniquification. */
535+struct tlbent {
536+ unsigned long long wired:1;
537+ unsigned long long global:1;
538+ unsigned long long asid:10;
539+ unsigned long long vpn:51;
540+ unsigned long long pagesz:5;
541+ unsigned long long index:14;
542+};
543+
522544 /*
523− * Initialise all TLB entries with unique values that do not clash with
524− * what we have been handed over and what we'll be using ourselves.
545+ * Comparison function for TLB entry sorting. Place wired entries first,
546+ * then global entries, then order by the increasing VPN/ASID and the
547+ * decreasing page size. This lets us avoid clashes with wired entries
548+ * easily and get entries for larger pages out of the way first.
549+ *
550+ * We could group bits so as to reduce the number of comparisons, but this
551+ * is seldom executed and not performance-critical, so prefer legibility.
525552 */
526−static void __ref r4k_tlb_uniquify(void)
553+static int r4k_entry_cmp(const void *a, const void *b)
527554 {
528− int tlbsize = current_cpu_data.tlbsize;
529− bool use_slab = slab_is_available();
530− int start = num_wired_entries();
531− phys_addr_t tlb_vpn_size;
532− unsigned long *tlb_vpns;
533− unsigned long vpn_mask;
534− int cnt, ent, idx, i;
535−
536− vpn_mask = GENMASK(cpu_vmbits - 1, 13);
537− vpn_mask |= IS_ENABLED(CONFIG_64BIT) ? 3ULL << 62 : 1 << 31;
555+ struct tlbent ea = *(struct tlbent *)a, eb = *(struct tlbent *)b;
556+
557+ if (ea.wired > eb.wired)
558+ return -1;
559+ else if (ea.wired < eb.wired)
560+ return 1;
561+ else if (ea.global > eb.global)
562+ return -1;
563+ else if (ea.global < eb.global)
564+ return 1;
565+ else if (ea.vpn < eb.vpn)
566+ return -1;
567+ else if (ea.vpn > eb.vpn)
568+ return 1;
569+ else if (ea.asid < eb.asid)
570+ return -1;
571+ else if (ea.asid > eb.asid)
572+ return 1;
573+ else if (ea.pagesz > eb.pagesz)
574+ return -1;
575+ else if (ea.pagesz < eb.pagesz)
576+ return 1;
577+ else
578+ return 0;
579+}
538580
539− tlb_vpn_size = tlbsize * sizeof(*tlb_vpns);
540− tlb_vpns = (use_slab ?
541− kmalloc(tlb_vpn_size, GFP_KERNEL) :
542− memblock_alloc_raw(tlb_vpn_size, sizeof(*tlb_vpns)));
543− if (WARN_ON(!tlb_vpns))
544− return; /* Pray local_flush_tlb_all() is good enough. */
581+/*
582+ * Fetch all the TLB entries. Mask individual VPN values retrieved with
583+ * the corresponding page mask and ignoring any 1KiB extension as we'll
584+ * be using 4KiB pages for uniquification.
585+ */
586+static void __ref r4k_tlb_uniquify_read(struct tlbent *tlb_vpns, int tlbsize)
587+{
588+ int start = num_wired_entries();
589+ unsigned long long vpn_mask;
590+ bool global;
591+ int i;
545592
546− htw_stop();
593+ vpn_mask = GENMASK(current_cpu_data.vmbits - 1, VPN2_SHIFT);
594+ vpn_mask |= cpu_has_64bits ? 3ULL << 62 : 1 << 31;
547595
548− for (i = start, cnt = 0; i < tlbsize; i++, cnt++) {
549− unsigned long vpn;
596+ for (i = 0; i < tlbsize; i++) {
597+ unsigned long long entryhi, vpn, mask, asid;
598+ unsigned int pagesz;
550599
551600 write_c0_index(i);
552601 mtc0_tlbr_hazard();
553602 tlb_read();
554603 tlb_read_hazard();
555− vpn = read_c0_entryhi();
556− vpn &= vpn_mask & PAGE_MASK;
557− tlb_vpns[cnt] = vpn;
558604
559− /* Prevent any large pages from overlapping regular ones. */
560− write_c0_pagemask(read_c0_pagemask() & PM_DEFAULT_MASK);
561− mtc0_tlbw_hazard();
562− tlb_write_indexed();
563− tlbw_use_hazard();
605+ global = !!(read_c0_entrylo0() & ENTRYLO_G);
606+ entryhi = read_c0_entryhi_native();
607+ mask = read_c0_pagemask();
608+
609+ asid = entryhi & cpu_asid_mask(&current_cpu_data);
610+ vpn = (entryhi & vpn_mask & ~mask) >> VPN2_SHIFT;
611+ pagesz = ilog2((mask >> VPN2_SHIFT) + 1);
612+
613+ tlb_vpns[i].global = global;
614+ tlb_vpns[i].asid = global ? 0 : asid;
615+ tlb_vpns[i].vpn = vpn;
616+ tlb_vpns[i].pagesz = pagesz;
617+ tlb_vpns[i].wired = i < start;
618+ tlb_vpns[i].index = i;
564619 }
620+}
621+
622+/*
623+ * Write unique values to all but the wired TLB entries each, using
624+ * the 4KiB page size. This size might not be supported with R6, but
625+ * EHINV is mandatory for R6, so we won't ever be called in that case.
626+ *
627+ * A sorted table is supplied with any wired entries at the beginning,
628+ * followed by any global entries, and then finally regular entries.
629+ * We start at the VPN and ASID values of zero and only assign user
630+ * addresses, therefore guaranteeing no clash with addresses produced
631+ * by UNIQUE_ENTRYHI. We avoid any VPN values used by wired or global
632+ * entries, by increasing the VPN value beyond the span of such entry.
633+ *
634+ * When a VPN/ASID clash is found with a regular entry we increment the
635+ * ASID instead until no VPN/ASID clash has been found or the ASID space
636+ * has been exhausted, in which case we increase the VPN value beyond
637+ * the span of the largest clashing entry.
638+ *
639+ * We do not need to be concerned about FTLB or MMID configurations as
640+ * those are required to implement the EHINV feature.
641+ */
642+static void __ref r4k_tlb_uniquify_write(struct tlbent *tlb_vpns, int tlbsize)
643+{
644+ unsigned long long asid, vpn, vpn_size, pagesz;
645+ int widx, gidx, idx, sidx, lidx, i;
565646
566− sort(tlb_vpns, cnt, sizeof(tlb_vpns[0]), r4k_vpn_cmp, NULL);
647+ vpn_size = 1ULL << (current_cpu_data.vmbits - VPN2_SHIFT);
648+ pagesz = ilog2((PM_4K >> VPN2_SHIFT) + 1);
567649
568− write_c0_pagemask(PM_DEFAULT_MASK);
650+ write_c0_pagemask(PM_4K);
569651 write_c0_entrylo0(0);
570652 write_c0_entrylo1(0);
571653
572− idx = 0;
573− ent = tlbsize;
574− for (i = start; i < tlbsize; i++)
575− while (1) {
576− unsigned long entryhi, vpn;
654+ asid = 0;
655+ vpn = 0;
656+ widx = 0;
657+ gidx = 0;
658+ for (sidx = 0; sidx < tlbsize && tlb_vpns[sidx].wired; sidx++)
659+ ;
660+ for (lidx = sidx; lidx < tlbsize && tlb_vpns[lidx].global; lidx++)
661+ ;
662+ idx = gidx = sidx + 1;
663+ for (i = sidx; i < tlbsize; i++) {
664+ unsigned long long entryhi, vpn_pagesz = 0;
577665
578− entryhi = UNIQUE_ENTRYHI(ent);
579− vpn = entryhi & vpn_mask & PAGE_MASK;
666+ while (1) {
667+ if (WARN_ON(vpn >= vpn_size)) {
668+ dump_tlb_all();
669+ /* Pray local_flush_tlb_all() will cope. */
670+ return;
671+ }
580672
581− if (idx >= cnt || vpn < tlb_vpns[idx]) {
582− write_c0_entryhi(entryhi);
583− write_c0_index(i);
584− mtc0_tlbw_hazard();
585− tlb_write_indexed();
586− ent++;
587− break;
588− } else if (vpn == tlb_vpns[idx]) {
589− ent++;
590− } else {
673+ /* VPN must be below the next wired entry. */
674+ if (widx < sidx && vpn >= tlb_vpns[widx].vpn) {
675+ vpn = max(vpn,
676+ (tlb_vpns[widx].vpn +
677+ (1ULL << tlb_vpns[widx].pagesz)));
678+ asid = 0;
679+ widx++;
680+ continue;
681+ }
682+ /* VPN must be below the next global entry. */
683+ if (gidx < lidx && vpn >= tlb_vpns[gidx].vpn) {
684+ vpn = max(vpn,
685+ (tlb_vpns[gidx].vpn +
686+ (1ULL << tlb_vpns[gidx].pagesz)));
687+ asid = 0;
688+ gidx++;
689+ continue;
690+ }
691+ /* Try to find a free ASID so as to conserve VPNs. */
692+ if (idx < tlbsize && vpn == tlb_vpns[idx].vpn &&
693+ asid == tlb_vpns[idx].asid) {
694+ unsigned long long idx_pagesz;
695+
696+ idx_pagesz = tlb_vpns[idx].pagesz;
697+ vpn_pagesz = max(vpn_pagesz, idx_pagesz);
698+ do
699+ idx++;
700+ while (idx < tlbsize &&
701+ vpn == tlb_vpns[idx].vpn &&
702+ asid == tlb_vpns[idx].asid);
703+ asid++;
704+ if (asid > cpu_asid_mask(&current_cpu_data)) {
705+ vpn += vpn_pagesz;
706+ asid = 0;
707+ vpn_pagesz = 0;
708+ }
709+ continue;
710+ }
711+ /* VPN mustn't be above the next regular entry. */
712+ if (idx < tlbsize && vpn > tlb_vpns[idx].vpn) {
713+ vpn = max(vpn,
714+ (tlb_vpns[idx].vpn +
715+ (1ULL << tlb_vpns[idx].pagesz)));
716+ asid = 0;
591717 idx++;
718+ continue;
592719 }
720+ break;
593721 }
594722
723+ entryhi = (vpn << VPN2_SHIFT) | asid;
724+ write_c0_entryhi_native(entryhi);
725+ write_c0_index(tlb_vpns[i].index);
726+ mtc0_tlbw_hazard();
727+ tlb_write_indexed();
728+
729+ tlb_vpns[i].asid = asid;
730+ tlb_vpns[i].vpn = vpn;
731+ tlb_vpns[i].pagesz = pagesz;
732+
733+ asid++;
734+ if (asid > cpu_asid_mask(&current_cpu_data)) {
735+ vpn += 1ULL << pagesz;
736+ asid = 0;
737+ }
738+ }
739+}
740+
741+/*
742+ * Initialise all TLB entries with unique values that do not clash with
743+ * what we have been handed over and what we'll be using ourselves.
744+ */
745+static void __ref r4k_tlb_uniquify(void)
746+{
747+ int tlbsize = current_cpu_data.tlbsize;
748+ bool use_slab = slab_is_available();
749+ phys_addr_t tlb_vpn_size;
750+ struct tlbent *tlb_vpns;
751+
752+ tlb_vpn_size = tlbsize * sizeof(*tlb_vpns);
753+ tlb_vpns = (use_slab ?
754+ kmalloc(tlb_vpn_size, GFP_ATOMIC) :
755+ memblock_alloc_raw(tlb_vpn_size, sizeof(*tlb_vpns)));
756+ if (WARN_ON(!tlb_vpns))
757+ return; /* Pray local_flush_tlb_all() is good enough. */
758+
759+ htw_stop();
760+
761+ r4k_tlb_uniquify_read(tlb_vpns, tlbsize);
762+
763+ sort(tlb_vpns, tlbsize, sizeof(*tlb_vpns), r4k_entry_cmp, NULL);
764+
765+ r4k_tlb_uniquify_write(tlb_vpns, tlbsize);
766+
767+ write_c0_pagemask(PM_DEFAULT_MASK);
768+
595769 tlbw_use_hazard();
596770 htw_start();
597771 flush_micro_tlb();
@@ -640,7 +814,8 @@ static void r4k_tlb_configure(void) · 42 unmodified lines
640814 temp_tlb_entry = current_cpu_data.tlbsize - 1;
641815
642816 /* From this point on the ARC firmware is dead. */
643− r4k_tlb_uniquify();
817+ if (!cpu_has_tlbinv)
818+ r4k_tlb_uniquify();
644819 local_flush_tlb_all();
645820
646821 /* Did I tell you that ARC SUCKS? */
arch/mips/ralink/clk.c+4−4
@@ -21,16 +21,16 @@ static const char *clk_cpu(int *idx) · 20 unmodified lines
2121 {
2222 switch (ralink_soc) {
2323 case RT2880_SOC:
24− *idx = 0;
24+ *idx = 1;
2525 return "ralink,rt2880-sysc";
2626 case RT3883_SOC:
27− *idx = 0;
27+ *idx = 1;
2828 return "ralink,rt3883-sysc";
2929 case RT305X_SOC_RT3050:
30− *idx = 0;
30+ *idx = 1;
3131 return "ralink,rt3050-sysc";
3232 case RT305X_SOC_RT3052:
33− *idx = 0;
33+ *idx = 1;
3434 return "ralink,rt3052-sysc";
3535 case RT305X_SOC_RT3350:
3636 *idx = 1;
arch/parisc/kernel/cache.c+2−2
@@ -953,7 +953,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes, · 952 unmodified lines
953953 #else
954954 "1: cmpb,<<,n %0,%2,1b\n"
955955 #endif
956− " fic,m %3(%4,%0)\n"
956+ " fdc,m %3(%4,%0)\n"
957957 "2: sync\n"
958958 ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
959959 : "+r" (start), "+r" (error)
@@ -968,7 +968,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes, · 8 unmodified lines
968968 #else
969969 "1: cmpb,<<,n %0,%2,1b\n"
970970 #endif
971− " fdc,m %3(%4,%0)\n"
971+ " fic,m %3(%4,%0)\n"
972972 "2: sync\n"
973973 ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
974974 : "+r" (start), "+r" (error)
arch/powerpc/Kconfig+2−2
@@ -573,8 +573,8 @@ config ARCH_USING_PATCHABLE_FUNCTION_ENTRY · 572 unmodified lines
573573 depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
574574 depends on $(cc-option,-fpatchable-function-entry=2)
575575 def_bool y if PPC32
576− def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
577− def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
576+ def_bool $(success,$(srctree)/arch/powerpc/tools/check-fpatchable-function-entry.sh $(CC) $(CLANG_FLAGS) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
577+ def_bool $(success,$(srctree)/arch/powerpc/tools/check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
578578
579579 config PPC_FTRACE_OUT_OF_LINE
580580 def_bool PPC64 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY
arch/powerpc/boot/dts/asp834x-redboot.dts+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 };
3838 };
3939
40− memory {
40+ memory@0 {
4141 device_type = "memory";
4242 reg = <0x00000000 0x8000000>; // 128MB at 0
4343 };
arch/powerpc/boot/dts/fsl/interlaken-lac-portals.dtsi+0−156
@@ -1,156 +0,0 @@
1−/* T4240 Interlaken LAC Portal device tree stub with 24 portals.
2− *
3− * Copyright 2012 Freescale Semiconductor Inc.
4− *
5− * Redistribution and use in source and binary forms, with or without
6− * modification, are permitted provided that the following conditions are met:
7− * * Redistributions of source code must retain the above copyright
8− * notice, this list of conditions and the following disclaimer.
9− * * Redistributions in binary form must reproduce the above copyright
10− * notice, this list of conditions and the following disclaimer in the
11− * documentation and/or other materials provided with the distribution.
12− * * Neither the name of Freescale Semiconductor nor the
13− * names of its contributors may be used to endorse or promote products
14− * derived from this software without specific prior written permission.
15− *
16− *
17− * ALTERNATIVELY, this software may be distributed under the terms of the
18− * GNU General Public License ("GPL") as published by the Free Software
19− * Foundation, either version 2 of that License or (at your option) any
20− * later version.
21− *
22− * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
23− * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24− * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25− * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
26− * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27− * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28− * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29− * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30− * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31− * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32− */
33−
34−#address-cells = <0x1>;
35−#size-cells = <0x1>;
36−compatible = "fsl,interlaken-lac-portals";
37−
38−lportal0: lac-portal@0 {
39− compatible = "fsl,interlaken-lac-portal-v1.0";
40− reg = <0x0 0x1000>;
41−};
42−
43−lportal1: lac-portal@1000 {
44− compatible = "fsl,interlaken-lac-portal-v1.0";
45− reg = <0x1000 0x1000>;
46−};
47−
48−lportal2: lac-portal@2000 {
49− compatible = "fsl,interlaken-lac-portal-v1.0";
50− reg = <0x2000 0x1000>;
51−};
52−
53−lportal3: lac-portal@3000 {
54− compatible = "fsl,interlaken-lac-portal-v1.0";
55− reg = <0x3000 0x1000>;
56−};
57−
58−lportal4: lac-portal@4000 {
59− compatible = "fsl,interlaken-lac-portal-v1.0";
60− reg = <0x4000 0x1000>;
61−};
62−
63−lportal5: lac-portal@5000 {
64− compatible = "fsl,interlaken-lac-portal-v1.0";
65− reg = <0x5000 0x1000>;
66−};
67−
68−lportal6: lac-portal@6000 {
69− compatible = "fsl,interlaken-lac-portal-v1.0";
70− reg = <0x6000 0x1000>;
71−};
72−
73−lportal7: lac-portal@7000 {
74− compatible = "fsl,interlaken-lac-portal-v1.0";
75− reg = <0x7000 0x1000>;
76−};
77−
78−lportal8: lac-portal@8000 {
79− compatible = "fsl,interlaken-lac-portal-v1.0";
80− reg = <0x8000 0x1000>;
81−};
82−
83−lportal9: lac-portal@9000 {
84− compatible = "fsl,interlaken-lac-portal-v1.0";
85− reg = <0x9000 0x1000>;
86−};
87−
88−lportal10: lac-portal@A000 {
89− compatible = "fsl,interlaken-lac-portal-v1.0";
90− reg = <0xA000 0x1000>;
91−};
92−
93−lportal11: lac-portal@B000 {
94− compatible = "fsl,interlaken-lac-portal-v1.0";
95− reg = <0xB000 0x1000>;
96−};
97−
98−lportal12: lac-portal@C000 {
99− compatible = "fsl,interlaken-lac-portal-v1.0";
100− reg = <0xC000 0x1000>;
101−};
102−
103−lportal13: lac-portal@D000 {
104− compatible = "fsl,interlaken-lac-portal-v1.0";
105− reg = <0xD000 0x1000>;
106−};
107−
108−lportal14: lac-portal@E000 {
109− compatible = "fsl,interlaken-lac-portal-v1.0";
110− reg = <0xE000 0x1000>;
111−};
112−
113−lportal15: lac-portal@F000 {
114− compatible = "fsl,interlaken-lac-portal-v1.0";
115− reg = <0xF000 0x1000>;
116−};
117−
118−lportal16: lac-portal@10000 {
119− compatible = "fsl,interlaken-lac-portal-v1.0";
120− reg = <0x10000 0x1000>;
121−};
122−
123−lportal17: lac-portal@11000 {
124− compatible = "fsl,interlaken-lac-portal-v1.0";
125− reg = <0x11000 0x1000>;
126−};
127−
128−lportal18: lac-portal@1200 {
129− compatible = "fsl,interlaken-lac-portal-v1.0";
130− reg = <0x12000 0x1000>;
131−};
132−
133−lportal19: lac-portal@13000 {
134− compatible = "fsl,interlaken-lac-portal-v1.0";
135− reg = <0x13000 0x1000>;
136−};
137−
138−lportal20: lac-portal@14000 {
139− compatible = "fsl,interlaken-lac-portal-v1.0";
140− reg = <0x14000 0x1000>;
141−};
142−
143−lportal21: lac-portal@15000 {
144− compatible = "fsl,interlaken-lac-portal-v1.0";
145− reg = <0x15000 0x1000>;
146−};
147−
148−lportal22: lac-portal@16000 {
149− compatible = "fsl,interlaken-lac-portal-v1.0";
150− reg = <0x16000 0x1000>;
151−};
152−
153−lportal23: lac-portal@17000 {
154− compatible = "fsl,interlaken-lac-portal-v1.0";
155− reg = <0x17000 0x1000>;
156−};
arch/powerpc/boot/dts/fsl/interlaken-lac.dtsi+0−45
@@ -1,45 +0,0 @@
1−/*
2− * T4 Interlaken Look-aside Controller (LAC) device tree stub
3− *
4− * Copyright 2012 Freescale Semiconductor Inc.
5− *
6− * Redistribution and use in source and binary forms, with or without
7− * modification, are permitted provided that the following conditions are met:
8− * * Redistributions of source code must retain the above copyright
9− * notice, this list of conditions and the following disclaimer.
10− * * Redistributions in binary form must reproduce the above copyright
11− * notice, this list of conditions and the following disclaimer in the
12− * documentation and/or other materials provided with the distribution.
13− * * Neither the name of Freescale Semiconductor nor the
14− * names of its contributors may be used to endorse or promote products
15− * derived from this software without specific prior written permission.
16− *
17− *
18− * ALTERNATIVELY, this software may be distributed under the terms of the
19− * GNU General Public License ("GPL") as published by the Free Software
20− * Foundation, either version 2 of that License or (at your option) any
21− * later version.
22− *
23− * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
24− * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25− * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26− * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27− * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28− * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29− * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30− * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31− * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32− * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33− */
34−
35−lac: lac@229000 {
36− compatible = "fsl,interlaken-lac";
37− reg = <0x229000 0x1000>;
38− interrupts = <16 2 1 18>;
39−};
40−
41−lac-hv@228000 {
42− compatible = "fsl,interlaken-lac-hv";
43− reg = <0x228000 0x1000>;
44− fsl,non-hv-node = <&lac>;
45−};
arch/powerpc/boot/dts/fsl/pq3-mpic-message-B.dtsi+0−43
@@ -1,43 +0,0 @@
1−/*
2− * PQ3 MPIC Message (Group B) device tree stub [ controller @ offset 0x42400 ]
3− *
4− * Copyright 2012 Freescale Semiconductor Inc.
5− *
6− * Redistribution and use in source and binary forms, with or without
7− * modification, are permitted provided that the following conditions are met:
8− * * Redistributions of source code must retain the above copyright
9− * notice, this list of conditions and the following disclaimer.
10− * * Redistributions in binary form must reproduce the above copyright
11− * notice, this list of conditions and the following disclaimer in the
12− * documentation and/or other materials provided with the distribution.
13− * * Neither the name of Freescale Semiconductor nor the
14− * names of its contributors may be used to endorse or promote products
15− * derived from this software without specific prior written permission.
16− *
17− *
18− * ALTERNATIVELY, this software may be distributed under the terms of the
19− * GNU General Public License ("GPL") as published by the Free Software
20− * Foundation, either version 2 of that License or (at your option) any
21− * later version.
22− *
23− * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24− * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25− * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26− * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27− * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28− * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29− * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30− * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31− * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32− * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33− */
34−
35−message@42400 {
36− compatible = "fsl,mpic-v3.1-msgr";
37− reg = <0x42400 0x200>;
38− interrupts = <
39− 0xb4 2 0 0
40− 0xb5 2 0 0
41− 0xb6 2 0 0
42− 0xb7 2 0 0>;
43−};
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi+0−80
@@ -1,80 +0,0 @@
1−/*
2− * QorIQ FMan v3 1g port #1 device tree stub [ controller @ offset 0x400000 ]
3− *
4− * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5− *
6− * Redistribution and use in source and binary forms, with or without
7− * modification, are permitted provided that the following conditions are met:
8− * * Redistributions of source code must retain the above copyright
9− * notice, this list of conditions and the following disclaimer.
10− * * Redistributions in binary form must reproduce the above copyright
11− * notice, this list of conditions and the following disclaimer in the
12− * documentation and/or other materials provided with the distribution.
13− * * Neither the name of Freescale Semiconductor nor the
14− * names of its contributors may be used to endorse or promote products
15− * derived from this software without specific prior written permission.
16− *
17− *
18− * ALTERNATIVELY, this software may be distributed under the terms of the
19− * GNU General Public License ("GPL") as published by the Free Software
20− * Foundation, either version 2 of that License or (at your option) any
21− * later version.
22− *
23− * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24− * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25− * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26− * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27− * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28− * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29− * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30− * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31− * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32− * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33− */
34−
35−fman@400000 {
36− fman0_rx_0x09: port@89000 {
37− cell-index = <0x9>;
38− compatible = "fsl,fman-v3-port-rx";
39− reg = <0x89000 0x1000>;
40− fsl,fman-10g-port;
41− fsl,fman-best-effort-port;
42− };
43−
44− fman0_tx_0x29: port@a9000 {
45− cell-index = <0x29>;
46− compatible = "fsl,fman-v3-port-tx";
47− reg = <0xa9000 0x1000>;
48− fsl,fman-10g-port;
49− fsl,fman-best-effort-port;
50− };
51−
52− ethernet@e2000 {
53− cell-index = <1>;
54− compatible = "fsl,fman-memac";
55− reg = <0xe2000 0x1000>;
56− fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
57− ptp-timer = <&ptp_timer0>;
58− pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
59− pcs-handle-names = "sgmii", "qsgmii";
60− };
61−
62− mdio@e1000 {
63− qsgmiia_pcs1: ethernet-pcs@1 {
64− compatible = "fsl,lynx-pcs";
65− reg = <1>;
66− };
67− };
68−
69− mdio@e3000 {
70− #address-cells = <1>;
71− #size-cells = <0>;
72− compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
73− reg = <0xe3000 0x1000>;
74− fsl,erratum-a011043; /* must ignore read errors */
75−
76− pcsphy1: ethernet-phy@0 {
77− reg = <0x0>;
78− };
79− };
80−};
arch/powerpc/boot/dts/mpc8308_p1m.dts+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 };
3838 };
3939
40− memory {
40+ memory@0 {
4141 device_type = "memory";
4242 reg = <0x00000000 0x08000000>; // 128MB at 0
4343 };
arch/powerpc/boot/dts/mpc8308rdb.dts+1−1
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838 };
3939 };
4040
41− memory {
41+ memory@0 {
4242 device_type = "memory";
4343 reg = <0x00000000 0x08000000>; // 128MB at 0
4444 };
arch/powerpc/boot/dts/mpc8313erdb.dts+35−26
@@ -6,6 +6,7 @@ · 5 unmodified lines
66 */
77
88 /dts-v1/;
9+#include <dt-bindings/interrupt-controller/irq.h>
910
1011 / {
1112 model = "MPC8313ERDB";
@@ -38,7 +39,7 @@ · 26 unmodified lines
3839 };
3940 };
4041
41− memory {
42+ memory@0 {
4243 device_type = "memory";
4344 reg = <0x00000000 0x08000000>; // 128MB at 0
4445 };
@@ -48,7 +49,7 @@ · 3 unmodified lines
4849 #size-cells = <1>;
4950 compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
5051 reg = <0xe0005000 0x1000>;
51− interrupts = <77 0x8>;
52+ interrupts = <77 IRQ_TYPE_LEVEL_LOW>;
5253 interrupt-parent = <&ipic>;
5354
5455 // CS0 and CS1 are swapped when
@@ -118,7 +119,7 @@ · 63 unmodified lines
118119 cell-index = <0>;
119120 compatible = "fsl-i2c";
120121 reg = <0x3000 0x100>;
121− interrupts = <14 0x8>;
122+ interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
122123 interrupt-parent = <&ipic>;
123124 dfsrr;
124125 rtc@68 {
@@ -131,7 +132,7 @@ · 6 unmodified lines
131132 compatible = "fsl,sec2.2", "fsl,sec2.1",
132133 "fsl,sec2.0";
133134 reg = <0x30000 0x10000>;
134− interrupts = <11 0x8>;
135+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
135136 interrupt-parent = <&ipic>;
136137 fsl,num-channels = <1>;
137138 fsl,channel-fifo-len = <24>;
@@ -146,7 +147,7 @@ · 8 unmodified lines
146147 cell-index = <1>;
147148 compatible = "fsl-i2c";
148149 reg = <0x3100 0x100>;
149− interrupts = <15 0x8>;
150+ interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
150151 interrupt-parent = <&ipic>;
151152 dfsrr;
152153 };
@@ -155,7 +156,7 @@ · 2 unmodified lines
155156 cell-index = <0>;
156157 compatible = "fsl,spi";
157158 reg = <0x7000 0x1000>;
158− interrupts = <16 0x8>;
159+ interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
159160 interrupt-parent = <&ipic>;
160161 mode = "cpu";
161162 };
@@ -167,7 +168,7 @@ · 5 unmodified lines
167168 #address-cells = <1>;
168169 #size-cells = <0>;
169170 interrupt-parent = <&ipic>;
170− interrupts = <38 0x8>;
171+ interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
171172 phy_type = "utmi_wide";
172173 sleep = <&pmc 0x00300000>;
173174 };
@@ -175,7 +176,8 @@ · 1 unmodified line
175176 ptp_clock@24E00 {
176177 compatible = "fsl,etsec-ptp";
177178 reg = <0x24E00 0xB0>;
178− interrupts = <12 0x8 13 0x8>;
179+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>,
180+ <13 IRQ_TYPE_LEVEL_LOW>;
179181 interrupt-parent = < &ipic >;
180182 fsl,tclk-period = <10>;
181183 fsl,tmr-prsc = <100>;
@@ -197,7 +199,9 @@ · 15 unmodified lines
197199 compatible = "gianfar";
198200 reg = <0x24000 0x1000>;
199201 local-mac-address = [ 00 00 00 00 00 00 ];
200− interrupts = <37 0x8 36 0x8 35 0x8>;
202+ interrupts = <37 IRQ_TYPE_LEVEL_LOW>,
203+ <36 IRQ_TYPE_LEVEL_LOW>,
204+ <35 IRQ_TYPE_LEVEL_LOW>;
201205 interrupt-parent = <&ipic>;
202206 tbi-handle = < &tbi0 >;
203207 /* Vitesse 7385 isn't on the MDIO bus */
@@ -211,7 +215,7 @@ · 7 unmodified lines
211215 reg = <0x520 0x20>;
212216 phy4: ethernet-phy@4 {
213217 interrupt-parent = <&ipic>;
214− interrupts = <20 0x8>;
218+ interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
215219 reg = <0x4>;
216220 };
217221 tbi0: tbi-phy@11 {
@@ -231,7 +235,9 @@ · 13 unmodified lines
231235 reg = <0x25000 0x1000>;
232236 ranges = <0x0 0x25000 0x1000>;
233237 local-mac-address = [ 00 00 00 00 00 00 ];
234− interrupts = <34 0x8 33 0x8 32 0x8>;
238+ interrupts = <34 IRQ_TYPE_LEVEL_LOW>,
239+ <33 IRQ_TYPE_LEVEL_LOW>,
240+ <32 IRQ_TYPE_LEVEL_LOW>;
235241 interrupt-parent = <&ipic>;
236242 tbi-handle = < &tbi1 >;
237243 phy-handle = < &phy4 >;
@@ -259,7 +265,7 @@ · 21 unmodified lines
259265 compatible = "fsl,ns16550", "ns16550";
260266 reg = <0x4500 0x100>;
261267 clock-frequency = <0>;
262− interrupts = <9 0x8>;
268+ interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
263269 interrupt-parent = <&ipic>;
264270 };
265271
@@ -269,15 +275,12 @@ · 3 unmodified lines
269275 compatible = "fsl,ns16550", "ns16550";
270276 reg = <0x4600 0x100>;
271277 clock-frequency = <0>;
272− interrupts = <10 0x8>;
278+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
273279 interrupt-parent = <&ipic>;
274280 };
275281
276282 /* IPIC
277− * interrupts cell = <intr #, sense>
278− * sense values match linux IORESOURCE_IRQ_* defines:
279− * sense == 8: Level, low assertion
280− * sense == 2: Edge, high-to-low change
283+ * interrupts cell = <intr #, type>
281284 */
282285 ipic: pic@700 {
283286 interrupt-controller;
@@ -290,7 +293,7 @@ · 6 unmodified lines
290293 pmc: power@b00 {
291294 compatible = "fsl,mpc8313-pmc", "fsl,mpc8349-pmc";
292295 reg = <0xb00 0x100 0xa00 0x100>;
293− interrupts = <80 8>;
296+ interrupts = <80 IRQ_TYPE_LEVEL_LOW>;
294297 interrupt-parent = <&ipic>;
295298 fsl,mpc8313-wakeup-timer = <&gtm1>;
296299
@@ -306,14 +309,20 @@ · 9 unmodified lines
306309 gtm1: timer@500 {
307310 compatible = "fsl,mpc8313-gtm", "fsl,gtm";
308311 reg = <0x500 0x100>;
309− interrupts = <90 8 78 8 84 8 72 8>;
312+ interrupts = <90 IRQ_TYPE_LEVEL_LOW>,
313+ <78 IRQ_TYPE_LEVEL_LOW>,
314+ <84 IRQ_TYPE_LEVEL_LOW>,
315+ <72 IRQ_TYPE_LEVEL_LOW>;
310316 interrupt-parent = <&ipic>;
311317 };
312318
313319 timer@600 {
314320 compatible = "fsl,mpc8313-gtm", "fsl,gtm";
315321 reg = <0x600 0x100>;
316− interrupts = <91 8 79 8 85 8 73 8>;
322+ interrupts = <91 IRQ_TYPE_LEVEL_LOW>,
323+ <79 IRQ_TYPE_LEVEL_LOW>,
324+ <85 IRQ_TYPE_LEVEL_LOW>,
325+ <73 IRQ_TYPE_LEVEL_LOW>;
317326 interrupt-parent = <&ipic>;
318327 };
319328 };
@@ -341,7 +350,7 @@ · 21 unmodified lines
341350 0x7800 0x0 0x0 0x3 &ipic 17 0x8
342351 0x7800 0x0 0x0 0x4 &ipic 18 0x8>;
343352 interrupt-parent = <&ipic>;
344− interrupts = <66 0x8>;
353+ interrupts = <66 IRQ_TYPE_LEVEL_LOW>;
345354 bus-range = <0x0 0x0>;
346355 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
347356 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
@@ -363,14 +372,14 @@ · 15 unmodified lines
363372 reg = <0xe00082a8 4>;
364373 ranges = <0 0xe0008100 0x1a8>;
365374 interrupt-parent = <&ipic>;
366− interrupts = <71 8>;
375+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
367376
368377 dma-channel@0 {
369378 compatible = "fsl,mpc8313-dma-channel",
370379 "fsl,elo-dma-channel";
371380 reg = <0 0x28>;
372381 interrupt-parent = <&ipic>;
373− interrupts = <71 8>;
382+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
374383 cell-index = <0>;
375384 };
376385
@@ -379,7 +388,7 @@ · 2 unmodified lines
379388 "fsl,elo-dma-channel";
380389 reg = <0x80 0x28>;
381390 interrupt-parent = <&ipic>;
382− interrupts = <71 8>;
391+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
383392 cell-index = <1>;
384393 };
385394
@@ -388,7 +397,7 @@ · 2 unmodified lines
388397 "fsl,elo-dma-channel";
389398 reg = <0x100 0x28>;
390399 interrupt-parent = <&ipic>;
391− interrupts = <71 8>;
400+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
392401 cell-index = <2>;
393402 };
394403
@@ -397,7 +406,7 @@ · 2 unmodified lines
397406 "fsl,elo-dma-channel";
398407 reg = <0x180 0x28>;
399408 interrupt-parent = <&ipic>;
400− interrupts = <71 8>;
409+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
401410 cell-index = <3>;
402411 };
403412 };
arch/powerpc/boot/dts/mpc8315erdb.dts+64−55
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 };
4141 };
4242
43− memory {
43+ memory@0 {
4444 device_type = "memory";
4545 reg = <0x00000000 0x08000000>; // 128MB at 0
4646 };
@@ -50,7 +50,7 @@ · 3 unmodified lines
5050 #size-cells = <1>;
5151 compatible = "fsl,mpc8315-elbc", "fsl,elbc", "simple-bus";
5252 reg = <0xe0005000 0x1000>;
53− interrupts = <77 0x8>;
53+ interrupts = <77 IRQ_TYPE_LEVEL_LOW>;
5454 interrupt-parent = <&ipic>;
5555
5656 // CS0 and CS1 are swapped when
@@ -112,7 +112,7 @@ · 55 unmodified lines
112112 cell-index = <0>;
113113 compatible = "fsl-i2c";
114114 reg = <0x3000 0x100>;
115− interrupts = <14 0x8>;
115+ interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
116116 interrupt-parent = <&ipic>;
117117 dfsrr;
118118 rtc@68 {
@@ -133,8 +133,10 @@ · 14 unmodified lines
133133 cell-index = <0>;
134134 compatible = "fsl,spi";
135135 reg = <0x7000 0x1000>;
136− interrupts = <16 0x8>;
136+ interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
137137 interrupt-parent = <&ipic>;
138+ #address-cells = <1>;
139+ #size-cells = <0>;
138140 mode = "cpu";
139141 };
140142
@@ -145,35 +147,35 @@ · 4 unmodified lines
145147 reg = <0x82a8 4>;
146148 ranges = <0 0x8100 0x1a8>;
147149 interrupt-parent = <&ipic>;
148− interrupts = <71 8>;
150+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
149151 cell-index = <0>;
150152 dma-channel@0 {
151153 compatible = "fsl,mpc8315-dma-channel", "fsl,elo-dma-channel";
152154 reg = <0 0x80>;
153155 cell-index = <0>;
154156 interrupt-parent = <&ipic>;
155− interrupts = <71 8>;
157+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
156158 };
157159 dma-channel@80 {
158160 compatible = "fsl,mpc8315-dma-channel", "fsl,elo-dma-channel";
159161 reg = <0x80 0x80>;
160162 cell-index = <1>;
161163 interrupt-parent = <&ipic>;
162− interrupts = <71 8>;
164+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
163165 };
164166 dma-channel@100 {
165167 compatible = "fsl,mpc8315-dma-channel", "fsl,elo-dma-channel";
166168 reg = <0x100 0x80>;
167169 cell-index = <2>;
168170 interrupt-parent = <&ipic>;
169− interrupts = <71 8>;
171+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
170172 };
171173 dma-channel@180 {
172174 compatible = "fsl,mpc8315-dma-channel", "fsl,elo-dma-channel";
173175 reg = <0x180 0x28>;
174176 cell-index = <3>;
175177 interrupt-parent = <&ipic>;
176− interrupts = <71 8>;
178+ interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
177179 };
178180 };
179181
@@ -183,7 +185,7 @@ · 3 unmodified lines
183185 #address-cells = <1>;
184186 #size-cells = <0>;
185187 interrupt-parent = <&ipic>;
186− interrupts = <38 0x8>;
188+ interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
187189 phy_type = "utmi";
188190 };
189191
@@ -197,7 +199,9 @@ · 7 unmodified lines
197199 reg = <0x24000 0x1000>;
198200 ranges = <0x0 0x24000 0x1000>;
199201 local-mac-address = [ 00 00 00 00 00 00 ];
200− interrupts = <32 0x8 33 0x8 34 0x8>;
202+ interrupts = <32 IRQ_TYPE_LEVEL_LOW>,
203+ <33 IRQ_TYPE_LEVEL_LOW>,
204+ <34 IRQ_TYPE_LEVEL_LOW>;
201205 interrupt-parent = <&ipic>;
202206 tbi-handle = <&tbi0>;
203207 phy-handle = < &phy0 >;
@@ -238,7 +242,9 @@ · 34 unmodified lines
238242 reg = <0x25000 0x1000>;
239243 ranges = <0x0 0x25000 0x1000>;
240244 local-mac-address = [ 00 00 00 00 00 00 ];
241− interrupts = <35 0x8 36 0x8 37 0x8>;
245+ interrupts = <35 IRQ_TYPE_LEVEL_LOW>,
246+ <36 IRQ_TYPE_LEVEL_LOW>,
247+ <37 IRQ_TYPE_LEVEL_LOW>;
242248 interrupt-parent = <&ipic>;
243249 tbi-handle = <&tbi1>;
244250 phy-handle = < &phy1 >;
@@ -263,7 +269,7 @@ · 18 unmodified lines
263269 compatible = "fsl,ns16550", "ns16550";
264270 reg = <0x4500 0x100>;
265271 clock-frequency = <133333333>;
266− interrupts = <9 0x8>;
272+ interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
267273 interrupt-parent = <&ipic>;
268274 };
269275
@@ -273,7 +279,7 @@ · 3 unmodified lines
273279 compatible = "fsl,ns16550", "ns16550";
274280 reg = <0x4600 0x100>;
275281 clock-frequency = <133333333>;
276− interrupts = <10 0x8>;
282+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
277283 interrupt-parent = <&ipic>;
278284 };
279285
@@ -282,7 +288,7 @@ · 2 unmodified lines
282288 "fsl,sec2.4", "fsl,sec2.2", "fsl,sec2.1",
283289 "fsl,sec2.0";
284290 reg = <0x30000 0x10000>;
285− interrupts = <11 0x8>;
291+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
286292 interrupt-parent = <&ipic>;
287293 fsl,num-channels = <4>;
288294 fsl,channel-fifo-len = <24>;
@@ -294,7 +300,7 @@ · 5 unmodified lines
294300 compatible = "fsl,mpc8315-sata", "fsl,pq-sata";
295301 reg = <0x18000 0x1000>;
296302 cell-index = <1>;
297− interrupts = <44 0x8>;
303+ interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
298304 interrupt-parent = <&ipic>;
299305 };
300306
@@ -302,14 +308,17 @@ · 1 unmodified line
302308 compatible = "fsl,mpc8315-sata", "fsl,pq-sata";
303309 reg = <0x19000 0x1000>;
304310 cell-index = <2>;
305− interrupts = <45 0x8>;
311+ interrupts = <45 IRQ_TYPE_LEVEL_LOW>;
306312 interrupt-parent = <&ipic>;
307313 };
308314
309315 gtm1: timer@500 {
310316 compatible = "fsl,mpc8315-gtm", "fsl,gtm";
311317 reg = <0x500 0x100>;
312− interrupts = <90 8 78 8 84 8 72 8>;
318+ interrupts = <90 IRQ_TYPE_LEVEL_LOW>,
319+ <78 IRQ_TYPE_LEVEL_LOW>,
320+ <84 IRQ_TYPE_LEVEL_LOW>,
321+ <72 IRQ_TYPE_LEVEL_LOW>;
313322 interrupt-parent = <&ipic>;
314323 clock-frequency = <133333333>;
315324 };
@@ -317,16 +326,16 @@ · 1 unmodified line
317326 timer@600 {
318327 compatible = "fsl,mpc8315-gtm", "fsl,gtm";
319328 reg = <0x600 0x100>;
320− interrupts = <91 8 79 8 85 8 73 8>;
329+ interrupts = <91 IRQ_TYPE_LEVEL_LOW>,
330+ <79 IRQ_TYPE_LEVEL_LOW>,
331+ <85 IRQ_TYPE_LEVEL_LOW>,
332+ <73 IRQ_TYPE_LEVEL_LOW>;
321333 interrupt-parent = <&ipic>;
322334 clock-frequency = <133333333>;
323335 };
324336
325337 /* IPIC
326− * interrupts cell = <intr #, sense>
327− * sense values match linux IORESOURCE_IRQ_* defines:
328− * sense == 8: Level, low assertion
329− * sense == 2: Edge, high-to-low change
338+ * interrupts cell = <intr #, type>
330339 */
331340 ipic: interrupt-controller@700 {
332341 interrupt-controller;
@@ -340,14 +349,14 @@ · 7 unmodified lines
340349 compatible = "fsl,ipic-msi";
341350 reg = <0x7c0 0x40>;
342351 msi-available-ranges = <0 0x100>;
343− interrupts = <0x43 0x8
344− 0x4 0x8
345− 0x51 0x8
346− 0x52 0x8
347− 0x56 0x8
348− 0x57 0x8
349− 0x58 0x8
350− 0x59 0x8>;
352+ interrupts = <0x43 IRQ_TYPE_LEVEL_LOW
353+ 0x4 IRQ_TYPE_LEVEL_LOW
354+ 0x51 IRQ_TYPE_LEVEL_LOW
355+ 0x52 IRQ_TYPE_LEVEL_LOW
356+ 0x56 IRQ_TYPE_LEVEL_LOW
357+ 0x57 IRQ_TYPE_LEVEL_LOW
358+ 0x58 IRQ_TYPE_LEVEL_LOW
359+ 0x59 IRQ_TYPE_LEVEL_LOW>;
351360 interrupt-parent = < &ipic >;
352361 };
353362
@@ -355,7 +364,7 @@ · 1 unmodified line
355364 compatible = "fsl,mpc8315-pmc", "fsl,mpc8313-pmc",
356365 "fsl,mpc8349-pmc";
357366 reg = <0xb00 0x100 0xa00 0x100>;
358− interrupts = <80 8>;
367+ interrupts = <80 IRQ_TYPE_LEVEL_LOW>;
359368 interrupt-parent = <&ipic>;
360369 fsl,mpc8313-wakeup-timer = <&gtm1>;
361370 };
@@ -374,24 +383,24 @@ · 12 unmodified lines
374383 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
375384 interrupt-map = <
376385 /* IDSEL 0x0E -mini PCI */
377− 0x7000 0x0 0x0 0x1 &ipic 18 0x8
378− 0x7000 0x0 0x0 0x2 &ipic 18 0x8
379− 0x7000 0x0 0x0 0x3 &ipic 18 0x8
380− 0x7000 0x0 0x0 0x4 &ipic 18 0x8
386+ 0x7000 0x0 0x0 0x1 &ipic 18 IRQ_TYPE_LEVEL_LOW
387+ 0x7000 0x0 0x0 0x2 &ipic 18 IRQ_TYPE_LEVEL_LOW
388+ 0x7000 0x0 0x0 0x3 &ipic 18 IRQ_TYPE_LEVEL_LOW
389+ 0x7000 0x0 0x0 0x4 &ipic 18 IRQ_TYPE_LEVEL_LOW
381390
382391 /* IDSEL 0x0F -mini PCI */
383− 0x7800 0x0 0x0 0x1 &ipic 17 0x8
384− 0x7800 0x0 0x0 0x2 &ipic 17 0x8
385− 0x7800 0x0 0x0 0x3 &ipic 17 0x8
386− 0x7800 0x0 0x0 0x4 &ipic 17 0x8
392+ 0x7800 0x0 0x0 0x1 &ipic 17 IRQ_TYPE_LEVEL_LOW
393+ 0x7800 0x0 0x0 0x2 &ipic 17 IRQ_TYPE_LEVEL_LOW
394+ 0x7800 0x0 0x0 0x3 &ipic 17 IRQ_TYPE_LEVEL_LOW
395+ 0x7800 0x0 0x0 0x4 &ipic 17 IRQ_TYPE_LEVEL_LOW
387396
388397 /* IDSEL 0x10 - PCI slot */
389− 0x8000 0x0 0x0 0x1 &ipic 48 0x8
390− 0x8000 0x0 0x0 0x2 &ipic 17 0x8
391− 0x8000 0x0 0x0 0x3 &ipic 48 0x8
392− 0x8000 0x0 0x0 0x4 &ipic 17 0x8>;
398+ 0x8000 0x0 0x0 0x1 &ipic 48 IRQ_TYPE_LEVEL_LOW
399+ 0x8000 0x0 0x0 0x2 &ipic 17 IRQ_TYPE_LEVEL_LOW
400+ 0x8000 0x0 0x0 0x3 &ipic 48 IRQ_TYPE_LEVEL_LOW
401+ 0x8000 0x0 0x0 0x4 &ipic 17 IRQ_TYPE_LEVEL_LOW>;
393402 interrupt-parent = <&ipic>;
394− interrupts = <66 0x8>;
403+ interrupts = <66 IRQ_TYPE_LEVEL_LOW>;
395404 bus-range = <0x0 0x0>;
396405 ranges = <0x02000000 0 0x90000000 0x90000000 0 0x10000000
397406 0x42000000 0 0x80000000 0x80000000 0 0x10000000
@@ -417,10 +426,10 @@ · 19 unmodified lines
417426 0x01000000 0 0x00000000 0xb1000000 0 0x00800000>;
418427 bus-range = <0 255>;
419428 interrupt-map-mask = <0xf800 0 0 7>;
420− interrupt-map = <0 0 0 1 &ipic 1 8
421− 0 0 0 2 &ipic 1 8
422− 0 0 0 3 &ipic 1 8
423− 0 0 0 4 &ipic 1 8>;
429+ interrupt-map = <0 0 0 1 &ipic 1 IRQ_TYPE_LEVEL_LOW
430+ 0 0 0 2 &ipic 1 IRQ_TYPE_LEVEL_LOW
431+ 0 0 0 3 &ipic 1 IRQ_TYPE_LEVEL_LOW
432+ 0 0 0 4 &ipic 1 IRQ_TYPE_LEVEL_LOW>;
424433 clock-frequency = <0>;
425434
426435 pcie@0 {
@@ -448,10 +457,10 @@ · 21 unmodified lines
448457 0x01000000 0 0x00000000 0xd1000000 0 0x00800000>;
449458 bus-range = <0 255>;
450459 interrupt-map-mask = <0xf800 0 0 7>;
451− interrupt-map = <0 0 0 1 &ipic 2 8
452− 0 0 0 2 &ipic 2 8
453− 0 0 0 3 &ipic 2 8
454− 0 0 0 4 &ipic 2 8>;
460+ interrupt-map = <0 0 0 1 &ipic 2 IRQ_TYPE_LEVEL_LOW
461+ 0 0 0 2 &ipic 2 IRQ_TYPE_LEVEL_LOW
462+ 0 0 0 3 &ipic 2 IRQ_TYPE_LEVEL_LOW
463+ 0 0 0 4 &ipic 2 IRQ_TYPE_LEVEL_LOW>;
455464 clock-frequency = <0>;
456465
457466 pcie@0 {
@@ -471,12 +480,12 @@ · 13 unmodified lines
471480 leds {
472481 compatible = "gpio-leds";
473482
474− pwr {
483+ led-pwr {
475484 gpios = <&mcu_pio 0 0>;
476485 default-state = "on";
477486 };
478487
479− hdd {
488+ led-hdd {
480489 gpios = <&mcu_pio 1 0>;
481490 linux,default-trigger = "disk-activity";
482491 };
arch/powerpc/boot/dts/mpc832x_rdb.dts+1−1
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838 };
3939 };
4040
41− memory {
41+ memory@0 {
4242 device_type = "memory";
4343 reg = <0x00000000 0x04000000>;
4444 };
arch/powerpc/boot/dts/mpc8349emitx.dts+1−1
@@ -39,7 +39,7 @@ · 38 unmodified lines
3939 };
4040 };
4141
42− memory {
42+ memory@0 {
4343 device_type = "memory";
4444 reg = <0x00000000 0x10000000>;
4545 };
arch/powerpc/boot/dts/mpc8349emitxgp.dts+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 };
3838 };
3939
40− memory {
40+ memory@0 {
4141 device_type = "memory";
4242 reg = <0x00000000 0x10000000>;
4343 };
arch/powerpc/boot/dts/mpc8377_rdb.dts+1−1
@@ -39,7 +39,7 @@ · 38 unmodified lines
3939 };
4040 };
4141
42− memory {
42+ memory@0 {
4343 device_type = "memory";
4444 reg = <0x00000000 0x10000000>; // 256MB at 0
4545 };
arch/powerpc/boot/dts/mpc8377_wlan.dts+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 };
4141 };
4242
43− memory {
43+ memory@0 {
4444 device_type = "memory";
4545 reg = <0x00000000 0x20000000>; // 512MB at 0
4646 };
arch/powerpc/boot/dts/mpc8378_rdb.dts+1−1
@@ -39,7 +39,7 @@ · 38 unmodified lines
3939 };
4040 };
4141
42− memory {
42+ memory@0 {
4343 device_type = "memory";
4444 reg = <0x00000000 0x10000000>; // 256MB at 0
4545 };
arch/powerpc/boot/dts/mpc8379_rdb.dts+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 };
3838 };
3939
40− memory {
40+ memory@0 {
4141 device_type = "memory";
4242 reg = <0x00000000 0x10000000>; // 256MB at 0
4343 };
arch/powerpc/include/asm/nohash/32/pgtable.h+1−3
@@ -120,10 +120,8 @@ · 119 unmodified lines
120120
121121 #if defined(CONFIG_44x)
122122 #include <asm/nohash/32/pte-44x.h>
123−#elif defined(CONFIG_PPC_85xx) && defined(CONFIG_PTE_64BIT)
124−#include <asm/nohash/pte-e500.h>
125123 #elif defined(CONFIG_PPC_85xx)
126−#include <asm/nohash/32/pte-85xx.h>
124+#include <asm/nohash/pte-e500.h>
127125 #elif defined(CONFIG_PPC_8xx)
128126 #include <asm/nohash/32/pte-8xx.h>
129127 #endif
arch/powerpc/include/asm/nohash/32/pte-85xx.h+0−59
@@ -1,59 +0,0 @@
1−/* SPDX-License-Identifier: GPL-2.0 */
2−#ifndef _ASM_POWERPC_NOHASH_32_PTE_85xx_H
3−#define _ASM_POWERPC_NOHASH_32_PTE_85xx_H
4−#ifdef __KERNEL__
5−
6−/* PTE bit definitions for Freescale BookE SW loaded TLB MMU based
7− * processors
8− *
9− MMU Assist Register 3:
10−
11− 32 33 34 35 36 ... 50 51 52 53 54 55 56 57 58 59 60 61 62 63
12− RPN...................... 0 0 U0 U1 U2 U3 UX SX UW SW UR SR
13−
14− - PRESENT *must* be in the bottom two bits because swap PTEs use
15− the top 30 bits.
16−
17−*/
18−
19−/* Definitions for FSL Book-E Cores */
20−#define _PAGE_READ 0x00001 /* H: Read permission (SR) */
21−#define _PAGE_PRESENT 0x00002 /* S: PTE contains a translation */
22−#define _PAGE_WRITE 0x00004 /* S: Write permission (SW) */
23−#define _PAGE_DIRTY 0x00008 /* S: Page dirty */
24−#define _PAGE_EXEC 0x00010 /* H: SX permission */
25−#define _PAGE_ACCESSED 0x00020 /* S: Page referenced */
26−
27−#define _PAGE_ENDIAN 0x00040 /* H: E bit */
28−#define _PAGE_GUARDED 0x00080 /* H: G bit */
29−#define _PAGE_COHERENT 0x00100 /* H: M bit */
30−#define _PAGE_NO_CACHE 0x00200 /* H: I bit */
31−#define _PAGE_WRITETHRU 0x00400 /* H: W bit */
32−#define _PAGE_SPECIAL 0x00800 /* S: Special page */
33−
34−#define _PMD_PRESENT 0
35−#define _PMD_PRESENT_MASK (PAGE_MASK)
36−#define _PMD_BAD (~PAGE_MASK)
37−#define _PMD_USER 0
38−
39−#define _PTE_NONE_MASK 0
40−
41−#define PTE_WIMGE_SHIFT (6)
42−
43−/*
44− * We define 2 sets of base prot bits, one for basic pages (ie,
45− * cacheable kernel and user pages) and one for non cacheable
46− * pages. We always set _PAGE_COHERENT when SMP is enabled or
47− * the processor might need it for DMA coherency.
48− */
49−#define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED)
50−#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
51−#define _PAGE_BASE (_PAGE_BASE_NC | _PAGE_COHERENT)
52−#else
53−#define _PAGE_BASE (_PAGE_BASE_NC)
54−#endif
55−
56−#include <asm/pgtable-masks.h>
57−
58−#endif /* __KERNEL__ */
59−#endif /* _ASM_POWERPC_NOHASH_32_PTE_FSL_85xx_H */
arch/powerpc/include/asm/pgtable-types.h+1−1
@@ -49,7 +49,7 @@ static inline unsigned long pud_val(pud_t x) · 48 unmodified lines
4949 #endif /* CONFIG_PPC64 */
5050
5151 /* PGD level */
52−#if defined(CONFIG_PPC_85xx) && defined(CONFIG_PTE_64BIT)
52+#if defined(CONFIG_PPC_85xx)
5353 typedef struct { unsigned long long pgd; } pgd_t;
5454
5555 static inline unsigned long long pgd_val(pgd_t x)
arch/powerpc/include/asm/uaccess.h+46−21
@@ -15,6 +15,9 @@ · 14 unmodified lines
1515 #define TASK_SIZE_MAX TASK_SIZE_USER64
1616 #endif
1717
18+/* Threshold above which VMX copy path is used */
19+#define VMX_COPY_THRESHOLD 3328
20+
1821 #include <asm-generic/access_ok.h>
1922
2023 /*
@@ -255,7 +258,7 @@ __gus_failed: \ · 234 unmodified lines
255258 ".section .fixup,\"ax\"\n" \
256259 "4: li %0,%3\n" \
257260 " li %1,0\n" \
258− " li %1+1,0\n" \
261+ " li %L1,0\n" \
259262 " b 3b\n" \
260263 ".previous\n" \
261264 EX_TABLE(1b, 4b) \
@@ -326,40 +329,62 @@ do { \ · 64 unmodified lines
326329 extern unsigned long __copy_tofrom_user(void __user *to,
327330 const void __user *from, unsigned long size);
328331
329−#ifdef __powerpc64__
330−static inline unsigned long
331−raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
332+unsigned long __copy_tofrom_user_base(void __user *to,
333+ const void __user *from, unsigned long size);
334+
335+unsigned long __copy_tofrom_user_power7_vmx(void __user *to,
336+ const void __user *from, unsigned long size);
337+
338+static __always_inline bool will_use_vmx(unsigned long n)
339+{
340+ return IS_ENABLED(CONFIG_ALTIVEC) && cpu_has_feature(CPU_FTR_VMX_COPY) &&
341+ n > VMX_COPY_THRESHOLD;
342+}
343+
344+static __always_inline unsigned long
345+raw_copy_tofrom_user(void __user *to, const void __user *from,
346+ unsigned long n, unsigned long dir)
332347 {
333348 unsigned long ret;
334349
335− barrier_nospec();
336− allow_user_access(to, KUAP_READ_WRITE);
350+ if (will_use_vmx(n) && enter_vmx_usercopy()) {
351+ allow_user_access(to, dir);
352+ ret = __copy_tofrom_user_power7_vmx(to, from, n);
353+ prevent_user_access(dir);
354+ exit_vmx_usercopy();
355+
356+ if (unlikely(ret)) {
357+ allow_user_access(to, dir);
358+ ret = __copy_tofrom_user_base(to, from, n);
359+ prevent_user_access(dir);
360+ }
361+ return ret;
362+ }
363+
364+ allow_user_access(to, dir);
337365 ret = __copy_tofrom_user(to, from, n);
338− prevent_user_access(KUAP_READ_WRITE);
366+ prevent_user_access(dir);
339367 return ret;
340368 }
341−#endif /* __powerpc64__ */
342369
343−static inline unsigned long raw_copy_from_user(void *to,
344− const void __user *from, unsigned long n)
370+#ifdef CONFIG_PPC64
371+static inline unsigned long
372+raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
345373 {
346− unsigned long ret;
374+ barrier_nospec();
375+ return raw_copy_tofrom_user(to, from, n, KUAP_READ_WRITE);
376+}
377+#endif /* CONFIG_PPC64 */
347378
348− allow_user_access(NULL, KUAP_READ);
349− ret = __copy_tofrom_user((__force void __user *)to, from, n);
350− prevent_user_access(KUAP_READ);
351− return ret;
379+static inline unsigned long raw_copy_from_user(void *to, const void __user *from, unsigned long n)
380+{
381+ return raw_copy_tofrom_user((__force void __user *)to, from, n, KUAP_READ);
352382 }
353383
354384 static inline unsigned long
355385 raw_copy_to_user(void __user *to, const void *from, unsigned long n)
356386 {
357− unsigned long ret;
358−
359− allow_user_access(to, KUAP_WRITE);
360− ret = __copy_tofrom_user(to, (__force const void __user *)from, n);
361− prevent_user_access(KUAP_WRITE);
362− return ret;
387+ return raw_copy_tofrom_user(to, (__force const void __user *)from, n, KUAP_WRITE);
363388 }
364389
365390 unsigned long __arch_clear_user(void __user *addr, unsigned long size);
arch/powerpc/kernel/dma-iommu.c+2−2
@@ -67,7 +67,7 @@ bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg, · 66 unmodified lines
6767 }
6868 bool arch_dma_alloc_direct(struct device *dev)
6969 {
70− if (dev->dma_ops_bypass)
70+ if (dev->dma_ops_bypass && dev->bus_dma_limit)
7171 return true;
7272
7373 return false;
@@ -75,7 +75,7 @@ bool arch_dma_alloc_direct(struct device *dev) · 1 unmodified line
7575
7676 bool arch_dma_free_direct(struct device *dev, dma_addr_t dma_handle)
7777 {
78− if (!dev->dma_ops_bypass)
78+ if (!dev->dma_ops_bypass || !dev->bus_dma_limit)
7979 return false;
8080
8181 return is_direct_handle(dev, dma_handle);
arch/powerpc/kernel/head_85xx.S+1−45
@@ -305,7 +305,6 @@ set_ivor: · 304 unmodified lines
305305 * r12 is pointer to the pte
306306 * r10 is the pshift from the PGD, if we're a hugepage
307307 */
308−#ifdef CONFIG_PTE_64BIT
309308 #ifdef CONFIG_HUGETLB_PAGE
310309 #define FIND_PTE \
311310 rlwinm r12, r13, 14, 18, 28; /* Compute pgdir/pmd offset */ \
@@ -329,15 +328,6 @@ set_ivor: · 17 unmodified lines
329328 rlwimi r12, r13, 23, 20, 28; /* Compute pte address */ \
330329 lwz r11, 4(r12); /* Get pte entry */
331330 #endif /* HUGEPAGE */
332−#else /* !PTE_64BIT */
333−#define FIND_PTE \
334− rlwimi r11, r13, 12, 20, 29; /* Create L1 (pgdir/pmd) address */ \
335− lwz r11, 0(r11); /* Get L1 entry */ \
336− rlwinm. r12, r11, 0, 0, 19; /* Extract L2 (pte) base address */ \
337− beq 2f; /* Bail if no table */ \
338− rlwimi r12, r13, 22, 20, 29; /* Compute PTE address */ \
339− lwz r11, 0(r12); /* Get Linux PTE */
340−#endif
341331
342332 /*
343333 * Interrupt vector entry code
@@ -473,21 +463,15 @@ END_BTB_FLUSH_SECTION · 129 unmodified lines
473463 4:
474464 FIND_PTE
475465
476−#ifdef CONFIG_PTE_64BIT
477466 li r13,_PAGE_PRESENT|_PAGE_BAP_SR
478467 oris r13,r13,_PAGE_ACCESSED@h
479−#else
480− li r13,_PAGE_PRESENT|_PAGE_READ|_PAGE_ACCESSED
481−#endif
482468 andc. r13,r13,r11 /* Check permission */
483469
484−#ifdef CONFIG_PTE_64BIT
485470 #ifdef CONFIG_SMP
486471 subf r13,r11,r12 /* create false data dep */
487472 lwzx r13,r11,r13 /* Get upper pte bits */
488473 #else
489474 lwz r13,0(r12) /* Get upper pte bits */
490−#endif
491475 #endif
492476
493477 bne 2f /* Bail if permission/valid mismatch */
@@ -552,12 +536,8 @@ END_BTB_FLUSH_SECTION · 58 unmodified lines
552536
553537 FIND_PTE
554538 /* Make up the required permissions for kernel code */
555−#ifdef CONFIG_PTE_64BIT
556539 li r13,_PAGE_PRESENT | _PAGE_BAP_SX
557540 oris r13,r13,_PAGE_ACCESSED@h
558−#else
559− li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC
560−#endif
561541 b 4f
562542
563543 /* Get the PGD for the current thread */
@@ -573,23 +553,17 @@ END_BTB_FLUSH_SECTION · 9 unmodified lines
573553
574554 FIND_PTE
575555 /* Make up the required permissions for user code */
576−#ifdef CONFIG_PTE_64BIT
577556 li r13,_PAGE_PRESENT | _PAGE_BAP_UX
578557 oris r13,r13,_PAGE_ACCESSED@h
579−#else
580− li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC
581−#endif
582558
583559 4:
584560 andc. r13,r13,r11 /* Check permission */
585561
586−#ifdef CONFIG_PTE_64BIT
587562 #ifdef CONFIG_SMP
588563 subf r13,r11,r12 /* create false data dep */
589564 lwzx r13,r11,r13 /* Get upper pte bits */
590565 #else
591566 lwz r13,0(r12) /* Get upper pte bits */
592−#endif
593567 #endif
594568
595569 bne 2f /* Bail if permission mismatch */
@@ -683,7 +657,7 @@ interrupt_end: · 87 unmodified lines
683657 * r10 - tsize encoding (if HUGETLB_PAGE) or available to use
684658 * r11 - TLB (info from Linux PTE)
685659 * r12 - available to use
686− * r13 - upper bits of PTE (if PTE_64BIT) or available to use
660+ * r13 - upper bits of PTE
687661 * CR5 - results of addr >= PAGE_OFFSET
688662 * MAS0, MAS1 - loaded with proper value when we get here
689663 * MAS2, MAS3 - will need additional info from Linux PTE
@@ -751,7 +725,6 @@ finish_tlb_load: · 61 unmodified lines
751725 * here we (properly should) assume have the appropriate value.
752726 */
753727 finish_tlb_load_cont:
754−#ifdef CONFIG_PTE_64BIT
755728 rlwinm r12, r11, 32-2, 26, 31 /* Move in perm bits */
756729 andi. r10, r11, _PAGE_DIRTY
757730 bne 1f
@@ -764,26 +737,9 @@ BEGIN_MMU_FTR_SECTION · 6 unmodified lines
764737 srwi r10, r13, 12 /* grab RPN[12:31] */
765738 mtspr SPRN_MAS7, r10
766739 END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS)
767−#else
768− li r10, (_PAGE_EXEC | _PAGE_READ)
769− mr r13, r11
770− rlwimi r10, r11, 31, 29, 29 /* extract _PAGE_DIRTY into SW */
771− and r12, r11, r10
772− mcrf cr0, cr5 /* Test for user page */
773− slwi r10, r12, 1
774− or r10, r10, r12
775− rlwinm r10, r10, 0, ~_PAGE_EXEC /* Clear SX on user pages */
776− isellt r12, r10, r12
777− rlwimi r13, r12, 0, 20, 31 /* Get RPN from PTE, merge w/ perms */
778− mtspr SPRN_MAS3, r13
779−#endif
780740
781741 mfspr r12, SPRN_MAS2
782−#ifdef CONFIG_PTE_64BIT
783742 rlwimi r12, r11, 32-19, 27, 31 /* extract WIMGE from pte */
784−#else
785− rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */
786−#endif
787743 #ifdef CONFIG_HUGETLB_PAGE
788744 beq 6, 3f /* don't mask if page isn't huge */
789745 li r13, 1
arch/powerpc/kernel/iommu.c+1−1
@@ -1159,7 +1159,7 @@ spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain, · 1158 unmodified lines
11591159 struct device *dev,
11601160 struct iommu_domain *old)
11611161 {
1162− struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
1162+ struct iommu_domain *domain = iommu_driver_get_domain_for_dev(dev);
11631163 struct iommu_table_group *table_group;
11641164 struct iommu_group *grp;
11651165
arch/powerpc/kernel/prom_init.c+2−1
@@ -2893,7 +2893,8 @@ static void __init fixup_device_tree_pmac(void) · 2892 unmodified lines
28932893 for (node = 0; prom_next_node(&node); ) {
28942894 type[0] = '\0';
28952895 prom_getprop(node, "device_type", type, sizeof(type));
2896− if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
2896+ if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s") &&
2897+ prom_strcmp(type, "media-bay"))
28972898 continue;
28982899
28992900 if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
arch/powerpc/kernel/setup-common.c+0−10
@@ -35,7 +35,6 @@ · 34 unmodified lines
3535 #include <linux/of_irq.h>
3636 #include <linux/hugetlb.h>
3737 #include <linux/pgtable.h>
38−#include <asm/kexec.h>
3938 #include <asm/io.h>
4039 #include <asm/paca.h>
4140 #include <asm/processor.h>
@@ -995,15 +994,6 @@ void __init setup_arch(char **cmdline_p) · 953 unmodified lines
995994
996995 initmem_init();
997996
998− /*
999− * Reserve large chunks of memory for use by CMA for kdump, fadump, KVM and
1000− * hugetlb. These must be called after initmem_init(), so that
1001− * pageblock_order is initialised.
1002− */
1003− fadump_cma_init();
1004− kdump_cma_reserve();
1005− kvm_cma_reserve();
1006−
1007997 early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
1008998
1009999 if (ppc_md.setup_arch)
arch/powerpc/kernel/trace/ftrace.c+22−4
@@ -37,11 +37,29 @@ unsigned long ftrace_call_adjust(unsigned long addr) · 36 unmodified lines
3737 if (addr >= (unsigned long)__exittext_begin && addr < (unsigned long)__exittext_end)
3838 return 0;
3939
40− if (IS_ENABLED(CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY) &&
41− !IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE)) {
42− addr += MCOUNT_INSN_SIZE;
43− if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS))
40+ if (IS_ENABLED(CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY)) {
41+ if (!IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE)) {
4442 addr += MCOUNT_INSN_SIZE;
43+ if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS))
44+ addr += MCOUNT_INSN_SIZE;
45+ } else if (IS_ENABLED(CONFIG_CC_IS_CLANG) && IS_ENABLED(CONFIG_PPC64)) {
46+ /*
47+ * addr points to global entry point though the NOP was emitted at local
48+ * entry point due to https://github.com/llvm/llvm-project/issues/163706
49+ * Handle that here with ppc_function_entry() for kernel symbols while
50+ * adjusting module addresses in the else case, by looking for the below
51+ * module global entry point sequence:
52+ * ld r2, -8(r12)
53+ * add r2, r2, r12
54+ */
55+ if (is_kernel_text(addr) || is_kernel_inittext(addr))
56+ addr = ppc_function_entry((void *)addr);
57+ else if ((ppc_inst_val(ppc_inst_read((u32 *)addr)) ==
58+ PPC_RAW_LD(_R2, _R12, -8)) &&
59+ (ppc_inst_val(ppc_inst_read((u32 *)(addr+4))) ==
60+ PPC_RAW_ADD(_R2, _R2, _R12)))
61+ addr += 8;
62+ }
4563 }
4664
4765 return addr;
arch/powerpc/kexec/core.c+9−8
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include <asm/firmware.h>
2424
2525 #define cpu_to_be_ulong __PASTE(cpu_to_be, BITS_PER_LONG)
26+#define __be_word __PASTE(__be, BITS_PER_LONG)
2627
2728 #ifdef CONFIG_CRASH_DUMP
2829 void machine_crash_shutdown(struct pt_regs *regs)
@@ -146,25 +147,25 @@ int __init overlaps_crashkernel(unsigned long start, unsigned long size) · 117 unmodified lines
146147 }
147148
148149 /* Values we need to export to the second kernel via the device tree. */
149−static phys_addr_t crashk_base;
150−static phys_addr_t crashk_size;
151−static unsigned long long mem_limit;
150+static __be_word crashk_base;
151+static __be_word crashk_size;
152+static __be_word mem_limit;
152153
153154 static struct property crashk_base_prop = {
154155 .name = "linux,crashkernel-base",
155− .length = sizeof(phys_addr_t),
156+ .length = sizeof(__be_word),
156157 .value = &crashk_base
157158 };
158159
159160 static struct property crashk_size_prop = {
160161 .name = "linux,crashkernel-size",
161− .length = sizeof(phys_addr_t),
162+ .length = sizeof(__be_word),
162163 .value = &crashk_size,
163164 };
164165
165166 static struct property memory_limit_prop = {
166167 .name = "linux,memory-limit",
167− .length = sizeof(unsigned long long),
168+ .length = sizeof(__be_word),
168169 .value = &mem_limit,
169170 };
170171
@@ -193,11 +194,11 @@ static void __init export_crashk_values(struct device_node *node) · 22 unmodified lines
193194 }
194195 #endif /* CONFIG_CRASH_RESERVE */
195196
196−static phys_addr_t kernel_end;
197+static __be_word kernel_end;
197198
198199 static struct property kernel_end_prop = {
199200 .name = "linux,kernel-end",
200− .length = sizeof(phys_addr_t),
201+ .length = sizeof(__be_word),
201202 .value = &kernel_end,
202203 };
203204
arch/powerpc/kexec/file_load_64.c+13−1
@@ -450,6 +450,11 @@ static int load_elfcorehdr_segment(struct kimage *image, struct kexec_buf *kbuf) · 449 unmodified lines
450450 kbuf->buffer = headers;
451451 kbuf->mem = KEXEC_BUF_MEM_UNKNOWN;
452452 kbuf->bufsz = headers_sz;
453+
454+ /*
455+ * Account for extra space required to accommodate additional memory
456+ * ranges in elfcorehdr due to memory hotplug events.
457+ */
453458 kbuf->memsz = headers_sz + kdump_extra_elfcorehdr_size(cmem);
454459 kbuf->top_down = false;
455460
@@ -460,7 +465,14 @@ static int load_elfcorehdr_segment(struct kimage *image, struct kexec_buf *kbuf) · 4 unmodified lines
460465 }
461466
462467 image->elf_load_addr = kbuf->mem;
463− image->elf_headers_sz = headers_sz;
468+
469+ /*
470+ * If CONFIG_CRASH_HOTPLUG is enabled, the elfcorehdr kexec segment
471+ * memsz can be larger than bufsz. Always initialize elf_headers_sz
472+ * with memsz. This ensures the correct size is reserved for elfcorehdr
473+ * memory in the FDT prepared for kdump.
474+ */
475+ image->elf_headers_sz = kbuf->memsz;
464476 image->elf_headers = headers;
465477 out:
466478 kfree(cmem);
arch/powerpc/kvm/book3s.c+2−2
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838
3939 /* #define EXIT_DEBUG */
4040
41−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
41+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
4242 KVM_GENERIC_VM_STATS(),
4343 STATS_DESC_ICOUNTER(VM, num_2M_pages),
4444 STATS_DESC_ICOUNTER(VM, num_1G_pages)
@@ -53,7 +53,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 8 unmodified lines
5353 sizeof(kvm_vm_stats_desc),
5454 };
5555
56−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
56+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
5757 KVM_GENERIC_VCPU_STATS(),
5858 STATS_DESC_COUNTER(VCPU, sum_exits),
5959 STATS_DESC_COUNTER(VCPU, mmio_exits),
arch/powerpc/kvm/booke.c+2−2
@@ -36,7 +36,7 @@ · 35 unmodified lines
3636
3737 unsigned long kvmppc_booke_handlers;
3838
39−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
39+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
4040 KVM_GENERIC_VM_STATS(),
4141 STATS_DESC_ICOUNTER(VM, num_2M_pages),
4242 STATS_DESC_ICOUNTER(VM, num_1G_pages)
@@ -51,7 +51,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 8 unmodified lines
5151 sizeof(kvm_vm_stats_desc),
5252 };
5353
54−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
54+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
5555 KVM_GENERIC_VCPU_STATS(),
5656 STATS_DESC_COUNTER(VCPU, sum_exits),
5757 STATS_DESC_COUNTER(VCPU, mmio_exits),
arch/powerpc/kvm/e500.h+1−5
@@ -39,15 +39,11 @@ enum vcpu_ftr { · 38 unmodified lines
3939 /* bits [6-5] MAS2_X1 and MAS2_X0 and [4-0] bits for WIMGE */
4040 #define E500_TLB_MAS2_ATTR (0x7f)
4141
42−struct tlbe_ref {
42+struct tlbe_priv {
4343 kvm_pfn_t pfn; /* valid only for TLB0, except briefly */
4444 unsigned int flags; /* E500_TLB_* */
4545 };
4646
47−struct tlbe_priv {
48− struct tlbe_ref ref;
49−};
50−
5147 #ifdef CONFIG_KVM_E500V2
5248 struct vcpu_id_table;
5349 #endif
arch/powerpc/kvm/e500_mmu.c+2−2
@@ -920,12 +920,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500) · 919 unmodified lines
920920 vcpu_e500->gtlb_offset[0] = 0;
921921 vcpu_e500->gtlb_offset[1] = KVM_E500_TLB0_SIZE;
922922
923− vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref,
923+ vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_priv,
924924 vcpu_e500->gtlb_params[0].entries);
925925 if (!vcpu_e500->gtlb_priv[0])
926926 goto free_vcpu;
927927
928− vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref,
928+ vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_priv,
929929 vcpu_e500->gtlb_params[1].entries);
930930 if (!vcpu_e500->gtlb_priv[1])
931931 goto free_vcpu;
arch/powerpc/kvm/e500_mmu_host.c+44−47
@@ -189,16 +189,16 @@ void inval_gtlbe_on_host(struct kvmppc_vcpu_e500 *vcpu_e500, int tlbsel, · 188 unmodified lines
189189 {
190190 struct kvm_book3e_206_tlb_entry *gtlbe =
191191 get_entry(vcpu_e500, tlbsel, esel);
192− struct tlbe_ref *ref = &vcpu_e500->gtlb_priv[tlbsel][esel].ref;
192+ struct tlbe_priv *tlbe = &vcpu_e500->gtlb_priv[tlbsel][esel];
193193
194194 /* Don't bother with unmapped entries */
195− if (!(ref->flags & E500_TLB_VALID)) {
196− WARN(ref->flags & (E500_TLB_BITMAP | E500_TLB_TLB0),
197− "%s: flags %x\n", __func__, ref->flags);
195+ if (!(tlbe->flags & E500_TLB_VALID)) {
196+ WARN(tlbe->flags & (E500_TLB_BITMAP | E500_TLB_TLB0),
197+ "%s: flags %x\n", __func__, tlbe->flags);
198198 WARN_ON(tlbsel == 1 && vcpu_e500->g2h_tlb1_map[esel]);
199199 }
200200
201− if (tlbsel == 1 && ref->flags & E500_TLB_BITMAP) {
201+ if (tlbsel == 1 && tlbe->flags & E500_TLB_BITMAP) {
202202 u64 tmp = vcpu_e500->g2h_tlb1_map[esel];
203203 int hw_tlb_indx;
204204 unsigned long flags;
@@ -216,28 +216,28 @@ void inval_gtlbe_on_host(struct kvmppc_vcpu_e500 *vcpu_e500, int tlbsel, · 11 unmodified lines
216216 }
217217 mb();
218218 vcpu_e500->g2h_tlb1_map[esel] = 0;
219− ref->flags &= ~(E500_TLB_BITMAP | E500_TLB_VALID);
219+ tlbe->flags &= ~(E500_TLB_BITMAP | E500_TLB_VALID);
220220 local_irq_restore(flags);
221221 }
222222
223− if (tlbsel == 1 && ref->flags & E500_TLB_TLB0) {
223+ if (tlbsel == 1 && tlbe->flags & E500_TLB_TLB0) {
224224 /*
225225 * TLB1 entry is backed by 4k pages. This should happen
226226 * rarely and is not worth optimizing. Invalidate everything.
227227 */
228228 kvmppc_e500_tlbil_all(vcpu_e500);
229− ref->flags &= ~(E500_TLB_TLB0 | E500_TLB_VALID);
229+ tlbe->flags &= ~(E500_TLB_TLB0 | E500_TLB_VALID);
230230 }
231231
232232 /*
233233 * If TLB entry is still valid then it's a TLB0 entry, and thus
234234 * backed by at most one host tlbe per shadow pid
235235 */
236− if (ref->flags & E500_TLB_VALID)
236+ if (tlbe->flags & E500_TLB_VALID)
237237 kvmppc_e500_tlbil_one(vcpu_e500, gtlbe);
238238
239239 /* Mark the TLB as not backed by the host anymore */
240− ref->flags = 0;
240+ tlbe->flags = 0;
241241 }
242242
243243 static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe)
@@ -245,26 +245,26 @@ static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe) · 1 unmodified line
245245 return tlbe->mas7_3 & (MAS3_SW|MAS3_UW);
246246 }
247247
248−static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref,
249− struct kvm_book3e_206_tlb_entry *gtlbe,
250− kvm_pfn_t pfn, unsigned int wimg,
251− bool writable)
248+static inline void kvmppc_e500_tlbe_setup(struct tlbe_priv *tlbe,
249+ struct kvm_book3e_206_tlb_entry *gtlbe,
250+ kvm_pfn_t pfn, unsigned int wimg,
251+ bool writable)
252252 {
253− ref->pfn = pfn;
254− ref->flags = E500_TLB_VALID;
253+ tlbe->pfn = pfn;
254+ tlbe->flags = E500_TLB_VALID;
255255 if (writable)
256− ref->flags |= E500_TLB_WRITABLE;
256+ tlbe->flags |= E500_TLB_WRITABLE;
257257
258258 /* Use guest supplied MAS2_G and MAS2_E */
259− ref->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg;
259+ tlbe->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg;
260260 }
261261
262−static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
262+static inline void kvmppc_e500_tlbe_release(struct tlbe_priv *tlbe)
263263 {
264− if (ref->flags & E500_TLB_VALID) {
264+ if (tlbe->flags & E500_TLB_VALID) {
265265 /* FIXME: don't log bogus pfn for TLB1 */
266− trace_kvm_booke206_ref_release(ref->pfn, ref->flags);
267− ref->flags = 0;
266+ trace_kvm_booke206_ref_release(tlbe->pfn, tlbe->flags);
267+ tlbe->flags = 0;
268268 }
269269 }
270270
@@ -284,11 +284,8 @@ static void clear_tlb_privs(struct kvmppc_vcpu_e500 *vcpu_e500) · 13 unmodified lines
284284 int i;
285285
286286 for (tlbsel = 0; tlbsel <= 1; tlbsel++) {
287− for (i = 0; i < vcpu_e500->gtlb_params[tlbsel].entries; i++) {
288− struct tlbe_ref *ref =
289− &vcpu_e500->gtlb_priv[tlbsel][i].ref;
290− kvmppc_e500_ref_release(ref);
291− }
287+ for (i = 0; i < vcpu_e500->gtlb_params[tlbsel].entries; i++)
288+ kvmppc_e500_tlbe_release(&vcpu_e500->gtlb_priv[tlbsel][i]);
292289 }
293290 }
294291
@@ -304,18 +301,18 @@ void kvmppc_core_flush_tlb(struct kvm_vcpu *vcpu) · 9 unmodified lines
304301 static void kvmppc_e500_setup_stlbe(
305302 struct kvm_vcpu *vcpu,
306303 struct kvm_book3e_206_tlb_entry *gtlbe,
307− int tsize, struct tlbe_ref *ref, u64 gvaddr,
304+ int tsize, struct tlbe_priv *tlbe, u64 gvaddr,
308305 struct kvm_book3e_206_tlb_entry *stlbe)
309306 {
310− kvm_pfn_t pfn = ref->pfn;
307+ kvm_pfn_t pfn = tlbe->pfn;
311308 u32 pr = vcpu->arch.shared->msr & MSR_PR;
312− bool writable = !!(ref->flags & E500_TLB_WRITABLE);
309+ bool writable = !!(tlbe->flags & E500_TLB_WRITABLE);
313310
314− BUG_ON(!(ref->flags & E500_TLB_VALID));
311+ BUG_ON(!(tlbe->flags & E500_TLB_VALID));
315312
316313 /* Force IPROT=0 for all guest mappings. */
317314 stlbe->mas1 = MAS1_TSIZE(tsize) | get_tlb_sts(gtlbe) | MAS1_VALID;
318− stlbe->mas2 = (gvaddr & MAS2_EPN) | (ref->flags & E500_TLB_MAS2_ATTR);
315+ stlbe->mas2 = (gvaddr & MAS2_EPN) | (tlbe->flags & E500_TLB_MAS2_ATTR);
319316 stlbe->mas7_3 = ((u64)pfn << PAGE_SHIFT) |
320317 e500_shadow_mas3_attrib(gtlbe->mas7_3, writable, pr);
321318 }
@@ -323,7 +320,7 @@ static void kvmppc_e500_setup_stlbe( · 1 unmodified line
323320 static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
324321 u64 gvaddr, gfn_t gfn, struct kvm_book3e_206_tlb_entry *gtlbe,
325322 int tlbsel, struct kvm_book3e_206_tlb_entry *stlbe,
326− struct tlbe_ref *ref)
323+ struct tlbe_priv *tlbe)
327324 {
328325 struct kvm_memory_slot *slot;
329326 unsigned int psize;
@@ -455,9 +452,9 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, · 125 unmodified lines
455452 }
456453 }
457454
458− kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg, writable);
455+ kvmppc_e500_tlbe_setup(tlbe, gtlbe, pfn, wimg, writable);
459456 kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize,
460− ref, gvaddr, stlbe);
457+ tlbe, gvaddr, stlbe);
461458 writable = tlbe_is_writable(stlbe);
462459
463460 /* Clear i-cache for new pages */
@@ -474,17 +471,17 @@ static int kvmppc_e500_tlb0_map(struct kvmppc_vcpu_e500 *vcpu_e500, int esel, · 10 unmodified lines
474471 struct kvm_book3e_206_tlb_entry *stlbe)
475472 {
476473 struct kvm_book3e_206_tlb_entry *gtlbe;
477− struct tlbe_ref *ref;
474+ struct tlbe_priv *tlbe;
478475 int stlbsel = 0;
479476 int sesel = 0;
480477 int r;
481478
482479 gtlbe = get_entry(vcpu_e500, 0, esel);
483− ref = &vcpu_e500->gtlb_priv[0][esel].ref;
480+ tlbe = &vcpu_e500->gtlb_priv[0][esel];
484481
485482 r = kvmppc_e500_shadow_map(vcpu_e500, get_tlb_eaddr(gtlbe),
486483 get_tlb_raddr(gtlbe) >> PAGE_SHIFT,
487− gtlbe, 0, stlbe, ref);
484+ gtlbe, 0, stlbe, tlbe);
488485 if (r)
489486 return r;
490487
@@ -494,7 +491,7 @@ static int kvmppc_e500_tlb0_map(struct kvmppc_vcpu_e500 *vcpu_e500, int esel, · 3 unmodified lines
494491 }
495492
496493 static int kvmppc_e500_tlb1_map_tlb1(struct kvmppc_vcpu_e500 *vcpu_e500,
497− struct tlbe_ref *ref,
494+ struct tlbe_priv *tlbe,
498495 int esel)
499496 {
500497 unsigned int sesel = vcpu_e500->host_tlb1_nv++;
@@ -507,10 +504,10 @@ static int kvmppc_e500_tlb1_map_tlb1(struct kvmppc_vcpu_e500 *vcpu_e500, · 6 unmodified lines
507504 vcpu_e500->g2h_tlb1_map[idx] &= ~(1ULL << sesel);
508505 }
509506
510− vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_BITMAP;
507+ vcpu_e500->gtlb_priv[1][esel].flags |= E500_TLB_BITMAP;
511508 vcpu_e500->g2h_tlb1_map[esel] |= (u64)1 << sesel;
512509 vcpu_e500->h2g_tlb1_rmap[sesel] = esel + 1;
513− WARN_ON(!(ref->flags & E500_TLB_VALID));
510+ WARN_ON(!(tlbe->flags & E500_TLB_VALID));
514511
515512 return sesel;
516513 }
@@ -522,24 +519,24 @@ static int kvmppc_e500_tlb1_map(struct kvmppc_vcpu_e500 *vcpu_e500, · 5 unmodified lines
522519 u64 gvaddr, gfn_t gfn, struct kvm_book3e_206_tlb_entry *gtlbe,
523520 struct kvm_book3e_206_tlb_entry *stlbe, int esel)
524521 {
525− struct tlbe_ref *ref = &vcpu_e500->gtlb_priv[1][esel].ref;
522+ struct tlbe_priv *tlbe = &vcpu_e500->gtlb_priv[1][esel];
526523 int sesel;
527524 int r;
528525
529526 r = kvmppc_e500_shadow_map(vcpu_e500, gvaddr, gfn, gtlbe, 1, stlbe,
530− ref);
527+ tlbe);
531528 if (r)
532529 return r;
533530
534531 /* Use TLB0 when we can only map a page with 4k */
535532 if (get_tlb_tsize(stlbe) == BOOK3E_PAGESZ_4K) {
536− vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_TLB0;
533+ vcpu_e500->gtlb_priv[1][esel].flags |= E500_TLB_TLB0;
537534 write_stlbe(vcpu_e500, gtlbe, stlbe, 0, 0);
538535 return 0;
539536 }
540537
541538 /* Otherwise map into TLB1 */
542− sesel = kvmppc_e500_tlb1_map_tlb1(vcpu_e500, ref, esel);
539+ sesel = kvmppc_e500_tlb1_map_tlb1(vcpu_e500, tlbe, esel);
543540 write_stlbe(vcpu_e500, gtlbe, stlbe, 1, sesel);
544541
545542 return 0;
@@ -561,11 +558,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, · 15 unmodified lines
561558 priv = &vcpu_e500->gtlb_priv[tlbsel][esel];
562559
563560 /* Triggers after clear_tlb_privs or on initial mapping */
564− if (!(priv->ref.flags & E500_TLB_VALID)) {
561+ if (!(priv->flags & E500_TLB_VALID)) {
565562 kvmppc_e500_tlb0_map(vcpu_e500, esel, &stlbe);
566563 } else {
567564 kvmppc_e500_setup_stlbe(vcpu, gtlbe, BOOK3E_PAGESZ_4K,
568− &priv->ref, eaddr, &stlbe);
565+ priv, eaddr, &stlbe);
569566 write_stlbe(vcpu_e500, gtlbe, &stlbe, 0, 0);
570567 }
571568 break;
arch/powerpc/lib/copyuser_64.S+1−0
@@ -562,3 +562,4 @@ exc; std r10,32(3) · 561 unmodified lines
562562 li r5,4096
563563 b .Ldst_aligned
564564 EXPORT_SYMBOL(__copy_tofrom_user)
565+EXPORT_SYMBOL(__copy_tofrom_user_base)
arch/powerpc/lib/copyuser_power7.S+15−30
@@ -5,13 +5,9 @@ · 4 unmodified lines
55 *
66 * Author: Anton Blanchard <anton@au.ibm.com>
77 */
8+#include <linux/export.h>
89 #include <asm/ppc_asm.h>
910
10−#ifndef SELFTEST_CASE
11−/* 0 == don't use VMX, 1 == use VMX */
12−#define SELFTEST_CASE 0
13−#endif
14−
1511 #ifdef __BIG_ENDIAN__
1612 #define LVS(VRT,RA,RB) lvsl VRT,RA,RB
1713 #define VPERM(VRT,VRA,VRB,VRC) vperm VRT,VRA,VRB,VRC
@@ -47,10 +43,14 @@ · 29 unmodified lines
4743 ld r15,STK_REG(R15)(r1)
4844 ld r14,STK_REG(R14)(r1)
4945 .Ldo_err3:
50− bl CFUNC(exit_vmx_usercopy)
46+ ld r6,STK_REG(R31)(r1) /* original destination pointer */
47+ ld r5,STK_REG(R29)(r1) /* original number of bytes */
48+ subf r7,r6,r3 /* #bytes copied */
49+ subf r3,r7,r5 /* #bytes not copied in r3 */
5150 ld r0,STACKFRAMESIZE+16(r1)
5251 mtlr r0
53− b .Lexit
52+ addi r1,r1,STACKFRAMESIZE
53+ blr
5454 #endif /* CONFIG_ALTIVEC */
5555
5656 .Ldo_err2:
@@ -74,7 +74,6 @@ · 17 unmodified lines
7474
7575 _GLOBAL(__copy_tofrom_user_power7)
7676 cmpldi r5,16
77− cmpldi cr1,r5,3328
7877
7978 std r3,-STACKFRAMESIZE+STK_REG(R31)(r1)
8079 std r4,-STACKFRAMESIZE+STK_REG(R30)(r1)
@@ -82,12 +81,6 @@ _GLOBAL(__copy_tofrom_user_power7) · 1 unmodified line
8281
8382 blt .Lshort_copy
8483
85−#ifdef CONFIG_ALTIVEC
86−test_feature = SELFTEST_CASE
87−BEGIN_FTR_SECTION
88− bgt cr1,.Lvmx_copy
89−END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
90−#endif
9184
9285 .Lnonvmx_copy:
9386 /* Get the source 8B aligned */
@@ -263,23 +256,14 @@ err1; stb r0,0(r3) · 169 unmodified lines
263256 15: li r3,0
264257 blr
265258
266−.Lunwind_stack_nonvmx_copy:
267− addi r1,r1,STACKFRAMESIZE
268− b .Lnonvmx_copy
269−
270−.Lvmx_copy:
271259 #ifdef CONFIG_ALTIVEC
260+_GLOBAL(__copy_tofrom_user_power7_vmx)
272261 mflr r0
273262 std r0,16(r1)
274263 stdu r1,-STACKFRAMESIZE(r1)
275− bl CFUNC(enter_vmx_usercopy)
276− cmpwi cr1,r3,0
277− ld r0,STACKFRAMESIZE+16(r1)
278− ld r3,STK_REG(R31)(r1)
279− ld r4,STK_REG(R30)(r1)
280− ld r5,STK_REG(R29)(r1)
281− mtlr r0
282264
265+ std r3,STK_REG(R31)(r1)
266+ std r5,STK_REG(R29)(r1)
283267 /*
284268 * We prefetch both the source and destination using enhanced touch
285269 * instructions. We use a stream ID of 0 for the load side and
@@ -300,8 +284,6 @@ err1; stb r0,0(r3) · 14 unmodified lines
300284
301285 DCBT_SETUP_STREAMS(r6, r7, r9, r10, r8)
302286
303− beq cr1,.Lunwind_stack_nonvmx_copy
304−
305287 /*
306288 * If source and destination are not relatively aligned we use a
307289 * slower permute loop.
@@ -478,7 +460,8 @@ err3; lbz r0,0(r4) · 170 unmodified lines
478460 err3; stb r0,0(r3)
479461
480462 15: addi r1,r1,STACKFRAMESIZE
481− b CFUNC(exit_vmx_usercopy) /* tail call optimise */
463+ li r3,0
464+ blr
482465
483466 .Lvmx_unaligned_copy:
484467 /* Get the destination 16B aligned */
@@ -681,5 +664,7 @@ err3; lbz r0,0(r4) · 196 unmodified lines
681664 err3; stb r0,0(r3)
682665
683666 15: addi r1,r1,STACKFRAMESIZE
684− b CFUNC(exit_vmx_usercopy) /* tail call optimise */
667+ li r3,0
668+ blr
669+EXPORT_SYMBOL(__copy_tofrom_user_power7_vmx)
685670 #endif /* CONFIG_ALTIVEC */
arch/powerpc/lib/vmx-helper.c+2−0
@@ -27,6 +27,7 @@ int enter_vmx_usercopy(void) · 26 unmodified lines
2727
2828 return 1;
2929 }
30+EXPORT_SYMBOL(enter_vmx_usercopy);
3031
3132 /*
3233 * This function must return 0 because we tail call optimise when calling
@@ -49,6 +50,7 @@ int exit_vmx_usercopy(void) · 16 unmodified lines
4950 set_dec(1);
5051 return 0;
5152 }
53+EXPORT_SYMBOL(exit_vmx_usercopy);
5254
5355 int enter_vmx_ops(void)
5456 {
arch/powerpc/mm/mem.c+14−0
@@ -30,6 +30,10 @@ · 29 unmodified lines
3030 #include <asm/setup.h>
3131 #include <asm/fixmap.h>
3232
33+#include <asm/fadump.h>
34+#include <asm/kexec.h>
35+#include <asm/kvm_ppc.h>
36+
3337 #include <mm/mmu_decl.h>
3438
3539 unsigned long long memory_limit __initdata;
@@ -268,6 +272,16 @@ void __init paging_init(void) · 232 unmodified lines
268272
269273 void __init arch_mm_preinit(void)
270274 {
275+
276+ /*
277+ * Reserve large chunks of memory for use by CMA for kdump, fadump, KVM
278+ * and hugetlb. These must be called after pageblock_order is
279+ * initialised.
280+ */
281+ fadump_cma_init();
282+ kdump_cma_reserve();
283+ kvm_cma_reserve();
284+
271285 /*
272286 * book3s is limited to 16 page sizes due to encoding this in
273287 * a 4-bit field for slices.
arch/powerpc/net/bpf_jit.h+0−5
@@ -81,9 +81,6 @@ · 80 unmodified lines
8181
8282 #ifdef CONFIG_PPC64
8383
84−/* for gpr non volatile registers BPG_REG_6 to 10 */
85−#define BPF_PPC_STACK_SAVE (6 * 8)
86−
8784 /* If dummy pass (!image), account for maximum possible instructions */
8885 #define PPC_LI64(d, i) do { \
8986 if (!image) \
@@ -219,8 +216,6 @@ int bpf_jit_emit_exit_insn(u32 *image, struct codegen_context *ctx, int tmp_reg, · 129 unmodified lines
219216 int bpf_add_extable_entry(struct bpf_prog *fp, u32 *image, u32 *fimage, int pass,
220217 struct codegen_context *ctx, int insn_idx,
221218 int jmp_off, int dst_reg, u32 code);
222−
223−int bpf_jit_stack_tailcallinfo_offset(struct codegen_context *ctx);
224219 #endif
225220
226221 #endif
arch/powerpc/net/bpf_jit_comp.c+56−71
@@ -450,7 +450,7 @@ bool bpf_jit_supports_subprog_tailcalls(void) · 449 unmodified lines
450450
451451 bool bpf_jit_supports_kfunc_call(void)
452452 {
453− return true;
453+ return IS_ENABLED(CONFIG_PPC64);
454454 }
455455
456456 bool bpf_jit_supports_arena(void)
@@ -638,19 +638,12 @@ static int invoke_bpf_mod_ret(u32 *image, u32 *ro_image, struct codegen_context · 181 unmodified lines
638638 * for the traced function (BPF subprog/callee) to fetch it.
639639 */
640640 static void bpf_trampoline_setup_tail_call_info(u32 *image, struct codegen_context *ctx,
641− int func_frame_offset,
642− int bpf_dummy_frame_size, int r4_off)
641+ int bpf_frame_size, int r4_off)
643642 {
644643 if (IS_ENABLED(CONFIG_PPC64)) {
645− /* See Generated stack layout */
646− int tailcallinfo_offset = BPF_PPC_TAILCALL;
647−
648− /*
649− * func_frame_offset = ...(1)
650− * bpf_dummy_frame_size + trampoline_frame_size
651− */
652− EMIT(PPC_RAW_LD(_R4, _R1, func_frame_offset));
653− EMIT(PPC_RAW_LD(_R3, _R4, -tailcallinfo_offset));
644+ EMIT(PPC_RAW_LD(_R4, _R1, bpf_frame_size));
645+ /* Refer to trampoline's Generated stack layout */
646+ EMIT(PPC_RAW_LD(_R3, _R4, -BPF_PPC_TAILCALL));
654647
655648 /*
656649 * Setting the tail_call_info in trampoline's frame
@@ -658,22 +651,14 @@ static void bpf_trampoline_setup_tail_call_info(u32 *image, struct codegen_conte · 1 unmodified line
658651 */
659652 EMIT(PPC_RAW_CMPLWI(_R3, MAX_TAIL_CALL_CNT));
660653 PPC_BCC_CONST_SHORT(COND_GT, 8);
661− EMIT(PPC_RAW_ADDI(_R3, _R4, bpf_jit_stack_tailcallinfo_offset(ctx)));
654+ EMIT(PPC_RAW_ADDI(_R3, _R4, -BPF_PPC_TAILCALL));
655+
662656 /*
663− * From ...(1) above:
664− * trampoline_frame_bottom = ...(2)
665− * func_frame_offset - bpf_dummy_frame_size
666− *
667− * Using ...(2) derived above:
668− * trampoline_tail_call_info_offset = ...(3)
669− * trampoline_frame_bottom - tailcallinfo_offset
670− *
671− * From ...(3):
672− * Use trampoline_tail_call_info_offset to write reference of main's
673− * tail_call_info in trampoline frame.
657+ * Trampoline's tail_call_info is at the same offset, as that of
658+ * any bpf program, with reference to previous frame. Update the
659+ * address of main's tail_call_info in trampoline frame.
674660 */
675− EMIT(PPC_RAW_STL(_R3, _R1, (func_frame_offset - bpf_dummy_frame_size)
676− - tailcallinfo_offset));
661+ EMIT(PPC_RAW_STL(_R3, _R1, bpf_frame_size - BPF_PPC_TAILCALL));
677662 } else {
678663 /* See bpf_jit_stack_offsetof() and BPF_PPC_TC */
679664 EMIT(PPC_RAW_LL(_R4, _R1, r4_off));
@@ -681,7 +666,7 @@ static void bpf_trampoline_setup_tail_call_info(u32 *image, struct codegen_conte · 1 unmodified line
681666 }
682667
683668 static void bpf_trampoline_restore_tail_call_cnt(u32 *image, struct codegen_context *ctx,
684− int func_frame_offset, int r4_off)
669+ int bpf_frame_size, int r4_off)
685670 {
686671 if (IS_ENABLED(CONFIG_PPC32)) {
687672 /*
@@ -692,12 +677,12 @@ static void bpf_trampoline_restore_tail_call_cnt(u32 *image, struct codegen_cont · 4 unmodified lines
692677 }
693678 }
694679
695−static void bpf_trampoline_save_args(u32 *image, struct codegen_context *ctx, int func_frame_offset,
696− int nr_regs, int regs_off)
680+static void bpf_trampoline_save_args(u32 *image, struct codegen_context *ctx,
681+ int bpf_frame_size, int nr_regs, int regs_off)
697682 {
698683 int param_save_area_offset;
699684
700− param_save_area_offset = func_frame_offset; /* the two frames we alloted */
685+ param_save_area_offset = bpf_frame_size;
701686 param_save_area_offset += STACK_FRAME_MIN_SIZE; /* param save area is past frame header */
702687
703688 for (int i = 0; i < nr_regs; i++) {
@@ -720,11 +705,11 @@ static void bpf_trampoline_restore_args_regs(u32 *image, struct codegen_context · 16 unmodified lines
720705
721706 /* Used when we call into the traced function. Replicate parameter save area */
722707 static void bpf_trampoline_restore_args_stack(u32 *image, struct codegen_context *ctx,
723− int func_frame_offset, int nr_regs, int regs_off)
708+ int bpf_frame_size, int nr_regs, int regs_off)
724709 {
725710 int param_save_area_offset;
726711
727− param_save_area_offset = func_frame_offset; /* the two frames we alloted */
712+ param_save_area_offset = bpf_frame_size;
728713 param_save_area_offset += STACK_FRAME_MIN_SIZE; /* param save area is past frame header */
729714
730715 for (int i = 8; i < nr_regs; i++) {
@@ -741,10 +726,10 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 10 unmodified lines
741726 void *func_addr)
742727 {
743728 int regs_off, nregs_off, ip_off, run_ctx_off, retval_off, nvr_off, alt_lr_off, r4_off = 0;
744− int i, ret, nr_regs, bpf_frame_size = 0, bpf_dummy_frame_size = 0, func_frame_offset;
745729 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN];
746730 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY];
747731 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT];
732+ int i, ret, nr_regs, retaddr_off, bpf_frame_size = 0;
748733 struct codegen_context codegen_ctx, *ctx;
749734 u32 *image = (u32 *)rw_image;
750735 ppc_inst_t branch_insn;
@@ -770,24 +755,19 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 19 unmodified lines
770755 * Generated stack layout:
771756 *
772757 * func prev back chain [ back chain ]
773− * [ ]
774− * bpf prog redzone/tailcallcnt [ ... ] 64 bytes (64-bit powerpc)
775− * [ ] --
776− * LR save area [ r0 save (64-bit) ] | header
777− * [ r0 save (32-bit) ] |
778− * dummy frame for unwind [ back chain 1 ] --
779758 * [ tail_call_info ] optional - 64-bit powerpc
780759 * [ padding ] align stack frame
781760 * r4_off [ r4 (tailcallcnt) ] optional - 32-bit powerpc
782761 * alt_lr_off [ real lr (ool stub)] optional - actual lr
762+ * retaddr_off [ return address ]
783763 * [ r26 ]
784764 * nvr_off [ r25 ] nvr save area
785765 * retval_off [ return value ]
786766 * [ reg argN ]
787767 * [ ... ]
788− * regs_off [ reg_arg1 ] prog ctx context
789− * nregs_off [ args count ]
790− * ip_off [ traced function ]
768+ * regs_off [ reg_arg1 ] prog_ctx
769+ * nregs_off [ args count ] ((u64 *)prog_ctx)[-1]
770+ * ip_off [ traced function ] ((u64 *)prog_ctx)[-2]
791771 * [ ... ]
792772 * run_ctx_off [ bpf_tramp_run_ctx ]
793773 * [ reg argN ]
@@ -843,6 +823,10 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 49 unmodified lines
843823 nvr_off = bpf_frame_size;
844824 bpf_frame_size += 2 * SZL;
845825
826+ /* Save area for return address */
827+ retaddr_off = bpf_frame_size;
828+ bpf_frame_size += SZL;
829+
846830 /* Optional save area for actual LR in case of ool ftrace */
847831 if (IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE)) {
848832 alt_lr_off = bpf_frame_size;
@@ -869,16 +853,8 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 20 unmodified lines
869853 /* Padding to align stack frame, if any */
870854 bpf_frame_size = round_up(bpf_frame_size, SZL * 2);
871855
872− /* Dummy frame size for proper unwind - includes 64-bytes red zone for 64-bit powerpc */
873− bpf_dummy_frame_size = STACK_FRAME_MIN_SIZE + 64;
874−
875− /* Offset to the traced function's stack frame */
876− func_frame_offset = bpf_dummy_frame_size + bpf_frame_size;
877−
878− /* Create dummy frame for unwind, store original return value */
856+ /* Store original return value */
879857 EMIT(PPC_RAW_STL(_R0, _R1, PPC_LR_STKOFF));
880− /* Protect red zone where tail call count goes */
881− EMIT(PPC_RAW_STLU(_R1, _R1, -bpf_dummy_frame_size));
882858
883859 /* Create our stack frame */
884860 EMIT(PPC_RAW_STLU(_R1, _R1, -bpf_frame_size));
@@ -893,34 +869,44 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 8 unmodified lines
893869 if (IS_ENABLED(CONFIG_PPC32) && nr_regs < 2)
894870 EMIT(PPC_RAW_STL(_R4, _R1, r4_off));
895871
896− bpf_trampoline_save_args(image, ctx, func_frame_offset, nr_regs, regs_off);
872+ bpf_trampoline_save_args(image, ctx, bpf_frame_size, nr_regs, regs_off);
897873
898− /* Save our return address */
874+ /* Save our LR/return address */
899875 EMIT(PPC_RAW_MFLR(_R3));
900876 if (IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE))
901877 EMIT(PPC_RAW_STL(_R3, _R1, alt_lr_off));
902878 else
903− EMIT(PPC_RAW_STL(_R3, _R1, bpf_frame_size + PPC_LR_STKOFF));
879+ EMIT(PPC_RAW_STL(_R3, _R1, retaddr_off));
904880
905881 /*
906− * Save ip address of the traced function.
907− * We could recover this from LR, but we will need to address for OOL trampoline,
908− * and optional GEP area.
882+ * Derive IP address of the traced function.
883+ * In case of CONFIG_PPC_FTRACE_OUT_OF_LINE or BPF program, LR points to the instruction
884+ * after the 'bl' instruction in the OOL stub. Refer to ftrace_init_ool_stub() and
885+ * bpf_arch_text_poke() for OOL stub of kernel functions and bpf programs respectively.
886+ * Relevant stub sequence:
887+ *
888+ * bl <tramp>
889+ * LR (R3) => mtlr r0
890+ * b <func_addr+4>
891+ *
892+ * Recover kernel function/bpf program address from the unconditional
893+ * branch instruction at the end of OOL stub.
909894 */
910895 if (IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE) || flags & BPF_TRAMP_F_IP_ARG) {
911896 EMIT(PPC_RAW_LWZ(_R4, _R3, 4));
912897 EMIT(PPC_RAW_SLWI(_R4, _R4, 6));
913898 EMIT(PPC_RAW_SRAWI(_R4, _R4, 6));
914899 EMIT(PPC_RAW_ADD(_R3, _R3, _R4));
915− EMIT(PPC_RAW_ADDI(_R3, _R3, 4));
916900 }
917901
918902 if (flags & BPF_TRAMP_F_IP_ARG)
919903 EMIT(PPC_RAW_STL(_R3, _R1, ip_off));
920904
921− if (IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE))
922− /* Fake our LR for unwind */
923− EMIT(PPC_RAW_STL(_R3, _R1, bpf_frame_size + PPC_LR_STKOFF));
905+ if (IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE)) {
906+ /* Fake our LR for BPF_TRAMP_F_CALL_ORIG case */
907+ EMIT(PPC_RAW_ADDI(_R3, _R3, 4));
908+ EMIT(PPC_RAW_STL(_R3, _R1, retaddr_off));
909+ }
924910
925911 /* Save function arg count -- see bpf_get_func_arg_cnt() */
926912 EMIT(PPC_RAW_LI(_R3, nr_regs));
@@ -958,20 +944,19 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 31 unmodified lines
958944 /* Call the traced function */
959945 if (flags & BPF_TRAMP_F_CALL_ORIG) {
960946 /*
961− * The address in LR save area points to the correct point in the original function
947+ * retaddr on trampoline stack points to the correct point in the original function
962948 * with both PPC_FTRACE_OUT_OF_LINE as well as with traditional ftrace instruction
963949 * sequence
964950 */
965− EMIT(PPC_RAW_LL(_R3, _R1, bpf_frame_size + PPC_LR_STKOFF));
951+ EMIT(PPC_RAW_LL(_R3, _R1, retaddr_off));
966952 EMIT(PPC_RAW_MTCTR(_R3));
967953
968954 /* Replicate tail_call_cnt before calling the original BPF prog */
969955 if (flags & BPF_TRAMP_F_TAIL_CALL_CTX)
970− bpf_trampoline_setup_tail_call_info(image, ctx, func_frame_offset,
971− bpf_dummy_frame_size, r4_off);
956+ bpf_trampoline_setup_tail_call_info(image, ctx, bpf_frame_size, r4_off);
972957
973958 /* Restore args */
974− bpf_trampoline_restore_args_stack(image, ctx, func_frame_offset, nr_regs, regs_off);
959+ bpf_trampoline_restore_args_stack(image, ctx, bpf_frame_size, nr_regs, regs_off);
975960
976961 /* Restore TOC for 64-bit */
977962 if (IS_ENABLED(CONFIG_PPC64_ELF_ABI_V2) && !IS_ENABLED(CONFIG_PPC_KERNEL_PCREL))
@@ -985,7 +970,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 7 unmodified lines
985970
986971 /* Restore updated tail_call_cnt */
987972 if (flags & BPF_TRAMP_F_TAIL_CALL_CTX)
988− bpf_trampoline_restore_tail_call_cnt(image, ctx, func_frame_offset, r4_off);
973+ bpf_trampoline_restore_tail_call_cnt(image, ctx, bpf_frame_size, r4_off);
989974
990975 /* Reserve space to patch branch instruction to skip fexit progs */
991976 if (ro_image) /* image is NULL for dummy pass */
@@ -1037,7 +1022,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 45 unmodified lines
10371022 EMIT(PPC_RAW_LD(_R2, _R1, 24));
10381023 if (flags & BPF_TRAMP_F_SKIP_FRAME) {
10391024 /* Skip the traced function and return to parent */
1040− EMIT(PPC_RAW_ADDI(_R1, _R1, func_frame_offset));
1025+ EMIT(PPC_RAW_ADDI(_R1, _R1, bpf_frame_size));
10411026 EMIT(PPC_RAW_LL(_R0, _R1, PPC_LR_STKOFF));
10421027 EMIT(PPC_RAW_MTLR(_R0));
10431028 EMIT(PPC_RAW_BLR());
@@ -1045,13 +1030,13 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im · 1 unmodified line
10451030 if (IS_ENABLED(CONFIG_PPC_FTRACE_OUT_OF_LINE)) {
10461031 EMIT(PPC_RAW_LL(_R0, _R1, alt_lr_off));
10471032 EMIT(PPC_RAW_MTLR(_R0));
1048− EMIT(PPC_RAW_ADDI(_R1, _R1, func_frame_offset));
1033+ EMIT(PPC_RAW_ADDI(_R1, _R1, bpf_frame_size));
10491034 EMIT(PPC_RAW_LL(_R0, _R1, PPC_LR_STKOFF));
10501035 EMIT(PPC_RAW_BLR());
10511036 } else {
1052− EMIT(PPC_RAW_LL(_R0, _R1, bpf_frame_size + PPC_LR_STKOFF));
1037+ EMIT(PPC_RAW_LL(_R0, _R1, retaddr_off));
10531038 EMIT(PPC_RAW_MTCTR(_R0));
1054− EMIT(PPC_RAW_ADDI(_R1, _R1, func_frame_offset));
1039+ EMIT(PPC_RAW_ADDI(_R1, _R1, bpf_frame_size));
10551040 EMIT(PPC_RAW_LL(_R0, _R1, PPC_LR_STKOFF));
10561041 EMIT(PPC_RAW_MTLR(_R0));
10571042 EMIT(PPC_RAW_BCTR());
arch/powerpc/net/bpf_jit_comp64.c+143−38
@@ -32,23 +32,27 @@ · 31 unmodified lines
3232 *
3333 * [ prev sp ] <-------------
3434 * [ tail_call_info ] 8 |
35− * [ nv gpr save area ] 6*8 + (12*8) |
35+ * [ nv gpr save area ] (6 * 8) |
36+ * [ addl. nv gpr save area] (12 * 8) | <--- exception boundary/callback program
3637 * [ local_tmp_var ] 24 |
3738 * fp (r31) --> [ ebpf stack space ] upto 512 |
3839 * [ frame header ] 32/112 |
3940 * sp (r1) ---> [ stack pointer ] --------------
4041 *
41− * Additional (12*8) in 'nv gpr save area' only in case of
42− * exception boundary.
42+ * Additional (12 * 8) in 'nv gpr save area' only in case of
43+ * exception boundary/callback.
4344 */
4445
46+/* BPF non-volatile registers save area size */
47+#define BPF_PPC_STACK_SAVE (6 * 8)
48+
4549 /* for bpf JIT code internal usage */
4650 #define BPF_PPC_STACK_LOCALS 24
4751 /*
4852 * for additional non volatile registers(r14-r25) to be saved
4953 * at exception boundary
5054 */
51−#define BPF_PPC_EXC_STACK_SAVE (12*8)
55+#define BPF_PPC_EXC_STACK_SAVE (12 * 8)
5256
5357 /* stack frame excluding BPF stack, ensure this is quadword aligned */
5458 #define BPF_PPC_STACKFRAME (STACK_FRAME_MIN_SIZE + \
@@ -125,12 +129,13 @@ static inline bool bpf_has_stack_frame(struct codegen_context *ctx) · 70 unmodified lines
125129 * [ ... ] |
126130 * sp (r1) ---> [ stack pointer ] --------------
127131 * [ tail_call_info ] 8
128− * [ nv gpr save area ] 6*8 + (12*8)
132+ * [ nv gpr save area ] (6 * 8)
133+ * [ addl. nv gpr save area] (12 * 8) <--- exception boundary/callback program
129134 * [ local_tmp_var ] 24
130135 * [ unused red zone ] 224
131136 *
132− * Additional (12*8) in 'nv gpr save area' only in case of
133− * exception boundary.
137+ * Additional (12 * 8) in 'nv gpr save area' only in case of
138+ * exception boundary/callback.
134139 */
135140 static int bpf_jit_stack_local(struct codegen_context *ctx)
136141 {
@@ -148,7 +153,7 @@ static int bpf_jit_stack_local(struct codegen_context *ctx) · 11 unmodified lines
148153 }
149154 }
150155
151−int bpf_jit_stack_tailcallinfo_offset(struct codegen_context *ctx)
156+static int bpf_jit_stack_tailcallinfo_offset(struct codegen_context *ctx)
152157 {
153158 return bpf_jit_stack_local(ctx) + BPF_PPC_STACK_LOCALS + BPF_PPC_STACK_SAVE;
154159 }
@@ -237,10 +242,6 @@ void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx) · 82 unmodified lines
237242
238243 if (bpf_has_stack_frame(ctx) && !ctx->exception_cb) {
239244 /*
240− * exception_cb uses boundary frame after stack walk.
241− * It can simply use redzone, this optimization reduces
242− * stack walk loop by one level.
243− *
244245 * We need a stack frame, but we don't necessarily need to
245246 * save/restore LR unless we call other functions
246247 */
@@ -284,6 +285,22 @@ void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx) · 37 unmodified lines
284285 * program(main prog) as third arg
285286 */
286287 EMIT(PPC_RAW_MR(_R1, _R5));
288+ /*
289+ * Exception callback reuses the stack frame of exception boundary.
290+ * But BPF stack depth of exception callback and exception boundary
291+ * don't have to be same. If BPF stack depth is different, adjust the
292+ * stack frame size considering BPF stack depth of exception callback.
293+ * The non-volatile register save area remains unchanged. These non-
294+ * volatile registers are restored in exception callback's epilogue.
295+ */
296+ EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), _R5, 0));
297+ EMIT(PPC_RAW_SUB(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_1), _R1));
298+ EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_2),
299+ -BPF_PPC_EXC_STACKFRAME));
300+ EMIT(PPC_RAW_CMPLDI(bpf_to_ppc(TMP_REG_2), ctx->stack_size));
301+ PPC_BCC_CONST_SHORT(COND_EQ, 12);
302+ EMIT(PPC_RAW_MR(_R1, bpf_to_ppc(TMP_REG_1)));
303+ EMIT(PPC_RAW_STDU(_R1, _R1, -(BPF_PPC_EXC_STACKFRAME + ctx->stack_size)));
287304 }
288305
289306 /*
@@ -482,6 +499,83 @@ int bpf_jit_emit_func_call_rel(u32 *image, u32 *fimage, struct codegen_context * · 192 unmodified lines
482499 return 0;
483500 }
484501
502+static int zero_extend(u32 *image, struct codegen_context *ctx, u32 src_reg, u32 dst_reg, u32 size)
503+{
504+ switch (size) {
505+ case 1:
506+ /* zero-extend 8 bits into 64 bits */
507+ EMIT(PPC_RAW_RLDICL(dst_reg, src_reg, 0, 56));
508+ return 0;
509+ case 2:
510+ /* zero-extend 16 bits into 64 bits */
511+ EMIT(PPC_RAW_RLDICL(dst_reg, src_reg, 0, 48));
512+ return 0;
513+ case 4:
514+ /* zero-extend 32 bits into 64 bits */
515+ EMIT(PPC_RAW_RLDICL(dst_reg, src_reg, 0, 32));
516+ fallthrough;
517+ case 8:
518+ /* Nothing to do */
519+ return 0;
520+ default:
521+ return -1;
522+ }
523+}
524+
525+static int sign_extend(u32 *image, struct codegen_context *ctx, u32 src_reg, u32 dst_reg, u32 size)
526+{
527+ switch (size) {
528+ case 1:
529+ /* sign-extend 8 bits into 64 bits */
530+ EMIT(PPC_RAW_EXTSB(dst_reg, src_reg));
531+ return 0;
532+ case 2:
533+ /* sign-extend 16 bits into 64 bits */
534+ EMIT(PPC_RAW_EXTSH(dst_reg, src_reg));
535+ return 0;
536+ case 4:
537+ /* sign-extend 32 bits into 64 bits */
538+ EMIT(PPC_RAW_EXTSW(dst_reg, src_reg));
539+ fallthrough;
540+ case 8:
541+ /* Nothing to do */
542+ return 0;
543+ default:
544+ return -1;
545+ }
546+}
547+
548+/*
549+ * Handle powerpc ABI expectations from caller:
550+ * - Unsigned arguments are zero-extended.
551+ * - Signed arguments are sign-extended.
552+ */
553+static int prepare_for_kfunc_call(const struct bpf_prog *fp, u32 *image,
554+ struct codegen_context *ctx,
555+ const struct bpf_insn *insn)
556+{
557+ const struct btf_func_model *m = bpf_jit_find_kfunc_model(fp, insn);
558+ int i;
559+
560+ if (!m)
561+ return -1;
562+
563+ for (i = 0; i < m->nr_args; i++) {
564+ /* Note that BPF ABI only allows up to 5 args for kfuncs */
565+ u32 reg = bpf_to_ppc(BPF_REG_1 + i), size = m->arg_size[i];
566+
567+ if (!(m->arg_flags[i] & BTF_FMODEL_SIGNED_ARG)) {
568+ if (zero_extend(image, ctx, reg, reg, size))
569+ return -1;
570+ } else {
571+ if (sign_extend(image, ctx, reg, reg, size))
572+ return -1;
573+ }
574+ }
575+
576+ return 0;
577+}
578+
485579 static int bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 out)
486580 {
487581 /*
@@ -522,9 +616,30 @@ static int bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 o · 34 unmodified lines
522616
523617 /*
524618 * tail_call_info++; <- Actual value of tcc here
619+ * Writeback this updated value only if tailcall succeeds.
525620 */
526621 EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), 1));
527622
623+ /* prog = array->ptrs[index]; */
624+ EMIT(PPC_RAW_MULI(bpf_to_ppc(TMP_REG_2), b2p_index, 8));
625+ EMIT(PPC_RAW_ADD(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_2), b2p_bpf_array));
626+ EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_2),
627+ offsetof(struct bpf_array, ptrs)));
628+
629+ /*
630+ * if (prog == NULL)
631+ * goto out;
632+ */
633+ EMIT(PPC_RAW_CMPLDI(bpf_to_ppc(TMP_REG_2), 0));
634+ PPC_BCC_SHORT(COND_EQ, out);
635+
636+ /* goto *(prog->bpf_func + prologue_size); */
637+ EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_2),
638+ offsetof(struct bpf_prog, bpf_func)));
639+ EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_2), bpf_to_ppc(TMP_REG_2),
640+ FUNCTION_DESCR_SIZE + bpf_tailcall_prologue_size));
641+ EMIT(PPC_RAW_MTCTR(bpf_to_ppc(TMP_REG_2)));
642+
528643 /*
529644 * Before writing updated tail_call_info, distinguish if current frame
530645 * is storing a reference to tail_call_info or actual tcc value in
@@ -539,24 +654,6 @@ static int bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 o · 8 unmodified lines
539654 /* Writeback updated value to tail_call_info */
540655 EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_2), 0));
541656
542− /* prog = array->ptrs[index]; */
543− EMIT(PPC_RAW_MULI(bpf_to_ppc(TMP_REG_1), b2p_index, 8));
544− EMIT(PPC_RAW_ADD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), b2p_bpf_array));
545− EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), offsetof(struct bpf_array, ptrs)));
546−
547− /*
548− * if (prog == NULL)
549− * goto out;
550− */
551− EMIT(PPC_RAW_CMPLDI(bpf_to_ppc(TMP_REG_1), 0));
552− PPC_BCC_SHORT(COND_EQ, out);
553−
554− /* goto *(prog->bpf_func + prologue_size); */
555− EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), offsetof(struct bpf_prog, bpf_func)));
556− EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1),
557− FUNCTION_DESCR_SIZE + bpf_tailcall_prologue_size));
558− EMIT(PPC_RAW_MTCTR(bpf_to_ppc(TMP_REG_1)));
559−
560657 /* tear down stack, restore NVRs, ... */
561658 bpf_jit_emit_common_epilogue(image, ctx);
562659
@@ -1123,14 +1220,16 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, u32 *fimage, struct code · 560 unmodified lines
11231220 /* special mov32 for zext */
11241221 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 0, 31));
11251222 break;
1126− } else if (off == 8) {
1127− EMIT(PPC_RAW_EXTSB(dst_reg, src_reg));
1128− } else if (off == 16) {
1129− EMIT(PPC_RAW_EXTSH(dst_reg, src_reg));
1130− } else if (off == 32) {
1131− EMIT(PPC_RAW_EXTSW(dst_reg, src_reg));
1132− } else if (dst_reg != src_reg)
1133− EMIT(PPC_RAW_MR(dst_reg, src_reg));
1223+ }
1224+ if (off == 0) {
1225+ /* MOV */
1226+ if (dst_reg != src_reg)
1227+ EMIT(PPC_RAW_MR(dst_reg, src_reg));
1228+ } else {
1229+ /* MOVSX: dst = (s8,s16,s32)src (off = 8,16,32) */
1230+ if (sign_extend(image, ctx, src_reg, dst_reg, off / 8))
1231+ return -1;
1232+ }
11341233 goto bpf_alu32_trunc;
11351234 case BPF_ALU | BPF_MOV | BPF_K: /* (u32) dst = imm */
11361235 case BPF_ALU64 | BPF_MOV | BPF_K: /* dst = (s64) imm */
@@ -1598,6 +1697,12 @@ emit_clear: · 461 unmodified lines
15981697 if (ret < 0)
15991698 return ret;
16001699
1700+ /* Take care of powerpc ABI requirements before kfunc call */
1701+ if (insn[i].src_reg == BPF_PSEUDO_KFUNC_CALL) {
1702+ if (prepare_for_kfunc_call(fp, image, ctx, &insn[i]))
1703+ return -1;
1704+ }
1705+
16011706 ret = bpf_jit_emit_func_call_rel(image, fimage, ctx, func_addr);
16021707 if (ret)
16031708 return ret;
arch/powerpc/perf/callchain.c+5−0
@@ -103,6 +103,11 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re · 102 unmodified lines
103103 void
104104 perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
105105 {
106+ perf_callchain_store(entry, perf_arch_instruction_pointer(regs));
107+
108+ if (!current->mm)
109+ return;
110+
106111 if (!is_32bit_task())
107112 perf_callchain_user_64(entry, regs);
108113 else
arch/powerpc/perf/callchain_32.c+0−1
@@ -142,7 +142,6 @@ void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry, · 141 unmodified lines
142142 next_ip = perf_arch_instruction_pointer(regs);
143143 lr = regs->link;
144144 sp = regs->gpr[1];
145− perf_callchain_store(entry, next_ip);
146145
147146 while (entry->nr < entry->max_stack) {
148147 fp = (unsigned int __user *) (unsigned long) sp;
arch/powerpc/perf/callchain_64.c+0−1
@@ -77,7 +77,6 @@ void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry, · 76 unmodified lines
7777 next_ip = perf_arch_instruction_pointer(regs);
7878 lr = regs->link;
7979 sp = regs->gpr[1];
80− perf_callchain_store(entry, next_ip);
8180
8281 while (entry->nr < entry->max_stack) {
8382 fp = (unsigned long __user *) sp;
arch/powerpc/platforms/83xx/km83xx.c+2−2
@@ -155,8 +155,8 @@ machine_device_initcall(mpc83xx_km, mpc83xx_declare_of_platform_devices); · 154 unmodified lines
155155
156156 /* list of the supported boards */
157157 static char *board[] __initdata = {
158− "Keymile,KMETER1",
159− "Keymile,kmpbec8321",
158+ "keymile,KMETER1",
159+ "keymile,kmpbec8321",
160160 NULL
161161 };
162162
arch/powerpc/platforms/Kconfig.cputype+2−2
@@ -276,7 +276,7 @@ config PPC_BOOK3S · 275 unmodified lines
276276 config PPC_E500
277277 select FSL_EMB_PERFMON
278278 bool
279− select ARCH_SUPPORTS_HUGETLBFS if PHYS_64BIT || PPC64
279+ select ARCH_SUPPORTS_HUGETLBFS
280280 select PPC_SMP_MUXED_IPI
281281 select PPC_DOORBELL
282282 select PPC_KUEP
@@ -337,7 +337,7 @@ config BOOKE · 54 unmodified lines
337337 config PTE_64BIT
338338 bool
339339 depends on 44x || PPC_E500 || PPC_86xx
340− default y if PHYS_64BIT
340+ default y if PPC_E500 || PHYS_64BIT
341341
342342 config PHYS_64BIT
343343 bool 'Large physical address support' if PPC_E500 || PPC_86xx
arch/powerpc/platforms/pseries/msi.c+1−1
@@ -605,7 +605,7 @@ static int pseries_irq_domain_alloc(struct irq_domain *domain, unsigned int virq · 604 unmodified lines
605605 &pseries_msi_irq_chip, pseries_dev);
606606 }
607607
608− pseries_dev->msi_used++;
608+ pseries_dev->msi_used += nr_irqs;
609609 return 0;
610610
611611 out:
arch/powerpc/tools/check-fpatchable-function-entry.shrenamed from arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh+0−0

File renamed without changes.

arch/powerpc/tools/ftrace-gen-ool-stubs.sh+2−2
@@ -15,9 +15,9 @@ if [ -z "$is_64bit" ]; then · 14 unmodified lines
1515 RELOCATION=R_PPC_ADDR32
1616 fi
1717
18−num_ool_stubs_total=$($objdump -r -j __patchable_function_entries "$vmlinux_o" |
18+num_ool_stubs_total=$($objdump -r -j __patchable_function_entries -d "$vmlinux_o" |
1919 grep -c "$RELOCATION")
20−num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries "$vmlinux_o" |
20+num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries -d "$vmlinux_o" |
2121 grep -e ".init.text" -e ".text.startup" | grep -c "$RELOCATION")
2222 num_ool_stubs_text=$((num_ool_stubs_total - num_ool_stubs_inittext))
2323
arch/riscv/boot/dts/microchip/mpfs.dtsi+2−0
@@ -428,6 +428,7 @@ · 427 unmodified lines
428428 clocks = <&clkcfg CLK_CAN0>, <&clkcfg CLK_MSSPLL3>;
429429 interrupt-parent = <&plic>;
430430 interrupts = <56>;
431+ resets = <&mss_top_sysreg CLK_CAN0>;
431432 status = "disabled";
432433 };
433434
@@ -437,6 +438,7 @@ · 3 unmodified lines
437438 clocks = <&clkcfg CLK_CAN1>, <&clkcfg CLK_MSSPLL3>;
438439 interrupt-parent = <&plic>;
439440 interrupts = <57>;
441+ resets = <&mss_top_sysreg CLK_CAN1>;
440442 status = "disabled";
441443 };
442444
arch/riscv/include/asm/runtime-const.h+4−0
@@ -2,6 +2,10 @@ · 1 unmodified line
22 #ifndef _ASM_RISCV_RUNTIME_CONST_H
33 #define _ASM_RISCV_RUNTIME_CONST_H
44
5+#ifdef MODULE
6+ #error "Cannot use runtime-const infrastructure from modules"
7+#endif
8+
59 #include <asm/asm.h>
610 #include <asm/alternative.h>
711 #include <asm/cacheflush.h>
arch/riscv/include/uapi/asm/ptrace.h+7−6
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 #ifndef __ASSEMBLER__
1010
1111 #include <linux/types.h>
12+#include <linux/const.h>
1213
1314 #define PTRACE_GETFDPIC 33
1415
@@ -138,12 +139,12 @@ struct __sc_riscv_cfi_state { · 123 unmodified lines
138139 #define PTRACE_CFI_SS_LOCK_BIT 4
139140 #define PTRACE_CFI_SS_PTR_BIT 5
140141
141−#define PTRACE_CFI_LP_EN_STATE BIT(PTRACE_CFI_LP_EN_BIT)
142−#define PTRACE_CFI_LP_LOCK_STATE BIT(PTRACE_CFI_LP_LOCK_BIT)
143−#define PTRACE_CFI_ELP_STATE BIT(PTRACE_CFI_ELP_BIT)
144−#define PTRACE_CFI_SS_EN_STATE BIT(PTRACE_CFI_SS_EN_BIT)
145−#define PTRACE_CFI_SS_LOCK_STATE BIT(PTRACE_CFI_SS_LOCK_BIT)
146−#define PTRACE_CFI_SS_PTR_STATE BIT(PTRACE_CFI_SS_PTR_BIT)
142+#define PTRACE_CFI_LP_EN_STATE _BITUL(PTRACE_CFI_LP_EN_BIT)
143+#define PTRACE_CFI_LP_LOCK_STATE _BITUL(PTRACE_CFI_LP_LOCK_BIT)
144+#define PTRACE_CFI_ELP_STATE _BITUL(PTRACE_CFI_ELP_BIT)
145+#define PTRACE_CFI_SS_EN_STATE _BITUL(PTRACE_CFI_SS_EN_BIT)
146+#define PTRACE_CFI_SS_LOCK_STATE _BITUL(PTRACE_CFI_SS_LOCK_BIT)
147+#define PTRACE_CFI_SS_PTR_STATE _BITUL(PTRACE_CFI_SS_PTR_BIT)
147148
148149 #define PRACE_CFI_STATE_INVALID_MASK ~(PTRACE_CFI_LP_EN_STATE | \
149150 PTRACE_CFI_LP_LOCK_STATE | \
arch/riscv/kernel/kgdb.c+4−3
@@ -175,7 +175,7 @@ struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = { · 174 unmodified lines
175175 {DBG_REG_T1, GDB_SIZEOF_REG, offsetof(struct pt_regs, t1)},
176176 {DBG_REG_T2, GDB_SIZEOF_REG, offsetof(struct pt_regs, t2)},
177177 {DBG_REG_FP, GDB_SIZEOF_REG, offsetof(struct pt_regs, s0)},
178− {DBG_REG_S1, GDB_SIZEOF_REG, offsetof(struct pt_regs, a1)},
178+ {DBG_REG_S1, GDB_SIZEOF_REG, offsetof(struct pt_regs, s1)},
179179 {DBG_REG_A0, GDB_SIZEOF_REG, offsetof(struct pt_regs, a0)},
180180 {DBG_REG_A1, GDB_SIZEOF_REG, offsetof(struct pt_regs, a1)},
181181 {DBG_REG_A2, GDB_SIZEOF_REG, offsetof(struct pt_regs, a2)},
@@ -244,8 +244,9 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) · 62 unmodified lines
244244 gdb_regs[DBG_REG_S6_OFF] = task->thread.s[6];
245245 gdb_regs[DBG_REG_S7_OFF] = task->thread.s[7];
246246 gdb_regs[DBG_REG_S8_OFF] = task->thread.s[8];
247− gdb_regs[DBG_REG_S9_OFF] = task->thread.s[10];
248− gdb_regs[DBG_REG_S10_OFF] = task->thread.s[11];
247+ gdb_regs[DBG_REG_S9_OFF] = task->thread.s[9];
248+ gdb_regs[DBG_REG_S10_OFF] = task->thread.s[10];
249+ gdb_regs[DBG_REG_S11_OFF] = task->thread.s[11];
249250 gdb_regs[DBG_REG_EPC_OFF] = task->thread.ra;
250251 }
251252
arch/riscv/kernel/patch.c+11−10
@@ -42,19 +42,20 @@ static inline bool is_kernel_exittext(uintptr_t addr) · 41 unmodified lines
4242 static __always_inline void *patch_map(void *addr, const unsigned int fixmap)
4343 {
4444 uintptr_t uintaddr = (uintptr_t) addr;
45− struct page *page;
45+ phys_addr_t phys;
4646
47− if (core_kernel_text(uintaddr) || is_kernel_exittext(uintaddr))
48− page = phys_to_page(__pa_symbol(addr));
49− else if (IS_ENABLED(CONFIG_STRICT_MODULE_RWX))
50− page = vmalloc_to_page(addr);
51− else
52− return addr;
47+ if (core_kernel_text(uintaddr) || is_kernel_exittext(uintaddr)) {
48+ phys = __pa_symbol(addr);
49+ } else if (IS_ENABLED(CONFIG_STRICT_MODULE_RWX)) {
50+ struct page *page = vmalloc_to_page(addr);
5351
54− BUG_ON(!page);
52+ BUG_ON(!page);
53+ phys = page_to_phys(page) + offset_in_page(addr);
54+ } else {
55+ return addr;
56+ }
5557
56− return (void *)set_fixmap_offset(fixmap, page_to_phys(page) +
57− offset_in_page(addr));
58+ return (void *)set_fixmap_offset(fixmap, phys);
5859 }
5960
6061 static void patch_unmap(int fixmap)
arch/riscv/kernel/process.c+3−1
@@ -347,8 +347,10 @@ long set_tagged_addr_ctrl(struct task_struct *task, unsigned long arg) · 346 unmodified lines
347347 if (arg & PR_TAGGED_ADDR_ENABLE && (tagged_addr_disabled || !pmlen))
348348 return -EINVAL;
349349
350− if (!(arg & PR_TAGGED_ADDR_ENABLE))
350+ if (!(arg & PR_TAGGED_ADDR_ENABLE)) {
351351 pmlen = PMLEN_0;
352+ pmm = ENVCFG_PMM_PMLEN_0;
353+ }
352354
353355 if (mmap_write_lock_killable(mm))
354356 return -EINTR;
arch/riscv/kvm/aia.c+13−2
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #include <linux/irqchip/riscv-imsic.h>
1414 #include <linux/irqdomain.h>
1515 #include <linux/kvm_host.h>
16+#include <linux/nospec.h>
1617 #include <linux/percpu.h>
1718 #include <linux/spinlock.h>
1819 #include <asm/cpufeature.h>
@@ -182,9 +183,14 @@ int kvm_riscv_vcpu_aia_get_csr(struct kvm_vcpu *vcpu, · 163 unmodified lines
182183 unsigned long *out_val)
183184 {
184185 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr;
186+ unsigned long regs_max = sizeof(struct kvm_riscv_aia_csr) / sizeof(unsigned long);
185187
186− if (reg_num >= sizeof(struct kvm_riscv_aia_csr) / sizeof(unsigned long))
188+ if (!riscv_isa_extension_available(vcpu->arch.isa, SSAIA))
187189 return -ENOENT;
190+ if (reg_num >= regs_max)
191+ return -ENOENT;
192+
193+ reg_num = array_index_nospec(reg_num, regs_max);
188194
189195 *out_val = 0;
190196 if (kvm_riscv_aia_available())
@@ -198,9 +204,14 @@ int kvm_riscv_vcpu_aia_set_csr(struct kvm_vcpu *vcpu, · 7 unmodified lines
198204 unsigned long val)
199205 {
200206 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr;
207+ unsigned long regs_max = sizeof(struct kvm_riscv_aia_csr) / sizeof(unsigned long);
201208
202− if (reg_num >= sizeof(struct kvm_riscv_aia_csr) / sizeof(unsigned long))
209+ if (!riscv_isa_extension_available(vcpu->arch.isa, SSAIA))
203210 return -ENOENT;
211+ if (reg_num >= regs_max)
212+ return -ENOENT;
213+
214+ reg_num = array_index_nospec(reg_num, regs_max);
204215
205216 if (kvm_riscv_aia_available()) {
206217 ((unsigned long *)csr)[reg_num] = val;
arch/riscv/kvm/aia_aplic.c+12−11
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/irqchip/riscv-aplic.h>
1111 #include <linux/kvm_host.h>
1212 #include <linux/math.h>
13+#include <linux/nospec.h>
1314 #include <linux/spinlock.h>
1415 #include <linux/swab.h>
1516 #include <kvm/iodev.h>
@@ -45,7 +46,7 @@ static u32 aplic_read_sourcecfg(struct aplic *aplic, u32 irq) · 29 unmodified lines
4546
4647 if (!irq || aplic->nr_irqs <= irq)
4748 return 0;
48− irqd = &aplic->irqs[irq];
49+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
4950
5051 raw_spin_lock_irqsave(&irqd->lock, flags);
5152 ret = irqd->sourcecfg;
@@ -61,7 +62,7 @@ static void aplic_write_sourcecfg(struct aplic *aplic, u32 irq, u32 val) · 9 unmodified lines
6162
6263 if (!irq || aplic->nr_irqs <= irq)
6364 return;
64− irqd = &aplic->irqs[irq];
65+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
6566
6667 if (val & APLIC_SOURCECFG_D)
6768 val = 0;
@@ -81,7 +82,7 @@ static u32 aplic_read_target(struct aplic *aplic, u32 irq) · 13 unmodified lines
8182
8283 if (!irq || aplic->nr_irqs <= irq)
8384 return 0;
84− irqd = &aplic->irqs[irq];
85+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
8586
8687 raw_spin_lock_irqsave(&irqd->lock, flags);
8788 ret = irqd->target;
@@ -97,7 +98,7 @@ static void aplic_write_target(struct aplic *aplic, u32 irq, u32 val) · 9 unmodified lines
9798
9899 if (!irq || aplic->nr_irqs <= irq)
99100 return;
100− irqd = &aplic->irqs[irq];
101+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
101102
102103 val &= APLIC_TARGET_EIID_MASK |
103104 (APLIC_TARGET_HART_IDX_MASK << APLIC_TARGET_HART_IDX_SHIFT) |
@@ -116,7 +117,7 @@ static bool aplic_read_pending(struct aplic *aplic, u32 irq) · 12 unmodified lines
116117
117118 if (!irq || aplic->nr_irqs <= irq)
118119 return false;
119− irqd = &aplic->irqs[irq];
120+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
120121
121122 raw_spin_lock_irqsave(&irqd->lock, flags);
122123 ret = (irqd->state & APLIC_IRQ_STATE_PENDING) ? true : false;
@@ -132,7 +133,7 @@ static void aplic_write_pending(struct aplic *aplic, u32 irq, bool pending) · 9 unmodified lines
132133
133134 if (!irq || aplic->nr_irqs <= irq)
134135 return;
135− irqd = &aplic->irqs[irq];
136+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
136137
137138 raw_spin_lock_irqsave(&irqd->lock, flags);
138139
@@ -170,7 +171,7 @@ static bool aplic_read_enabled(struct aplic *aplic, u32 irq) · 31 unmodified lines
170171
171172 if (!irq || aplic->nr_irqs <= irq)
172173 return false;
173− irqd = &aplic->irqs[irq];
174+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
174175
175176 raw_spin_lock_irqsave(&irqd->lock, flags);
176177 ret = (irqd->state & APLIC_IRQ_STATE_ENABLED) ? true : false;
@@ -186,7 +187,7 @@ static void aplic_write_enabled(struct aplic *aplic, u32 irq, bool enabled) · 9 unmodified lines
186187
187188 if (!irq || aplic->nr_irqs <= irq)
188189 return;
189− irqd = &aplic->irqs[irq];
190+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
190191
191192 raw_spin_lock_irqsave(&irqd->lock, flags);
192193 if (enabled)
@@ -205,7 +206,7 @@ static bool aplic_read_input(struct aplic *aplic, u32 irq) · 12 unmodified lines
205206
206207 if (!irq || aplic->nr_irqs <= irq)
207208 return false;
208− irqd = &aplic->irqs[irq];
209+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
209210
210211 raw_spin_lock_irqsave(&irqd->lock, flags);
211212
@@ -254,7 +255,7 @@ static void aplic_update_irq_range(struct kvm *kvm, u32 first, u32 last) · 42 unmodified lines
254255 for (irq = first; irq <= last; irq++) {
255256 if (!irq || aplic->nr_irqs <= irq)
256257 continue;
257− irqd = &aplic->irqs[irq];
258+ irqd = &aplic->irqs[array_index_nospec(irq, aplic->nr_irqs)];
258259
259260 raw_spin_lock_irqsave(&irqd->lock, flags);
260261
@@ -283,7 +284,7 @@ int kvm_riscv_aia_aplic_inject(struct kvm *kvm, u32 source, bool level) · 22 unmodified lines
283284
284285 if (!aplic || !source || (aplic->nr_irqs <= source))
285286 return -ENODEV;
286− irqd = &aplic->irqs[source];
287+ irqd = &aplic->irqs[array_index_nospec(source, aplic->nr_irqs)];
287288 ie = (aplic->domaincfg & APLIC_DOMAINCFG_IE) ? true : false;
288289
289290 raw_spin_lock_irqsave(&irqd->lock, flags);
arch/riscv/kvm/aia_device.c+14−4
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/irqchip/riscv-imsic.h>
1212 #include <linux/kvm_host.h>
1313 #include <linux/uaccess.h>
14+#include <linux/cpufeature.h>
1415
1516 static int aia_create(struct kvm_device *dev, u32 type)
1617 {
@@ -22,6 +23,9 @@ static int aia_create(struct kvm_device *dev, u32 type) · 5 unmodified lines
2223 if (irqchip_in_kernel(kvm))
2324 return -EEXIST;
2425
26+ if (!riscv_isa_extension_available(NULL, SSAIA))
27+ return -ENODEV;
28+
2529 ret = -EBUSY;
2630 if (kvm_trylock_all_vcpus(kvm))
2731 return ret;
@@ -437,7 +441,7 @@ static int aia_get_attr(struct kvm_device *dev, struct kvm_device_attr *attr) · 409 unmodified lines
437441
438442 static int aia_has_attr(struct kvm_device *dev, struct kvm_device_attr *attr)
439443 {
440− int nr_vcpus;
444+ int nr_vcpus, r = -ENXIO;
441445
442446 switch (attr->group) {
443447 case KVM_DEV_RISCV_AIA_GRP_CONFIG:
@@ -466,12 +470,18 @@ static int aia_has_attr(struct kvm_device *dev, struct kvm_device_attr *attr) · 22 unmodified lines
466470 }
467471 break;
468472 case KVM_DEV_RISCV_AIA_GRP_APLIC:
469− return kvm_riscv_aia_aplic_has_attr(dev->kvm, attr->attr);
473+ mutex_lock(&dev->kvm->lock);
474+ r = kvm_riscv_aia_aplic_has_attr(dev->kvm, attr->attr);
475+ mutex_unlock(&dev->kvm->lock);
476+ break;
470477 case KVM_DEV_RISCV_AIA_GRP_IMSIC:
471− return kvm_riscv_aia_imsic_has_attr(dev->kvm, attr->attr);
478+ mutex_lock(&dev->kvm->lock);
479+ r = kvm_riscv_aia_imsic_has_attr(dev->kvm, attr->attr);
480+ mutex_unlock(&dev->kvm->lock);
481+ break;
472482 }
473483
474− return -ENXIO;
484+ return r;
475485 }
476486
477487 struct kvm_device_ops kvm_riscv_aia_device_ops = {
arch/riscv/kvm/aia_imsic.c+4−0
@@ -908,6 +908,10 @@ int kvm_riscv_vcpu_aia_imsic_rmw(struct kvm_vcpu *vcpu, unsigned long isel, · 907 unmodified lines
908908 int r, rc = KVM_INSN_CONTINUE_NEXT_SEPC;
909909 struct imsic *imsic = vcpu->arch.aia_context.imsic_state;
910910
911+ /* If IMSIC vCPU state not initialized then forward to user space */
912+ if (!imsic)
913+ return KVM_INSN_EXIT_TO_USER_SPACE;
914+
911915 if (isel == KVM_RISCV_AIA_IMSIC_TOPEI) {
912916 /* Read pending and enabled interrupt with highest priority */
913917 topei = imsic_mrif_topei(imsic->swfile, imsic->nr_eix,
arch/riscv/kvm/mmu.c+5−1
@@ -245,6 +245,7 @@ out: · 244 unmodified lines
245245 bool kvm_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range)
246246 {
247247 struct kvm_gstage gstage;
248+ bool mmu_locked;
248249
249250 if (!kvm->arch.pgd)
250251 return false;
@@ -253,9 +254,12 @@ bool kvm_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range) · 2 unmodified lines
253254 gstage.flags = 0;
254255 gstage.vmid = READ_ONCE(kvm->arch.vmid.vmid);
255256 gstage.pgd = kvm->arch.pgd;
257+ mmu_locked = spin_trylock(&kvm->mmu_lock);
256258 kvm_riscv_gstage_unmap_range(&gstage, range->start << PAGE_SHIFT,
257259 (range->end - range->start) << PAGE_SHIFT,
258260 range->may_block);
261+ if (mmu_locked)
262+ spin_unlock(&kvm->mmu_lock);
259263 return false;
260264 }
261265
@@ -535,7 +539,7 @@ int kvm_riscv_mmu_map(struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot, · 273 unmodified lines
535539 goto out_unlock;
536540
537541 /* Check if we are backed by a THP and thus use block mapping if possible */
538− if (vma_pagesize == PAGE_SIZE)
542+ if (!logging && (vma_pagesize == PAGE_SIZE))
539543 vma_pagesize = transparent_hugepage_adjust(kvm, memslot, hva, &hfn, &gpa);
540544
541545 if (writable) {
arch/riscv/kvm/vcpu.c+1−1
@@ -24,7 +24,7 @@ · 23 unmodified lines
2424 #define CREATE_TRACE_POINTS
2525 #include "trace.h"
2626
27−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
27+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
2828 KVM_GENERIC_VCPU_STATS(),
2929 STATS_DESC_COUNTER(VCPU, ecall_exit_stat),
3030 STATS_DESC_COUNTER(VCPU, wfi_exit_stat),
arch/riscv/kvm/vcpu_fp.c+13−4
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/errno.h>
1111 #include <linux/err.h>
1212 #include <linux/kvm_host.h>
13+#include <linux/nospec.h>
1314 #include <linux/uaccess.h>
1415 #include <asm/cpufeature.h>
1516
@@ -93,9 +94,11 @@ int kvm_riscv_vcpu_get_reg_fp(struct kvm_vcpu *vcpu, · 77 unmodified lines
9394 if (reg_num == KVM_REG_RISCV_FP_F_REG(fcsr))
9495 reg_val = &cntx->fp.f.fcsr;
9596 else if ((KVM_REG_RISCV_FP_F_REG(f[0]) <= reg_num) &&
96− reg_num <= KVM_REG_RISCV_FP_F_REG(f[31]))
97+ reg_num <= KVM_REG_RISCV_FP_F_REG(f[31])) {
98+ reg_num = array_index_nospec(reg_num,
99+ ARRAY_SIZE(cntx->fp.f.f));
97100 reg_val = &cntx->fp.f.f[reg_num];
98− else
101+ } else
99102 return -ENOENT;
100103 } else if ((rtype == KVM_REG_RISCV_FP_D) &&
101104 riscv_isa_extension_available(vcpu->arch.isa, d)) {
@@ -107,6 +110,8 @@ int kvm_riscv_vcpu_get_reg_fp(struct kvm_vcpu *vcpu, · 5 unmodified lines
107110 reg_num <= KVM_REG_RISCV_FP_D_REG(f[31])) {
108111 if (KVM_REG_SIZE(reg->id) != sizeof(u64))
109112 return -EINVAL;
113+ reg_num = array_index_nospec(reg_num,
114+ ARRAY_SIZE(cntx->fp.d.f));
110115 reg_val = &cntx->fp.d.f[reg_num];
111116 } else
112117 return -ENOENT;
@@ -138,9 +143,11 @@ int kvm_riscv_vcpu_set_reg_fp(struct kvm_vcpu *vcpu, · 25 unmodified lines
138143 if (reg_num == KVM_REG_RISCV_FP_F_REG(fcsr))
139144 reg_val = &cntx->fp.f.fcsr;
140145 else if ((KVM_REG_RISCV_FP_F_REG(f[0]) <= reg_num) &&
141− reg_num <= KVM_REG_RISCV_FP_F_REG(f[31]))
146+ reg_num <= KVM_REG_RISCV_FP_F_REG(f[31])) {
147+ reg_num = array_index_nospec(reg_num,
148+ ARRAY_SIZE(cntx->fp.f.f));
142149 reg_val = &cntx->fp.f.f[reg_num];
143− else
150+ } else
144151 return -ENOENT;
145152 } else if ((rtype == KVM_REG_RISCV_FP_D) &&
146153 riscv_isa_extension_available(vcpu->arch.isa, d)) {
@@ -152,6 +159,8 @@ int kvm_riscv_vcpu_set_reg_fp(struct kvm_vcpu *vcpu, · 5 unmodified lines
152159 reg_num <= KVM_REG_RISCV_FP_D_REG(f[31])) {
153160 if (KVM_REG_SIZE(reg->id) != sizeof(u64))
154161 return -EINVAL;
162+ reg_num = array_index_nospec(reg_num,
163+ ARRAY_SIZE(cntx->fp.d.f));
155164 reg_val = &cntx->fp.d.f[reg_num];
156165 } else
157166 return -ENOENT;
arch/riscv/kvm/vcpu_onereg.c+36−18
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/bitops.h>
1111 #include <linux/errno.h>
1212 #include <linux/err.h>
13+#include <linux/nospec.h>
1314 #include <linux/uaccess.h>
1415 #include <linux/kvm_host.h>
1516 #include <asm/cacheflush.h>
@@ -127,6 +128,7 @@ static int kvm_riscv_vcpu_isa_check_host(unsigned long kvm_ext, unsigned long *g · 111 unmodified lines
127128 kvm_ext >= ARRAY_SIZE(kvm_isa_ext_arr))
128129 return -ENOENT;
129130
131+ kvm_ext = array_index_nospec(kvm_ext, ARRAY_SIZE(kvm_isa_ext_arr));
130132 *guest_ext = kvm_isa_ext_arr[kvm_ext];
131133 switch (*guest_ext) {
132134 case RISCV_ISA_EXT_SMNPM:
@@ -443,13 +445,16 @@ static int kvm_riscv_vcpu_get_reg_core(struct kvm_vcpu *vcpu, · 310 unmodified lines
443445 unsigned long reg_num = reg->id & ~(KVM_REG_ARCH_MASK |
444446 KVM_REG_SIZE_MASK |
445447 KVM_REG_RISCV_CORE);
448+ unsigned long regs_max = sizeof(struct kvm_riscv_core) / sizeof(unsigned long);
446449 unsigned long reg_val;
447450
448451 if (KVM_REG_SIZE(reg->id) != sizeof(unsigned long))
449452 return -EINVAL;
450− if (reg_num >= sizeof(struct kvm_riscv_core) / sizeof(unsigned long))
453+ if (reg_num >= regs_max)
451454 return -ENOENT;
452455
456+ reg_num = array_index_nospec(reg_num, regs_max);
457+
453458 if (reg_num == KVM_REG_RISCV_CORE_REG(regs.pc))
454459 reg_val = cntx->sepc;
455460 else if (KVM_REG_RISCV_CORE_REG(regs.pc) < reg_num &&
@@ -476,13 +481,16 @@ static int kvm_riscv_vcpu_set_reg_core(struct kvm_vcpu *vcpu, · 20 unmodified lines
476481 unsigned long reg_num = reg->id & ~(KVM_REG_ARCH_MASK |
477482 KVM_REG_SIZE_MASK |
478483 KVM_REG_RISCV_CORE);
484+ unsigned long regs_max = sizeof(struct kvm_riscv_core) / sizeof(unsigned long);
479485 unsigned long reg_val;
480486
481487 if (KVM_REG_SIZE(reg->id) != sizeof(unsigned long))
482488 return -EINVAL;
483− if (reg_num >= sizeof(struct kvm_riscv_core) / sizeof(unsigned long))
489+ if (reg_num >= regs_max)
484490 return -ENOENT;
485491
492+ reg_num = array_index_nospec(reg_num, regs_max);
493+
486494 if (copy_from_user(&reg_val, uaddr, KVM_REG_SIZE(reg->id)))
487495 return -EFAULT;
488496
@@ -507,10 +515,13 @@ static int kvm_riscv_vcpu_general_get_csr(struct kvm_vcpu *vcpu, · 18 unmodified lines
507515 unsigned long *out_val)
508516 {
509517 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr;
518+ unsigned long regs_max = sizeof(struct kvm_riscv_csr) / sizeof(unsigned long);
510519
511− if (reg_num >= sizeof(struct kvm_riscv_csr) / sizeof(unsigned long))
520+ if (reg_num >= regs_max)
512521 return -ENOENT;
513522
523+ reg_num = array_index_nospec(reg_num, regs_max);
524+
514525 if (reg_num == KVM_REG_RISCV_CSR_REG(sip)) {
515526 kvm_riscv_vcpu_flush_interrupts(vcpu);
516527 *out_val = (csr->hvip >> VSIP_TO_HVIP_SHIFT) & VSIP_VALID_MASK;
@@ -526,10 +537,13 @@ static int kvm_riscv_vcpu_general_set_csr(struct kvm_vcpu *vcpu, · 9 unmodified lines
526537 unsigned long reg_val)
527538 {
528539 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr;
540+ unsigned long regs_max = sizeof(struct kvm_riscv_csr) / sizeof(unsigned long);
529541
530− if (reg_num >= sizeof(struct kvm_riscv_csr) / sizeof(unsigned long))
542+ if (reg_num >= regs_max)
531543 return -ENOENT;
532544
545+ reg_num = array_index_nospec(reg_num, regs_max);
546+
533547 if (reg_num == KVM_REG_RISCV_CSR_REG(sip)) {
534548 reg_val &= VSIP_VALID_MASK;
535549 reg_val <<= VSIP_TO_HVIP_SHIFT;
@@ -548,10 +562,15 @@ static inline int kvm_riscv_vcpu_smstateen_set_csr(struct kvm_vcpu *vcpu, · 12 unmodified lines
548562 unsigned long reg_val)
549563 {
550564 struct kvm_vcpu_smstateen_csr *csr = &vcpu->arch.smstateen_csr;
565+ unsigned long regs_max = sizeof(struct kvm_riscv_smstateen_csr) /
566+ sizeof(unsigned long);
551567
552− if (reg_num >= sizeof(struct kvm_riscv_smstateen_csr) /
553− sizeof(unsigned long))
554− return -EINVAL;
568+ if (!riscv_isa_extension_available(vcpu->arch.isa, SMSTATEEN))
569+ return -ENOENT;
570+ if (reg_num >= regs_max)
571+ return -ENOENT;
572+
573+ reg_num = array_index_nospec(reg_num, regs_max);
555574
556575 ((unsigned long *)csr)[reg_num] = reg_val;
557576 return 0;
@@ -562,10 +581,15 @@ static int kvm_riscv_vcpu_smstateen_get_csr(struct kvm_vcpu *vcpu, · 4 unmodified lines
562581 unsigned long *out_val)
563582 {
564583 struct kvm_vcpu_smstateen_csr *csr = &vcpu->arch.smstateen_csr;
584+ unsigned long regs_max = sizeof(struct kvm_riscv_smstateen_csr) /
585+ sizeof(unsigned long);
565586
566− if (reg_num >= sizeof(struct kvm_riscv_smstateen_csr) /
567− sizeof(unsigned long))
568− return -EINVAL;
587+ if (!riscv_isa_extension_available(vcpu->arch.isa, SMSTATEEN))
588+ return -ENOENT;
589+ if (reg_num >= regs_max)
590+ return -ENOENT;
591+
592+ reg_num = array_index_nospec(reg_num, regs_max);
569593
570594 *out_val = ((unsigned long *)csr)[reg_num];
571595 return 0;
@@ -595,10 +619,7 @@ static int kvm_riscv_vcpu_get_reg_csr(struct kvm_vcpu *vcpu, · 23 unmodified lines
595619 rc = kvm_riscv_vcpu_aia_get_csr(vcpu, reg_num, &reg_val);
596620 break;
597621 case KVM_REG_RISCV_CSR_SMSTATEEN:
598− rc = -EINVAL;
599− if (riscv_has_extension_unlikely(RISCV_ISA_EXT_SMSTATEEN))
600− rc = kvm_riscv_vcpu_smstateen_get_csr(vcpu, reg_num,
601− &reg_val);
622+ rc = kvm_riscv_vcpu_smstateen_get_csr(vcpu, reg_num, &reg_val);
602623 break;
603624 default:
604625 rc = -ENOENT;
@@ -640,10 +661,7 @@ static int kvm_riscv_vcpu_set_reg_csr(struct kvm_vcpu *vcpu, · 35 unmodified lines
640661 rc = kvm_riscv_vcpu_aia_set_csr(vcpu, reg_num, reg_val);
641662 break;
642663 case KVM_REG_RISCV_CSR_SMSTATEEN:
643− rc = -EINVAL;
644− if (riscv_has_extension_unlikely(RISCV_ISA_EXT_SMSTATEEN))
645− rc = kvm_riscv_vcpu_smstateen_set_csr(vcpu, reg_num,
646− reg_val);
664+ rc = kvm_riscv_vcpu_smstateen_set_csr(vcpu, reg_num, reg_val);
647665 break;
648666 default:
649667 rc = -ENOENT;
arch/riscv/kvm/vcpu_pmu.c+12−4
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/errno.h>
1111 #include <linux/err.h>
1212 #include <linux/kvm_host.h>
13+#include <linux/nospec.h>
1314 #include <linux/perf/riscv_pmu.h>
1415 #include <asm/csr.h>
1516 #include <asm/kvm_vcpu_sbi.h>
@@ -87,7 +88,8 @@ static void kvm_pmu_release_perf_event(struct kvm_pmc *pmc) · 71 unmodified lines
8788
8889 static u64 kvm_pmu_get_perf_event_hw_config(u32 sbi_event_code)
8990 {
90− return hw_event_perf_map[sbi_event_code];
91+ return hw_event_perf_map[array_index_nospec(sbi_event_code,
92+ SBI_PMU_HW_GENERAL_MAX)];
9193 }
9294
9395 static u64 kvm_pmu_get_perf_event_cache_config(u32 sbi_event_code)
@@ -218,6 +220,7 @@ static int pmu_fw_ctr_read_hi(struct kvm_vcpu *vcpu, unsigned long cidx, · 124 unmodified lines
218220 return -EINVAL;
219221 }
220222
223+ cidx = array_index_nospec(cidx, RISCV_KVM_MAX_COUNTERS);
221224 pmc = &kvpmu->pmc[cidx];
222225
223226 if (pmc->cinfo.type != SBI_PMU_CTR_TYPE_FW)
@@ -244,6 +247,7 @@ static int pmu_ctr_read(struct kvm_vcpu *vcpu, unsigned long cidx, · 20 unmodified lines
244247 return -EINVAL;
245248 }
246249
250+ cidx = array_index_nospec(cidx, RISCV_KVM_MAX_COUNTERS);
247251 pmc = &kvpmu->pmc[cidx];
248252
249253 if (pmc->cinfo.type == SBI_PMU_CTR_TYPE_FW) {
@@ -520,11 +524,12 @@ int kvm_riscv_vcpu_pmu_ctr_info(struct kvm_vcpu *vcpu, unsigned long cidx, · 270 unmodified lines
520524 {
521525 struct kvm_pmu *kvpmu = vcpu_to_pmu(vcpu);
522526
523− if (cidx > RISCV_KVM_MAX_COUNTERS || cidx == 1) {
527+ if (cidx >= RISCV_KVM_MAX_COUNTERS || cidx == 1) {
524528 retdata->err_val = SBI_ERR_INVALID_PARAM;
525529 return 0;
526530 }
527531
532+ cidx = array_index_nospec(cidx, RISCV_KVM_MAX_COUNTERS);
528533 retdata->out_val = kvpmu->pmc[cidx].cinfo.value;
529534
530535 return 0;
@@ -559,7 +564,8 @@ int kvm_riscv_vcpu_pmu_ctr_start(struct kvm_vcpu *vcpu, unsigned long ctr_base, · 28 unmodified lines
559564 }
560565 /* Start the counters that have been configured and requested by the guest */
561566 for_each_set_bit(i, &ctr_mask, RISCV_MAX_COUNTERS) {
562− pmc_index = i + ctr_base;
567+ pmc_index = array_index_nospec(i + ctr_base,
568+ RISCV_KVM_MAX_COUNTERS);
563569 if (!test_bit(pmc_index, kvpmu->pmc_in_use))
564570 continue;
565571 /* The guest started the counter again. Reset the overflow status */
@@ -630,7 +636,8 @@ int kvm_riscv_vcpu_pmu_ctr_stop(struct kvm_vcpu *vcpu, unsigned long ctr_base, · 64 unmodified lines
630636
631637 /* Stop the counters that have been configured and requested by the guest */
632638 for_each_set_bit(i, &ctr_mask, RISCV_MAX_COUNTERS) {
633− pmc_index = i + ctr_base;
639+ pmc_index = array_index_nospec(i + ctr_base,
640+ RISCV_KVM_MAX_COUNTERS);
634641 if (!test_bit(pmc_index, kvpmu->pmc_in_use))
635642 continue;
636643 pmc = &kvpmu->pmc[pmc_index];
@@ -761,6 +768,7 @@ int kvm_riscv_vcpu_pmu_ctr_cfg_match(struct kvm_vcpu *vcpu, unsigned long ctr_ba · 124 unmodified lines
761768 }
762769 }
763770
771+ ctr_idx = array_index_nospec(ctr_idx, RISCV_KVM_MAX_COUNTERS);
764772 pmc = &kvpmu->pmc[ctr_idx];
765773 pmc->idx = ctr_idx;
766774
arch/riscv/kvm/vm.c+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 #include <linux/kvm_host.h>
1414 #include <asm/kvm_mmu.h>
1515
16−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
16+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
1717 KVM_GENERIC_VM_STATS()
1818 };
1919 static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
arch/s390/include/asm/barrier.h+2−2
@@ -62,8 +62,8 @@ do { \ · 61 unmodified lines
6262 * @size: number of elements in array
6363 */
6464 #define array_index_mask_nospec array_index_mask_nospec
65−static inline unsigned long array_index_mask_nospec(unsigned long index,
66− unsigned long size)
65+static __always_inline unsigned long array_index_mask_nospec(unsigned long index,
66+ unsigned long size)
6767 {
6868 unsigned long mask;
6969
arch/s390/include/asm/kvm_host.h+3−0
@@ -710,6 +710,9 @@ void kvm_arch_crypto_clear_masks(struct kvm *kvm); · 709 unmodified lines
710710 void kvm_arch_crypto_set_masks(struct kvm *kvm, unsigned long *apm,
711711 unsigned long *aqm, unsigned long *adm);
712712
713+#define SIE64_RETURN_NORMAL 0
714+#define SIE64_RETURN_MCCK 1
715+
713716 int __sie64a(phys_addr_t sie_block_phys, struct kvm_s390_sie_block *sie_block, u64 *rsa,
714717 unsigned long gasce);
715718
arch/s390/include/asm/stacktrace.h+1−1
@@ -62,7 +62,7 @@ struct stack_frame { · 61 unmodified lines
6262 struct {
6363 unsigned long sie_control_block;
6464 unsigned long sie_savearea;
65− unsigned long sie_reason;
65+ unsigned long sie_return;
6666 unsigned long sie_flags;
6767 unsigned long sie_control_block_phys;
6868 unsigned long sie_guest_asce;
arch/s390/kernel/asm-offsets.c+1−1
@@ -63,7 +63,7 @@ int main(void) · 62 unmodified lines
6363 OFFSET(__SF_EMPTY, stack_frame, empty[0]);
6464 OFFSET(__SF_SIE_CONTROL, stack_frame, sie_control_block);
6565 OFFSET(__SF_SIE_SAVEAREA, stack_frame, sie_savearea);
66− OFFSET(__SF_SIE_REASON, stack_frame, sie_reason);
66+ OFFSET(__SF_SIE_RETURN, stack_frame, sie_return);
6767 OFFSET(__SF_SIE_FLAGS, stack_frame, sie_flags);
6868 OFFSET(__SF_SIE_CONTROL_PHYS, stack_frame, sie_control_block_phys);
6969 OFFSET(__SF_SIE_GUEST_ASCE, stack_frame, sie_guest_asce);
arch/s390/kernel/entry.S+5−2
@@ -200,7 +200,7 @@ SYM_FUNC_START(__sie64a) · 199 unmodified lines
200200 stg %r3,__SF_SIE_CONTROL(%r15) # ...and virtual addresses
201201 stg %r4,__SF_SIE_SAVEAREA(%r15) # save guest register save area
202202 stg %r5,__SF_SIE_GUEST_ASCE(%r15) # save guest asce
203− xc __SF_SIE_REASON(8,%r15),__SF_SIE_REASON(%r15) # reason code = 0
203+ xc __SF_SIE_RETURN(8,%r15),__SF_SIE_RETURN(%r15) # return code = 0
204204 mvc __SF_SIE_FLAGS(8,%r15),__TI_flags(%r14) # copy thread flags
205205 lmg %r0,%r13,0(%r4) # load guest gprs 0-13
206206 mvi __TI_sie(%r14),1
@@ -237,7 +237,7 @@ SYM_INNER_LABEL(sie_exit, SYM_L_GLOBAL) · 30 unmodified lines
237237 xgr %r4,%r4
238238 xgr %r5,%r5
239239 lmg %r6,%r14,__SF_GPRS(%r15) # restore kernel registers
240− lg %r2,__SF_SIE_REASON(%r15) # return exit reason code
240+ lg %r2,__SF_SIE_RETURN(%r15) # return sie return code
241241 BR_EX %r14
242242 SYM_FUNC_END(__sie64a)
243243 EXPORT_SYMBOL(__sie64a)
@@ -271,6 +271,7 @@ SYM_CODE_START(system_call) · 27 unmodified lines
271271 xgr %r9,%r9
272272 xgr %r10,%r10
273273 xgr %r11,%r11
274+ xgr %r12,%r12
274275 la %r2,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs
275276 mvc __PT_R8(64,%r2),__LC_SAVE_AREA(%r13)
276277 MBEAR %r2,%r13
@@ -407,6 +408,7 @@ SYM_CODE_START(\name) · 130 unmodified lines
407408 xgr %r6,%r6
408409 xgr %r7,%r7
409410 xgr %r10,%r10
411+ xgr %r12,%r12
410412 xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
411413 mvc __PT_R8(64,%r11),__LC_SAVE_AREA(%r13)
412414 MBEAR %r11,%r13
@@ -496,6 +498,7 @@ SYM_CODE_START(mcck_int_handler) · 83 unmodified lines
496498 xgr %r6,%r6
497499 xgr %r7,%r7
498500 xgr %r10,%r10
501+ xgr %r12,%r12
499502 stmg %r8,%r9,__PT_PSW(%r11)
500503 xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
501504 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
arch/s390/kernel/irq.c+8−6
@@ -147,10 +147,8 @@ void noinstr do_io_irq(struct pt_regs *regs) · 146 unmodified lines
147147 bool from_idle;
148148
149149 from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
150− if (from_idle) {
150+ if (from_idle)
151151 update_timer_idle();
152− regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
153− }
154152
155153 irq_enter_rcu();
156154
@@ -176,6 +174,9 @@ void noinstr do_io_irq(struct pt_regs *regs) · 19 unmodified lines
176174
177175 set_irq_regs(old_regs);
178176 irqentry_exit(regs, state);
177+
178+ if (from_idle)
179+ regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
179180 }
180181
181182 void noinstr do_ext_irq(struct pt_regs *regs)
@@ -185,10 +186,8 @@ void noinstr do_ext_irq(struct pt_regs *regs) · 3 unmodified lines
185186 bool from_idle;
186187
187188 from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
188− if (from_idle) {
189+ if (from_idle)
189190 update_timer_idle();
190− regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
191− }
192191
193192 irq_enter_rcu();
194193
@@ -210,6 +209,9 @@ void noinstr do_ext_irq(struct pt_regs *regs) · 15 unmodified lines
210209 irq_exit_rcu();
211210 set_irq_regs(old_regs);
212211 irqentry_exit(regs, state);
212+
213+ if (from_idle)
214+ regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
213215 }
214216
215217 static void show_msi_interrupt(struct seq_file *p, int irq)
arch/s390/kernel/nmi.c+2−2
@@ -487,8 +487,8 @@ void notrace s390_do_machine_check(struct pt_regs *regs) · 486 unmodified lines
487487 mcck_dam_code = (mci.val & MCIC_SUBCLASS_MASK);
488488 if (test_cpu_flag(CIF_MCCK_GUEST) &&
489489 (mcck_dam_code & MCCK_CODE_NO_GUEST) != mcck_dam_code) {
490− /* Set exit reason code for host's later handling */
491− *((long *)(regs->gprs[15] + __SF_SIE_REASON)) = -EINTR;
490+ /* Set sie return code for host's later handling */
491+ ((struct stack_frame *)regs->gprs[15])->sie_return = SIE64_RETURN_MCCK;
492492 }
493493 clear_cpu_flag(CIF_MCCK_GUEST);
494494
arch/s390/kernel/perf_cpum_sf.c+5−1
@@ -1168,6 +1168,7 @@ static void hw_collect_samples(struct perf_event *event, unsigned long *sdbt, · 1167 unmodified lines
11681168 static void hw_perf_event_update(struct perf_event *event, int flush_all)
11691169 {
11701170 unsigned long long event_overflow, sampl_overflow, num_sdb;
1171+ struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
11711172 struct hw_perf_event *hwc = &event->hw;
11721173 union hws_trailer_header prev, new;
11731174 struct hws_trailer_entry *te;
@@ -1247,8 +1248,11 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all) · 73 unmodified lines
12471248 * are dropped.
12481249 * Slightly increase the interval to avoid hitting this limit.
12491250 */
1250− if (event_overflow)
1251+ if (event_overflow) {
12511252 SAMPL_RATE(hwc) += DIV_ROUND_UP(SAMPL_RATE(hwc), 10);
1253+ if (SAMPL_RATE(hwc) > cpuhw->qsi.max_sampl_rate)
1254+ SAMPL_RATE(hwc) = cpuhw->qsi.max_sampl_rate;
1255+ }
12521256 }
12531257
12541258 static inline unsigned long aux_sdb_index(struct aux_buffer *aux,
arch/s390/kernel/syscall.c+4−1
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 */
1414
1515 #include <linux/cpufeature.h>
16+#include <linux/nospec.h>
1617 #include <linux/errno.h>
1718 #include <linux/sched.h>
1819 #include <linux/mm.h>
@@ -131,8 +132,10 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap) · 112 unmodified lines
131132 if (unlikely(test_and_clear_pt_regs_flag(regs, PIF_SYSCALL_RET_SET)))
132133 goto out;
133134 regs->gprs[2] = -ENOSYS;
134− if (likely(nr < NR_syscalls))
135+ if (likely(nr < NR_syscalls)) {
136+ nr = array_index_nospec(nr, NR_syscalls);
135137 regs->gprs[2] = sys_call_table[nr](regs);
138+ }
136139 out:
137140 syscall_exit_to_user_mode(regs);
138141 }
arch/s390/kvm/dat.c+15−85
@@ -134,32 +134,6 @@ int dat_set_asce_limit(struct kvm_s390_mmu_cache *mc, union asce *asce, int newt · 133 unmodified lines
134134 return 0;
135135 }
136136
137−/**
138− * dat_crstep_xchg() - Exchange a gmap CRSTE with another.
139− * @crstep: Pointer to the CRST entry
140− * @new: Replacement entry.
141− * @gfn: The affected guest address.
142− * @asce: The ASCE of the address space.
143− *
144− * Context: This function is assumed to be called with kvm->mmu_lock held.
145− */
146−void dat_crstep_xchg(union crste *crstep, union crste new, gfn_t gfn, union asce asce)
147−{
148− if (crstep->h.i) {
149− WRITE_ONCE(*crstep, new);
150− return;
151− } else if (cpu_has_edat2()) {
152− crdte_crste(crstep, *crstep, new, gfn, asce);
153− return;
154− }
155−
156− if (machine_has_tlb_guest())
157− idte_crste(crstep, gfn, IDTE_GUEST_ASCE, asce, IDTE_GLOBAL);
158− else
159− idte_crste(crstep, gfn, 0, NULL_ASCE, IDTE_GLOBAL);
160− WRITE_ONCE(*crstep, new);
161−}
162−
163137 /**
164138 * dat_crstep_xchg_atomic() - Atomically exchange a gmap CRSTE with another.
165139 * @crstep: Pointer to the CRST entry.
@@ -175,8 +149,8 @@ void dat_crstep_xchg(union crste *crstep, union crste new, gfn_t gfn, union asce · 9 unmodified lines
175149 *
176150 * Return: %true if the exchange was successful.
177151 */
178−bool dat_crstep_xchg_atomic(union crste *crstep, union crste old, union crste new, gfn_t gfn,
179− union asce asce)
152+bool __must_check dat_crstep_xchg_atomic(union crste *crstep, union crste old, union crste new,
153+ gfn_t gfn, union asce asce)
180154 {
181155 if (old.h.i)
182156 return arch_try_cmpxchg((long *)crstep, &old.val, new.val);
@@ -292,6 +266,7 @@ static int dat_split_ste(struct kvm_s390_mmu_cache *mc, union pmd *pmdp, gfn_t g · 109 unmodified lines
292266 pt->ptes[i].val = init.val | i * PAGE_SIZE;
293267 /* No need to take locks as the page table is not installed yet. */
294268 pgste_init.prefix_notif = old.s.fc1.prefix_notif;
269+ pgste_init.vsie_notif = old.s.fc1.vsie_notif;
295270 pgste_init.pcl = uses_skeys && init.h.i;
296271 dat_init_pgstes(pt, pgste_init.val);
297272 } else {
@@ -893,7 +868,8 @@ static long _dat_slot_crste(union crste *crstep, gfn_t gfn, gfn_t next, struct d · 595 unmodified lines
893868
894869 /* This table entry needs to be updated. */
895870 if (walk->start <= gfn && walk->end >= next) {
896− dat_crstep_xchg_atomic(crstep, crste, new_crste, gfn, walk->asce);
871+ if (!dat_crstep_xchg_atomic(crstep, crste, new_crste, gfn, walk->asce))
872+ return -EINVAL;
897873 /* A lower level table was present, needs to be freed. */
898874 if (!crste.h.fc && !crste.h.i) {
899875 if (is_pmd(crste))
@@ -1021,67 +997,21 @@ bool dat_test_age_gfn(union asce asce, gfn_t start, gfn_t end) · 121 unmodified lines
1021997 return _dat_walk_gfn_range(start, end, asce, &test_age_ops, 0, NULL) > 0;
1022998 }
1023999
1024−int dat_link(struct kvm_s390_mmu_cache *mc, union asce asce, int level,
1025− bool uses_skeys, struct guest_fault *f)
1026−{
1027− union crste oldval, newval;
1028− union pte newpte, oldpte;
1029− union pgste pgste;
1030− int rc = 0;
1031−
1032− rc = dat_entry_walk(mc, f->gfn, asce, DAT_WALK_ALLOC_CONTINUE, level, &f->crstep, &f->ptep);
1033− if (rc == -EINVAL || rc == -ENOMEM)
1034− return rc;
1035− if (rc)
1036− return -EAGAIN;
1037−
1038− if (WARN_ON_ONCE(unlikely(get_level(f->crstep, f->ptep) > level)))
1039− return -EINVAL;
1040−
1041− if (f->ptep) {
1042− pgste = pgste_get_lock(f->ptep);
1043− oldpte = *f->ptep;
1044− newpte = _pte(f->pfn, f->writable, f->write_attempt | oldpte.s.d, !f->page);
1045− newpte.s.sd = oldpte.s.sd;
1046− oldpte.s.sd = 0;
1047− if (oldpte.val == _PTE_EMPTY.val || oldpte.h.pfra == f->pfn) {
1048− pgste = __dat_ptep_xchg(f->ptep, pgste, newpte, f->gfn, asce, uses_skeys);
1049− if (f->callback)
1050− f->callback(f);
1051− } else {
1052− rc = -EAGAIN;
1053− }
1054− pgste_set_unlock(f->ptep, pgste);
1055− } else {
1056− oldval = READ_ONCE(*f->crstep);
1057− newval = _crste_fc1(f->pfn, oldval.h.tt, f->writable,
1058− f->write_attempt | oldval.s.fc1.d);
1059− newval.s.fc1.sd = oldval.s.fc1.sd;
1060− if (oldval.val != _CRSTE_EMPTY(oldval.h.tt).val &&
1061− crste_origin_large(oldval) != crste_origin_large(newval))
1062− return -EAGAIN;
1063− if (!dat_crstep_xchg_atomic(f->crstep, oldval, newval, f->gfn, asce))
1064− return -EAGAIN;
1065− if (f->callback)
1066− f->callback(f);
1067− }
1068−
1069− return rc;
1070−}
1071−
10721000 static long dat_set_pn_crste(union crste *crstep, gfn_t gfn, gfn_t next, struct dat_walk *walk)
10731001 {
1074− union crste crste = READ_ONCE(*crstep);
1002+ union crste newcrste, oldcrste;
10751003 int *n = walk->priv;
10761004
1077− if (!crste.h.fc || crste.h.i || crste.h.p)
1078− return 0;
1079−
1005+ do {
1006+ oldcrste = READ_ONCE(*crstep);
1007+ if (!oldcrste.h.fc || oldcrste.h.i || oldcrste.h.p)
1008+ return 0;
1009+ if (oldcrste.s.fc1.prefix_notif)
1010+ break;
1011+ newcrste = oldcrste;
1012+ newcrste.s.fc1.prefix_notif = 1;
1013+ } while (!dat_crstep_xchg_atomic(crstep, oldcrste, newcrste, gfn, walk->asce));
10801014 *n = 2;
1081− if (crste.s.fc1.prefix_notif)
1082− return 0;
1083− crste.s.fc1.prefix_notif = 1;
1084− dat_crstep_xchg(crstep, crste, gfn, walk->asce);
10851015 return 0;
10861016 }
10871017
arch/s390/kvm/dat.h+12−11
@@ -160,14 +160,14 @@ union pmd { · 159 unmodified lines
160160 unsigned long :44; /* HW */
161161 unsigned long : 3; /* Unused */
162162 unsigned long : 1; /* HW */
163+ unsigned long s : 1; /* Special */
163164 unsigned long w : 1; /* Writable soft-bit */
164165 unsigned long r : 1; /* Readable soft-bit */
165166 unsigned long d : 1; /* Dirty */
166167 unsigned long y : 1; /* Young */
167− unsigned long prefix_notif : 1; /* Guest prefix invalidation notification */
168168 unsigned long : 3; /* HW */
169+ unsigned long prefix_notif : 1; /* Guest prefix invalidation notification */
169170 unsigned long vsie_notif : 1; /* Referenced in a shadow table */
170− unsigned long : 1; /* Unused */
171171 unsigned long : 4; /* HW */
172172 unsigned long sd : 1; /* Soft-Dirty */
173173 unsigned long pr : 1; /* Present */
@@ -183,14 +183,14 @@ union pud { · 9 unmodified lines
183183 unsigned long :33; /* HW */
184184 unsigned long :14; /* Unused */
185185 unsigned long : 1; /* HW */
186+ unsigned long s : 1; /* Special */
186187 unsigned long w : 1; /* Writable soft-bit */
187188 unsigned long r : 1; /* Readable soft-bit */
188189 unsigned long d : 1; /* Dirty */
189190 unsigned long y : 1; /* Young */
190− unsigned long prefix_notif : 1; /* Guest prefix invalidation notification */
191191 unsigned long : 3; /* HW */
192+ unsigned long prefix_notif : 1; /* Guest prefix invalidation notification */
192193 unsigned long vsie_notif : 1; /* Referenced in a shadow table */
193− unsigned long : 1; /* Unused */
194194 unsigned long : 4; /* HW */
195195 unsigned long sd : 1; /* Soft-Dirty */
196196 unsigned long pr : 1; /* Present */
@@ -254,14 +254,14 @@ union crste { · 57 unmodified lines
254254 struct {
255255 unsigned long :47;
256256 unsigned long : 1; /* HW (should be 0) */
257+ unsigned long s : 1; /* Special */
257258 unsigned long w : 1; /* Writable */
258259 unsigned long r : 1; /* Readable */
259260 unsigned long d : 1; /* Dirty */
260261 unsigned long y : 1; /* Young */
261− unsigned long prefix_notif : 1; /* Guest prefix invalidation notification */
262262 unsigned long : 3; /* HW */
263+ unsigned long prefix_notif : 1; /* Guest prefix invalidation notification */
263264 unsigned long vsie_notif : 1; /* Referenced in a shadow table */
264− unsigned long : 1;
265265 unsigned long : 4; /* HW */
266266 unsigned long sd : 1; /* Soft-Dirty */
267267 unsigned long pr : 1; /* Present */
@@ -540,8 +540,6 @@ int dat_set_slot(struct kvm_s390_mmu_cache *mc, union asce asce, gfn_t start, gf · 272 unmodified lines
540540 u16 type, u16 param);
541541 int dat_set_prefix_notif_bit(union asce asce, gfn_t gfn);
542542 bool dat_test_age_gfn(union asce asce, gfn_t start, gfn_t end);
543−int dat_link(struct kvm_s390_mmu_cache *mc, union asce asce, int level,
544− bool uses_skeys, struct guest_fault *f);
545543
546544 int dat_perform_essa(union asce asce, gfn_t gfn, int orc, union essa_state *state, bool *dirty);
547545 long dat_reset_cmma(union asce asce, gfn_t start_gfn);
@@ -938,11 +936,14 @@ static inline bool dat_pudp_xchg_atomic(union pud *pudp, union pud old, union pu · 390 unmodified lines
938936 return dat_crstep_xchg_atomic(_CRSTEP(pudp), _CRSTE(old), _CRSTE(new), gfn, asce);
939937 }
940938
941−static inline void dat_crstep_clear(union crste *crstep, gfn_t gfn, union asce asce)
939+static inline union crste dat_crstep_clear_atomic(union crste *crstep, gfn_t gfn, union asce asce)
942940 {
943− union crste newcrste = _CRSTE_EMPTY(crstep->h.tt);
941+ union crste oldcrste, empty = _CRSTE_EMPTY(crstep->h.tt);
944942
945− dat_crstep_xchg(crstep, newcrste, gfn, asce);
943+ do {
944+ oldcrste = READ_ONCE(*crstep);
945+ } while (!dat_crstep_xchg_atomic(crstep, oldcrste, empty, gfn, asce));
946+ return oldcrste;
946947 }
947948
948949 static inline int get_level(union crste *crstep, union pte *ptep)
arch/s390/kvm/gaccess.c+55−22
@@ -1434,17 +1434,27 @@ static int _do_shadow_pte(struct gmap *sg, gpa_t raddr, union pte *ptep_h, union · 1433 unmodified lines
14341434 if (rc)
14351435 return rc;
14361436
1437− pgste = pgste_get_lock(ptep_h);
1438− newpte = _pte(f->pfn, f->writable, !p, 0);
1439− newpte.s.d |= ptep->s.d;
1440− newpte.s.sd |= ptep->s.sd;
1441− newpte.h.p &= ptep->h.p;
1442− pgste = _gmap_ptep_xchg(sg->parent, ptep_h, newpte, pgste, f->gfn, false);
1443− pgste.vsie_notif = 1;
1437+ if (!pgste_get_trylock(ptep_h, &pgste))
1438+ return -EAGAIN;
1439+ newpte = _pte(f->pfn, f->writable, !p, ptep_h->s.s);
1440+ newpte.s.d |= ptep_h->s.d;
1441+ newpte.s.sd |= ptep_h->s.sd;
1442+ newpte.h.p &= ptep_h->h.p;
1443+ if (!newpte.h.p && !f->writable) {
1444+ rc = -EOPNOTSUPP;
1445+ } else {
1446+ pgste = _gmap_ptep_xchg(sg->parent, ptep_h, newpte, pgste, f->gfn, false);
1447+ pgste.vsie_notif = 1;
1448+ }
14441449 pgste_set_unlock(ptep_h, pgste);
1450+ if (rc)
1451+ return rc;
1452+ if (!sg->parent)
1453+ return -EAGAIN;
14451454
14461455 newpte = _pte(f->pfn, 0, !p, 0);
1447− pgste = pgste_get_lock(ptep);
1456+ if (!pgste_get_trylock(ptep, &pgste))
1457+ return -EAGAIN;
14481458 pgste = __dat_ptep_xchg(ptep, pgste, newpte, gpa_to_gfn(raddr), sg->asce, uses_skeys(sg));
14491459 pgste_set_unlock(ptep, pgste);
14501460
@@ -1454,7 +1464,7 @@ static int _do_shadow_pte(struct gmap *sg, gpa_t raddr, union pte *ptep_h, union · 3 unmodified lines
14541464 static int _do_shadow_crste(struct gmap *sg, gpa_t raddr, union crste *host, union crste *table,
14551465 struct guest_fault *f, bool p)
14561466 {
1457− union crste newcrste;
1467+ union crste newcrste, oldcrste;
14581468 gfn_t gfn;
14591469 int rc;
14601470
@@ -1467,16 +1477,28 @@ static int _do_shadow_crste(struct gmap *sg, gpa_t raddr, union crste *host, uni · 6 unmodified lines
14671477 if (rc)
14681478 return rc;
14691479
1470− newcrste = _crste_fc1(f->pfn, host->h.tt, f->writable, !p);
1471− newcrste.s.fc1.d |= host->s.fc1.d;
1472− newcrste.s.fc1.sd |= host->s.fc1.sd;
1473− newcrste.h.p &= host->h.p;
1474− newcrste.s.fc1.vsie_notif = 1;
1475− newcrste.s.fc1.prefix_notif = host->s.fc1.prefix_notif;
1476− _gmap_crstep_xchg(sg->parent, host, newcrste, f->gfn, false);
1480+ do {
1481+ /* _gmap_crstep_xchg_atomic() could have unshadowed this shadow gmap */
1482+ if (!sg->parent)
1483+ return -EAGAIN;
1484+ oldcrste = READ_ONCE(*host);
1485+ newcrste = _crste_fc1(f->pfn, oldcrste.h.tt, f->writable, !p);
1486+ newcrste.s.fc1.d |= oldcrste.s.fc1.d;
1487+ newcrste.s.fc1.sd |= oldcrste.s.fc1.sd;
1488+ newcrste.h.p &= oldcrste.h.p;
1489+ newcrste.s.fc1.vsie_notif = 1;
1490+ newcrste.s.fc1.prefix_notif = oldcrste.s.fc1.prefix_notif;
1491+ newcrste.s.fc1.s = oldcrste.s.fc1.s;
1492+ if (!newcrste.h.p && !f->writable)
1493+ return -EOPNOTSUPP;
1494+ } while (!_gmap_crstep_xchg_atomic(sg->parent, host, oldcrste, newcrste, f->gfn, false));
1495+ if (!sg->parent)
1496+ return -EAGAIN;
14771497
1478− newcrste = _crste_fc1(f->pfn, host->h.tt, 0, !p);
1479− dat_crstep_xchg(table, newcrste, gpa_to_gfn(raddr), sg->asce);
1498+ newcrste = _crste_fc1(f->pfn, oldcrste.h.tt, 0, !p);
1499+ gfn = gpa_to_gfn(raddr);
1500+ while (!dat_crstep_xchg_atomic(table, READ_ONCE(*table), newcrste, gfn, sg->asce))
1501+ ;
14801502 return 0;
14811503 }
14821504
@@ -1500,21 +1522,31 @@ static int _gaccess_do_shadow(struct kvm_s390_mmu_cache *mc, struct gmap *sg, · 17 unmodified lines
15001522 if (rc)
15011523 return rc;
15021524
1503− /* A race occourred. The shadow mapping is already valid, nothing to do */
1504− if ((ptep && !ptep->h.i) || (!ptep && crste_leaf(*table)))
1525+ /* A race occurred. The shadow mapping is already valid, nothing to do */
1526+ if ((ptep && !ptep->h.i && ptep->h.p == w->p) ||
1527+ (!ptep && crste_leaf(*table) && !table->h.i && table->h.p == w->p))
15051528 return 0;
15061529
15071530 gl = get_level(table, ptep);
15081531
1532+ /* In case of a real address space */
1533+ if (w->level <= LEVEL_MEM) {
1534+ l = TABLE_TYPE_PAGE_TABLE;
1535+ hl = TABLE_TYPE_REGION1;
1536+ goto real_address_space;
1537+ }
1538+
15091539 /*
15101540 * Skip levels that are already protected. For each level, protect
15111541 * only the page containing the entry, not the whole table.
15121542 */
15131543 for (i = gl ; i >= w->level; i--) {
1514− rc = gmap_protect_rmap(mc, sg, entries[i - 1].gfn, gpa_to_gfn(saddr),
1515− entries[i - 1].pfn, i, entries[i - 1].writable);
1544+ rc = gmap_protect_rmap(mc, sg, entries[i].gfn, gpa_to_gfn(saddr),
1545+ entries[i].pfn, i + 1, entries[i].writable);
15161546 if (rc)
15171547 return rc;
1548+ if (!sg->parent)
1549+ return -EAGAIN;
15181550 }
15191551
15201552 rc = dat_entry_walk(NULL, entries[LEVEL_MEM].gfn, sg->parent->asce, DAT_WALK_LEAF,
@@ -1526,6 +1558,7 @@ static int _gaccess_do_shadow(struct kvm_s390_mmu_cache *mc, struct gmap *sg, · 5 unmodified lines
15261558 /* Get the smallest granularity */
15271559 l = min3(gl, hl, w->level);
15281560
1561+real_address_space:
15291562 flags = DAT_WALK_SPLIT_ALLOC | (uses_skeys(sg->parent) ? DAT_WALK_USES_SKEYS : 0);
15301563 /* If necessary, create the shadow mapping */
15311564 if (l < gl) {
arch/s390/kvm/gmap.c+114−46
@@ -313,13 +313,16 @@ static long gmap_clear_young_crste(union crste *crstep, gfn_t gfn, gfn_t end, st · 312 unmodified lines
313313 struct clear_young_pte_priv *priv = walk->priv;
314314 union crste crste, new;
315315
316− crste = READ_ONCE(*crstep);
316+ do {
317+ crste = READ_ONCE(*crstep);
318+
319+ if (!crste.h.fc)
320+ return 0;
321+ if (!crste.s.fc1.y && crste.h.i)
322+ return 0;
323+ if (crste_prefix(crste) && !gmap_mkold_prefix(priv->gmap, gfn, end))
324+ break;
317325
318− if (!crste.h.fc)
319− return 0;
320− if (!crste.s.fc1.y && crste.h.i)
321− return 0;
322− if (!crste_prefix(crste) || gmap_mkold_prefix(priv->gmap, gfn, end)) {
323326 new = crste;
324327 new.h.i = 1;
325328 new.s.fc1.y = 0;
@@ -328,8 +331,8 @@ static long gmap_clear_young_crste(union crste *crstep, gfn_t gfn, gfn_t end, st · 2 unmodified lines
328331 folio_set_dirty(phys_to_folio(crste_origin_large(crste)));
329332 new.s.fc1.d = 0;
330333 new.h.p = 1;
331− dat_crstep_xchg(crstep, new, gfn, walk->asce);
332− }
334+ } while (!dat_crstep_xchg_atomic(crstep, crste, new, gfn, walk->asce));
335+
333336 priv->young = 1;
334337 return 0;
335338 }
@@ -391,14 +394,18 @@ static long _gmap_unmap_crste(union crste *crstep, gfn_t gfn, gfn_t next, struct · 55 unmodified lines
391394 {
392395 struct gmap_unmap_priv *priv = walk->priv;
393396 struct folio *folio = NULL;
397+ union crste old = *crstep;
394398
395− if (crstep->h.fc) {
396− if (crstep->s.fc1.pr && test_bit(GMAP_FLAG_EXPORT_ON_UNMAP, &priv->gmap->flags))
397− folio = phys_to_folio(crste_origin_large(*crstep));
398− gmap_crstep_xchg(priv->gmap, crstep, _CRSTE_EMPTY(crstep->h.tt), gfn);
399− if (folio)
400− uv_convert_from_secure_folio(folio);
401− }
399+ if (!old.h.fc)
400+ return 0;
401+
402+ if (old.s.fc1.pr && test_bit(GMAP_FLAG_EXPORT_ON_UNMAP, &priv->gmap->flags))
403+ folio = phys_to_folio(crste_origin_large(old));
404+ /* No races should happen because kvm->mmu_lock is held in write mode */
405+ KVM_BUG_ON(!gmap_crstep_xchg_atomic(priv->gmap, crstep, old, _CRSTE_EMPTY(old.h.tt), gfn),
406+ priv->gmap->kvm);
407+ if (folio)
408+ uv_convert_from_secure_folio(folio);
402409
403410 return 0;
404411 }
@@ -474,23 +481,24 @@ static long _crste_test_and_clear_softdirty(union crste *table, gfn_t gfn, gfn_t · 69 unmodified lines
474481
475482 if (fatal_signal_pending(current))
476483 return 1;
477− crste = READ_ONCE(*table);
478− if (!crste.h.fc)
479− return 0;
480− if (crste.h.p && !crste.s.fc1.sd)
481− return 0;
484+ do {
485+ crste = READ_ONCE(*table);
486+ if (!crste.h.fc)
487+ return 0;
488+ if (crste.h.p && !crste.s.fc1.sd)
489+ return 0;
482490
483− /*
484− * If this large page contains one or more prefixes of vCPUs that are
485− * currently running, do not reset the protection, leave it marked as
486− * dirty.
487− */
488− if (!crste.s.fc1.prefix_notif || gmap_mkold_prefix(gmap, gfn, end)) {
491+ /*
492+ * If this large page contains one or more prefixes of vCPUs that are
493+ * currently running, do not reset the protection, leave it marked as
494+ * dirty.
495+ */
496+ if (crste.s.fc1.prefix_notif && !gmap_mkold_prefix(gmap, gfn, end))
497+ break;
489498 new = crste;
490499 new.h.p = 1;
491500 new.s.fc1.sd = 0;
492− gmap_crstep_xchg(gmap, table, new, gfn);
493− }
501+ } while (!gmap_crstep_xchg_atomic(gmap, table, crste, new, gfn));
494502
495503 for ( ; gfn < end; gfn++)
496504 mark_page_dirty(gmap->kvm, gfn);
@@ -511,7 +519,7 @@ void gmap_sync_dirty_log(struct gmap *gmap, gfn_t start, gfn_t end) · 14 unmodified lines
511519 _dat_walk_gfn_range(start, end, gmap->asce, &walk_ops, 0, gmap);
512520 }
513521
514−static int gmap_handle_minor_crste_fault(union asce asce, struct guest_fault *f)
522+static int gmap_handle_minor_crste_fault(struct gmap *gmap, struct guest_fault *f)
515523 {
516524 union crste newcrste, oldcrste = READ_ONCE(*f->crstep);
517525
@@ -536,10 +544,8 @@ static int gmap_handle_minor_crste_fault(union asce asce, struct guest_fault *f) · 18 unmodified lines
536544 newcrste.s.fc1.d = 1;
537545 newcrste.s.fc1.sd = 1;
538546 }
539− if (!oldcrste.s.fc1.d && newcrste.s.fc1.d)
540− SetPageDirty(phys_to_page(crste_origin_large(newcrste)));
541547 /* In case of races, let the slow path deal with it. */
542− return !dat_crstep_xchg_atomic(f->crstep, oldcrste, newcrste, f->gfn, asce);
548+ return !gmap_crstep_xchg_atomic(gmap, f->crstep, oldcrste, newcrste, f->gfn);
543549 }
544550 /* Trying to write on a read-only page, let the slow path deal with it. */
545551 return 1;
@@ -568,8 +574,6 @@ static int _gmap_handle_minor_pte_fault(struct gmap *gmap, union pgste *pgste, · 22 unmodified lines
568574 newpte.s.d = 1;
569575 newpte.s.sd = 1;
570576 }
571− if (!oldpte.s.d && newpte.s.d)
572− SetPageDirty(pfn_to_page(newpte.h.pfra));
573577 *pgste = gmap_ptep_xchg(gmap, f->ptep, newpte, *pgste, f->gfn);
574578
575579 return 0;
@@ -606,7 +610,7 @@ int gmap_try_fixup_minor(struct gmap *gmap, struct guest_fault *fault) · 30 unmodified lines
606610 fault->callback(fault);
607611 pgste_set_unlock(fault->ptep, pgste);
608612 } else {
609− rc = gmap_handle_minor_crste_fault(gmap->asce, fault);
613+ rc = gmap_handle_minor_crste_fault(gmap, fault);
610614 if (!rc && fault->callback)
611615 fault->callback(fault);
612616 }
@@ -623,10 +627,61 @@ static inline bool gmap_1m_allowed(struct gmap *gmap, gfn_t gfn) · 10 unmodified lines
623627 return test_bit(GMAP_FLAG_ALLOW_HPAGE_1M, &gmap->flags);
624628 }
625629
630+static int _gmap_link(struct kvm_s390_mmu_cache *mc, struct gmap *gmap, int level,
631+ struct guest_fault *f)
632+{
633+ union crste oldval, newval;
634+ union pte newpte, oldpte;
635+ union pgste pgste;
636+ int rc = 0;
637+
638+ rc = dat_entry_walk(mc, f->gfn, gmap->asce, DAT_WALK_ALLOC_CONTINUE, level,
639+ &f->crstep, &f->ptep);
640+ if (rc == -ENOMEM)
641+ return rc;
642+ if (KVM_BUG_ON(rc == -EINVAL, gmap->kvm))
643+ return rc;
644+ if (rc)
645+ return -EAGAIN;
646+ if (KVM_BUG_ON(get_level(f->crstep, f->ptep) > level, gmap->kvm))
647+ return -EINVAL;
648+
649+ if (f->ptep) {
650+ pgste = pgste_get_lock(f->ptep);
651+ oldpte = *f->ptep;
652+ newpte = _pte(f->pfn, f->writable, f->write_attempt | oldpte.s.d, !f->page);
653+ newpte.s.sd = oldpte.s.sd;
654+ oldpte.s.sd = 0;
655+ if (oldpte.val == _PTE_EMPTY.val || oldpte.h.pfra == f->pfn) {
656+ pgste = gmap_ptep_xchg(gmap, f->ptep, newpte, pgste, f->gfn);
657+ if (f->callback)
658+ f->callback(f);
659+ } else {
660+ rc = -EAGAIN;
661+ }
662+ pgste_set_unlock(f->ptep, pgste);
663+ } else {
664+ do {
665+ oldval = READ_ONCE(*f->crstep);
666+ newval = _crste_fc1(f->pfn, oldval.h.tt, f->writable,
667+ f->write_attempt | oldval.s.fc1.d);
668+ newval.s.fc1.s = !f->page;
669+ newval.s.fc1.sd = oldval.s.fc1.sd;
670+ if (oldval.val != _CRSTE_EMPTY(oldval.h.tt).val &&
671+ crste_origin_large(oldval) != crste_origin_large(newval))
672+ return -EAGAIN;
673+ } while (!gmap_crstep_xchg_atomic(gmap, f->crstep, oldval, newval, f->gfn));
674+ if (f->callback)
675+ f->callback(f);
676+ }
677+
678+ return rc;
679+}
680+
626681 int gmap_link(struct kvm_s390_mmu_cache *mc, struct gmap *gmap, struct guest_fault *f)
627682 {
628683 unsigned int order;
629− int rc, level;
684+ int level;
630685
631686 lockdep_assert_held(&gmap->kvm->mmu_lock);
632687
@@ -638,16 +693,14 @@ int gmap_link(struct kvm_s390_mmu_cache *mc, struct gmap *gmap, struct guest_fau · 5 unmodified lines
638693 else if (order >= get_order(_SEGMENT_SIZE) && gmap_1m_allowed(gmap, f->gfn))
639694 level = TABLE_TYPE_SEGMENT;
640695 }
641− rc = dat_link(mc, gmap->asce, level, uses_skeys(gmap), f);
642− KVM_BUG_ON(rc == -EINVAL, gmap->kvm);
643− return rc;
696+ return _gmap_link(mc, gmap, level, f);
644697 }
645698
646699 static int gmap_ucas_map_one(struct kvm_s390_mmu_cache *mc, struct gmap *gmap,
647700 gfn_t p_gfn, gfn_t c_gfn, bool force_alloc)
648701 {
702+ union crste newcrste, oldcrste;
649703 struct page_table *pt;
650− union crste newcrste;
651704 union crste *crstep;
652705 union pte *ptep;
653706 int rc;
@@ -673,7 +726,11 @@ static int gmap_ucas_map_one(struct kvm_s390_mmu_cache *mc, struct gmap *gmap, · 19 unmodified lines
673726 &crstep, &ptep);
674727 if (rc)
675728 return rc;
676− dat_crstep_xchg(crstep, newcrste, c_gfn, gmap->asce);
729+ do {
730+ oldcrste = READ_ONCE(*crstep);
731+ if (oldcrste.val == newcrste.val)
732+ break;
733+ } while (!dat_crstep_xchg_atomic(crstep, oldcrste, newcrste, c_gfn, gmap->asce));
677734 return 0;
678735 }
679736
@@ -777,8 +834,10 @@ static void gmap_ucas_unmap_one(struct gmap *gmap, gfn_t c_gfn) · 97 unmodified lines
777834 int rc;
778835
779836 rc = dat_entry_walk(NULL, c_gfn, gmap->asce, 0, TABLE_TYPE_SEGMENT, &crstep, &ptep);
780− if (!rc)
781− dat_crstep_xchg(crstep, _PMD_EMPTY, c_gfn, gmap->asce);
837+ if (rc)
838+ return;
839+ while (!dat_crstep_xchg_atomic(crstep, READ_ONCE(*crstep), _PMD_EMPTY, c_gfn, gmap->asce))
840+ ;
782841 }
783842
784843 void gmap_ucas_unmap(struct gmap *gmap, gfn_t c_gfn, unsigned long count)
@@ -1017,8 +1076,8 @@ static void gmap_unshadow_level(struct gmap *sg, gfn_t r_gfn, int level) · 232 unmodified lines
10171076 dat_ptep_xchg(ptep, _PTE_EMPTY, r_gfn, sg->asce, uses_skeys(sg));
10181077 return;
10191078 }
1020− crste = READ_ONCE(*crstep);
1021− dat_crstep_clear(crstep, r_gfn, sg->asce);
1079+
1080+ crste = dat_crstep_clear_atomic(crstep, r_gfn, sg->asce);
10221081 if (crste_leaf(crste) || crste.h.i)
10231082 return;
10241083 if (is_pmd(crste))
@@ -1101,6 +1160,7 @@ struct gmap_protect_asce_top_level { · 76 unmodified lines
11011160 static inline int __gmap_protect_asce_top_level(struct kvm_s390_mmu_cache *mc, struct gmap *sg,
11021161 struct gmap_protect_asce_top_level *context)
11031162 {
1163+ struct gmap *parent;
11041164 int rc, i;
11051165
11061166 guard(write_lock)(&sg->kvm->mmu_lock);
@@ -1108,7 +1168,12 @@ static inline int __gmap_protect_asce_top_level(struct kvm_s390_mmu_cache *mc, s · 1 unmodified line
11081168 if (kvm_s390_array_needs_retry_safe(sg->kvm, context->seq, context->f))
11091169 return -EAGAIN;
11101170
1111− scoped_guard(spinlock, &sg->parent->children_lock) {
1171+ parent = READ_ONCE(sg->parent);
1172+ if (!parent)
1173+ return -EAGAIN;
1174+ scoped_guard(spinlock, &parent->children_lock) {
1175+ if (READ_ONCE(sg->parent) != parent)
1176+ return -EAGAIN;
11121177 for (i = 0; i < CRST_TABLE_PAGES; i++) {
11131178 if (!context->f[i].valid)
11141179 continue;
@@ -1191,6 +1256,9 @@ struct gmap *gmap_create_shadow(struct kvm_s390_mmu_cache *mc, struct gmap *pare · 76 unmodified lines
11911256 struct gmap *sg, *new;
11921257 int rc;
11931258
1259+ if (WARN_ON(!parent))
1260+ return ERR_PTR(-EINVAL);
1261+
11941262 scoped_guard(spinlock, &parent->children_lock) {
11951263 sg = gmap_find_shadow(parent, asce, edat_level);
11961264 if (sg) {
arch/s390/kvm/gmap.h+21−12
@@ -185,6 +185,8 @@ static inline union pgste _gmap_ptep_xchg(struct gmap *gmap, union pte *ptep, un · 184 unmodified lines
185185 else
186186 _gmap_handle_vsie_unshadow_event(gmap, gfn);
187187 }
188+ if (!ptep->s.d && newpte.s.d && !newpte.s.s)
189+ SetPageDirty(pfn_to_page(newpte.h.pfra));
188190 return __dat_ptep_xchg(ptep, pgste, newpte, gfn, gmap->asce, uses_skeys(gmap));
189191 }
190192
@@ -194,35 +196,42 @@ static inline union pgste gmap_ptep_xchg(struct gmap *gmap, union pte *ptep, uni · 3 unmodified lines
194196 return _gmap_ptep_xchg(gmap, ptep, newpte, pgste, gfn, true);
195197 }
196198
197−static inline void _gmap_crstep_xchg(struct gmap *gmap, union crste *crstep, union crste ne,
198− gfn_t gfn, bool needs_lock)
199+static inline bool __must_check _gmap_crstep_xchg_atomic(struct gmap *gmap, union crste *crstep,
200+ union crste oldcrste, union crste newcrste,
201+ gfn_t gfn, bool needs_lock)
199202 {
200− unsigned long align = 8 + (is_pmd(*crstep) ? 0 : 11);
203+ unsigned long align = is_pmd(newcrste) ? _PAGE_ENTRIES : _PAGE_ENTRIES * _CRST_ENTRIES;
204+
205+ if (KVM_BUG_ON(crstep->h.tt != oldcrste.h.tt || newcrste.h.tt != oldcrste.h.tt, gmap->kvm))
206+ return true;
201207
202208 lockdep_assert_held(&gmap->kvm->mmu_lock);
203209 if (!needs_lock)
204210 lockdep_assert_held(&gmap->children_lock);
205211
206212 gfn = ALIGN_DOWN(gfn, align);
207− if (crste_prefix(*crstep) && (ne.h.p || ne.h.i || !crste_prefix(ne))) {
208− ne.s.fc1.prefix_notif = 0;
213+ if (crste_prefix(oldcrste) && (newcrste.h.p || newcrste.h.i || !crste_prefix(newcrste))) {
214+ newcrste.s.fc1.prefix_notif = 0;
209215 gmap_unmap_prefix(gmap, gfn, gfn + align);
210216 }
211− if (crste_leaf(*crstep) && crstep->s.fc1.vsie_notif &&
212− (ne.h.p || ne.h.i || !ne.s.fc1.vsie_notif)) {
213− ne.s.fc1.vsie_notif = 0;
217+ if (crste_leaf(oldcrste) && oldcrste.s.fc1.vsie_notif &&
218+ (newcrste.h.p || newcrste.h.i || !newcrste.s.fc1.vsie_notif)) {
219+ newcrste.s.fc1.vsie_notif = 0;
214220 if (needs_lock)
215221 gmap_handle_vsie_unshadow_event(gmap, gfn);
216222 else
217223 _gmap_handle_vsie_unshadow_event(gmap, gfn);
218224 }
219− dat_crstep_xchg(crstep, ne, gfn, gmap->asce);
225+ if (!oldcrste.s.fc1.d && newcrste.s.fc1.d && !newcrste.s.fc1.s)
226+ SetPageDirty(phys_to_page(crste_origin_large(newcrste)));
227+ return dat_crstep_xchg_atomic(crstep, oldcrste, newcrste, gfn, gmap->asce);
220228 }
221229
222−static inline void gmap_crstep_xchg(struct gmap *gmap, union crste *crstep, union crste ne,
223− gfn_t gfn)
230+static inline bool __must_check gmap_crstep_xchg_atomic(struct gmap *gmap, union crste *crstep,
231+ union crste oldcrste, union crste newcrste,
232+ gfn_t gfn)
224233 {
225− return _gmap_crstep_xchg(gmap, crstep, ne, gfn, true);
234+ return _gmap_crstep_xchg_atomic(gmap, crstep, oldcrste, newcrste, gfn, true);
226235 }
227236
228237 /**
arch/s390/kvm/interrupt.c+18−0
@@ -2724,6 +2724,9 @@ static unsigned long get_ind_bit(__u64 addr, unsigned long bit_nr, bool swap) · 2723 unmodified lines
27242724
27252725 bit = bit_nr + (addr % PAGE_SIZE) * 8;
27262726
2727+ /* kvm_set_routing_entry() should never allow this to happen */
2728+ WARN_ON_ONCE(bit > (PAGE_SIZE * BITS_PER_BYTE - 1));
2729+
27272730 return swap ? (bit ^ (BITS_PER_LONG - 1)) : bit;
27282731 }
27292732
@@ -2824,6 +2827,12 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu, · 94 unmodified lines
28242827 int rc;
28252828
28262829 mci.val = mcck_info->mcic;
2830+
2831+ /* log machine checks being reinjected on all debugs */
2832+ VCPU_EVENT(vcpu, 2, "guest machine check %lx", mci.val);
2833+ KVM_EVENT(2, "guest machine check %lx", mci.val);
2834+ pr_info("guest machine check pid %d: %lx", current->pid, mci.val);
2835+
28272836 if (mci.sr)
28282837 cr14 |= CR14_RECOVERY_SUBMASK;
28292838 if (mci.dg)
@@ -2852,6 +2861,7 @@ int kvm_set_routing_entry(struct kvm *kvm, · 22 unmodified lines
28522861 struct kvm_kernel_irq_routing_entry *e,
28532862 const struct kvm_irq_routing_entry *ue)
28542863 {
2864+ const struct kvm_irq_routing_s390_adapter *adapter;
28552865 u64 uaddr_s, uaddr_i;
28562866 int idx;
28572867
@@ -2862,6 +2872,14 @@ int kvm_set_routing_entry(struct kvm *kvm, · 4 unmodified lines
28622872 return -EINVAL;
28632873 e->set = set_adapter_int;
28642874
2875+ adapter = &ue->u.adapter;
2876+ if (adapter->summary_addr + (adapter->summary_offset / 8) >=
2877+ (adapter->summary_addr & PAGE_MASK) + PAGE_SIZE)
2878+ return -EINVAL;
2879+ if (adapter->ind_addr + (adapter->ind_offset / 8) >=
2880+ (adapter->ind_addr & PAGE_MASK) + PAGE_SIZE)
2881+ return -EINVAL;
2882+
28652883 idx = srcu_read_lock(&kvm->srcu);
28662884 uaddr_s = gpa_to_hva(kvm, ue->u.adapter.summary_addr);
28672885 uaddr_i = gpa_to_hva(kvm, ue->u.adapter.ind_addr);
arch/s390/kvm/kvm-s390.c+25−13
@@ -65,7 +65,7 @@ · 64 unmodified lines
6565 #define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \
6666 (KVM_MAX_VCPUS + LOCAL_IRQS))
6767
68−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
68+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
6969 KVM_GENERIC_VM_STATS(),
7070 STATS_DESC_COUNTER(VM, inject_io),
7171 STATS_DESC_COUNTER(VM, inject_float_mchk),
@@ -91,7 +91,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 19 unmodified lines
9191 sizeof(kvm_vm_stats_desc),
9292 };
9393
94−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
94+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
9595 KVM_GENERIC_VCPU_STATS(),
9696 STATS_DESC_COUNTER(VCPU, exit_userspace),
9797 STATS_DESC_COUNTER(VCPU, exit_null),
@@ -4617,7 +4617,7 @@ static int vcpu_post_run_handle_fault(struct kvm_vcpu *vcpu) · 4519 unmodified lines
46174617 return 0;
46184618 }
46194619
4620−static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason)
4620+static int vcpu_post_run(struct kvm_vcpu *vcpu, int sie_return)
46214621 {
46224622 struct mcck_volatile_info *mcck_info;
46234623 struct sie_page *sie_page;
@@ -4633,14 +4633,14 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason) · 9 unmodified lines
46334633 vcpu->run->s.regs.gprs[14] = vcpu->arch.sie_block->gg14;
46344634 vcpu->run->s.regs.gprs[15] = vcpu->arch.sie_block->gg15;
46354635
4636− if (exit_reason == -EINTR) {
4637− VCPU_EVENT(vcpu, 3, "%s", "machine check");
4636+ if (sie_return == SIE64_RETURN_MCCK) {
46384637 sie_page = container_of(vcpu->arch.sie_block,
46394638 struct sie_page, sie_block);
46404639 mcck_info = &sie_page->mcck_info;
46414640 kvm_s390_reinject_machine_check(vcpu, mcck_info);
46424641 return 0;
46434642 }
4643+ WARN_ON_ONCE(sie_return != SIE64_RETURN_NORMAL);
46444644
46454645 if (vcpu->arch.sie_block->icptcode > 0) {
46464646 rc = kvm_handle_sie_intercept(vcpu);
@@ -4679,7 +4679,7 @@ int noinstr kvm_s390_enter_exit_sie(struct kvm_s390_sie_block *scb, · 32 unmodified lines
46794679 #define PSW_INT_MASK (PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_MCHECK)
46804680 static int __vcpu_run(struct kvm_vcpu *vcpu)
46814681 {
4682− int rc, exit_reason;
4682+ int rc, sie_return;
46834683 struct sie_page *sie_page = (struct sie_page *)vcpu->arch.sie_block;
46844684
46854685 /*
@@ -4719,9 +4719,9 @@ xfer_to_guest_mode_check: · 33 unmodified lines
47194719 guest_timing_enter_irqoff();
47204720 __disable_cpu_timer_accounting(vcpu);
47214721
4722− exit_reason = kvm_s390_enter_exit_sie(vcpu->arch.sie_block,
4723− vcpu->run->s.regs.gprs,
4724− vcpu->arch.gmap->asce.val);
4722+ sie_return = kvm_s390_enter_exit_sie(vcpu->arch.sie_block,
4723+ vcpu->run->s.regs.gprs,
4724+ vcpu->arch.gmap->asce.val);
47254725
47264726 __enable_cpu_timer_accounting(vcpu);
47274727 guest_timing_exit_irqoff();
@@ -4744,7 +4744,7 @@ xfer_to_guest_mode_check: · 16 unmodified lines
47444744 }
47454745 kvm_vcpu_srcu_read_lock(vcpu);
47464746
4747− rc = vcpu_post_run(vcpu, exit_reason);
4747+ rc = vcpu_post_run(vcpu, sie_return);
47484748 if (rc || guestdbg_exit_pending(vcpu)) {
47494749 kvm_vcpu_srcu_read_unlock(vcpu);
47504750 break;
@@ -5520,9 +5520,21 @@ long kvm_arch_vcpu_ioctl(struct file *filp, · 769 unmodified lines
55205520 }
55215521 #endif
55225522 case KVM_S390_VCPU_FAULT: {
5523− idx = srcu_read_lock(&vcpu->kvm->srcu);
5524− r = vcpu_dat_fault_handler(vcpu, arg, 0);
5525− srcu_read_unlock(&vcpu->kvm->srcu, idx);
5523+ gpa_t gaddr = arg;
5524+
5525+ scoped_guard(srcu, &vcpu->kvm->srcu) {
5526+ r = vcpu_ucontrol_translate(vcpu, &gaddr);
5527+ if (r)
5528+ break;
5529+
5530+ r = kvm_s390_faultin_gfn_simple(vcpu, NULL, gpa_to_gfn(gaddr), false);
5531+ if (r == PGM_ADDRESSING)
5532+ r = -EFAULT;
5533+ if (r <= 0)
5534+ break;
5535+ r = -EIO;
5536+ KVM_BUG_ON(r, vcpu->kvm);
5537+ }
55265538 break;
55275539 }
55285540 case KVM_ENABLE_CAP:
arch/s390/kvm/vsie.c+8−4
@@ -1122,6 +1122,7 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page, struc · 1121 unmodified lines
11221122 {
11231123 struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
11241124 struct kvm_s390_sie_block *scb_o = vsie_page->scb_o;
1125+ unsigned long sie_return = SIE64_RETURN_NORMAL;
11251126 int guest_bp_isolation;
11261127 int rc = 0;
11271128
@@ -1163,7 +1164,7 @@ xfer_to_guest_mode_check: · 35 unmodified lines
11631164 goto xfer_to_guest_mode_check;
11641165 }
11651166 guest_timing_enter_irqoff();
1166− rc = kvm_s390_enter_exit_sie(scb_s, vcpu->run->s.regs.gprs, sg->asce.val);
1167+ sie_return = kvm_s390_enter_exit_sie(scb_s, vcpu->run->s.regs.gprs, sg->asce.val);
11671168 guest_timing_exit_irqoff();
11681169 local_irq_enable();
11691170 }
@@ -1178,12 +1179,13 @@ skip_sie: · 8 unmodified lines
11781179
11791180 kvm_vcpu_srcu_read_lock(vcpu);
11801181
1181− if (rc == -EINTR) {
1182− VCPU_EVENT(vcpu, 3, "%s", "machine check");
1182+ if (sie_return == SIE64_RETURN_MCCK) {
11831183 kvm_s390_reinject_machine_check(vcpu, &vsie_page->mcck_info);
11841184 return 0;
11851185 }
11861186
1187+ WARN_ON_ONCE(sie_return != SIE64_RETURN_NORMAL);
1188+
11871189 if (rc > 0)
11881190 rc = 0; /* we could still have an icpt */
11891191 else if (current->thread.gmap_int_code)
@@ -1326,7 +1328,7 @@ static void unregister_shadow_scb(struct kvm_vcpu *vcpu) · 136 unmodified lines
13261328 static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
13271329 {
13281330 struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
1329− struct gmap *sg;
1331+ struct gmap *sg = NULL;
13301332 int rc = 0;
13311333
13321334 while (1) {
@@ -1366,6 +1368,8 @@ static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) · 33 unmodified lines
13661368 sg = gmap_put(sg);
13671369 cond_resched();
13681370 }
1371+ if (sg)
1372+ sg = gmap_put(sg);
13691373
13701374 if (rc == -EFAULT) {
13711375 /*
arch/s390/mm/fault.c+9−2
@@ -441,10 +441,17 @@ void do_secure_storage_access(struct pt_regs *regs) · 440 unmodified lines
441441 folio = phys_to_folio(addr);
442442 if (unlikely(!folio_try_get(folio)))
443443 return;
444− rc = arch_make_folio_accessible(folio);
444+ rc = uv_convert_from_secure(folio_to_phys(folio));
445+ if (!rc)
446+ clear_bit(PG_arch_1, &folio->flags.f);
445447 folio_put(folio);
448+ /*
449+ * There are some valid fixup types for kernel
450+ * accesses to donated secure memory. zeropad is one
451+ * of them.
452+ */
446453 if (rc)
447− BUG();
454+ return handle_fault_error_nolock(regs, 0);
448455 } else {
449456 if (faulthandler_disabled())
450457 return handle_fault_error_nolock(regs, 0);
arch/sh/drivers/platform_early.c+0−4
@@ -26,10 +26,6 @@ static int platform_match(struct device *dev, struct device_driver *drv) · 25 unmodified lines
2626 struct platform_device *pdev = to_platform_device(dev);
2727 struct platform_driver *pdrv = to_platform_driver(drv);
2828
29− /* When driver_override is set, only bind to the matching driver */
30− if (pdev->driver_override)
31− return !strcmp(pdev->driver_override, drv->name);
32−
3329 /* Then try to match against the id table */
3430 if (pdrv->id_table)
3531 return platform_match_id(pdrv->id_table, pdev) != NULL;
arch/x86/coco/sev/noinstr.c+6−0
@@ -121,6 +121,9 @@ noinstr struct ghcb *__sev_get_ghcb(struct ghcb_state *state) · 120 unmodified lines
121121
122122 WARN_ON(!irqs_disabled());
123123
124+ if (!sev_cfg.ghcbs_initialized)
125+ return boot_ghcb;
126+
124127 data = this_cpu_read(runtime_data);
125128 ghcb = &data->ghcb_page;
126129
@@ -164,6 +167,9 @@ noinstr void __sev_put_ghcb(struct ghcb_state *state) · 37 unmodified lines
164167
165168 WARN_ON(!irqs_disabled());
166169
170+ if (!sev_cfg.ghcbs_initialized)
171+ return;
172+
167173 data = this_cpu_read(runtime_data);
168174 ghcb = &data->ghcb_page;
169175
arch/x86/entry/entry_fred.c+14−0
@@ -177,6 +177,16 @@ static noinstr void fred_extint(struct pt_regs *regs) · 176 unmodified lines
177177 }
178178 }
179179
180+#ifdef CONFIG_AMD_MEM_ENCRYPT
181+noinstr void exc_vmm_communication(struct pt_regs *regs, unsigned long error_code)
182+{
183+ if (user_mode(regs))
184+ return user_exc_vmm_communication(regs, error_code);
185+ else
186+ return kernel_exc_vmm_communication(regs, error_code);
187+}
188+#endif
189+
180190 static noinstr void fred_hwexc(struct pt_regs *regs, unsigned long error_code)
181191 {
182192 /* Optimize for #PF. That's the only exception which matters performance wise */
@@ -207,6 +217,10 @@ static noinstr void fred_hwexc(struct pt_regs *regs, unsigned long error_code) · 24 unmodified lines
207217 #ifdef CONFIG_X86_CET
208218 case X86_TRAP_CP: return exc_control_protection(regs, error_code);
209219 #endif
220+#ifdef CONFIG_AMD_MEM_ENCRYPT
221+ case X86_TRAP_VC: return exc_vmm_communication(regs, error_code);
222+#endif
223+
210224 default: return fred_bad_type(regs, error_code);
211225 }
212226
arch/x86/entry/vdso/common/vclock_gettime.c+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 #include <linux/types.h>
1414 #include <vdso/gettime.h>
1515
16−#include "../../../../lib/vdso/gettimeofday.c"
16+#include "lib/vdso/gettimeofday.c"
1717
1818 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
1919 {
arch/x86/events/core.c+5−2
@@ -1372,14 +1372,17 @@ static void x86_pmu_enable(struct pmu *pmu) · 1371 unmodified lines
13721372 else if (i < n_running)
13731373 continue;
13741374
1375− if (hwc->state & PERF_HES_ARCH)
1375+ cpuc->events[hwc->idx] = event;
1376+
1377+ if (hwc->state & PERF_HES_ARCH) {
1378+ static_call(x86_pmu_set_period)(event);
13761379 continue;
1380+ }
13771381
13781382 /*
13791383 * if cpuc->enabled = 0, then no wrmsr as
13801384 * per x86_pmu_enable_event()
13811385 */
1382− cpuc->events[hwc->idx] = event;
13831386 x86_pmu_start(event, PERF_EF_RELOAD);
13841387 }
13851388 cpuc->n_added = 0;
arch/x86/events/intel/core.c+25−12
@@ -4628,6 +4628,19 @@ static inline void intel_pmu_set_acr_caused_constr(struct perf_event *event, · 4627 unmodified lines
46284628 event->hw.dyn_constraint &= hybrid(event->pmu, acr_cause_mask64);
46294629 }
46304630
4631+static inline int intel_set_branch_counter_constr(struct perf_event *event,
4632+ int *num)
4633+{
4634+ if (branch_sample_call_stack(event))
4635+ return -EINVAL;
4636+ if (branch_sample_counters(event)) {
4637+ (*num)++;
4638+ event->hw.dyn_constraint &= x86_pmu.lbr_counters;
4639+ }
4640+
4641+ return 0;
4642+}
4643+
46314644 static int intel_pmu_hw_config(struct perf_event *event)
46324645 {
46334646 int ret = x86_pmu_hw_config(event);
@@ -4698,21 +4711,19 @@ static int intel_pmu_hw_config(struct perf_event *event) · 64 unmodified lines
46984711 * group, which requires the extra space to store the counters.
46994712 */
47004713 leader = event->group_leader;
4701− if (branch_sample_call_stack(leader))
4714+ if (intel_set_branch_counter_constr(leader, &num))
47024715 return -EINVAL;
4703− if (branch_sample_counters(leader)) {
4704− num++;
4705− leader->hw.dyn_constraint &= x86_pmu.lbr_counters;
4706− }
47074716 leader->hw.flags |= PERF_X86_EVENT_BRANCH_COUNTERS;
47084717
47094718 for_each_sibling_event(sibling, leader) {
4710− if (branch_sample_call_stack(sibling))
4719+ if (intel_set_branch_counter_constr(sibling, &num))
4720+ return -EINVAL;
4721+ }
4722+
4723+ /* event isn't installed as a sibling yet. */
4724+ if (event != leader) {
4725+ if (intel_set_branch_counter_constr(event, &num))
47114726 return -EINVAL;
4712− if (branch_sample_counters(sibling)) {
4713− num++;
4714− sibling->hw.dyn_constraint &= x86_pmu.lbr_counters;
4715− }
47164727 }
47174728
47184729 if (num > fls(x86_pmu.lbr_counters))
@@ -4844,8 +4855,10 @@ static int intel_pmu_hw_config(struct perf_event *event) · 125 unmodified lines
48444855 intel_pmu_set_acr_caused_constr(leader, idx++, cause_mask);
48454856
48464857 if (leader->nr_siblings) {
4847− for_each_sibling_event(sibling, leader)
4848− intel_pmu_set_acr_caused_constr(sibling, idx++, cause_mask);
4858+ for_each_sibling_event(sibling, leader) {
4859+ if (is_x86_event(sibling))
4860+ intel_pmu_set_acr_caused_constr(sibling, idx++, cause_mask);
4861+ }
48494862 }
48504863
48514864 if (leader != event)
arch/x86/events/intel/ds.c+7−4
@@ -345,12 +345,12 @@ static u64 parse_omr_data_source(u8 dse) · 344 unmodified lines
345345 if (omr.omr_remote)
346346 val |= REM;
347347
348− val |= omr.omr_hitm ? P(SNOOP, HITM) : P(SNOOP, HIT);
349−
350348 if (omr.omr_source == 0x2) {
351− u8 snoop = omr.omr_snoop | omr.omr_promoted;
349+ u8 snoop = omr.omr_snoop | (omr.omr_promoted << 1);
352350
353− if (snoop == 0x0)
351+ if (omr.omr_hitm)
352+ val |= P(SNOOP, HITM);
353+ else if (snoop == 0x0)
354354 val |= P(SNOOP, NA);
355355 else if (snoop == 0x1)
356356 val |= P(SNOOP, MISS);
@@ -359,7 +359,10 @@ static u64 parse_omr_data_source(u8 dse) · 2 unmodified lines
359359 else if (snoop == 0x3)
360360 val |= P(SNOOP, NONE);
361361 } else if (omr.omr_source > 0x2 && omr.omr_source < 0x7) {
362+ val |= omr.omr_hitm ? P(SNOOP, HITM) : P(SNOOP, HIT);
362363 val |= omr.omr_snoop ? P(SNOOPX, FWD) : 0;
364+ } else {
365+ val |= P(SNOOP, NONE);
363366 }
364367
365368 return val;
arch/x86/hyperv/hv_crash.c+52−48
@@ -107,14 +107,12 @@ static void __noreturn hv_panic_timeout_reboot(void) · 106 unmodified lines
107107 cpu_relax();
108108 }
109109
110−/* This cannot be inlined as it needs stack */
111−static noinline __noclone void hv_crash_restore_tss(void)
110+static void hv_crash_restore_tss(void)
112111 {
113112 load_TR_desc();
114113 }
115114
116−/* This cannot be inlined as it needs stack */
117−static noinline void hv_crash_clear_kernpt(void)
115+static void hv_crash_clear_kernpt(void)
118116 {
119117 pgd_t *pgd;
120118 p4d_t *p4d;
@@ -125,6 +123,25 @@ static noinline void hv_crash_clear_kernpt(void) · 4 unmodified lines
125123 native_p4d_clear(p4d);
126124 }
127125
126+
127+static void __noreturn hv_crash_handle(void)
128+{
129+ hv_crash_restore_tss();
130+ hv_crash_clear_kernpt();
131+
132+ /* we are now fully in devirtualized normal kernel mode */
133+ __crash_kexec(NULL);
134+
135+ hv_panic_timeout_reboot();
136+}
137+
138+/*
139+ * __naked functions do not permit function calls, not even to __always_inline
140+ * functions that only contain asm() blocks themselves. So use a macro instead.
141+ */
142+#define hv_wrmsr(msr, val) \
143+ asm volatile("wrmsr" :: "c"(msr), "a"((u32)val), "d"((u32)(val >> 32)) : "memory")
144+
128145 /*
129146 * This is the C entry point from the asm glue code after the disable hypercall.
130147 * We enter here in IA32-e long mode, ie, full 64bit mode running on kernel
@@ -133,51 +150,38 @@ static noinline void hv_crash_clear_kernpt(void) · 2 unmodified lines
133150 * available. We restore kernel GDT, and rest of the context, and continue
134151 * to kexec.
135152 */
136−static asmlinkage void __noreturn hv_crash_c_entry(void)
153+static void __naked hv_crash_c_entry(void)
137154 {
138− struct hv_crash_ctxt *ctxt = &hv_crash_ctxt;
139−
140155 /* first thing, restore kernel gdt */
141− native_load_gdt(&ctxt->gdtr);
156+ asm volatile("lgdt %0" : : "m" (hv_crash_ctxt.gdtr));
142157
143− asm volatile("movw %%ax, %%ss" : : "a"(ctxt->ss));
144− asm volatile("movq %0, %%rsp" : : "m"(ctxt->rsp));
158+ asm volatile("movw %0, %%ss\n\t"
159+ "movq %1, %%rsp"
160+ :: "m"(hv_crash_ctxt.ss), "m"(hv_crash_ctxt.rsp));
145161
146− asm volatile("movw %%ax, %%ds" : : "a"(ctxt->ds));
147− asm volatile("movw %%ax, %%es" : : "a"(ctxt->es));
148− asm volatile("movw %%ax, %%fs" : : "a"(ctxt->fs));
149− asm volatile("movw %%ax, %%gs" : : "a"(ctxt->gs));
162+ asm volatile("movw %0, %%ds" : : "m"(hv_crash_ctxt.ds));
163+ asm volatile("movw %0, %%es" : : "m"(hv_crash_ctxt.es));
164+ asm volatile("movw %0, %%fs" : : "m"(hv_crash_ctxt.fs));
165+ asm volatile("movw %0, %%gs" : : "m"(hv_crash_ctxt.gs));
150166
151− native_wrmsrq(MSR_IA32_CR_PAT, ctxt->pat);
152− asm volatile("movq %0, %%cr0" : : "r"(ctxt->cr0));
167+ hv_wrmsr(MSR_IA32_CR_PAT, hv_crash_ctxt.pat);
168+ asm volatile("movq %0, %%cr0" : : "r"(hv_crash_ctxt.cr0));
153169
154− asm volatile("movq %0, %%cr8" : : "r"(ctxt->cr8));
155− asm volatile("movq %0, %%cr4" : : "r"(ctxt->cr4));
156− asm volatile("movq %0, %%cr2" : : "r"(ctxt->cr4));
170+ asm volatile("movq %0, %%cr8" : : "r"(hv_crash_ctxt.cr8));
171+ asm volatile("movq %0, %%cr4" : : "r"(hv_crash_ctxt.cr4));
172+ asm volatile("movq %0, %%cr2" : : "r"(hv_crash_ctxt.cr2));
157173
158− native_load_idt(&ctxt->idtr);
159− native_wrmsrq(MSR_GS_BASE, ctxt->gsbase);
160− native_wrmsrq(MSR_EFER, ctxt->efer);
174+ asm volatile("lidt %0" : : "m" (hv_crash_ctxt.idtr));
175+ hv_wrmsr(MSR_GS_BASE, hv_crash_ctxt.gsbase);
176+ hv_wrmsr(MSR_EFER, hv_crash_ctxt.efer);
161177
162178 /* restore the original kernel CS now via far return */
163− asm volatile("movzwq %0, %%rax\n\t"
164− "pushq %%rax\n\t"
165− "pushq $1f\n\t"
166− "lretq\n\t"
167− "1:nop\n\t" : : "m"(ctxt->cs) : "rax");
168−
169− /* We are in asmlinkage without stack frame, hence make C function
170− * calls which will buy stack frames.
171− */
172− hv_crash_restore_tss();
173− hv_crash_clear_kernpt();
174−
175− /* we are now fully in devirtualized normal kernel mode */
176− __crash_kexec(NULL);
177−
178− hv_panic_timeout_reboot();
179+ asm volatile("pushq %q0\n\t"
180+ "pushq %q1\n\t"
181+ "lretq"
182+ :: "r"(hv_crash_ctxt.cs), "r"(hv_crash_handle));
179183 }
180−/* Tell gcc we are using lretq long jump in the above function intentionally */
184+/* Tell objtool we are using lretq long jump in the above function intentionally */
181185 STACK_FRAME_NON_STANDARD(hv_crash_c_entry);
182186
183187 static void hv_mark_tss_not_busy(void)
@@ -195,20 +199,20 @@ static void hv_hvcrash_ctxt_save(void) · 11 unmodified lines
195199 {
196200 struct hv_crash_ctxt *ctxt = &hv_crash_ctxt;
197201
198− asm volatile("movq %%rsp,%0" : "=m"(ctxt->rsp));
202+ ctxt->rsp = current_stack_pointer;
199203
200204 ctxt->cr0 = native_read_cr0();
201205 ctxt->cr4 = native_read_cr4();
202206
203− asm volatile("movq %%cr2, %0" : "=a"(ctxt->cr2));
204− asm volatile("movq %%cr8, %0" : "=a"(ctxt->cr8));
207+ asm volatile("movq %%cr2, %0" : "=r"(ctxt->cr2));
208+ asm volatile("movq %%cr8, %0" : "=r"(ctxt->cr8));
205209
206− asm volatile("movl %%cs, %%eax" : "=a"(ctxt->cs));
207− asm volatile("movl %%ss, %%eax" : "=a"(ctxt->ss));
208− asm volatile("movl %%ds, %%eax" : "=a"(ctxt->ds));
209− asm volatile("movl %%es, %%eax" : "=a"(ctxt->es));
210− asm volatile("movl %%fs, %%eax" : "=a"(ctxt->fs));
211− asm volatile("movl %%gs, %%eax" : "=a"(ctxt->gs));
210+ asm volatile("movw %%cs, %0" : "=m"(ctxt->cs));
211+ asm volatile("movw %%ss, %0" : "=m"(ctxt->ss));
212+ asm volatile("movw %%ds, %0" : "=m"(ctxt->ds));
213+ asm volatile("movw %%es, %0" : "=m"(ctxt->es));
214+ asm volatile("movw %%fs, %0" : "=m"(ctxt->fs));
215+ asm volatile("movw %%gs, %0" : "=m"(ctxt->gs));
212216
213217 native_store_gdt(&ctxt->gdtr);
214218 store_idt(&ctxt->idtr);
arch/x86/include/asm/kvm_host.h+2−1
@@ -2485,7 +2485,8 @@ int memslot_rmap_alloc(struct kvm_memory_slot *slot, unsigned long npages); · 2484 unmodified lines
24852485 KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS | \
24862486 KVM_X86_QUIRK_SLOT_ZAP_ALL | \
24872487 KVM_X86_QUIRK_STUFF_FEATURE_MSRS | \
2488− KVM_X86_QUIRK_IGNORE_GUEST_PAT)
2488+ KVM_X86_QUIRK_IGNORE_GUEST_PAT | \
2489+ KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM)
24892490
24902491 #define KVM_X86_CONDITIONAL_QUIRKS \
24912492 (KVM_X86_QUIRK_CD_NW_CLEARED | \
arch/x86/include/uapi/asm/kvm.h+1−0
@@ -476,6 +476,7 @@ struct kvm_sync_regs { · 475 unmodified lines
476476 #define KVM_X86_QUIRK_SLOT_ZAP_ALL (1 << 7)
477477 #define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)
478478 #define KVM_X86_QUIRK_IGNORE_GUEST_PAT (1 << 9)
479+#define KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM (1 << 10)
479480
480481 #define KVM_STATE_NESTED_FORMAT_VMX 0
481482 #define KVM_STATE_NESTED_FORMAT_SVM 1
arch/x86/kernel/Makefile+14−0
@@ -44,6 +44,20 @@ KCOV_INSTRUMENT_unwind_orc.o := n · 43 unmodified lines
4444 KCOV_INSTRUMENT_unwind_frame.o := n
4545 KCOV_INSTRUMENT_unwind_guess.o := n
4646
47+# Disable KCOV to prevent crashes during kexec: load_segments() invalidates
48+# the GS base, which KCOV relies on for per-CPU data.
49+#
50+# As KCOV and KEXEC compatibility should be preserved (e.g. syzkaller is
51+# using it to collect crash dumps during kernel fuzzing), disabling
52+# KCOV for KEXEC kernels is not an option. Selectively disabling KCOV
53+# instrumentation for individual affected functions can be fragile, while
54+# adding more checks to KCOV would slow it down.
55+#
56+# As a compromise solution, disable KCOV instrumentation for the whole
57+# source code file. If its coverage is ever needed, other approaches
58+# should be considered.
59+KCOV_INSTRUMENT_machine_kexec_64.o := n
60+
4761 CFLAGS_head32.o := -fno-stack-protector
4862 CFLAGS_head64.o := -fno-stack-protector
4963 CFLAGS_irq.o := -I $(src)/../include/asm/trace
arch/x86/kernel/apic/apic.c+6−0
@@ -1894,6 +1894,7 @@ void __init check_x2apic(void) · 1893 unmodified lines
18941894
18951895 static inline void try_to_enable_x2apic(int remap_mode) { }
18961896 static inline void __x2apic_enable(void) { }
1897+static inline void __x2apic_disable(void) { }
18971898 #endif /* !CONFIG_X86_X2APIC */
18981899
18991900 void __init enable_IR_x2apic(void)
@@ -2456,6 +2457,11 @@ static void lapic_resume(void *data) · 556 unmodified lines
24562457 if (x2apic_mode) {
24572458 __x2apic_enable();
24582459 } else {
2460+ if (x2apic_enabled()) {
2461+ pr_warn_once("x2apic: re-enabled by firmware during resume. Disabling\n");
2462+ __x2apic_disable();
2463+ }
2464+
24592465 /*
24602466 * Make sure the APICBASE points to the right address
24612467 *
arch/x86/kernel/apic/x2apic_uv_x.c+16−2
@@ -1708,8 +1708,22 @@ static void __init uv_system_init_hub(void) · 1707 unmodified lines
17081708 struct uv_hub_info_s *new_hub;
17091709
17101710 /* Allocate & fill new per hub info list */
1711− new_hub = (bid == 0) ? &uv_hub_info_node0
1712− : kzalloc_node(bytes, GFP_KERNEL, uv_blade_to_node(bid));
1711+ if (bid == 0) {
1712+ new_hub = &uv_hub_info_node0;
1713+ } else {
1714+ int nid;
1715+
1716+ /*
1717+ * Deconfigured sockets are mapped to SOCK_EMPTY. Use
1718+ * NUMA_NO_NODE to allocate on a valid node.
1719+ */
1720+ nid = uv_blade_to_node(bid);
1721+ if (nid == SOCK_EMPTY)
1722+ nid = NUMA_NO_NODE;
1723+
1724+ new_hub = kzalloc_node(bytes, GFP_KERNEL, nid);
1725+ }
1726+
17131727 if (WARN_ON_ONCE(!new_hub)) {
17141728 /* do not kfree() bid 0, which is statically allocated */
17151729 while (--bid > 0)
arch/x86/kernel/cpu/common.c+26−7
@@ -433,7 +433,20 @@ static __always_inline void setup_lass(struct cpuinfo_x86 *c) · 432 unmodified lines
433433
434434 /* These bits should not change their value after CPU init is finished. */
435435 static const unsigned long cr4_pinned_mask = X86_CR4_SMEP | X86_CR4_SMAP | X86_CR4_UMIP |
436− X86_CR4_FSGSBASE | X86_CR4_CET | X86_CR4_FRED;
436+ X86_CR4_FSGSBASE | X86_CR4_CET;
437+
438+/*
439+ * The CR pinning protects against ROP on the 'mov %reg, %CRn' instruction(s).
440+ * Since you can ROP directly to these instructions (barring shadow stack),
441+ * any protection must follow immediately and unconditionally after that.
442+ *
443+ * Specifically, the CR[04] write functions below will have the value
444+ * validation controlled by the @cr_pinning static_branch which is
445+ * __ro_after_init, just like the cr4_pinned_bits value.
446+ *
447+ * Once set, an attacker will have to defeat page-tables to get around these
448+ * restrictions. Which is a much bigger ask than 'simple' ROP.
449+ */
437450 static DEFINE_STATIC_KEY_FALSE_RO(cr_pinning);
438451 static unsigned long cr4_pinned_bits __ro_after_init;
439452
@@ -2050,12 +2063,6 @@ static void identify_cpu(struct cpuinfo_x86 *c) · 1610 unmodified lines
20502063 setup_umip(c);
20512064 setup_lass(c);
20522065
2053− /* Enable FSGSBASE instructions if available. */
2054− if (cpu_has(c, X86_FEATURE_FSGSBASE)) {
2055− cr4_set_bits(X86_CR4_FSGSBASE);
2056− elf_hwcap2 |= HWCAP2_FSGSBASE;
2057− }
2058−
20592066 /*
20602067 * The vendor-specific functions might have changed features.
20612068 * Now we do "generic changes."
@@ -2416,6 +2423,18 @@ void cpu_init_exception_handling(bool boot_cpu) · 354 unmodified lines
24162423 /* GHCB needs to be setup to handle #VC. */
24172424 setup_ghcb();
24182425
2426+ /*
2427+ * On CPUs with FSGSBASE support, paranoid_entry() uses
2428+ * ALTERNATIVE-patched RDGSBASE/WRGSBASE instructions. Secondary CPUs
2429+ * boot after alternatives are patched globally, so early exceptions
2430+ * execute patched code that depends on FSGSBASE. Enable the feature
2431+ * before any exceptions occur.
2432+ */
2433+ if (cpu_feature_enabled(X86_FEATURE_FSGSBASE)) {
2434+ cr4_set_bits(X86_CR4_FSGSBASE);
2435+ elf_hwcap2 |= HWCAP2_FSGSBASE;
2436+ }
2437+
24192438 if (cpu_feature_enabled(X86_FEATURE_FRED)) {
24202439 /* The boot CPU has enabled FRED during early boot */
24212440 if (!boot_cpu)
arch/x86/kernel/cpu/mce/amd.c+11−6
@@ -875,13 +875,18 @@ void amd_clear_bank(struct mce *m) · 874 unmodified lines
875875 {
876876 amd_reset_thr_limit(m->bank);
877877
878− /* Clear MCA_DESTAT for all deferred errors even those logged in MCA_STATUS. */
879− if (m->status & MCI_STATUS_DEFERRED)
880− mce_wrmsrq(MSR_AMD64_SMCA_MCx_DESTAT(m->bank), 0);
878+ if (mce_flags.smca) {
879+ /*
880+ * Clear MCA_DESTAT for all deferred errors even those
881+ * logged in MCA_STATUS.
882+ */
883+ if (m->status & MCI_STATUS_DEFERRED)
884+ mce_wrmsrq(MSR_AMD64_SMCA_MCx_DESTAT(m->bank), 0);
881885
882− /* Don't clear MCA_STATUS if MCA_DESTAT was used exclusively. */
883− if (m->kflags & MCE_CHECK_DFR_REGS)
884− return;
886+ /* Don't clear MCA_STATUS if MCA_DESTAT was used exclusively. */
887+ if (m->kflags & MCE_CHECK_DFR_REGS)
888+ return;
889+ }
885890
886891 mce_wrmsrq(mca_msr_reg(m->bank, MCA_STATUS), 0);
887892 }
arch/x86/kernel/cpu/mshyperv.c+3−2
@@ -496,8 +496,9 @@ static void hv_reserve_irq_vectors(void) · 495 unmodified lines
496496 test_and_set_bit(HYPERV_DBG_FASTFAIL_VECTOR, system_vectors))
497497 BUG();
498498
499− pr_info("Hyper-V: reserve vectors: %d %d %d\n", HYPERV_DBG_ASSERT_VECTOR,
500− HYPERV_DBG_SERVICE_VECTOR, HYPERV_DBG_FASTFAIL_VECTOR);
499+ pr_info("Hyper-V: reserve vectors: 0x%x 0x%x 0x%x\n",
500+ HYPERV_DBG_ASSERT_VECTOR, HYPERV_DBG_SERVICE_VECTOR,
501+ HYPERV_DBG_FASTFAIL_VECTOR);
501502 }
502503
503504 static void __init ms_hyperv_init_platform(void)
arch/x86/kvm/cpuid.c+4−1
@@ -776,7 +776,10 @@ do { \ · 775 unmodified lines
776776 #define SYNTHESIZED_F(name) \
777777 ({ \
778778 kvm_cpu_cap_synthesized |= feature_bit(name); \
779− F(name); \
779+ \
780+ BUILD_BUG_ON(X86_FEATURE_##name >= MAX_CPU_FEATURES); \
781+ if (boot_cpu_has(X86_FEATURE_##name)) \
782+ F(name); \
780783 })
781784
782785 /*
arch/x86/kvm/hyperv.c+5−4
@@ -1981,16 +1981,17 @@ int kvm_hv_vcpu_flush_tlb(struct kvm_vcpu *vcpu) · 1980 unmodified lines
19811981 if (entries[i] == KVM_HV_TLB_FLUSHALL_ENTRY)
19821982 goto out_flush_all;
19831983
1984− if (is_noncanonical_invlpg_address(entries[i], vcpu))
1985− continue;
1986−
19871984 /*
19881985 * Lower 12 bits of 'address' encode the number of additional
19891986 * pages to flush.
19901987 */
19911988 gva = entries[i] & PAGE_MASK;
1992− for (j = 0; j < (entries[i] & ~PAGE_MASK) + 1; j++)
1989+ for (j = 0; j < (entries[i] & ~PAGE_MASK) + 1; j++) {
1990+ if (is_noncanonical_invlpg_address(gva + j * PAGE_SIZE, vcpu))
1991+ continue;
1992+
19931993 kvm_x86_call(flush_tlb_gva)(vcpu, gva + j * PAGE_SIZE);
1994+ }
19941995
19951996 ++vcpu->stat.tlb_flush;
19961997 }
arch/x86/kvm/ioapic.c+2−1
@@ -321,7 +321,8 @@ void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, · 320 unmodified lines
321321 idx = srcu_read_lock(&kvm->irq_srcu);
322322 gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin);
323323 if (gsi != -1)
324− hlist_for_each_entry_rcu(kimn, &ioapic->mask_notifier_list, link)
324+ hlist_for_each_entry_srcu(kimn, &ioapic->mask_notifier_list, link,
325+ srcu_read_lock_held(&kvm->irq_srcu))
325326 if (kimn->irq == gsi)
326327 kimn->func(kimn, mask);
327328 srcu_read_unlock(&kvm->irq_srcu, idx);
arch/x86/kvm/mmu/mmu.c+10−7
@@ -3044,12 +3044,6 @@ static int mmu_set_spte(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot, · 3043 unmodified lines
30443044 bool prefetch = !fault || fault->prefetch;
30453045 bool write_fault = fault && fault->write;
30463046
3047− if (unlikely(is_noslot_pfn(pfn))) {
3048− vcpu->stat.pf_mmio_spte_created++;
3049− mark_mmio_spte(vcpu, sptep, gfn, pte_access);
3050− return RET_PF_EMULATE;
3051− }
3052−
30533047 if (is_shadow_present_pte(*sptep)) {
30543048 if (prefetch && is_last_spte(*sptep, level) &&
30553049 pfn == spte_to_pfn(*sptep))
@@ -3066,13 +3060,22 @@ static int mmu_set_spte(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot, · 10 unmodified lines
30663060 child = spte_to_child_sp(pte);
30673061 drop_parent_pte(vcpu->kvm, child, sptep);
30683062 flush = true;
3069− } else if (WARN_ON_ONCE(pfn != spte_to_pfn(*sptep))) {
3063+ } else if (pfn != spte_to_pfn(*sptep)) {
3064+ WARN_ON_ONCE(vcpu->arch.mmu->root_role.direct);
30703065 drop_spte(vcpu->kvm, sptep);
30713066 flush = true;
30723067 } else
30733068 was_rmapped = 1;
30743069 }
30753070
3071+ if (unlikely(is_noslot_pfn(pfn))) {
3072+ vcpu->stat.pf_mmio_spte_created++;
3073+ mark_mmio_spte(vcpu, sptep, gfn, pte_access);
3074+ if (flush)
3075+ kvm_flush_remote_tlbs_gfn(vcpu->kvm, gfn, level);
3076+ return RET_PF_EMULATE;
3077+ }
3078+
30763079 wrprot = make_spte(vcpu, sp, slot, pte_access, gfn, pfn, *sptep, prefetch,
30773080 false, host_writable, &spte);
30783081
arch/x86/kvm/svm/avic.c+6−3
@@ -189,12 +189,12 @@ static void avic_activate_vmcb(struct vcpu_svm *svm) · 188 unmodified lines
189189 struct kvm_vcpu *vcpu = &svm->vcpu;
190190
191191 vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
192−
193192 vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
194193 vmcb->control.avic_physical_id |= avic_get_max_physical_id(vcpu);
195−
196194 vmcb->control.int_ctl |= AVIC_ENABLE_MASK;
197195
196+ svm_clr_intercept(svm, INTERCEPT_CR8_WRITE);
197+
198198 /*
199199 * Note: KVM supports hybrid-AVIC mode, where KVM emulates x2APIC MSR
200200 * accesses, while interrupt injection to a running vCPU can be
@@ -226,6 +226,9 @@ static void avic_deactivate_vmcb(struct vcpu_svm *svm) · 25 unmodified lines
226226 vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
227227 vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
228228
229+ if (!sev_es_guest(svm->vcpu.kvm))
230+ svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
231+
229232 /*
230233 * If running nested and the guest uses its own MSR bitmap, there
231234 * is no need to update L0's msr bitmap
@@ -368,7 +371,7 @@ void avic_init_vmcb(struct vcpu_svm *svm, struct vmcb *vmcb) · 136 unmodified lines
368371 vmcb->control.avic_physical_id = __sme_set(__pa(kvm_svm->avic_physical_id_table));
369372 vmcb->control.avic_vapic_bar = APIC_DEFAULT_PHYS_BASE;
370373
371− if (kvm_apicv_activated(svm->vcpu.kvm))
374+ if (kvm_vcpu_apicv_active(&svm->vcpu))
372375 avic_activate_vmcb(svm);
373376 else
374377 avic_deactivate_vmcb(svm);
arch/x86/kvm/svm/nested.c+10−2
@@ -418,6 +418,15 @@ static bool nested_vmcb_check_controls(struct kvm_vcpu *vcpu) · 417 unmodified lines
418418 return __nested_vmcb_check_controls(vcpu, ctl);
419419 }
420420
421+int nested_svm_check_cached_vmcb12(struct kvm_vcpu *vcpu)
422+{
423+ if (!nested_vmcb_check_save(vcpu) ||
424+ !nested_vmcb_check_controls(vcpu))
425+ return -EINVAL;
426+
427+ return 0;
428+}
429+
421430 /*
422431 * If a feature is not advertised to L1, clear the corresponding vmcb12
423432 * intercept.
@@ -1028,8 +1037,7 @@ int nested_svm_vmrun(struct kvm_vcpu *vcpu) · 604 unmodified lines
10281037 nested_copy_vmcb_control_to_cache(svm, &vmcb12->control);
10291038 nested_copy_vmcb_save_to_cache(svm, &vmcb12->save);
10301039
1031− if (!nested_vmcb_check_save(vcpu) ||
1032− !nested_vmcb_check_controls(vcpu)) {
1040+ if (nested_svm_check_cached_vmcb12(vcpu) < 0) {
10331041 vmcb12->control.exit_code = SVM_EXIT_ERR;
10341042 vmcb12->control.exit_info_1 = 0;
10351043 vmcb12->control.exit_info_2 = 0;
arch/x86/kvm/svm/svm.c+11−6
@@ -1077,8 +1077,7 @@ static void init_vmcb(struct kvm_vcpu *vcpu, bool init_event) · 1076 unmodified lines
10771077 svm_set_intercept(svm, INTERCEPT_CR0_WRITE);
10781078 svm_set_intercept(svm, INTERCEPT_CR3_WRITE);
10791079 svm_set_intercept(svm, INTERCEPT_CR4_WRITE);
1080− if (!kvm_vcpu_apicv_active(vcpu))
1081− svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
1080+ svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
10821081
10831082 set_dr_intercepts(svm);
10841083
@@ -1189,7 +1188,7 @@ static void init_vmcb(struct kvm_vcpu *vcpu, bool init_event) · 104 unmodified lines
11891188 if (guest_cpu_cap_has(vcpu, X86_FEATURE_ERAPS))
11901189 svm->vmcb->control.erap_ctl |= ERAP_CONTROL_ALLOW_LARGER_RAP;
11911190
1192− if (kvm_vcpu_apicv_active(vcpu))
1191+ if (enable_apicv && irqchip_in_kernel(vcpu->kvm))
11931192 avic_init_vmcb(svm, vmcb);
11941193
11951194 if (vnmi)
@@ -2674,9 +2673,11 @@ static int dr_interception(struct kvm_vcpu *vcpu) · 1478 unmodified lines
26742673
26752674 static int cr8_write_interception(struct kvm_vcpu *vcpu)
26762675 {
2676+ u8 cr8_prev = kvm_get_cr8(vcpu);
26772677 int r;
26782678
2679− u8 cr8_prev = kvm_get_cr8(vcpu);
2679+ WARN_ON_ONCE(kvm_vcpu_apicv_active(vcpu));
2680+
26802681 /* instruction emulation calls kvm_set_cr8() */
26812682 r = cr_interception(vcpu);
26822683 if (lapic_in_kernel(vcpu))
@@ -4879,11 +4880,15 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram) · 2196 unmodified lines
48794880 vmcb12 = map.hva;
48804881 nested_copy_vmcb_control_to_cache(svm, &vmcb12->control);
48814882 nested_copy_vmcb_save_to_cache(svm, &vmcb12->save);
4882− ret = enter_svm_guest_mode(vcpu, smram64->svm_guest_vmcb_gpa, vmcb12, false);
48834883
4884− if (ret)
4884+ if (nested_svm_check_cached_vmcb12(vcpu) < 0)
4885+ goto unmap_save;
4886+
4887+ if (enter_svm_guest_mode(vcpu, smram64->svm_guest_vmcb_gpa,
4888+ vmcb12, false) != 0)
48854889 goto unmap_save;
48864890
4891+ ret = 0;
48874892 svm->nested.nested_run_pending = 1;
48884893
48894894 unmap_save:
arch/x86/kvm/svm/svm.h+1−0
@@ -797,6 +797,7 @@ static inline int nested_svm_simple_vmexit(struct vcpu_svm *svm, u32 exit_code) · 796 unmodified lines
797797
798798 int nested_svm_exit_handled(struct vcpu_svm *svm);
799799 int nested_svm_check_permissions(struct kvm_vcpu *vcpu);
800+int nested_svm_check_cached_vmcb12(struct kvm_vcpu *vcpu);
800801 int nested_svm_check_exception(struct vcpu_svm *svm, unsigned nr,
801802 bool has_error_code, u32 error_code);
802803 int nested_svm_exit_special(struct vcpu_svm *svm);
arch/x86/kvm/vmx/nested.c+45−16
@@ -3300,10 +3300,24 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu, · 3299 unmodified lines
33003300 if (CC(vmcs12->guest_cr4 & X86_CR4_CET && !(vmcs12->guest_cr0 & X86_CR0_WP)))
33013301 return -EINVAL;
33023302
3303− if ((vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS) &&
3304− (CC(!kvm_dr7_valid(vmcs12->guest_dr7)) ||
3305− CC(!vmx_is_valid_debugctl(vcpu, vmcs12->guest_ia32_debugctl, false))))
3306− return -EINVAL;
3303+ if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS) {
3304+ u64 debugctl = vmcs12->guest_ia32_debugctl;
3305+
3306+ /*
3307+ * FREEZE_IN_SMM is not virtualized, but allow L1 to set it in
3308+ * vmcs12's DEBUGCTL under a quirk for backwards compatibility.
3309+ * Note that the quirk only relaxes the consistency check. The
3310+ * vmcc02 bit is still under the control of the host. In
3311+ * particular, if a host administrator decides to clear the bit,
3312+ * then L1 has no say in the matter.
3313+ */
3314+ if (kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM))
3315+ debugctl &= ~DEBUGCTLMSR_FREEZE_IN_SMM;
3316+
3317+ if (CC(!kvm_dr7_valid(vmcs12->guest_dr7)) ||
3318+ CC(!vmx_is_valid_debugctl(vcpu, debugctl, false)))
3319+ return -EINVAL;
3320+ }
33073321
33083322 if ((vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_PAT) &&
33093323 CC(!kvm_pat_valid(vmcs12->guest_ia32_pat)))
@@ -6842,13 +6856,34 @@ void vmx_leave_nested(struct kvm_vcpu *vcpu) · 3532 unmodified lines
68426856 free_nested(vcpu);
68436857 }
68446858
6859+int nested_vmx_check_restored_vmcs12(struct kvm_vcpu *vcpu)
6860+{
6861+ enum vm_entry_failure_code ignored;
6862+ struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
6863+
6864+ if (nested_cpu_has_shadow_vmcs(vmcs12) &&
6865+ vmcs12->vmcs_link_pointer != INVALID_GPA) {
6866+ struct vmcs12 *shadow_vmcs12 = get_shadow_vmcs12(vcpu);
6867+
6868+ if (shadow_vmcs12->hdr.revision_id != VMCS12_REVISION ||
6869+ !shadow_vmcs12->hdr.shadow_vmcs)
6870+ return -EINVAL;
6871+ }
6872+
6873+ if (nested_vmx_check_controls(vcpu, vmcs12) ||
6874+ nested_vmx_check_host_state(vcpu, vmcs12) ||
6875+ nested_vmx_check_guest_state(vcpu, vmcs12, &ignored))
6876+ return -EINVAL;
6877+
6878+ return 0;
6879+}
6880+
68456881 static int vmx_set_nested_state(struct kvm_vcpu *vcpu,
68466882 struct kvm_nested_state __user *user_kvm_nested_state,
68476883 struct kvm_nested_state *kvm_state)
68486884 {
68496885 struct vcpu_vmx *vmx = to_vmx(vcpu);
68506886 struct vmcs12 *vmcs12;
6851− enum vm_entry_failure_code ignored;
68526887 struct kvm_vmx_nested_state_data __user *user_vmx_nested_state =
68536888 &user_kvm_nested_state->data.vmx[0];
68546889 int ret;
@@ -6979,25 +7014,20 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu, · 124 unmodified lines
69797014 vmx->nested.mtf_pending =
69807015 !!(kvm_state->flags & KVM_STATE_NESTED_MTF_PENDING);
69817016
6982− ret = -EINVAL;
69837017 if (nested_cpu_has_shadow_vmcs(vmcs12) &&
69847018 vmcs12->vmcs_link_pointer != INVALID_GPA) {
69857019 struct vmcs12 *shadow_vmcs12 = get_shadow_vmcs12(vcpu);
69867020
7021+ ret = -EINVAL;
69877022 if (kvm_state->size <
69887023 sizeof(*kvm_state) +
69897024 sizeof(user_vmx_nested_state->vmcs12) + sizeof(*shadow_vmcs12))
69907025 goto error_guest_mode;
69917026
7027+ ret = -EFAULT;
69927028 if (copy_from_user(shadow_vmcs12,
69937029 user_vmx_nested_state->shadow_vmcs12,
6994− sizeof(*shadow_vmcs12))) {
6995− ret = -EFAULT;
6996− goto error_guest_mode;
6997− }
6998−
6999− if (shadow_vmcs12->hdr.revision_id != VMCS12_REVISION ||
7000− !shadow_vmcs12->hdr.shadow_vmcs)
7030+ sizeof(*shadow_vmcs12)))
70017031 goto error_guest_mode;
70027032 }
70037033
@@ -7008,9 +7038,8 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu, · 4 unmodified lines
70087038 kvm_state->hdr.vmx.preemption_timer_deadline;
70097039 }
70107040
7011− if (nested_vmx_check_controls(vcpu, vmcs12) ||
7012− nested_vmx_check_host_state(vcpu, vmcs12) ||
7013− nested_vmx_check_guest_state(vcpu, vmcs12, &ignored))
7041+ ret = nested_vmx_check_restored_vmcs12(vcpu);
7042+ if (ret < 0)
70147043 goto error_guest_mode;
70157044
70167045 vmx->nested.dirty_vmcs12 = true;
arch/x86/kvm/vmx/nested.h+1−0
@@ -22,6 +22,7 @@ void nested_vmx_setup_ctls_msrs(struct vmcs_config *vmcs_conf, u32 ept_caps); · 21 unmodified lines
2222 void nested_vmx_hardware_unsetup(void);
2323 __init int nested_vmx_hardware_setup(int (*exit_handlers[])(struct kvm_vcpu *));
2424 void nested_vmx_set_vmcs_shadowing_bitmap(void);
25+int nested_vmx_check_restored_vmcs12(struct kvm_vcpu *vcpu);
2526 void nested_vmx_free_vcpu(struct kvm_vcpu *vcpu);
2627 enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
2728 bool from_vmentry);
arch/x86/kvm/vmx/vmx.c+7−3
@@ -1149,7 +1149,7 @@ static void add_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr, · 1148 unmodified lines
11491149 }
11501150
11511151 vmx_add_auto_msr(&m->guest, msr, guest_val, VM_ENTRY_MSR_LOAD_COUNT, kvm);
1152− vmx_add_auto_msr(&m->guest, msr, host_val, VM_EXIT_MSR_LOAD_COUNT, kvm);
1152+ vmx_add_auto_msr(&m->host, msr, host_val, VM_EXIT_MSR_LOAD_COUNT, kvm);
11531153 }
11541154
11551155 static bool update_transition_efer(struct vcpu_vmx *vmx)
@@ -8528,9 +8528,13 @@ int vmx_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram) · 7372 unmodified lines
85288528 }
85298529
85308530 if (vmx->nested.smm.guest_mode) {
8531+ /* Triple fault if the state is invalid. */
8532+ if (nested_vmx_check_restored_vmcs12(vcpu) < 0)
8533+ return 1;
8534+
85318535 ret = nested_vmx_enter_non_root_mode(vcpu, false);
8532− if (ret)
8533− return ret;
8536+ if (ret != NVMX_VMENTRY_SUCCESS)
8537+ return 1;
85348538
85358539 vmx->nested.nested_run_pending = 1;
85368540 vmx->nested.smm.guest_mode = false;
arch/x86/kvm/x86.c+2−2
@@ -243,7 +243,7 @@ EXPORT_SYMBOL_FOR_KVM_INTERNAL(enable_ipiv); · 242 unmodified lines
243243 bool __read_mostly enable_device_posted_irqs = true;
244244 EXPORT_SYMBOL_FOR_KVM_INTERNAL(enable_device_posted_irqs);
245245
246−const struct _kvm_stats_desc kvm_vm_stats_desc[] = {
246+const struct kvm_stats_desc kvm_vm_stats_desc[] = {
247247 KVM_GENERIC_VM_STATS(),
248248 STATS_DESC_COUNTER(VM, mmu_shadow_zapped),
249249 STATS_DESC_COUNTER(VM, mmu_pte_write),
@@ -269,7 +269,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 19 unmodified lines
269269 sizeof(kvm_vm_stats_desc),
270270 };
271271
272−const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
272+const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {
273273 KVM_GENERIC_VCPU_STATS(),
274274 STATS_DESC_COUNTER(VCPU, pf_taken),
275275 STATS_DESC_COUNTER(VCPU, pf_fixed),
arch/x86/mm/Makefile+2−0
@@ -4,6 +4,8 @@ KCOV_INSTRUMENT_tlb.o := n · 3 unmodified lines
44 KCOV_INSTRUMENT_mem_encrypt.o := n
55 KCOV_INSTRUMENT_mem_encrypt_amd.o := n
66 KCOV_INSTRUMENT_pgprot.o := n
7+# See the "Disable KCOV" comment in arch/x86/kernel/Makefile.
8+KCOV_INSTRUMENT_physaddr.o := n
79
810 KASAN_SANITIZE_mem_encrypt.o := n
911 KASAN_SANITIZE_mem_encrypt_amd.o := n
arch/x86/platform/efi/quirks.c+1−1
@@ -424,7 +424,7 @@ void __init efi_unmap_boot_services(void) · 423 unmodified lines
424424 if (efi_enabled(EFI_DBG))
425425 return;
426426
427− sz = sizeof(*ranges_to_free) * efi.memmap.nr_map + 1;
427+ sz = sizeof(*ranges_to_free) * (efi.memmap.nr_map + 1);
428428 ranges_to_free = kzalloc(sz, GFP_KERNEL);
429429 if (!ranges_to_free) {
430430 pr_err("Failed to allocate storage for freeable EFI regions\n");
arch/x86/platform/geode/geode-common.c+18−6
@@ -28,8 +28,10 @@ static const struct software_node geode_gpio_keys_node = { · 27 unmodified lines
2828 .properties = geode_gpio_keys_props,
2929 };
3030
31−static struct property_entry geode_restart_key_props[] = {
32− { /* Placeholder for GPIO property */ },
31+static struct software_node_ref_args geode_restart_gpio_ref;
32+
33+static const struct property_entry geode_restart_key_props[] = {
34+ PROPERTY_ENTRY_REF_ARRAY_LEN("gpios", &geode_restart_gpio_ref, 1),
3335 PROPERTY_ENTRY_U32("linux,code", KEY_RESTART),
3436 PROPERTY_ENTRY_STRING("label", "Reset button"),
3537 PROPERTY_ENTRY_U32("debounce-interval", 100),
@@ -64,8 +66,7 @@ int __init geode_create_restart_key(unsigned int pin) · 28 unmodified lines
6466 struct platform_device *pd;
6567 int err;
6668
67− geode_restart_key_props[0] = PROPERTY_ENTRY_GPIO("gpios",
68− &geode_gpiochip_node,
69+ geode_restart_gpio_ref = SOFTWARE_NODE_REFERENCE(&geode_gpiochip_node,
6970 pin, GPIO_ACTIVE_LOW);
7071
7172 err = software_node_register_node_group(geode_gpio_keys_swnodes);
@@ -99,6 +100,7 @@ int __init geode_create_leds(const char *label, const struct geode_led *leds, · 27 unmodified lines
99100 const struct software_node *group[MAX_LEDS + 2] = { 0 };
100101 struct software_node *swnodes;
101102 struct property_entry *props;
103+ struct software_node_ref_args *gpio_refs;
102104 struct platform_device_info led_info = {
103105 .name = "leds-gpio",
104106 .id = PLATFORM_DEVID_NONE,
@@ -127,6 +129,12 @@ int __init geode_create_leds(const char *label, const struct geode_led *leds, · 22 unmodified lines
127129 goto err_free_swnodes;
128130 }
129131
132+ gpio_refs = kzalloc_objs(*gpio_refs, n_leds);
133+ if (!gpio_refs) {
134+ err = -ENOMEM;
135+ goto err_free_props;
136+ }
137+
130138 group[0] = &geode_gpio_leds_node;
131139 for (i = 0; i < n_leds; i++) {
132140 node_name = kasprintf(GFP_KERNEL, "%s:%d", label, i);
@@ -135,9 +143,11 @@ int __init geode_create_leds(const char *label, const struct geode_led *leds, · 2 unmodified lines
135143 goto err_free_names;
136144 }
137145
146+ gpio_refs[i] = SOFTWARE_NODE_REFERENCE(&geode_gpiochip_node,
147+ leds[i].pin,
148+ GPIO_ACTIVE_LOW);
138149 props[i * 3 + 0] =
139− PROPERTY_ENTRY_GPIO("gpios", &geode_gpiochip_node,
140− leds[i].pin, GPIO_ACTIVE_LOW);
150+ PROPERTY_ENTRY_REF_ARRAY_LEN("gpios", &gpio_refs[i], 1);
141151 props[i * 3 + 1] =
142152 PROPERTY_ENTRY_STRING("linux,default-trigger",
143153 leds[i].default_on ?
@@ -171,6 +181,8 @@ err_unregister_group: · 27 unmodified lines
171181 err_free_names:
172182 while (--i >= 0)
173183 kfree(swnodes[i].name);
184+ kfree(gpio_refs);
185+err_free_props:
174186 kfree(props);
175187 err_free_swnodes:
176188 kfree(swnodes);
crypto/af_alg.c+13−40
@@ -623,8 +623,10 @@ static int af_alg_alloc_tsgl(struct sock *sk) · 622 unmodified lines
623623 sg_init_table(sgl->sg, MAX_SGL_ENTS + 1);
624624 sgl->cur = 0;
625625
626− if (sg)
626+ if (sg) {
627+ sg_unmark_end(sg + MAX_SGL_ENTS - 1);
627628 sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg);
629+ }
628630
629631 list_add_tail(&sgl->list, &ctx->tsgl_list);
630632 }
@@ -635,15 +637,13 @@ static int af_alg_alloc_tsgl(struct sock *sk) · 4 unmodified lines
635637 /**
636638 * af_alg_count_tsgl - Count number of TX SG entries
637639 *
638− * The counting starts from the beginning of the SGL to @bytes. If
639− * an @offset is provided, the counting of the SG entries starts at the @offset.
640+ * The counting starts from the beginning of the SGL to @bytes.
640641 *
641642 * @sk: socket of connection to user space
642643 * @bytes: Count the number of SG entries holding given number of bytes.
643− * @offset: Start the counting of SG entries from the given offset.
644644 * Return: Number of TX SG entries found given the constraints
645645 */
646−unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
646+unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes)
647647 {
648648 const struct alg_sock *ask = alg_sk(sk);
649649 const struct af_alg_ctx *ctx = ask->private;
@@ -658,25 +658,11 @@ unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset) · 8 unmodified lines
658658 const struct scatterlist *sg = sgl->sg;
659659
660660 for (i = 0; i < sgl->cur; i++) {
661− size_t bytes_count;
662−
663− /* Skip offset */
664− if (offset >= sg[i].length) {
665− offset -= sg[i].length;
666− bytes -= sg[i].length;
667− continue;
668− }
669−
670− bytes_count = sg[i].length - offset;
671−
672− offset = 0;
673661 sgl_count++;
674−
675− /* If we have seen requested number of bytes, stop */
676− if (bytes_count >= bytes)
662+ if (sg[i].length >= bytes)
677663 return sgl_count;
678664
679− bytes -= bytes_count;
665+ bytes -= sg[i].length;
680666 }
681667 }
682668
@@ -688,19 +674,14 @@ EXPORT_SYMBOL_GPL(af_alg_count_tsgl); · 5 unmodified lines
688674 * af_alg_pull_tsgl - Release the specified buffers from TX SGL
689675 *
690676 * If @dst is non-null, reassign the pages to @dst. The caller must release
691− * the pages. If @dst_offset is given only reassign the pages to @dst starting
692− * at the @dst_offset (byte). The caller must ensure that @dst is large
693− * enough (e.g. by using af_alg_count_tsgl with the same offset).
677+ * the pages.
694678 *
695679 * @sk: socket of connection to user space
696680 * @used: Number of bytes to pull from TX SGL
697681 * @dst: If non-NULL, buffer is reassigned to dst SGL instead of releasing. The
698682 * caller must release the buffers in dst.
699− * @dst_offset: Reassign the TX SGL from given offset. All buffers before
700− * reaching the offset is released.
701683 */
702−void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
703− size_t dst_offset)
684+void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst)
704685 {
705686 struct alg_sock *ask = alg_sk(sk);
706687 struct af_alg_ctx *ctx = ask->private;
@@ -725,18 +706,10 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst, · 18 unmodified lines
725706 * SG entries in dst.
726707 */
727708 if (dst) {
728− if (dst_offset >= plen) {
729− /* discard page before offset */
730− dst_offset -= plen;
731− } else {
732− /* reassign page to dst after offset */
733− get_page(page);
734− sg_set_page(dst + j, page,
735− plen - dst_offset,
736− sg[i].offset + dst_offset);
737− dst_offset = 0;
738− j++;
739− }
709+ /* reassign page to dst after offset */
710+ get_page(page);
711+ sg_set_page(dst + j, page, plen, sg[i].offset);
712+ j++;
740713 }
741714
742715 sg[i].length -= plen;
crypto/algif_aead.c+19−81
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626 #include <crypto/internal/aead.h>
2727 #include <crypto/scatterwalk.h>
2828 #include <crypto/if_alg.h>
29−#include <crypto/skcipher.h>
3029 #include <linux/init.h>
3130 #include <linux/list.h>
3231 #include <linux/kernel.h>
@@ -72,9 +71,8 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg, · 39 unmodified lines
7271 struct alg_sock *pask = alg_sk(psk);
7372 struct af_alg_ctx *ctx = ask->private;
7473 struct crypto_aead *tfm = pask->private;
75− unsigned int i, as = crypto_aead_authsize(tfm);
74+ unsigned int as = crypto_aead_authsize(tfm);
7675 struct af_alg_async_req *areq;
77− struct af_alg_tsgl *tsgl, *tmp;
7876 struct scatterlist *rsgl_src, *tsgl_src = NULL;
7977 int err = 0;
8078 size_t used = 0; /* [in] TX bufs to be en/decrypted */
@@ -154,23 +152,24 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg, · 73 unmodified lines
154152 outlen -= less;
155153 }
156154
155+ /*
156+ * Create a per request TX SGL for this request which tracks the
157+ * SG entries from the global TX SGL.
158+ */
157159 processed = used + ctx->aead_assoclen;
158− list_for_each_entry_safe(tsgl, tmp, &ctx->tsgl_list, list) {
159− for (i = 0; i < tsgl->cur; i++) {
160− struct scatterlist *process_sg = tsgl->sg + i;
161−
162− if (!(process_sg->length) || !sg_page(process_sg))
163− continue;
164− tsgl_src = process_sg;
165− break;
166− }
167− if (tsgl_src)
168− break;
169− }
170− if (processed && !tsgl_src) {
171− err = -EFAULT;
160+ areq->tsgl_entries = af_alg_count_tsgl(sk, processed);
161+ if (!areq->tsgl_entries)
162+ areq->tsgl_entries = 1;
163+ areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl),
164+ areq->tsgl_entries),
165+ GFP_KERNEL);
166+ if (!areq->tsgl) {
167+ err = -ENOMEM;
172168 goto free;
173169 }
170+ sg_init_table(areq->tsgl, areq->tsgl_entries);
171+ af_alg_pull_tsgl(sk, processed, areq->tsgl);
172+ tsgl_src = areq->tsgl;
174173
175174 /*
176175 * Copy of AAD from source to destination
@@ -179,76 +178,15 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg, · 2 unmodified lines
179178 * when user space uses an in-place cipher operation, the kernel
180179 * will copy the data as it does not see whether such in-place operation
181180 * is initiated.
182− *
183− * To ensure efficiency, the following implementation ensure that the
184− * ciphers are invoked to perform a crypto operation in-place. This
185− * is achieved by memory management specified as follows.
186181 */
187182
188183 /* Use the RX SGL as source (and destination) for crypto op. */
189184 rsgl_src = areq->first_rsgl.sgl.sgt.sgl;
190185
191− if (ctx->enc) {
192− /*
193− * Encryption operation - The in-place cipher operation is
194− * achieved by the following operation:
195− *
196− * TX SGL: AAD || PT
197− * | |
198− * | copy |
199− * v v
200− * RX SGL: AAD || PT || Tag
201− */
202− memcpy_sglist(areq->first_rsgl.sgl.sgt.sgl, tsgl_src,
203− processed);
204− af_alg_pull_tsgl(sk, processed, NULL, 0);
205− } else {
206− /*
207− * Decryption operation - To achieve an in-place cipher
208− * operation, the following SGL structure is used:
209− *
210− * TX SGL: AAD || CT || Tag
211− * | | ^
212− * | copy | | Create SGL link.
213− * v v |
214− * RX SGL: AAD || CT ----+
215− */
216−
217− /* Copy AAD || CT to RX SGL buffer for in-place operation. */
218− memcpy_sglist(areq->first_rsgl.sgl.sgt.sgl, tsgl_src, outlen);
219−
220− /* Create TX SGL for tag and chain it to RX SGL. */
221− areq->tsgl_entries = af_alg_count_tsgl(sk, processed,
222− processed - as);
223− if (!areq->tsgl_entries)
224− areq->tsgl_entries = 1;
225− areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl),
226− areq->tsgl_entries),
227− GFP_KERNEL);
228− if (!areq->tsgl) {
229− err = -ENOMEM;
230− goto free;
231− }
232− sg_init_table(areq->tsgl, areq->tsgl_entries);
233−
234− /* Release TX SGL, except for tag data and reassign tag data. */
235− af_alg_pull_tsgl(sk, processed, areq->tsgl, processed - as);
236−
237− /* chain the areq TX SGL holding the tag with RX SGL */
238− if (usedpages) {
239− /* RX SGL present */
240− struct af_alg_sgl *sgl_prev = &areq->last_rsgl->sgl;
241− struct scatterlist *sg = sgl_prev->sgt.sgl;
242−
243− sg_unmark_end(sg + sgl_prev->sgt.nents - 1);
244− sg_chain(sg, sgl_prev->sgt.nents + 1, areq->tsgl);
245− } else
246− /* no RX SGL present (e.g. authentication only) */
247− rsgl_src = areq->tsgl;
248− }
186+ memcpy_sglist(rsgl_src, tsgl_src, ctx->aead_assoclen);
249187
250188 /* Initialize the crypto operation */
251− aead_request_set_crypt(&areq->cra_u.aead_req, rsgl_src,
189+ aead_request_set_crypt(&areq->cra_u.aead_req, tsgl_src,
252190 areq->first_rsgl.sgl.sgt.sgl, used, ctx->iv);
253191 aead_request_set_ad(&areq->cra_u.aead_req, ctx->aead_assoclen);
254192 aead_request_set_tfm(&areq->cra_u.aead_req, tfm);
@@ -450,7 +388,7 @@ static void aead_sock_destruct(struct sock *sk) · 195 unmodified lines
450388 struct crypto_aead *tfm = pask->private;
451389 unsigned int ivlen = crypto_aead_ivsize(tfm);
452390
453− af_alg_pull_tsgl(sk, ctx->used, NULL, 0);
391+ af_alg_pull_tsgl(sk, ctx->used, NULL);
454392 sock_kzfree_s(sk, ctx->iv, ivlen);
455393 sock_kfree_s(sk, ctx, ctx->len);
456394 af_alg_release_parent(sk);
crypto/algif_skcipher.c+3−3
@@ -138,7 +138,7 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg, · 137 unmodified lines
138138 * Create a per request TX SGL for this request which tracks the
139139 * SG entries from the global TX SGL.
140140 */
141− areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0);
141+ areq->tsgl_entries = af_alg_count_tsgl(sk, len);
142142 if (!areq->tsgl_entries)
143143 areq->tsgl_entries = 1;
144144 areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl),
@@ -149,7 +149,7 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg, · 4 unmodified lines
149149 goto free;
150150 }
151151 sg_init_table(areq->tsgl, areq->tsgl_entries);
152− af_alg_pull_tsgl(sk, len, areq->tsgl, 0);
152+ af_alg_pull_tsgl(sk, len, areq->tsgl);
153153
154154 /* Initialize the crypto operation */
155155 skcipher_request_set_tfm(&areq->cra_u.skcipher_req, tfm);
@@ -363,7 +363,7 @@ static void skcipher_sock_destruct(struct sock *sk) · 207 unmodified lines
363363 struct alg_sock *pask = alg_sk(psk);
364364 struct crypto_skcipher *tfm = pask->private;
365365
366− af_alg_pull_tsgl(sk, ctx->used, NULL, 0);
366+ af_alg_pull_tsgl(sk, ctx->used, NULL);
367367 sock_kzfree_s(sk, ctx->iv, crypto_skcipher_ivsize(tfm));
368368 if (ctx->state)
369369 sock_kzfree_s(sk, ctx->state, crypto_skcipher_statesize(tfm));
crypto/authencesn.c+29−19
@@ -207,6 +207,7 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req, · 206 unmodified lines
207207 u8 *ohash = areq_ctx->tail;
208208 unsigned int cryptlen = req->cryptlen - authsize;
209209 unsigned int assoclen = req->assoclen;
210+ struct scatterlist *src = req->src;
210211 struct scatterlist *dst = req->dst;
211212 u8 *ihash = ohash + crypto_ahash_digestsize(auth);
212213 u32 tmp[2];
@@ -214,23 +215,27 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req, · 1 unmodified line
214215 if (!authsize)
215216 goto decrypt;
216217
217− /* Move high-order bits of sequence number back. */
218− scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
219− scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);
220− scatterwalk_map_and_copy(tmp, dst, 0, 8, 1);
218+ if (src == dst) {
219+ /* Move high-order bits of sequence number back. */
220+ scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
221+ scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);
222+ scatterwalk_map_and_copy(tmp, dst, 0, 8, 1);
223+ } else
224+ memcpy_sglist(dst, src, assoclen);
221225
222226 if (crypto_memneq(ihash, ohash, authsize))
223227 return -EBADMSG;
224228
225229 decrypt:
226230
227− sg_init_table(areq_ctx->dst, 2);
231+ if (src != dst)
232+ src = scatterwalk_ffwd(areq_ctx->src, src, assoclen);
228233 dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
229234
230235 skcipher_request_set_tfm(skreq, ctx->enc);
231236 skcipher_request_set_callback(skreq, flags,
232237 req->base.complete, req->base.data);
233− skcipher_request_set_crypt(skreq, dst, dst, cryptlen, req->iv);
238+ skcipher_request_set_crypt(skreq, src, dst, cryptlen, req->iv);
234239
235240 return crypto_skcipher_decrypt(skreq);
236241 }
@@ -255,6 +260,7 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req) · 18 unmodified lines
255260 unsigned int assoclen = req->assoclen;
256261 unsigned int cryptlen = req->cryptlen;
257262 u8 *ihash = ohash + crypto_ahash_digestsize(auth);
263+ struct scatterlist *src = req->src;
258264 struct scatterlist *dst = req->dst;
259265 u32 tmp[2];
260266 int err;
@@ -262,24 +268,28 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req) · 1 unmodified line
262268 if (assoclen < 8)
263269 return -EINVAL;
264270
265− cryptlen -= authsize;
266−
267− if (req->src != dst)
268− memcpy_sglist(dst, req->src, assoclen + cryptlen);
271+ if (!authsize)
272+ goto tail;
269273
274+ cryptlen -= authsize;
270275 scatterwalk_map_and_copy(ihash, req->src, assoclen + cryptlen,
271276 authsize, 0);
272277
273− if (!authsize)
274− goto tail;
275−
276278 /* Move high-order bits of sequence number to the end. */
277− scatterwalk_map_and_copy(tmp, dst, 0, 8, 0);
278− scatterwalk_map_and_copy(tmp, dst, 4, 4, 1);
279− scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1);
280−
281− sg_init_table(areq_ctx->dst, 2);
282− dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);
279+ scatterwalk_map_and_copy(tmp, src, 0, 8, 0);
280+ if (src == dst) {
281+ scatterwalk_map_and_copy(tmp, dst, 4, 4, 1);
282+ scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1);
283+ dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);
284+ } else {
285+ scatterwalk_map_and_copy(tmp, dst, 0, 4, 1);
286+ scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen - 4, 4, 1);
287+
288+ src = scatterwalk_ffwd(areq_ctx->src, src, 8);
289+ dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);
290+ memcpy_sglist(dst, src, assoclen + cryptlen - 8);
291+ dst = req->dst;
292+ }
283293
284294 ahash_request_set_tfm(ahreq, auth);
285295 ahash_request_set_crypt(ahreq, dst, ohash, assoclen + cryptlen);
crypto/deflate.c+7−4
@@ -164,18 +164,21 @@ static int deflate_decompress_one(struct acomp_req *req, · 163 unmodified lines
164164
165165 do {
166166 unsigned int dcur;
167+ unsigned long avail_in;
167168
168169 dcur = acomp_walk_next_dst(&walk);
169− if (!dcur) {
170− out_of_space = true;
171− break;
172− }
173170
174171 stream->avail_out = dcur;
175172 stream->next_out = walk.dst.virt.addr;
173+ avail_in = stream->avail_in;
176174
177175 ret = zlib_inflate(stream, Z_NO_FLUSH);
178176
177+ if (!dcur && avail_in == stream->avail_in) {
178+ out_of_space = true;
179+ break;
180+ }
181+
179182 dcur -= stream->avail_out;
180183 acomp_walk_done_dst(&walk, dcur);
181184 } while (ret == Z_OK && stream->avail_in);
drivers/accel/amdxdna/Makefile+1−0
@@ -11,6 +11,7 @@ amdxdna-y := \ · 10 unmodified lines
1111 aie2_solver.o \
1212 amdxdna_ctx.o \
1313 amdxdna_gem.o \
14+ amdxdna_iommu.o \
1415 amdxdna_mailbox.o \
1516 amdxdna_mailbox_helper.o \
1617 amdxdna_pci_drv.o \
drivers/accel/amdxdna/aie2_ctx.c+85−24
@@ -29,6 +29,16 @@ MODULE_PARM_DESC(force_cmdlist, "Force use command list (Default true)"); · 28 unmodified lines
2929
3030 #define HWCTX_MAX_TIMEOUT 60000 /* milliseconds */
3131
32+struct aie2_ctx_health {
33+ struct amdxdna_ctx_health header;
34+ u32 txn_op_idx;
35+ u32 ctx_pc;
36+ u32 fatal_error_type;
37+ u32 fatal_error_exception_type;
38+ u32 fatal_error_exception_pc;
39+ u32 fatal_error_app_module;
40+};
41+
3242 static void aie2_job_release(struct kref *ref)
3343 {
3444 struct amdxdna_sched_job *job;
@@ -39,6 +49,7 @@ static void aie2_job_release(struct kref *ref) · 4 unmodified lines
3949 wake_up(&job->hwctx->priv->job_free_wq);
4050 if (job->out_fence)
4151 dma_fence_put(job->out_fence);
52+ kfree(job->aie2_job_health);
4253 kfree(job);
4354 }
4455
@@ -68,7 +79,8 @@ static int aie2_hwctx_restart(struct amdxdna_dev *xdna, struct amdxdna_hwctx *hw · 23 unmodified lines
6879 }
6980
7081 ret = aie2_map_host_buf(xdna->dev_handle, hwctx->fw_ctx_id,
71− heap->mem.userptr, heap->mem.size);
82+ amdxdna_obj_dma_addr(heap),
83+ heap->mem.size);
7284 if (ret) {
7385 XDNA_ERR(xdna, "Map host buf failed, ret %d", ret);
7486 goto out;
@@ -165,7 +177,6 @@ aie2_sched_notify(struct amdxdna_sched_job *job) · 90 unmodified lines
165177
166178 trace_xdna_job(&job->base, job->hwctx->name, "signaled fence", job->seq);
167179
168− amdxdna_pm_suspend_put(job->hwctx->client->xdna);
169180 job->hwctx->priv->completed++;
170181 dma_fence_signal(fence);
171182
@@ -175,6 +186,50 @@ aie2_sched_notify(struct amdxdna_sched_job *job) · 3 unmodified lines
175186 aie2_job_put(job);
176187 }
177188
189+static void aie2_set_cmd_timeout(struct amdxdna_sched_job *job)
190+{
191+ struct aie2_ctx_health *aie2_health __free(kfree) = NULL;
192+ struct amdxdna_dev *xdna = job->hwctx->client->xdna;
193+ struct amdxdna_gem_obj *cmd_abo = job->cmd_bo;
194+ struct app_health_report *report = job->aie2_job_health;
195+ u32 fail_cmd_idx = 0;
196+
197+ if (!report)
198+ goto set_timeout;
199+
200+ XDNA_ERR(xdna, "Firmware timeout state capture:");
201+ XDNA_ERR(xdna, "\tVersion: %d.%d", report->major, report->minor);
202+ XDNA_ERR(xdna, "\tReport size: 0x%x", report->size);
203+ XDNA_ERR(xdna, "\tContext ID: %d", report->context_id);
204+ XDNA_ERR(xdna, "\tDPU PC: 0x%x", report->dpu_pc);
205+ XDNA_ERR(xdna, "\tTXN OP ID: 0x%x", report->txn_op_id);
206+ XDNA_ERR(xdna, "\tContext PC: 0x%x", report->ctx_pc);
207+ XDNA_ERR(xdna, "\tFatal error type: 0x%x", report->fatal_info.fatal_type);
208+ XDNA_ERR(xdna, "\tFatal error exception type: 0x%x", report->fatal_info.exception_type);
209+ XDNA_ERR(xdna, "\tFatal error exception PC: 0x%x", report->fatal_info.exception_pc);
210+ XDNA_ERR(xdna, "\tFatal error app module: 0x%x", report->fatal_info.app_module);
211+ XDNA_ERR(xdna, "\tFatal error task ID: %d", report->fatal_info.task_index);
212+ XDNA_ERR(xdna, "\tTimed out sub command ID: %d", report->run_list_id);
213+
214+ fail_cmd_idx = report->run_list_id;
215+ aie2_health = kzalloc_obj(*aie2_health);
216+ if (!aie2_health)
217+ goto set_timeout;
218+
219+ aie2_health->header.version = AMDXDNA_CMD_CTX_HEALTH_V1;
220+ aie2_health->header.npu_gen = AMDXDNA_CMD_CTX_HEALTH_AIE2;
221+ aie2_health->txn_op_idx = report->txn_op_id;
222+ aie2_health->ctx_pc = report->ctx_pc;
223+ aie2_health->fatal_error_type = report->fatal_info.fatal_type;
224+ aie2_health->fatal_error_exception_type = report->fatal_info.exception_type;
225+ aie2_health->fatal_error_exception_pc = report->fatal_info.exception_pc;
226+ aie2_health->fatal_error_app_module = report->fatal_info.app_module;
227+
228+set_timeout:
229+ amdxdna_cmd_set_error(cmd_abo, job, fail_cmd_idx, ERT_CMD_STATE_TIMEOUT,
230+ aie2_health, sizeof(*aie2_health));
231+}
232+
178233 static int
179234 aie2_sched_resp_handler(void *handle, void __iomem *data, size_t size)
180235 {
@@ -186,13 +241,13 @@ aie2_sched_resp_handler(void *handle, void __iomem *data, size_t size) · 5 unmodified lines
186241 cmd_abo = job->cmd_bo;
187242
188243 if (unlikely(job->job_timeout)) {
189− amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_TIMEOUT);
244+ aie2_set_cmd_timeout(job);
190245 ret = -EINVAL;
191246 goto out;
192247 }
193248
194249 if (unlikely(!data) || unlikely(size != sizeof(u32))) {
195− amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_ABORT);
250+ amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_ABORT, NULL, 0);
196251 ret = -EINVAL;
197252 goto out;
198253 }
@@ -202,7 +257,7 @@ aie2_sched_resp_handler(void *handle, void __iomem *data, size_t size) · 3 unmodified lines
202257 if (status == AIE2_STATUS_SUCCESS)
203258 amdxdna_cmd_set_state(cmd_abo, ERT_CMD_STATE_COMPLETED);
204259 else
205− amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_ERROR);
260+ amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_ERROR, NULL, 0);
206261
207262 out:
208263 aie2_sched_notify(job);
@@ -236,21 +291,21 @@ aie2_sched_cmdlist_resp_handler(void *handle, void __iomem *data, size_t size) · 27 unmodified lines
236291 struct amdxdna_sched_job *job = handle;
237292 struct amdxdna_gem_obj *cmd_abo;
238293 struct amdxdna_dev *xdna;
294+ u32 fail_cmd_idx = 0;
239295 u32 fail_cmd_status;
240− u32 fail_cmd_idx;
241296 u32 cmd_status;
242297 int ret = 0;
243298
244299 cmd_abo = job->cmd_bo;
245300
246301 if (unlikely(job->job_timeout)) {
247− amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_TIMEOUT);
302+ aie2_set_cmd_timeout(job);
248303 ret = -EINVAL;
249304 goto out;
250305 }
251306
252307 if (unlikely(!data) || unlikely(size != sizeof(u32) * 3)) {
253− amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_ABORT);
308+ amdxdna_cmd_set_error(cmd_abo, job, 0, ERT_CMD_STATE_ABORT, NULL, 0);
254309 ret = -EINVAL;
255310 goto out;
256311 }
@@ -270,10 +325,10 @@ aie2_sched_cmdlist_resp_handler(void *handle, void __iomem *data, size_t size) · 13 unmodified lines
270325 fail_cmd_idx, fail_cmd_status);
271326
272327 if (fail_cmd_status == AIE2_STATUS_SUCCESS) {
273− amdxdna_cmd_set_error(cmd_abo, job, fail_cmd_idx, ERT_CMD_STATE_ABORT);
328+ amdxdna_cmd_set_error(cmd_abo, job, fail_cmd_idx, ERT_CMD_STATE_ABORT, NULL, 0);
274329 ret = -EINVAL;
275330 } else {
276− amdxdna_cmd_set_error(cmd_abo, job, fail_cmd_idx, ERT_CMD_STATE_ERROR);
331+ amdxdna_cmd_set_error(cmd_abo, job, fail_cmd_idx, ERT_CMD_STATE_ERROR, NULL, 0);
277332 }
278333
279334 out:
@@ -290,19 +345,11 @@ aie2_sched_job_run(struct drm_sched_job *sched_job) · 10 unmodified lines
290345 struct dma_fence *fence;
291346 int ret;
292347
293− ret = amdxdna_pm_resume_get(hwctx->client->xdna);
294− if (ret)
348+ if (!hwctx->priv->mbox_chann)
295349 return NULL;
296350
297− if (!hwctx->priv->mbox_chann) {
298− amdxdna_pm_suspend_put(hwctx->client->xdna);
299− return NULL;
300− }
301−
302− if (!mmget_not_zero(job->mm)) {
303− amdxdna_pm_suspend_put(hwctx->client->xdna);
351+ if (!mmget_not_zero(job->mm))
304352 return ERR_PTR(-ESRCH);
305− }
306353
307354 kref_get(&job->refcnt);
308355 fence = dma_fence_get(job->fence);
@@ -333,7 +380,6 @@ aie2_sched_job_run(struct drm_sched_job *sched_job) · 24 unmodified lines
333380
334381 out:
335382 if (ret) {
336− amdxdna_pm_suspend_put(hwctx->client->xdna);
337383 dma_fence_put(job->fence);
338384 aie2_job_put(job);
339385 mmput(job->mm);
@@ -362,12 +408,26 @@ aie2_sched_job_timedout(struct drm_sched_job *sched_job) · 22 unmodified lines
362408 {
363409 struct amdxdna_sched_job *job = drm_job_to_xdna_job(sched_job);
364410 struct amdxdna_hwctx *hwctx = job->hwctx;
411+ struct app_health_report *report;
365412 struct amdxdna_dev *xdna;
413+ int ret;
366414
367415 xdna = hwctx->client->xdna;
368416 trace_xdna_job(sched_job, hwctx->name, "job timedout", job->seq);
369417 job->job_timeout = true;
418+
370419 mutex_lock(&xdna->dev_lock);
420+ report = kzalloc_obj(*report);
421+ if (!report)
422+ goto reset_hwctx;
423+
424+ ret = aie2_query_app_health(xdna->dev_handle, hwctx->fw_ctx_id, report);
425+ if (ret)
426+ kfree(report);
427+ else
428+ job->aie2_job_health = report;
429+
430+reset_hwctx:
371431 aie2_hwctx_stop(xdna, hwctx, sched_job);
372432
373433 aie2_hwctx_restart(xdna, hwctx);
@@ -589,14 +649,14 @@ int aie2_hwctx_init(struct amdxdna_hwctx *hwctx) · 215 unmodified lines
589649 .size = MAX_CHAIN_CMDBUF_SIZE,
590650 };
591651
592− abo = amdxdna_drm_alloc_dev_bo(&xdna->ddev, &args, client->filp);
652+ abo = amdxdna_drm_create_dev_bo(&xdna->ddev, &args, client->filp);
593653 if (IS_ERR(abo)) {
594654 ret = PTR_ERR(abo);
595655 goto free_cmd_bufs;
596656 }
597657
598658 XDNA_DBG(xdna, "Command buf %d addr 0x%llx size 0x%lx",
599− i, abo->mem.dev_addr, abo->mem.size);
659+ i, amdxdna_gem_dev_addr(abo), abo->mem.size);
600660 priv->cmd_buf[i] = abo;
601661 }
602662
@@ -637,7 +697,8 @@ int aie2_hwctx_init(struct amdxdna_hwctx *hwctx) · 34 unmodified lines
637697 }
638698
639699 ret = aie2_map_host_buf(xdna->dev_handle, hwctx->fw_ctx_id,
640− heap->mem.userptr, heap->mem.size);
700+ amdxdna_obj_dma_addr(heap),
701+ heap->mem.size);
641702 if (ret) {
642703 XDNA_ERR(xdna, "Map host buffer failed, ret %d", ret);
643704 goto release_resource;
drivers/accel/amdxdna/aie2_error.c+2−3
@@ -355,9 +355,8 @@ int aie2_error_async_events_alloc(struct amdxdna_dev_hdl *ndev) · 354 unmodified lines
355355 return -ENOMEM;
356356
357357 events->buf = aie2_alloc_msg_buffer(ndev, &total_size, &events->addr);
358−
359− if (!events->buf) {
360− ret = -ENOMEM;
358+ if (IS_ERR(events->buf)) {
359+ ret = PTR_ERR(events->buf);
361360 goto free_events;
362361 }
363362 events->size = total_size;
drivers/accel/amdxdna/aie2_message.c+115−24
@@ -56,16 +56,37 @@ void *aie2_alloc_msg_buffer(struct amdxdna_dev_hdl *ndev, u32 *size, · 55 unmodified lines
5656 dma_addr_t *dma_addr)
5757 {
5858 struct amdxdna_dev *xdna = ndev->xdna;
59+ void *vaddr;
5960 int order;
6061
6162 *size = max(*size, SZ_8K);
6263 order = get_order(*size);
6364 if (order > MAX_PAGE_ORDER)
64− return NULL;
65+ return ERR_PTR(-EINVAL);
6566 *size = PAGE_SIZE << order;
6667
67− return dma_alloc_noncoherent(xdna->ddev.dev, *size, dma_addr,
68− DMA_FROM_DEVICE, GFP_KERNEL);
68+ if (amdxdna_iova_on(xdna))
69+ return amdxdna_iommu_alloc(xdna, *size, dma_addr);
70+
71+ vaddr = dma_alloc_noncoherent(xdna->ddev.dev, *size, dma_addr,
72+ DMA_FROM_DEVICE, GFP_KERNEL);
73+ if (!vaddr)
74+ return ERR_PTR(-ENOMEM);
75+
76+ return vaddr;
77+}
78+
79+void aie2_free_msg_buffer(struct amdxdna_dev_hdl *ndev, size_t size,
80+ void *cpu_addr, dma_addr_t dma_addr)
81+{
82+ struct amdxdna_dev *xdna = ndev->xdna;
83+
84+ if (amdxdna_iova_on(xdna)) {
85+ amdxdna_iommu_free(xdna, size, cpu_addr, dma_addr);
86+ return;
87+ }
88+
89+ dma_free_noncoherent(xdna->ddev.dev, size, cpu_addr, dma_addr, DMA_FROM_DEVICE);
6990 }
7091
7192 int aie2_suspend_fw(struct amdxdna_dev_hdl *ndev)
@@ -256,7 +277,7 @@ int aie2_create_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwct · 184 unmodified lines
256277 req.num_col = hwctx->num_col;
257278 req.num_unused_col = hwctx->num_unused_col;
258279 req.num_cq_pairs_requested = 1;
259− req.pasid = hwctx->client->pasid;
280+ req.pasid = amdxdna_pasid_on(hwctx->client) ? hwctx->client->pasid : 0;
260281 req.context_priority = aie2_get_context_priority(ndev, hwctx);
261282
262283 ret = aie2_send_mgmt_msg_wait(ndev, &msg);
@@ -380,8 +401,8 @@ int aie2_query_status(struct amdxdna_dev_hdl *ndev, char __user *buf, · 117 unmodified lines
380401 int ret;
381402
382403 buff_addr = aie2_alloc_msg_buffer(ndev, &buf_sz, &dma_addr);
383− if (!buff_addr)
384− return -ENOMEM;
404+ if (IS_ERR(buff_addr))
405+ return PTR_ERR(buff_addr);
385406
386407 /* Go through each hardware context and mark the AIE columns that are active */
387408 list_for_each_entry(client, &xdna->client_list, node)
@@ -436,8 +457,8 @@ int aie2_query_telemetry(struct amdxdna_dev_hdl *ndev, · 48 unmodified lines
436457 return -EINVAL;
437458
438459 addr = aie2_alloc_msg_buffer(ndev, &buf_sz, &dma_addr);
439− if (!addr)
440− return -ENOMEM;
460+ if (IS_ERR(addr))
461+ return PTR_ERR(addr);
441462
442463 req.buf_addr = dma_addr;
443464 req.buf_size = buf_sz;
@@ -532,10 +553,10 @@ int aie2_config_cu(struct amdxdna_hwctx *hwctx, · 88 unmodified lines
532553 }
533554
534555 req.cfgs[i] = FIELD_PREP(AIE2_MSG_CFG_CU_PDI_ADDR,
535− abo->mem.dev_addr >> shift);
556+ amdxdna_gem_dev_addr(abo) >> shift);
536557 req.cfgs[i] |= FIELD_PREP(AIE2_MSG_CFG_CU_FUNC, cu->cu_func);
537558 XDNA_DBG(xdna, "CU %d full addr 0x%llx, cfg 0x%x", i,
538− abo->mem.dev_addr, req.cfgs[i]);
559+ amdxdna_gem_dev_addr(abo), req.cfgs[i]);
539560 drm_gem_object_put(gobj);
540561 }
541562 req.num_cus = hwctx->cus->num_cus;
@@ -982,56 +1003,78 @@ int aie2_cmdlist_multi_execbuf(struct amdxdna_hwctx *hwctx, · 440 unmodified lines
9821003 struct mailbox_channel *chann = hwctx->priv->mbox_chann;
9831004 struct amdxdna_client *client = hwctx->client;
9841005 struct amdxdna_gem_obj *cmd_abo = job->cmd_bo;
1006+ void *cmd_buf = amdxdna_gem_vmap(cmdbuf_abo);
9851007 struct amdxdna_dev *xdna = client->xdna;
9861008 struct amdxdna_cmd_chain *payload;
9871009 struct xdna_mailbox_msg msg;
9881010 union exec_chain_req req;
989− u32 payload_len;
1011+ u32 payload_len, ccnt;
9901012 u32 offset = 0;
9911013 size_t size;
9921014 int ret;
9931015 u32 op;
9941016 u32 i;
9951017
1018+ if (!cmd_buf)
1019+ return -ENOMEM;
1020+
9961021 op = amdxdna_cmd_get_op(cmd_abo);
9971022 payload = amdxdna_cmd_get_payload(cmd_abo, &payload_len);
998− if (op != ERT_CMD_CHAIN || !payload ||
999− payload_len < struct_size(payload, data, payload->command_count))
1023+ if (op != ERT_CMD_CHAIN) {
1024+ XDNA_DBG(xdna, "Invalid op code %d", op);
1025+ return -EINVAL;
1026+ }
1027+
1028+ if (!payload) {
1029+ XDNA_DBG(xdna, "Failed to get command payload");
1030+ return -EINVAL;
1031+ }
1032+
1033+ ccnt = payload->command_count;
1034+ if (payload_len < struct_size(payload, data, ccnt)) {
1035+ XDNA_DBG(xdna, "Invalid command count %d", ccnt);
10001036 return -EINVAL;
1037+ }
10011038
10021039 op = ERT_INVALID_CMD;
1003− for (i = 0; i < payload->command_count; i++) {
1040+ for (i = 0; i < ccnt; i++) {
10041041 u32 boh = (u32)(payload->data[i]);
10051042 struct amdxdna_gem_obj *abo;
10061043
1007− abo = amdxdna_gem_get_obj(client, boh, AMDXDNA_BO_CMD);
1044+ abo = amdxdna_gem_get_obj(client, boh, AMDXDNA_BO_SHARE);
10081045 if (!abo) {
10091046 XDNA_ERR(xdna, "Failed to find cmd BO %d", boh);
10101047 return -ENOENT;
10111048 }
10121049
10131050 size = cmdbuf_abo->mem.size - offset;
1014− ret = aie2_cmdlist_fill_slot(cmdbuf_abo->mem.kva + offset,
1015− abo, &size, &op);
1051+ ret = aie2_cmdlist_fill_slot(cmd_buf + offset, abo, &size, &op);
10161052 amdxdna_gem_put_obj(abo);
10171053 if (ret)
10181054 return ret;
10191055
10201056 offset += size;
10211057 }
1058+
1059+ XDNA_DBG(xdna, "Total %d commands:", ccnt);
1060+ print_hex_dump_debug("cmdbufs: ", DUMP_PREFIX_OFFSET, 16, 4,
1061+ cmd_buf, offset, false);
1062+
10221063 msg.opcode = EXEC_MSG_OPS(xdna)->get_chain_msg_op(op);
10231064 if (msg.opcode == MSG_OP_MAX_OPCODE)
10241065 return -EOPNOTSUPP;
10251066
10261067 /* The offset is the accumulated total size of the cmd buffer */
1027− EXEC_MSG_OPS(xdna)->init_chain_req(&req, cmdbuf_abo->mem.dev_addr,
1028− offset, payload->command_count);
1029− drm_clflush_virt_range(cmdbuf_abo->mem.kva, offset);
1068+ EXEC_MSG_OPS(xdna)->init_chain_req(&req, amdxdna_gem_dev_addr(cmdbuf_abo),
1069+ offset, ccnt);
1070+ drm_clflush_virt_range(cmd_buf, offset);
10301071
10311072 msg.handle = job;
10321073 msg.notify_cb = notify_cb;
10331074 msg.send_data = (u8 *)&req;
10341075 msg.send_size = sizeof(req);
1076+ print_hex_dump_debug("cmdlist msg: ", DUMP_PREFIX_OFFSET, 16, 4,
1077+ &req, msg.send_size, false);
10351078 ret = xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT);
10361079 if (ret) {
10371080 XDNA_ERR(xdna, "Send message failed");
@@ -1049,29 +1092,36 @@ int aie2_cmdlist_single_execbuf(struct amdxdna_hwctx *hwctx, · 11 unmodified lines
10491092 struct mailbox_channel *chann = hwctx->priv->mbox_chann;
10501093 struct amdxdna_dev *xdna = hwctx->client->xdna;
10511094 struct amdxdna_gem_obj *cmd_abo = job->cmd_bo;
1095+ void *cmd_buf = amdxdna_gem_vmap(cmdbuf_abo);
10521096 struct xdna_mailbox_msg msg;
10531097 union exec_chain_req req;
10541098 u32 op = ERT_INVALID_CMD;
10551099 size_t size;
10561100 int ret;
10571101
1102+ if (!cmd_buf)
1103+ return -ENOMEM;
1104+
10581105 size = cmdbuf_abo->mem.size;
1059− ret = aie2_cmdlist_fill_slot(cmdbuf_abo->mem.kva, cmd_abo, &size, &op);
1106+ ret = aie2_cmdlist_fill_slot(cmd_buf, cmd_abo, &size, &op);
10601107 if (ret)
10611108 return ret;
10621109
1110+ print_hex_dump_debug("cmdbuf: ", DUMP_PREFIX_OFFSET, 16, 4, cmd_buf, size, false);
1111+
10631112 msg.opcode = EXEC_MSG_OPS(xdna)->get_chain_msg_op(op);
10641113 if (msg.opcode == MSG_OP_MAX_OPCODE)
10651114 return -EOPNOTSUPP;
10661115
1067− EXEC_MSG_OPS(xdna)->init_chain_req(&req, cmdbuf_abo->mem.dev_addr,
1068− size, 1);
1069− drm_clflush_virt_range(cmdbuf_abo->mem.kva, size);
1116+ EXEC_MSG_OPS(xdna)->init_chain_req(&req, amdxdna_gem_dev_addr(cmdbuf_abo), size, 1);
1117+ drm_clflush_virt_range(cmd_buf, size);
10701118
10711119 msg.handle = job;
10721120 msg.notify_cb = notify_cb;
10731121 msg.send_data = (u8 *)&req;
10741122 msg.send_size = sizeof(req);
1123+ print_hex_dump_debug("cmdlist msg: ", DUMP_PREFIX_OFFSET, 16, 4,
1124+ &req, msg.send_size, false);
10751125 ret = xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT);
10761126 if (ret) {
10771127 XDNA_ERR(hwctx->client->xdna, "Send message failed");
@@ -1145,3 +1195,44 @@ int aie2_config_debug_bo(struct amdxdna_hwctx *hwctx, struct amdxdna_sched_job * · 67 unmodified lines
11451195
11461196 return xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT);
11471197 }
1198+
1199+int aie2_query_app_health(struct amdxdna_dev_hdl *ndev, u32 context_id,
1200+ struct app_health_report *report)
1201+{
1202+ DECLARE_AIE2_MSG(get_app_health, MSG_OP_GET_APP_HEALTH);
1203+ struct amdxdna_dev *xdna = ndev->xdna;
1204+ struct app_health_report *buf;
1205+ dma_addr_t dma_addr;
1206+ u32 buf_size;
1207+ int ret;
1208+
1209+ if (!AIE2_FEATURE_ON(ndev, AIE2_APP_HEALTH)) {
1210+ XDNA_DBG(xdna, "App health feature not supported");
1211+ return -EOPNOTSUPP;
1212+ }
1213+
1214+ buf_size = sizeof(*report);
1215+ buf = aie2_alloc_msg_buffer(ndev, &buf_size, &dma_addr);
1216+ if (IS_ERR(buf)) {
1217+ XDNA_ERR(xdna, "Failed to allocate buffer for app health");
1218+ return PTR_ERR(buf);
1219+ }
1220+
1221+ req.buf_addr = dma_addr;
1222+ req.context_id = context_id;
1223+ req.buf_size = buf_size;
1224+
1225+ drm_clflush_virt_range(buf, sizeof(*report));
1226+ ret = aie2_send_mgmt_msg_wait(ndev, &msg);
1227+ if (ret) {
1228+ XDNA_ERR(xdna, "Get app health failed, ret %d status 0x%x", ret, resp.status);
1229+ goto free_buf;
1230+ }
1231+
1232+ /* Copy the report to caller's buffer */
1233+ memcpy(report, buf, sizeof(*report));
1234+
1235+free_buf:
1236+ aie2_free_msg_buffer(ndev, buf_size, buf, dma_addr);
1237+ return ret;
1238+}
drivers/accel/amdxdna/aie2_msg_priv.h+52−0
@@ -31,6 +31,7 @@ enum aie2_msg_opcode { · 30 unmodified lines
3131 MSG_OP_SET_RUNTIME_CONFIG = 0x10A,
3232 MSG_OP_GET_RUNTIME_CONFIG = 0x10B,
3333 MSG_OP_REGISTER_ASYNC_EVENT_MSG = 0x10C,
34+ MSG_OP_GET_APP_HEALTH = 0x114,
3435 MSG_OP_MAX_DRV_OPCODE,
3536 MSG_OP_GET_PROTOCOL_VERSION = 0x301,
3637 MSG_OP_MAX_OPCODE
@@ -451,4 +452,55 @@ struct config_debug_bo_req { · 414 unmodified lines
451452 struct config_debug_bo_resp {
452453 enum aie2_msg_status status;
453454 } __packed;
455+
456+struct fatal_error_info {
457+ __u32 fatal_type; /* Fatal error type */
458+ __u32 exception_type; /* Only valid if fatal_type is a specific value */
459+ __u32 exception_argument; /* Argument based on exception type */
460+ __u32 exception_pc; /* Program Counter at the time of the exception */
461+ __u32 app_module; /* Error module name */
462+ __u32 task_index; /* Index of the task in which the error occurred */
463+ __u32 reserved[128];
464+};
465+
466+struct app_health_report {
467+ __u16 major;
468+ __u16 minor;
469+ __u32 size;
470+ __u32 context_id;
471+ /*
472+ * Program Counter (PC) of the last initiated DPU opcode, as reported by the ERT
473+ * application. Before execution begins or after successful completion, the value is set
474+ * to UINT_MAX. If execution halts prematurely due to an error, this field retains the
475+ * opcode's PC value.
476+ * Note: To optimize performance, the ERT may simplify certain aspects of reporting.
477+ * Proper interpretation requires familiarity with the implementation details.
478+ */
479+ __u32 dpu_pc;
480+ /*
481+ * Index of the last initiated TXN opcode.
482+ * Before execution starts or after successful completion, the value is set to UINT_MAX.
483+ * If execution halts prematurely due to an error, this field retains the opcode's ID.
484+ * Note: To optimize performance, the ERT may simplify certain aspects of reporting.
485+ * Proper interpretation requires familiarity with the implementation details.
486+ */
487+ __u32 txn_op_id;
488+ /* The PC of the context at the time of the report */
489+ __u32 ctx_pc;
490+ struct fatal_error_info fatal_info;
491+ /* Index of the most recently executed run list entry. */
492+ __u32 run_list_id;
493+};
494+
495+struct get_app_health_req {
496+ __u32 context_id;
497+ __u32 buf_size;
498+ __u64 buf_addr;
499+} __packed;
500+
501+struct get_app_health_resp {
502+ enum aie2_msg_status status;
503+ __u32 required_buffer_size;
504+ __u32 reserved[7];
505+} __packed;
454506 #endif /* _AIE2_MSG_PRIV_H_ */
drivers/accel/amdxdna/aie2_pci.c+18−0
@@ -846,7 +846,10 @@ static int aie2_hwctx_status_cb(struct amdxdna_hwctx *hwctx, void *arg) · 845 unmodified lines
846846 struct amdxdna_drm_hwctx_entry *tmp __free(kfree) = NULL;
847847 struct amdxdna_drm_get_array *array_args = arg;
848848 struct amdxdna_drm_hwctx_entry __user *buf;
849+ struct app_health_report report;
850+ struct amdxdna_dev_hdl *ndev;
849851 u32 size;
852+ int ret;
850853
851854 if (!array_args->num_element)
852855 return -EINVAL;
@@ -862,6 +865,7 @@ static int aie2_hwctx_status_cb(struct amdxdna_hwctx *hwctx, void *arg) · 9 unmodified lines
862865 tmp->command_submissions = hwctx->priv->seq;
863866 tmp->command_completions = hwctx->priv->completed;
864867 tmp->pasid = hwctx->client->pasid;
868+ tmp->heap_usage = hwctx->client->heap_usage;
865869 tmp->priority = hwctx->qos.priority;
866870 tmp->gops = hwctx->qos.gops;
867871 tmp->fps = hwctx->qos.fps;
@@ -869,6 +873,17 @@ static int aie2_hwctx_status_cb(struct amdxdna_hwctx *hwctx, void *arg) · 1 unmodified line
869873 tmp->latency = hwctx->qos.latency;
870874 tmp->frame_exec_time = hwctx->qos.frame_exec_time;
871875 tmp->state = AMDXDNA_HWCTX_STATE_ACTIVE;
876+ ndev = hwctx->client->xdna->dev_handle;
877+ ret = aie2_query_app_health(ndev, hwctx->fw_ctx_id, &report);
878+ if (!ret) {
879+ /* Fill in app health report fields */
880+ tmp->txn_op_idx = report.txn_op_id;
881+ tmp->ctx_pc = report.ctx_pc;
882+ tmp->fatal_error_type = report.fatal_info.fatal_type;
883+ tmp->fatal_error_exception_type = report.fatal_info.exception_type;
884+ tmp->fatal_error_exception_pc = report.fatal_info.exception_pc;
885+ tmp->fatal_error_app_module = report.fatal_info.app_module;
886+ }
872887
873888 buf = u64_to_user_ptr(array_args->buffer);
874889 size = min(sizeof(*tmp), array_args->element_size);
@@ -1134,6 +1149,9 @@ static int aie2_get_array(struct amdxdna_client *client, · 259 unmodified lines
11341149 case DRM_AMDXDNA_HW_LAST_ASYNC_ERR:
11351150 ret = aie2_get_array_async_error(xdna->dev_handle, args);
11361151 break;
1152+ case DRM_AMDXDNA_BO_USAGE:
1153+ ret = amdxdna_drm_get_bo_usage(&xdna->ddev, args);
1154+ break;
11371155 default:
11381156 XDNA_ERR(xdna, "Not supported request parameter %u", args->param);
11391157 ret = -EOPNOTSUPP;
drivers/accel/amdxdna/aie2_pci.h+7−3
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/limits.h>
1111 #include <linux/semaphore.h>
1212
13+#include "aie2_msg_priv.h"
1314 #include "amdxdna_mailbox.h"
1415
1516 #define AIE2_INTERVAL 20000 /* us */
@@ -261,6 +262,7 @@ enum aie2_fw_feature { · 245 unmodified lines
261262 AIE2_NPU_COMMAND,
262263 AIE2_PREEMPT,
263264 AIE2_TEMPORAL_ONLY,
265+ AIE2_APP_HEALTH,
264266 AIE2_FEATURE_MAX
265267 };
266268
@@ -271,6 +273,7 @@ struct aie2_fw_feature_tbl { · 4 unmodified lines
271273 u32 min_minor;
272274 };
273275
276+#define AIE2_ALL_FEATURES GENMASK_ULL(AIE2_FEATURE_MAX - 1, AIE2_NPU_COMMAND)
274277 #define AIE2_FEATURE_ON(ndev, feature) test_bit(feature, &(ndev)->feature_mask)
275278
276279 struct amdxdna_dev_priv {
@@ -341,6 +344,8 @@ int aie2_query_aie_version(struct amdxdna_dev_hdl *ndev, struct aie_version *ver · 64 unmodified lines
341344 int aie2_query_aie_metadata(struct amdxdna_dev_hdl *ndev, struct aie_metadata *metadata);
342345 int aie2_query_firmware_version(struct amdxdna_dev_hdl *ndev,
343346 struct amdxdna_fw_ver *fw_ver);
347+int aie2_query_app_health(struct amdxdna_dev_hdl *ndev, u32 context_id,
348+ struct app_health_report *report);
344349 int aie2_create_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwctx);
345350 int aie2_destroy_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwctx);
346351 int aie2_map_host_buf(struct amdxdna_dev_hdl *ndev, u32 context_id, u64 addr, u64 size);
@@ -366,9 +371,8 @@ int aie2_config_debug_bo(struct amdxdna_hwctx *hwctx, struct amdxdna_sched_job * · 19 unmodified lines
366371 int (*notify_cb)(void *, void __iomem *, size_t));
367372 void *aie2_alloc_msg_buffer(struct amdxdna_dev_hdl *ndev, u32 *size,
368373 dma_addr_t *dma_addr);
369−#define aie2_free_msg_buffer(ndev, size, buff_addr, dma_addr) \
370− dma_free_noncoherent((ndev)->xdna->ddev.dev, size, buff_addr, \
371− dma_addr, DMA_FROM_DEVICE)
374+void aie2_free_msg_buffer(struct amdxdna_dev_hdl *ndev, size_t size,
375+ void *cpu_addr, dma_addr_t dma_addr);
372376
373377 /* aie2_hwctx.c */
374378 int aie2_hwctx_init(struct amdxdna_hwctx *hwctx);
drivers/accel/amdxdna/amdxdna_ctx.c+32−7
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include "amdxdna_ctx.h"
1818 #include "amdxdna_gem.h"
1919 #include "amdxdna_pci_drv.h"
20+#include "amdxdna_pm.h"
2021
2122 #define MAX_HWCTX_ID 255
2223 #define MAX_ARG_COUNT 4095
@@ -94,9 +95,12 @@ int amdxdna_hwctx_walk(struct amdxdna_client *client, void *arg, · 71 unmodified lines
9495
9596 void *amdxdna_cmd_get_payload(struct amdxdna_gem_obj *abo, u32 *size)
9697 {
97− struct amdxdna_cmd *cmd = abo->mem.kva;
98+ struct amdxdna_cmd *cmd = amdxdna_gem_vmap(abo);
9899 u32 num_masks, count;
99100
101+ if (!cmd)
102+ return NULL;
103+
100104 if (amdxdna_cmd_get_op(abo) == ERT_CMD_CHAIN)
101105 num_masks = 0;
102106 else
@@ -118,10 +122,13 @@ void *amdxdna_cmd_get_payload(struct amdxdna_gem_obj *abo, u32 *size) · 15 unmodified lines
118122
119123 u32 amdxdna_cmd_get_cu_idx(struct amdxdna_gem_obj *abo)
120124 {
121− struct amdxdna_cmd *cmd = abo->mem.kva;
125+ struct amdxdna_cmd *cmd = amdxdna_gem_vmap(abo);
122126 u32 num_masks, i;
123127 u32 *cu_mask;
124128
129+ if (!cmd)
130+ return INVALID_CU_IDX;
131+
125132 if (amdxdna_cmd_get_op(abo) == ERT_CMD_CHAIN)
126133 return INVALID_CU_IDX;
127134
@@ -137,25 +144,34 @@ u32 amdxdna_cmd_get_cu_idx(struct amdxdna_gem_obj *abo) · 9 unmodified lines
137144
138145 int amdxdna_cmd_set_error(struct amdxdna_gem_obj *abo,
139146 struct amdxdna_sched_job *job, u32 cmd_idx,
140− enum ert_cmd_state error_state)
147+ enum ert_cmd_state error_state,
148+ void *err_data, size_t size)
141149 {
142150 struct amdxdna_client *client = job->hwctx->client;
143− struct amdxdna_cmd *cmd = abo->mem.kva;
151+ struct amdxdna_cmd *cmd = amdxdna_gem_vmap(abo);
144152 struct amdxdna_cmd_chain *cc = NULL;
145153
154+ if (!cmd)
155+ return -ENOMEM;
156+
146157 cmd->header &= ~AMDXDNA_CMD_STATE;
147158 cmd->header |= FIELD_PREP(AMDXDNA_CMD_STATE, error_state);
148159
149160 if (amdxdna_cmd_get_op(abo) == ERT_CMD_CHAIN) {
150161 cc = amdxdna_cmd_get_payload(abo, NULL);
151162 cc->error_index = (cmd_idx < cc->command_count) ? cmd_idx : 0;
152− abo = amdxdna_gem_get_obj(client, cc->data[0], AMDXDNA_BO_CMD);
163+ abo = amdxdna_gem_get_obj(client, cc->data[0], AMDXDNA_BO_SHARE);
153164 if (!abo)
154165 return -EINVAL;
155− cmd = abo->mem.kva;
166+ cmd = amdxdna_gem_vmap(abo);
167+ if (!cmd)
168+ return -ENOMEM;
156169 }
157170
158171 memset(cmd->data, 0xff, abo->mem.size - sizeof(*cmd));
172+ if (err_data)
173+ memcpy(cmd->data, err_data, min(size, abo->mem.size - sizeof(*cmd)));
174+
159175 if (cc)
160176 amdxdna_gem_put_obj(abo);
161177
@@ -445,6 +461,7 @@ put_shmem_bo: · 283 unmodified lines
445461 void amdxdna_sched_job_cleanup(struct amdxdna_sched_job *job)
446462 {
447463 trace_amdxdna_debug_point(job->hwctx->name, job->seq, "job release");
464+ amdxdna_pm_suspend_put(job->hwctx->client->xdna);
448465 amdxdna_arg_bos_put(job);
449466 amdxdna_gem_put_obj(job->cmd_bo);
450467 dma_fence_put(job->fence);
@@ -468,7 +485,7 @@ int amdxdna_cmd_submit(struct amdxdna_client *client, · 17 unmodified lines
468485 job->drv_cmd = drv_cmd;
469486
470487 if (cmd_bo_hdl != AMDXDNA_INVALID_BO_HANDLE) {
471− job->cmd_bo = amdxdna_gem_get_obj(client, cmd_bo_hdl, AMDXDNA_BO_CMD);
488+ job->cmd_bo = amdxdna_gem_get_obj(client, cmd_bo_hdl, AMDXDNA_BO_SHARE);
472489 if (!job->cmd_bo) {
473490 XDNA_ERR(xdna, "Failed to get cmd bo from %d", cmd_bo_hdl);
474491 ret = -EINVAL;
@@ -482,6 +499,12 @@ int amdxdna_cmd_submit(struct amdxdna_client *client, · 7 unmodified lines
482499 goto cmd_put;
483500 }
484501
502+ ret = amdxdna_pm_resume_get(xdna);
503+ if (ret) {
504+ XDNA_ERR(xdna, "Resume failed, ret %d", ret);
505+ goto put_bos;
506+ }
507+
485508 idx = srcu_read_lock(&client->hwctx_srcu);
486509 hwctx = xa_load(&client->hwctx_xa, hwctx_hdl);
487510 if (!hwctx) {
@@ -522,6 +545,8 @@ put_fence: · 34 unmodified lines
522545 dma_fence_put(job->fence);
523546 unlock_srcu:
524547 srcu_read_unlock(&client->hwctx_srcu, idx);
548+ amdxdna_pm_suspend_put(xdna);
549+put_bos:
525550 amdxdna_arg_bos_put(job);
526551 cmd_put:
527552 amdxdna_gem_put_obj(job->cmd_bo);
drivers/accel/amdxdna/amdxdna_ctx.h+29−4
@@ -72,6 +72,13 @@ struct amdxdna_cmd_preempt_data { · 71 unmodified lines
7272 u32 prop_args[]; /* properties and regular kernel arguments */
7373 };
7474
75+#define AMDXDNA_CMD_CTX_HEALTH_V1 1
76+#define AMDXDNA_CMD_CTX_HEALTH_AIE2 0
77+struct amdxdna_ctx_health {
78+ u32 version;
79+ u32 npu_gen;
80+};
81+
7582 /* Exec buffer command header format */
7683 #define AMDXDNA_CMD_STATE GENMASK(3, 0)
7784 #define AMDXDNA_CMD_EXTRA_CU_MASK GENMASK(11, 10)
@@ -122,6 +129,11 @@ struct amdxdna_drv_cmd { · 44 unmodified lines
122129 u32 result;
123130 };
124131
132+struct app_health_report;
133+union amdxdna_job_priv {
134+ struct app_health_report *aie2_health;
135+};
136+
125137 struct amdxdna_sched_job {
126138 struct drm_sched_job base;
127139 struct kref refcnt;
@@ -136,14 +148,20 @@ struct amdxdna_sched_job { · 8 unmodified lines
136148 u64 seq;
137149 struct amdxdna_drv_cmd *drv_cmd;
138150 struct amdxdna_gem_obj *cmd_bo;
151+ union amdxdna_job_priv priv;
139152 size_t bo_cnt;
140153 struct drm_gem_object *bos[] __counted_by(bo_cnt);
141154 };
142155
156+#define aie2_job_health priv.aie2_health
157+
143158 static inline u32
144159 amdxdna_cmd_get_op(struct amdxdna_gem_obj *abo)
145160 {
146− struct amdxdna_cmd *cmd = abo->mem.kva;
161+ struct amdxdna_cmd *cmd = amdxdna_gem_vmap(abo);
162+
163+ if (!cmd)
164+ return ERT_INVALID_CMD;
147165
148166 return FIELD_GET(AMDXDNA_CMD_OPCODE, cmd->header);
149167 }
@@ -151,7 +169,10 @@ amdxdna_cmd_get_op(struct amdxdna_gem_obj *abo) · 1 unmodified line
151169 static inline void
152170 amdxdna_cmd_set_state(struct amdxdna_gem_obj *abo, enum ert_cmd_state s)
153171 {
154− struct amdxdna_cmd *cmd = abo->mem.kva;
172+ struct amdxdna_cmd *cmd = amdxdna_gem_vmap(abo);
173+
174+ if (!cmd)
175+ return;
155176
156177 cmd->header &= ~AMDXDNA_CMD_STATE;
157178 cmd->header |= FIELD_PREP(AMDXDNA_CMD_STATE, s);
@@ -160,7 +181,10 @@ amdxdna_cmd_set_state(struct amdxdna_gem_obj *abo, enum ert_cmd_state s) · 2 unmodified lines
160181 static inline enum ert_cmd_state
161182 amdxdna_cmd_get_state(struct amdxdna_gem_obj *abo)
162183 {
163− struct amdxdna_cmd *cmd = abo->mem.kva;
184+ struct amdxdna_cmd *cmd = amdxdna_gem_vmap(abo);
185+
186+ if (!cmd)
187+ return ERT_CMD_STATE_INVALID;
164188
165189 return FIELD_GET(AMDXDNA_CMD_STATE, cmd->header);
166190 }
@@ -169,7 +193,8 @@ void *amdxdna_cmd_get_payload(struct amdxdna_gem_obj *abo, u32 *size); · 2 unmodified lines
169193 u32 amdxdna_cmd_get_cu_idx(struct amdxdna_gem_obj *abo);
170194 int amdxdna_cmd_set_error(struct amdxdna_gem_obj *abo,
171195 struct amdxdna_sched_job *job, u32 cmd_idx,
172− enum ert_cmd_state error_state);
196+ enum ert_cmd_state error_state,
197+ void *err_data, size_t size);
173198
174199 void amdxdna_sched_job_cleanup(struct amdxdna_sched_job *job);
175200 void amdxdna_hwctx_remove_all(struct amdxdna_client *client);
drivers/accel/amdxdna/amdxdna_gem.c+323−192
@@ -30,7 +30,6 @@ amdxdna_gem_heap_alloc(struct amdxdna_gem_obj *abo) · 29 unmodified lines
3030 struct amdxdna_dev *xdna = client->xdna;
3131 struct amdxdna_mem *mem = &abo->mem;
3232 struct amdxdna_gem_obj *heap;
33− u64 offset;
3433 u32 align;
3534 int ret;
3635
@@ -42,7 +41,7 @@ amdxdna_gem_heap_alloc(struct amdxdna_gem_obj *abo) · 5 unmodified lines
4241 goto unlock_out;
4342 }
4443
45− if (heap->mem.userptr == AMDXDNA_INVALID_ADDR) {
44+ if (amdxdna_gem_uva(heap) == AMDXDNA_INVALID_ADDR) {
4645 XDNA_ERR(xdna, "Invalid dev heap userptr");
4746 ret = -EINVAL;
4847 goto unlock_out;
@@ -64,10 +63,7 @@ amdxdna_gem_heap_alloc(struct amdxdna_gem_obj *abo) · 15 unmodified lines
6463 goto unlock_out;
6564 }
6665
67− mem->dev_addr = abo->mm_node.start;
68− offset = mem->dev_addr - heap->mem.dev_addr;
69− mem->userptr = heap->mem.userptr + offset;
70− mem->kva = heap->mem.kva + offset;
66+ client->heap_usage += mem->size;
7167
7268 drm_gem_object_get(to_gobj(heap));
7369
@@ -77,6 +73,45 @@ unlock_out: · 3 unmodified lines
7773 return ret;
7874 }
7975
76+static void
77+amdxdna_gem_heap_free(struct amdxdna_gem_obj *abo)
78+{
79+ struct amdxdna_client *client = abo->client;
80+ struct amdxdna_gem_obj *heap;
81+
82+ mutex_lock(&client->mm_lock);
83+
84+ drm_mm_remove_node(&abo->mm_node);
85+ client->heap_usage -= abo->mem.size;
86+ heap = client->dev_heap;
87+ drm_gem_object_put(to_gobj(heap));
88+
89+ mutex_unlock(&client->mm_lock);
90+}
91+
92+static struct amdxdna_gem_obj *
93+amdxdna_gem_create_obj(struct drm_device *dev, size_t size)
94+{
95+ struct amdxdna_gem_obj *abo;
96+
97+ abo = kzalloc_obj(*abo);
98+ if (!abo)
99+ return ERR_PTR(-ENOMEM);
100+
101+ abo->pinned = false;
102+ abo->assigned_hwctx = AMDXDNA_INVALID_CTX_HANDLE;
103+ mutex_init(&abo->lock);
104+
105+ abo->mem.dma_addr = AMDXDNA_INVALID_ADDR;
106+ abo->mem.uva = AMDXDNA_INVALID_ADDR;
107+ abo->mem.size = size;
108+ abo->open_ref = 0;
109+ abo->internal = false;
110+ INIT_LIST_HEAD(&abo->mem.umap_list);
111+
112+ return abo;
113+}
114+
80115 static void
81116 amdxdna_gem_destroy_obj(struct amdxdna_gem_obj *abo)
82117 {
@@ -84,19 +119,75 @@ amdxdna_gem_destroy_obj(struct amdxdna_gem_obj *abo) · 1 unmodified line
84119 kfree(abo);
85120 }
86121
87−static void
88−amdxdna_gem_heap_free(struct amdxdna_gem_obj *abo)
122+/*
123+ * Obtains a kernel virtual address on the BO (usually of small size).
124+ * The mapping is established on the first call and stays valid until
125+ * amdxdna_gem_vunmap() is called.
126+ */
127+void *amdxdna_gem_vmap(struct amdxdna_gem_obj *abo)
89128 {
90− struct amdxdna_gem_obj *heap;
129+ struct iosys_map map = IOSYS_MAP_INIT_VADDR(NULL);
130+ int ret;
91131
92− mutex_lock(&abo->client->mm_lock);
132+ if (abo->mem.kva)
133+ return abo->mem.kva;
93134
94− drm_mm_remove_node(&abo->mm_node);
135+ /* The first call to get the kva, taking slow path. */
136+ guard(mutex)(&abo->lock);
95137
96− heap = abo->client->dev_heap;
97− drm_gem_object_put(to_gobj(heap));
138+ if (!abo->mem.kva) {
139+ ret = drm_gem_vmap(to_gobj(abo), &map);
140+ if (ret)
141+ XDNA_ERR(abo->client->xdna, "Vmap bo failed, ret %d", ret);
142+ else
143+ abo->mem.kva = map.vaddr;
144+ }
145+ return abo->mem.kva;
146+}
147+
148+/*
149+ * Free mapping established through amdxdna_gem_vmap()
150+ */
151+static void amdxdna_gem_vunmap(struct amdxdna_gem_obj *abo)
152+{
153+ guard(mutex)(&abo->lock);
154+
155+ if (abo->mem.kva) {
156+ struct iosys_map map = IOSYS_MAP_INIT_VADDR(abo->mem.kva);
157+
158+ drm_gem_vunmap(to_gobj(abo), &map);
159+ abo->mem.kva = NULL;
160+ }
161+}
162+
163+/*
164+ * Obtain the user virtual address for accessing the BO.
165+ * It can be used for device to access the BO when PASID is enabled.
166+ */
167+u64 amdxdna_gem_uva(struct amdxdna_gem_obj *abo)
168+{
169+ if (abo->type == AMDXDNA_BO_DEV) {
170+ struct amdxdna_gem_obj *heap = abo->client->dev_heap;
171+ u64 off = amdxdna_dev_bo_offset(abo);
172+
173+ if (amdxdna_gem_uva(heap) != AMDXDNA_INVALID_ADDR)
174+ return amdxdna_gem_uva(heap) + off;
175+ return AMDXDNA_INVALID_ADDR;
176+ }
98177
99− mutex_unlock(&abo->client->mm_lock);
178+ return abo->mem.uva;
179+}
180+
181+/*
182+ * Obtain the address for device to access the BO.
183+ */
184+u64 amdxdna_gem_dev_addr(struct amdxdna_gem_obj *abo)
185+{
186+ if (abo->type == AMDXDNA_BO_DEV_HEAP)
187+ return abo->client->xdna->dev_info->dev_mem_base;
188+ if (abo->type == AMDXDNA_BO_DEV)
189+ return abo->mm_node.start;
190+ return amdxdna_obj_dma_addr(abo);
100191 }
101192
102193 static bool amdxdna_hmm_invalidate(struct mmu_interval_notifier *mni,
@@ -161,16 +252,19 @@ static void amdxdna_hmm_unregister(struct amdxdna_gem_obj *abo, · 58 unmodified lines
161252 static void amdxdna_umap_release(struct kref *ref)
162253 {
163254 struct amdxdna_umap *mapp = container_of(ref, struct amdxdna_umap, refcnt);
255+ struct amdxdna_gem_obj *abo = mapp->abo;
164256 struct vm_area_struct *vma = mapp->vma;
165257 struct amdxdna_dev *xdna;
166258
167259 mmu_interval_notifier_remove(&mapp->notifier);
168− if (is_import_bo(mapp->abo) && vma->vm_file && vma->vm_file->f_mapping)
260+ if (is_import_bo(abo) && vma->vm_file && vma->vm_file->f_mapping)
169261 mapping_clear_unevictable(vma->vm_file->f_mapping);
170262
171263 xdna = to_xdna_dev(to_gobj(mapp->abo)->dev);
172264 down_write(&xdna->notifier_lock);
173265 list_del(&mapp->node);
266+ if (list_empty(&abo->mem.umap_list))
267+ abo->mem.uva = AMDXDNA_INVALID_ADDR;
174268 up_write(&xdna->notifier_lock);
175269
176270 kvfree(mapp->range.hmm_pfns);
@@ -232,13 +326,13 @@ static int amdxdna_hmm_register(struct amdxdna_gem_obj *abo, · 55 unmodified lines
232326 mapp->abo = abo;
233327 kref_init(&mapp->refcnt);
234328
235− if (abo->mem.userptr == AMDXDNA_INVALID_ADDR)
236− abo->mem.userptr = addr;
237329 INIT_WORK(&mapp->hmm_unreg_work, amdxdna_hmm_unreg_work);
238330 if (is_import_bo(abo) && vma->vm_file && vma->vm_file->f_mapping)
239331 mapping_set_unevictable(vma->vm_file->f_mapping);
240332
241333 down_write(&xdna->notifier_lock);
334+ if (list_empty(&abo->mem.umap_list))
335+ abo->mem.uva = addr;
242336 list_add_tail(&mapp->node, &abo->mem.umap_list);
243337 up_write(&xdna->notifier_lock);
244338
@@ -256,10 +350,11 @@ static void amdxdna_gem_dev_obj_free(struct drm_gem_object *gobj) · 11 unmodified lines
256350 struct amdxdna_dev *xdna = to_xdna_dev(gobj->dev);
257351 struct amdxdna_gem_obj *abo = to_xdna_obj(gobj);
258352
259− XDNA_DBG(xdna, "BO type %d xdna_addr 0x%llx", abo->type, abo->mem.dev_addr);
353+ XDNA_DBG(xdna, "BO type %d xdna_addr 0x%llx", abo->type, amdxdna_gem_dev_addr(abo));
260354 if (abo->pinned)
261355 amdxdna_gem_unpin(abo);
262356
357+ amdxdna_gem_vunmap(abo);
263358 amdxdna_gem_heap_free(abo);
264359 drm_gem_object_release(gobj);
265360 amdxdna_gem_destroy_obj(abo);
@@ -390,35 +485,6 @@ static const struct dma_buf_ops amdxdna_dmabuf_ops = { · 124 unmodified lines
390485 .vunmap = drm_gem_dmabuf_vunmap,
391486 };
392487
393−static int amdxdna_gem_obj_vmap(struct amdxdna_gem_obj *abo, void **vaddr)
394−{
395− struct iosys_map map = IOSYS_MAP_INIT_VADDR(NULL);
396− int ret;
397−
398− if (is_import_bo(abo))
399− ret = dma_buf_vmap_unlocked(abo->dma_buf, &map);
400− else
401− ret = drm_gem_vmap(to_gobj(abo), &map);
402−
403− *vaddr = map.vaddr;
404− return ret;
405−}
406−
407−static void amdxdna_gem_obj_vunmap(struct amdxdna_gem_obj *abo)
408−{
409− struct iosys_map map;
410−
411− if (!abo->mem.kva)
412− return;
413−
414− iosys_map_set_vaddr(&map, abo->mem.kva);
415−
416− if (is_import_bo(abo))
417− dma_buf_vunmap_unlocked(abo->dma_buf, &map);
418− else
419− drm_gem_vunmap(to_gobj(abo), &map);
420−}
421−
422488 static struct dma_buf *amdxdna_gem_prime_export(struct drm_gem_object *gobj, int flags)
423489 {
424490 struct amdxdna_gem_obj *abo = to_xdna_obj(gobj);
@@ -447,13 +513,55 @@ static void amdxdna_imported_obj_free(struct amdxdna_gem_obj *abo) · 22 unmodified lines
447513 kfree(abo);
448514 }
449515
516+static inline bool
517+amdxdna_gem_skip_bo_usage(struct amdxdna_gem_obj *abo)
518+{
519+ /* Do not count imported BOs since the buffer is not allocated by us. */
520+ if (is_import_bo(abo))
521+ return true;
522+
523+ /* Already counted as part of HEAP BO */
524+ if (abo->type == AMDXDNA_BO_DEV)
525+ return true;
526+
527+ return false;
528+}
529+
530+static void
531+amdxdna_gem_add_bo_usage(struct amdxdna_gem_obj *abo)
532+{
533+ struct amdxdna_client *client = abo->client;
534+
535+ if (amdxdna_gem_skip_bo_usage(abo))
536+ return;
537+
538+ guard(mutex)(&client->mm_lock);
539+
540+ client->total_bo_usage += abo->mem.size;
541+ if (abo->internal)
542+ client->total_int_bo_usage += abo->mem.size;
543+}
544+
545+static void
546+amdxdna_gem_del_bo_usage(struct amdxdna_gem_obj *abo)
547+{
548+ struct amdxdna_client *client = abo->client;
549+
550+ if (amdxdna_gem_skip_bo_usage(abo))
551+ return;
552+
553+ guard(mutex)(&client->mm_lock);
554+
555+ client->total_bo_usage -= abo->mem.size;
556+ if (abo->internal)
557+ client->total_int_bo_usage -= abo->mem.size;
558+}
559+
450560 static void amdxdna_gem_obj_free(struct drm_gem_object *gobj)
451561 {
452562 struct amdxdna_dev *xdna = to_xdna_dev(gobj->dev);
453563 struct amdxdna_gem_obj *abo = to_xdna_obj(gobj);
454564
455− XDNA_DBG(xdna, "BO type %d xdna_addr 0x%llx", abo->type, abo->mem.dev_addr);
456−
457565 amdxdna_hmm_unregister(abo, NULL);
458566 flush_workqueue(xdna->notifier_wq);
459567
@@ -463,23 +571,76 @@ static void amdxdna_gem_obj_free(struct drm_gem_object *gobj) · 3 unmodified lines
463571 if (abo->type == AMDXDNA_BO_DEV_HEAP)
464572 drm_mm_takedown(&abo->mm);
465573
466− amdxdna_gem_obj_vunmap(abo);
574+ if (amdxdna_iova_on(xdna))
575+ amdxdna_iommu_unmap_bo(xdna, abo);
576+
577+ amdxdna_gem_vunmap(abo);
467578 mutex_destroy(&abo->lock);
468579
469− if (is_import_bo(abo)) {
580+ if (is_import_bo(abo))
470581 amdxdna_imported_obj_free(abo);
471− return;
582+ else
583+ drm_gem_shmem_free(&abo->base);
584+}
585+
586+static int amdxdna_gem_obj_open(struct drm_gem_object *gobj, struct drm_file *filp)
587+{
588+ struct amdxdna_dev *xdna = to_xdna_dev(gobj->dev);
589+ struct amdxdna_gem_obj *abo = to_xdna_obj(gobj);
590+ int ret;
591+
592+ guard(mutex)(&abo->lock);
593+ abo->open_ref++;
594+
595+ if (abo->open_ref == 1) {
596+ /* Attached to the client when first opened by it. */
597+ abo->client = filp->driver_priv;
598+ amdxdna_gem_add_bo_usage(abo);
599+ }
600+ if (amdxdna_iova_on(xdna)) {
601+ ret = amdxdna_iommu_map_bo(xdna, abo);
602+ if (ret)
603+ return ret;
604+ }
605+
606+ return 0;
607+}
608+
609+static void amdxdna_gem_obj_close(struct drm_gem_object *gobj, struct drm_file *filp)
610+{
611+ struct amdxdna_gem_obj *abo = to_xdna_obj(gobj);
612+
613+ guard(mutex)(&abo->lock);
614+ abo->open_ref--;
615+
616+ if (abo->open_ref == 0) {
617+ amdxdna_gem_del_bo_usage(abo);
618+ /* Detach from the client when last closed by it. */
619+ abo->client = NULL;
472620 }
621+}
622+
623+static int amdxdna_gem_dev_obj_vmap(struct drm_gem_object *obj, struct iosys_map *map)
624+{
625+ struct amdxdna_gem_obj *abo = to_xdna_obj(obj);
626+ void *base = amdxdna_gem_vmap(abo->client->dev_heap);
627+ u64 offset = amdxdna_dev_bo_offset(abo);
473628
474− drm_gem_shmem_free(&abo->base);
629+ if (!base)
630+ return -ENOMEM;
631+ iosys_map_set_vaddr(map, base + offset);
632+ return 0;
475633 }
476634
477635 static const struct drm_gem_object_funcs amdxdna_gem_dev_obj_funcs = {
478636 .free = amdxdna_gem_dev_obj_free,
637+ .vmap = amdxdna_gem_dev_obj_vmap,
479638 };
480639
481640 static const struct drm_gem_object_funcs amdxdna_gem_shmem_funcs = {
482641 .free = amdxdna_gem_obj_free,
642+ .open = amdxdna_gem_obj_open,
643+ .close = amdxdna_gem_obj_close,
483644 .print_info = drm_gem_shmem_object_print_info,
484645 .pin = drm_gem_shmem_object_pin,
485646 .unpin = drm_gem_shmem_object_unpin,
@@ -491,30 +652,9 @@ static const struct drm_gem_object_funcs amdxdna_gem_shmem_funcs = { · 5 unmodified lines
491652 .export = amdxdna_gem_prime_export,
492653 };
493654
494−static struct amdxdna_gem_obj *
495−amdxdna_gem_create_obj(struct drm_device *dev, size_t size)
496−{
497− struct amdxdna_gem_obj *abo;
498−
499− abo = kzalloc_obj(*abo);
500− if (!abo)
501− return ERR_PTR(-ENOMEM);
502−
503− abo->pinned = false;
504− abo->assigned_hwctx = AMDXDNA_INVALID_CTX_HANDLE;
505− mutex_init(&abo->lock);
506−
507− abo->mem.userptr = AMDXDNA_INVALID_ADDR;
508− abo->mem.dev_addr = AMDXDNA_INVALID_ADDR;
509− abo->mem.size = size;
510− INIT_LIST_HEAD(&abo->mem.umap_list);
511−
512− return abo;
513−}
514−
515655 /* For drm_driver->gem_create_object callback */
516656 struct drm_gem_object *
517−amdxdna_gem_create_object_cb(struct drm_device *dev, size_t size)
657+amdxdna_gem_create_shmem_object_cb(struct drm_device *dev, size_t size)
518658 {
519659 struct amdxdna_gem_obj *abo;
520660
@@ -528,8 +668,9 @@ amdxdna_gem_create_object_cb(struct drm_device *dev, size_t size) · 7 unmodified lines
528668 }
529669
530670 static struct amdxdna_gem_obj *
531−amdxdna_gem_create_shmem_object(struct drm_device *dev, size_t size)
671+amdxdna_gem_create_shmem_object(struct drm_device *dev, struct amdxdna_drm_create_bo *args)
532672 {
673+ size_t size = args->size;
533674 struct drm_gem_shmem_object *shmem = drm_gem_shmem_create(dev, size);
534675
535676 if (IS_ERR(shmem))
@@ -543,7 +684,6 @@ static struct amdxdna_gem_obj * · 7 unmodified lines
543684 amdxdna_gem_create_ubuf_object(struct drm_device *dev, struct amdxdna_drm_create_bo *args)
544685 {
545686 struct amdxdna_dev *xdna = to_xdna_dev(dev);
546− enum amdxdna_ubuf_flag flags = 0;
547687 struct amdxdna_drm_va_tbl va_tbl;
548688 struct drm_gem_object *gobj;
549689 struct dma_buf *dma_buf;
@@ -554,10 +694,7 @@ amdxdna_gem_create_ubuf_object(struct drm_device *dev, struct amdxdna_drm_create · 4 unmodified lines
554694 }
555695
556696 if (va_tbl.num_entries) {
557− if (args->type == AMDXDNA_BO_CMD)
558− flags |= AMDXDNA_UBUF_FLAG_MAP_DMA;
559−
560− dma_buf = amdxdna_get_ubuf(dev, flags, va_tbl.num_entries,
697+ dma_buf = amdxdna_get_ubuf(dev, va_tbl.num_entries,
561698 u64_to_user_ptr(args->vaddr + sizeof(va_tbl)));
562699 } else {
563700 dma_buf = dma_buf_get(va_tbl.dmabuf_fd);
@@ -577,18 +714,6 @@ amdxdna_gem_create_ubuf_object(struct drm_device *dev, struct amdxdna_drm_create · 13 unmodified lines
577714 return to_xdna_obj(gobj);
578715 }
579716
580−static struct amdxdna_gem_obj *
581−amdxdna_gem_create_object(struct drm_device *dev,
582− struct amdxdna_drm_create_bo *args)
583−{
584− size_t aligned_sz = PAGE_ALIGN(args->size);
585−
586− if (args->vaddr)
587− return amdxdna_gem_create_ubuf_object(dev, args);
588−
589− return amdxdna_gem_create_shmem_object(dev, aligned_sz);
590−}
591−
592717 struct drm_gem_object *
593718 amdxdna_gem_prime_import(struct drm_device *dev, struct dma_buf *dma_buf)
594719 {
@@ -621,6 +746,8 @@ amdxdna_gem_prime_import(struct drm_device *dev, struct dma_buf *dma_buf) · 26 unmodified lines
621746 abo = to_xdna_obj(gobj);
622747 abo->attach = attach;
623748 abo->dma_buf = dma_buf;
749+ abo->type = AMDXDNA_BO_SHARE;
750+ gobj->resv = dma_buf->resv;
624751
625752 return gobj;
626753
@@ -635,93 +762,101 @@ put_buf: · 8 unmodified lines
635762 }
636763
637764 static struct amdxdna_gem_obj *
638−amdxdna_drm_alloc_shmem(struct drm_device *dev,
639− struct amdxdna_drm_create_bo *args,
640− struct drm_file *filp)
765+amdxdna_drm_create_share_bo(struct drm_device *dev,
766+ struct amdxdna_drm_create_bo *args, struct drm_file *filp)
641767 {
642− struct amdxdna_client *client = filp->driver_priv;
643768 struct amdxdna_gem_obj *abo;
644769
645− abo = amdxdna_gem_create_object(dev, args);
770+ if (args->vaddr)
771+ abo = amdxdna_gem_create_ubuf_object(dev, args);
772+ else
773+ abo = amdxdna_gem_create_shmem_object(dev, args);
646774 if (IS_ERR(abo))
647775 return ERR_CAST(abo);
648776
649− abo->client = client;
650− abo->type = AMDXDNA_BO_SHMEM;
777+ if (args->type == AMDXDNA_BO_DEV_HEAP) {
778+ abo->type = AMDXDNA_BO_DEV_HEAP;
779+ abo->internal = true;
780+ } else {
781+ abo->type = AMDXDNA_BO_SHARE;
782+ abo->internal = args->type == AMDXDNA_BO_CMD;
783+ }
651784
652785 return abo;
653786 }
654787
655788 static struct amdxdna_gem_obj *
656−amdxdna_drm_create_dev_heap(struct drm_device *dev,
657− struct amdxdna_drm_create_bo *args,
658− struct drm_file *filp)
789+amdxdna_drm_create_dev_heap_bo(struct drm_device *dev,
790+ struct amdxdna_drm_create_bo *args, struct drm_file *filp)
659791 {
660792 struct amdxdna_client *client = filp->driver_priv;
661793 struct amdxdna_dev *xdna = to_xdna_dev(dev);
662794 struct amdxdna_gem_obj *abo;
663795 int ret;
664796
665− if (args->size > xdna->dev_info->dev_mem_size) {
666− XDNA_DBG(xdna, "Invalid dev heap size 0x%llx, limit 0x%lx",
797+ WARN_ON(!is_power_of_2(xdna->dev_info->dev_mem_size));
798+ XDNA_DBG(xdna, "Requested dev heap size 0x%llx", args->size);
799+ if (!args->size || !IS_ALIGNED(args->size, xdna->dev_info->dev_mem_size)) {
800+ XDNA_ERR(xdna, "The dev heap size 0x%llx is not multiple of 0x%lx",
667801 args->size, xdna->dev_info->dev_mem_size);
668802 return ERR_PTR(-EINVAL);
669803 }
670804
805+ /* HEAP BO is a special case of SHARE BO. */
806+ abo = amdxdna_drm_create_share_bo(dev, args, filp);
807+ if (IS_ERR(abo))
808+ return ERR_CAST(abo);
809+
810+ /* Set up heap for this client. */
671811 mutex_lock(&client->mm_lock);
812+
672813 if (client->dev_heap) {
673814 XDNA_DBG(client->xdna, "dev heap is already created");
674815 ret = -EBUSY;
675816 goto mm_unlock;
676817 }
677−
678− abo = amdxdna_gem_create_object(dev, args);
679− if (IS_ERR(abo)) {
680− ret = PTR_ERR(abo);
681− goto mm_unlock;
682− }
683−
684− abo->type = AMDXDNA_BO_DEV_HEAP;
685− abo->client = client;
686− abo->mem.dev_addr = client->xdna->dev_info->dev_mem_base;
687− drm_mm_init(&abo->mm, abo->mem.dev_addr, abo->mem.size);
688−
689− ret = amdxdna_gem_obj_vmap(abo, &abo->mem.kva);
690− if (ret) {
691− XDNA_ERR(xdna, "Vmap heap bo failed, ret %d", ret);
692− goto release_obj;
693− }
694−
695818 client->dev_heap = abo;
696819 drm_gem_object_get(to_gobj(abo));
820+
821+ drm_mm_init(&abo->mm, xdna->dev_info->dev_mem_base, abo->mem.size);
822+
697823 mutex_unlock(&client->mm_lock);
698824
699825 return abo;
700826
701−release_obj:
702− drm_gem_object_put(to_gobj(abo));
703827 mm_unlock:
704828 mutex_unlock(&client->mm_lock);
829+ drm_gem_object_put(to_gobj(abo));
705830 return ERR_PTR(ret);
706831 }
707832
708833 struct amdxdna_gem_obj *
709−amdxdna_drm_alloc_dev_bo(struct drm_device *dev,
710− struct amdxdna_drm_create_bo *args,
711− struct drm_file *filp)
834+amdxdna_drm_create_dev_bo(struct drm_device *dev,
835+ struct amdxdna_drm_create_bo *args, struct drm_file *filp)
712836 {
837+ size_t aligned_sz = PAGE_ALIGN(args->size);
713838 struct amdxdna_client *client = filp->driver_priv;
714839 struct amdxdna_dev *xdna = to_xdna_dev(dev);
715− size_t aligned_sz = PAGE_ALIGN(args->size);
716840 struct amdxdna_gem_obj *abo;
841+ struct drm_gem_object *gobj;
717842 int ret;
718843
719− abo = amdxdna_gem_create_obj(&xdna->ddev, aligned_sz);
844+ if (!aligned_sz) {
845+ XDNA_ERR(xdna, "Invalid BO size 0x%llx", args->size);
846+ return ERR_PTR(-EINVAL);
847+ }
848+
849+ abo = amdxdna_gem_create_obj(dev, aligned_sz);
720850 if (IS_ERR(abo))
721851 return abo;
722−
723− to_gobj(abo)->funcs = &amdxdna_gem_dev_obj_funcs;
852+ gobj = to_gobj(abo);
853+ gobj->funcs = &amdxdna_gem_dev_obj_funcs;
724854 abo->type = AMDXDNA_BO_DEV;
855+ abo->internal = true;
856+ /*
857+ * DEV BOs cannot be alive when client is gone, it's OK to
858+ * always establish the connection.
859+ */
725860 abo->client = client;
726861
727862 ret = amdxdna_gem_heap_alloc(abo);
@@ -730,31 +865,7 @@ amdxdna_drm_alloc_dev_bo(struct drm_device *dev, · 2 unmodified lines
730865 amdxdna_gem_destroy_obj(abo);
731866 return ERR_PTR(ret);
732867 }
733−
734− drm_gem_private_object_init(&xdna->ddev, to_gobj(abo), aligned_sz);
735−
736− return abo;
737−}
738−
739−static struct amdxdna_gem_obj *
740−amdxdna_drm_create_cmd_bo(struct drm_device *dev,
741− struct amdxdna_drm_create_bo *args,
742− struct drm_file *filp)
743−{
744− struct amdxdna_dev *xdna = to_xdna_dev(dev);
745− struct amdxdna_gem_obj *abo;
746−
747− if (args->size < sizeof(struct amdxdna_cmd)) {
748− XDNA_DBG(xdna, "Command BO size 0x%llx too small", args->size);
749− return ERR_PTR(-EINVAL);
750− }
751−
752− abo = amdxdna_gem_create_object(dev, args);
753− if (IS_ERR(abo))
754− return ERR_CAST(abo);
755−
756− abo->type = AMDXDNA_BO_CMD;
757− abo->client = filp->driver_priv;
868+ drm_gem_private_object_init(dev, gobj, aligned_sz);
758869
759870 return abo;
760871 }
@@ -772,17 +883,16 @@ int amdxdna_drm_create_bo_ioctl(struct drm_device *dev, void *data, struct drm_f · 11 unmodified lines
772883 XDNA_DBG(xdna, "BO arg type %d vaddr 0x%llx size 0x%llx flags 0x%llx",
773884 args->type, args->vaddr, args->size, args->flags);
774885 switch (args->type) {
775− case AMDXDNA_BO_SHMEM:
776− abo = amdxdna_drm_alloc_shmem(dev, args, filp);
886+ case AMDXDNA_BO_CMD:
887+ fallthrough;
888+ case AMDXDNA_BO_SHARE:
889+ abo = amdxdna_drm_create_share_bo(dev, args, filp);
777890 break;
778891 case AMDXDNA_BO_DEV_HEAP:
779− abo = amdxdna_drm_create_dev_heap(dev, args, filp);
892+ abo = amdxdna_drm_create_dev_heap_bo(dev, args, filp);
780893 break;
781894 case AMDXDNA_BO_DEV:
782− abo = amdxdna_drm_alloc_dev_bo(dev, args, filp);
783− break;
784− case AMDXDNA_BO_CMD:
785− abo = amdxdna_drm_create_cmd_bo(dev, args, filp);
895+ abo = amdxdna_drm_create_dev_bo(dev, args, filp);
786896 break;
787897 default:
788898 return -EINVAL;
@@ -790,7 +900,7 @@ int amdxdna_drm_create_bo_ioctl(struct drm_device *dev, void *data, struct drm_f · 1 unmodified line
790900 if (IS_ERR(abo))
791901 return PTR_ERR(abo);
792902
793− /* ready to publish object to userspace */
903+ /* Ready to publish object to userspace and count for BO usage. */
794904 ret = drm_gem_handle_create(filp, to_gobj(abo), &args->handle);
795905 if (ret) {
796906 XDNA_ERR(xdna, "Create handle failed");
@@ -798,8 +908,8 @@ int amdxdna_drm_create_bo_ioctl(struct drm_device *dev, void *data, struct drm_f · 1 unmodified line
798908 }
799909
800910 XDNA_DBG(xdna, "BO hdl %d type %d userptr 0x%llx xdna_addr 0x%llx size 0x%lx",
801− args->handle, args->type, abo->mem.userptr,
802− abo->mem.dev_addr, abo->mem.size);
911+ args->handle, args->type, amdxdna_gem_uva(abo),
912+ amdxdna_gem_dev_addr(abo), abo->mem.size);
803913 put_obj:
804914 /* Dereference object reference. Handle holds it now. */
805915 drm_gem_object_put(to_gobj(abo));
@@ -850,38 +960,19 @@ void amdxdna_gem_unpin(struct amdxdna_gem_obj *abo) · 44 unmodified lines
850960 struct amdxdna_gem_obj *amdxdna_gem_get_obj(struct amdxdna_client *client,
851961 u32 bo_hdl, u8 bo_type)
852962 {
853− struct amdxdna_dev *xdna = client->xdna;
854963 struct amdxdna_gem_obj *abo;
855964 struct drm_gem_object *gobj;
856− int ret;
857965
858966 gobj = drm_gem_object_lookup(client->filp, bo_hdl);
859967 if (!gobj) {
860− XDNA_DBG(xdna, "Can not find bo %d", bo_hdl);
968+ XDNA_DBG(client->xdna, "Can not find bo %d", bo_hdl);
861969 return NULL;
862970 }
863971
864972 abo = to_xdna_obj(gobj);
865− if (bo_type != AMDXDNA_BO_INVALID && abo->type != bo_type)
866− goto put_obj;
867−
868− if (bo_type != AMDXDNA_BO_CMD || abo->mem.kva)
973+ if (bo_type == AMDXDNA_BO_INVALID || abo->type == bo_type)
869974 return abo;
870975
871− if (abo->mem.size > SZ_32K) {
872− XDNA_ERR(xdna, "Cmd bo is too big %ld", abo->mem.size);
873− goto put_obj;
874− }
875−
876− ret = amdxdna_gem_obj_vmap(abo, &abo->mem.kva);
877− if (ret) {
878− XDNA_ERR(xdna, "Vmap cmd bo failed, ret %d", ret);
879− goto put_obj;
880− }
881−
882− return abo;
883−
884−put_obj:
885976 drm_gem_object_put(gobj);
886977 return NULL;
887978 }
@@ -904,8 +995,8 @@ int amdxdna_drm_get_bo_info_ioctl(struct drm_device *dev, void *data, struct drm · 16 unmodified lines
904995 }
905996
906997 abo = to_xdna_obj(gobj);
907− args->vaddr = abo->mem.userptr;
908− args->xdna_addr = abo->mem.dev_addr;
998+ args->vaddr = amdxdna_gem_uva(abo);
999+ args->xdna_addr = amdxdna_gem_dev_addr(abo);
9091000
9101001 if (abo->type != AMDXDNA_BO_DEV)
9111002 args->map_offset = drm_vma_node_offset_addr(&gobj->vma_node);
@@ -950,8 +1041,8 @@ int amdxdna_drm_sync_bo_ioctl(struct drm_device *dev, · 38 unmodified lines
9501041
9511042 if (is_import_bo(abo))
9521043 drm_clflush_sg(abo->base.sgt);
953− else if (abo->mem.kva)
954− drm_clflush_virt_range(abo->mem.kva + args->offset, args->size);
1044+ else if (amdxdna_gem_vmap(abo))
1045+ drm_clflush_virt_range(amdxdna_gem_vmap(abo) + args->offset, args->size);
9551046 else if (abo->base.pages)
9561047 drm_clflush_pages(abo->base.pages, gobj->size >> PAGE_SHIFT);
9571048 else
@@ -969,3 +1060,43 @@ put_obj: · 11 unmodified lines
9691060 drm_gem_object_put(gobj);
9701061 return ret;
9711062 }
1063+
1064+int amdxdna_drm_get_bo_usage(struct drm_device *dev, struct amdxdna_drm_get_array *args)
1065+{
1066+ size_t min_sz = min(args->element_size, sizeof(struct amdxdna_drm_bo_usage));
1067+ char __user *buf = u64_to_user_ptr(args->buffer);
1068+ struct amdxdna_dev *xdna = to_xdna_dev(dev);
1069+ struct amdxdna_client *tmp_client;
1070+ struct amdxdna_drm_bo_usage tmp;
1071+
1072+ drm_WARN_ON(dev, !mutex_is_locked(&xdna->dev_lock));
1073+
1074+ if (args->num_element != 1)
1075+ return -EINVAL;
1076+
1077+ if (copy_from_user(&tmp, buf, min_sz))
1078+ return -EFAULT;
1079+
1080+ if (!tmp.pid)
1081+ return -EINVAL;
1082+
1083+ tmp.total_usage = 0;
1084+ tmp.internal_usage = 0;
1085+ tmp.heap_usage = 0;
1086+
1087+ list_for_each_entry(tmp_client, &xdna->client_list, node) {
1088+ if (tmp.pid != tmp_client->pid)
1089+ continue;
1090+
1091+ mutex_lock(&tmp_client->mm_lock);
1092+ tmp.total_usage += tmp_client->total_bo_usage;
1093+ tmp.internal_usage += tmp_client->total_int_bo_usage;
1094+ tmp.heap_usage += tmp_client->heap_usage;
1095+ mutex_unlock(&tmp_client->mm_lock);
1096+ }
1097+
1098+ if (copy_to_user(buf, &tmp, min_sz))
1099+ return -EFAULT;
1100+
1101+ return 0;
1102+}
drivers/accel/amdxdna/amdxdna_gem.h+28−11
@@ -6,7 +6,9 @@ · 5 unmodified lines
66 #ifndef _AMDXDNA_GEM_H_
77 #define _AMDXDNA_GEM_H_
88
9+#include <drm/drm_gem_shmem_helper.h>
910 #include <linux/hmm.h>
11+#include <linux/iova.h>
1012 #include "amdxdna_pci_drv.h"
1113
1214 struct amdxdna_umap {
@@ -22,14 +24,16 @@ struct amdxdna_umap { · 9 unmodified lines
2224 };
2325
2426 struct amdxdna_mem {
25− u64 userptr;
2627 void *kva;
27− u64 dev_addr;
28+ u64 dma_addr;
2829 size_t size;
29− struct page **pages;
30− u32 nr_pages;
3130 struct list_head umap_list;
3231 bool map_invalid;
32+ /*
33+ * Cache the first mmap uva as PASID addr, which can be accessed by driver
34+ * without taking notifier_lock.
35+ */
36+ u64 uva;
3337 };
3438
3539 struct amdxdna_gem_obj {
@@ -37,15 +41,19 @@ struct amdxdna_gem_obj { · 1 unmodified line
3741 struct amdxdna_client *client;
3842 u8 type;
3943 bool pinned;
40− struct mutex lock; /* Protects: pinned */
44+ struct mutex lock; /* Protects: pinned, mem.kva, open_ref */
4145 struct amdxdna_mem mem;
46+ int open_ref;
4247
43− /* Below members is uninitialized when needed */
48+ /* Below members are initialized when needed */
4449 struct drm_mm mm; /* For AMDXDNA_BO_DEV_HEAP */
4550 struct drm_mm_node mm_node; /* For AMDXDNA_BO_DEV */
4651 u32 assigned_hwctx;
4752 struct dma_buf *dma_buf;
4853 struct dma_buf_attachment *attach;
54+
55+ /* True, if BO is managed by XRT, not application */
56+ bool internal;
4957 };
5058
5159 #define to_gobj(obj) (&(obj)->base.base)
@@ -63,21 +71,29 @@ static inline void amdxdna_gem_put_obj(struct amdxdna_gem_obj *abo) · 11 unmodified lines
6371 drm_gem_object_put(to_gobj(abo));
6472 }
6573
74+void *amdxdna_gem_vmap(struct amdxdna_gem_obj *abo);
75+u64 amdxdna_gem_uva(struct amdxdna_gem_obj *abo);
76+u64 amdxdna_gem_dev_addr(struct amdxdna_gem_obj *abo);
77+
6678 static inline u64 amdxdna_dev_bo_offset(struct amdxdna_gem_obj *abo)
6779 {
68− return abo->mem.dev_addr - abo->client->dev_heap->mem.dev_addr;
80+ return amdxdna_gem_dev_addr(abo) - amdxdna_gem_dev_addr(abo->client->dev_heap);
81+}
82+
83+static inline u64 amdxdna_obj_dma_addr(struct amdxdna_gem_obj *abo)
84+{
85+ return amdxdna_pasid_on(abo->client) ? amdxdna_gem_uva(abo) : abo->mem.dma_addr;
6986 }
7087
7188 void amdxdna_umap_put(struct amdxdna_umap *mapp);
7289
7390 struct drm_gem_object *
74−amdxdna_gem_create_object_cb(struct drm_device *dev, size_t size);
91+amdxdna_gem_create_shmem_object_cb(struct drm_device *dev, size_t size);
7592 struct drm_gem_object *
7693 amdxdna_gem_prime_import(struct drm_device *dev, struct dma_buf *dma_buf);
7794 struct amdxdna_gem_obj *
78−amdxdna_drm_alloc_dev_bo(struct drm_device *dev,
79− struct amdxdna_drm_create_bo *args,
80− struct drm_file *filp);
95+amdxdna_drm_create_dev_bo(struct drm_device *dev,
96+ struct amdxdna_drm_create_bo *args, struct drm_file *filp);
8197
8298 int amdxdna_gem_pin_nolock(struct amdxdna_gem_obj *abo);
8399 int amdxdna_gem_pin(struct amdxdna_gem_obj *abo);
@@ -86,5 +102,6 @@ void amdxdna_gem_unpin(struct amdxdna_gem_obj *abo); · 2 unmodified lines
86102 int amdxdna_drm_create_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
87103 int amdxdna_drm_get_bo_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
88104 int amdxdna_drm_sync_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
105+int amdxdna_drm_get_bo_usage(struct drm_device *dev, struct amdxdna_drm_get_array *args);
89106
90107 #endif /* _AMDXDNA_GEM_H_ */
drivers/accel/amdxdna/amdxdna_iommu.c+184−0
@@ -0,0 +1,184 @@
1+// SPDX-License-Identifier: GPL-2.0
2+/*
3+ * Copyright (C) 2025, Advanced Micro Devices, Inc.
4+ */
5+
6+#include <drm/amdxdna_accel.h>
7+#include <linux/iommu.h>
8+#include <linux/iova.h>
9+
10+#include "amdxdna_gem.h"
11+#include "amdxdna_pci_drv.h"
12+
13+static bool force_iova;
14+module_param(force_iova, bool, 0600);
15+MODULE_PARM_DESC(force_iova, "Force use IOVA (Default false)");
16+
17+static struct iova *amdxdna_iommu_alloc_iova(struct amdxdna_dev *xdna,
18+ size_t size,
19+ dma_addr_t *dma_addr,
20+ bool size_aligned)
21+{
22+ unsigned long shift, end;
23+ struct iova *iova;
24+
25+ end = xdna->domain->geometry.aperture_end;
26+ shift = iova_shift(&xdna->iovad);
27+ size = iova_align(&xdna->iovad, size);
28+
29+ iova = alloc_iova(&xdna->iovad, size >> shift, end >> shift, size_aligned);
30+ if (!iova)
31+ return ERR_PTR(-ENOMEM);
32+
33+ *dma_addr = iova_dma_addr(&xdna->iovad, iova);
34+
35+ return iova;
36+}
37+
38+int amdxdna_iommu_map_bo(struct amdxdna_dev *xdna, struct amdxdna_gem_obj *abo)
39+{
40+ struct sg_table *sgt;
41+ dma_addr_t dma_addr;
42+ struct iova *iova;
43+ size_t size;
44+
45+ if (abo->type != AMDXDNA_BO_DEV_HEAP && abo->type != AMDXDNA_BO_SHMEM)
46+ return 0;
47+
48+ sgt = drm_gem_shmem_get_pages_sgt(&abo->base);
49+ if (IS_ERR(sgt)) {
50+ XDNA_ERR(xdna, "Get sgt failed, ret %ld", PTR_ERR(sgt));
51+ return PTR_ERR(sgt);
52+ }
53+
54+ if (!sgt->orig_nents || !sg_page(sgt->sgl)) {
55+ XDNA_ERR(xdna, "sgl is zero length or not page backed");
56+ return -EOPNOTSUPP;
57+ }
58+
59+ iova = amdxdna_iommu_alloc_iova(xdna, abo->mem.size, &dma_addr,
60+ (abo->type == AMDXDNA_BO_DEV_HEAP));
61+ if (IS_ERR(iova)) {
62+ XDNA_ERR(xdna, "Alloc iova failed, ret %ld", PTR_ERR(iova));
63+ return PTR_ERR(iova);
64+ }
65+
66+ size = iommu_map_sgtable(xdna->domain, dma_addr, sgt,
67+ IOMMU_READ | IOMMU_WRITE);
68+ if (size < abo->mem.size) {
69+ __free_iova(&xdna->iovad, iova);
70+ return -ENXIO;
71+ }
72+
73+ abo->mem.dma_addr = dma_addr;
74+
75+ return 0;
76+}
77+
78+void amdxdna_iommu_unmap_bo(struct amdxdna_dev *xdna, struct amdxdna_gem_obj *abo)
79+{
80+ size_t size;
81+
82+ if (abo->mem.dma_addr == AMDXDNA_INVALID_ADDR)
83+ return;
84+
85+ size = iova_align(&xdna->iovad, abo->mem.size);
86+ iommu_unmap(xdna->domain, abo->mem.dma_addr, size);
87+ free_iova(&xdna->iovad, iova_pfn(&xdna->iovad, abo->mem.dma_addr));
88+ abo->mem.dma_addr = AMDXDNA_INVALID_ADDR;
89+}
90+
91+void *amdxdna_iommu_alloc(struct amdxdna_dev *xdna, size_t size, dma_addr_t *dma_addr)
92+{
93+ struct iova *iova;
94+ void *cpu_addr;
95+ int ret;
96+
97+ iova = amdxdna_iommu_alloc_iova(xdna, size, dma_addr, true);
98+ if (IS_ERR(iova)) {
99+ XDNA_ERR(xdna, "Alloc iova failed, ret %ld", PTR_ERR(iova));
100+ return iova;
101+ }
102+
103+ cpu_addr = (void *)__get_free_pages(GFP_KERNEL, get_order(size));
104+ if (!cpu_addr) {
105+ ret = -ENOMEM;
106+ goto free_iova;
107+ }
108+
109+ ret = iommu_map(xdna->domain, *dma_addr, virt_to_phys(cpu_addr),
110+ iova_align(&xdna->iovad, size),
111+ IOMMU_READ | IOMMU_WRITE, GFP_KERNEL);
112+ if (ret)
113+ goto free_iova;
114+
115+ return cpu_addr;
116+
117+free_iova:
118+ __free_iova(&xdna->iovad, iova);
119+ return ERR_PTR(ret);
120+}
121+
122+void amdxdna_iommu_free(struct amdxdna_dev *xdna, size_t size,
123+ void *cpu_addr, dma_addr_t dma_addr)
124+{
125+ iommu_unmap(xdna->domain, dma_addr, iova_align(&xdna->iovad, size));
126+ free_iova(&xdna->iovad, iova_pfn(&xdna->iovad, dma_addr));
127+ free_pages((unsigned long)cpu_addr, get_order(size));
128+}
129+
130+int amdxdna_iommu_init(struct amdxdna_dev *xdna)
131+{
132+ unsigned long order;
133+ int ret;
134+
135+ xdna->group = iommu_group_get(xdna->ddev.dev);
136+ if (!xdna->group || !force_iova)
137+ return 0;
138+
139+ XDNA_WARN(xdna, "Enabled force_iova mode.");
140+ xdna->domain = iommu_paging_domain_alloc_flags(xdna->ddev.dev,
141+ IOMMU_HWPT_ALLOC_PASID);
142+ if (IS_ERR(xdna->domain)) {
143+ XDNA_ERR(xdna, "Failed to alloc iommu domain");
144+ ret = PTR_ERR(xdna->domain);
145+ goto put_group;
146+ }
147+
148+ ret = iova_cache_get();
149+ if (ret)
150+ goto free_domain;
151+
152+ order = __ffs(xdna->domain->pgsize_bitmap);
153+ init_iova_domain(&xdna->iovad, 1UL << order, 0);
154+
155+ ret = iommu_attach_group(xdna->domain, xdna->group);
156+ if (ret)
157+ goto put_iova;
158+
159+ return 0;
160+
161+put_iova:
162+ put_iova_domain(&xdna->iovad);
163+ iova_cache_put();
164+free_domain:
165+ iommu_domain_free(xdna->domain);
166+put_group:
167+ iommu_group_put(xdna->group);
168+ xdna->domain = NULL;
169+
170+ return ret;
171+}
172+
173+void amdxdna_iommu_fini(struct amdxdna_dev *xdna)
174+{
175+ if (xdna->domain) {
176+ iommu_detach_group(xdna->domain, xdna->group);
177+ put_iova_domain(&xdna->iovad);
178+ iova_cache_put();
179+ iommu_domain_free(xdna->domain);
180+ }
181+
182+ if (xdna->group)
183+ iommu_group_put(xdna->group);
184+}
drivers/accel/amdxdna/amdxdna_mailbox.c+1−1
@@ -499,7 +499,7 @@ xdna_mailbox_start_channel(struct mailbox_channel *mb_chann, · 498 unmodified lines
499499 int ret;
500500
501501 if (!is_power_of_2(x2i->rb_size) || !is_power_of_2(i2x->rb_size)) {
502− pr_err("Ring buf size must be power of 2");
502+ pr_err("Ring buf size must be power of 2\n");
503503 return -EINVAL;
504504 }
505505
drivers/accel/amdxdna/amdxdna_pci_drv.c+36−19
@@ -36,9 +36,10 @@ MODULE_FIRMWARE("amdnpu/17f0_11/npu_7.sbin"); · 35 unmodified lines
3636 * 0.5: Support getting telemetry data
3737 * 0.6: Support preemption
3838 * 0.7: Support getting power and utilization data
39+ * 0.8: Support BO usage query
3940 */
4041 #define AMDXDNA_DRIVER_MAJOR 0
41−#define AMDXDNA_DRIVER_MINOR 7
42+#define AMDXDNA_DRIVER_MINOR 8
4243
4344 /*
4445 * Bind the driver base on (vendor_id, device_id) pair and later use the
@@ -73,18 +74,21 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp) · 28 unmodified lines
7374
7475 client->pid = pid_nr(rcu_access_pointer(filp->pid));
7576 client->xdna = xdna;
76−
77− client->sva = iommu_sva_bind_device(xdna->ddev.dev, current->mm);
78− if (IS_ERR(client->sva)) {
79− ret = PTR_ERR(client->sva);
80− XDNA_ERR(xdna, "SVA bind device failed, ret %d", ret);
81− goto failed;
82− }
83− client->pasid = iommu_sva_get_pasid(client->sva);
84− if (client->pasid == IOMMU_PASID_INVALID) {
85− XDNA_ERR(xdna, "SVA get pasid failed");
86− ret = -ENODEV;
87− goto unbind_sva;
77+ client->pasid = IOMMU_PASID_INVALID;
78+
79+ if (!amdxdna_iova_on(xdna)) {
80+ client->sva = iommu_sva_bind_device(xdna->ddev.dev, current->mm);
81+ if (IS_ERR(client->sva)) {
82+ ret = PTR_ERR(client->sva);
83+ XDNA_ERR(xdna, "SVA bind device failed, ret %d", ret);
84+ goto failed;
85+ }
86+ client->pasid = iommu_sva_get_pasid(client->sva);
87+ if (client->pasid == IOMMU_PASID_INVALID) {
88+ XDNA_ERR(xdna, "SVA get pasid failed");
89+ ret = -ENODEV;
90+ goto unbind_sva;
91+ }
8892 }
8993 client->mm = current->mm;
9094 mmgrab(client->mm);
@@ -103,7 +107,8 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp) · 12 unmodified lines
103107 return 0;
104108
105109 unbind_sva:
106− iommu_sva_unbind_device(client->sva);
110+ if (!IS_ERR_OR_NULL(client->sva))
111+ iommu_sva_unbind_device(client->sva);
107112 failed:
108113 kfree(client);
109114
@@ -116,12 +121,14 @@ static void amdxdna_client_cleanup(struct amdxdna_client *client) · 6 unmodified lines
116121 amdxdna_hwctx_remove_all(client);
117122 xa_destroy(&client->hwctx_xa);
118123 cleanup_srcu_struct(&client->hwctx_srcu);
119− mutex_destroy(&client->mm_lock);
120124
121125 if (client->dev_heap)
122126 drm_gem_object_put(to_gobj(client->dev_heap));
123127
124− iommu_sva_unbind_device(client->sva);
128+ mutex_destroy(&client->mm_lock);
129+
130+ if (!IS_ERR_OR_NULL(client->sva))
131+ iommu_sva_unbind_device(client->sva);
125132 mmdrop(client->mm);
126133
127134 kfree(client);
@@ -240,7 +247,7 @@ const struct drm_driver amdxdna_drm_drv = { · 112 unmodified lines
240247 .ioctls = amdxdna_drm_ioctls,
241248 .num_ioctls = ARRAY_SIZE(amdxdna_drm_ioctls),
242249
243− .gem_create_object = amdxdna_gem_create_object_cb,
250+ .gem_create_object = amdxdna_gem_create_shmem_object_cb,
244251 .gem_prime_import = amdxdna_gem_prime_import,
245252 };
246253
@@ -282,9 +289,15 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 35 unmodified lines
282289 fs_reclaim_release(GFP_KERNEL);
283290 }
284291
292+ ret = amdxdna_iommu_init(xdna);
293+ if (ret)
294+ return ret;
295+
285296 xdna->notifier_wq = alloc_ordered_workqueue("notifier_wq", WQ_MEM_RECLAIM);
286− if (!xdna->notifier_wq)
287− return -ENOMEM;
297+ if (!xdna->notifier_wq) {
298+ ret = -ENOMEM;
299+ goto iommu_fini;
300+ }
288301
289302 mutex_lock(&xdna->dev_lock);
290303 ret = xdna->dev_info->ops->init(xdna);
@@ -316,6 +329,8 @@ failed_dev_fini: · 25 unmodified lines
316329 mutex_unlock(&xdna->dev_lock);
317330 destroy_notifier_wq:
318331 destroy_workqueue(xdna->notifier_wq);
332+iommu_fini:
333+ amdxdna_iommu_fini(xdna);
319334 return ret;
320335 }
321336
@@ -341,6 +356,8 @@ static void amdxdna_remove(struct pci_dev *pdev) · 19 unmodified lines
341356
342357 xdna->dev_info->ops->fini(xdna);
343358 mutex_unlock(&xdna->dev_lock);
359+
360+ amdxdna_iommu_fini(xdna);
344361 }
345362
346363 static const struct dev_pm_ops amdxdna_pm_ops = {
drivers/accel/amdxdna/amdxdna_pci_drv.h+28−0
@@ -6,7 +6,10 @@ · 5 unmodified lines
66 #ifndef _AMDXDNA_PCI_DRV_H_
77 #define _AMDXDNA_PCI_DRV_H_
88
9+#include <drm/amdxdna_accel.h>
910 #include <drm/drm_print.h>
11+#include <linux/iommu.h>
12+#include <linux/iova.h>
1013 #include <linux/workqueue.h>
1114 #include <linux/xarray.h>
1215
@@ -101,6 +104,10 @@ struct amdxdna_dev { · 88 unmodified lines
101104 struct amdxdna_fw_ver fw_ver;
102105 struct rw_semaphore notifier_lock; /* for mmu notifier*/
103106 struct workqueue_struct *notifier_wq;
107+
108+ struct iommu_group *group;
109+ struct iommu_domain *domain;
110+ struct iova_domain iovad;
104111 };
105112
106113 /*
@@ -131,6 +138,10 @@ struct amdxdna_client { · 24 unmodified lines
131138 struct iommu_sva *sva;
132139 int pasid;
133140 struct mm_struct *mm;
141+
142+ size_t heap_usage;
143+ size_t total_bo_usage;
144+ size_t total_int_bo_usage;
134145 };
135146
136147 #define amdxdna_for_each_hwctx(client, hwctx_id, entry) \
@@ -145,4 +156,21 @@ extern const struct amdxdna_dev_info dev_npu6_info; · 8 unmodified lines
145156 int amdxdna_sysfs_init(struct amdxdna_dev *xdna);
146157 void amdxdna_sysfs_fini(struct amdxdna_dev *xdna);
147158
159+int amdxdna_iommu_init(struct amdxdna_dev *xdna);
160+void amdxdna_iommu_fini(struct amdxdna_dev *xdna);
161+int amdxdna_iommu_map_bo(struct amdxdna_dev *xdna, struct amdxdna_gem_obj *abo);
162+void amdxdna_iommu_unmap_bo(struct amdxdna_dev *xdna, struct amdxdna_gem_obj *abo);
163+void *amdxdna_iommu_alloc(struct amdxdna_dev *xdna, size_t size, dma_addr_t *dma_addr);
164+void amdxdna_iommu_free(struct amdxdna_dev *xdna, size_t size,
165+ void *cpu_addr, dma_addr_t dma_addr);
166+
167+static inline bool amdxdna_iova_on(struct amdxdna_dev *xdna)
168+{
169+ return !!xdna->domain;
170+}
171+
172+static inline bool amdxdna_pasid_on(struct amdxdna_client *client)
173+{
174+ return client->pasid != IOMMU_PASID_INVALID;
175+}
148176 #endif /* _AMDXDNA_PCI_DRV_H_ */
drivers/accel/amdxdna/amdxdna_ubuf.c+4−13
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717 struct amdxdna_ubuf_priv {
1818 struct page **pages;
1919 u64 nr_pages;
20− enum amdxdna_ubuf_flag flags;
2120 struct mm_struct *mm;
2221 };
2322
@@ -37,11 +36,9 @@ static struct sg_table *amdxdna_ubuf_map(struct dma_buf_attachment *attach, · 13 unmodified lines
3736 if (ret)
3837 goto err_free_sg;
3938
40− if (ubuf->flags & AMDXDNA_UBUF_FLAG_MAP_DMA) {
41− ret = dma_map_sgtable(attach->dev, sg, direction, 0);
42− if (ret)
43− goto err_free_table;
44− }
39+ ret = dma_map_sgtable(attach->dev, sg, direction, 0);
40+ if (ret)
41+ goto err_free_table;
4542
4643 return sg;
4744
@@ -56,11 +53,7 @@ static void amdxdna_ubuf_unmap(struct dma_buf_attachment *attach, · 8 unmodified lines
5653 struct sg_table *sg,
5754 enum dma_data_direction direction)
5855 {
59− struct amdxdna_ubuf_priv *ubuf = attach->dmabuf->priv;
60−
61− if (ubuf->flags & AMDXDNA_UBUF_FLAG_MAP_DMA)
62− dma_unmap_sgtable(attach->dev, sg, direction, 0);
63−
56+ dma_unmap_sgtable(attach->dev, sg, direction, 0);
6457 sg_free_table(sg);
6558 kfree(sg);
6659 }
@@ -133,7 +126,6 @@ static const struct dma_buf_ops amdxdna_ubuf_dmabuf_ops = { · 66 unmodified lines
133126 };
134127
135128 struct dma_buf *amdxdna_get_ubuf(struct drm_device *dev,
136− enum amdxdna_ubuf_flag flags,
137129 u32 num_entries, void __user *va_entries)
138130 {
139131 struct amdxdna_dev *xdna = to_xdna_dev(dev);
@@ -152,7 +144,6 @@ struct dma_buf *amdxdna_get_ubuf(struct drm_device *dev, · 12 unmodified lines
152144 if (!ubuf)
153145 return ERR_PTR(-ENOMEM);
154146
155− ubuf->flags = flags;
156147 ubuf->mm = current->mm;
157148 mmgrab(ubuf->mm);
158149
drivers/accel/amdxdna/amdxdna_ubuf.h+0−5
@@ -8,12 +8,7 @@ · 7 unmodified lines
88 #include <drm/drm_device.h>
99 #include <linux/dma-buf.h>
1010
11−enum amdxdna_ubuf_flag {
12− AMDXDNA_UBUF_FLAG_MAP_DMA = 1,
13−};
14−
1511 struct dma_buf *amdxdna_get_ubuf(struct drm_device *dev,
16− enum amdxdna_ubuf_flag flags,
1712 u32 num_entries, void __user *va_entries);
1813
1914 #endif /* _AMDXDNA_UBUF_H_ */
drivers/accel/amdxdna/npu4_regs.c+2−1
@@ -93,7 +93,8 @@ const struct aie2_fw_feature_tbl npu4_fw_feature_table[] = { · 92 unmodified lines
9393 { .features = BIT_U64(AIE2_NPU_COMMAND), .major = 6, .min_minor = 15 },
9494 { .features = BIT_U64(AIE2_PREEMPT), .major = 6, .min_minor = 12 },
9595 { .features = BIT_U64(AIE2_TEMPORAL_ONLY), .major = 6, .min_minor = 12 },
96− { .features = GENMASK_ULL(AIE2_TEMPORAL_ONLY, AIE2_NPU_COMMAND), .major = 7 },
96+ { .features = BIT_U64(AIE2_APP_HEALTH), .major = 6, .min_minor = 18 },
97+ { .features = AIE2_ALL_FEATURES, .major = 7 },
9798 { 0 }
9899 };
99100
drivers/accel/ivpu/ivpu_debugfs.c+12−2
@@ -1,6 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2026 Intel Corporation
44 */
55
66 #include <linux/debugfs.h>
@@ -127,6 +127,14 @@ static int firewall_irq_counter_show(struct seq_file *s, void *v) · 120 unmodified lines
127127 return 0;
128128 }
129129
130+static int engine_reset_counter_show(struct seq_file *s, void *v)
131+{
132+ struct ivpu_device *vdev = seq_to_ivpu(s);
133+
134+ seq_printf(s, "%d\n", atomic_read(&vdev->pm->engine_reset_counter));
135+ return 0;
136+}
137+
130138 static const struct drm_debugfs_info vdev_debugfs_list[] = {
131139 {"bo_list", bo_list_show, 0},
132140 {"fw_name", fw_name_show, 0},
@@ -137,6 +145,7 @@ static const struct drm_debugfs_info vdev_debugfs_list[] = { · 4 unmodified lines
137145 {"reset_counter", reset_counter_show, 0},
138146 {"reset_pending", reset_pending_show, 0},
139147 {"firewall_irq_counter", firewall_irq_counter_show, 0},
148+ {"engine_reset_counter", engine_reset_counter_show, 0},
140149 };
141150
142151 static int dvfs_mode_get(void *data, u64 *dvfs_mode)
@@ -352,8 +361,9 @@ static const struct file_operations ivpu_force_recovery_fops = { · 209 unmodified lines
352361 static int ivpu_reset_engine_fn(void *data, u64 val)
353362 {
354363 struct ivpu_device *vdev = (struct ivpu_device *)data;
364+ struct vpu_jsm_msg resp;
355365
356− return ivpu_jsm_reset_engine(vdev, (u32)val);
366+ return ivpu_jsm_reset_engine(vdev, (u32)val, &resp);
357367 }
358368
359369 DEFINE_DEBUGFS_ATTRIBUTE(ivpu_reset_engine_fops, NULL, ivpu_reset_engine_fn, "0x%02llx\n");
drivers/accel/ivpu/ivpu_drv.c+1−0
@@ -665,6 +665,7 @@ static int ivpu_dev_init(struct ivpu_device *vdev) · 664 unmodified lines
665665 vdev->context_xa_limit.max = IVPU_USER_CONTEXT_MAX_SSID;
666666 atomic64_set(&vdev->unique_id_counter, 0);
667667 atomic_set(&vdev->job_timeout_counter, 0);
668+ atomic_set(&vdev->faults_detected, 0);
668669 xa_init_flags(&vdev->context_xa, XA_FLAGS_ALLOC | XA_FLAGS_LOCK_IRQ);
669670 xa_init_flags(&vdev->submitted_jobs_xa, XA_FLAGS_ALLOC1);
670671 xa_init_flags(&vdev->db_xa, XA_FLAGS_ALLOC1);
drivers/accel/ivpu/ivpu_drv.h+3−1
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0-only */
22 /*
3− * Copyright (C) 2020-2025 Intel Corporation
3+ * Copyright (C) 2020-2026 Intel Corporation
44 */
55
66 #ifndef __IVPU_DRV_H__
@@ -36,6 +36,7 @@ · 29 unmodified lines
3636 #define IVPU_HW_IP_60XX 60
3737
3838 #define IVPU_HW_IP_REV_LNL_B0 4
39+#define IVPU_HW_IP_REV_NVL_A0 0
3940
4041 #define IVPU_HW_BTRS_MTL 1
4142 #define IVPU_HW_BTRS_LNL 2
@@ -168,6 +169,7 @@ struct ivpu_device { · 126 unmodified lines
168169 struct xarray submitted_jobs_xa;
169170 struct ivpu_ipc_consumer job_done_consumer;
170171 atomic_t job_timeout_counter;
172+ atomic_t faults_detected;
171173
172174 atomic64_t unique_id_counter;
173175
drivers/accel/ivpu/ivpu_hw.c+4−2
@@ -70,8 +70,10 @@ static void wa_init(struct ivpu_device *vdev) · 69 unmodified lines
7070 if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
7171 vdev->wa.interrupt_clear_with_0 = ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev);
7272
73− if (ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
74− ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0)
73+ if ((ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
74+ ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0) ||
75+ (ivpu_device_id(vdev) == PCI_DEVICE_ID_NVL &&
76+ ivpu_revision(vdev) == IVPU_HW_IP_REV_NVL_A0))
7577 vdev->wa.disable_clock_relinquish = true;
7678
7779 if (ivpu_test_mode & IVPU_TEST_MODE_CLK_RELINQ_ENABLE)
drivers/accel/ivpu/ivpu_job.c+48−2
@@ -1,6 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2025 Intel Corporation
3+ * Copyright (C) 2020-2026 Intel Corporation
44 */
55
66 #include <drm/drm_file.h>
@@ -607,6 +607,7 @@ bool ivpu_job_handle_engine_error(struct ivpu_device *vdev, u32 job_id, u32 job_ · 600 unmodified lines
607607 * status and ensure both are handled in the same way
608608 */
609609 job->file_priv->has_mmu_faults = true;
610+ atomic_set(&vdev->faults_detected, 1);
610611 queue_work(system_percpu_wq, &vdev->context_abort_work);
611612 return true;
612613 }
@@ -1115,6 +1116,51 @@ void ivpu_job_done_consumer_fini(struct ivpu_device *vdev) · 502 unmodified lines
11151116 ivpu_ipc_consumer_del(vdev, &vdev->job_done_consumer);
11161117 }
11171118
1119+static int reset_engine_and_mark_faulty_contexts(struct ivpu_device *vdev)
1120+{
1121+ u32 num_impacted_contexts;
1122+ struct vpu_jsm_msg resp;
1123+ int ret;
1124+ u32 i;
1125+
1126+ ret = ivpu_jsm_reset_engine(vdev, 0, &resp);
1127+ if (ret)
1128+ return ret;
1129+
1130+ /*
1131+ * If faults are detected, ignore guilty contexts from engine reset as NPU may not be stuck
1132+ * and could return currently running good context and faulty contexts are already marked
1133+ */
1134+ if (atomic_cmpxchg(&vdev->faults_detected, 1, 0) == 1)
1135+ return 0;
1136+
1137+ num_impacted_contexts = resp.payload.engine_reset_done.num_impacted_contexts;
1138+
1139+ ivpu_warn_ratelimited(vdev, "Engine reset performed, impacted contexts: %u\n",
1140+ num_impacted_contexts);
1141+
1142+ if (!in_range(num_impacted_contexts, 1, VPU_MAX_ENGINE_RESET_IMPACTED_CONTEXTS - 1)) {
1143+ ivpu_pm_trigger_recovery(vdev, "Cannot determine guilty contexts");
1144+ return -EIO;
1145+ }
1146+
1147+ /* No faults detected, NPU likely got stuck. Mark returned contexts as guilty */
1148+ guard(mutex)(&vdev->context_list_lock);
1149+
1150+ for (i = 0; i < num_impacted_contexts; i++) {
1151+ u32 ssid = resp.payload.engine_reset_done.impacted_contexts[i].host_ssid;
1152+ struct ivpu_file_priv *file_priv = xa_load(&vdev->context_xa, ssid);
1153+
1154+ if (file_priv) {
1155+ mutex_lock(&file_priv->lock);
1156+ file_priv->has_mmu_faults = true;
1157+ mutex_unlock(&file_priv->lock);
1158+ }
1159+ }
1160+
1161+ return 0;
1162+}
1163+
11181164 void ivpu_context_abort_work_fn(struct work_struct *work)
11191165 {
11201166 struct ivpu_device *vdev = container_of(work, struct ivpu_device, context_abort_work);
@@ -1127,7 +1173,7 @@ void ivpu_context_abort_work_fn(struct work_struct *work) · 6 unmodified lines
11271173 return;
11281174
11291175 if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW)
1130− if (ivpu_jsm_reset_engine(vdev, 0))
1176+ if (reset_engine_and_mark_faulty_contexts(vdev))
11311177 goto runtime_put;
11321178
11331179 mutex_lock(&vdev->context_list_lock);
drivers/accel/ivpu/ivpu_jsm_msg.c+15−4
@@ -151,10 +151,9 @@ int ivpu_jsm_get_heartbeat(struct ivpu_device *vdev, u32 engine, u64 *heartbeat) · 150 unmodified lines
151151 return ret;
152152 }
153153
154−int ivpu_jsm_reset_engine(struct ivpu_device *vdev, u32 engine)
154+int ivpu_jsm_reset_engine(struct ivpu_device *vdev, u32 engine, struct vpu_jsm_msg *resp)
155155 {
156156 struct vpu_jsm_msg req = { .type = VPU_JSM_MSG_ENGINE_RESET };
157− struct vpu_jsm_msg resp;
158157 int ret;
159158
160159 if (engine != VPU_ENGINE_COMPUTE)
@@ -162,14 +161,17 @@ int ivpu_jsm_reset_engine(struct ivpu_device *vdev, u32 engine) · 1 unmodified line
162161
163162 req.payload.engine_reset.engine_idx = engine;
164163
165− ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_ENGINE_RESET_DONE, &resp,
164+ ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_ENGINE_RESET_DONE, resp,
166165 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm);
167166 if (ret) {
168167 ivpu_err_ratelimited(vdev, "Failed to reset engine %d: %d\n", engine, ret);
169168 ivpu_pm_trigger_recovery(vdev, "Engine reset failed");
169+ return ret;
170170 }
171171
172− return ret;
172+ atomic_inc(&vdev->pm->engine_reset_counter);
173+
174+ return 0;
173175 }
174176
175177 int ivpu_jsm_preempt_engine(struct ivpu_device *vdev, u32 engine, u32 preempt_id)
@@ -554,6 +556,15 @@ int ivpu_jsm_dct_disable(struct ivpu_device *vdev) · 378 unmodified lines
554556 }
555557
556558 int ivpu_jsm_state_dump(struct ivpu_device *vdev)
559+{
560+ struct vpu_jsm_msg req = { .type = VPU_JSM_MSG_STATE_DUMP };
561+ struct vpu_jsm_msg resp;
562+
563+ return ivpu_ipc_send_receive_internal(vdev, &req, VPU_JSM_MSG_STATE_DUMP_RSP, &resp,
564+ VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm);
565+}
566+
567+int ivpu_jsm_state_dump_no_reply(struct ivpu_device *vdev)
557568 {
558569 struct vpu_jsm_msg req = { .type = VPU_JSM_MSG_STATE_DUMP };
559570
drivers/accel/ivpu/ivpu_jsm_msg.h+2−1
@@ -14,7 +14,7 @@ int ivpu_jsm_register_db(struct ivpu_device *vdev, u32 ctx_id, u32 db_id, · 13 unmodified lines
1414 u64 jobq_base, u32 jobq_size);
1515 int ivpu_jsm_unregister_db(struct ivpu_device *vdev, u32 db_id);
1616 int ivpu_jsm_get_heartbeat(struct ivpu_device *vdev, u32 engine, u64 *heartbeat);
17−int ivpu_jsm_reset_engine(struct ivpu_device *vdev, u32 engine);
17+int ivpu_jsm_reset_engine(struct ivpu_device *vdev, u32 engine, struct vpu_jsm_msg *response);
1818 int ivpu_jsm_preempt_engine(struct ivpu_device *vdev, u32 engine, u32 preempt_id);
1919 int ivpu_jsm_dyndbg_control(struct ivpu_device *vdev, char *command, size_t size);
2020 int ivpu_jsm_trace_get_capability(struct ivpu_device *vdev, u32 *trace_destination_mask,
@@ -44,5 +44,6 @@ int ivpu_jsm_metric_streamer_info(struct ivpu_device *vdev, u64 metric_group_mas · 23 unmodified lines
4444 int ivpu_jsm_dct_enable(struct ivpu_device *vdev, u32 active_us, u32 inactive_us);
4545 int ivpu_jsm_dct_disable(struct ivpu_device *vdev);
4646 int ivpu_jsm_state_dump(struct ivpu_device *vdev);
47+int ivpu_jsm_state_dump_no_reply(struct ivpu_device *vdev);
4748
4849 #endif
drivers/accel/ivpu/ivpu_mmu.c+2−1
@@ -1,6 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2026 Intel Corporation
44 */
55
66 #include <linux/circ_buf.h>
@@ -964,6 +964,7 @@ void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev) · 957 unmodified lines
964964 file_priv = xa_load(&vdev->context_xa, ssid);
965965 if (file_priv) {
966966 if (!READ_ONCE(file_priv->has_mmu_faults)) {
967+ atomic_set(&vdev->faults_detected, 1);
967968 ivpu_mmu_dump_event(vdev, event);
968969 WRITE_ONCE(file_priv->has_mmu_faults, true);
969970 }
drivers/accel/ivpu/ivpu_pm.c+9−6
@@ -1,6 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 /*
3− * Copyright (C) 2020-2024 Intel Corporation
3+ * Copyright (C) 2020-2026 Intel Corporation
44 */
55
66 #include <linux/highmem.h>
@@ -166,7 +166,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work) · 159 unmodified lines
166166 ivpu_pm_reset_begin(vdev);
167167
168168 if (!pm_runtime_status_suspended(vdev->drm.dev)) {
169− ivpu_jsm_state_dump(vdev);
169+ ivpu_jsm_state_dump_no_reply(vdev);
170170 ivpu_dev_coredump(vdev);
171171 ivpu_suspend(vdev);
172172 }
@@ -205,23 +205,25 @@ static void ivpu_job_timeout_work(struct work_struct *work) · 32 unmodified lines
205205
206206 if (ivpu_jsm_get_heartbeat(vdev, 0, &heartbeat) || heartbeat <= vdev->fw->last_heartbeat) {
207207 ivpu_err(vdev, "Job timeout detected, heartbeat not progressed\n");
208− goto recovery;
208+ goto abort;
209209 }
210210
211211 inference_max_retries = DIV_ROUND_UP(inference_timeout_ms, timeout_ms);
212212 if (atomic_fetch_inc(&vdev->job_timeout_counter) >= inference_max_retries) {
213213 ivpu_err(vdev, "Job timeout detected, heartbeat limit (%lld) exceeded\n",
214214 inference_max_retries);
215− goto recovery;
215+ goto abort;
216216 }
217217
218218 vdev->fw->last_heartbeat = heartbeat;
219219 ivpu_start_job_timeout_detection(vdev);
220220 return;
221221
222−recovery:
222+abort:
223223 atomic_set(&vdev->job_timeout_counter, 0);
224− ivpu_pm_trigger_recovery(vdev, "TDR");
224+ ivpu_jsm_state_dump(vdev);
225+ ivpu_dev_coredump(vdev);
226+ queue_work(system_percpu_wq, &vdev->context_abort_work);
225227 }
226228
227229 void ivpu_start_job_timeout_detection(struct ivpu_device *vdev)
@@ -404,6 +406,7 @@ void ivpu_pm_init(struct ivpu_device *vdev) · 176 unmodified lines
404406 init_rwsem(&pm->reset_lock);
405407 atomic_set(&pm->reset_pending, 0);
406408 atomic_set(&pm->reset_counter, 0);
409+ atomic_set(&pm->engine_reset_counter, 0);
407410
408411 INIT_WORK(&pm->recovery_work, ivpu_pm_recovery_work);
409412 INIT_DELAYED_WORK(&pm->job_timeout_work, ivpu_job_timeout_work);
drivers/accel/ivpu/ivpu_pm.h+1−0
@@ -18,6 +18,7 @@ struct ivpu_pm_info { · 17 unmodified lines
1818 struct rw_semaphore reset_lock;
1919 atomic_t reset_counter;
2020 atomic_t reset_pending;
21+ atomic_t engine_reset_counter;
2122 u8 dct_active_percent;
2223 };
2324
drivers/accel/qaic/qaic_control.c+45−2
@@ -914,7 +914,7 @@ static int decode_deactivate(struct qaic_device *qdev, void *trans, u32 *msg_len · 913 unmodified lines
914914 */
915915 return -ENODEV;
916916
917− if (status) {
917+ if (usr && status) {
918918 /*
919919 * Releasing resources failed on the device side, which puts
920920 * us in a bind since they may still be in use, so enable the
@@ -1109,6 +1109,9 @@ static void *msg_xfer(struct qaic_device *qdev, struct wrapper_list *wrappers, u · 188 unmodified lines
11091109 mutex_lock(&qdev->cntl_mutex);
11101110 if (!list_empty(&elem.list))
11111111 list_del(&elem.list);
1112+ /* resp_worker() processed the response but the wait was interrupted */
1113+ else if (ret == -ERESTARTSYS)
1114+ ret = 0;
11121115 if (!ret && !elem.buf)
11131116 ret = -ETIMEDOUT;
11141117 else if (ret > 0 && !elem.buf)
@@ -1419,9 +1422,49 @@ static void resp_worker(struct work_struct *work) · 304 unmodified lines
14191422 }
14201423 mutex_unlock(&qdev->cntl_mutex);
14211424
1422− if (!found)
1425+ if (!found) {
1426+ /*
1427+ * The user might have gone away at this point without waiting
1428+ * for QAIC_TRANS_DEACTIVATE_FROM_DEV transaction coming from
1429+ * the device. If this is not handled correctly, the host will
1430+ * not know that the DBC[n] has been freed on the device.
1431+ * Due to this failure in synchronization between the device and
1432+ * the host, if another user requests to activate a network, and
1433+ * the device assigns DBC[n] again, save_dbc_buf() will hang,
1434+ * waiting for dbc[n]->in_use to be set to false, which will not
1435+ * happen unless the qaic_dev_reset_clean_local_state() gets
1436+ * called by resetting the device (or re-inserting the module).
1437+ *
1438+ * As a solution, we look for QAIC_TRANS_DEACTIVATE_FROM_DEV
1439+ * transactions in the message before disposing of it, then
1440+ * handle releasing the DBC resources.
1441+ *
1442+ * Since the user has gone away, if the device could not
1443+ * deactivate the network (status != 0), there is no way to
1444+ * enable and reassign the DBC to the user. We can put trust in
1445+ * the device that it will release all the active DBCs in
1446+ * response to the QAIC_TRANS_TERMINATE_TO_DEV transaction,
1447+ * otherwise, the user can issue an soc_reset to the device.
1448+ */
1449+ u32 msg_count = le32_to_cpu(msg->hdr.count);
1450+ u32 msg_len = le32_to_cpu(msg->hdr.len);
1451+ u32 len = 0;
1452+ int j;
1453+
1454+ for (j = 0; j < msg_count && len < msg_len; ++j) {
1455+ struct wire_trans_hdr *trans_hdr;
1456+
1457+ trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
1458+ if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
1459+ if (decode_deactivate(qdev, trans_hdr, &len, NULL))
1460+ len += le32_to_cpu(trans_hdr->len);
1461+ } else {
1462+ len += le32_to_cpu(trans_hdr->len);
1463+ }
1464+ }
14231465 /* request must have timed out, drop packet */
14241466 kfree(msg);
1467+ }
14251468
14261469 kfree(resp);
14271470 }
drivers/acpi/Kconfig+1−0
@@ -9,6 +9,7 @@ config ARCH_SUPPORTS_ACPI · 8 unmodified lines
99 menuconfig ACPI
1010 bool "ACPI (Advanced Configuration and Power Interface) Support"
1111 depends on ARCH_SUPPORTS_ACPI
12+ select AUXILIARY_BUS
1213 select PNP
1314 select NLS
1415 select CRC32
drivers/acpi/acpi_platform.c+1−1
@@ -135,7 +135,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev, · 134 unmodified lines
135135 }
136136 }
137137
138− if (adev->device_type == ACPI_BUS_TYPE_DEVICE && !adev->pnp.type.backlight) {
138+ if (adev->device_type == ACPI_BUS_TYPE_DEVICE) {
139139 LIST_HEAD(resource_list);
140140
141141 count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
drivers/acpi/acpi_processor.c+8−7
@@ -113,6 +113,10 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) · 112 unmodified lines
113113 PCI_ANY_ID, PCI_ANY_ID, NULL);
114114 if (ide_dev) {
115115 errata.piix4.bmisx = pci_resource_start(ide_dev, 4);
116+ if (errata.piix4.bmisx)
117+ dev_dbg(&ide_dev->dev,
118+ "Bus master activity detection (BM-IDE) erratum enabled\n");
119+
116120 pci_dev_put(ide_dev);
117121 }
118122
@@ -131,20 +135,17 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) · 12 unmodified lines
131135 if (isa_dev) {
132136 pci_read_config_byte(isa_dev, 0x76, &value1);
133137 pci_read_config_byte(isa_dev, 0x77, &value2);
134− if ((value1 & 0x80) || (value2 & 0x80))
138+ if ((value1 & 0x80) || (value2 & 0x80)) {
135139 errata.piix4.fdma = 1;
140+ dev_dbg(&isa_dev->dev,
141+ "Type-F DMA livelock erratum (C3 disabled)\n");
142+ }
136143 pci_dev_put(isa_dev);
137144 }
138145
139146 break;
140147 }
141148
142− if (ide_dev)
143− dev_dbg(&ide_dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n");
144−
145− if (isa_dev)
146− dev_dbg(&isa_dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n");
147−
148149 return 0;
149150 }
150151
drivers/acpi/acpi_video.c+22−23
@@ -9,6 +9,7 @@ · 8 unmodified lines
99
1010 #define pr_fmt(fmt) "ACPI: video: " fmt
1111
12+#include <linux/auxiliary_bus.h>
1213 #include <linux/kernel.h>
1314 #include <linux/module.h>
1415 #include <linux/init.h>
@@ -21,7 +22,6 @@ · 6 unmodified lines
2122 #include <linux/sort.h>
2223 #include <linux/pci.h>
2324 #include <linux/pci_ids.h>
24−#include <linux/platform_device.h>
2525 #include <linux/slab.h>
2626 #include <linux/dmi.h>
2727 #include <linux/suspend.h>
@@ -77,8 +77,9 @@ static int register_count; · 49 unmodified lines
7777 static DEFINE_MUTEX(register_count_mutex);
7878 static DEFINE_MUTEX(video_list_lock);
7979 static LIST_HEAD(video_bus_head);
80−static int acpi_video_bus_probe(struct platform_device *pdev);
81−static void acpi_video_bus_remove(struct platform_device *pdev);
80+static int acpi_video_bus_probe(struct auxiliary_device *aux_dev,
81+ const struct auxiliary_device_id *id);
82+static void acpi_video_bus_remove(struct auxiliary_device *aux);
8283 static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data);
8384
8485 /*
@@ -93,19 +94,16 @@ enum acpi_video_level_idx { · 8 unmodified lines
9394 ACPI_VIDEO_FIRST_LEVEL, /* actual supported levels begin here */
9495 };
9596
96−static const struct acpi_device_id video_device_ids[] = {
97− {ACPI_VIDEO_HID, 0},
98− {"", 0},
97+static const struct auxiliary_device_id video_bus_auxiliary_id_table[] = {
98+ { .name = "acpi.video_bus" },
99+ {},
99100 };
100−MODULE_DEVICE_TABLE(acpi, video_device_ids);
101+MODULE_DEVICE_TABLE(auxiliary, video_bus_auxiliary_id_table);
101102
102−static struct platform_driver acpi_video_bus = {
103+static struct auxiliary_driver acpi_video_bus = {
103104 .probe = acpi_video_bus_probe,
104105 .remove = acpi_video_bus_remove,
105− .driver = {
106− .name = "acpi-video",
107− .acpi_match_table = video_device_ids,
108− },
106+ .id_table = video_bus_auxiliary_id_table,
109107 };
110108
111109 struct acpi_video_bus_flags {
@@ -1885,7 +1883,7 @@ static void acpi_video_dev_add_notify_handler(struct acpi_video_device *device) · 1773 unmodified lines
18851883 }
18861884
18871885 static int acpi_video_bus_add_notify_handler(struct acpi_video_bus *video,
1888− struct platform_device *pdev)
1886+ struct device *parent)
18891887 {
18901888 struct input_dev *input;
18911889 struct acpi_video_device *dev;
@@ -1908,7 +1906,7 @@ static int acpi_video_bus_add_notify_handler(struct acpi_video_bus *video, · 16 unmodified lines
19081906 input->phys = video->phys;
19091907 input->id.bustype = BUS_HOST;
19101908 input->id.product = 0x06;
1911− input->dev.parent = &pdev->dev;
1909+ input->dev.parent = parent;
19121910 input->evbit[0] = BIT(EV_KEY);
19131911 set_bit(KEY_SWITCHVIDEOMODE, input->keybit);
19141912 set_bit(KEY_VIDEO_NEXT, input->keybit);
@@ -1980,9 +1978,10 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) · 65 unmodified lines
19801978
19811979 static int instance;
19821980
1983−static int acpi_video_bus_probe(struct platform_device *pdev)
1981+static int acpi_video_bus_probe(struct auxiliary_device *aux_dev,
1982+ const struct auxiliary_device_id *id_unused)
19841983 {
1985− struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
1984+ struct acpi_device *device = ACPI_COMPANION(&aux_dev->dev);
19861985 struct acpi_video_bus *video;
19871986 bool auto_detect;
19881987 int error;
@@ -2019,7 +2018,7 @@ static int acpi_video_bus_probe(struct platform_device *pdev) · 30 unmodified lines
20192018 instance++;
20202019 }
20212020
2022− platform_set_drvdata(pdev, video);
2021+ auxiliary_set_drvdata(aux_dev, video);
20232022
20242023 video->device = device;
20252024 strscpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
@@ -2068,7 +2067,7 @@ static int acpi_video_bus_probe(struct platform_device *pdev) · 42 unmodified lines
20682067 !auto_detect)
20692068 acpi_video_bus_register_backlight(video);
20702069
2071− error = acpi_video_bus_add_notify_handler(video, pdev);
2070+ error = acpi_video_bus_add_notify_handler(video, &aux_dev->dev);
20722071 if (error)
20732072 goto err_del;
20742073
@@ -2096,10 +2095,10 @@ err_free_video: · 21 unmodified lines
20962095 return error;
20972096 }
20982097
2099−static void acpi_video_bus_remove(struct platform_device *pdev)
2098+static void acpi_video_bus_remove(struct auxiliary_device *aux_dev)
21002099 {
2101− struct acpi_video_bus *video = platform_get_drvdata(pdev);
2102− struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
2100+ struct acpi_video_bus *video = auxiliary_get_drvdata(aux_dev);
2101+ struct acpi_device *device = ACPI_COMPANION(&aux_dev->dev);
21032102
21042103 acpi_dev_remove_notify_handler(device, ACPI_DEVICE_NOTIFY,
21052104 acpi_video_bus_notify);
@@ -2163,7 +2162,7 @@ int acpi_video_register(void) · 57 unmodified lines
21632162
21642163 dmi_check_system(video_dmi_table);
21652164
2166− ret = platform_driver_register(&acpi_video_bus);
2165+ ret = auxiliary_driver_register(&acpi_video_bus);
21672166 if (ret)
21682167 goto leave;
21692168
@@ -2183,7 +2182,7 @@ void acpi_video_unregister(void) · 13 unmodified lines
21832182 {
21842183 mutex_lock(&register_count_mutex);
21852184 if (register_count) {
2186− platform_driver_unregister(&acpi_video_bus);
2185+ auxiliary_driver_unregister(&acpi_video_bus);
21872186 register_count = 0;
21882187 may_report_brightness_keys = false;
21892188 }
drivers/acpi/acpica/acpredef.h+1−1
@@ -451,7 +451,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { · 450 unmodified lines
451451
452452 {{"_DSM",
453453 METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
454− ACPI_TYPE_ANY | ACPI_TYPE_PACKAGE) |
454+ ACPI_TYPE_PACKAGE | ACPI_TYPE_ANY) |
455455 ARG_COUNT_IS_MINIMUM,
456456 METHOD_RETURNS(ACPI_RTYPE_ALL)}}, /* Must return a value, but it can be of any type */
457457
drivers/acpi/bus.c+0−3
@@ -818,9 +818,6 @@ const struct acpi_device *acpi_companion_match(const struct device *dev) · 817 unmodified lines
818818 if (list_empty(&adev->pnp.ids))
819819 return NULL;
820820
821− if (adev->pnp.type.backlight)
822− return adev;
823−
824821 return acpi_primary_dev_companion(adev, dev);
825822 }
826823
drivers/acpi/ec.c+2−0
@@ -1656,6 +1656,8 @@ static int acpi_ec_setup(struct acpi_ec *ec, struct acpi_device *device, bool ca · 1655 unmodified lines
16561656
16571657 ret = ec_install_handlers(ec, device, call_reg);
16581658 if (ret) {
1659+ ec_remove_handlers(ec);
1660+
16591661 if (ec == first_ec)
16601662 first_ec = NULL;
16611663
drivers/acpi/osl.c+1−1
@@ -1681,7 +1681,7 @@ acpi_status __init acpi_os_initialize(void) · 1680 unmodified lines
16811681 * Use acpi_os_map_generic_address to pre-map the reset
16821682 * register if it's in system memory.
16831683 */
1684− void *rv;
1684+ void __iomem *rv;
16851685
16861686 rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
16871687 pr_debug("%s: Reset register mapping %s\n", __func__,
drivers/acpi/riscv/rimt.c+7−0
@@ -263,6 +263,13 @@ static int rimt_iommu_xlate(struct device *dev, struct acpi_rimt_node *node, u32 · 262 unmodified lines
263263 if (!rimt_fwnode)
264264 return -EPROBE_DEFER;
265265
266+ /*
267+ * EPROBE_DEFER ensures IOMMU is probed before the devices that
268+ * depend on them. During shutdown, however, the IOMMU may be removed
269+ * first, leading to issues. To avoid this, a device link is added
270+ * which enforces the correct removal order.
271+ */
272+ device_link_add(dev, rimt_fwnode->dev, DL_FLAG_AUTOREMOVE_CONSUMER);
266273 return acpi_iommu_fwspec_init(dev, deviceid, rimt_fwnode);
267274 }
268275
drivers/acpi/scan.c+45−0
@@ -6,6 +6,7 @@ · 5 unmodified lines
66 #define pr_fmt(fmt) "ACPI: " fmt
77
88 #include <linux/async.h>
9+#include <linux/auxiliary_bus.h>
910 #include <linux/module.h>
1011 #include <linux/init.h>
1112 #include <linux/slab.h>
@@ -2192,6 +2193,44 @@ static acpi_status acpi_bus_check_add_2(acpi_handle handle, u32 lvl_not_used, · 2180 unmodified lines
21922193 return acpi_bus_check_add(handle, false, (struct acpi_device **)ret_p);
21932194 }
21942195
2196+static void acpi_video_bus_device_release(struct device *dev)
2197+{
2198+ struct auxiliary_device *aux_dev = to_auxiliary_dev(dev);
2199+
2200+ kfree(aux_dev);
2201+}
2202+
2203+static void acpi_create_video_bus_device(struct acpi_device *adev,
2204+ struct acpi_device *parent)
2205+{
2206+ struct auxiliary_device *aux_dev;
2207+ static unsigned int aux_dev_id;
2208+
2209+ aux_dev = kzalloc_obj(*aux_dev);
2210+ if (!aux_dev)
2211+ return;
2212+
2213+ aux_dev->id = aux_dev_id++;
2214+ aux_dev->name = "video_bus";
2215+ aux_dev->dev.parent = acpi_get_first_physical_node(parent);
2216+ if (!aux_dev->dev.parent)
2217+ goto err;
2218+
2219+ aux_dev->dev.release = acpi_video_bus_device_release;
2220+
2221+ if (auxiliary_device_init(aux_dev))
2222+ goto err;
2223+
2224+ ACPI_COMPANION_SET(&aux_dev->dev, adev);
2225+ if (__auxiliary_device_add(aux_dev, "acpi"))
2226+ auxiliary_device_uninit(aux_dev);
2227+
2228+ return;
2229+
2230+err:
2231+ kfree(aux_dev);
2232+}
2233+
21952234 struct acpi_scan_system_dev {
21962235 struct list_head node;
21972236 struct acpi_device *adev;
@@ -2229,6 +2268,12 @@ static void acpi_default_enumeration(struct acpi_device *device) · 31 unmodified lines
22292268 sd->adev = device;
22302269 list_add_tail(&sd->node, &acpi_scan_system_dev_list);
22312270 }
2271+ } else if (device->pnp.type.backlight) {
2272+ struct acpi_device *parent;
2273+
2274+ parent = acpi_dev_parent(device);
2275+ if (parent)
2276+ acpi_create_video_bus_device(device, parent);
22322277 } else {
22332278 /* For a regular device object, create a platform device. */
22342279 acpi_create_platform_device(device, NULL);
drivers/android/binder/page_range.rs+66−20
@@ -13,6 +13,8 @@ · 12 unmodified lines
1313 //
1414 // The shrinker will use trylock methods because it locks them in a different order.
1515
16+use crate::AssertSync;
17+
1618 use core::{
1719 marker::PhantomPinned,
1820 mem::{size_of, size_of_val, MaybeUninit},
@@ -142,6 +144,30 @@ pub(crate) struct ShrinkablePageRange { · 123 unmodified lines
142144 _pin: PhantomPinned,
143145 }
144146
147+// We do not define any ops. For now, used only to check identity of vmas.
148+static BINDER_VM_OPS: AssertSync<bindings::vm_operations_struct> = AssertSync(pin_init::zeroed());
149+
150+// To ensure that we do not accidentally install pages into or zap pages from the wrong vma, we
151+// check its vm_ops and private data before using it.
152+fn check_vma(vma: &virt::VmaRef, owner: *const ShrinkablePageRange) -> Option<&virt::VmaMixedMap> {
153+ // SAFETY: Just reading the vm_ops pointer of any active vma is safe.
154+ let vm_ops = unsafe { (*vma.as_ptr()).vm_ops };
155+ if !ptr::eq(vm_ops, &BINDER_VM_OPS.0) {
156+ return None;
157+ }
158+
159+ // SAFETY: Reading the vm_private_data pointer of a binder-owned vma is safe.
160+ let vm_private_data = unsafe { (*vma.as_ptr()).vm_private_data };
161+ // The ShrinkablePageRange is only dropped when the Process is dropped, which only happens once
162+ // the file's ->release handler is invoked, which means the ShrinkablePageRange outlives any
163+ // VMA associated with it, so there can't be any false positives due to pointer reuse here.
164+ if !ptr::eq(vm_private_data, owner.cast()) {
165+ return None;
166+ }
167+
168+ vma.as_mixedmap_vma()
169+}
170+
145171 struct Inner {
146172 /// Array of pages.
147173 ///
@@ -308,6 +334,18 @@ impl ShrinkablePageRange { · 160 unmodified lines
308334 inner.size = num_pages;
309335 inner.vma_addr = vma.start();
310336
337+ // This pointer is only used for comparison - it's not dereferenced.
338+ //
339+ // SAFETY: We own the vma, and we don't use any methods on VmaNew that rely on
340+ // `vm_private_data`.
341+ unsafe {
342+ (*vma.as_ptr()).vm_private_data = ptr::from_ref(self).cast_mut().cast::<c_void>()
343+ };
344+
345+ // SAFETY: We own the vma, and we don't use any methods on VmaNew that rely on
346+ // `vm_ops`.
347+ unsafe { (*vma.as_ptr()).vm_ops = &BINDER_VM_OPS.0 };
348+
311349 Ok(num_pages)
312350 }
313351
@@ -399,22 +437,25 @@ impl ShrinkablePageRange { · 85 unmodified lines
399437 //
400438 // Using `mmput_async` avoids this, because then the `mm` cleanup is instead queued to a
401439 // workqueue.
402− MmWithUser::into_mmput_async(self.mm.mmget_not_zero().ok_or(ESRCH)?)
403− .mmap_read_lock()
404− .vma_lookup(vma_addr)
405− .ok_or(ESRCH)?
406− .as_mixedmap_vma()
407− .ok_or(ESRCH)?
408− .vm_insert_page(user_page_addr, &new_page)
409− .inspect_err(|err| {
410− pr_warn!(
411− "Failed to vm_insert_page({}): vma_addr:{} i:{} err:{:?}",
412− user_page_addr,
413− vma_addr,
414− i,
415− err
416− )
417− })?;
440+ let mm = MmWithUser::into_mmput_async(self.mm.mmget_not_zero().ok_or(ESRCH)?);
441+ {
442+ let vma_read;
443+ let mmap_read;
444+ let vma = if let Some(ret) = mm.lock_vma_under_rcu(vma_addr) {
445+ vma_read = ret;
446+ check_vma(&vma_read, self)
447+ } else {
448+ mmap_read = mm.mmap_read_lock();
449+ mmap_read
450+ .vma_lookup(vma_addr)
451+ .and_then(|vma| check_vma(vma, self))
452+ };
453+
454+ match vma {
455+ Some(vma) => vma.vm_insert_page(user_page_addr, &new_page)?,
456+ None => return Err(ESRCH),
457+ }
458+ }
418459
419460 let inner = self.lock.lock();
420461
@@ -667,12 +708,15 @@ unsafe extern "C" fn rust_shrink_free_page( · 246 unmodified lines
667708 let mmap_read;
668709 let mm_mutex;
669710 let vma_addr;
711+ let range_ptr;
670712
671713 {
672714 // CAST: The `list_head` field is first in `PageInfo`.
673715 let info = item as *mut PageInfo;
674716 // SAFETY: The `range` field of `PageInfo` is immutable.
675− let range = unsafe { &*((*info).range) };
717+ range_ptr = unsafe { (*info).range };
718+ // SAFETY: The `range` outlives its `PageInfo` values.
719+ let range = unsafe { &*range_ptr };
676720
677721 mm = match range.mm.mmget_not_zero() {
678722 Some(mm) => MmWithUser::into_mmput_async(mm),
@@ -717,9 +761,11 @@ unsafe extern "C" fn rust_shrink_free_page( · 38 unmodified lines
717761 // SAFETY: The lru lock is locked when this method is called.
718762 unsafe { bindings::spin_unlock(&raw mut (*lru).lock) };
719763
720− if let Some(vma) = mmap_read.vma_lookup(vma_addr) {
721− let user_page_addr = vma_addr + (page_index << PAGE_SHIFT);
722− vma.zap_page_range_single(user_page_addr, PAGE_SIZE);
764+ if let Some(unchecked_vma) = mmap_read.vma_lookup(vma_addr) {
765+ if let Some(vma) = check_vma(unchecked_vma, range_ptr) {
766+ let user_page_addr = vma_addr + (page_index << PAGE_SHIFT);
767+ vma.zap_page_range_single(user_page_addr, PAGE_SIZE);
768+ }
723769 }
724770
725771 drop(mmap_read);
drivers/android/binder/process.rs+2−1
@@ -1295,7 +1295,8 @@ impl Process { · 1294 unmodified lines
12951295 }
12961296
12971297 pub(crate) fn dead_binder_done(&self, cookie: u64, thread: &Thread) {
1298− if let Some(death) = self.inner.lock().pull_delivered_death(cookie) {
1298+ let death = self.inner.lock().pull_delivered_death(cookie);
1299+ if let Some(death) = death {
12991300 death.set_notification_done(thread);
13001301 }
13011302 }
drivers/android/binder/range_alloc/array.rs+33−2
@@ -118,7 +118,7 @@ impl<T> ArrayRangeAllocator<T> { · 117 unmodified lines
118118 size: usize,
119119 is_oneway: bool,
120120 pid: Pid,
121− ) -> Result<usize> {
121+ ) -> Result<(usize, bool)> {
122122 // Compute new value of free_oneway_space, which is set only on success.
123123 let new_oneway_space = if is_oneway {
124124 match self.free_oneway_space.checked_sub(size) {
@@ -146,7 +146,38 @@ impl<T> ArrayRangeAllocator<T> { · 21 unmodified lines
146146 .ok()
147147 .unwrap();
148148
149− Ok(insert_at_offset)
149+ // Start detecting spammers once we have less than 20%
150+ // of async space left (which is less than 10% of total
151+ // buffer size).
152+ //
153+ // (This will short-circuit, so `low_oneway_space` is
154+ // only called when necessary.)
155+ let oneway_spam_detected =
156+ is_oneway && new_oneway_space < self.size / 10 && self.low_oneway_space(pid);
157+
158+ Ok((insert_at_offset, oneway_spam_detected))
159+ }
160+
161+ /// Find the amount and size of buffers allocated by the current caller.
162+ ///
163+ /// The idea is that once we cross the threshold, whoever is responsible
164+ /// for the low async space is likely to try to send another async transaction,
165+ /// and at some point we'll catch them in the act. This is more efficient
166+ /// than keeping a map per pid.
167+ fn low_oneway_space(&self, calling_pid: Pid) -> bool {
168+ let mut total_alloc_size = 0;
169+ let mut num_buffers = 0;
170+
171+ // Warn if this pid has more than 50 transactions, or more than 50% of
172+ // async space (which is 25% of total buffer size). Oneway spam is only
173+ // detected when the threshold is exceeded.
174+ for range in &self.ranges {
175+ if range.state.is_oneway() && range.state.pid() == calling_pid {
176+ total_alloc_size += range.size;
177+ num_buffers += 1;
178+ }
179+ }
180+ num_buffers > 50 || total_alloc_size > self.size / 4
150181 }
151182
152183 pub(crate) fn reservation_abort(&mut self, offset: usize) -> Result<FreedRange> {
drivers/android/binder/range_alloc/mod.rs+2−2
@@ -188,11 +188,11 @@ impl<T> RangeAllocator<T> { · 187 unmodified lines
188188 self.reserve_new(args)
189189 }
190190 Impl::Array(array) => {
191− let offset =
191+ let (offset, oneway_spam_detected) =
192192 array.reserve_new(args.debug_id, args.size, args.is_oneway, args.pid)?;
193193 Ok(ReserveNew::Success(ReserveNewSuccess {
194194 offset,
195− oneway_spam_detected: false,
195+ oneway_spam_detected,
196196 _empty_array_alloc: args.empty_array_alloc,
197197 _new_tree_alloc: args.new_tree_alloc,
198198 _tree_alloc: args.tree_alloc,
drivers/android/binder/range_alloc/tree.rs+9−9
@@ -164,15 +164,6 @@ impl<T> TreeRangeAllocator<T> { · 163 unmodified lines
164164 self.free_oneway_space
165165 };
166166
167− // Start detecting spammers once we have less than 20%
168− // of async space left (which is less than 10% of total
169− // buffer size).
170− //
171− // (This will short-circut, so `low_oneway_space` is
172− // only called when necessary.)
173− let oneway_spam_detected =
174− is_oneway && new_oneway_space < self.size / 10 && self.low_oneway_space(pid);
175−
176167 let (found_size, found_off, tree_node, free_tree_node) = match self.find_best_match(size) {
177168 None => {
178169 pr_warn!("ENOSPC from range_alloc.reserve_new - size: {}", size);
@@ -203,6 +194,15 @@ impl<T> TreeRangeAllocator<T> { · 24 unmodified lines
203194 self.free_tree.insert(free_tree_node);
204195 }
205196
197+ // Start detecting spammers once we have less than 20%
198+ // of async space left (which is less than 10% of total
199+ // buffer size).
200+ //
201+ // (This will short-circuit, so `low_oneway_space` is
202+ // only called when necessary.)
203+ let oneway_spam_detected =
204+ is_oneway && new_oneway_space < self.size / 10 && self.low_oneway_space(pid);
205+
206206 Ok((found_off, oneway_spam_detected))
207207 }
208208
drivers/android/binder/rust_binder_main.rs+1−1
@@ -306,7 +306,7 @@ impl kernel::Module for BinderModule { · 305 unmodified lines
306306 /// Makes the inner type Sync.
307307 #[repr(transparent)]
308308 pub struct AssertSync<T>(T);
309−// SAFETY: Used only to insert `file_operations` into a global, which is safe.
309+// SAFETY: Used only to insert C bindings types into globals, which is safe.
310310 unsafe impl<T> Sync for AssertSync<T> {}
311311
312312 /// File operations that rust_binderfs.c can use.
drivers/android/binder/thread.rs+6−11
@@ -1015,12 +1015,9 @@ impl Thread { · 1014 unmodified lines
10151015
10161016 // Copy offsets if there are any.
10171017 if offsets_size > 0 {
1018− {
1019− let mut reader =
1020− UserSlice::new(UserPtr::from_addr(trd_data_ptr.offsets as _), offsets_size)
1021− .reader();
1022− alloc.copy_into(&mut reader, aligned_data_size, offsets_size)?;
1023− }
1018+ let mut offsets_reader =
1019+ UserSlice::new(UserPtr::from_addr(trd_data_ptr.offsets as _), offsets_size)
1020+ .reader();
10241021
10251022 let offsets_start = aligned_data_size;
10261023 let offsets_end = aligned_data_size + offsets_size;
@@ -1041,11 +1038,9 @@ impl Thread { · 14 unmodified lines
10411038 .step_by(size_of::<u64>())
10421039 .enumerate()
10431040 {
1044− let offset: usize = view
1045− .alloc
1046− .read::<u64>(index_offset)?
1047− .try_into()
1048− .map_err(|_| EINVAL)?;
1041+ let offset = offsets_reader.read::<u64>()?;
1042+ view.alloc.write(index_offset, &offset)?;
1043+ let offset: usize = offset.try_into().map_err(|_| EINVAL)?;
10491044
10501045 if offset < end_of_previous_object || !is_aligned(offset, size_of::<u32>()) {
10511046 pr_warn!("Got transaction with invalid offset.");
drivers/ata/libata-core.c+3−0
@@ -4188,6 +4188,9 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = { · 4187 unmodified lines
41884188 { "ST3320[68]13AS", "SD1[5-9]", ATA_QUIRK_NONCQ |
41894189 ATA_QUIRK_FIRMWARE_WARN },
41904190
4191+ /* ADATA devices with LPM issues. */
4192+ { "ADATA SU680", NULL, ATA_QUIRK_NOLPM },
4193+
41914194 /* Seagate disks with LPM issues */
41924195 { "ST1000DM010-2EP102", NULL, ATA_QUIRK_NOLPM },
41934196 { "ST2000DM008-2FR102", NULL, ATA_QUIRK_NOLPM },
drivers/ata/libata-scsi.c+1−1
@@ -3600,7 +3600,7 @@ static unsigned int ata_scsiop_maint_in(struct ata_device *dev, · 3599 unmodified lines
36003600
36013601 if (cdb[2] != 1 && cdb[2] != 3) {
36023602 ata_dev_warn(dev, "invalid command format %d\n", cdb[2]);
3603− ata_scsi_set_invalid_field(dev, cmd, 1, 0xff);
3603+ ata_scsi_set_invalid_field(dev, cmd, 2, 0xff);
36043604 return 0;
36053605 }
36063606
drivers/auxdisplay/lcd2s.c+12−3
@@ -99,8 +99,13 @@ static int lcd2s_print(struct charlcd *lcd, int c) · 98 unmodified lines
9999 {
100100 struct lcd2s_data *lcd2s = lcd->drvdata;
101101 u8 buf[2] = { LCD2S_CMD_WRITE, c };
102+ int ret;
102103
103− lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
104+ ret = lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
105+ if (ret < 0)
106+ return ret;
107+ if (ret != sizeof(buf))
108+ return -EIO;
104109 return 0;
105110 }
106111
@@ -108,9 +113,13 @@ static int lcd2s_gotoxy(struct charlcd *lcd, unsigned int x, unsigned int y) · 1 unmodified line
108113 {
109114 struct lcd2s_data *lcd2s = lcd->drvdata;
110115 u8 buf[3] = { LCD2S_CMD_CUR_POS, y + 1, x + 1 };
116+ int ret;
111117
112− lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
113−
118+ ret = lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
119+ if (ret < 0)
120+ return ret;
121+ if (ret != sizeof(buf))
122+ return -EIO;
114123 return 0;
115124 }
116125
drivers/auxdisplay/line-display.c+1−1
@@ -365,7 +365,7 @@ static DEFINE_IDA(linedisp_id); · 364 unmodified lines
365365
366366 static void linedisp_release(struct device *dev)
367367 {
368− struct linedisp *linedisp = to_linedisp(dev);
368+ struct linedisp *linedisp = container_of(dev, struct linedisp, dev);
369369
370370 kfree(linedisp->map);
371371 kfree(linedisp->message);
drivers/base/bus.c+42−1
@@ -504,6 +504,36 @@ int bus_for_each_drv(const struct bus_type *bus, struct device_driver *start, · 503 unmodified lines
504504 }
505505 EXPORT_SYMBOL_GPL(bus_for_each_drv);
506506
507+static ssize_t driver_override_store(struct device *dev,
508+ struct device_attribute *attr,
509+ const char *buf, size_t count)
510+{
511+ int ret;
512+
513+ ret = __device_set_driver_override(dev, buf, count);
514+ if (ret)
515+ return ret;
516+
517+ return count;
518+}
519+
520+static ssize_t driver_override_show(struct device *dev,
521+ struct device_attribute *attr, char *buf)
522+{
523+ guard(spinlock)(&dev->driver_override.lock);
524+ return sysfs_emit(buf, "%s\n", dev->driver_override.name);
525+}
526+static DEVICE_ATTR_RW(driver_override);
527+
528+static struct attribute *driver_override_dev_attrs[] = {
529+ &dev_attr_driver_override.attr,
530+ NULL,
531+};
532+
533+static const struct attribute_group driver_override_dev_group = {
534+ .attrs = driver_override_dev_attrs,
535+};
536+
507537 /**
508538 * bus_add_device - add device to bus
509539 * @dev: device being added
@@ -537,9 +567,15 @@ int bus_add_device(struct device *dev) · 27 unmodified lines
537567 if (error)
538568 goto out_put;
539569
570+ if (dev->bus->driver_override) {
571+ error = device_add_group(dev, &driver_override_dev_group);
572+ if (error)
573+ goto out_groups;
574+ }
575+
540576 error = sysfs_create_link(&sp->devices_kset->kobj, &dev->kobj, dev_name(dev));
541577 if (error)
542− goto out_groups;
578+ goto out_override;
543579
544580 error = sysfs_create_link(&dev->kobj, &sp->subsys.kobj, "subsystem");
545581 if (error)
@@ -550,6 +586,9 @@ int bus_add_device(struct device *dev) · 4 unmodified lines
550586
551587 out_subsys:
552588 sysfs_remove_link(&sp->devices_kset->kobj, dev_name(dev));
589+out_override:
590+ if (dev->bus->driver_override)
591+ device_remove_group(dev, &driver_override_dev_group);
553592 out_groups:
554593 device_remove_groups(dev, sp->bus->dev_groups);
555594 out_put:
@@ -607,6 +646,8 @@ void bus_remove_device(struct device *dev) · 51 unmodified lines
607646
608647 sysfs_remove_link(&dev->kobj, "subsystem");
609648 sysfs_remove_link(&sp->devices_kset->kobj, dev_name(dev));
649+ if (dev->bus->driver_override)
650+ device_remove_group(dev, &driver_override_dev_group);
610651 device_remove_groups(dev, dev->bus->dev_groups);
611652 if (klist_node_attached(&dev->p->knode_bus))
612653 klist_del(&dev->p->knode_bus);
drivers/base/core.c+2−0
@@ -2556,6 +2556,7 @@ static void device_release(struct kobject *kobj) · 2555 unmodified lines
25562556 devres_release_all(dev);
25572557
25582558 kfree(dev->dma_range_map);
2559+ kfree(dev->driver_override.name);
25592560
25602561 if (dev->release)
25612562 dev->release(dev);
@@ -3159,6 +3160,7 @@ void device_initialize(struct device *dev) · 597 unmodified lines
31593160 kobject_init(&dev->kobj, &device_ktype);
31603161 INIT_LIST_HEAD(&dev->dma_pools);
31613162 mutex_init(&dev->mutex);
3163+ spin_lock_init(&dev->driver_override.lock);
31623164 lockdep_set_novalidate_class(&dev->mutex);
31633165 spin_lock_init(&dev->devres_lock);
31643166 INIT_LIST_HEAD(&dev->devres_head);
drivers/base/dd.c+60−0
@@ -381,6 +381,66 @@ static void __exit deferred_probe_exit(void) · 380 unmodified lines
381381 }
382382 __exitcall(deferred_probe_exit);
383383
384+int __device_set_driver_override(struct device *dev, const char *s, size_t len)
385+{
386+ const char *new, *old;
387+ char *cp;
388+
389+ if (!s)
390+ return -EINVAL;
391+
392+ /*
393+ * The stored value will be used in sysfs show callback (sysfs_emit()),
394+ * which has a length limit of PAGE_SIZE and adds a trailing newline.
395+ * Thus we can store one character less to avoid truncation during sysfs
396+ * show.
397+ */
398+ if (len >= (PAGE_SIZE - 1))
399+ return -EINVAL;
400+
401+ /*
402+ * Compute the real length of the string in case userspace sends us a
403+ * bunch of \0 characters like python likes to do.
404+ */
405+ len = strlen(s);
406+
407+ if (!len) {
408+ /* Empty string passed - clear override */
409+ spin_lock(&dev->driver_override.lock);
410+ old = dev->driver_override.name;
411+ dev->driver_override.name = NULL;
412+ spin_unlock(&dev->driver_override.lock);
413+ kfree(old);
414+
415+ return 0;
416+ }
417+
418+ cp = strnchr(s, len, '\n');
419+ if (cp)
420+ len = cp - s;
421+
422+ new = kstrndup(s, len, GFP_KERNEL);
423+ if (!new)
424+ return -ENOMEM;
425+
426+ spin_lock(&dev->driver_override.lock);
427+ old = dev->driver_override.name;
428+ if (cp != s) {
429+ dev->driver_override.name = new;
430+ spin_unlock(&dev->driver_override.lock);
431+ } else {
432+ /* "\n" passed - clear override */
433+ dev->driver_override.name = NULL;
434+ spin_unlock(&dev->driver_override.lock);
435+
436+ kfree(new);
437+ }
438+ kfree(old);
439+
440+ return 0;
441+}
442+EXPORT_SYMBOL_GPL(__device_set_driver_override);
443+
384444 /**
385445 * device_is_bound() - Check if device is bound to a driver
386446 * @dev: device to check
drivers/base/node.c+5−0
@@ -523,6 +523,8 @@ static ssize_t node_read_meminfo(struct device *dev, · 522 unmodified lines
523523 #ifdef CONFIG_UNACCEPTED_MEMORY
524524 "Node %d Unaccepted: %8lu kB\n"
525525 #endif
526+ "Node %d GPUActive: %8lu kB\n"
527+ "Node %d GPUReclaim: %8lu kB\n"
526528 ,
527529 nid, K(node_page_state(pgdat, NR_FILE_DIRTY)),
528530 nid, K(node_page_state(pgdat, NR_WRITEBACK)),
@@ -556,6 +558,9 @@ static ssize_t node_read_meminfo(struct device *dev, · 27 unmodified lines
556558 ,
557559 nid, K(sum_zone_node_page_state(nid, NR_UNACCEPTED))
558560 #endif
561+ ,
562+ nid, K(node_page_state(pgdat, NR_GPU_ACTIVE)),
563+ nid, K(node_page_state(pgdat, NR_GPU_RECLAIM))
559564 );
560565 len += hugetlb_report_node_meminfo(buf, len, nid);
561566 return len;
drivers/base/platform.c+5−32
@@ -603,7 +603,6 @@ static void platform_device_release(struct device *dev) · 602 unmodified lines
603603 kfree(pa->pdev.dev.platform_data);
604604 kfree(pa->pdev.mfd_cell);
605605 kfree(pa->pdev.resource);
606− kfree(pa->pdev.driver_override);
607606 kfree(pa);
608607 }
609608
@@ -1306,38 +1305,9 @@ static ssize_t numa_node_show(struct device *dev, · 696 unmodified lines
13061305 }
13071306 static DEVICE_ATTR_RO(numa_node);
13081307
1309−static ssize_t driver_override_show(struct device *dev,
1310− struct device_attribute *attr, char *buf)
1311−{
1312− struct platform_device *pdev = to_platform_device(dev);
1313− ssize_t len;
1314−
1315− device_lock(dev);
1316− len = sysfs_emit(buf, "%s\n", pdev->driver_override);
1317− device_unlock(dev);
1318−
1319− return len;
1320−}
1321−
1322−static ssize_t driver_override_store(struct device *dev,
1323− struct device_attribute *attr,
1324− const char *buf, size_t count)
1325−{
1326− struct platform_device *pdev = to_platform_device(dev);
1327− int ret;
1328−
1329− ret = driver_set_override(dev, &pdev->driver_override, buf, count);
1330− if (ret)
1331− return ret;
1332−
1333− return count;
1334−}
1335−static DEVICE_ATTR_RW(driver_override);
1336−
13371308 static struct attribute *platform_dev_attrs[] = {
13381309 &dev_attr_modalias.attr,
13391310 &dev_attr_numa_node.attr,
1340− &dev_attr_driver_override.attr,
13411311 NULL,
13421312 };
13431313
@@ -1377,10 +1347,12 @@ static int platform_match(struct device *dev, const struct device_driver *drv) · 33 unmodified lines
13771347 {
13781348 struct platform_device *pdev = to_platform_device(dev);
13791349 struct platform_driver *pdrv = to_platform_driver(drv);
1350+ int ret;
13801351
13811352 /* When driver_override is set, only bind to the matching driver */
1382− if (pdev->driver_override)
1383− return !strcmp(pdev->driver_override, drv->name);
1353+ ret = device_match_driver_override(dev, drv);
1354+ if (ret >= 0)
1355+ return ret;
13841356
13851357 /* Attempt an OF style match first */
13861358 if (of_driver_match_device(dev, drv))
@@ -1516,6 +1488,7 @@ static const struct dev_pm_ops platform_dev_pm_ops = { · 129 unmodified lines
15161488 const struct bus_type platform_bus_type = {
15171489 .name = "platform",
15181490 .dev_groups = platform_dev_groups,
1491+ .driver_override = true,
15191492 .match = platform_match,
15201493 .uevent = platform_uevent,
15211494 .probe = platform_probe,
drivers/base/power/runtime.c+1−0
@@ -1895,6 +1895,7 @@ void pm_runtime_reinit(struct device *dev) · 1894 unmodified lines
18951895 void pm_runtime_remove(struct device *dev)
18961896 {
18971897 __pm_runtime_disable(dev, false);
1898+ flush_work(&dev->power.work);
18981899 pm_runtime_reinit(dev);
18991900 }
19001901
drivers/base/regmap/regmap.c+26−4
@@ -1545,6 +1545,7 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, · 1544 unmodified lines
15451545 unsigned int val_num)
15461546 {
15471547 void *orig_work_buf;
1548+ unsigned int selector_reg;
15481549 unsigned int win_offset;
15491550 unsigned int win_page;
15501551 bool page_chg;
@@ -1563,10 +1564,31 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, · 12 unmodified lines
15631564 return -EINVAL;
15641565 }
15651566
1566− /* It is possible to have selector register inside data window.
1567− In that case, selector register is located on every page and
1568− it needs no page switching, when accessed alone. */
1567+ /*
1568+ * Calculate the address of the selector register in the corresponding
1569+ * data window if it is located on every page.
1570+ */
1571+ page_chg = in_range(range->selector_reg, range->window_start, range->window_len);
1572+ if (page_chg)
1573+ selector_reg = range->range_min + win_page * range->window_len +
1574+ range->selector_reg - range->window_start;
1575+
1576+ /*
1577+ * It is possible to have selector register inside data window.
1578+ * In that case, selector register is located on every page and it
1579+ * needs no page switching, when accessed alone.
1580+ *
1581+ * Nevertheless we should synchronize the cache values for it.
1582+ * This can't be properly achieved if the selector register is
1583+ * the first and the only one to be read inside the data window.
1584+ * That's why we update it in that case as well.
1585+ *
1586+ * However, we specifically avoid updating it for the default page,
1587+ * when it's overlapped with the real data window, to prevent from
1588+ * infinite looping.
1589+ */
15691590 if (val_num > 1 ||
1591+ (page_chg && selector_reg != range->selector_reg) ||
15701592 range->window_start + win_offset != range->selector_reg) {
15711593 /* Use separate work_buf during page switching */
15721594 orig_work_buf = map->work_buf;
@@ -1575,7 +1597,7 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, · 2 unmodified lines
15751597 ret = _regmap_update_bits(map, range->selector_reg,
15761598 range->selector_mask,
15771599 win_page << range->selector_shift,
1578− &page_chg, false);
1600+ NULL, false);
15791601
15801602 map->work_buf = orig_work_buf;
15811603
drivers/block/ublk_drv.c+12−4
@@ -4443,7 +4443,9 @@ static int ublk_ctrl_start_dev(struct ublk_device *ub, · 4442 unmodified lines
44434443
44444444 /* Skip partition scan if disabled by user */
44454445 if (ub->dev_info.flags & UBLK_F_NO_AUTO_PART_SCAN) {
4446− clear_bit(GD_SUPPRESS_PART_SCAN, &disk->state);
4446+ /* Not clear for unprivileged daemons, see comment above */
4447+ if (!ub->unprivileged_daemons)
4448+ clear_bit(GD_SUPPRESS_PART_SCAN, &disk->state);
44474449 } else {
44484450 /* Schedule async partition scan for trusted daemons */
44494451 if (!ub->unprivileged_daemons)
@@ -5006,15 +5008,22 @@ static int ublk_ctrl_get_features(const struct ublksrv_ctrl_cmd *header) · 556 unmodified lines
50065008 return 0;
50075009 }
50085010
5009−static void ublk_ctrl_set_size(struct ublk_device *ub, const struct ublksrv_ctrl_cmd *header)
5011+static int ublk_ctrl_set_size(struct ublk_device *ub, const struct ublksrv_ctrl_cmd *header)
50105012 {
50115013 struct ublk_param_basic *p = &ub->params.basic;
50125014 u64 new_size = header->data[0];
5015+ int ret = 0;
50135016
50145017 mutex_lock(&ub->mutex);
5018+ if (!ub->ub_disk) {
5019+ ret = -ENODEV;
5020+ goto out;
5021+ }
50155022 p->dev_sectors = new_size;
50165023 set_capacity_and_notify(ub->ub_disk, p->dev_sectors);
5024+out:
50175025 mutex_unlock(&ub->mutex);
5026+ return ret;
50185027 }
50195028
50205029 struct count_busy {
@@ -5335,8 +5344,7 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd, · 314 unmodified lines
53355344 ret = ublk_ctrl_end_recovery(ub, &header);
53365345 break;
53375346 case UBLK_CMD_UPDATE_SIZE:
5338− ublk_ctrl_set_size(ub, &header);
5339− ret = 0;
5347+ ret = ublk_ctrl_set_size(ub, &header);
53405348 break;
53415349 case UBLK_CMD_QUIESCE_DEV:
53425350 ret = ublk_ctrl_quiesce_dev(ub, &header);
drivers/block/zram/zram_drv.c+24−35
@@ -549,7 +549,7 @@ static ssize_t bd_stat_show(struct device *dev, struct device_attribute *attr, · 548 unmodified lines
549549 return ret;
550550 }
551551
552−static ssize_t writeback_compressed_store(struct device *dev,
552+static ssize_t compressed_writeback_store(struct device *dev,
553553 struct device_attribute *attr,
554554 const char *buf, size_t len)
555555 {
@@ -564,12 +564,12 @@ static ssize_t writeback_compressed_store(struct device *dev, · 8 unmodified lines
564564 return -EBUSY;
565565 }
566566
567− zram->wb_compressed = val;
567+ zram->compressed_wb = val;
568568
569569 return len;
570570 }
571571
572−static ssize_t writeback_compressed_show(struct device *dev,
572+static ssize_t compressed_writeback_show(struct device *dev,
573573 struct device_attribute *attr,
574574 char *buf)
575575 {
@@ -577,7 +577,7 @@ static ssize_t writeback_compressed_show(struct device *dev, · 1 unmodified line
577577 struct zram *zram = dev_to_zram(dev);
578578
579579 guard(rwsem_read)(&zram->dev_lock);
580− val = zram->wb_compressed;
580+ val = zram->compressed_wb;
581581
582582 return sysfs_emit(buf, "%d\n", val);
583583 }
@@ -917,9 +917,8 @@ static void zram_account_writeback_submit(struct zram *zram) · 333 unmodified lines
917917
918918 static int zram_writeback_complete(struct zram *zram, struct zram_wb_req *req)
919919 {
920− u32 size, index = req->pps->index;
921− int err, prio;
922− bool huge;
920+ u32 index = req->pps->index;
921+ int err;
923922
924923 err = blk_status_to_errno(req->bio.bi_status);
925924 if (err) {
@@ -946,28 +945,13 @@ static int zram_writeback_complete(struct zram *zram, struct zram_wb_req *req) · 20 unmodified lines
946945 goto out;
947946 }
948947
949− if (zram->wb_compressed) {
950− /*
951− * ZRAM_WB slots get freed, we need to preserve data required
952− * for read decompression.
953− */
954− size = get_slot_size(zram, index);
955− prio = get_slot_comp_priority(zram, index);
956− huge = test_slot_flag(zram, index, ZRAM_HUGE);
957− }
958−
959− slot_free(zram, index);
960− set_slot_flag(zram, index, ZRAM_WB);
948+ clear_slot_flag(zram, index, ZRAM_IDLE);
949+ if (test_slot_flag(zram, index, ZRAM_HUGE))
950+ atomic64_dec(&zram->stats.huge_pages);
951+ atomic64_sub(get_slot_size(zram, index), &zram->stats.compr_data_size);
952+ zs_free(zram->mem_pool, get_slot_handle(zram, index));
961953 set_slot_handle(zram, index, req->blk_idx);
962−
963− if (zram->wb_compressed) {
964− if (huge)
965− set_slot_flag(zram, index, ZRAM_HUGE);
966− set_slot_size(zram, index, size);
967− set_slot_comp_priority(zram, index, prio);
968− }
969−
970− atomic64_inc(&zram->stats.pages_stored);
954+ set_slot_flag(zram, index, ZRAM_WB);
971955
972956 out:
973957 slot_unlock(zram, index);
@@ -1100,7 +1084,7 @@ static int zram_writeback_slots(struct zram *zram, · 126 unmodified lines
11001084 */
11011085 if (!test_slot_flag(zram, index, ZRAM_PP_SLOT))
11021086 goto next;
1103− if (zram->wb_compressed)
1087+ if (zram->compressed_wb)
11041088 err = read_from_zspool_raw(zram, req->page, index);
11051089 else
11061090 err = read_from_zspool(zram, req->page, index);
@@ -1429,7 +1413,7 @@ static void zram_async_read_endio(struct bio *bio) · 322 unmodified lines
14291413 *
14301414 * Keep the existing behavior for now.
14311415 */
1432− if (zram->wb_compressed == false) {
1416+ if (zram->compressed_wb == false) {
14331417 /* No decompression needed, complete the parent IO */
14341418 bio_endio(req->parent);
14351419 bio_put(bio);
@@ -1508,7 +1492,7 @@ static int read_from_bdev_sync(struct zram *zram, struct page *page, u32 index, · 72 unmodified lines
15081492 flush_work(&req.work);
15091493 destroy_work_on_stack(&req.work);
15101494
1511− if (req.error || zram->wb_compressed == false)
1495+ if (req.error || zram->compressed_wb == false)
15121496 return req.error;
15131497
15141498 return decompress_bdev_page(zram, page, index);
@@ -2010,8 +1994,13 @@ static void slot_free(struct zram *zram, u32 index) · 495 unmodified lines
20101994 set_slot_comp_priority(zram, index, 0);
20111995
20121996 if (test_slot_flag(zram, index, ZRAM_HUGE)) {
1997+ /*
1998+ * Writeback completion decrements ->huge_pages but keeps
1999+ * ZRAM_HUGE flag for deferred decompression path.
2000+ */
2001+ if (!test_slot_flag(zram, index, ZRAM_WB))
2002+ atomic64_dec(&zram->stats.huge_pages);
20132003 clear_slot_flag(zram, index, ZRAM_HUGE);
2014− atomic64_dec(&zram->stats.huge_pages);
20152004 }
20162005
20172006 if (test_slot_flag(zram, index, ZRAM_WB)) {
@@ -3007,7 +2996,7 @@ static DEVICE_ATTR_WO(writeback); · 989 unmodified lines
30072996 static DEVICE_ATTR_RW(writeback_limit);
30082997 static DEVICE_ATTR_RW(writeback_limit_enable);
30092998 static DEVICE_ATTR_RW(writeback_batch_size);
3010−static DEVICE_ATTR_RW(writeback_compressed);
2999+static DEVICE_ATTR_RW(compressed_writeback);
30113000 #endif
30123001 #ifdef CONFIG_ZRAM_MULTI_COMP
30133002 static DEVICE_ATTR_RW(recomp_algorithm);
@@ -3031,7 +3020,7 @@ static struct attribute *zram_disk_attrs[] = { · 17 unmodified lines
30313020 &dev_attr_writeback_limit.attr,
30323021 &dev_attr_writeback_limit_enable.attr,
30333022 &dev_attr_writeback_batch_size.attr,
3034− &dev_attr_writeback_compressed.attr,
3023+ &dev_attr_compressed_writeback.attr,
30353024 #endif
30363025 &dev_attr_io_stat.attr,
30373026 &dev_attr_mm_stat.attr,
@@ -3091,7 +3080,7 @@ static int zram_add(void) · 53 unmodified lines
30913080 init_rwsem(&zram->dev_lock);
30923081 #ifdef CONFIG_ZRAM_WRITEBACK
30933082 zram->wb_batch_size = 32;
3094− zram->wb_compressed = false;
3083+ zram->compressed_wb = false;
30953084 #endif
30963085
30973086 /* gendisk structure */
drivers/block/zram/zram_drv.h+1−1
@@ -133,7 +133,7 @@ struct zram { · 132 unmodified lines
133133 #ifdef CONFIG_ZRAM_WRITEBACK
134134 struct file *backing_dev;
135135 bool wb_limit_enable;
136− bool wb_compressed;
136+ bool compressed_wb;
137137 u32 wb_batch_size;
138138 u64 bd_wb_limit;
139139 struct block_device *bdev;
drivers/bluetooth/btintel.c+8−3
@@ -251,11 +251,13 @@ void btintel_hw_error(struct hci_dev *hdev, u8 code) · 250 unmodified lines
251251
252252 bt_dev_err(hdev, "Hardware error 0x%2.2x", code);
253253
254+ hci_req_sync_lock(hdev);
255+
254256 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
255257 if (IS_ERR(skb)) {
256258 bt_dev_err(hdev, "Reset after hardware error failed (%ld)",
257259 PTR_ERR(skb));
258− return;
260+ goto unlock;
259261 }
260262 kfree_skb(skb);
261263
@@ -263,18 +265,21 @@ void btintel_hw_error(struct hci_dev *hdev, u8 code) · 1 unmodified line
263265 if (IS_ERR(skb)) {
264266 bt_dev_err(hdev, "Retrieving Intel exception info failed (%ld)",
265267 PTR_ERR(skb));
266− return;
268+ goto unlock;
267269 }
268270
269271 if (skb->len != 13) {
270272 bt_dev_err(hdev, "Exception info size mismatch");
271273 kfree_skb(skb);
272− return;
274+ goto unlock;
273275 }
274276
275277 bt_dev_err(hdev, "Exception info %s", (char *)(skb->data + 1));
276278
277279 kfree_skb(skb);
280+
281+unlock:
282+ hci_req_sync_unlock(hdev);
278283 }
279284 EXPORT_SYMBOL_GPL(btintel_hw_error);
280285
drivers/bluetooth/btqca.c+2−0
@@ -787,6 +787,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · 786 unmodified lines
787787 */
788788 if (soc_type == QCA_WCN3988)
789789 rom_ver = ((soc_ver & 0x00000f00) >> 0x05) | (soc_ver & 0x0000000f);
790+ else if (soc_type == QCA_WCN3998)
791+ rom_ver = ((soc_ver & 0x0000f000) >> 0x07) | (soc_ver & 0x0000000f);
790792 else
791793 rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
792794
drivers/bluetooth/btusb.c+4−1
@@ -2376,8 +2376,11 @@ static void btusb_work(struct work_struct *work) · 2375 unmodified lines
23762376 if (data->air_mode == HCI_NOTIFY_ENABLE_SCO_CVSD) {
23772377 if (hdev->voice_setting & 0x0020) {
23782378 static const int alts[3] = { 2, 4, 5 };
2379+ unsigned int sco_idx;
23792380
2380− new_alts = alts[data->sco_num - 1];
2381+ sco_idx = min_t(unsigned int, data->sco_num - 1,
2382+ ARRAY_SIZE(alts) - 1);
2383+ new_alts = alts[sco_idx];
23812384 } else {
23822385 new_alts = data->sco_num;
23832386 }
drivers/bluetooth/hci_h4.c+0−3
@@ -109,9 +109,6 @@ static int h4_recv(struct hci_uart *hu, const void *data, int count) · 108 unmodified lines
109109 {
110110 struct h4_struct *h4 = hu->priv;
111111
112− if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
113− return -EUNATCH;
114−
115112 h4->rx_skb = h4_recv_buf(hu, h4->rx_skb, data, count,
116113 h4_recv_pkts, ARRAY_SIZE(h4_recv_pkts));
117114 if (IS_ERR(h4->rx_skb)) {
drivers/bluetooth/hci_ll.c+2−0
@@ -541,6 +541,8 @@ static int download_firmware(struct ll_device *lldev) · 540 unmodified lines
541541 if (err || !fw->data || !fw->size) {
542542 bt_dev_err(lldev->hu.hdev, "request_firmware failed(errno %d) for %s",
543543 err, bts_scr_name);
544+ if (!err)
545+ release_firmware(fw);
544546 return -EINVAL;
545547 }
546548 ptr = (void *)fw->data;
drivers/bus/simple-pm-bus.c+2−2
@@ -36,7 +36,7 @@ static int simple_pm_bus_probe(struct platform_device *pdev) · 35 unmodified lines
3636 * that's not listed in simple_pm_bus_of_match. We don't want to do any
3737 * of the simple-pm-bus tasks for these devices, so return early.
3838 */
39− if (pdev->driver_override)
39+ if (device_has_driver_override(&pdev->dev))
4040 return 0;
4141
4242 match = of_match_device(dev->driver->of_match_table, dev);
@@ -78,7 +78,7 @@ static void simple_pm_bus_remove(struct platform_device *pdev) · 35 unmodified lines
7878 {
7979 const void *data = of_device_get_match_data(&pdev->dev);
8080
81− if (pdev->driver_override || data)
81+ if (device_has_driver_override(&pdev->dev) || data)
8282 return;
8383
8484 dev_dbg(&pdev->dev, "%s\n", __func__);
drivers/cache/ax45mp_cache.c+2−2
@@ -178,11 +178,11 @@ static const struct of_device_id ax45mp_cache_ids[] = { · 177 unmodified lines
178178
179179 static int __init ax45mp_cache_init(void)
180180 {
181− struct device_node *np;
182181 struct resource res;
183182 int ret;
184183
185− np = of_find_matching_node(NULL, ax45mp_cache_ids);
184+ struct device_node *np __free(device_node) =
185+ of_find_matching_node(NULL, ax45mp_cache_ids);
186186 if (!of_device_is_available(np))
187187 return -ENODEV;
188188
drivers/cache/starfive_starlink_cache.c+2−2
@@ -102,11 +102,11 @@ static const struct of_device_id starlink_cache_ids[] = { · 101 unmodified lines
102102
103103 static int __init starlink_cache_init(void)
104104 {
105− struct device_node *np;
106105 u32 block_size;
107106 int ret;
108107
109− np = of_find_matching_node(NULL, starlink_cache_ids);
108+ struct device_node *np __free(device_node) =
109+ of_find_matching_node(NULL, starlink_cache_ids);
110110 if (!of_device_is_available(np))
111111 return -ENODEV;
112112
drivers/clk/imx/clk-scu.c+1−2
@@ -706,8 +706,7 @@ struct clk_hw *imx_clk_scu_alloc_dev(const char *name, · 705 unmodified lines
706706 if (ret)
707707 goto put_device;
708708
709− ret = driver_set_override(&pdev->dev, &pdev->driver_override,
710− "imx-scu-clk", strlen("imx-scu-clk"));
709+ ret = device_set_driver_override(&pdev->dev, "imx-scu-clk");
711710 if (ret)
712711 goto put_device;
713712
drivers/comedi/comedi_fops.c+5−3
@@ -793,13 +793,15 @@ static void do_become_nonbusy(struct comedi_device *dev, · 792 unmodified lines
793793 __comedi_clear_subdevice_runflags(s, COMEDI_SRF_RUNNING |
794794 COMEDI_SRF_BUSY);
795795 spin_unlock_irqrestore(&s->spin_lock, flags);
796− if (comedi_is_runflags_busy(runflags)) {
796+ if (async) {
797797 /*
798798 * "Run active" counter was set to 1 when setting up the
799799 * command. Decrement it and wait for it to become 0.
800800 */
801− comedi_put_is_subdevice_running(s);
802− wait_for_completion(&async->run_complete);
801+ if (comedi_is_runflags_busy(runflags)) {
802+ comedi_put_is_subdevice_running(s);
803+ wait_for_completion(&async->run_complete);
804+ }
803805 comedi_buf_reset(s);
804806 async->inttrig = NULL;
805807 kfree(async->cmd.chanlist);
drivers/comedi/drivers.c+8−0
@@ -1063,6 +1063,14 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) · 1062 unmodified lines
10631063 ret = -EIO;
10641064 goto out;
10651065 }
1066+ if (IS_ENABLED(CONFIG_LOCKDEP)) {
1067+ /*
1068+ * dev->spinlock is for private use by the attached low-level
1069+ * driver. Reinitialize it to stop lock-dependency tracking
1070+ * between attachments to different low-level drivers.
1071+ */
1072+ spin_lock_init(&dev->spinlock);
1073+ }
10661074 dev->driver = driv;
10671075 dev->board_name = dev->board_ptr ? *(const char **)dev->board_ptr
10681076 : dev->driver->driver_name;
drivers/comedi/drivers/dt2815.c+12−0
@@ -175,6 +175,18 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) · 174 unmodified lines
175175 ? current_range_type : voltage_range_type;
176176 }
177177
178+ /*
179+ * Check if hardware is present before attempting any I/O operations.
180+ * Reading 0xff from status register typically indicates no hardware
181+ * on the bus (floating bus reads as all 1s).
182+ */
183+ if (inb(dev->iobase + DT2815_STATUS) == 0xff) {
184+ dev_err(dev->class_dev,
185+ "No hardware detected at I/O base 0x%lx\n",
186+ dev->iobase);
187+ return -ENODEV;
188+ }
189+
178190 /* Init the 2815 */
179191 outb(0x00, dev->iobase + DT2815_STATUS);
180192 for (i = 0; i < 100; i++) {
drivers/comedi/drivers/me4000.c+12−4
@@ -315,6 +315,18 @@ static int me4000_xilinx_download(struct comedi_device *dev, · 314 unmodified lines
315315 unsigned int val;
316316 unsigned int i;
317317
318+ /* Get data stream length from header. */
319+ if (size >= 4) {
320+ file_length = (((unsigned int)data[0] & 0xff) << 24) +
321+ (((unsigned int)data[1] & 0xff) << 16) +
322+ (((unsigned int)data[2] & 0xff) << 8) +
323+ ((unsigned int)data[3] & 0xff);
324+ }
325+ if (size < 16 || file_length > size - 16) {
326+ dev_err(dev->class_dev, "Firmware length inconsistency\n");
327+ return -EINVAL;
328+ }
329+
318330 if (!xilinx_iobase)
319331 return -ENODEV;
320332
@@ -346,10 +358,6 @@ static int me4000_xilinx_download(struct comedi_device *dev, · 25 unmodified lines
346358 outl(val, devpriv->plx_regbase + PLX9052_CNTRL);
347359
348360 /* Download Xilinx firmware */
349− file_length = (((unsigned int)data[0] & 0xff) << 24) +
350− (((unsigned int)data[1] & 0xff) << 16) +
351− (((unsigned int)data[2] & 0xff) << 8) +
352− ((unsigned int)data[3] & 0xff);
353361 usleep_range(10, 1000);
354362
355363 for (i = 0; i < file_length; i++) {
drivers/comedi/drivers/me_daq.c+19−16
@@ -344,6 +344,25 @@ static int me2600_xilinx_download(struct comedi_device *dev, · 343 unmodified lines
344344 unsigned int file_length;
345345 unsigned int i;
346346
347+ /*
348+ * Format of the firmware
349+ * Build longs from the byte-wise coded header
350+ * Byte 1-3: length of the array
351+ * Byte 4-7: version
352+ * Byte 8-11: date
353+ * Byte 12-15: reserved
354+ */
355+ if (size >= 4) {
356+ file_length = (((unsigned int)data[0] & 0xff) << 24) +
357+ (((unsigned int)data[1] & 0xff) << 16) +
358+ (((unsigned int)data[2] & 0xff) << 8) +
359+ ((unsigned int)data[3] & 0xff);
360+ }
361+ if (size < 16 || file_length > size - 16) {
362+ dev_err(dev->class_dev, "Firmware length inconsistency\n");
363+ return -EINVAL;
364+ }
365+
347366 /* disable irq's on PLX */
348367 writel(0x00, devpriv->plx_regbase + PLX9052_INTCSR);
349368
@@ -357,22 +376,6 @@ static int me2600_xilinx_download(struct comedi_device *dev, · 7 unmodified lines
357376 writeb(0x00, dev->mmio + 0x0);
358377 sleep(1);
359378
360− /*
361− * Format of the firmware
362− * Build longs from the byte-wise coded header
363− * Byte 1-3: length of the array
364− * Byte 4-7: version
365− * Byte 8-11: date
366− * Byte 12-15: reserved
367− */
368− if (size < 16)
369− return -EINVAL;
370−
371− file_length = (((unsigned int)data[0] & 0xff) << 24) +
372− (((unsigned int)data[1] & 0xff) << 16) +
373− (((unsigned int)data[2] & 0xff) << 8) +
374− ((unsigned int)data[3] & 0xff);
375−
376379 /*
377380 * Loop for writing firmware byte by byte to xilinx
378381 * Firmware data start at offset 16
drivers/comedi/drivers/ni_atmio16d.c+2−1
@@ -698,7 +698,8 @@ static int atmio16d_attach(struct comedi_device *dev, · 697 unmodified lines
698698
699699 static void atmio16d_detach(struct comedi_device *dev)
700700 {
701− reset_atmio16d(dev);
701+ if (dev->private)
702+ reset_atmio16d(dev);
702703 comedi_legacy_detach(dev);
703704 }
704705
drivers/counter/rz-mtu3-cnt.c+35−32
@@ -107,9 +107,9 @@ static bool rz_mtu3_is_counter_invalid(struct counter_device *counter, int id) · 106 unmodified lines
107107 struct rz_mtu3_cnt *const priv = counter_priv(counter);
108108 unsigned long tmdr;
109109
110− pm_runtime_get_sync(priv->ch->dev);
110+ pm_runtime_get_sync(counter->parent);
111111 tmdr = rz_mtu3_shared_reg_read(priv->ch, RZ_MTU3_TMDR3);
112− pm_runtime_put(priv->ch->dev);
112+ pm_runtime_put(counter->parent);
113113
114114 if (id == RZ_MTU3_32_BIT_CH && test_bit(RZ_MTU3_TMDR3_LWA, &tmdr))
115115 return false;
@@ -165,12 +165,12 @@ static int rz_mtu3_count_read(struct counter_device *counter, · 49 unmodified lines
165165 if (ret)
166166 return ret;
167167
168− pm_runtime_get_sync(ch->dev);
168+ pm_runtime_get_sync(counter->parent);
169169 if (count->id == RZ_MTU3_32_BIT_CH)
170170 *val = rz_mtu3_32bit_ch_read(ch, RZ_MTU3_TCNTLW);
171171 else
172172 *val = rz_mtu3_16bit_ch_read(ch, RZ_MTU3_TCNT);
173− pm_runtime_put(ch->dev);
173+ pm_runtime_put(counter->parent);
174174 mutex_unlock(&priv->lock);
175175
176176 return 0;
@@ -187,26 +187,26 @@ static int rz_mtu3_count_write(struct counter_device *counter, · 10 unmodified lines
187187 if (ret)
188188 return ret;
189189
190− pm_runtime_get_sync(ch->dev);
190+ pm_runtime_get_sync(counter->parent);
191191 if (count->id == RZ_MTU3_32_BIT_CH)
192192 rz_mtu3_32bit_ch_write(ch, RZ_MTU3_TCNTLW, val);
193193 else
194194 rz_mtu3_16bit_ch_write(ch, RZ_MTU3_TCNT, val);
195− pm_runtime_put(ch->dev);
195+ pm_runtime_put(counter->parent);
196196 mutex_unlock(&priv->lock);
197197
198198 return 0;
199199 }
200200
201201 static int rz_mtu3_count_function_read_helper(struct rz_mtu3_channel *const ch,
202− struct rz_mtu3_cnt *const priv,
202+ struct counter_device *const counter,
203203 enum counter_function *function)
204204 {
205205 u8 timer_mode;
206206
207− pm_runtime_get_sync(ch->dev);
207+ pm_runtime_get_sync(counter->parent);
208208 timer_mode = rz_mtu3_8bit_ch_read(ch, RZ_MTU3_TMDR1);
209− pm_runtime_put(ch->dev);
209+ pm_runtime_put(counter->parent);
210210
211211 switch (timer_mode & RZ_MTU3_TMDR1_PH_CNT_MODE_MASK) {
212212 case RZ_MTU3_TMDR1_PH_CNT_MODE_1:
@@ -240,7 +240,7 @@ static int rz_mtu3_count_function_read(struct counter_device *counter, · 27 unmodified lines
240240 if (ret)
241241 return ret;
242242
243− ret = rz_mtu3_count_function_read_helper(ch, priv, function);
243+ ret = rz_mtu3_count_function_read_helper(ch, counter, function);
244244 mutex_unlock(&priv->lock);
245245
246246 return ret;
@@ -279,9 +279,9 @@ static int rz_mtu3_count_function_write(struct counter_device *counter, · 32 unmodified lines
279279 return -EINVAL;
280280 }
281281
282− pm_runtime_get_sync(ch->dev);
282+ pm_runtime_get_sync(counter->parent);
283283 rz_mtu3_8bit_ch_write(ch, RZ_MTU3_TMDR1, timer_mode);
284− pm_runtime_put(ch->dev);
284+ pm_runtime_put(counter->parent);
285285 mutex_unlock(&priv->lock);
286286
287287 return 0;
@@ -300,9 +300,9 @@ static int rz_mtu3_count_direction_read(struct counter_device *counter, · 12 unmodified lines
300300 if (ret)
301301 return ret;
302302
303− pm_runtime_get_sync(ch->dev);
303+ pm_runtime_get_sync(counter->parent);
304304 tsr = rz_mtu3_8bit_ch_read(ch, RZ_MTU3_TSR);
305− pm_runtime_put(ch->dev);
305+ pm_runtime_put(counter->parent);
306306
307307 *direction = (tsr & RZ_MTU3_TSR_TCFD) ?
308308 COUNTER_COUNT_DIRECTION_FORWARD : COUNTER_COUNT_DIRECTION_BACKWARD;
@@ -377,14 +377,14 @@ static int rz_mtu3_count_ceiling_write(struct counter_device *counter, · 68 unmodified lines
377377 return -EINVAL;
378378 }
379379
380− pm_runtime_get_sync(ch->dev);
380+ pm_runtime_get_sync(counter->parent);
381381 if (count->id == RZ_MTU3_32_BIT_CH)
382382 rz_mtu3_32bit_ch_write(ch, RZ_MTU3_TGRALW, ceiling);
383383 else
384384 rz_mtu3_16bit_ch_write(ch, RZ_MTU3_TGRA, ceiling);
385385
386386 rz_mtu3_8bit_ch_write(ch, RZ_MTU3_TCR, RZ_MTU3_TCR_CCLR_TGRA);
387− pm_runtime_put(ch->dev);
387+ pm_runtime_put(counter->parent);
388388 mutex_unlock(&priv->lock);
389389
390390 return 0;
@@ -495,25 +495,28 @@ static int rz_mtu3_count_enable_read(struct counter_device *counter, · 104 unmodified lines
495495 static int rz_mtu3_count_enable_write(struct counter_device *counter,
496496 struct counter_count *count, u8 enable)
497497 {
498− struct rz_mtu3_channel *const ch = rz_mtu3_get_ch(counter, count->id);
499498 struct rz_mtu3_cnt *const priv = counter_priv(counter);
500499 int ret = 0;
501500
501+ mutex_lock(&priv->lock);
502+
503+ if (priv->count_is_enabled[count->id] == enable)
504+ goto exit;
505+
502506 if (enable) {
503− mutex_lock(&priv->lock);
504− pm_runtime_get_sync(ch->dev);
507+ pm_runtime_get_sync(counter->parent);
505508 ret = rz_mtu3_initialize_counter(counter, count->id);
506509 if (ret == 0)
507510 priv->count_is_enabled[count->id] = true;
508− mutex_unlock(&priv->lock);
509511 } else {
510− mutex_lock(&priv->lock);
511512 rz_mtu3_terminate_counter(counter, count->id);
512513 priv->count_is_enabled[count->id] = false;
513− pm_runtime_put(ch->dev);
514− mutex_unlock(&priv->lock);
514+ pm_runtime_put(counter->parent);
515515 }
516516
517+exit:
518+ mutex_unlock(&priv->lock);
519+
517520 return ret;
518521 }
519522
@@ -540,9 +543,9 @@ static int rz_mtu3_cascade_counts_enable_get(struct counter_device *counter, · 20 unmodified lines
540543 if (ret)
541544 return ret;
542545
543− pm_runtime_get_sync(priv->ch->dev);
546+ pm_runtime_get_sync(counter->parent);
544547 tmdr = rz_mtu3_shared_reg_read(priv->ch, RZ_MTU3_TMDR3);
545− pm_runtime_put(priv->ch->dev);
548+ pm_runtime_put(counter->parent);
546549 *cascade_enable = test_bit(RZ_MTU3_TMDR3_LWA, &tmdr);
547550 mutex_unlock(&priv->lock);
548551
@@ -559,10 +562,10 @@ static int rz_mtu3_cascade_counts_enable_set(struct counter_device *counter, · 10 unmodified lines
559562 if (ret)
560563 return ret;
561564
562− pm_runtime_get_sync(priv->ch->dev);
565+ pm_runtime_get_sync(counter->parent);
563566 rz_mtu3_shared_reg_update_bit(priv->ch, RZ_MTU3_TMDR3,
564567 RZ_MTU3_TMDR3_LWA, cascade_enable);
565− pm_runtime_put(priv->ch->dev);
568+ pm_runtime_put(counter->parent);
566569 mutex_unlock(&priv->lock);
567570
568571 return 0;
@@ -579,9 +582,9 @@ static int rz_mtu3_ext_input_phase_clock_select_get(struct counter_device *count · 10 unmodified lines
579582 if (ret)
580583 return ret;
581584
582− pm_runtime_get_sync(priv->ch->dev);
585+ pm_runtime_get_sync(counter->parent);
583586 tmdr = rz_mtu3_shared_reg_read(priv->ch, RZ_MTU3_TMDR3);
584− pm_runtime_put(priv->ch->dev);
587+ pm_runtime_put(counter->parent);
585588 *ext_input_phase_clock_select = test_bit(RZ_MTU3_TMDR3_PHCKSEL, &tmdr);
586589 mutex_unlock(&priv->lock);
587590
@@ -598,11 +601,11 @@ static int rz_mtu3_ext_input_phase_clock_select_set(struct counter_device *count · 10 unmodified lines
598601 if (ret)
599602 return ret;
600603
601− pm_runtime_get_sync(priv->ch->dev);
604+ pm_runtime_get_sync(counter->parent);
602605 rz_mtu3_shared_reg_update_bit(priv->ch, RZ_MTU3_TMDR3,
603606 RZ_MTU3_TMDR3_PHCKSEL,
604607 ext_input_phase_clock_select);
605− pm_runtime_put(priv->ch->dev);
608+ pm_runtime_put(counter->parent);
606609 mutex_unlock(&priv->lock);
607610
608611 return 0;
@@ -640,7 +643,7 @@ static int rz_mtu3_action_read(struct counter_device *counter, · 31 unmodified lines
640643 if (ret)
641644 return ret;
642645
643− ret = rz_mtu3_count_function_read_helper(ch, priv, &function);
646+ ret = rz_mtu3_count_function_read_helper(ch, counter, &function);
644647 if (ret) {
645648 mutex_unlock(&priv->lock);
646649 return ret;
drivers/cpufreq/cpufreq.c+3−6
@@ -1427,12 +1427,9 @@ static int cpufreq_policy_online(struct cpufreq_policy *policy, · 1426 unmodified lines
14271427 * If there is a problem with its frequency table, take it
14281428 * offline and drop it.
14291429 */
1430− if (policy->freq_table_sorted != CPUFREQ_TABLE_SORTED_ASCENDING &&
1431− policy->freq_table_sorted != CPUFREQ_TABLE_SORTED_DESCENDING) {
1432− ret = cpufreq_table_validate_and_sort(policy);
1433− if (ret)
1434− goto out_offline_policy;
1435− }
1430+ ret = cpufreq_table_validate_and_sort(policy);
1431+ if (ret)
1432+ goto out_offline_policy;
14361433
14371434 /* related_cpus should at least include policy->cpus. */
14381435 cpumask_copy(policy->related_cpus, policy->cpus);
drivers/cpufreq/cpufreq_conservative.c+12−0
@@ -313,6 +313,17 @@ static void cs_start(struct cpufreq_policy *policy) · 312 unmodified lines
313313 dbs_info->requested_freq = policy->cur;
314314 }
315315
316+static void cs_limits(struct cpufreq_policy *policy)
317+{
318+ struct cs_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data);
319+
320+ /*
321+ * The limits have changed, so may have the current frequency. Reset
322+ * requested_freq to avoid any unintended outcomes due to the mismatch.
323+ */
324+ dbs_info->requested_freq = policy->cur;
325+}
326+
316327 static struct dbs_governor cs_governor = {
317328 .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"),
318329 .kobj_type = { .default_groups = cs_groups },
@@ -322,6 +333,7 @@ static struct dbs_governor cs_governor = { · 3 unmodified lines
322333 .init = cs_init,
323334 .exit = cs_exit,
324335 .start = cs_start,
336+ .limits = cs_limits,
325337 };
326338
327339 #define CPU_FREQ_GOV_CONSERVATIVE (cs_governor.gov)
drivers/cpufreq/cpufreq_governor.c+6−3
@@ -468,13 +468,13 @@ int cpufreq_dbs_governor_init(struct cpufreq_policy *policy) · 467 unmodified lines
468468 /* Failure, so roll back. */
469469 pr_err("initialization failed (dbs_data kobject init error %d)\n", ret);
470470
471− kobject_put(&dbs_data->attr_set.kobj);
472−
473471 policy->governor_data = NULL;
474472
475473 if (!have_governor_per_policy())
476474 gov->gdbs_data = NULL;
477− gov->exit(dbs_data);
475+
476+ kobject_put(&dbs_data->attr_set.kobj);
477+ goto free_policy_dbs_info;
478478
479479 free_dbs_data:
480480 kfree(dbs_data);
@@ -563,6 +563,7 @@ EXPORT_SYMBOL_GPL(cpufreq_dbs_governor_stop); · 82 unmodified lines
563563
564564 void cpufreq_dbs_governor_limits(struct cpufreq_policy *policy)
565565 {
566+ struct dbs_governor *gov = dbs_governor_of(policy);
566567 struct policy_dbs_info *policy_dbs;
567568
568569 /* Protect gov->gdbs_data against cpufreq_dbs_governor_exit() */
@@ -574,6 +575,8 @@ void cpufreq_dbs_governor_limits(struct cpufreq_policy *policy) · 5 unmodified lines
574575 mutex_lock(&policy_dbs->update_mutex);
575576 cpufreq_policy_apply_limits(policy);
576577 gov_update_sample_delay(policy_dbs, 0);
578+ if (gov->limits)
579+ gov->limits(policy);
577580 mutex_unlock(&policy_dbs->update_mutex);
578581
579582 out:
drivers/cpufreq/cpufreq_governor.h+1−0
@@ -138,6 +138,7 @@ struct dbs_governor { · 137 unmodified lines
138138 int (*init)(struct dbs_data *dbs_data);
139139 void (*exit)(struct dbs_data *dbs_data);
140140 void (*start)(struct cpufreq_policy *policy);
141+ void (*limits)(struct cpufreq_policy *policy);
141142 };
142143
143144 static inline struct dbs_governor *dbs_governor_of(struct cpufreq_policy *policy)
drivers/cpufreq/freq_table.c+4−0
@@ -360,6 +360,10 @@ int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) · 359 unmodified lines
360360 if (policy_has_boost_freq(policy))
361361 policy->boost_supported = true;
362362
363+ if (policy->freq_table_sorted == CPUFREQ_TABLE_SORTED_ASCENDING ||
364+ policy->freq_table_sorted == CPUFREQ_TABLE_SORTED_DESCENDING)
365+ return 0;
366+
363367 return set_freq_table_sorted(policy);
364368 }
365369
drivers/cpuidle/cpuidle.c+0−10
@@ -359,16 +359,6 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *dev, · 358 unmodified lines
359359 int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
360360 bool *stop_tick)
361361 {
362− /*
363− * If there is only a single idle state (or none), there is nothing
364− * meaningful for the governor to choose. Skip the governor and
365− * always use state 0 with the tick running.
366− */
367− if (drv->state_count <= 1) {
368− *stop_tick = false;
369− return 0;
370− }
371−
372362 return cpuidle_curr_governor->select(drv, dev, stop_tick);
373363 }
374364
drivers/crypto/caam/caamalg_qi2.c+2−1
@@ -3326,9 +3326,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, const u8 *key, · 3325 unmodified lines
33263326 if (aligned_len < keylen)
33273327 return -EOVERFLOW;
33283328
3329− hashed_key = kmemdup(key, aligned_len, GFP_KERNEL);
3329+ hashed_key = kmalloc(aligned_len, GFP_KERNEL);
33303330 if (!hashed_key)
33313331 return -ENOMEM;
3332+ memcpy(hashed_key, key, keylen);
33323333 ret = hash_digest_key(ctx, &keylen, hashed_key, digestsize);
33333334 if (ret)
33343335 goto bad_free_key;
drivers/crypto/caam/caamhash.c+2−1
@@ -441,9 +441,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, · 440 unmodified lines
441441 if (aligned_len < keylen)
442442 return -EOVERFLOW;
443443
444− hashed_key = kmemdup(key, keylen, GFP_KERNEL);
444+ hashed_key = kmalloc(aligned_len, GFP_KERNEL);
445445 if (!hashed_key)
446446 return -ENOMEM;
447+ memcpy(hashed_key, key, keylen);
447448 ret = hash_digest_key(ctx, &keylen, hashed_key, digestsize);
448449 if (ret)
449450 goto bad_free_key;
drivers/crypto/ccp/sev-dev.c+1−3
@@ -2408,10 +2408,8 @@ static int sev_ioctl_do_snp_platform_status(struct sev_issue_cmd *argp) · 2407 unmodified lines
24082408 * in Firmware state on failure. Use snp_reclaim_pages() to
24092409 * transition either case back to Hypervisor-owned state.
24102410 */
2411− if (snp_reclaim_pages(__pa(data), 1, true)) {
2412− snp_leak_pages(__page_to_pfn(status_page), 1);
2411+ if (snp_reclaim_pages(__pa(data), 1, true))
24132412 return -EFAULT;
2414− }
24152413 }
24162414
24172415 if (ret)
drivers/crypto/padlock-sha.c+7−0
@@ -332,6 +332,13 @@ static int __init padlock_init(void) · 331 unmodified lines
332332 if (!x86_match_cpu(padlock_sha_ids) || !boot_cpu_has(X86_FEATURE_PHE_EN))
333333 return -ENODEV;
334334
335+ /*
336+ * Skip family 0x07 and newer used by Zhaoxin processors,
337+ * as the driver's self-tests fail on these CPUs.
338+ */
339+ if (c->x86 >= 0x07)
340+ return -ENODEV;
341+
335342 /* Register the newly added algorithm module if on *
336343 * VIA Nano processor, or else just do as before */
337344 if (c->x86_model < 0x0f) {
drivers/crypto/tegra/tegra-se-aes.c+7−4
@@ -529,7 +529,7 @@ static struct tegra_se_alg tegra_aes_algs[] = { · 528 unmodified lines
529529 .cra_name = "cbc(aes)",
530530 .cra_driver_name = "cbc-aes-tegra",
531531 .cra_priority = 500,
532− .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_ASYNC,
532+ .cra_flags = CRYPTO_ALG_ASYNC,
533533 .cra_blocksize = AES_BLOCK_SIZE,
534534 .cra_ctxsize = sizeof(struct tegra_aes_ctx),
535535 .cra_alignmask = 0xf,
@@ -550,7 +550,7 @@ static struct tegra_se_alg tegra_aes_algs[] = { · 14 unmodified lines
550550 .cra_name = "ecb(aes)",
551551 .cra_driver_name = "ecb-aes-tegra",
552552 .cra_priority = 500,
553− .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_ASYNC,
553+ .cra_flags = CRYPTO_ALG_ASYNC,
554554 .cra_blocksize = AES_BLOCK_SIZE,
555555 .cra_ctxsize = sizeof(struct tegra_aes_ctx),
556556 .cra_alignmask = 0xf,
@@ -572,7 +572,7 @@ static struct tegra_se_alg tegra_aes_algs[] = { · 15 unmodified lines
572572 .cra_name = "ctr(aes)",
573573 .cra_driver_name = "ctr-aes-tegra",
574574 .cra_priority = 500,
575− .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_ASYNC,
575+ .cra_flags = CRYPTO_ALG_ASYNC,
576576 .cra_blocksize = 1,
577577 .cra_ctxsize = sizeof(struct tegra_aes_ctx),
578578 .cra_alignmask = 0xf,
@@ -594,6 +594,7 @@ static struct tegra_se_alg tegra_aes_algs[] = { · 15 unmodified lines
594594 .cra_name = "xts(aes)",
595595 .cra_driver_name = "xts-aes-tegra",
596596 .cra_priority = 500,
597+ .cra_flags = CRYPTO_ALG_ASYNC,
597598 .cra_blocksize = AES_BLOCK_SIZE,
598599 .cra_ctxsize = sizeof(struct tegra_aes_ctx),
599600 .cra_alignmask = (__alignof__(u64) - 1),
@@ -1922,6 +1923,7 @@ static struct tegra_se_alg tegra_aead_algs[] = { · 1322 unmodified lines
19221923 .cra_name = "gcm(aes)",
19231924 .cra_driver_name = "gcm-aes-tegra",
19241925 .cra_priority = 500,
1926+ .cra_flags = CRYPTO_ALG_ASYNC,
19251927 .cra_blocksize = 1,
19261928 .cra_ctxsize = sizeof(struct tegra_aead_ctx),
19271929 .cra_alignmask = 0xf,
@@ -1944,6 +1946,7 @@ static struct tegra_se_alg tegra_aead_algs[] = { · 16 unmodified lines
19441946 .cra_name = "ccm(aes)",
19451947 .cra_driver_name = "ccm-aes-tegra",
19461948 .cra_priority = 500,
1949+ .cra_flags = CRYPTO_ALG_ASYNC,
19471950 .cra_blocksize = 1,
19481951 .cra_ctxsize = sizeof(struct tegra_aead_ctx),
19491952 .cra_alignmask = 0xf,
@@ -1971,7 +1974,7 @@ static struct tegra_se_alg tegra_cmac_algs[] = { · 21 unmodified lines
19711974 .cra_name = "cmac(aes)",
19721975 .cra_driver_name = "tegra-se-cmac",
19731976 .cra_priority = 300,
1974− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
1977+ .cra_flags = CRYPTO_ALG_ASYNC,
19751978 .cra_blocksize = AES_BLOCK_SIZE,
19761979 .cra_ctxsize = sizeof(struct tegra_cmac_ctx),
19771980 .cra_alignmask = 0,
drivers/crypto/tegra/tegra-se-hash.c+17−13
@@ -761,7 +761,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 760 unmodified lines
761761 .cra_name = "sha1",
762762 .cra_driver_name = "tegra-se-sha1",
763763 .cra_priority = 300,
764− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
764+ .cra_flags = CRYPTO_ALG_ASYNC,
765765 .cra_blocksize = SHA1_BLOCK_SIZE,
766766 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
767767 .cra_alignmask = 0,
@@ -786,7 +786,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
786786 .cra_name = "sha224",
787787 .cra_driver_name = "tegra-se-sha224",
788788 .cra_priority = 300,
789− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
789+ .cra_flags = CRYPTO_ALG_ASYNC,
790790 .cra_blocksize = SHA224_BLOCK_SIZE,
791791 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
792792 .cra_alignmask = 0,
@@ -811,7 +811,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
811811 .cra_name = "sha256",
812812 .cra_driver_name = "tegra-se-sha256",
813813 .cra_priority = 300,
814− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
814+ .cra_flags = CRYPTO_ALG_ASYNC,
815815 .cra_blocksize = SHA256_BLOCK_SIZE,
816816 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
817817 .cra_alignmask = 0,
@@ -836,7 +836,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
836836 .cra_name = "sha384",
837837 .cra_driver_name = "tegra-se-sha384",
838838 .cra_priority = 300,
839− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
839+ .cra_flags = CRYPTO_ALG_ASYNC,
840840 .cra_blocksize = SHA384_BLOCK_SIZE,
841841 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
842842 .cra_alignmask = 0,
@@ -861,7 +861,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
861861 .cra_name = "sha512",
862862 .cra_driver_name = "tegra-se-sha512",
863863 .cra_priority = 300,
864− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
864+ .cra_flags = CRYPTO_ALG_ASYNC,
865865 .cra_blocksize = SHA512_BLOCK_SIZE,
866866 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
867867 .cra_alignmask = 0,
@@ -886,7 +886,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
886886 .cra_name = "sha3-224",
887887 .cra_driver_name = "tegra-se-sha3-224",
888888 .cra_priority = 300,
889− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
889+ .cra_flags = CRYPTO_ALG_ASYNC,
890890 .cra_blocksize = SHA3_224_BLOCK_SIZE,
891891 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
892892 .cra_alignmask = 0,
@@ -911,7 +911,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
911911 .cra_name = "sha3-256",
912912 .cra_driver_name = "tegra-se-sha3-256",
913913 .cra_priority = 300,
914− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
914+ .cra_flags = CRYPTO_ALG_ASYNC,
915915 .cra_blocksize = SHA3_256_BLOCK_SIZE,
916916 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
917917 .cra_alignmask = 0,
@@ -936,7 +936,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
936936 .cra_name = "sha3-384",
937937 .cra_driver_name = "tegra-se-sha3-384",
938938 .cra_priority = 300,
939− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
939+ .cra_flags = CRYPTO_ALG_ASYNC,
940940 .cra_blocksize = SHA3_384_BLOCK_SIZE,
941941 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
942942 .cra_alignmask = 0,
@@ -961,7 +961,7 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 18 unmodified lines
961961 .cra_name = "sha3-512",
962962 .cra_driver_name = "tegra-se-sha3-512",
963963 .cra_priority = 300,
964− .cra_flags = CRYPTO_ALG_TYPE_AHASH,
964+ .cra_flags = CRYPTO_ALG_ASYNC,
965965 .cra_blocksize = SHA3_512_BLOCK_SIZE,
966966 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
967967 .cra_alignmask = 0,
@@ -988,7 +988,8 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 20 unmodified lines
988988 .cra_name = "hmac(sha224)",
989989 .cra_driver_name = "tegra-se-hmac-sha224",
990990 .cra_priority = 300,
991− .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_NEED_FALLBACK,
991+ .cra_flags = CRYPTO_ALG_ASYNC |
992+ CRYPTO_ALG_NEED_FALLBACK,
992993 .cra_blocksize = SHA224_BLOCK_SIZE,
993994 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
994995 .cra_alignmask = 0,
@@ -1015,7 +1016,8 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 20 unmodified lines
10151016 .cra_name = "hmac(sha256)",
10161017 .cra_driver_name = "tegra-se-hmac-sha256",
10171018 .cra_priority = 300,
1018− .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_NEED_FALLBACK,
1019+ .cra_flags = CRYPTO_ALG_ASYNC |
1020+ CRYPTO_ALG_NEED_FALLBACK,
10191021 .cra_blocksize = SHA256_BLOCK_SIZE,
10201022 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
10211023 .cra_alignmask = 0,
@@ -1042,7 +1044,8 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 20 unmodified lines
10421044 .cra_name = "hmac(sha384)",
10431045 .cra_driver_name = "tegra-se-hmac-sha384",
10441046 .cra_priority = 300,
1045− .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_NEED_FALLBACK,
1047+ .cra_flags = CRYPTO_ALG_ASYNC |
1048+ CRYPTO_ALG_NEED_FALLBACK,
10461049 .cra_blocksize = SHA384_BLOCK_SIZE,
10471050 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
10481051 .cra_alignmask = 0,
@@ -1069,7 +1072,8 @@ static struct tegra_se_alg tegra_hash_algs[] = { · 20 unmodified lines
10691072 .cra_name = "hmac(sha512)",
10701073 .cra_driver_name = "tegra-se-hmac-sha512",
10711074 .cra_priority = 300,
1072− .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_NEED_FALLBACK,
1075+ .cra_flags = CRYPTO_ALG_ASYNC |
1076+ CRYPTO_ALG_NEED_FALLBACK,
10731077 .cra_blocksize = SHA512_BLOCK_SIZE,
10741078 .cra_ctxsize = sizeof(struct tegra_sha_ctx),
10751079 .cra_alignmask = 0,
drivers/cxl/Kconfig+1−0
@@ -59,6 +59,7 @@ config CXL_ACPI · 58 unmodified lines
5959 tristate "CXL ACPI: Platform Support"
6060 depends on ACPI
6161 depends on ACPI_NUMA
62+ depends on CXL_PMEM || !CXL_PMEM
6263 default CXL_BUS
6364 select ACPI_TABLE_LIB
6465 select ACPI_HMAT
drivers/cxl/core/hdm.c+9−16
@@ -94,7 +94,6 @@ static bool should_emulate_decoders(struct cxl_endpoint_dvsec_info *info) · 93 unmodified lines
9494 struct cxl_hdm *cxlhdm;
9595 void __iomem *hdm;
9696 u32 ctrl;
97− int i;
9897
9998 if (!info)
10099 return false;
@@ -113,22 +112,16 @@ static bool should_emulate_decoders(struct cxl_endpoint_dvsec_info *info) · 12 unmodified lines
113112 return false;
114113
115114 /*
116− * If any decoders are committed already, there should not be any
117− * emulated DVSEC decoders.
115+ * If HDM decoders are globally enabled, do not fall back to DVSEC
116+ * range emulation. Zeroed decoder registers after region teardown
117+ * do not imply absence of HDM capability.
118+ *
119+ * Falling back to DVSEC here would treat the decoder as AUTO and
120+ * may incorrectly latch default interleave settings.
118121 */
119− for (i = 0; i < cxlhdm->decoder_count; i++) {
120− ctrl = readl(hdm + CXL_HDM_DECODER0_CTRL_OFFSET(i));
121− dev_dbg(&info->port->dev,
122− "decoder%d.%d: committed: %ld base: %#x_%.8x size: %#x_%.8x\n",
123− info->port->id, i,
124− FIELD_GET(CXL_HDM_DECODER0_CTRL_COMMITTED, ctrl),
125− readl(hdm + CXL_HDM_DECODER0_BASE_HIGH_OFFSET(i)),
126− readl(hdm + CXL_HDM_DECODER0_BASE_LOW_OFFSET(i)),
127− readl(hdm + CXL_HDM_DECODER0_SIZE_HIGH_OFFSET(i)),
128− readl(hdm + CXL_HDM_DECODER0_SIZE_LOW_OFFSET(i)));
129− if (FIELD_GET(CXL_HDM_DECODER0_CTRL_COMMITTED, ctrl))
130− return false;
131− }
122+ ctrl = readl(hdm + CXL_HDM_DECODER_CTRL_OFFSET);
123+ if (ctrl & CXL_HDM_DECODER_ENABLE)
124+ return false;
132125
133126 return true;
134127 }
drivers/cxl/core/mbox.c+1−1
@@ -1301,7 +1301,7 @@ int cxl_mem_sanitize(struct cxl_memdev *cxlmd, u16 cmd) · 1300 unmodified lines
13011301 * Require an endpoint to be safe otherwise the driver can not
13021302 * be sure that the device is unmapped.
13031303 */
1304− if (endpoint && cxl_num_decoders_committed(endpoint) == 0)
1304+ if (cxlmd->dev.driver && cxl_num_decoders_committed(endpoint) == 0)
13051305 return __cxl_mem_sanitize(mds, cmd);
13061306
13071307 return -EBUSY;
drivers/cxl/core/port.c+6−2
@@ -552,10 +552,13 @@ static void cxl_port_release(struct device *dev) · 551 unmodified lines
552552 xa_destroy(&port->dports);
553553 xa_destroy(&port->regions);
554554 ida_free(&cxl_port_ida, port->id);
555− if (is_cxl_root(port))
555+
556+ if (is_cxl_root(port)) {
556557 kfree(to_cxl_root(port));
557− else
558+ } else {
559+ put_device(dev->parent);
558560 kfree(port);
561+ }
559562 }
560563
561564 static ssize_t decoders_committed_show(struct device *dev,
@@ -707,6 +710,7 @@ static struct cxl_port *cxl_port_alloc(struct device *uport_dev, · 145 unmodified lines
707710 struct cxl_port *iter;
708711
709712 dev->parent = &parent_port->dev;
713+ get_device(dev->parent);
710714 port->depth = parent_port->depth + 1;
711715 port->parent_dport = parent_dport;
712716
drivers/cxl/core/region.c+3−1
@@ -3854,8 +3854,10 @@ static int __construct_region(struct cxl_region *cxlr, · 3853 unmodified lines
38543854 }
38553855
38563856 rc = sysfs_update_group(&cxlr->dev.kobj, &cxl_region_group);
3857− if (rc)
3857+ if (rc) {
3858+ kfree(res);
38583859 return rc;
3860+ }
38593861
38603862 rc = insert_resource(cxlrd->res, res);
38613863 if (rc) {
drivers/cxl/pmem.c+1−1
@@ -554,7 +554,7 @@ static __exit void cxl_pmem_exit(void) · 553 unmodified lines
554554
555555 MODULE_DESCRIPTION("CXL PMEM: Persistent Memory Support");
556556 MODULE_LICENSE("GPL v2");
557−module_init(cxl_pmem_init);
557+subsys_initcall(cxl_pmem_init);
558558 module_exit(cxl_pmem_exit);
559559 MODULE_IMPORT_NS("CXL");
560560 MODULE_ALIAS_CXL(CXL_DEVICE_NVDIMM_BRIDGE);
drivers/dma/dw-edma/dw-edma-core.c+6−2
@@ -844,6 +844,7 @@ static int dw_edma_irq_request(struct dw_edma *dw, · 843 unmodified lines
844844 {
845845 struct dw_edma_chip *chip = dw->chip;
846846 struct device *dev = dw->chip->dev;
847+ struct msi_desc *msi_desc;
847848 u32 wr_mask = 1;
848849 u32 rd_mask = 1;
849850 int i, err = 0;
@@ -895,9 +896,12 @@ static int dw_edma_irq_request(struct dw_edma *dw, · 45 unmodified lines
895896 &dw->irq[i]);
896897 if (err)
897898 goto err_irq_free;
898−
899− if (irq_get_msi_desc(irq))
899+ msi_desc = irq_get_msi_desc(irq);
900+ if (msi_desc) {
900901 get_cached_msi_msg(irq, &dw->irq[i].msi);
902+ if (!msi_desc->pci.msi_attrib.is_msix)
903+ dw->irq[i].msi.data = dw->irq[0].msi.data + i;
904+ }
901905 }
902906
903907 dw->nr_irqs = i;
drivers/dma/dw-edma/dw-hdma-v0-core.c+3−3
@@ -252,10 +252,10 @@ static void dw_hdma_v0_core_start(struct dw_edma_chunk *chunk, bool first) · 251 unmodified lines
252252 lower_32_bits(chunk->ll_region.paddr));
253253 SET_CH_32(dw, chan->dir, chan->id, llp.msb,
254254 upper_32_bits(chunk->ll_region.paddr));
255+ /* Set consumer cycle */
256+ SET_CH_32(dw, chan->dir, chan->id, cycle_sync,
257+ HDMA_V0_CONSUMER_CYCLE_STAT | HDMA_V0_CONSUMER_CYCLE_BIT);
255258 }
256− /* Set consumer cycle */
257− SET_CH_32(dw, chan->dir, chan->id, cycle_sync,
258− HDMA_V0_CONSUMER_CYCLE_STAT | HDMA_V0_CONSUMER_CYCLE_BIT);
259259
260260 dw_hdma_v0_sync_ll_data(chunk);
261261
drivers/dma/fsl-edma-main.c+11−15
@@ -317,10 +317,8 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec, · 316 unmodified lines
317317 return NULL;
318318 i = fsl_chan - fsl_edma->chans;
319319
320− fsl_chan->priority = dma_spec->args[1];
321− fsl_chan->is_rxchan = dma_spec->args[2] & FSL_EDMA_RX;
322− fsl_chan->is_remote = dma_spec->args[2] & FSL_EDMA_REMOTE;
323− fsl_chan->is_multi_fifo = dma_spec->args[2] & FSL_EDMA_MULTI_FIFO;
320+ if (!b_chmux && i != dma_spec->args[0])
321+ continue;
324322
325323 if ((dma_spec->args[2] & FSL_EDMA_EVEN_CH) && (i & 0x1))
326324 continue;
@@ -328,17 +326,15 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec, · 1 unmodified line
328326 if ((dma_spec->args[2] & FSL_EDMA_ODD_CH) && !(i & 0x1))
329327 continue;
330328
331− if (!b_chmux && i == dma_spec->args[0]) {
332− chan = dma_get_slave_channel(chan);
333− chan->device->privatecnt++;
334− return chan;
335− } else if (b_chmux && !fsl_chan->srcid) {
336− /* if controller support channel mux, choose a free channel */
337− chan = dma_get_slave_channel(chan);
338− chan->device->privatecnt++;
339− fsl_chan->srcid = dma_spec->args[0];
340− return chan;
341− }
329+ fsl_chan->srcid = dma_spec->args[0];
330+ fsl_chan->priority = dma_spec->args[1];
331+ fsl_chan->is_rxchan = dma_spec->args[2] & FSL_EDMA_RX;
332+ fsl_chan->is_remote = dma_spec->args[2] & FSL_EDMA_REMOTE;
333+ fsl_chan->is_multi_fifo = dma_spec->args[2] & FSL_EDMA_MULTI_FIFO;
334+
335+ chan = dma_get_slave_channel(chan);
336+ chan->device->privatecnt++;
337+ return chan;
342338 }
343339 return NULL;
344340 }
drivers/dma/idxd/cdev.c+4−4
@@ -158,11 +158,7 @@ static const struct device_type idxd_cdev_file_type = { · 157 unmodified lines
158158 static void idxd_cdev_dev_release(struct device *dev)
159159 {
160160 struct idxd_cdev *idxd_cdev = dev_to_cdev(dev);
161− struct idxd_cdev_context *cdev_ctx;
162− struct idxd_wq *wq = idxd_cdev->wq;
163161
164− cdev_ctx = &ictx[wq->idxd->data->type];
165− ida_free(&cdev_ctx->minor_ida, idxd_cdev->minor);
166162 kfree(idxd_cdev);
167163 }
168164
@@ -582,11 +578,15 @@ int idxd_wq_add_cdev(struct idxd_wq *wq) · 413 unmodified lines
582578
583579 void idxd_wq_del_cdev(struct idxd_wq *wq)
584580 {
581+ struct idxd_cdev_context *cdev_ctx;
585582 struct idxd_cdev *idxd_cdev;
586583
587584 idxd_cdev = wq->idxd_cdev;
588585 wq->idxd_cdev = NULL;
589586 cdev_device_del(&idxd_cdev->cdev, cdev_dev(idxd_cdev));
587+
588+ cdev_ctx = &ictx[wq->idxd->data->type];
589+ ida_free(&cdev_ctx->minor_ida, idxd_cdev->minor);
590590 put_device(cdev_dev(idxd_cdev));
591591 }
592592
drivers/dma/idxd/device.c+31−14
@@ -175,6 +175,7 @@ void idxd_wq_free_resources(struct idxd_wq *wq) · 174 unmodified lines
175175 free_descs(wq);
176176 dma_free_coherent(dev, wq->compls_size, wq->compls, wq->compls_addr);
177177 sbitmap_queue_free(&wq->sbq);
178+ wq->type = IDXD_WQT_NONE;
178179 }
179180 EXPORT_SYMBOL_NS_GPL(idxd_wq_free_resources, "IDXD");
180181
@@ -382,7 +383,6 @@ static void idxd_wq_disable_cleanup(struct idxd_wq *wq) · 201 unmodified lines
382383 lockdep_assert_held(&wq->wq_lock);
383384 wq->state = IDXD_WQ_DISABLED;
384385 memset(wq->wqcfg, 0, idxd->wqcfg_size);
385− wq->type = IDXD_WQT_NONE;
386386 wq->threshold = 0;
387387 wq->priority = 0;
388388 wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES;
@@ -831,8 +831,7 @@ static void idxd_device_evl_free(struct idxd_device *idxd) · 442 unmodified lines
831831 struct device *dev = &idxd->pdev->dev;
832832 struct idxd_evl *evl = idxd->evl;
833833
834− gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET);
835− if (!gencfg.evl_en)
834+ if (!evl)
836835 return;
837836
838837 mutex_lock(&evl->lock);
@@ -1125,7 +1124,11 @@ int idxd_device_config(struct idxd_device *idxd) · 286 unmodified lines
11251124 {
11261125 int rc;
11271126
1128− lockdep_assert_held(&idxd->dev_lock);
1127+ guard(spinlock)(&idxd->dev_lock);
1128+
1129+ if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
1130+ return 0;
1131+
11291132 rc = idxd_wqs_setup(idxd);
11301133 if (rc < 0)
11311134 return rc;
@@ -1332,6 +1335,11 @@ void idxd_wq_free_irq(struct idxd_wq *wq) · 200 unmodified lines
13321335
13331336 free_irq(ie->vector, ie);
13341337 idxd_flush_pending_descs(ie);
1338+
1339+ /* The interrupt might have been already released by FLR */
1340+ if (ie->int_handle == INVALID_INT_HANDLE)
1341+ return;
1342+
13351343 if (idxd->request_int_handles)
13361344 idxd_device_release_int_handle(idxd, ie->int_handle, IDXD_IRQ_MSIX);
13371345 idxd_device_clear_perm_entry(idxd, ie);
@@ -1340,6 +1348,23 @@ void idxd_wq_free_irq(struct idxd_wq *wq) · 2 unmodified lines
13401348 ie->pasid = IOMMU_PASID_INVALID;
13411349 }
13421350
1351+void idxd_wq_flush_descs(struct idxd_wq *wq)
1352+{
1353+ struct idxd_irq_entry *ie = &wq->ie;
1354+ struct idxd_device *idxd = wq->idxd;
1355+
1356+ guard(mutex)(&wq->wq_lock);
1357+
1358+ if (wq->state != IDXD_WQ_ENABLED || wq->type != IDXD_WQT_KERNEL)
1359+ return;
1360+
1361+ idxd_flush_pending_descs(ie);
1362+ if (idxd->request_int_handles)
1363+ idxd_device_release_int_handle(idxd, ie->int_handle, IDXD_IRQ_MSIX);
1364+ idxd_device_clear_perm_entry(idxd, ie);
1365+ ie->int_handle = INVALID_INT_HANDLE;
1366+}
1367+
13431368 int idxd_wq_request_irq(struct idxd_wq *wq)
13441369 {
13451370 struct idxd_device *idxd = wq->idxd;
@@ -1454,11 +1479,7 @@ int idxd_drv_enable_wq(struct idxd_wq *wq) · 108 unmodified lines
14541479 }
14551480 }
14561481
1457− rc = 0;
1458− spin_lock(&idxd->dev_lock);
1459− if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
1460− rc = idxd_device_config(idxd);
1461− spin_unlock(&idxd->dev_lock);
1482+ rc = idxd_device_config(idxd);
14621483 if (rc < 0) {
14631484 dev_dbg(dev, "Writing wq %d config failed: %d\n", wq->id, rc);
14641485 goto err;
@@ -1533,7 +1554,6 @@ void idxd_drv_disable_wq(struct idxd_wq *wq) · 68 unmodified lines
15331554 idxd_wq_reset(wq);
15341555 idxd_wq_free_resources(wq);
15351556 percpu_ref_exit(&wq->wq_active);
1536− wq->type = IDXD_WQT_NONE;
15371557 wq->client_count = 0;
15381558 }
15391559 EXPORT_SYMBOL_NS_GPL(idxd_drv_disable_wq, "IDXD");
@@ -1554,10 +1574,7 @@ int idxd_device_drv_probe(struct idxd_dev *idxd_dev) · 14 unmodified lines
15541574 }
15551575
15561576 /* Device configuration */
1557− spin_lock(&idxd->dev_lock);
1558− if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
1559− rc = idxd_device_config(idxd);
1560− spin_unlock(&idxd->dev_lock);
1577+ rc = idxd_device_config(idxd);
15611578 if (rc < 0)
15621579 return -ENXIO;
15631580
drivers/dma/idxd/dma.c+18−0
@@ -194,6 +194,22 @@ static void idxd_dma_release(struct dma_device *device) · 193 unmodified lines
194194 kfree(idxd_dma);
195195 }
196196
197+static int idxd_dma_terminate_all(struct dma_chan *c)
198+{
199+ struct idxd_wq *wq = to_idxd_wq(c);
200+
201+ idxd_wq_flush_descs(wq);
202+
203+ return 0;
204+}
205+
206+static void idxd_dma_synchronize(struct dma_chan *c)
207+{
208+ struct idxd_wq *wq = to_idxd_wq(c);
209+
210+ idxd_wq_drain(wq);
211+}
212+
197213 int idxd_register_dma_device(struct idxd_device *idxd)
198214 {
199215 struct idxd_dma_dev *idxd_dma;
@@ -224,6 +240,8 @@ int idxd_register_dma_device(struct idxd_device *idxd) · 24 unmodified lines
224240 dma->device_issue_pending = idxd_dma_issue_pending;
225241 dma->device_alloc_chan_resources = idxd_dma_alloc_chan_resources;
226242 dma->device_free_chan_resources = idxd_dma_free_chan_resources;
243+ dma->device_terminate_all = idxd_dma_terminate_all;
244+ dma->device_synchronize = idxd_dma_synchronize;
227245
228246 rc = dma_async_device_register(dma);
229247 if (rc < 0) {
drivers/dma/idxd/idxd.h+1−0
@@ -803,6 +803,7 @@ void idxd_wq_quiesce(struct idxd_wq *wq); · 802 unmodified lines
803803 int idxd_wq_init_percpu_ref(struct idxd_wq *wq);
804804 void idxd_wq_free_irq(struct idxd_wq *wq);
805805 int idxd_wq_request_irq(struct idxd_wq *wq);
806+void idxd_wq_flush_descs(struct idxd_wq *wq);
806807
807808 /* submission */
808809 int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc);
drivers/dma/idxd/init.c+7−7
@@ -973,7 +973,8 @@ static void idxd_device_config_restore(struct idxd_device *idxd, · 972 unmodified lines
973973
974974 idxd->rdbuf_limit = idxd_saved->saved_idxd.rdbuf_limit;
975975
976− idxd->evl->size = saved_evl->size;
976+ if (idxd->evl)
977+ idxd->evl->size = saved_evl->size;
977978
978979 for (i = 0; i < idxd->max_groups; i++) {
979980 struct idxd_group *saved_group, *group;
@@ -1104,12 +1105,10 @@ static void idxd_reset_done(struct pci_dev *pdev) · 124 unmodified lines
11041105 idxd_device_config_restore(idxd, idxd->idxd_saved);
11051106
11061107 /* Re-configure IDXD device if allowed. */
1107− if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) {
1108− rc = idxd_device_config(idxd);
1109− if (rc < 0) {
1110− dev_err(dev, "HALT: %s config fails\n", idxd_name);
1111− goto out;
1112− }
1108+ rc = idxd_device_config(idxd);
1109+ if (rc < 0) {
1110+ dev_err(dev, "HALT: %s config fails\n", idxd_name);
1111+ goto out;
11131112 }
11141113
11151114 /* Bind IDXD device to driver. */
@@ -1147,6 +1146,7 @@ static void idxd_reset_done(struct pci_dev *pdev) · 31 unmodified lines
11471146 }
11481147 out:
11491148 kfree(idxd->idxd_saved);
1149+ idxd->idxd_saved = NULL;
11501150 }
11511151
11521152 static const struct pci_error_handlers idxd_error_handler = {
drivers/dma/idxd/irq.c+16−0
@@ -397,6 +397,17 @@ static void idxd_device_flr(struct work_struct *work) · 396 unmodified lines
397397 dev_err(&idxd->pdev->dev, "FLR failed\n");
398398 }
399399
400+static void idxd_wqs_flush_descs(struct idxd_device *idxd)
401+{
402+ int i;
403+
404+ for (i = 0; i < idxd->max_wqs; i++) {
405+ struct idxd_wq *wq = idxd->wqs[i];
406+
407+ idxd_wq_flush_descs(wq);
408+ }
409+}
410+
400411 static irqreturn_t idxd_halt(struct idxd_device *idxd)
401412 {
402413 union gensts_reg gensts;
@@ -415,6 +426,11 @@ static irqreturn_t idxd_halt(struct idxd_device *idxd) · 12 unmodified lines
415426 } else if (gensts.reset_type == IDXD_DEVICE_RESET_FLR) {
416427 idxd->state = IDXD_DEV_HALTED;
417428 idxd_mask_error_interrupts(idxd);
429+ /* Flush all pending descriptors, and disable
430+ * interrupts, they will be re-enabled when FLR
431+ * concludes.
432+ */
433+ idxd_wqs_flush_descs(idxd);
418434 dev_dbg(&idxd->pdev->dev,
419435 "idxd halted, doing FLR. After FLR, configs are restored\n");
420436 INIT_WORK(&idxd->work, idxd_device_flr);
drivers/dma/idxd/submit.c+1−1
@@ -138,7 +138,7 @@ static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie, · 137 unmodified lines
138138 */
139139 list_for_each_entry_safe(d, t, &flist, list) {
140140 list_del_init(&d->list);
141− idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, true,
141+ idxd_dma_complete_txd(d, IDXD_COMPLETE_ABORT, true,
142142 NULL, NULL);
143143 }
144144 }
drivers/dma/idxd/sysfs.c+1−0
@@ -1836,6 +1836,7 @@ static void idxd_conf_device_release(struct device *dev) · 1835 unmodified lines
18361836 {
18371837 struct idxd_device *idxd = confdev_to_idxd(dev);
18381838
1839+ destroy_workqueue(idxd->wq);
18391840 kfree(idxd->groups);
18401841 bitmap_free(idxd->wq_enable_map);
18411842 kfree(idxd->wqs);
drivers/dma/sh/rz-dmac.c+36−30
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 */
1111
1212 #include <linux/bitfield.h>
13+#include <linux/cleanup.h>
1314 #include <linux/dma-mapping.h>
1415 #include <linux/dmaengine.h>
1516 #include <linux/interrupt.h>
@@ -296,13 +297,10 @@ static void rz_dmac_disable_hw(struct rz_dmac_chan *channel) · 280 unmodified lines
296297 {
297298 struct dma_chan *chan = &channel->vc.chan;
298299 struct rz_dmac *dmac = to_rz_dmac(chan->device);
299− unsigned long flags;
300300
301301 dev_dbg(dmac->dev, "%s channel %d\n", __func__, channel->index);
302302
303− local_irq_save(flags);
304303 rz_dmac_ch_writel(channel, CHCTRL_DEFAULT, CHCTRL, 1);
305− local_irq_restore(flags);
306304 }
307305
308306 static void rz_dmac_set_dmars_register(struct rz_dmac *dmac, int nr, u32 dmars)
@@ -447,6 +445,7 @@ static int rz_dmac_alloc_chan_resources(struct dma_chan *chan) · 138 unmodified lines
447445 if (!desc)
448446 break;
449447
448+ /* No need to lock. This is called only for the 1st client. */
450449 list_add_tail(&desc->node, &channel->ld_free);
451450 channel->descs_allocated++;
452451 }
@@ -502,18 +501,21 @@ rz_dmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, · 49 unmodified lines
502501 dev_dbg(dmac->dev, "%s channel: %d src=0x%pad dst=0x%pad len=%zu\n",
503502 __func__, channel->index, &src, &dest, len);
504503
505− if (list_empty(&channel->ld_free))
506− return NULL;
504+ scoped_guard(spinlock_irqsave, &channel->vc.lock) {
505+ if (list_empty(&channel->ld_free))
506+ return NULL;
507507
508− desc = list_first_entry(&channel->ld_free, struct rz_dmac_desc, node);
508+ desc = list_first_entry(&channel->ld_free, struct rz_dmac_desc, node);
509509
510− desc->type = RZ_DMAC_DESC_MEMCPY;
511− desc->src = src;
512− desc->dest = dest;
513− desc->len = len;
514− desc->direction = DMA_MEM_TO_MEM;
510+ desc->type = RZ_DMAC_DESC_MEMCPY;
511+ desc->src = src;
512+ desc->dest = dest;
513+ desc->len = len;
514+ desc->direction = DMA_MEM_TO_MEM;
515+
516+ list_move_tail(channel->ld_free.next, &channel->ld_queue);
517+ }
515518
516− list_move_tail(channel->ld_free.next, &channel->ld_queue);
517519 return vchan_tx_prep(&channel->vc, &desc->vd, flags);
518520 }
519521
@@ -529,27 +531,29 @@ rz_dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, · 9 unmodified lines
529531 int dma_length = 0;
530532 int i = 0;
531533
532− if (list_empty(&channel->ld_free))
533− return NULL;
534+ scoped_guard(spinlock_irqsave, &channel->vc.lock) {
535+ if (list_empty(&channel->ld_free))
536+ return NULL;
534537
535− desc = list_first_entry(&channel->ld_free, struct rz_dmac_desc, node);
538+ desc = list_first_entry(&channel->ld_free, struct rz_dmac_desc, node);
536539
537− for_each_sg(sgl, sg, sg_len, i) {
538− dma_length += sg_dma_len(sg);
539− }
540+ for_each_sg(sgl, sg, sg_len, i)
541+ dma_length += sg_dma_len(sg);
540542
541− desc->type = RZ_DMAC_DESC_SLAVE_SG;
542− desc->sg = sgl;
543− desc->sgcount = sg_len;
544− desc->len = dma_length;
545− desc->direction = direction;
543+ desc->type = RZ_DMAC_DESC_SLAVE_SG;
544+ desc->sg = sgl;
545+ desc->sgcount = sg_len;
546+ desc->len = dma_length;
547+ desc->direction = direction;
546548
547− if (direction == DMA_DEV_TO_MEM)
548− desc->src = channel->src_per_address;
549− else
550− desc->dest = channel->dst_per_address;
549+ if (direction == DMA_DEV_TO_MEM)
550+ desc->src = channel->src_per_address;
551+ else
552+ desc->dest = channel->dst_per_address;
553+
554+ list_move_tail(channel->ld_free.next, &channel->ld_queue);
555+ }
551556
552− list_move_tail(channel->ld_free.next, &channel->ld_queue);
553557 return vchan_tx_prep(&channel->vc, &desc->vd, flags);
554558 }
555559
@@ -561,8 +565,8 @@ static int rz_dmac_terminate_all(struct dma_chan *chan) · 5 unmodified lines
561565 unsigned int i;
562566 LIST_HEAD(head);
563567
564− rz_dmac_disable_hw(channel);
565568 spin_lock_irqsave(&channel->vc.lock, flags);
569+ rz_dmac_disable_hw(channel);
566570 for (i = 0; i < DMAC_NR_LMDESC; i++)
567571 lmdesc[i].header = 0;
568572
@@ -699,7 +703,9 @@ static void rz_dmac_irq_handle_channel(struct rz_dmac_chan *channel) · 130 unmodified lines
699703 if (chstat & CHSTAT_ER) {
700704 dev_err(dmac->dev, "DMAC err CHSTAT_%d = %08X\n",
701705 channel->index, chstat);
702− rz_dmac_ch_writel(channel, CHCTRL_DEFAULT, CHCTRL, 1);
706+
707+ scoped_guard(spinlock_irqsave, &channel->vc.lock)
708+ rz_dmac_ch_writel(channel, CHCTRL_DEFAULT, CHCTRL, 1);
703709 goto done;
704710 }
705711
drivers/dma/xilinx/xdma.c+2−2
@@ -1234,8 +1234,8 @@ static int xdma_probe(struct platform_device *pdev) · 1233 unmodified lines
12341234
12351235 xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
12361236 &xdma_regmap_config);
1237− if (!xdev->rmap) {
1238− xdma_err(xdev, "config regmap failed: %d", ret);
1237+ if (IS_ERR(xdev->rmap)) {
1238+ xdma_err(xdev, "config regmap failed: %pe", xdev->rmap);
12391239 goto failed;
12401240 }
12411241 INIT_LIST_HEAD(&xdev->dma_dev.channels);
drivers/dma/xilinx/xilinx_dma.c+30−16
@@ -997,16 +997,16 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_chan *chan, · 996 unmodified lines
997997 struct xilinx_cdma_tx_segment,
998998 node);
999999 cdma_hw = &cdma_seg->hw;
1000− residue += (cdma_hw->control - cdma_hw->status) &
1001− chan->xdev->max_buffer_len;
1000+ residue += (cdma_hw->control & chan->xdev->max_buffer_len) -
1001+ (cdma_hw->status & chan->xdev->max_buffer_len);
10021002 } else if (chan->xdev->dma_config->dmatype ==
10031003 XDMA_TYPE_AXIDMA) {
10041004 axidma_seg = list_entry(entry,
10051005 struct xilinx_axidma_tx_segment,
10061006 node);
10071007 axidma_hw = &axidma_seg->hw;
1008− residue += (axidma_hw->control - axidma_hw->status) &
1009− chan->xdev->max_buffer_len;
1008+ residue += (axidma_hw->control & chan->xdev->max_buffer_len) -
1009+ (axidma_hw->status & chan->xdev->max_buffer_len);
10101010 } else {
10111011 aximcdma_seg =
10121012 list_entry(entry,
@@ -1014,8 +1014,8 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_chan *chan, · 1 unmodified line
10141014 node);
10151015 aximcdma_hw = &aximcdma_seg->hw;
10161016 residue +=
1017− (aximcdma_hw->control - aximcdma_hw->status) &
1018− chan->xdev->max_buffer_len;
1017+ (aximcdma_hw->control & chan->xdev->max_buffer_len) -
1018+ (aximcdma_hw->status & chan->xdev->max_buffer_len);
10191019 }
10201020 }
10211021
@@ -1235,14 +1235,6 @@ static int xilinx_dma_alloc_chan_resources(struct dma_chan *dchan) · 213 unmodified lines
12351235
12361236 dma_cookie_init(dchan);
12371237
1238− if (chan->xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) {
1239− /* For AXI DMA resetting once channel will reset the
1240− * other channel as well so enable the interrupts here.
1241− */
1242− dma_ctrl_set(chan, XILINX_DMA_REG_DMACR,
1243− XILINX_DMA_DMAXR_ALL_IRQ_MASK);
1244− }
1245−
12461238 if ((chan->xdev->dma_config->dmatype == XDMA_TYPE_CDMA) && chan->has_sg)
12471239 dma_ctrl_set(chan, XILINX_DMA_REG_DMACR,
12481240 XILINX_CDMA_CR_SGMODE);
@@ -1564,8 +1556,29 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan) · 315 unmodified lines
15641556 if (chan->err)
15651557 return;
15661558
1567− if (list_empty(&chan->pending_list))
1559+ if (list_empty(&chan->pending_list)) {
1560+ if (chan->cyclic) {
1561+ struct xilinx_dma_tx_descriptor *desc;
1562+ struct list_head *entry;
1563+
1564+ desc = list_last_entry(&chan->done_list,
1565+ struct xilinx_dma_tx_descriptor, node);
1566+ list_for_each(entry, &desc->segments) {
1567+ struct xilinx_axidma_tx_segment *axidma_seg;
1568+ struct xilinx_axidma_desc_hw *axidma_hw;
1569+ axidma_seg = list_entry(entry,
1570+ struct xilinx_axidma_tx_segment,
1571+ node);
1572+ axidma_hw = &axidma_seg->hw;
1573+ axidma_hw->status = 0;
1574+ }
1575+
1576+ list_splice_tail_init(&chan->done_list, &chan->active_list);
1577+ chan->desc_pendingcount = 0;
1578+ chan->idle = false;
1579+ }
15681580 return;
1581+ }
15691582
15701583 if (!chan->idle)
15711584 return;
@@ -1591,6 +1604,7 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan) · 19 unmodified lines
15911604 head_desc->async_tx.phys);
15921605 reg &= ~XILINX_DMA_CR_DELAY_MAX;
15931606 reg |= chan->irq_delay << XILINX_DMA_CR_DELAY_SHIFT;
1607+ reg |= XILINX_DMA_DMAXR_ALL_IRQ_MASK;
15941608 dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
15951609
15961610 xilinx_dma_start(chan);
@@ -3024,7 +3038,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, · 1427 unmodified lines
30243038 return -EINVAL;
30253039 }
30263040
3027− xdev->common.directions |= chan->direction;
3041+ xdev->common.directions |= BIT(chan->direction);
30283042
30293043 /* Request the interrupt */
30303044 chan->irq = of_irq_get(node, chan->tdest);
drivers/firewire/net.c+3−2
@@ -257,9 +257,10 @@ static void fwnet_header_cache_update(struct hh_cache *hh, · 256 unmodified lines
257257 memcpy((u8 *)hh->hh_data + HH_DATA_OFF(FWNET_HLEN), haddr, net->addr_len);
258258 }
259259
260−static int fwnet_header_parse(const struct sk_buff *skb, unsigned char *haddr)
260+static int fwnet_header_parse(const struct sk_buff *skb, const struct net_device *dev,
261+ unsigned char *haddr)
261262 {
262− memcpy(haddr, skb->dev->dev_addr, FWNET_ALEN);
263+ memcpy(haddr, dev->dev_addr, FWNET_ALEN);
263264
264265 return FWNET_ALEN;
265266 }
drivers/firmware/arm_ffa/driver.c+4−4
@@ -205,12 +205,12 @@ static int ffa_rxtx_map(phys_addr_t tx_buf, phys_addr_t rx_buf, u32 pg_cnt) · 204 unmodified lines
205205 return 0;
206206 }
207207
208−static int ffa_rxtx_unmap(u16 vm_id)
208+static int ffa_rxtx_unmap(void)
209209 {
210210 ffa_value_t ret;
211211
212212 invoke_ffa_fn((ffa_value_t){
213− .a0 = FFA_RXTX_UNMAP, .a1 = PACK_TARGET_INFO(vm_id, 0),
213+ .a0 = FFA_RXTX_UNMAP,
214214 }, &ret);
215215
216216 if (ret.a0 == FFA_ERROR)
@@ -2097,7 +2097,7 @@ static int __init ffa_init(void) · 1880 unmodified lines
20972097
20982098 pr_err("failed to setup partitions\n");
20992099 ffa_notifications_cleanup();
2100− ffa_rxtx_unmap(drv_info->vm_id);
2100+ ffa_rxtx_unmap();
21012101 free_pages:
21022102 if (drv_info->tx_buffer)
21032103 free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);
@@ -2112,7 +2112,7 @@ static void __exit ffa_exit(void) · 8 unmodified lines
21122112 {
21132113 ffa_notifications_cleanup();
21142114 ffa_partitions_cleanup();
2115− ffa_rxtx_unmap(drv_info->vm_id);
2115+ ffa_rxtx_unmap();
21162116 free_pages_exact(drv_info->tx_buffer, drv_info->rxtx_bufsz);
21172117 free_pages_exact(drv_info->rx_buffer, drv_info->rxtx_bufsz);
21182118 kfree(drv_info);
drivers/firmware/arm_scmi/notify.c+2−2
@@ -1066,7 +1066,7 @@ static int scmi_register_event_handler(struct scmi_notify_instance *ni, · 1065 unmodified lines
10661066 * since at creation time we usually want to have all setup and ready before
10671067 * events really start flowing.
10681068 *
1069− * Return: A properly refcounted handler on Success, NULL on Failure
1069+ * Return: A properly refcounted handler on Success, ERR_PTR on Failure
10701070 */
10711071 static inline struct scmi_event_handler *
10721072 __scmi_event_handler_get_ops(struct scmi_notify_instance *ni,
@@ -1113,7 +1113,7 @@ __scmi_event_handler_get_ops(struct scmi_notify_instance *ni, · 40 unmodified lines
11131113 }
11141114 mutex_unlock(&ni->pending_mtx);
11151115
1116− return hndl;
1116+ return hndl ?: ERR_PTR(-ENODEV);
11171117 }
11181118
11191119 static struct scmi_event_handler *
drivers/firmware/arm_scmi/protocols.h+2−2
@@ -189,13 +189,13 @@ struct scmi_protocol_handle { · 188 unmodified lines
189189
190190 /**
191191 * struct scmi_iterator_state - Iterator current state descriptor
192− * @desc_index: Starting index for the current mulit-part request.
192+ * @desc_index: Starting index for the current multi-part request.
193193 * @num_returned: Number of returned items in the last multi-part reply.
194194 * @num_remaining: Number of remaining items in the multi-part message.
195195 * @max_resources: Maximum acceptable number of items, configured by the caller
196196 * depending on the underlying resources that it is querying.
197197 * @loop_idx: The iterator loop index in the current multi-part reply.
198− * @rx_len: Size in bytes of the currenly processed message; it can be used by
198+ * @rx_len: Size in bytes of the currently processed message; it can be used by
199199 * the user of the iterator to verify a reply size.
200200 * @priv: Optional pointer to some additional state-related private data setup
201201 * by the caller during the iterations.
drivers/firmware/arm_scpi.c+3−2
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818
1919 #include <linux/bitmap.h>
2020 #include <linux/bitfield.h>
21+#include <linux/cleanup.h>
2122 #include <linux/device.h>
2223 #include <linux/err.h>
2324 #include <linux/export.h>
@@ -940,13 +941,13 @@ static int scpi_probe(struct platform_device *pdev) · 916 unmodified lines
940941 int idx = scpi_drvinfo->num_chans;
941942 struct scpi_chan *pchan = scpi_drvinfo->channels + idx;
942943 struct mbox_client *cl = &pchan->cl;
943− struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
944+ struct device_node *shmem __free(device_node) =
945+ of_parse_phandle(np, "shmem", idx);
944946
945947 if (!of_match_node(shmem_of_match, shmem))
946948 return -ENXIO;
947949
948950 ret = of_address_to_resource(shmem, 0, &res);
949− of_node_put(shmem);
950951 if (ret) {
951952 dev_err(dev, "failed to get SCPI payload mem resource\n");
952953 return ret;
drivers/firmware/cirrus/cs_dsp.c+18−6
@@ -1610,11 +1610,17 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware, · 1609 unmodified lines
16101610 region_name);
16111611
16121612 if (reg) {
1613+ /*
1614+ * Although we expect the underlying bus does not require
1615+ * physically-contiguous buffers, we pessimistically use
1616+ * a temporary buffer instead of trusting that the
1617+ * alignment of region->data is ok.
1618+ */
16131619 region_len = le32_to_cpu(region->len);
16141620 if (region_len > buf_len) {
16151621 buf_len = round_up(region_len, PAGE_SIZE);
1616− kfree(buf);
1617− buf = kmalloc(buf_len, GFP_KERNEL | GFP_DMA);
1622+ vfree(buf);
1623+ buf = vmalloc(buf_len);
16181624 if (!buf) {
16191625 ret = -ENOMEM;
16201626 goto out_fw;
@@ -1643,7 +1649,7 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware, · 22 unmodified lines
16431649
16441650 ret = 0;
16451651 out_fw:
1646− kfree(buf);
1652+ vfree(buf);
16471653
16481654 if (ret == -EOVERFLOW)
16491655 cs_dsp_err(dsp, "%s: file content overflows file data\n", file);
@@ -2331,11 +2337,17 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware · 681 unmodified lines
23312337 }
23322338
23332339 if (reg) {
2340+ /*
2341+ * Although we expect the underlying bus does not require
2342+ * physically-contiguous buffers, we pessimistically use
2343+ * a temporary buffer instead of trusting that the
2344+ * alignment of blk->data is ok.
2345+ */
23342346 region_len = le32_to_cpu(blk->len);
23352347 if (region_len > buf_len) {
23362348 buf_len = round_up(region_len, PAGE_SIZE);
2337− kfree(buf);
2338− buf = kmalloc(buf_len, GFP_KERNEL | GFP_DMA);
2349+ vfree(buf);
2350+ buf = vmalloc(buf_len);
23392351 if (!buf) {
23402352 ret = -ENOMEM;
23412353 goto out_fw;
@@ -2366,7 +2378,7 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware · 24 unmodified lines
23662378
23672379 ret = 0;
23682380 out_fw:
2369− kfree(buf);
2381+ vfree(buf);
23702382
23712383 if (ret == -EOVERFLOW)
23722384 cs_dsp_err(dsp, "%s: file content overflows file data\n", file);
drivers/firmware/stratix10-rsu.c+2−0
@@ -768,7 +768,9 @@ static int stratix10_rsu_probe(struct platform_device *pdev) · 767 unmodified lines
768768 rsu_async_status_callback);
769769 if (ret) {
770770 dev_err(dev, "Error, getting RSU status %i\n", ret);
771+ stratix10_svc_remove_async_client(priv->chan);
771772 stratix10_svc_free_channel(priv->chan);
773+ return ret;
772774 }
773775
774776 /* get DCMF version from firmware */
drivers/firmware/stratix10-svc.c+126−102
@@ -37,15 +37,14 @@ · 36 unmodified lines
3737 * service layer will return error to FPGA manager when timeout occurs,
3838 * timeout is set to 30 seconds (30 * 1000) at Intel Stratix10 SoC.
3939 */
40−#define SVC_NUM_DATA_IN_FIFO 32
40+#define SVC_NUM_DATA_IN_FIFO 8
4141 #define SVC_NUM_CHANNEL 4
42−#define FPGA_CONFIG_DATA_CLAIM_TIMEOUT_MS 200
42+#define FPGA_CONFIG_DATA_CLAIM_TIMEOUT_MS 2000
4343 #define FPGA_CONFIG_STATUS_TIMEOUT_SEC 30
4444 #define BYTE_TO_WORD_SIZE 4
4545
4646 /* stratix10 service layer clients */
4747 #define STRATIX10_RSU "stratix10-rsu"
48−#define INTEL_FCS "intel-fcs"
4948
5049 /* Maximum number of SDM client IDs. */
5150 #define MAX_SDM_CLIENT_IDS 16
@@ -105,11 +104,9 @@ struct stratix10_svc_chan; · 53 unmodified lines
105104 /**
106105 * struct stratix10_svc - svc private data
107106 * @stratix10_svc_rsu: pointer to stratix10 RSU device
108− * @intel_svc_fcs: pointer to the FCS device
109107 */
110108 struct stratix10_svc {
111109 struct platform_device *stratix10_svc_rsu;
112− struct platform_device *intel_svc_fcs;
113110 };
114111
115112 /**
@@ -251,12 +248,10 @@ struct stratix10_async_ctrl { · 135 unmodified lines
251248 * @num_active_client: number of active service client
252249 * @node: list management
253250 * @genpool: memory pool pointing to the memory region
254− * @task: pointer to the thread task which handles SMC or HVC call
255− * @svc_fifo: a queue for storing service message data
256251 * @complete_status: state for completion
257− * @svc_fifo_lock: protect access to service message data queue
258252 * @invoke_fn: function to issue secure monitor call or hypervisor call
259253 * @svc: manages the list of client svc drivers
254+ * @sdm_lock: only allows a single command single response to SDM
260255 * @actrl: async control structure
261256 *
262257 * This struct is used to create communication channels for service clients, to
@@ -269,12 +264,10 @@ struct stratix10_svc_controller { · 6 unmodified lines
269264 int num_active_client;
270265 struct list_head node;
271266 struct gen_pool *genpool;
272− struct task_struct *task;
273− struct kfifo svc_fifo;
274267 struct completion complete_status;
275− spinlock_t svc_fifo_lock;
276268 svc_invoke_fn *invoke_fn;
277269 struct stratix10_svc *svc;
270+ struct mutex sdm_lock;
278271 struct stratix10_async_ctrl actrl;
279272 };
280273
@@ -283,6 +276,9 @@ struct stratix10_svc_controller { · 2 unmodified lines
283276 * @ctrl: pointer to service controller which is the provider of this channel
284277 * @scl: pointer to service client which owns the channel
285278 * @name: service client name associated with the channel
279+ * @task: pointer to the thread task which handles SMC or HVC call
280+ * @svc_fifo: a queue for storing service message data (separate fifo for every channel)
281+ * @svc_fifo_lock: protect access to service message data queue (locking pending fifo)
286282 * @lock: protect access to the channel
287283 * @async_chan: reference to asynchronous channel object for this channel
288284 *
@@ -293,6 +289,9 @@ struct stratix10_svc_chan { · 4 unmodified lines
293289 struct stratix10_svc_controller *ctrl;
294290 struct stratix10_svc_client *scl;
295291 char *name;
292+ struct task_struct *task;
293+ struct kfifo svc_fifo;
294+ spinlock_t svc_fifo_lock;
296295 spinlock_t lock;
297296 struct stratix10_async_chan *async_chan;
298297 };
@@ -527,10 +526,10 @@ static void svc_thread_recv_status_ok(struct stratix10_svc_data *p_data, · 228 unmodified lines
527526 */
528527 static int svc_normal_to_secure_thread(void *data)
529528 {
530− struct stratix10_svc_controller
531− *ctrl = (struct stratix10_svc_controller *)data;
532− struct stratix10_svc_data *pdata;
533− struct stratix10_svc_cb_data *cbdata;
529+ struct stratix10_svc_chan *chan = (struct stratix10_svc_chan *)data;
530+ struct stratix10_svc_controller *ctrl = chan->ctrl;
531+ struct stratix10_svc_data *pdata = NULL;
532+ struct stratix10_svc_cb_data *cbdata = NULL;
534533 struct arm_smccc_res res;
535534 unsigned long a0, a1, a2, a3, a4, a5, a6, a7;
536535 int ret_fifo = 0;
@@ -555,12 +554,12 @@ static int svc_normal_to_secure_thread(void *data) · 18 unmodified lines
555554 a6 = 0;
556555 a7 = 0;
557556
558− pr_debug("smc_hvc_shm_thread is running\n");
557+ pr_debug("%s: %s: Thread is running!\n", __func__, chan->name);
559558
560559 while (!kthread_should_stop()) {
561− ret_fifo = kfifo_out_spinlocked(&ctrl->svc_fifo,
560+ ret_fifo = kfifo_out_spinlocked(&chan->svc_fifo,
562561 pdata, sizeof(*pdata),
563− &ctrl->svc_fifo_lock);
562+ &chan->svc_fifo_lock);
564563
565564 if (!ret_fifo)
566565 continue;
@@ -569,9 +568,25 @@ static int svc_normal_to_secure_thread(void *data) · 2 unmodified lines
569568 (unsigned int)pdata->paddr, pdata->command,
570569 (unsigned int)pdata->size);
571570
571+ /* SDM can only process one command at a time */
572+ pr_debug("%s: %s: Thread is waiting for mutex!\n",
573+ __func__, chan->name);
574+ if (mutex_lock_interruptible(&ctrl->sdm_lock)) {
575+ /* item already dequeued; notify client to unblock it */
576+ cbdata->status = BIT(SVC_STATUS_ERROR);
577+ cbdata->kaddr1 = NULL;
578+ cbdata->kaddr2 = NULL;
579+ cbdata->kaddr3 = NULL;
580+ if (pdata->chan->scl)
581+ pdata->chan->scl->receive_cb(pdata->chan->scl,
582+ cbdata);
583+ break;
584+ }
585+
572586 switch (pdata->command) {
573587 case COMMAND_RECONFIG_DATA_CLAIM:
574588 svc_thread_cmd_data_claim(ctrl, pdata, cbdata);
589+ mutex_unlock(&ctrl->sdm_lock);
575590 continue;
576591 case COMMAND_RECONFIG:
577592 a0 = INTEL_SIP_SMC_FPGA_CONFIG_START;
@@ -700,10 +715,11 @@ static int svc_normal_to_secure_thread(void *data) · 122 unmodified lines
700715 break;
701716 default:
702717 pr_warn("it shouldn't happen\n");
703− break;
718+ mutex_unlock(&ctrl->sdm_lock);
719+ continue;
704720 }
705− pr_debug("%s: before SMC call -- a0=0x%016x a1=0x%016x",
706− __func__,
721+ pr_debug("%s: %s: before SMC call -- a0=0x%016x a1=0x%016x",
722+ __func__, chan->name,
707723 (unsigned int)a0,
708724 (unsigned int)a1);
709725 pr_debug(" a2=0x%016x\n", (unsigned int)a2);
@@ -712,8 +728,8 @@ static int svc_normal_to_secure_thread(void *data) · 2 unmodified lines
712728 pr_debug(" a5=0x%016x\n", (unsigned int)a5);
713729 ctrl->invoke_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
714730
715− pr_debug("%s: after SMC call -- res.a0=0x%016x",
716− __func__, (unsigned int)res.a0);
731+ pr_debug("%s: %s: after SMC call -- res.a0=0x%016x",
732+ __func__, chan->name, (unsigned int)res.a0);
717733 pr_debug(" res.a1=0x%016x, res.a2=0x%016x",
718734 (unsigned int)res.a1, (unsigned int)res.a2);
719735 pr_debug(" res.a3=0x%016x\n", (unsigned int)res.a3);
@@ -728,6 +744,7 @@ static int svc_normal_to_secure_thread(void *data) · 8 unmodified lines
728744 cbdata->kaddr2 = NULL;
729745 cbdata->kaddr3 = NULL;
730746 pdata->chan->scl->receive_cb(pdata->chan->scl, cbdata);
747+ mutex_unlock(&ctrl->sdm_lock);
731748 continue;
732749 }
733750
@@ -801,6 +818,8 @@ static int svc_normal_to_secure_thread(void *data) · 67 unmodified lines
801818 break;
802819
803820 }
821+
822+ mutex_unlock(&ctrl->sdm_lock);
804823 }
805824
806825 kfree(cbdata);
@@ -1696,22 +1715,33 @@ int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg) · 889 unmodified lines
16961715 if (!p_data)
16971716 return -ENOMEM;
16981717
1699− /* first client will create kernel thread */
1700− if (!chan->ctrl->task) {
1701− chan->ctrl->task =
1702− kthread_run_on_cpu(svc_normal_to_secure_thread,
1703− (void *)chan->ctrl,
1704− cpu, "svc_smc_hvc_thread");
1705− if (IS_ERR(chan->ctrl->task)) {
1718+ /* first caller creates the per-channel kthread */
1719+ if (!chan->task) {
1720+ struct task_struct *task;
1721+
1722+ task = kthread_run_on_cpu(svc_normal_to_secure_thread,
1723+ (void *)chan,
1724+ cpu, "svc_smc_hvc_thread");
1725+ if (IS_ERR(task)) {
17061726 dev_err(chan->ctrl->dev,
17071727 "failed to create svc_smc_hvc_thread\n");
17081728 kfree(p_data);
17091729 return -EINVAL;
17101730 }
1731+
1732+ spin_lock(&chan->lock);
1733+ if (chan->task) {
1734+ /* another caller won the race; discard our thread */
1735+ spin_unlock(&chan->lock);
1736+ kthread_stop(task);
1737+ } else {
1738+ chan->task = task;
1739+ spin_unlock(&chan->lock);
1740+ }
17111741 }
17121742
1713− pr_debug("%s: sent P-va=%p, P-com=%x, P-size=%u\n", __func__,
1714− p_msg->payload, p_msg->command,
1743+ pr_debug("%s: %s: sent P-va=%p, P-com=%x, P-size=%u\n", __func__,
1744+ chan->name, p_msg->payload, p_msg->command,
17151745 (unsigned int)p_msg->payload_length);
17161746
17171747 if (list_empty(&svc_data_mem)) {
@@ -1747,12 +1777,16 @@ int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg) · 29 unmodified lines
17471777 p_data->arg[2] = p_msg->arg[2];
17481778 p_data->size = p_msg->payload_length;
17491779 p_data->chan = chan;
1750− pr_debug("%s: put to FIFO pa=0x%016x, cmd=%x, size=%u\n", __func__,
1751− (unsigned int)p_data->paddr, p_data->command,
1752− (unsigned int)p_data->size);
1753− ret = kfifo_in_spinlocked(&chan->ctrl->svc_fifo, p_data,
1780+ pr_debug("%s: %s: put to FIFO pa=0x%016x, cmd=%x, size=%u\n",
1781+ __func__,
1782+ chan->name,
1783+ (unsigned int)p_data->paddr,
1784+ p_data->command,
1785+ (unsigned int)p_data->size);
1786+
1787+ ret = kfifo_in_spinlocked(&chan->svc_fifo, p_data,
17541788 sizeof(*p_data),
1755− &chan->ctrl->svc_fifo_lock);
1789+ &chan->svc_fifo_lock);
17561790
17571791 kfree(p_data);
17581792
@@ -1773,11 +1807,12 @@ EXPORT_SYMBOL_GPL(stratix10_svc_send); · 14 unmodified lines
17731807 */
17741808 void stratix10_svc_done(struct stratix10_svc_chan *chan)
17751809 {
1776− /* stop thread when thread is running AND only one active client */
1777− if (chan->ctrl->task && chan->ctrl->num_active_client <= 1) {
1778− pr_debug("svc_smc_hvc_shm_thread is stopped\n");
1779− kthread_stop(chan->ctrl->task);
1780− chan->ctrl->task = NULL;
1810+ /* stop thread when thread is running */
1811+ if (chan->task) {
1812+ pr_debug("%s: %s: svc_smc_hvc_shm_thread is stopping\n",
1813+ __func__, chan->name);
1814+ kthread_stop(chan->task);
1815+ chan->task = NULL;
17811816 }
17821817 }
17831818 EXPORT_SYMBOL_GPL(stratix10_svc_done);
@@ -1817,8 +1852,8 @@ void *stratix10_svc_allocate_memory(struct stratix10_svc_chan *chan, · 33 unmodified lines
18171852 pmem->paddr = pa;
18181853 pmem->size = s;
18191854 list_add_tail(&pmem->node, &svc_data_mem);
1820− pr_debug("%s: va=%p, pa=0x%016x\n", __func__,
1821− pmem->vaddr, (unsigned int)pmem->paddr);
1855+ pr_debug("%s: %s: va=%p, pa=0x%016x\n", __func__,
1856+ chan->name, pmem->vaddr, (unsigned int)pmem->paddr);
18221857
18231858 return (void *)va;
18241859 }
@@ -1855,6 +1890,13 @@ static const struct of_device_id stratix10_svc_drv_match[] = { · 30 unmodified lines
18551890 {},
18561891 };
18571892
1893+static const char * const chan_names[SVC_NUM_CHANNEL] = {
1894+ SVC_CLIENT_FPGA,
1895+ SVC_CLIENT_RSU,
1896+ SVC_CLIENT_FCS,
1897+ SVC_CLIENT_HWMON
1898+};
1899+
18581900 static int stratix10_svc_drv_probe(struct platform_device *pdev)
18591901 {
18601902 struct device *dev = &pdev->dev;
@@ -1862,11 +1904,11 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) · 1 unmodified line
18621904 struct stratix10_svc_chan *chans;
18631905 struct gen_pool *genpool;
18641906 struct stratix10_svc_sh_memory *sh_memory;
1865− struct stratix10_svc *svc;
1907+ struct stratix10_svc *svc = NULL;
18661908
18671909 svc_invoke_fn *invoke_fn;
18681910 size_t fifo_size;
1869− int ret;
1911+ int ret, i = 0;
18701912
18711913 /* get SMC or HVC function */
18721914 invoke_fn = get_invoke_func(dev);
@@ -1905,8 +1947,8 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) · 32 unmodified lines
19051947 controller->num_active_client = 0;
19061948 controller->chans = chans;
19071949 controller->genpool = genpool;
1908− controller->task = NULL;
19091950 controller->invoke_fn = invoke_fn;
1951+ INIT_LIST_HEAD(&controller->node);
19101952 init_completion(&controller->complete_status);
19111953
19121954 ret = stratix10_svc_async_init(controller);
@@ -1917,32 +1959,20 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) · 4 unmodified lines
19171959 }
19181960
19191961 fifo_size = sizeof(struct stratix10_svc_data) * SVC_NUM_DATA_IN_FIFO;
1920− ret = kfifo_alloc(&controller->svc_fifo, fifo_size, GFP_KERNEL);
1921− if (ret) {
1922− dev_err(dev, "failed to allocate FIFO\n");
1923− goto err_async_exit;
1924− }
1925− spin_lock_init(&controller->svc_fifo_lock);
1926−
1927− chans[0].scl = NULL;
1928− chans[0].ctrl = controller;
1929− chans[0].name = SVC_CLIENT_FPGA;
1930− spin_lock_init(&chans[0].lock);
1962+ mutex_init(&controller->sdm_lock);
19311963
1932− chans[1].scl = NULL;
1933− chans[1].ctrl = controller;
1934− chans[1].name = SVC_CLIENT_RSU;
1935− spin_lock_init(&chans[1].lock);
1936−
1937− chans[2].scl = NULL;
1938− chans[2].ctrl = controller;
1939− chans[2].name = SVC_CLIENT_FCS;
1940− spin_lock_init(&chans[2].lock);
1941−
1942− chans[3].scl = NULL;
1943− chans[3].ctrl = controller;
1944− chans[3].name = SVC_CLIENT_HWMON;
1945− spin_lock_init(&chans[3].lock);
1964+ for (i = 0; i < SVC_NUM_CHANNEL; i++) {
1965+ chans[i].scl = NULL;
1966+ chans[i].ctrl = controller;
1967+ chans[i].name = (char *)chan_names[i];
1968+ spin_lock_init(&chans[i].lock);
1969+ ret = kfifo_alloc(&chans[i].svc_fifo, fifo_size, GFP_KERNEL);
1970+ if (ret) {
1971+ dev_err(dev, "failed to allocate FIFO %d\n", i);
1972+ goto err_free_fifos;
1973+ }
1974+ spin_lock_init(&chans[i].svc_fifo_lock);
1975+ }
19461976
19471977 list_add_tail(&controller->node, &svc_ctrl);
19481978 platform_set_drvdata(pdev, controller);
@@ -1951,7 +1981,7 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) · 2 unmodified lines
19511981 svc = devm_kzalloc(dev, sizeof(*svc), GFP_KERNEL);
19521982 if (!svc) {
19531983 ret = -ENOMEM;
1954− goto err_free_kfifo;
1984+ goto err_free_fifos;
19551985 }
19561986 controller->svc = svc;
19571987
@@ -1959,51 +1989,43 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) · 1 unmodified line
19591989 if (!svc->stratix10_svc_rsu) {
19601990 dev_err(dev, "failed to allocate %s device\n", STRATIX10_RSU);
19611991 ret = -ENOMEM;
1962− goto err_free_kfifo;
1992+ goto err_free_fifos;
19631993 }
19641994
19651995 ret = platform_device_add(svc->stratix10_svc_rsu);
1966− if (ret) {
1967− platform_device_put(svc->stratix10_svc_rsu);
1968− goto err_free_kfifo;
1969− }
1970−
1971− svc->intel_svc_fcs = platform_device_alloc(INTEL_FCS, 1);
1972− if (!svc->intel_svc_fcs) {
1973− dev_err(dev, "failed to allocate %s device\n", INTEL_FCS);
1974− ret = -ENOMEM;
1975− goto err_unregister_rsu_dev;
1976− }
1977−
1978− ret = platform_device_add(svc->intel_svc_fcs);
1979− if (ret) {
1980− platform_device_put(svc->intel_svc_fcs);
1981− goto err_unregister_rsu_dev;
1982− }
1996+ if (ret)
1997+ goto err_put_device;
19831998
19841999 ret = of_platform_default_populate(dev_of_node(dev), NULL, dev);
19852000 if (ret)
1986− goto err_unregister_fcs_dev;
2001+ goto err_unregister_rsu_dev;
19872002
19882003 pr_info("Intel Service Layer Driver Initialized\n");
19892004
19902005 return 0;
19912006
1992−err_unregister_fcs_dev:
1993− platform_device_unregister(svc->intel_svc_fcs);
19942007 err_unregister_rsu_dev:
19952008 platform_device_unregister(svc->stratix10_svc_rsu);
1996−err_free_kfifo:
1997− kfifo_free(&controller->svc_fifo);
1998−err_async_exit:
2009+ goto err_free_fifos;
2010+err_put_device:
2011+ platform_device_put(svc->stratix10_svc_rsu);
2012+err_free_fifos:
2013+ /* only remove from list if list_add_tail() was reached */
2014+ if (!list_empty(&controller->node))
2015+ list_del(&controller->node);
2016+ /* free only the FIFOs that were successfully allocated */
2017+ while (i--)
2018+ kfifo_free(&chans[i].svc_fifo);
19992019 stratix10_svc_async_exit(controller);
20002020 err_destroy_pool:
20012021 gen_pool_destroy(genpool);
2022+
20022023 return ret;
20032024 }
20042025
20052026 static void stratix10_svc_drv_remove(struct platform_device *pdev)
20062027 {
2028+ int i;
20072029 struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
20082030 struct stratix10_svc *svc = ctrl->svc;
20092031
@@ -2011,14 +2033,16 @@ static void stratix10_svc_drv_remove(struct platform_device *pdev) · 1 unmodified line
20112033
20122034 of_platform_depopulate(ctrl->dev);
20132035
2014− platform_device_unregister(svc->intel_svc_fcs);
20152036 platform_device_unregister(svc->stratix10_svc_rsu);
20162037
2017− kfifo_free(&ctrl->svc_fifo);
2018− if (ctrl->task) {
2019− kthread_stop(ctrl->task);
2020− ctrl->task = NULL;
2038+ for (i = 0; i < SVC_NUM_CHANNEL; i++) {
2039+ if (ctrl->chans[i].task) {
2040+ kthread_stop(ctrl->chans[i].task);
2041+ ctrl->chans[i].task = NULL;
2042+ }
2043+ kfifo_free(&ctrl->chans[i].svc_fifo);
20212044 }
2045+
20222046 if (ctrl->genpool)
20232047 gen_pool_destroy(ctrl->genpool);
20242048 list_del(&ctrl->node);
drivers/gpib/Kconfig+1−0
@@ -122,6 +122,7 @@ config GPIB_FLUKE · 121 unmodified lines
122122 depends on OF
123123 select GPIB_COMMON
124124 select GPIB_NEC7210
125+ depends on HAS_IOMEM
125126 help
126127 GPIB driver for Fluke based cda devices.
127128
drivers/gpib/common/gpib_os.c+73−23
@@ -888,10 +888,6 @@ static int read_ioctl(struct gpib_file_private *file_priv, struct gpib_board *bo · 887 unmodified lines
888888 if (read_cmd.completed_transfer_count > read_cmd.requested_transfer_count)
889889 return -EINVAL;
890890
891− desc = handle_to_descriptor(file_priv, read_cmd.handle);
892− if (!desc)
893− return -EINVAL;
894−
895891 if (WARN_ON_ONCE(sizeof(userbuf) > sizeof(read_cmd.buffer_ptr)))
896892 return -EFAULT;
897893
@@ -904,6 +900,17 @@ static int read_ioctl(struct gpib_file_private *file_priv, struct gpib_board *bo · 6 unmodified lines
904900 if (!access_ok(userbuf, remain))
905901 return -EFAULT;
906902
903+ /* Lock descriptors to prevent concurrent close from freeing descriptor */
904+ if (mutex_lock_interruptible(&file_priv->descriptors_mutex))
905+ return -ERESTARTSYS;
906+ desc = handle_to_descriptor(file_priv, read_cmd.handle);
907+ if (!desc) {
908+ mutex_unlock(&file_priv->descriptors_mutex);
909+ return -EINVAL;
910+ }
911+ atomic_inc(&desc->descriptor_busy);
912+ mutex_unlock(&file_priv->descriptors_mutex);
913+
907914 atomic_set(&desc->io_in_progress, 1);
908915
909916 /* Read buffer loads till we fill the user supplied buffer */
@@ -937,6 +944,7 @@ static int read_ioctl(struct gpib_file_private *file_priv, struct gpib_board *bo · 27 unmodified lines
937944 retval = copy_to_user((void __user *)arg, &read_cmd, sizeof(read_cmd));
938945
939946 atomic_set(&desc->io_in_progress, 0);
947+ atomic_dec(&desc->descriptor_busy);
940948
941949 wake_up_interruptible(&board->wait);
942950 if (retval)
@@ -964,10 +972,6 @@ static int command_ioctl(struct gpib_file_private *file_priv, · 21 unmodified lines
964972 if (cmd.completed_transfer_count > cmd.requested_transfer_count)
965973 return -EINVAL;
966974
967− desc = handle_to_descriptor(file_priv, cmd.handle);
968− if (!desc)
969− return -EINVAL;
970−
971975 userbuf = (u8 __user *)(unsigned long)cmd.buffer_ptr;
972976 userbuf += cmd.completed_transfer_count;
973977
@@ -980,6 +984,17 @@ static int command_ioctl(struct gpib_file_private *file_priv, · 6 unmodified lines
980984 if (!access_ok(userbuf, remain))
981985 return -EFAULT;
982986
987+ /* Lock descriptors to prevent concurrent close from freeing descriptor */
988+ if (mutex_lock_interruptible(&file_priv->descriptors_mutex))
989+ return -ERESTARTSYS;
990+ desc = handle_to_descriptor(file_priv, cmd.handle);
991+ if (!desc) {
992+ mutex_unlock(&file_priv->descriptors_mutex);
993+ return -EINVAL;
994+ }
995+ atomic_inc(&desc->descriptor_busy);
996+ mutex_unlock(&file_priv->descriptors_mutex);
997+
983998 /*
984999 * Write buffer loads till we empty the user supplied buffer.
9851000 * Call drivers at least once, even if remain is zero, in
@@ -1003,6 +1018,7 @@ static int command_ioctl(struct gpib_file_private *file_priv, · 17 unmodified lines
10031018 userbuf += bytes_written;
10041019 if (retval < 0) {
10051020 atomic_set(&desc->io_in_progress, 0);
1021+ atomic_dec(&desc->descriptor_busy);
10061022
10071023 wake_up_interruptible(&board->wait);
10081024 break;
@@ -1022,6 +1038,7 @@ static int command_ioctl(struct gpib_file_private *file_priv, · 13 unmodified lines
10221038 */
10231039 if (!no_clear_io_in_prog || fault)
10241040 atomic_set(&desc->io_in_progress, 0);
1041+ atomic_dec(&desc->descriptor_busy);
10251042
10261043 wake_up_interruptible(&board->wait);
10271044 if (fault)
@@ -1047,10 +1064,6 @@ static int write_ioctl(struct gpib_file_private *file_priv, struct gpib_board *b · 19 unmodified lines
10471064 if (write_cmd.completed_transfer_count > write_cmd.requested_transfer_count)
10481065 return -EINVAL;
10491066
1050− desc = handle_to_descriptor(file_priv, write_cmd.handle);
1051− if (!desc)
1052− return -EINVAL;
1053−
10541067 userbuf = (u8 __user *)(unsigned long)write_cmd.buffer_ptr;
10551068 userbuf += write_cmd.completed_transfer_count;
10561069
@@ -1060,6 +1073,17 @@ static int write_ioctl(struct gpib_file_private *file_priv, struct gpib_board *b · 3 unmodified lines
10601073 if (!access_ok(userbuf, remain))
10611074 return -EFAULT;
10621075
1076+ /* Lock descriptors to prevent concurrent close from freeing descriptor */
1077+ if (mutex_lock_interruptible(&file_priv->descriptors_mutex))
1078+ return -ERESTARTSYS;
1079+ desc = handle_to_descriptor(file_priv, write_cmd.handle);
1080+ if (!desc) {
1081+ mutex_unlock(&file_priv->descriptors_mutex);
1082+ return -EINVAL;
1083+ }
1084+ atomic_inc(&desc->descriptor_busy);
1085+ mutex_unlock(&file_priv->descriptors_mutex);
1086+
10631087 atomic_set(&desc->io_in_progress, 1);
10641088
10651089 /* Write buffer loads till we empty the user supplied buffer */
@@ -1094,6 +1118,7 @@ static int write_ioctl(struct gpib_file_private *file_priv, struct gpib_board *b · 28 unmodified lines
10941118 fault = copy_to_user((void __user *)arg, &write_cmd, sizeof(write_cmd));
10951119
10961120 atomic_set(&desc->io_in_progress, 0);
1121+ atomic_dec(&desc->descriptor_busy);
10971122
10981123 wake_up_interruptible(&board->wait);
10991124 if (fault)
@@ -1276,6 +1301,9 @@ static int close_dev_ioctl(struct file *filep, struct gpib_board *board, unsigne · 176 unmodified lines
12761301 {
12771302 struct gpib_close_dev_ioctl cmd;
12781303 struct gpib_file_private *file_priv = filep->private_data;
1304+ struct gpib_descriptor *desc;
1305+ unsigned int pad;
1306+ int sad;
12791307 int retval;
12801308
12811309 retval = copy_from_user(&cmd, (void __user *)arg, sizeof(cmd));
@@ -1284,19 +1312,27 @@ static int close_dev_ioctl(struct file *filep, struct gpib_board *board, unsigne · 2 unmodified lines
12841312
12851313 if (cmd.handle >= GPIB_MAX_NUM_DESCRIPTORS)
12861314 return -EINVAL;
1287− if (!file_priv->descriptors[cmd.handle])
1288− return -EINVAL;
12891315
1290− retval = decrement_open_device_count(board, &board->device_list,
1291− file_priv->descriptors[cmd.handle]->pad,
1292− file_priv->descriptors[cmd.handle]->sad);
1293− if (retval < 0)
1294− return retval;
1295−
1296− kfree(file_priv->descriptors[cmd.handle]);
1316+ mutex_lock(&file_priv->descriptors_mutex);
1317+ desc = file_priv->descriptors[cmd.handle];
1318+ if (!desc) {
1319+ mutex_unlock(&file_priv->descriptors_mutex);
1320+ return -EINVAL;
1321+ }
1322+ if (atomic_read(&desc->descriptor_busy)) {
1323+ mutex_unlock(&file_priv->descriptors_mutex);
1324+ return -EBUSY;
1325+ }
1326+ /* Remove from table while holding lock to prevent new IO from starting */
12971327 file_priv->descriptors[cmd.handle] = NULL;
1328+ pad = desc->pad;
1329+ sad = desc->sad;
1330+ mutex_unlock(&file_priv->descriptors_mutex);
12981331
1299− return 0;
1332+ retval = decrement_open_device_count(board, &board->device_list, pad, sad);
1333+
1334+ kfree(desc);
1335+ return retval;
13001336 }
13011337
13021338 static int serial_poll_ioctl(struct gpib_board *board, unsigned long arg)
@@ -1331,12 +1367,25 @@ static int wait_ioctl(struct gpib_file_private *file_priv, struct gpib_board *bo · 28 unmodified lines
13311367 if (retval)
13321368 return -EFAULT;
13331369
1370+ /*
1371+ * Lock descriptors to prevent concurrent close from freeing
1372+ * descriptor. ibwait() releases big_gpib_mutex when wait_mask
1373+ * is non-zero, so desc must be pinned with descriptor_busy.
1374+ */
1375+ mutex_lock(&file_priv->descriptors_mutex);
13341376 desc = handle_to_descriptor(file_priv, wait_cmd.handle);
1335− if (!desc)
1377+ if (!desc) {
1378+ mutex_unlock(&file_priv->descriptors_mutex);
13361379 return -EINVAL;
1380+ }
1381+ atomic_inc(&desc->descriptor_busy);
1382+ mutex_unlock(&file_priv->descriptors_mutex);
13371383
13381384 retval = ibwait(board, wait_cmd.wait_mask, wait_cmd.clear_mask,
13391385 wait_cmd.set_mask, &wait_cmd.ibsta, wait_cmd.usec_timeout, desc);
1386+
1387+ atomic_dec(&desc->descriptor_busy);
1388+
13401389 if (retval < 0)
13411390 return retval;
13421391
@@ -2035,6 +2084,7 @@ void init_gpib_descriptor(struct gpib_descriptor *desc) · 692 unmodified lines
20352084 desc->is_board = 0;
20362085 desc->autopoll_enabled = 0;
20372086 atomic_set(&desc->io_in_progress, 0);
2087+ atomic_set(&desc->descriptor_busy, 0);
20382088 }
20392089
20402090 int gpib_register_driver(struct gpib_interface *interface, struct module *provider_module)
drivers/gpib/include/gpib_types.h+8−0
@@ -364,6 +364,14 @@ struct gpib_descriptor { · 363 unmodified lines
364364 unsigned int pad; /* primary gpib address */
365365 int sad; /* secondary gpib address (negative means disabled) */
366366 atomic_t io_in_progress;
367+ /*
368+ * Kernel-only reference count to prevent descriptor from being
369+ * freed while IO handlers hold a pointer to it. Incremented
370+ * before each IO operation, decremented when done. Unlike
371+ * io_in_progress, this cannot be modified from userspace via
372+ * general_ibstatus().
373+ */
374+ atomic_t descriptor_busy;
367375 unsigned is_board : 1;
368376 unsigned autopoll_enabled : 1;
369377 };
drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c+6−5
@@ -38,8 +38,10 @@ MODULE_DESCRIPTION("GPIB driver for LPVO usb devices"); · 37 unmodified lines
3838 /*
3939 * Table of devices that work with this driver.
4040 *
41− * Currently, only one device is known to be used in the
42− * lpvo_usb_gpib adapter (FTDI 0403:6001).
41+ * Currently, only one device is known to be used in the lpvo_usb_gpib
42+ * adapter (FTDI 0403:6001) but as this device id is already handled by the
43+ * ftdi_sio USB serial driver the LPVO driver must not bind to it by default.
44+ *
4345 * If your adapter uses a different chip, insert a line
4446 * in the following table with proper <Vendor-id>, <Product-id>.
4547 *
@@ -50,7 +52,6 @@ MODULE_DESCRIPTION("GPIB driver for LPVO usb devices"); · 4 unmodified lines
5052 */
5153
5254 static const struct usb_device_id skel_table[] = {
53− { USB_DEVICE(0x0403, 0x6001) },
5455 { } /* Terminating entry */
5556 };
5657 MODULE_DEVICE_TABLE(usb, skel_table);
@@ -405,7 +406,7 @@ static int usb_gpib_attach(struct gpib_board *board, const struct gpib_board_con · 348 unmodified lines
405406 for (j = 0 ; j < MAX_DEV ; j++) {
406407 if ((assigned_usb_minors & 1 << j) == 0)
407408 continue;
408− udev = usb_get_dev(interface_to_usbdev(lpvo_usb_interfaces[j]));
409+ udev = interface_to_usbdev(lpvo_usb_interfaces[j]);
409410 device_path = kobject_get_path(&udev->dev.kobj, GFP_KERNEL);
410411 match = gpib_match_device_path(&lpvo_usb_interfaces[j]->dev,
411412 config->device_path);
@@ -420,7 +421,7 @@ static int usb_gpib_attach(struct gpib_board *board, const struct gpib_board_con · 8 unmodified lines
420421 for (j = 0 ; j < MAX_DEV ; j++) {
421422 if ((assigned_usb_minors & 1 << j) == 0)
422423 continue;
423− udev = usb_get_dev(interface_to_usbdev(lpvo_usb_interfaces[j]));
424+ udev = interface_to_usbdev(lpvo_usb_interfaces[j]);
424425 DIA_LOG(1, "dev. %d: bus %d -> %d dev: %d -> %d\n", j,
425426 udev->bus->busnum, config->pci_bus, udev->devnum, config->pci_slot);
426427 if (config->pci_bus == udev->bus->busnum &&
drivers/gpio/gpio-mxc.c+9−1
@@ -584,12 +584,13 @@ static bool mxc_gpio_set_pad_wakeup(struct mxc_gpio_port *port, bool enable) · 583 unmodified lines
584584 unsigned long config;
585585 bool ret = false;
586586 int i, type;
587+ bool is_imx8qm = of_device_is_compatible(port->dev->of_node, "fsl,imx8qm-gpio");
587588
588589 static const u32 pad_type_map[] = {
589590 IMX_SCU_WAKEUP_OFF, /* 0 */
590591 IMX_SCU_WAKEUP_RISE_EDGE, /* IRQ_TYPE_EDGE_RISING */
591592 IMX_SCU_WAKEUP_FALL_EDGE, /* IRQ_TYPE_EDGE_FALLING */
592− IMX_SCU_WAKEUP_FALL_EDGE, /* IRQ_TYPE_EDGE_BOTH */
593+ IMX_SCU_WAKEUP_RISE_EDGE, /* IRQ_TYPE_EDGE_BOTH */
593594 IMX_SCU_WAKEUP_HIGH_LVL, /* IRQ_TYPE_LEVEL_HIGH */
594595 IMX_SCU_WAKEUP_OFF, /* 5 */
595596 IMX_SCU_WAKEUP_OFF, /* 6 */
@@ -604,6 +605,13 @@ static bool mxc_gpio_set_pad_wakeup(struct mxc_gpio_port *port, bool enable) · 8 unmodified lines
604605 config = pad_type_map[type];
605606 else
606607 config = IMX_SCU_WAKEUP_OFF;
608+
609+ if (is_imx8qm && config == IMX_SCU_WAKEUP_FALL_EDGE) {
610+ dev_warn_once(port->dev,
611+ "No falling-edge support for wakeup on i.MX8QM\n");
612+ config = IMX_SCU_WAKEUP_OFF;
613+ }
614+
607615 ret |= mxc_gpio_generic_config(port, i, config);
608616 }
609617 }
drivers/gpio/gpio-qixis-fpga.c+2−2
@@ -60,8 +60,8 @@ static int qixis_cpld_gpio_probe(struct platform_device *pdev) · 59 unmodified lines
6060 return PTR_ERR(reg);
6161
6262 regmap = devm_regmap_init_mmio(&pdev->dev, reg, &regmap_config_8r_8v);
63− if (!regmap)
64− return -ENODEV;
63+ if (IS_ERR(regmap))
64+ return PTR_ERR(regmap);
6565
6666 /* In this case, the offset of our register is 0 inside the
6767 * regmap area that we just created.
drivers/gpio/gpiolib-shared.c+41−16
@@ -443,8 +443,8 @@ static bool gpio_shared_dev_is_reset_gpio(struct device *consumer, · 442 unmodified lines
443443 }
444444 #endif /* CONFIG_RESET_GPIO */
445445
446−int gpio_shared_add_proxy_lookup(struct device *consumer, const char *con_id,
447− unsigned long lflags)
446+int gpio_shared_add_proxy_lookup(struct device *consumer, struct fwnode_handle *fwnode,
447+ const char *con_id, unsigned long lflags)
448448 {
449449 const char *dev_id = dev_name(consumer);
450450 struct gpiod_lookup_table *lookup;
@@ -458,7 +458,7 @@ int gpio_shared_add_proxy_lookup(struct device *consumer, const char *con_id, · 7 unmodified lines
458458 if (!ref->fwnode && device_is_compatible(consumer, "reset-gpio")) {
459459 if (!gpio_shared_dev_is_reset_gpio(consumer, entry, ref))
460460 continue;
461− } else if (!device_match_fwnode(consumer, ref->fwnode)) {
461+ } else if (fwnode != ref->fwnode) {
462462 continue;
463463 }
464464
@@ -506,8 +506,9 @@ static void gpio_shared_remove_adev(struct auxiliary_device *adev) · 41 unmodified lines
506506 auxiliary_device_uninit(adev);
507507 }
508508
509−int gpio_device_setup_shared(struct gpio_device *gdev)
509+int gpiochip_setup_shared(struct gpio_chip *gc)
510510 {
511+ struct gpio_device *gdev = gc->gpiodev;
511512 struct gpio_shared_entry *entry;
512513 struct gpio_shared_ref *ref;
513514 struct gpio_desc *desc;
@@ -538,20 +539,42 @@ int gpio_device_setup_shared(struct gpio_device *gdev) · 24 unmodified lines
538539 if (list_count_nodes(&entry->refs) <= 1)
539540 continue;
540541
541− desc = &gdev->descs[entry->offset];
542+ scoped_guard(mutex, &entry->lock) {
543+#if IS_ENABLED(CONFIG_OF)
544+ if (is_of_node(entry->fwnode) && gc->of_xlate) {
545+ /*
546+ * This is the earliest that we can tranlate the
547+ * devicetree offset to the chip offset.
548+ */
549+ struct of_phandle_args gpiospec = { };
542550
543− __set_bit(GPIOD_FLAG_SHARED, &desc->flags);
544− /*
545− * Shared GPIOs are not requested via the normal path. Make
546− * them inaccessible to anyone even before we register the
547− * chip.
548− */
549− ret = gpiod_request_commit(desc, "shared");
550− if (ret)
551− return ret;
551+ gpiospec.np = to_of_node(entry->fwnode);
552+ gpiospec.args_count = 2;
553+ gpiospec.args[0] = entry->offset;
554+
555+ ret = gc->of_xlate(gc, &gpiospec, NULL);
556+ if (ret < 0)
557+ return ret;
558+
559+ entry->offset = ret;
560+ }
561+#endif /* CONFIG_OF */
562+
563+ desc = &gdev->descs[entry->offset];
564+
565+ __set_bit(GPIOD_FLAG_SHARED, &desc->flags);
566+ /*
567+ * Shared GPIOs are not requested via the normal path. Make
568+ * them inaccessible to anyone even before we register the
569+ * chip.
570+ */
571+ ret = gpiod_request_commit(desc, "shared");
572+ if (ret)
573+ return ret;
552574
553− pr_debug("GPIO %u owned by %s is shared by multiple consumers\n",
554− entry->offset, gpio_device_get_label(gdev));
575+ pr_debug("GPIO %u owned by %s is shared by multiple consumers\n",
576+ entry->offset, gpio_device_get_label(gdev));
577+ }
555578
556579 list_for_each_entry(ref, &entry->refs, list) {
557580 pr_debug("Setting up a shared GPIO entry for %s (con_id: '%s')\n",
@@ -575,6 +598,8 @@ void gpio_device_teardown_shared(struct gpio_device *gdev) · 17 unmodified lines
575598 struct gpio_shared_ref *ref;
576599
577600 list_for_each_entry(entry, &gpio_shared_list, list) {
601+ guard(mutex)(&entry->lock);
602+
578603 if (!device_match_fwnode(&gdev->dev, entry->fwnode))
579604 continue;
580605
drivers/gpio/gpiolib-shared.h+7−4
@@ -11,17 +11,19 @@ · 10 unmodified lines
1111 struct gpio_device;
1212 struct gpio_desc;
1313 struct device;
14+struct fwnode_handle;
1415
1516 #if IS_ENABLED(CONFIG_GPIO_SHARED)
1617
17−int gpio_device_setup_shared(struct gpio_device *gdev);
18+int gpiochip_setup_shared(struct gpio_chip *gc);
1819 void gpio_device_teardown_shared(struct gpio_device *gdev);
19−int gpio_shared_add_proxy_lookup(struct device *consumer, const char *con_id,
20− unsigned long lflags);
20+int gpio_shared_add_proxy_lookup(struct device *consumer,
21+ struct fwnode_handle *fwnode,
22+ const char *con_id, unsigned long lflags);
2123
2224 #else
2325
24−static inline int gpio_device_setup_shared(struct gpio_device *gdev)
26+static inline int gpiochip_setup_shared(struct gpio_chip *gc)
2527 {
2628 return 0;
2729 }
@@ -29,6 +31,7 @@ static inline int gpio_device_setup_shared(struct gpio_device *gdev) · 1 unmodified line
2931 static inline void gpio_device_teardown_shared(struct gpio_device *gdev) { }
3032
3133 static inline int gpio_shared_add_proxy_lookup(struct device *consumer,
34+ struct fwnode_handle *fwnode,
3235 const char *con_id,
3336 unsigned long lflags)
3437 {
drivers/gpio/gpiolib.c+55−58
@@ -892,13 +892,15 @@ static const struct device_type gpio_dev_type = { · 891 unmodified lines
892892 #define gcdev_unregister(gdev) device_del(&(gdev)->dev)
893893 #endif
894894
895+/*
896+ * An initial reference count has been held in gpiochip_add_data_with_key().
897+ * The caller should drop the reference via gpio_device_put() on errors.
898+ */
895899 static int gpiochip_setup_dev(struct gpio_device *gdev)
896900 {
897901 struct fwnode_handle *fwnode = dev_fwnode(&gdev->dev);
898902 int ret;
899903
900− device_initialize(&gdev->dev);
901−
902904 /*
903905 * If fwnode doesn't belong to another device, it's safe to clear its
904906 * initialized flag.
@@ -964,9 +966,11 @@ static void gpiochip_setup_devs(void) · 59 unmodified lines
964966 list_for_each_entry_srcu(gdev, &gpio_devices, list,
965967 srcu_read_lock_held(&gpio_devices_srcu)) {
966968 ret = gpiochip_setup_dev(gdev);
967− if (ret)
969+ if (ret) {
970+ gpio_device_put(gdev);
968971 dev_err(&gdev->dev,
969972 "Failed to initialize gpio device (%d)\n", ret);
973+ }
970974 }
971975 }
972976
@@ -1047,71 +1051,72 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 74 unmodified lines
10471051 int base = 0;
10481052 int ret;
10491053
1050− /*
1051− * First: allocate and populate the internal stat container, and
1052− * set up the struct device.
1053− */
10541054 gdev = kzalloc(sizeof(*gdev), GFP_KERNEL);
10551055 if (!gdev)
10561056 return -ENOMEM;
1057−
1058− gdev->dev.type = &gpio_dev_type;
1059− gdev->dev.bus = &gpio_bus_type;
1060− gdev->dev.parent = gc->parent;
1061− rcu_assign_pointer(gdev->chip, gc);
1062−
10631057 gc->gpiodev = gdev;
10641058 gpiochip_set_data(gc, data);
10651059
1066− device_set_node(&gdev->dev, gpiochip_choose_fwnode(gc));
1067−
10681060 ret = ida_alloc(&gpio_ida, GFP_KERNEL);
10691061 if (ret < 0)
10701062 goto err_free_gdev;
10711063 gdev->id = ret;
10721064
1073− ret = dev_set_name(&gdev->dev, GPIOCHIP_NAME "%d", gdev->id);
1065+ ret = init_srcu_struct(&gdev->srcu);
10741066 if (ret)
10751067 goto err_free_ida;
1068+ rcu_assign_pointer(gdev->chip, gc);
10761069
1077− if (gc->parent && gc->parent->driver)
1078− gdev->owner = gc->parent->driver->owner;
1079− else if (gc->owner)
1080− /* TODO: remove chip->owner */
1081− gdev->owner = gc->owner;
1082− else
1083− gdev->owner = THIS_MODULE;
1070+ ret = init_srcu_struct(&gdev->desc_srcu);
1071+ if (ret)
1072+ goto err_cleanup_gdev_srcu;
1073+
1074+ ret = dev_set_name(&gdev->dev, GPIOCHIP_NAME "%d", gdev->id);
1075+ if (ret)
1076+ goto err_cleanup_desc_srcu;
1077+
1078+ device_initialize(&gdev->dev);
1079+ /*
1080+ * After this point any allocated resources to `gdev` will be
1081+ * free():ed by gpiodev_release(). If you add new resources
1082+ * then make sure they get free():ed there.
1083+ */
1084+ gdev->dev.type = &gpio_dev_type;
1085+ gdev->dev.bus = &gpio_bus_type;
1086+ gdev->dev.parent = gc->parent;
1087+ device_set_node(&gdev->dev, gpiochip_choose_fwnode(gc));
10841088
10851089 ret = gpiochip_get_ngpios(gc, &gdev->dev);
10861090 if (ret)
1087− goto err_free_dev_name;
1091+ goto err_put_device;
1092+ gdev->ngpio = gc->ngpio;
10881093
10891094 gdev->descs = kcalloc(gc->ngpio, sizeof(*gdev->descs), GFP_KERNEL);
10901095 if (!gdev->descs) {
10911096 ret = -ENOMEM;
1092− goto err_free_dev_name;
1097+ goto err_put_device;
10931098 }
10941099
10951100 gdev->label = kstrdup_const(gc->label ?: "unknown", GFP_KERNEL);
10961101 if (!gdev->label) {
10971102 ret = -ENOMEM;
1098− goto err_free_descs;
1103+ goto err_put_device;
10991104 }
11001105
1101− gdev->ngpio = gc->ngpio;
11021106 gdev->can_sleep = gc->can_sleep;
1103−
11041107 rwlock_init(&gdev->line_state_lock);
11051108 RAW_INIT_NOTIFIER_HEAD(&gdev->line_state_notifier);
11061109 BLOCKING_INIT_NOTIFIER_HEAD(&gdev->device_notifier);
1107−
1108− ret = init_srcu_struct(&gdev->srcu);
1109− if (ret)
1110− goto err_free_label;
1111−
1112− ret = init_srcu_struct(&gdev->desc_srcu);
1113− if (ret)
1114− goto err_cleanup_gdev_srcu;
1110+#ifdef CONFIG_PINCTRL
1111+ INIT_LIST_HEAD(&gdev->pin_ranges);
1112+#endif
1113+ if (gc->parent && gc->parent->driver)
1114+ gdev->owner = gc->parent->driver->owner;
1115+ else if (gc->owner)
1116+ /* TODO: remove chip->owner */
1117+ gdev->owner = gc->owner;
1118+ else
1119+ gdev->owner = THIS_MODULE;
11151120
11161121 scoped_guard(mutex, &gpio_devices_lock) {
11171122 /*
@@ -1127,7 +1132,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 9 unmodified lines
11271132 if (base < 0) {
11281133 ret = base;
11291134 base = 0;
1130− goto err_cleanup_desc_srcu;
1135+ goto err_put_device;
11311136 }
11321137
11331138 /*
@@ -1147,14 +1152,10 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 13 unmodified lines
11471152 ret = gpiodev_add_to_list_unlocked(gdev);
11481153 if (ret) {
11491154 gpiochip_err(gc, "GPIO integer space overlap, cannot add chip\n");
1150− goto err_cleanup_desc_srcu;
1155+ goto err_put_device;
11511156 }
11521157 }
11531158
1154−#ifdef CONFIG_PINCTRL
1155− INIT_LIST_HEAD(&gdev->pin_ranges);
1156−#endif
1157−
11581159 if (gc->names)
11591160 gpiochip_set_desc_names(gc);
11601161
@@ -1210,7 +1211,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, · 49 unmodified lines
12101211 if (ret)
12111212 goto err_remove_irqchip_mask;
12121213
1213− ret = gpio_device_setup_shared(gdev);
1214+ ret = gpiochip_setup_shared(gc);
12141215 if (ret)
12151216 goto err_remove_irqchip;
12161217
@@ -1248,25 +1249,19 @@ err_remove_from_list: · 31 unmodified lines
12481249 scoped_guard(mutex, &gpio_devices_lock)
12491250 list_del_rcu(&gdev->list);
12501251 synchronize_srcu(&gpio_devices_srcu);
1251− if (gdev->dev.release) {
1252− /* release() has been registered by gpiochip_setup_dev() */
1253− gpio_device_put(gdev);
1254− goto err_print_message;
1255− }
1252+err_put_device:
1253+ gpio_device_put(gdev);
1254+ goto err_print_message;
1255+
12561256 err_cleanup_desc_srcu:
12571257 cleanup_srcu_struct(&gdev->desc_srcu);
12581258 err_cleanup_gdev_srcu:
12591259 cleanup_srcu_struct(&gdev->srcu);
1260−err_free_label:
1261− kfree_const(gdev->label);
1262−err_free_descs:
1263− kfree(gdev->descs);
1264−err_free_dev_name:
1265− kfree(dev_name(&gdev->dev));
12661260 err_free_ida:
12671261 ida_free(&gpio_ida, gdev->id);
12681262 err_free_gdev:
12691263 kfree(gdev);
1264+
12701265 err_print_message:
12711266 /* failures here can mean systems won't boot... */
12721267 if (ret != -EPROBE_DEFER) {
@@ -2465,8 +2460,10 @@ int gpiod_request_commit(struct gpio_desc *desc, const char *label) · 1192 unmodified lines
24652460 return -EBUSY;
24662461
24672462 offset = gpiod_hwgpio(desc);
2468− if (!gpiochip_line_is_valid(guard.gc, offset))
2469− return -EINVAL;
2463+ if (!gpiochip_line_is_valid(guard.gc, offset)) {
2464+ ret = -EINVAL;
2465+ goto out_clear_bit;
2466+ }
24702467
24712468 /* NOTE: gpio_request() can be called in early boot,
24722469 * before IRQs are enabled, for non-sleeping (SOC) GPIOs.
@@ -4717,8 +4714,8 @@ struct gpio_desc *gpiod_find_and_request(struct device *consumer, · 2244 unmodified lines
47174714 * lookup table for the proxy device as previously
47184715 * we only knew the consumer's fwnode.
47194716 */
4720− ret = gpio_shared_add_proxy_lookup(consumer, con_id,
4721− lookupflags);
4717+ ret = gpio_shared_add_proxy_lookup(consumer, fwnode,
4718+ con_id, lookupflags);
47224719 if (ret)
47234720 return ERR_PTR(ret);
47244721
drivers/gpu/drm/Kconfig+7−0
@@ -268,6 +268,13 @@ config DRM_GEM_SHMEM_HELPER · 267 unmodified lines
268268 help
269269 Choose this if you need the GEM shmem helper functions
270270
271+config RUST_DRM_GEM_SHMEM_HELPER
272+ bool
273+ depends on DRM && MMU
274+ select DRM_GEM_SHMEM_HELPER
275+ help
276+ Choose this if you need the GEM shmem helper functions In Rust
277+
271278 config DRM_SUBALLOC_HELPER
272279 tristate
273280 depends on DRM
drivers/gpu/drm/Kconfig.debug+0−1
@@ -85,7 +85,6 @@ config DRM_KUNIT_TEST · 84 unmodified lines
8585
8686 config DRM_TTM_KUNIT_TEST
8787 tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS
88− default n
8988 depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST)
9089 select DRM_TTM
9190 select DRM_BUDDY
drivers/gpu/drm/amd/amdgpu/Makefile+2−0
@@ -213,6 +213,7 @@ amdgpu-y += \ · 212 unmodified lines
213213 vcn_v4_0_5.o \
214214 vcn_v5_0_0.o \
215215 vcn_v5_0_1.o \
216+ vcn_v5_0_2.o \
216217 amdgpu_jpeg.o \
217218 jpeg_v1_0.o \
218219 jpeg_v2_0.o \
@@ -223,6 +224,7 @@ amdgpu-y += \ · 4 unmodified lines
223224 jpeg_v4_0_5.o \
224225 jpeg_v5_0_0.o \
225226 jpeg_v5_0_1.o \
227+ jpeg_v5_0_2.o \
226228 jpeg_v5_3_0.o
227229
228230 # add VPE block
drivers/gpu/drm/amd/amdgpu/amdgpu.h+7−0
@@ -327,6 +327,7 @@ struct kfd_vm_fault_info; · 326 unmodified lines
327327 struct amdgpu_hive_info;
328328 struct amdgpu_reset_context;
329329 struct amdgpu_reset_control;
330+struct amdgpu_coredump_info;
330331
331332 enum amdgpu_cp_irq {
332333 AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP = 0,
@@ -689,6 +690,7 @@ enum amdgpu_uid_type { · 356 unmodified lines
689690 AMDGPU_UID_TYPE_XCD,
690691 AMDGPU_UID_TYPE_AID,
691692 AMDGPU_UID_TYPE_SOC,
693+ AMDGPU_UID_TYPE_MID,
692694 AMDGPU_UID_TYPE_MAX
693695 };
694696
@@ -1147,6 +1149,11 @@ struct amdgpu_device { · 452 unmodified lines
11471149
11481150 struct amdgpu_reset_domain *reset_domain;
11491151
1152+#ifdef CONFIG_DEV_COREDUMP
1153+ struct amdgpu_coredump_info *coredump;
1154+ struct work_struct coredump_work;
1155+#endif
1156+
11501157 struct mutex benchmark_mutex;
11511158
11521159 bool scpm_enabled;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c+2−2
@@ -692,9 +692,9 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev, · 691 unmodified lines
692692 goto err_ib_sched;
693693 }
694694
695− /* Drop the initial kref_init count (see drm_sched_main as example) */
696− dma_fence_put(f);
697695 ret = dma_fence_wait(f, false);
696+ /* Drop the returned fence reference after the wait completes */
697+ dma_fence_put(f);
698698
699699 err_ib_sched:
700700 amdgpu_job_free(job);
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c+1−1
@@ -330,7 +330,7 @@ static uint32_t kgd_gfx_v12_1_set_address_watch(struct amdgpu_device *adev, · 329 unmodified lines
330330
331331 watch_address_cntl = 0;
332332 watch_address_low = lower_32_bits(watch_address);
333− watch_address_high = upper_32_bits(watch_address) & 0xffff;
333+ watch_address_high = upper_32_bits(watch_address) & 0x1ffffff;
334334
335335 watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
336336 TCP_WATCH0_CNTL,
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c+245−214
@@ -373,249 +373,280 @@ int amdgpu_atomfirmware_get_uma_carveout_info(struct amdgpu_device *adev, · 372 unmodified lines
373373 return -ENODEV;
374374 }
375375
376−int
377−amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
376+int amdgpu_atomfirmware_get_integrated_system_info(struct amdgpu_device *adev,
378377 int *vram_width, int *vram_type,
379378 int *vram_vendor)
380379 {
381380 struct amdgpu_mode_info *mode_info = &adev->mode_info;
382− int index, i = 0;
381+ int index;
383382 u16 data_offset, size;
384383 union igp_info *igp_info;
385− union vram_info *vram_info;
386− union umc_info *umc_info;
387− union vram_module *vram_module;
388384 u8 frev, crev;
389385 u8 mem_type;
390− u8 mem_vendor;
391386 u32 mem_channel_number;
392387 u32 mem_channel_width;
393− u32 module_id;
394388
395− if (adev->flags & AMD_IS_APU)
396− index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
389+ index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
397390 integratedsysteminfo);
398− else {
399− switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
400− case IP_VERSION(12, 0, 0):
401− case IP_VERSION(12, 0, 1):
402− index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, umc_info);
391+ if (amdgpu_atom_parse_data_header(mode_info->atom_context,
392+ index, &size,
393+ &frev, &crev, &data_offset)) {
394+ igp_info = (union igp_info *)
395+ (mode_info->atom_context->bios + data_offset);
396+ switch (frev) {
397+ case 1:
398+ switch (crev) {
399+ case 11:
400+ case 12:
401+ mem_channel_number = igp_info->v11.umachannelnumber;
402+ if (!mem_channel_number)
403+ mem_channel_number = 1;
404+ mem_type = igp_info->v11.memorytype;
405+ if (mem_type == LpDdr5MemType)
406+ mem_channel_width = 32;
407+ else
408+ mem_channel_width = 64;
409+ if (vram_width)
410+ *vram_width = mem_channel_number * mem_channel_width;
411+ if (vram_type)
412+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
413+ break;
414+ default:
415+ return -EINVAL;
416+ }
417+ break;
418+ case 2:
419+ switch (crev) {
420+ case 1:
421+ case 2:
422+ mem_channel_number = igp_info->v21.umachannelnumber;
423+ if (!mem_channel_number)
424+ mem_channel_number = 1;
425+ mem_type = igp_info->v21.memorytype;
426+ if (mem_type == LpDdr5MemType)
427+ mem_channel_width = 32;
428+ else
429+ mem_channel_width = 64;
430+ if (vram_width)
431+ *vram_width = mem_channel_number * mem_channel_width;
432+ if (vram_type)
433+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
434+ break;
435+ case 3:
436+ mem_channel_number = igp_info->v23.umachannelnumber;
437+ if (!mem_channel_number)
438+ mem_channel_number = 1;
439+ mem_type = igp_info->v23.memorytype;
440+ if (mem_type == LpDdr5MemType)
441+ mem_channel_width = 32;
442+ else
443+ mem_channel_width = 64;
444+ if (vram_width)
445+ *vram_width = mem_channel_number * mem_channel_width;
446+ if (vram_type)
447+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
448+ break;
449+ default:
450+ return -EINVAL;
451+ }
403452 break;
404453 default:
405− index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, vram_info);
454+ return -EINVAL;
406455 }
456+ } else {
457+ return -EINVAL;
407458 }
459+ return 0;
460+}
461+
462+int amdgpu_atomfirmware_get_umc_info(struct amdgpu_device *adev,
463+ int *vram_width, int *vram_type,
464+ int *vram_vendor)
465+{
466+ struct amdgpu_mode_info *mode_info = &adev->mode_info;
467+ int index;
468+ u16 data_offset, size;
469+ union umc_info *umc_info;
470+ u8 frev, crev;
471+ u8 mem_type;
472+ u8 mem_vendor;
473+ u32 mem_channel_number;
474+ u32 mem_channel_width;
475+
476+ index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, umc_info);
477+
408478 if (amdgpu_atom_parse_data_header(mode_info->atom_context,
409479 index, &size,
410480 &frev, &crev, &data_offset)) {
411− if (adev->flags & AMD_IS_APU) {
412− igp_info = (union igp_info *)
413− (mode_info->atom_context->bios + data_offset);
414− switch (frev) {
415− case 1:
416− switch (crev) {
417− case 11:
418− case 12:
419− mem_channel_number = igp_info->v11.umachannelnumber;
420− if (!mem_channel_number)
421− mem_channel_number = 1;
422− mem_type = igp_info->v11.memorytype;
423− if (mem_type == LpDdr5MemType)
424− mem_channel_width = 32;
425− else
426− mem_channel_width = 64;
427− if (vram_width)
428− *vram_width = mem_channel_number * mem_channel_width;
429− if (vram_type)
430− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
431− break;
432− default:
433− return -EINVAL;
434− }
435− break;
436− case 2:
437− switch (crev) {
438− case 1:
439− case 2:
440− mem_channel_number = igp_info->v21.umachannelnumber;
441− if (!mem_channel_number)
442− mem_channel_number = 1;
443− mem_type = igp_info->v21.memorytype;
444− if (mem_type == LpDdr5MemType)
445− mem_channel_width = 32;
446− else
447− mem_channel_width = 64;
448− if (vram_width)
449− *vram_width = mem_channel_number * mem_channel_width;
450− if (vram_type)
451− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
452− break;
453− case 3:
454− mem_channel_number = igp_info->v23.umachannelnumber;
455− if (!mem_channel_number)
456− mem_channel_number = 1;
457− mem_type = igp_info->v23.memorytype;
458− if (mem_type == LpDdr5MemType)
459− mem_channel_width = 32;
460− else
461− mem_channel_width = 64;
462− if (vram_width)
463− *vram_width = mem_channel_number * mem_channel_width;
464− if (vram_type)
465− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
466− break;
467− default:
468− return -EINVAL;
469− }
481+ umc_info = (union umc_info *)(mode_info->atom_context->bios + data_offset);
482+
483+ if (frev == 4) {
484+ switch (crev) {
485+ case 0:
486+ mem_channel_number = le32_to_cpu(umc_info->v40.channel_num);
487+ mem_type = le32_to_cpu(umc_info->v40.vram_type);
488+ mem_channel_width = le32_to_cpu(umc_info->v40.channel_width);
489+ mem_vendor = RREG32(adev->bios_scratch_reg_offset + 4) & 0xF;
490+ if (vram_vendor)
491+ *vram_vendor = mem_vendor;
492+ if (vram_type)
493+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
494+ if (vram_width)
495+ *vram_width = mem_channel_number * (1 << mem_channel_width);
470496 break;
471497 default:
472498 return -EINVAL;
473499 }
474500 } else {
475− switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
476− case IP_VERSION(12, 0, 0):
477− case IP_VERSION(12, 0, 1):
478− umc_info = (union umc_info *)(mode_info->atom_context->bios + data_offset);
479−
480− if (frev == 4) {
481− switch (crev) {
482− case 0:
483− mem_channel_number = le32_to_cpu(umc_info->v40.channel_num);
484− mem_type = le32_to_cpu(umc_info->v40.vram_type);
485− mem_channel_width = le32_to_cpu(umc_info->v40.channel_width);
486− mem_vendor = RREG32(adev->bios_scratch_reg_offset + 4) & 0xF;
487− if (vram_vendor)
488− *vram_vendor = mem_vendor;
489− if (vram_type)
490− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
491− if (vram_width)
492− *vram_width = mem_channel_number * (1 << mem_channel_width);
493− break;
494− default:
495− return -EINVAL;
496− }
497− } else
498− return -EINVAL;
501+ return -EINVAL;
502+ }
503+ } else {
504+ return -EINVAL;
505+ }
506+
507+ return 0;
508+}
509+
510+int amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
511+ int *vram_width, int *vram_type,
512+ int *vram_vendor)
513+{
514+ struct amdgpu_mode_info *mode_info = &adev->mode_info;
515+ int index, i = 0;
516+ u16 data_offset, size;
517+ union vram_info *vram_info;
518+ union vram_module *vram_module;
519+ u8 frev, crev;
520+ u8 mem_type;
521+ u8 mem_vendor;
522+ u32 mem_channel_number;
523+ u32 mem_channel_width;
524+ u32 module_id;
525+
526+ index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, vram_info);
527+
528+ if (amdgpu_atom_parse_data_header(mode_info->atom_context,
529+ index, &size,
530+ &frev, &crev, &data_offset)) {
531+ vram_info = (union vram_info *)
532+ (mode_info->atom_context->bios + data_offset);
533+
534+ module_id = (RREG32(adev->bios_scratch_reg_offset + 4) & 0x00ff0000) >> 16;
535+ if (frev == 3) {
536+ switch (crev) {
537+ /* v30 */
538+ case 0:
539+ vram_module = (union vram_module *)vram_info->v30.vram_module;
540+ mem_vendor = (vram_module->v30.dram_vendor_id) & 0xF;
541+ if (vram_vendor)
542+ *vram_vendor = mem_vendor;
543+ mem_type = vram_info->v30.memory_type;
544+ if (vram_type)
545+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
546+ mem_channel_number = vram_info->v30.channel_num;
547+ mem_channel_width = vram_info->v30.channel_width;
548+ if (vram_width)
549+ *vram_width = mem_channel_number * 16;
499550 break;
500551 default:
501− vram_info = (union vram_info *)
502− (mode_info->atom_context->bios + data_offset);
503−
504− module_id = (RREG32(adev->bios_scratch_reg_offset + 4) & 0x00ff0000) >> 16;
505− if (frev == 3) {
506− switch (crev) {
507− /* v30 */
508− case 0:
509− vram_module = (union vram_module *)vram_info->v30.vram_module;
510− mem_vendor = (vram_module->v30.dram_vendor_id) & 0xF;
511− if (vram_vendor)
512− *vram_vendor = mem_vendor;
513− mem_type = vram_info->v30.memory_type;
514− if (vram_type)
515− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
516− mem_channel_number = vram_info->v30.channel_num;
517− mem_channel_width = vram_info->v30.channel_width;
518− if (vram_width)
519− *vram_width = mem_channel_number * 16;
520− break;
521− default:
522− return -EINVAL;
523− }
524− } else if (frev == 2) {
525− switch (crev) {
526− /* v23 */
527− case 3:
528− if (module_id > vram_info->v23.vram_module_num)
529− module_id = 0;
530− vram_module = (union vram_module *)vram_info->v23.vram_module;
531− while (i < module_id) {
532− vram_module = (union vram_module *)
533− ((u8 *)vram_module + vram_module->v9.vram_module_size);
534− i++;
535− }
536− mem_type = vram_module->v9.memory_type;
537− if (vram_type)
538− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
539− mem_channel_number = vram_module->v9.channel_num;
540− mem_channel_width = vram_module->v9.channel_width;
541− if (vram_width)
542− *vram_width = mem_channel_number * (1 << mem_channel_width);
543− mem_vendor = (vram_module->v9.vender_rev_id) & 0xF;
544− if (vram_vendor)
545− *vram_vendor = mem_vendor;
546− break;
547− /* v24 */
548− case 4:
549− if (module_id > vram_info->v24.vram_module_num)
550− module_id = 0;
551− vram_module = (union vram_module *)vram_info->v24.vram_module;
552− while (i < module_id) {
553− vram_module = (union vram_module *)
554− ((u8 *)vram_module + vram_module->v10.vram_module_size);
555− i++;
556− }
557− mem_type = vram_module->v10.memory_type;
558− if (vram_type)
559− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
560− mem_channel_number = vram_module->v10.channel_num;
561− mem_channel_width = vram_module->v10.channel_width;
562− if (vram_width)
563− *vram_width = mem_channel_number * (1 << mem_channel_width);
564− mem_vendor = (vram_module->v10.vender_rev_id) & 0xF;
565− if (vram_vendor)
566− *vram_vendor = mem_vendor;
567− break;
568− /* v25 */
569− case 5:
570− if (module_id > vram_info->v25.vram_module_num)
571− module_id = 0;
572− vram_module = (union vram_module *)vram_info->v25.vram_module;
573− while (i < module_id) {
574− vram_module = (union vram_module *)
575− ((u8 *)vram_module + vram_module->v11.vram_module_size);
576− i++;
577− }
578− mem_type = vram_module->v11.memory_type;
579− if (vram_type)
580− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
581− mem_channel_number = vram_module->v11.channel_num;
582− mem_channel_width = vram_module->v11.channel_width;
583− if (vram_width)
584− *vram_width = mem_channel_number * (1 << mem_channel_width);
585− mem_vendor = (vram_module->v11.vender_rev_id) & 0xF;
586− if (vram_vendor)
587− *vram_vendor = mem_vendor;
588− break;
589− /* v26 */
590− case 6:
591− if (module_id > vram_info->v26.vram_module_num)
592− module_id = 0;
593− vram_module = (union vram_module *)vram_info->v26.vram_module;
594− while (i < module_id) {
595− vram_module = (union vram_module *)
596− ((u8 *)vram_module + vram_module->v9.vram_module_size);
597− i++;
598− }
599− mem_type = vram_module->v9.memory_type;
600− if (vram_type)
601− *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
602− mem_channel_number = vram_module->v9.channel_num;
603− mem_channel_width = vram_module->v9.channel_width;
604− if (vram_width)
605− *vram_width = mem_channel_number * (1 << mem_channel_width);
606− mem_vendor = (vram_module->v9.vender_rev_id) & 0xF;
607− if (vram_vendor)
608− *vram_vendor = mem_vendor;
609− break;
610− default:
611− return -EINVAL;
612− }
613− } else {
614− /* invalid frev */
615− return -EINVAL;
552+ return -EINVAL;
553+ }
554+ } else if (frev == 2) {
555+ switch (crev) {
556+ /* v23 */
557+ case 3:
558+ if (module_id > vram_info->v23.vram_module_num)
559+ module_id = 0;
560+ vram_module = (union vram_module *)vram_info->v23.vram_module;
561+ while (i < module_id) {
562+ vram_module = (union vram_module *)
563+ ((u8 *)vram_module + vram_module->v9.vram_module_size);
564+ i++;
616565 }
566+ mem_type = vram_module->v9.memory_type;
567+ if (vram_type)
568+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
569+ mem_channel_number = vram_module->v9.channel_num;
570+ mem_channel_width = vram_module->v9.channel_width;
571+ if (vram_width)
572+ *vram_width = mem_channel_number * (1 << mem_channel_width);
573+ mem_vendor = (vram_module->v9.vender_rev_id) & 0xF;
574+ if (vram_vendor)
575+ *vram_vendor = mem_vendor;
576+ break;
577+ /* v24 */
578+ case 4:
579+ if (module_id > vram_info->v24.vram_module_num)
580+ module_id = 0;
581+ vram_module = (union vram_module *)vram_info->v24.vram_module;
582+ while (i < module_id) {
583+ vram_module = (union vram_module *)
584+ ((u8 *)vram_module + vram_module->v10.vram_module_size);
585+ i++;
586+ }
587+ mem_type = vram_module->v10.memory_type;
588+ if (vram_type)
589+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
590+ mem_channel_number = vram_module->v10.channel_num;
591+ mem_channel_width = vram_module->v10.channel_width;
592+ if (vram_width)
593+ *vram_width = mem_channel_number * (1 << mem_channel_width);
594+ mem_vendor = (vram_module->v10.vender_rev_id) & 0xF;
595+ if (vram_vendor)
596+ *vram_vendor = mem_vendor;
597+ break;
598+ /* v25 */
599+ case 5:
600+ if (module_id > vram_info->v25.vram_module_num)
601+ module_id = 0;
602+ vram_module = (union vram_module *)vram_info->v25.vram_module;
603+ while (i < module_id) {
604+ vram_module = (union vram_module *)
605+ ((u8 *)vram_module + vram_module->v11.vram_module_size);
606+ i++;
607+ }
608+ mem_type = vram_module->v11.memory_type;
609+ if (vram_type)
610+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
611+ mem_channel_number = vram_module->v11.channel_num;
612+ mem_channel_width = vram_module->v11.channel_width;
613+ if (vram_width)
614+ *vram_width = mem_channel_number * (1 << mem_channel_width);
615+ mem_vendor = (vram_module->v11.vender_rev_id) & 0xF;
616+ if (vram_vendor)
617+ *vram_vendor = mem_vendor;
618+ break;
619+ /* v26 */
620+ case 6:
621+ if (module_id > vram_info->v26.vram_module_num)
622+ module_id = 0;
623+ vram_module = (union vram_module *)vram_info->v26.vram_module;
624+ while (i < module_id) {
625+ vram_module = (union vram_module *)
626+ ((u8 *)vram_module + vram_module->v9.vram_module_size);
627+ i++;
628+ }
629+ mem_type = vram_module->v9.memory_type;
630+ if (vram_type)
631+ *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
632+ mem_channel_number = vram_module->v9.channel_num;
633+ mem_channel_width = vram_module->v9.channel_width;
634+ if (vram_width)
635+ *vram_width = mem_channel_number * (1 << mem_channel_width);
636+ mem_vendor = (vram_module->v9.vender_rev_id) & 0xF;
637+ if (vram_vendor)
638+ *vram_vendor = mem_vendor;
639+ break;
640+ default:
641+ return -EINVAL;
617642 }
643+ } else {
644+ /* invalid frev */
645+ return -EINVAL;
618646 }
647+
648+ } else {
649+ return -EINVAL;
619650 }
620651
621652 return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h+4−0
@@ -30,6 +30,10 @@ uint32_t amdgpu_atomfirmware_query_firmware_capability(struct amdgpu_device *ade · 29 unmodified lines
3030 bool amdgpu_atomfirmware_gpu_virtualization_supported(struct amdgpu_device *adev);
3131 void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev);
3232 int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev);
33+int amdgpu_atomfirmware_get_integrated_system_info(struct amdgpu_device *adev,
34+ int *vram_width, int *vram_type, int *vram_vendor);
35+int amdgpu_atomfirmware_get_umc_info(struct amdgpu_device *adev,
36+ int *vram_width, int *vram_type, int *vram_vendor);
3337 int amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
3438 int *vram_width, int *vram_type, int *vram_vendor);
3539 int amdgpu_atomfirmware_get_uma_carveout_info(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c+4−0
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636
3737 #define AMDGPU_BO_LIST_MAX_PRIORITY 32u
3838 #define AMDGPU_BO_LIST_NUM_BUCKETS (AMDGPU_BO_LIST_MAX_PRIORITY + 1)
39+#define AMDGPU_BO_LIST_MAX_ENTRIES (128 * 1024)
3940
4041 static void amdgpu_bo_list_free_rcu(struct rcu_head *rcu)
4142 {
@@ -188,6 +189,9 @@ int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in, · 146 unmodified lines
188189 const uint32_t bo_number = in->bo_number;
189190 struct drm_amdgpu_bo_list_entry *info;
190191
192+ if (bo_number > AMDGPU_BO_LIST_MAX_ENTRIES)
193+ return -EINVAL;
194+
191195 /* copy the handle array from userspace to a kernel buffer */
192196 if (likely(info_size == bo_info_size)) {
193197 info = vmemdup_array_user(uptr, bo_number, info_size);
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c+2−0
@@ -1231,6 +1231,8 @@ static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector · 1230 unmodified lines
12311231 case CONNECTOR_OBJECT_ID_HDMI_TYPE_B:
12321232 max_digital_pixel_clock_khz = max_dvi_single_link_pixel_clock * 2;
12331233 break;
1234+ default:
1235+ return MODE_BAD;
12341236 }
12351237
12361238 /* When the display EDID claims that it's an HDMI display,
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+9−3
@@ -908,9 +908,8 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, · 907 unmodified lines
908908 goto out_free_user_pages;
909909
910910 amdgpu_bo_list_for_each_entry(e, p->bo_list) {
911− /* One fence for TTM and one for each CS job */
912911 r = drm_exec_prepare_obj(&p->exec, &e->bo->tbo.base,
913− 1 + p->gang_size);
912+ TTM_NUM_MOVE_FENCES + p->gang_size);
914913 drm_exec_retry_on_contention(&p->exec);
915914 if (unlikely(r))
916915 goto out_free_user_pages;
@@ -920,7 +919,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, · 3 unmodified lines
920919
921920 if (p->uf_bo) {
922921 r = drm_exec_prepare_obj(&p->exec, &p->uf_bo->tbo.base,
923− 1 + p->gang_size);
922+ TTM_NUM_MOVE_FENCES + p->gang_size);
924923 drm_exec_retry_on_contention(&p->exec);
925924 if (unlikely(r))
926925 goto out_free_user_pages;
@@ -1740,6 +1739,13 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, void *data, · 813 unmodified lines
17401739 struct drm_amdgpu_fence *fences;
17411740 int r;
17421741
1742+ /*
1743+ * fence_count must be non-zero; dma_fence_wait_any_timeout()
1744+ * does not accept an empty fence array.
1745+ */
1746+ if (!wait->in.fence_count)
1747+ return -EINVAL;
1748+
17431749 /* Get the fences from userspace */
17441750 fences = memdup_array_user(u64_to_user_ptr(wait->in.fences),
17451751 wait->in.fence_count,
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c+112−0
@@ -617,6 +617,110 @@ out: · 616 unmodified lines
617617 return r;
618618 }
619619
620+/**
621+ * amdgpu_debugfs_regs_pcie64_read - Read from a 64-bit PCIE register
622+ *
623+ * @f: open file handle
624+ * @buf: User buffer to store read data in
625+ * @size: Number of bytes to read
626+ * @pos: Offset to seek to
627+ */
628+static ssize_t amdgpu_debugfs_regs_pcie64_read(struct file *f, char __user *buf,
629+ size_t size, loff_t *pos)
630+{
631+ struct amdgpu_device *adev = file_inode(f)->i_private;
632+ ssize_t result = 0;
633+ int r;
634+
635+ if (size & 0x7 || *pos & 0x7)
636+ return -EINVAL;
637+
638+ r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
639+ if (r < 0) {
640+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
641+ return r;
642+ }
643+
644+ r = amdgpu_virt_enable_access_debugfs(adev);
645+ if (r < 0) {
646+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
647+ return r;
648+ }
649+
650+ while (size) {
651+ uint64_t value;
652+
653+ value = RREG64_PCIE_EXT(*pos);
654+
655+ r = put_user(value, (uint64_t *)buf);
656+ if (r)
657+ goto out;
658+
659+ result += 8;
660+ buf += 8;
661+ *pos += 8;
662+ size -= 8;
663+ }
664+
665+ r = result;
666+out:
667+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
668+ amdgpu_virt_disable_access_debugfs(adev);
669+ return r;
670+}
671+
672+/**
673+ * amdgpu_debugfs_regs_pcie64_write - Write to a 64-bit PCIE register
674+ *
675+ * @f: open file handle
676+ * @buf: User buffer to write data from
677+ * @size: Number of bytes to write
678+ * @pos: Offset to seek to
679+ */
680+static ssize_t amdgpu_debugfs_regs_pcie64_write(struct file *f, const char __user *buf,
681+ size_t size, loff_t *pos)
682+{
683+ struct amdgpu_device *adev = file_inode(f)->i_private;
684+ ssize_t result = 0;
685+ int r;
686+
687+ if (size & 0x7 || *pos & 0x7)
688+ return -EINVAL;
689+
690+ r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
691+ if (r < 0) {
692+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
693+ return r;
694+ }
695+
696+ r = amdgpu_virt_enable_access_debugfs(adev);
697+ if (r < 0) {
698+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
699+ return r;
700+ }
701+
702+ while (size) {
703+ uint64_t value;
704+
705+ r = get_user(value, (uint64_t *)buf);
706+ if (r)
707+ goto out;
708+
709+ WREG64_PCIE_EXT(*pos, value);
710+
711+ result += 8;
712+ buf += 8;
713+ *pos += 8;
714+ size -= 8;
715+ }
716+
717+ r = result;
718+out:
719+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
720+ amdgpu_virt_disable_access_debugfs(adev);
721+ return r;
722+}
723+
620724 /**
621725 * amdgpu_debugfs_regs_didt_read - Read from a DIDT register
622726 *
@@ -1525,6 +1629,12 @@ static const struct file_operations amdgpu_debugfs_regs_pcie_fops = { · 902 unmodified lines
15251629 .write = amdgpu_debugfs_regs_pcie_write,
15261630 .llseek = default_llseek
15271631 };
1632+static const struct file_operations amdgpu_debugfs_regs_pcie64_fops = {
1633+ .owner = THIS_MODULE,
1634+ .read = amdgpu_debugfs_regs_pcie64_read,
1635+ .write = amdgpu_debugfs_regs_pcie64_write,
1636+ .llseek = default_llseek
1637+};
15281638 static const struct file_operations amdgpu_debugfs_regs_smc_fops = {
15291639 .owner = THIS_MODULE,
15301640 .read = amdgpu_debugfs_regs_smc_read,
@@ -1587,6 +1697,7 @@ static const struct file_operations *debugfs_regs[] = { · 56 unmodified lines
15871697 &amdgpu_debugfs_gprwave_fops,
15881698 &amdgpu_debugfs_regs_didt_fops,
15891699 &amdgpu_debugfs_regs_pcie_fops,
1700+ &amdgpu_debugfs_regs_pcie64_fops,
15901701 &amdgpu_debugfs_regs_smc_fops,
15911702 &amdgpu_debugfs_gca_config_fops,
15921703 &amdgpu_debugfs_sensors_fops,
@@ -1604,6 +1715,7 @@ static const char * const debugfs_regs_names[] = { · 11 unmodified lines
16041715 "amdgpu_gprwave",
16051716 "amdgpu_regs_didt",
16061717 "amdgpu_regs_pcie",
1718+ "amdgpu_regs_pcie64",
16071719 "amdgpu_regs_smc",
16081720 "amdgpu_gca_config",
16091721 "amdgpu_sensors",
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c+95−13
@@ -32,8 +32,16 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check, · 31 unmodified lines
3232 bool vram_lost, struct amdgpu_job *job)
3333 {
3434 }
35+void amdgpu_coredump_init(struct amdgpu_device *adev)
36+{
37+}
38+void amdgpu_coredump_fini(struct amdgpu_device *adev)
39+{
40+}
3541 #else
3642
43+#define AMDGPU_CORE_DUMP_SIZE_MAX (256 * 1024 * 1024)
44+
3745 const char *hw_ip_names[MAX_HWIP] = {
3846 [GC_HWIP] = "GC",
3947 [HDP_HWIP] = "HDP",
@@ -187,20 +195,22 @@ static void amdgpu_devcoredump_fw_info(struct amdgpu_device *adev, · 147 unmodified lines
187195 drm_printf(p, "VPE feature version: %u, fw version: 0x%08x\n",
188196 adev->vpe.feature_version, adev->vpe.fw_version);
189197
190− drm_printf(p, "\nVBIOS Information\n");
191− drm_printf(p, "vbios name : %s\n", ctx->name);
192− drm_printf(p, "vbios pn : %s\n", ctx->vbios_pn);
193− drm_printf(p, "vbios version : %d\n", ctx->version);
194− drm_printf(p, "vbios ver_str : %s\n", ctx->vbios_ver_str);
195− drm_printf(p, "vbios date : %s\n", ctx->date);
198+ if (adev->bios) {
199+ drm_printf(p, "\nVBIOS Information\n");
200+ drm_printf(p, "vbios name : %s\n", ctx->name);
201+ drm_printf(p, "vbios pn : %s\n", ctx->vbios_pn);
202+ drm_printf(p, "vbios version : %d\n", ctx->version);
203+ drm_printf(p, "vbios ver_str : %s\n", ctx->vbios_ver_str);
204+ drm_printf(p, "vbios date : %s\n", ctx->date);
205+ }else {
206+ drm_printf(p, "\nVBIOS Information: NA\n");
207+ }
196208 }
197209
198210 static ssize_t
199−amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
200− void *data, size_t datalen)
211+amdgpu_devcoredump_format(char *buffer, size_t count, struct amdgpu_coredump_info *coredump)
201212 {
202213 struct drm_printer p;
203− struct amdgpu_coredump_info *coredump = data;
204214 struct drm_print_iterator iter;
205215 struct amdgpu_vm_fault_info *fault_info;
206216 struct amdgpu_ip_block *ip_block;
@@ -208,7 +218,6 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count, · 1 unmodified line
208218
209219 iter.data = buffer;
210220 iter.offset = 0;
211− iter.start = offset;
212221 iter.remain = count;
213222
214223 p = drm_coredump_printer(&iter);
@@ -322,9 +331,63 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count, · 107 unmodified lines
322331 return count - iter.remain;
323332 }
324333
334+static ssize_t
335+amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
336+ void *data, size_t datalen)
337+{
338+ struct amdgpu_coredump_info *coredump = data;
339+ ssize_t byte_copied;
340+
341+ if (!coredump)
342+ return -ENODEV;
343+
344+ if (!coredump->formatted)
345+ return -ENODEV;
346+
347+ if (offset >= coredump->formatted_size)
348+ return 0;
349+
350+ byte_copied = count < coredump->formatted_size - offset ? count :
351+ coredump->formatted_size - offset;
352+ memcpy(buffer, coredump->formatted + offset, byte_copied);
353+
354+ return byte_copied;
355+}
356+
325357 static void amdgpu_devcoredump_free(void *data)
326358 {
327− kfree(data);
359+ struct amdgpu_coredump_info *coredump = data;
360+
361+ kvfree(coredump->formatted);
362+ kvfree(data);
363+}
364+
365+static void amdgpu_devcoredump_deferred_work(struct work_struct *work)
366+{
367+ struct amdgpu_device *adev = container_of(work, typeof(*adev), coredump_work);
368+ struct amdgpu_coredump_info *coredump = adev->coredump;
369+
370+ /* Do a one-time preparation of the coredump output because
371+ * repeatingly calling drm_coredump_printer is very slow.
372+ */
373+ coredump->formatted_size = amdgpu_devcoredump_format(
374+ NULL, AMDGPU_CORE_DUMP_SIZE_MAX, coredump);
375+ coredump->formatted = kvzalloc(coredump->formatted_size, GFP_KERNEL);
376+ if (!coredump->formatted) {
377+ amdgpu_devcoredump_free(coredump);
378+ goto end;
379+ }
380+
381+ amdgpu_devcoredump_format(coredump->formatted, coredump->formatted_size, coredump);
382+
383+ /* If there's an existing coredump for this device, the free function will be
384+ * called immediately so coredump might be invalid after the call to dev_coredumpm.
385+ */
386+ dev_coredumpm(coredump->adev->dev, THIS_MODULE, coredump, 0, GFP_NOWAIT,
387+ amdgpu_devcoredump_read, amdgpu_devcoredump_free);
388+
389+end:
390+ adev->coredump = NULL;
328391 }
329392
330393 void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,
@@ -334,6 +397,10 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check, · 3 unmodified lines
334397 struct amdgpu_coredump_info *coredump;
335398 struct drm_sched_job *s_job;
336399
400+ /* No need to generate a new coredump if there's one in progress already. */
401+ if (work_pending(&adev->coredump_work))
402+ return;
403+
337404 coredump = kzalloc_obj(*coredump, GFP_NOWAIT);
338405 if (!coredump)
339406 return;
@@ -360,11 +427,26 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check, · 20 unmodified lines
360427
361428 ktime_get_ts64(&coredump->reset_time);
362429
363− dev_coredumpm(dev->dev, THIS_MODULE, coredump, 0, GFP_NOWAIT,
364− amdgpu_devcoredump_read, amdgpu_devcoredump_free);
430+ /* Update the current coredump pointer (no lock needed, this function can only be called
431+ * from a single thread)
432+ */
433+ adev->coredump = coredump;
434+ /* Kick off coredump formatting to a worker thread. */
435+ queue_work(system_unbound_wq, &adev->coredump_work);
365436
366437 drm_info(dev, "AMDGPU device coredump file has been created\n");
367438 drm_info(dev, "Check your /sys/class/drm/card%d/device/devcoredump/data\n",
368439 dev->primary->index);
369440 }
441+
442+void amdgpu_coredump_init(struct amdgpu_device *adev)
443+{
444+ INIT_WORK(&adev->coredump_work, amdgpu_devcoredump_deferred_work);
445+}
446+
447+void amdgpu_coredump_fini(struct amdgpu_device *adev)
448+{
449+ /* Finish deferred coredump formatting before HW/IP teardown. */
450+ flush_work(&adev->coredump_work);
451+}
370452 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h+8−0
@@ -35,12 +35,20 @@ struct amdgpu_coredump_info { · 34 unmodified lines
3535 struct amdgpu_device *adev;
3636 struct amdgpu_task_info reset_task_info;
3737 struct timespec64 reset_time;
38+
3839 bool skip_vram_check;
3940 bool reset_vram_lost;
4041 struct amdgpu_ring *ring;
42+ /* Readable form of coredevdump, generate once to speed up
43+ * reading it (see drm_coredump_printer's documentation).
44+ */
45+ ssize_t formatted_size;
46+ char *formatted;
4147 };
4248 #endif
4349
4450 void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,
4551 bool vram_lost, struct amdgpu_job *job);
52+void amdgpu_coredump_init(struct amdgpu_device *adev);
53+void amdgpu_coredump_fini(struct amdgpu_device *adev);
4654 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+29−5
@@ -3498,7 +3498,8 @@ fail: · 3497 unmodified lines
34983498
34993499 static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
35003500 {
3501− char *input = amdgpu_lockup_timeout;
3501+ char buf[AMDGPU_MAX_TIMEOUT_PARAM_LENGTH];
3502+ char *input = buf;
35023503 char *timeout_setting = NULL;
35033504 int index = 0;
35043505 long timeout;
@@ -3508,9 +3509,17 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev) · 3 unmodified lines
35083509 adev->gfx_timeout = adev->compute_timeout = adev->sdma_timeout =
35093510 adev->video_timeout = msecs_to_jiffies(2000);
35103511
3511− if (!strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
3512+ if (!strnlen(amdgpu_lockup_timeout, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH))
35123513 return 0;
35133514
3515+ /*
3516+ * strsep() destructively modifies its input by replacing delimiters
3517+ * with '\0'. Use a stack copy so the global module parameter buffer
3518+ * remains intact for multi-GPU systems where this function is called
3519+ * once per device.
3520+ */
3521+ strscpy(buf, amdgpu_lockup_timeout, sizeof(buf));
3522+
35143523 while ((timeout_setting = strsep(&input, ",")) &&
35153524 strnlen(timeout_setting, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) {
35163525 ret = kstrtol(timeout_setting, 0, &timeout);
@@ -3781,6 +3790,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, · 264 unmodified lines
37813790 INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
37823791 INIT_WORK(&adev->userq_reset_work, amdgpu_userq_reset_work);
37833792
3793+ amdgpu_coredump_init(adev);
3794+
37843795 adev->gfx.gfx_off_req_count = 1;
37853796 adev->gfx.gfx_off_residency = 0;
37863797 adev->gfx.gfx_off_entrycount = 0;
@@ -3878,9 +3889,21 @@ int amdgpu_device_init(struct amdgpu_device *adev, · 91 unmodified lines
38783889 amdgpu_gmc_noretry_set(adev);
38793890 /* Need to get xgmi info early to decide the reset behavior*/
38803891 if (adev->gmc.xgmi.supported) {
3881− r = adev->gfxhub.funcs->get_xgmi_info(adev);
3882− if (r)
3883− return r;
3892+ if (adev->gfxhub.funcs &&
3893+ adev->gfxhub.funcs->get_xgmi_info) {
3894+ r = adev->gfxhub.funcs->get_xgmi_info(adev);
3895+ if (r)
3896+ return r;
3897+ }
3898+ }
3899+
3900+ if (adev->gmc.xgmi.connected_to_cpu) {
3901+ if (adev->mmhub.funcs &&
3902+ adev->mmhub.funcs->get_xgmi_info) {
3903+ r = adev->mmhub.funcs->get_xgmi_info(adev);
3904+ if (r)
3905+ return r;
3906+ }
38843907 }
38853908
38863909 /* enable PCIE atomic ops */
@@ -4202,6 +4225,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev) · 315 unmodified lines
42024225 if (pci_dev_is_disconnected(adev->pdev))
42034226 amdgpu_amdkfd_device_fini_sw(adev);
42044227
4228+ amdgpu_coredump_fini(adev);
42054229 amdgpu_device_ip_fini_early(adev);
42064230
42074231 amdgpu_irq_fini_hw(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c+48−24
@@ -112,8 +112,10 @@ · 111 unmodified lines
112112 #include "smuio_v15_0_8.h"
113113 #include "vcn_v5_0_0.h"
114114 #include "vcn_v5_0_1.h"
115+#include "vcn_v5_0_2.h"
115116 #include "jpeg_v5_0_0.h"
116117 #include "jpeg_v5_0_1.h"
118+#include "jpeg_v5_0_2.h"
117119 #include "jpeg_v5_3_0.h"
118120
119121 #include "amdgpu_ras_mgr.h"
@@ -296,13 +298,17 @@ static int amdgpu_discovery_get_tmr_info(struct amdgpu_device *adev, · 176 unmodified lines
296298 if (vram_size)
297299 adev->discovery.offset = (vram_size << 20) - DISCOVERY_TMR_OFFSET;
298300
299− if (amdgpu_sriov_vf(adev) && adev->virt.is_dynamic_crit_regn_enabled) {
300− adev->discovery.offset =
301− adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].offset;
302− adev->discovery.size =
303− adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].size_kb << 10;
304− if (!adev->discovery.offset || !adev->discovery.size)
305− return -EINVAL;
301+ if (amdgpu_sriov_vf(adev)) {
302+ if (adev->virt.is_dynamic_crit_regn_enabled) {
303+ adev->discovery.offset =
304+ adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].offset;
305+ adev->discovery.size =
306+ adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].size_kb << 10;
307+ if (!adev->discovery.offset || !adev->discovery.size)
308+ return -EINVAL;
309+ } else {
310+ goto out;
311+ }
306312 } else {
307313 tmr_size = RREG32(mmDRIVER_SCRATCH_2);
308314 if (tmr_size) {
@@ -318,11 +324,11 @@ static int amdgpu_discovery_get_tmr_info(struct amdgpu_device *adev, · 9 unmodified lines
318324 ret = amdgpu_acpi_get_tmr_info(adev, &tmr_offset, &tmr_size);
319325 if (ret)
320326 return ret;
321− adev->discovery.size = (u32)tmr_size;
327+ adev->discovery.size = DISCOVERY_TMR_SIZE;
322328 adev->discovery.offset = tmr_offset + tmr_size - DISCOVERY_TMR_OFFSET;
323329 }
324330 }
325−
331+out:
326332 adev->discovery.bin = kzalloc(adev->discovery.size, GFP_KERNEL);
327333 if (!adev->discovery.bin)
328334 return -ENOMEM;
@@ -556,7 +562,7 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev, · 227 unmodified lines
556562 checksum = le16_to_cpu(info->checksum);
557563
558564 switch (table_id) {
559− case IP_DISCOVERY:
565+ case IP_DISCOVERY: {
560566 struct ip_discovery_header *ihdr =
561567 (struct ip_discovery_header *)(discovery_bin + offset);
562568 act_val = le32_to_cpu(ihdr->signature);
@@ -564,7 +570,8 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev, · 1 unmodified line
564570 table_size = le16_to_cpu(ihdr->size);
565571 table_name = "data table";
566572 break;
567− case GC:
573+ }
574+ case GC: {
568575 struct gpu_info_header *ghdr =
569576 (struct gpu_info_header *)(discovery_bin + offset);
570577 act_val = le32_to_cpu(ghdr->table_id);
@@ -572,7 +579,8 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev, · 1 unmodified line
572579 table_size = le16_to_cpu(ghdr->size);
573580 table_name = "gc table";
574581 break;
575− case HARVEST_INFO:
582+ }
583+ case HARVEST_INFO: {
576584 struct harvest_info_header *hhdr =
577585 (struct harvest_info_header *)(discovery_bin + offset);
578586 act_val = le32_to_cpu(hhdr->signature);
@@ -580,7 +588,8 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev, · 1 unmodified line
580588 table_size = sizeof(struct harvest_table);
581589 table_name = "harvest table";
582590 break;
583− case VCN_INFO:
591+ }
592+ case VCN_INFO: {
584593 struct vcn_info_header *vhdr =
585594 (struct vcn_info_header *)(discovery_bin + offset);
586595 act_val = le32_to_cpu(vhdr->table_id);
@@ -588,7 +597,8 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev, · 1 unmodified line
588597 table_size = le32_to_cpu(vhdr->size_bytes);
589598 table_name = "vcn table";
590599 break;
591− case MALL_INFO:
600+ }
601+ case MALL_INFO: {
592602 struct mall_info_header *mhdr =
593603 (struct mall_info_header *)(discovery_bin + offset);
594604 act_val = le32_to_cpu(mhdr->table_id);
@@ -597,6 +607,7 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev, · 2 unmodified lines
597607 table_name = "mall table";
598608 check_table = false;
599609 break;
610+ }
600611 default:
601612 dev_err(adev->dev, "invalid ip discovery table id %d specified\n", table_id);
602613 check_table = false;
@@ -1383,6 +1394,9 @@ static void amdgpu_discovery_sysfs_fini(struct amdgpu_device *adev) · 780 unmodified lines
13831394 struct list_head *el, *tmp;
13841395 struct kset *die_kset;
13851396
1397+ if (!ip_top)
1398+ return;
1399+
13861400 die_kset = &ip_top->die_kset;
13871401 spin_lock(&die_kset->list_lock);
13881402 list_for_each_prev_safe(el, tmp, &die_kset->list) {
@@ -1407,9 +1421,13 @@ void amdgpu_discovery_dump(struct amdgpu_device *adev, struct drm_printer *p) · 18 unmodified lines
14071421 struct ip_hw_instance *ip_inst;
14081422 int i = 0, j;
14091423
1424+ if (!ip_top)
1425+ return;
1426+
14101427 die_kset = &ip_top->die_kset;
14111428
14121429 drm_printf(p, "\nHW IP Discovery\n");
1430+
14131431 spin_lock(&die_kset->list_lock);
14141432 list_for_each(el_die, &die_kset->list) {
14151433 drm_printf(p, "die %d\n", i++);
@@ -1966,11 +1984,10 @@ static int amdgpu_discovery_refresh_nps_info(struct amdgpu_device *adev, · 550 unmodified lines
19661984
19671985 int amdgpu_discovery_get_nps_info(struct amdgpu_device *adev,
19681986 uint32_t *nps_type,
1969− struct amdgpu_gmc_memrange **ranges,
1987+ struct amdgpu_gmc_memrange *ranges,
19701988 int *range_cnt, bool refresh)
19711989 {
19721990 uint8_t *discovery_bin = adev->discovery.bin;
1973− struct amdgpu_gmc_memrange *mem_ranges;
19741991 struct table_info *info;
19751992 union nps_info *nps_info;
19761993 union nps_info nps_data;
@@ -2008,20 +2025,22 @@ int amdgpu_discovery_get_nps_info(struct amdgpu_device *adev, · 31 unmodified lines
20082025
20092026 switch (le16_to_cpu(nps_info->v1.header.version_major)) {
20102027 case 1:
2011− mem_ranges = kvzalloc_objs(*mem_ranges, nps_info->v1.count);
2012− if (!mem_ranges)
2013− return -ENOMEM;
20142028 *nps_type = nps_info->v1.nps_type;
2029+ if (*range_cnt < nps_info->v1.count) {
2030+ dev_dbg(adev->dev,
2031+ "not enough space for nps ranges: %d < %d\n",
2032+ *range_cnt, nps_info->v1.count);
2033+ return -ENOSPC;
2034+ }
20152035 *range_cnt = nps_info->v1.count;
20162036 for (i = 0; i < *range_cnt; i++) {
2017− mem_ranges[i].base_address =
2037+ ranges[i].base_address =
20182038 nps_info->v1.instance_info[i].base_address;
2019− mem_ranges[i].limit_address =
2039+ ranges[i].limit_address =
20202040 nps_info->v1.instance_info[i].limit_address;
2021− mem_ranges[i].nid_mask = -1;
2022− mem_ranges[i].flags = 0;
2041+ ranges[i].nid_mask = -1;
2042+ ranges[i].flags = 0;
20232043 }
2024− *ranges = mem_ranges;
20252044 break;
20262045 default:
20272046 dev_err(adev->dev, "Unhandled NPS info table %d.%d\n",
@@ -2323,6 +2342,7 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev) · 295 unmodified lines
23232342 amdgpu_device_ip_block_add(adev, &smu_v14_0_ip_block);
23242343 break;
23252344 case IP_VERSION(15, 0, 0):
2345+ case IP_VERSION(15, 0, 8):
23262346 amdgpu_device_ip_block_add(adev, &smu_v15_0_ip_block);
23272347 break;
23282348 default:
@@ -2640,6 +2660,10 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev) · 311 unmodified lines
26402660 amdgpu_device_ip_block_add(adev, &vcn_v5_0_1_ip_block);
26412661 amdgpu_device_ip_block_add(adev, &jpeg_v5_0_1_ip_block);
26422662 break;
2663+ case IP_VERSION(5, 0, 2):
2664+ amdgpu_device_ip_block_add(adev, &vcn_v5_0_2_ip_block);
2665+ amdgpu_device_ip_block_add(adev, &jpeg_v5_0_2_ip_block);
2666+ break;
26432667 default:
26442668 dev_err(adev->dev,
26452669 "Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h+1−1
@@ -46,7 +46,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev); · 45 unmodified lines
4646
4747 int amdgpu_discovery_get_nps_info(struct amdgpu_device *adev,
4848 uint32_t *nps_type,
49− struct amdgpu_gmc_memrange **ranges,
49+ struct amdgpu_gmc_memrange *ranges,
5050 int *range_cnt, bool refresh);
5151
5252 void amdgpu_discovery_dump(struct amdgpu_device *adev, struct drm_printer *p);
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+12−6
@@ -839,8 +839,8 @@ module_param_named_unsafe(no_queue_eviction_on_vm_fault, amdgpu_no_queue_evictio · 838 unmodified lines
839839 /**
840840 * DOC: mtype_local (int)
841841 */
842−int amdgpu_mtype_local;
843−MODULE_PARM_DESC(mtype_local, "MTYPE for local memory (0 = MTYPE_RW (default), 1 = MTYPE_NC, 2 = MTYPE_CC)");
842+int amdgpu_mtype_local = -1;
843+MODULE_PARM_DESC(mtype_local, "MTYPE for local memory (default: ASIC dependent, 0 = MTYPE_RW, 1 = MTYPE_NC, 2 = MTYPE_CC)");
844844 module_param_named_unsafe(mtype_local, amdgpu_mtype_local, int, 0444);
845845
846846 /**
@@ -2683,8 +2683,12 @@ static int amdgpu_pmops_freeze(struct device *dev) · 1836 unmodified lines
26832683 if (r)
26842684 return r;
26852685
2686− if (amdgpu_acpi_should_gpu_reset(adev))
2687− return amdgpu_asic_reset(adev);
2686+ if (amdgpu_acpi_should_gpu_reset(adev)) {
2687+ amdgpu_device_lock_reset_domain(adev->reset_domain);
2688+ r = amdgpu_asic_reset(adev);
2689+ amdgpu_device_unlock_reset_domain(adev->reset_domain);
2690+ return r;
2691+ }
26882692 return 0;
26892693 }
26902694
@@ -2952,9 +2956,11 @@ static int amdgpu_drm_release(struct inode *inode, struct file *filp) · 261 unmodified lines
29522956 int idx;
29532957
29542958 if (fpriv && drm_dev_enter(dev, &idx)) {
2955− fpriv->evf_mgr.fd_closing = true;
2956− amdgpu_eviction_fence_destroy(&fpriv->evf_mgr);
2959+ amdgpu_evf_mgr_shutdown(&fpriv->evf_mgr);
2960+ amdgpu_userq_mgr_cancel_resume(&fpriv->userq_mgr);
2961+ amdgpu_evf_mgr_flush_suspend(&fpriv->evf_mgr);
29572962 amdgpu_userq_mgr_fini(&fpriv->userq_mgr);
2963+ amdgpu_evf_mgr_fini(&fpriv->evf_mgr);
29582964 drm_dev_exit(idx);
29592965 }
29602966
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c+92−145
@@ -25,9 +25,6 @@ · 24 unmodified lines
2525 #include <drm/drm_exec.h>
2626 #include "amdgpu.h"
2727
28−#define work_to_evf_mgr(w, name) container_of(w, struct amdgpu_eviction_fence_mgr, name)
29−#define evf_mgr_to_fpriv(e) container_of(e, struct amdgpu_fpriv, evf_mgr)
30−
3128 static const char *
3229 amdgpu_eviction_fence_get_driver_name(struct dma_fence *fence)
3330 {
@@ -43,127 +40,93 @@ amdgpu_eviction_fence_get_timeline_name(struct dma_fence *f) · 9 unmodified lines
4340 return ef->timeline_name;
4441 }
4542
46−int
47−amdgpu_eviction_fence_replace_fence(struct amdgpu_eviction_fence_mgr *evf_mgr,
48− struct drm_exec *exec)
43+static bool amdgpu_eviction_fence_enable_signaling(struct dma_fence *f)
4944 {
50− struct amdgpu_eviction_fence *old_ef, *new_ef;
51− struct drm_gem_object *obj;
52− unsigned long index;
53− int ret;
54−
55− if (evf_mgr->ev_fence &&
56− !dma_fence_is_signaled(&evf_mgr->ev_fence->base))
57− return 0;
58− /*
59− * Steps to replace eviction fence:
60− * * lock all objects in exec (caller)
61− * * create a new eviction fence
62− * * update new eviction fence in evf_mgr
63− * * attach the new eviction fence to BOs
64− * * release the old fence
65− * * unlock the objects (caller)
66− */
67− new_ef = amdgpu_eviction_fence_create(evf_mgr);
68− if (!new_ef) {
69− DRM_ERROR("Failed to create new eviction fence\n");
70− return -ENOMEM;
71− }
72−
73− /* Update the eviction fence now */
74− spin_lock(&evf_mgr->ev_fence_lock);
75− old_ef = evf_mgr->ev_fence;
76− evf_mgr->ev_fence = new_ef;
77− spin_unlock(&evf_mgr->ev_fence_lock);
45+ struct amdgpu_eviction_fence *ev_fence = to_ev_fence(f);
7846
79− /* Attach the new fence */
80− drm_exec_for_each_locked_object(exec, index, obj) {
81− struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
82−
83− if (!bo)
84− continue;
85− ret = amdgpu_eviction_fence_attach(evf_mgr, bo);
86− if (ret) {
87− DRM_ERROR("Failed to attch new eviction fence\n");
88− goto free_err;
89− }
90− }
91−
92− /* Free old fence */
93− if (old_ef)
94− dma_fence_put(&old_ef->base);
95− return 0;
96−
97−free_err:
98− kfree(new_ef);
99− return ret;
47+ schedule_work(&ev_fence->evf_mgr->suspend_work);
48+ return true;
10049 }
10150
51+static const struct dma_fence_ops amdgpu_eviction_fence_ops = {
52+ .get_driver_name = amdgpu_eviction_fence_get_driver_name,
53+ .get_timeline_name = amdgpu_eviction_fence_get_timeline_name,
54+ .enable_signaling = amdgpu_eviction_fence_enable_signaling,
55+};
56+
10257 static void
10358 amdgpu_eviction_fence_suspend_worker(struct work_struct *work)
10459 {
105− struct amdgpu_eviction_fence_mgr *evf_mgr = work_to_evf_mgr(work, suspend_work.work);
106− struct amdgpu_fpriv *fpriv = evf_mgr_to_fpriv(evf_mgr);
60+ struct amdgpu_eviction_fence_mgr *evf_mgr =
61+ container_of(work, struct amdgpu_eviction_fence_mgr,
62+ suspend_work);
63+ struct amdgpu_fpriv *fpriv =
64+ container_of(evf_mgr, struct amdgpu_fpriv, evf_mgr);
10765 struct amdgpu_userq_mgr *uq_mgr = &fpriv->userq_mgr;
108− struct amdgpu_eviction_fence *ev_fence;
66+ struct dma_fence *ev_fence;
67+ bool cookie;
10968
11069 mutex_lock(&uq_mgr->userq_mutex);
111− spin_lock(&evf_mgr->ev_fence_lock);
112− ev_fence = evf_mgr->ev_fence;
113− if (ev_fence)
114− dma_fence_get(&ev_fence->base);
115− else
116− goto unlock;
117− spin_unlock(&evf_mgr->ev_fence_lock);
11870
119− amdgpu_userq_evict(uq_mgr, ev_fence);
71+ /*
72+ * This is intentionally after taking the userq_mutex since we do
73+ * allocate memory while holding this lock, but only after ensuring that
74+ * the eviction fence is signaled.
75+ */
76+ cookie = dma_fence_begin_signalling();
12077
121− mutex_unlock(&uq_mgr->userq_mutex);
122− dma_fence_put(&ev_fence->base);
123− return;
78+ ev_fence = amdgpu_evf_mgr_get_fence(evf_mgr);
79+ amdgpu_userq_evict(uq_mgr);
80+
81+ /*
82+ * Signaling the eviction fence must be done while holding the
83+ * userq_mutex. Otherwise we won't resume the queues before issuing the
84+ * next fence.
85+ */
86+ dma_fence_signal(ev_fence);
87+ dma_fence_end_signalling(cookie);
88+ dma_fence_put(ev_fence);
89+
90+ if (!evf_mgr->shutdown)
91+ schedule_delayed_work(&uq_mgr->resume_work, 0);
12492
125−unlock:
126− spin_unlock(&evf_mgr->ev_fence_lock);
12793 mutex_unlock(&uq_mgr->userq_mutex);
12894 }
12995
130−static bool amdgpu_eviction_fence_enable_signaling(struct dma_fence *f)
96+int amdgpu_evf_mgr_attach_fence(struct amdgpu_eviction_fence_mgr *evf_mgr,
97+ struct amdgpu_bo *bo)
13198 {
132− struct amdgpu_eviction_fence_mgr *evf_mgr;
133− struct amdgpu_eviction_fence *ev_fence;
134−
135− if (!f)
136− return true;
137−
138− ev_fence = to_ev_fence(f);
139− evf_mgr = ev_fence->evf_mgr;
99+ struct dma_fence *ev_fence = amdgpu_evf_mgr_get_fence(evf_mgr);
100+ struct ttm_operation_ctx ctx = { false, false };
101+ struct dma_resv *resv = bo->tbo.base.resv;
102+ int ret;
140103
141− schedule_delayed_work(&evf_mgr->suspend_work, 0);
142− return true;
143−}
104+ if (!dma_fence_is_signaled(ev_fence)) {
144105
145−static const struct dma_fence_ops amdgpu_eviction_fence_ops = {
146− .get_driver_name = amdgpu_eviction_fence_get_driver_name,
147− .get_timeline_name = amdgpu_eviction_fence_get_timeline_name,
148− .enable_signaling = amdgpu_eviction_fence_enable_signaling,
149−};
106+ amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);
107+ ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
108+ if (!ret)
109+ dma_resv_add_fence(resv, ev_fence,
110+ DMA_RESV_USAGE_BOOKKEEP);
111+ } else {
112+ ret = 0;
113+ }
150114
151−void amdgpu_eviction_fence_signal(struct amdgpu_eviction_fence_mgr *evf_mgr,
152− struct amdgpu_eviction_fence *ev_fence)
153−{
154− spin_lock(&evf_mgr->ev_fence_lock);
155− dma_fence_signal(&ev_fence->base);
156− spin_unlock(&evf_mgr->ev_fence_lock);
115+ dma_fence_put(ev_fence);
116+ return ret;
157117 }
158118
159−struct amdgpu_eviction_fence *
160−amdgpu_eviction_fence_create(struct amdgpu_eviction_fence_mgr *evf_mgr)
119+int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr,
120+ struct drm_exec *exec)
161121 {
162122 struct amdgpu_eviction_fence *ev_fence;
123+ struct drm_gem_object *obj;
124+ unsigned long index;
163125
126+ /* Create and initialize a new eviction fence */
164127 ev_fence = kzalloc_obj(*ev_fence);
165128 if (!ev_fence)
166− return NULL;
129+ return -ENOMEM;
167130
168131 ev_fence->evf_mgr = evf_mgr;
169132 get_task_comm(ev_fence->timeline_name, current);
@@ -171,56 +134,22 @@ amdgpu_eviction_fence_create(struct amdgpu_eviction_fence_mgr *evf_mgr) · 1 unmodified line
171134 dma_fence_init64(&ev_fence->base, &amdgpu_eviction_fence_ops,
172135 &ev_fence->lock, evf_mgr->ev_fence_ctx,
173136 atomic_inc_return(&evf_mgr->ev_fence_seq));
174− return ev_fence;
175−}
176−
177−void amdgpu_eviction_fence_destroy(struct amdgpu_eviction_fence_mgr *evf_mgr)
178−{
179− struct amdgpu_eviction_fence *ev_fence;
180−
181− /* Wait for any pending work to execute */
182− flush_delayed_work(&evf_mgr->suspend_work);
183−
184− spin_lock(&evf_mgr->ev_fence_lock);
185− ev_fence = evf_mgr->ev_fence;
186− spin_unlock(&evf_mgr->ev_fence_lock);
187−
188− if (!ev_fence)
189− return;
190−
191− dma_fence_wait(&ev_fence->base, false);
192−
193− /* Last unref of ev_fence */
194− dma_fence_put(&ev_fence->base);
195−}
196137
197−int amdgpu_eviction_fence_attach(struct amdgpu_eviction_fence_mgr *evf_mgr,
198− struct amdgpu_bo *bo)
199−{
200− struct amdgpu_eviction_fence *ev_fence;
201− struct dma_resv *resv = bo->tbo.base.resv;
202− int ret;
138+ /* Remember it for newly added BOs */
139+ dma_fence_put(evf_mgr->ev_fence);
140+ evf_mgr->ev_fence = &ev_fence->base;
203141
204− if (!resv)
205− return 0;
142+ /* And add it to all existing BOs */
143+ drm_exec_for_each_locked_object(exec, index, obj) {
144+ struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
206145
207− ret = dma_resv_reserve_fences(resv, 1);
208− if (ret) {
209− DRM_DEBUG_DRIVER("Failed to resv fence space\n");
210− return ret;
146+ amdgpu_evf_mgr_attach_fence(evf_mgr, bo);
211147 }
212−
213− spin_lock(&evf_mgr->ev_fence_lock);
214− ev_fence = evf_mgr->ev_fence;
215− if (ev_fence)
216− dma_resv_add_fence(resv, &ev_fence->base, DMA_RESV_USAGE_BOOKKEEP);
217− spin_unlock(&evf_mgr->ev_fence_lock);
218−
219148 return 0;
220149 }
221150
222−void amdgpu_eviction_fence_detach(struct amdgpu_eviction_fence_mgr *evf_mgr,
223− struct amdgpu_bo *bo)
151+void amdgpu_evf_mgr_detach_fence(struct amdgpu_eviction_fence_mgr *evf_mgr,
152+ struct amdgpu_bo *bo)
224153 {
225154 struct dma_fence *stub = dma_fence_get_stub();
226155
@@ -229,13 +158,31 @@ void amdgpu_eviction_fence_detach(struct amdgpu_eviction_fence_mgr *evf_mgr, · 2 unmodified lines
229158 dma_fence_put(stub);
230159 }
231160
232−int amdgpu_eviction_fence_init(struct amdgpu_eviction_fence_mgr *evf_mgr)
161+void amdgpu_evf_mgr_init(struct amdgpu_eviction_fence_mgr *evf_mgr)
233162 {
234− /* This needs to be done one time per open */
235163 atomic_set(&evf_mgr->ev_fence_seq, 0);
236164 evf_mgr->ev_fence_ctx = dma_fence_context_alloc(1);
237− spin_lock_init(&evf_mgr->ev_fence_lock);
165+ evf_mgr->ev_fence = dma_fence_get_stub();
238166
239− INIT_DELAYED_WORK(&evf_mgr->suspend_work, amdgpu_eviction_fence_suspend_worker);
240− return 0;
167+ INIT_WORK(&evf_mgr->suspend_work, amdgpu_eviction_fence_suspend_worker);
168+}
169+
170+void amdgpu_evf_mgr_shutdown(struct amdgpu_eviction_fence_mgr *evf_mgr)
171+{
172+ evf_mgr->shutdown = true;
173+ /* Make sure that the shutdown is visible to the suspend work */
174+ flush_work(&evf_mgr->suspend_work);
175+}
176+
177+void amdgpu_evf_mgr_flush_suspend(struct amdgpu_eviction_fence_mgr *evf_mgr)
178+{
179+ dma_fence_wait(rcu_dereference_protected(evf_mgr->ev_fence, true),
180+ false);
181+ /* Make sure that we are done with the last suspend work */
182+ flush_work(&evf_mgr->suspend_work);
183+}
184+
185+void amdgpu_evf_mgr_fini(struct amdgpu_eviction_fence_mgr *evf_mgr)
186+{
187+ dma_fence_put(evf_mgr->ev_fence);
241188 }
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h+29−26
@@ -25,6 +25,8 @@ · 24 unmodified lines
2525 #ifndef AMDGPU_EV_FENCE_H_
2626 #define AMDGPU_EV_FENCE_H_
2727
28+#include <linux/dma-fence.h>
29+
2830 struct amdgpu_eviction_fence {
2931 struct dma_fence base;
3032 spinlock_t lock;
@@ -35,35 +37,36 @@ struct amdgpu_eviction_fence { · 4 unmodified lines
3537 struct amdgpu_eviction_fence_mgr {
3638 u64 ev_fence_ctx;
3739 atomic_t ev_fence_seq;
38− spinlock_t ev_fence_lock;
39− struct amdgpu_eviction_fence *ev_fence;
40− struct delayed_work suspend_work;
41− uint8_t fd_closing;
42−};
43−
44−/* Eviction fence helper functions */
45−struct amdgpu_eviction_fence *
46−amdgpu_eviction_fence_create(struct amdgpu_eviction_fence_mgr *evf_mgr);
4740
48−void
49−amdgpu_eviction_fence_destroy(struct amdgpu_eviction_fence_mgr *evf_mgr);
50−
51−int
52−amdgpu_eviction_fence_attach(struct amdgpu_eviction_fence_mgr *evf_mgr,
53− struct amdgpu_bo *bo);
41+ /*
42+ * Only updated while holding the VM resv lock.
43+ * Only signaled while holding the userq mutex.
44+ */
45+ struct dma_fence __rcu *ev_fence;
46+ struct work_struct suspend_work;
47+ bool shutdown;
48+};
5449
55−void
56−amdgpu_eviction_fence_detach(struct amdgpu_eviction_fence_mgr *evf_mgr,
57− struct amdgpu_bo *bo);
50+static inline struct dma_fence *
51+amdgpu_evf_mgr_get_fence(struct amdgpu_eviction_fence_mgr *evf_mgr)
52+{
53+ struct dma_fence *ev_fence;
5854
59−int
60−amdgpu_eviction_fence_init(struct amdgpu_eviction_fence_mgr *evf_mgr);
55+ rcu_read_lock();
56+ ev_fence = dma_fence_get_rcu_safe(&evf_mgr->ev_fence);
57+ rcu_read_unlock();
58+ return ev_fence;
59+}
6160
62−void
63−amdgpu_eviction_fence_signal(struct amdgpu_eviction_fence_mgr *evf_mgr,
64− struct amdgpu_eviction_fence *ev_fence);
61+int amdgpu_evf_mgr_attach_fence(struct amdgpu_eviction_fence_mgr *evf_mgr,
62+ struct amdgpu_bo *bo);
63+int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr,
64+ struct drm_exec *exec);
65+void amdgpu_evf_mgr_detach_fence(struct amdgpu_eviction_fence_mgr *evf_mgr,
66+ struct amdgpu_bo *bo);
67+void amdgpu_evf_mgr_init(struct amdgpu_eviction_fence_mgr *evf_mgr);
68+void amdgpu_evf_mgr_shutdown(struct amdgpu_eviction_fence_mgr *evf_mgr);
69+void amdgpu_evf_mgr_flush_suspend(struct amdgpu_eviction_fence_mgr *evf_mgr);
70+void amdgpu_evf_mgr_fini(struct amdgpu_eviction_fence_mgr *evf_mgr);
6571
66−int
67−amdgpu_eviction_fence_replace_fence(struct amdgpu_eviction_fence_mgr *evf_mgr,
68− struct drm_exec *exec);
6972 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c+1−1
@@ -438,7 +438,7 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring, · 437 unmodified lines
438438 * @ring: ring to init the fence driver on
439439 *
440440 * Init the fence driver for the requested ring (all asics).
441− * Helper function for amdgpu_fence_driver_init().
441+ * Helper function for amdgpu_fence_driver_sw_init().
442442 */
443443 int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring)
444444 {
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c+1−0
@@ -106,6 +106,7 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev, u32 *fru_addr) · 105 unmodified lines
106106 *fru_addr = FRU_EEPROM_MADDR_8;
107107 return true;
108108 case IP_VERSION(13, 0, 12):
109+ case IP_VERSION(15, 0, 8):
109110 if (fru_addr)
110111 *fru_addr = FRU_EEPROM_MADDR_INV;
111112 return true;
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c+44−0
@@ -403,6 +403,50 @@ void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa, · 402 unmodified lines
403403 drm_dev_exit(idx);
404404 }
405405
406+/**
407+ * amdgpu_gart_map_gfx9_mqd - map mqd and ctrl_stack dma_addresses into GART entries
408+ *
409+ * @adev: amdgpu_device pointer
410+ * @offset: offset into the GPU's gart aperture
411+ * @pages: number of pages to bind
412+ * @dma_addr: DMA addresses of pages
413+ * @flags: page table entry flags
414+ *
415+ * Map the MQD and control stack addresses into GART entries with the correct
416+ * memory types on gfxv9. The MQD occupies the first 4KB and is followed by
417+ * the control stack. The MQD uses UC (uncached) memory, while the control stack
418+ * uses NC (non-coherent) memory.
419+ */
420+void amdgpu_gart_map_gfx9_mqd(struct amdgpu_device *adev, uint64_t offset,
421+ int pages, dma_addr_t *dma_addr, uint64_t flags)
422+{
423+ uint64_t page_base;
424+ unsigned int i, j, t;
425+ int idx;
426+ uint64_t ctrl_flags = AMDGPU_PTE_MTYPE_VG10(flags, AMDGPU_MTYPE_NC);
427+ void *dst;
428+
429+ if (!adev->gart.ptr)
430+ return;
431+
432+ if (!drm_dev_enter(adev_to_drm(adev), &idx))
433+ return;
434+
435+ t = offset / AMDGPU_GPU_PAGE_SIZE;
436+ dst = adev->gart.ptr;
437+ for (i = 0; i < pages; i++) {
438+ page_base = dma_addr[i];
439+ for (j = 0; j < AMDGPU_GPU_PAGES_IN_CPU_PAGE; j++, t++) {
440+ if ((i == 0) && (j == 0))
441+ amdgpu_gmc_set_pte_pde(adev, dst, t, page_base, flags);
442+ else
443+ amdgpu_gmc_set_pte_pde(adev, dst, t, page_base, ctrl_flags);
444+ page_base += AMDGPU_GPU_PAGE_SIZE;
445+ }
446+ }
447+ drm_dev_exit(idx);
448+}
449+
406450 /**
407451 * amdgpu_gart_bind - bind pages into the gart page table
408452 *
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h+2−0
@@ -62,6 +62,8 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, · 61 unmodified lines
6262 void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
6363 int pages, dma_addr_t *dma_addr, uint64_t flags,
6464 void *dst);
65+void amdgpu_gart_map_gfx9_mqd(struct amdgpu_device *adev, uint64_t offset,
66+ int pages, dma_addr_t *dma_addr, uint64_t flags);
6567 void amdgpu_gart_bind(struct amdgpu_device *adev, uint64_t offset,
6668 int pages, dma_addr_t *dma_addr, uint64_t flags);
6769 void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa,
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c+46−52
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include <linux/pagemap.h>
3131 #include <linux/pci.h>
3232 #include <linux/dma-buf.h>
33+#include <linux/dma-fence-unwrap.h>
3334
3435 #include <drm/amdgpu_drm.h>
3536 #include <drm/drm_drv.h>
@@ -106,6 +107,7 @@ amdgpu_gem_update_timeline_node(struct drm_file *filp, · 70 unmodified lines
106107 *chain = dma_fence_chain_alloc();
107108 if (!*chain) {
108109 drm_syncobj_put(*syncobj);
110+ *syncobj = NULL;
109111 return -ENOMEM;
110112 }
111113
@@ -258,18 +260,15 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj, · 146 unmodified lines
258260
259261 amdgpu_vm_bo_update_shared(abo);
260262 bo_va = amdgpu_vm_bo_find(vm, abo);
261− if (!bo_va)
263+ if (!bo_va) {
262264 bo_va = amdgpu_vm_bo_add(adev, vm, abo);
263− else
265+ r = amdgpu_evf_mgr_attach_fence(&fpriv->evf_mgr, abo);
266+ if (r)
267+ goto out_unlock;
268+ } else {
264269 ++bo_va->ref_count;
265−
266− /* attach gfx eviction fence */
267− r = amdgpu_eviction_fence_attach(&fpriv->evf_mgr, abo);
268− if (r) {
269− DRM_DEBUG_DRIVER("Failed to attach eviction fence to BO\n");
270− amdgpu_bo_unreserve(abo);
271− return r;
272270 }
271+
273272 drm_exec_fini(&exec);
274273
275274 /* Validate and add eviction fence to DMABuf imports with dynamic
@@ -337,7 +336,7 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj, · 61 unmodified lines
337336 }
338337
339338 if (!amdgpu_vm_is_bo_always_valid(vm, bo))
340− amdgpu_eviction_fence_detach(&fpriv->evf_mgr, bo);
339+ amdgpu_evf_mgr_detach_fence(&fpriv->evf_mgr, bo);
341340
342341 bo_va = amdgpu_vm_bo_find(vm, bo);
343342 if (!bo_va || --bo_va->ref_count)
@@ -744,11 +743,10 @@ amdgpu_gem_va_update_vm(struct amdgpu_device *adev, · 400 unmodified lines
744743 struct dma_fence *fence;
745744 int r = 0;
746745
747− /* Always start from the VM's existing last update fence. */
748− fence = dma_fence_get(vm->last_update);
749−
746+ /* If the VM is not ready return only a stub. */
750747 if (!amdgpu_vm_ready(vm))
751− return fence;
748+ return dma_fence_get_stub();
749+
752750
753751 /*
754752 * First clean up any freed mappings in the VM.
@@ -757,7 +755,7 @@ amdgpu_gem_va_update_vm(struct amdgpu_device *adev, · 2 unmodified lines
757755 * schedules GPU work. If nothing needs clearing, @fence can remain as
758756 * the original vm->last_update.
759757 */
760− r = amdgpu_vm_clear_freed(adev, vm, &fence);
758+ r = amdgpu_vm_clear_freed(adev, vm, &vm->last_update);
761759 if (r)
762760 goto error;
763761
@@ -774,47 +772,34 @@ amdgpu_gem_va_update_vm(struct amdgpu_device *adev, · 10 unmodified lines
774772 if (r)
775773 goto error;
776774
777− /*
778− * Decide which fence best represents the last update:
779− *
780− * MAP/REPLACE:
781− * - For always-valid mappings, use vm->last_update.
782− * - Otherwise, export bo_va->last_pt_update.
783− *
784− * UNMAP/CLEAR:
785− * Keep the fence returned by amdgpu_vm_clear_freed(). If no work was
786− * needed, it can remain as vm->last_pt_update.
787− *
788− * The VM and BO update fences are always initialized to a valid value.
789− * vm->last_update and bo_va->last_pt_update always start as valid fences.
790− * and are never expected to be NULL.
791− */
792− switch (operation) {
793− case AMDGPU_VA_OP_MAP:
794− case AMDGPU_VA_OP_REPLACE:
775+ if ((operation == AMDGPU_VA_OP_MAP ||
776+ operation == AMDGPU_VA_OP_REPLACE) &&
777+ !amdgpu_vm_is_bo_always_valid(vm, bo_va->base.bo)) {
778+
795779 /*
796− * For MAP/REPLACE, return the page table update fence for the
797− * mapping we just modified. bo_va is expected to be valid here.
780+ * For MAP/REPLACE of non per-VM BOs we need to sync to both the
781+ * bo_va->last_pt_update and vm->last_update or otherwise we
782+ * potentially miss the PDE updates.
798783 */
799− dma_fence_put(fence);
800−
801− if (amdgpu_vm_is_bo_always_valid(vm, bo_va->base.bo))
802− fence = dma_fence_get(vm->last_update);
803− else
804− fence = dma_fence_get(bo_va->last_pt_update);
805− break;
806− case AMDGPU_VA_OP_UNMAP:
807− case AMDGPU_VA_OP_CLEAR:
808− default:
809− /* keep @fence as returned by amdgpu_vm_clear_freed() */
810− break;
784+ fence = dma_fence_unwrap_merge(vm->last_update,
785+ bo_va->last_pt_update);
786+ if (!fence) {
787+ /* As fallback in OOM situations */
788+ dma_fence_wait(vm->last_update, false);
789+ dma_fence_wait(bo_va->last_pt_update, false);
790+ fence = dma_fence_get_stub();
791+ }
792+ } else {
793+ fence = dma_fence_get(vm->last_update);
811794 }
812795
796+ return fence;
797+
813798 error:
814799 if (r && r != -ERESTARTSYS)
815800 DRM_ERROR("Couldn't update BO_VA (%d)\n", r);
816801
817− return fence;
802+ return dma_fence_get(vm->last_update);
818803 }
819804
820805 int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
@@ -835,7 +820,6 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 14 unmodified lines
835820 struct amdgpu_bo_va *bo_va;
836821 struct drm_syncobj *timeline_syncobj = NULL;
837822 struct dma_fence_chain *timeline_chain = NULL;
838− struct dma_fence *fence;
839823 struct drm_exec exec;
840824 uint64_t vm_size;
841825 int r = 0;
@@ -887,6 +871,10 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 45 unmodified lines
887871 return -EINVAL;
888872 }
889873
874+ if (args->flags & AMDGPU_VM_DELAY_UPDATE &&
875+ args->vm_timeline_syncobj_out)
876+ return -EINVAL;
877+
890878 if ((args->operation != AMDGPU_VA_OP_CLEAR) &&
891879 !(args->flags & AMDGPU_VM_PAGE_PRT)) {
892880 gobj = drm_gem_object_lookup(filp, args->handle);
@@ -976,11 +964,13 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 83 unmodified lines
976964 * that represents the last relevant update for this mapping. This
977965 * fence can then be exported to the user-visible VM timeline.
978966 */
979− if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE) && !adev->debug_vm) {
967+ if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE) &&
968+ (!adev->debug_vm || timeline_syncobj)) {
969+ struct dma_fence *fence;
970+
980971 fence = amdgpu_gem_va_update_vm(adev, &fpriv->vm, bo_va,
981972 args->operation);
982−
983− if (timeline_syncobj && fence) {
973+ if (timeline_syncobj) {
984974 if (!args->vm_timeline_point) {
985975 /* Replace the existing fence when no point is given. */
986976 drm_syncobj_replace_fence(timeline_syncobj,
@@ -991,6 +981,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 4 unmodified lines
991981 timeline_chain,
992982 fence,
993983 args->vm_timeline_point);
984+ timeline_chain = NULL;
994985 }
995986 }
996987 dma_fence_put(fence);
@@ -998,6 +989,9 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 1 unmodified line
998989 }
999990
1000991 error:
992+ dma_fence_chain_free(timeline_chain);
993+ if (timeline_syncobj)
994+ drm_syncobj_put(timeline_syncobj);
1001995 drm_exec_fini(&exec);
1002996 error_put_gobj:
1003997 drm_gem_object_put(gobj);
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h+1−0
@@ -463,6 +463,7 @@ struct amdgpu_gfx { · 462 unmodified lines
463463 struct amdgpu_irq_src cp_ecc_error_irq;
464464 struct amdgpu_irq_src sq_irq;
465465 struct amdgpu_irq_src rlc_gc_fed_irq;
466+ struct amdgpu_irq_src rlc_poison_irq;
466467 struct sq_work sq_work;
467468
468469 /* gfx status */
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c+33−6
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #include "amdgpu_ras.h"
3535 #include "amdgpu_reset.h"
3636 #include "amdgpu_xgmi.h"
37+#include "amdgpu_atomfirmware.h"
3738
3839 #include <drm/drm_drv.h>
3940 #include <drm/ttm/ttm_tt.h>
@@ -1374,18 +1375,18 @@ int amdgpu_gmc_get_nps_memranges(struct amdgpu_device *adev, · 1334 unmodified lines
13741375 struct amdgpu_mem_partition_info *mem_ranges,
13751376 uint8_t *exp_ranges)
13761377 {
1377− struct amdgpu_gmc_memrange *ranges;
1378+ struct amdgpu_gmc_memrange ranges[AMDGPU_MAX_MEM_RANGES];
13781379 int range_cnt, ret, i, j;
13791380 uint32_t nps_type;
13801381 bool refresh;
13811382
13821383 if (!mem_ranges || !exp_ranges)
13831384 return -EINVAL;
1384−
1385+ range_cnt = AMDGPU_MAX_MEM_RANGES;
13851386 refresh = (adev->init_lvl->level != AMDGPU_INIT_LEVEL_MINIMAL_XGMI) &&
13861387 (adev->gmc.reset_flags & AMDGPU_GMC_INIT_RESET_NPS);
1387− ret = amdgpu_discovery_get_nps_info(adev, &nps_type, &ranges,
1388− &range_cnt, refresh);
1388+ ret = amdgpu_discovery_get_nps_info(adev, &nps_type, ranges, &range_cnt,
1389+ refresh);
13891390
13901391 if (ret)
13911392 return ret;
@@ -1446,8 +1447,6 @@ int amdgpu_gmc_get_nps_memranges(struct amdgpu_device *adev, · 54 unmodified lines
14461447 if (!*exp_ranges)
14471448 *exp_ranges = range_cnt;
14481449 err:
1449− kvfree(ranges);
1450−
14511450 return ret;
14521451 }
14531452
@@ -1749,3 +1748,31 @@ int amdgpu_gmc_init_mem_ranges(struct amdgpu_device *adev) · 295 unmodified lines
17491748
17501749 return 0;
17511750 }
1751+
1752+int amdgpu_gmc_get_vram_info(struct amdgpu_device *adev,
1753+ int *vram_width, int *vram_type, int *vram_vendor)
1754+{
1755+ int ret = 0;
1756+
1757+ if (adev->flags & AMD_IS_APU)
1758+ return amdgpu_atomfirmware_get_integrated_system_info(adev,
1759+ vram_width, vram_type, vram_vendor);
1760+ switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
1761+ case IP_VERSION(12, 0, 0):
1762+ case IP_VERSION(12, 0, 1):
1763+ return amdgpu_atomfirmware_get_umc_info(adev,
1764+ vram_width, vram_type, vram_vendor);
1765+ case IP_VERSION(9, 5, 0):
1766+ case IP_VERSION(9, 4, 4):
1767+ case IP_VERSION(9, 4, 3):
1768+ ret = amdgpu_atomfirmware_get_umc_info(adev,
1769+ vram_width, vram_type, vram_vendor);
1770+ if (vram_width && !ret)
1771+ *vram_width *= hweight32(adev->aid_mask);
1772+ return ret;
1773+ default:
1774+ return amdgpu_atomfirmware_get_vram_info(adev,
1775+ vram_width, vram_type, vram_vendor);
1776+ }
1777+ return 0;
1778+}
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h+2−0
@@ -482,4 +482,6 @@ amdgpu_gmc_query_memory_partition(struct amdgpu_device *adev); · 481 unmodified lines
482482 int amdgpu_gmc_init_mem_ranges(struct amdgpu_device *adev);
483483 void amdgpu_gmc_init_sw_mem_ranges(struct amdgpu_device *adev,
484484 struct amdgpu_mem_partition_info *mem_ranges);
485+int amdgpu_gmc_get_vram_info(struct amdgpu_device *adev,
486+ int *vram_width, int *vram_type, int *vram_vendor);
485487 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c+35−13
@@ -35,10 +35,13 @@ · 34 unmodified lines
3535 * PASIDs are global address space identifiers that can be shared
3636 * between the GPU, an IOMMU and the driver. VMs on different devices
3737 * may use the same PASID if they share the same address
38− * space. Therefore PASIDs are allocated using a global IDA. VMs are
39− * looked up from the PASID per amdgpu_device.
38+ * space. Therefore PASIDs are allocated using IDR cyclic allocator
39+ * (similar to kernel PID allocation) which naturally delays reuse.
40+ * VMs are looked up from the PASID per amdgpu_device.
4041 */
41−static DEFINE_IDA(amdgpu_pasid_ida);
42+
43+static DEFINE_IDR(amdgpu_pasid_idr);
44+static DEFINE_SPINLOCK(amdgpu_pasid_idr_lock);
4245
4346 /* Helper to free pasid from a fence callback */
4447 struct amdgpu_pasid_cb {
@@ -50,8 +53,8 @@ struct amdgpu_pasid_cb { · 5 unmodified lines
5053 * amdgpu_pasid_alloc - Allocate a PASID
5154 * @bits: Maximum width of the PASID in bits, must be at least 1
5255 *
53− * Allocates a PASID of the given width while keeping smaller PASIDs
54− * available if possible.
56+ * Uses kernel's IDR cyclic allocator (same as PID allocation).
57+ * Allocates sequentially with automatic wrap-around.
5558 *
5659 * Returns a positive integer on success. Returns %-EINVAL if bits==0.
5760 * Returns %-ENOSPC if no PASID was available. Returns %-ENOMEM on
@@ -59,14 +62,18 @@ struct amdgpu_pasid_cb { · 1 unmodified line
5962 */
6063 int amdgpu_pasid_alloc(unsigned int bits)
6164 {
62− int pasid = -EINVAL;
65+ int pasid;
6366
64− for (bits = min(bits, 31U); bits > 0; bits--) {
65− pasid = ida_alloc_range(&amdgpu_pasid_ida, 1U << (bits - 1),
66− (1U << bits) - 1, GFP_KERNEL);
67− if (pasid != -ENOSPC)
68− break;
69− }
67+ if (bits == 0)
68+ return -EINVAL;
69+
70+ spin_lock(&amdgpu_pasid_idr_lock);
71+ /* TODO: Need to replace the idr with an xarry, and then
72+ * handle the internal locking with ATOMIC safe paths.
73+ */
74+ pasid = idr_alloc_cyclic(&amdgpu_pasid_idr, NULL, 1,
75+ 1U << bits, GFP_ATOMIC);
76+ spin_unlock(&amdgpu_pasid_idr_lock);
7077
7178 if (pasid >= 0)
7279 trace_amdgpu_pasid_allocated(pasid);
@@ -81,7 +88,10 @@ int amdgpu_pasid_alloc(unsigned int bits) · 8 unmodified lines
8188 void amdgpu_pasid_free(u32 pasid)
8289 {
8390 trace_amdgpu_pasid_freed(pasid);
84− ida_free(&amdgpu_pasid_ida, pasid);
91+
92+ spin_lock(&amdgpu_pasid_idr_lock);
93+ idr_remove(&amdgpu_pasid_idr, pasid);
94+ spin_unlock(&amdgpu_pasid_idr_lock);
8595 }
8696
8797 static void amdgpu_pasid_free_cb(struct dma_fence *fence,
@@ -616,3 +626,15 @@ void amdgpu_vmid_mgr_fini(struct amdgpu_device *adev) · 528 unmodified lines
616626 }
617627 }
618628 }
629+
630+/**
631+ * amdgpu_pasid_mgr_cleanup - cleanup PASID manager
632+ *
633+ * Cleanup the IDR allocator.
634+ */
635+void amdgpu_pasid_mgr_cleanup(void)
636+{
637+ spin_lock(&amdgpu_pasid_idr_lock);
638+ idr_destroy(&amdgpu_pasid_idr);
639+ spin_unlock(&amdgpu_pasid_idr_lock);
640+}
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h+1−0
@@ -74,6 +74,7 @@ int amdgpu_pasid_alloc(unsigned int bits); · 73 unmodified lines
7474 void amdgpu_pasid_free(u32 pasid);
7575 void amdgpu_pasid_free_delayed(struct dma_resv *resv,
7676 u32 pasid);
77+void amdgpu_pasid_mgr_cleanup(void);
7778
7879 bool amdgpu_vmid_had_gpu_reset(struct amdgpu_device *adev,
7980 struct amdgpu_vmid *id);
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c+1−4
@@ -1522,10 +1522,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) · 1521 unmodified lines
15221522 "Failed to init usermode queue manager (%d), use legacy workload submission only\n",
15231523 r);
15241524
1525− r = amdgpu_eviction_fence_init(&fpriv->evf_mgr);
1526− if (r)
1527− goto error_vm;
1528−
1525+ amdgpu_evf_mgr_init(&fpriv->evf_mgr);
15291526 amdgpu_ctx_mgr_init(&fpriv->ctx_mgr, adev);
15301527
15311528 file_priv->driver_priv = fpriv;
drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.h+26−0
@@ -63,14 +63,40 @@ struct amdgpu_mmhub_funcs { · 62 unmodified lines
6363 uint64_t page_table_base);
6464 void (*update_power_gating)(struct amdgpu_device *adev,
6565 bool enable);
66+ int (*get_xgmi_info)(struct amdgpu_device *adev);
67+};
68+
69+struct amdgpu_mmhub_client_ids {
70+ const char * const (*names)[2];
71+ unsigned int size;
6672 };
6773
6874 struct amdgpu_mmhub {
6975 struct ras_common_if *ras_if;
7076 const struct amdgpu_mmhub_funcs *funcs;
7177 struct amdgpu_mmhub_ras *ras;
78+ struct amdgpu_mmhub_client_ids client_ids;
7279 };
7380
81+static inline void
82+amdgpu_mmhub_init_client_info(struct amdgpu_mmhub *mmhub,
83+ const char * const (*names)[2],
84+ unsigned int size)
85+{
86+ mmhub->client_ids.names = names;
87+ mmhub->client_ids.size = size;
88+}
89+
90+static inline const char *
91+amdgpu_mmhub_client_name(struct amdgpu_mmhub *mmhub,
92+ u32 cid, bool is_write)
93+{
94+ if (cid < mmhub->client_ids.size)
95+ return mmhub->client_ids.names[cid][is_write];
96+
97+ return NULL;
98+}
99+
74100 int amdgpu_mmhub_ras_sw_init(struct amdgpu_device *adev);
75101
76102 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h+5−0
@@ -44,6 +44,7 @@ · 43 unmodified lines
4444 #include <drm/display/drm_dp_mst_helper.h>
4545 #include "modules/inc/mod_freesync.h"
4646 #include "amdgpu_dm_irq_params.h"
47+#include "amdgpu_dm_ism.h"
4748
4849 struct amdgpu_bo;
4950 struct amdgpu_device;
@@ -486,6 +487,10 @@ struct amdgpu_crtc { · 436 unmodified lines
486487 int deferred_flip_completion;
487488 /* parameters access from DM IRQ handler */
488489 struct dm_irq_params dm_irq_params;
490+
491+ /* DM idle state manager */
492+ struct amdgpu_dm_ism ism;
493+
489494 /* pll sharing */
490495 struct amdgpu_atom_ss ss;
491496 bool ss_enabled;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+2−1
@@ -1325,7 +1325,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo) · 1324 unmodified lines
13251325 if (r)
13261326 goto out;
13271327
1328− r = amdgpu_fill_buffer(&adev->mman.clear_entity, abo, 0, &bo->base._resv,
1328+ r = amdgpu_fill_buffer(amdgpu_ttm_next_clear_entity(adev),
1329+ abo, 0, &bo->base._resv,
13291330 &fence, AMDGPU_KERNEL_JOB_ID_CLEAR_ON_RELEASE);
13301331 if (WARN_ON(r))
13311332 goto out;
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c+6−1
@@ -2250,6 +2250,7 @@ static bool amdgpu_ras_aca_is_supported(struct amdgpu_device *adev) · 2249 unmodified lines
22502250 case IP_VERSION(13, 0, 6):
22512251 case IP_VERSION(13, 0, 12):
22522252 case IP_VERSION(13, 0, 14):
2253+ case IP_VERSION(13, 0, 15):
22532254 ret = true;
22542255 break;
22552256 default:
@@ -4000,6 +4001,7 @@ static bool amdgpu_ras_asic_supported(struct amdgpu_device *adev) · 1744 unmodified lines
40004001 case IP_VERSION(13, 0, 6):
40014002 case IP_VERSION(13, 0, 12):
40024003 case IP_VERSION(13, 0, 14):
4004+ case IP_VERSION(13, 0, 15):
40034005 return true;
40044006 default:
40054007 return false;
@@ -4013,6 +4015,7 @@ static bool amdgpu_ras_asic_supported(struct amdgpu_device *adev) · 7 unmodified lines
40134015 case IP_VERSION(13, 0, 10):
40144016 case IP_VERSION(13, 0, 12):
40154017 case IP_VERSION(13, 0, 14):
4018+ case IP_VERSION(13, 0, 15):
40164019 case IP_VERSION(14, 0, 3):
40174020 return true;
40184021 default:
@@ -4182,7 +4185,8 @@ init_ras_enabled_flag: · 163 unmodified lines
41824185 adev->aca.is_enabled =
41834186 (amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 6) ||
41844187 amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 12) ||
4185− amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 14));
4188+ amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 14) ||
4189+ amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 15));
41864190 }
41874191
41884192 /* bad page feature is not applicable to specific app platform */
@@ -4270,6 +4274,7 @@ static void amdgpu_ras_init_reserved_vram_size(struct amdgpu_device *adev) · 81 unmodified lines
42704274 case IP_VERSION(13, 0, 2):
42714275 case IP_VERSION(13, 0, 6):
42724276 case IP_VERSION(13, 0, 12):
4277+ case IP_VERSION(13, 0, 15):
42734278 con->reserved_pages_in_bytes = AMDGPU_RAS_RESERVED_VRAM_SIZE_DEFAULT;
42744279 break;
42754280 case IP_VERSION(13, 0, 14):
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c+8−0
@@ -1558,6 +1558,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control) · 1557 unmodified lines
15581558 unsigned char buf[RAS_TABLE_HEADER_SIZE] = { 0 };
15591559 struct amdgpu_ras_eeprom_table_header *hdr = &control->tbl_hdr;
15601560 struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
1561+ int dev_var = adev->pdev->device & 0xF;
1562+ uint32_t vram_type = adev->gmc.vram_type;
15611563 int res;
15621564
15631565 if (amdgpu_ras_smu_eeprom_supported(adev))
@@ -1597,6 +1599,12 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control) · 33 unmodified lines
15971599 return amdgpu_ras_eeprom_reset_table(control);
15981600 }
15991601
1602+ if (!(adev->flags & AMD_IS_APU) && (dev_var == 0x5) &&
1603+ (vram_type == AMDGPU_VRAM_TYPE_HBM3E) &&
1604+ (hdr->version < RAS_TABLE_VER_V3)) {
1605+ return amdgpu_ras_eeprom_reset_table(control);
1606+ }
1607+
16001608 switch (hdr->version) {
16011609 case RAS_TABLE_VER_V2_1:
16021610 case RAS_TABLE_VER_V3:
drivers/gpu/drm/amd/amdgpu/amdgpu_reg_access.c+0−1
@@ -314,7 +314,6 @@ uint64_t amdgpu_reg_get_smn_base64(struct amdgpu_device *adev, · 313 unmodified lines
314314 "SMN base address query not supported for this device\n");
315315 return 0;
316316 }
317− return 0;
318317 }
319318 return adev->reg.smn.get_smn_base(adev, block, die_inst);
320319 }
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c+1−3
@@ -103,10 +103,8 @@ int amdgpu_sched_ioctl(struct drm_device *dev, void *data, · 102 unmodified lines
103103 return -EINVAL;
104104 }
105105
106− if (!amdgpu_ctx_priority_is_valid(args->in.priority)) {
107− WARN(1, "Invalid context priority %d\n", args->in.priority);
106+ if (!amdgpu_ctx_priority_is_valid(args->in.priority))
108107 return -EINVAL;
109− }
110108
111109 switch (args->in.op) {
112110 case AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE:
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+85−46
@@ -387,9 +387,11 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, · 386 unmodified lines
387387 {
388388 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
389389 struct amdgpu_bo *abo = ttm_to_amdgpu_bo(bo);
390+ struct amdgpu_ttm_buffer_entity *entity;
390391 struct amdgpu_copy_mem src, dst;
391392 struct dma_fence *fence = NULL;
392393 int r;
394+ u32 e;
393395
394396 src.bo = bo;
395397 dst.bo = bo;
@@ -398,8 +400,12 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, · 2 unmodified lines
398400 src.offset = 0;
399401 dst.offset = 0;
400402
403+ e = atomic_inc_return(&adev->mman.next_move_entity) %
404+ adev->mman.num_move_entities;
405+ entity = &adev->mman.move_entities[e];
406+
401407 r = amdgpu_ttm_copy_mem_to_mem(adev,
402− &adev->mman.move_entity,
408+ entity,
403409 &src, &dst,
404410 new_mem->size,
405411 amdgpu_bo_encrypted(abo),
@@ -411,9 +417,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, · 5 unmodified lines
411417 if (old_mem->mem_type == TTM_PL_VRAM &&
412418 (abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE)) {
413419 struct dma_fence *wipe_fence = NULL;
414−
415− r = amdgpu_fill_buffer(&adev->mman.move_entity,
416− abo, 0, NULL, &wipe_fence,
420+ r = amdgpu_fill_buffer(entity, abo, 0, NULL, &wipe_fence,
417421 AMDGPU_KERNEL_JOB_ID_MOVE_BLIT);
418422 if (r) {
419423 goto error;
@@ -854,25 +858,15 @@ static void amdgpu_ttm_gart_bind_gfx9_mqd(struct amdgpu_device *adev, · 434 unmodified lines
854858 int num_xcc = max(1U, adev->gfx.num_xcc_per_xcp);
855859 uint64_t page_idx, pages_per_xcc;
856860 int i;
857− uint64_t ctrl_flags = AMDGPU_PTE_MTYPE_VG10(flags, AMDGPU_MTYPE_NC);
858861
859862 pages_per_xcc = total_pages;
860863 do_div(pages_per_xcc, num_xcc);
861864
862865 for (i = 0, page_idx = 0; i < num_xcc; i++, page_idx += pages_per_xcc) {
863− /* MQD page: use default flags */
864− amdgpu_gart_bind(adev,
866+ amdgpu_gart_map_gfx9_mqd(adev,
865867 gtt->offset + (page_idx << PAGE_SHIFT),
866− 1, &gtt->ttm.dma_address[page_idx], flags);
867− /*
868− * Ctrl pages - modify the memory type to NC (ctrl_flags) from
869− * the second page of the BO onward.
870− */
871− amdgpu_gart_bind(adev,
872− gtt->offset + ((page_idx + 1) << PAGE_SHIFT),
873− pages_per_xcc - 1,
874− &gtt->ttm.dma_address[page_idx + 1],
875− ctrl_flags);
868+ pages_per_xcc, &gtt->ttm.dma_address[page_idx],
869+ flags);
876870 }
877871 }
878872
@@ -2345,8 +2339,9 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev) · 1466 unmodified lines
23452339 void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
23462340 {
23472341 struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM);
2342+ u32 num_clear_entities, num_move_entities;
23482343 uint64_t size;
2349− int r;
2344+ int r, i, j;
23502345
23512346 if (!adev->mman.initialized || amdgpu_in_reset(adev) ||
23522347 adev->mman.buffer_funcs_enabled == enable || adev->gmc.is_app_apu)
@@ -2361,6 +2356,8 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) · 8 unmodified lines
23612356 return;
23622357 }
23632358
2359+ num_clear_entities = 1;
2360+ num_move_entities = 1;
23642361 ring = adev->mman.buffer_funcs_ring;
23652362 sched = &ring->sched;
23662363 r = amdgpu_ttm_buffer_entity_init(&adev->mman.gtt_mgr,
@@ -2373,36 +2370,64 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) · 6 unmodified lines
23732370 return;
23742371 }
23752372
2376− r = amdgpu_ttm_buffer_entity_init(&adev->mman.gtt_mgr,
2377− &adev->mman.clear_entity,
2378− DRM_SCHED_PRIORITY_NORMAL,
2379− &sched, 1, 1);
2380− if (r < 0) {
2381− dev_err(adev->dev,
2382− "Failed setting up TTM BO clear entity (%d)\n", r);
2373+ adev->mman.clear_entities = kcalloc(num_clear_entities,
2374+ sizeof(struct amdgpu_ttm_buffer_entity),
2375+ GFP_KERNEL);
2376+ atomic_set(&adev->mman.next_clear_entity, 0);
2377+ if (!adev->mman.clear_entities)
23832378 goto error_free_default_entity;
2379+
2380+ adev->mman.num_clear_entities = num_clear_entities;
2381+
2382+ for (i = 0; i < num_clear_entities; i++) {
2383+ r = amdgpu_ttm_buffer_entity_init(
2384+ &adev->mman.gtt_mgr, &adev->mman.clear_entities[i],
2385+ DRM_SCHED_PRIORITY_NORMAL, &sched, 1, 1);
2386+
2387+ if (r < 0) {
2388+ for (j = 0; j < i; j++)
2389+ amdgpu_ttm_buffer_entity_fini(
2390+ &adev->mman.gtt_mgr, &adev->mman.clear_entities[j]);
2391+ kfree(adev->mman.clear_entities);
2392+ adev->mman.num_clear_entities = 0;
2393+ adev->mman.clear_entities = NULL;
2394+ goto error_free_default_entity;
2395+ }
23842396 }
23852397
2386− r = amdgpu_ttm_buffer_entity_init(&adev->mman.gtt_mgr,
2387− &adev->mman.move_entity,
2388− DRM_SCHED_PRIORITY_NORMAL,
2389− &sched, 1, 2);
2390− if (r < 0) {
2391− dev_err(adev->dev,
2392− "Failed setting up TTM BO move entity (%d)\n", r);
2393− goto error_free_clear_entity;
2398+ adev->mman.num_move_entities = num_move_entities;
2399+ atomic_set(&adev->mman.next_move_entity, 0);
2400+ for (i = 0; i < num_move_entities; i++) {
2401+ r = amdgpu_ttm_buffer_entity_init(
2402+ &adev->mman.gtt_mgr,
2403+ &adev->mman.move_entities[i],
2404+ DRM_SCHED_PRIORITY_NORMAL, &sched, 1, 2);
2405+
2406+ if (r < 0) {
2407+ for (j = 0; j < i; j++)
2408+ amdgpu_ttm_buffer_entity_fini(
2409+ &adev->mman.gtt_mgr, &adev->mman.move_entities[j]);
2410+ adev->mman.num_move_entities = 0;
2411+ goto error_free_clear_entities;
2412+ }
23942413 }
23952414 } else {
23962415 amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
23972416 &adev->mman.default_entity);
2398− amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
2399− &adev->mman.clear_entity);
2400− amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
2401− &adev->mman.move_entity);
2417+ for (i = 0; i < adev->mman.num_clear_entities; i++)
2418+ amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
2419+ &adev->mman.clear_entities[i]);
2420+ for (i = 0; i < adev->mman.num_move_entities; i++)
2421+ amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
2422+ &adev->mman.move_entities[i]);
24022423 /* Drop all the old fences since re-creating the scheduler entities
24032424 * will allocate new contexts.
24042425 */
24052426 ttm_resource_manager_cleanup(man);
2427+ kfree(adev->mman.clear_entities);
2428+ adev->mman.clear_entities = NULL;
2429+ adev->mman.num_clear_entities = 0;
2430+ adev->mman.num_move_entities = 0;
24062431 }
24072432
24082433 /* this just adjusts TTM size idea, which sets lpfn to the correct value */
@@ -2415,9 +2440,13 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) · 6 unmodified lines
24152440
24162441 return;
24172442
2418−error_free_clear_entity:
2419− amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
2420− &adev->mman.clear_entity);
2443+error_free_clear_entities:
2444+ for (i = 0; i < adev->mman.num_clear_entities; i++)
2445+ amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
2446+ &adev->mman.clear_entities[i]);
2447+ kfree(adev->mman.clear_entities);
2448+ adev->mman.clear_entities = NULL;
2449+ adev->mman.num_clear_entities = 0;
24212450 error_free_default_entity:
24222451 amdgpu_ttm_buffer_entity_fini(&adev->mman.gtt_mgr,
24232452 &adev->mman.default_entity);
@@ -2567,8 +2596,7 @@ int amdgpu_ttm_clear_buffer(struct amdgpu_bo *bo, · 143 unmodified lines
25672596
25682597 if (!fence)
25692598 return -EINVAL;
2570−
2571− entity = &adev->mman.clear_entity;
2599+ entity = &adev->mman.clear_entities[0];
25722600 *fence = dma_fence_get_stub();
25732601
25742602 amdgpu_res_first(bo->tbo.resource, 0, amdgpu_bo_size(bo), &cursor);
@@ -2620,11 +2648,8 @@ int amdgpu_fill_buffer(struct amdgpu_ttm_buffer_entity *entity, · 45 unmodified lines
26202648 struct amdgpu_res_cursor dst;
26212649 int r;
26222650
2623− if (!adev->mman.buffer_funcs_enabled) {
2624− dev_err(adev->dev,
2625− "Trying to clear memory with ring turned off.\n");
2651+ if (!entity)
26262652 return -EINVAL;
2627− }
26282653
26292654 amdgpu_res_first(bo->tbo.resource, 0, amdgpu_bo_size(bo), &dst);
26302655
@@ -2660,6 +2685,20 @@ error: · 29 unmodified lines
26602685 return r;
26612686 }
26622687
2688+struct amdgpu_ttm_buffer_entity *
2689+amdgpu_ttm_next_clear_entity(struct amdgpu_device *adev)
2690+{
2691+ struct amdgpu_mman *mman = &adev->mman;
2692+ u32 i;
2693+
2694+ if (mman->num_clear_entities == 0)
2695+ return NULL;
2696+
2697+ i = atomic_inc_return(&mman->next_clear_entity) %
2698+ mman->num_clear_entities;
2699+ return &mman->clear_entities[i];
2700+}
2701+
26632702 /**
26642703 * amdgpu_ttm_evict_resources - evict memory buffers
26652704 * @adev: amdgpu device object
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+7−2
@@ -72,8 +72,12 @@ struct amdgpu_mman { · 71 unmodified lines
7272
7373 /* @default_entity: for workarounds, has no gart windows */
7474 struct amdgpu_ttm_buffer_entity default_entity;
75− struct amdgpu_ttm_buffer_entity clear_entity;
76− struct amdgpu_ttm_buffer_entity move_entity;
75+ struct amdgpu_ttm_buffer_entity *clear_entities;
76+ atomic_t next_clear_entity;
77+ u32 num_clear_entities;
78+ struct amdgpu_ttm_buffer_entity move_entities[TTM_NUM_MOVE_FENCES];
79+ atomic_t next_move_entity;
80+ u32 num_move_entities;
7781
7882 struct amdgpu_vram_mgr vram_mgr;
7983 struct amdgpu_gtt_mgr gtt_mgr;
@@ -191,6 +195,7 @@ int amdgpu_fill_buffer(struct amdgpu_ttm_buffer_entity *entity, · 111 unmodified lines
191195 struct dma_resv *resv,
192196 struct dma_fence **f,
193197 u64 k_job_id);
198+struct amdgpu_ttm_buffer_entity *amdgpu_ttm_next_clear_entity(struct amdgpu_device *adev);
194199
195200 int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo);
196201 void amdgpu_ttm_recover_gart(struct ttm_buffer_object *tbo);
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c+1−1
@@ -1150,7 +1150,7 @@ int amdgpu_ucode_create_bo(struct amdgpu_device *adev) · 1149 unmodified lines
11501150 if ((adev->firmware.load_type != AMDGPU_FW_LOAD_DIRECT) &&
11511151 (adev->firmware.load_type != AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO)) {
11521152 amdgpu_bo_create_kernel(adev, adev->firmware.fw_size, PAGE_SIZE,
1153− (amdgpu_sriov_vf(adev) || adev->debug_use_vram_fw_buf) ?
1153+ (amdgpu_sriov_vf(adev) || adev->debug_use_vram_fw_buf || adev->gmc.xgmi.connected_to_cpu) ?
11541154 AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
11551155 &adev->firmware.fw_buf,
11561156 &adev->firmware.fw_buf_mc,
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c+11−0
@@ -398,6 +398,17 @@ int amdgpu_umc_process_ecc_irq(struct amdgpu_device *adev, · 397 unmodified lines
398398 return 0;
399399 }
400400
401+int amdgpu_umc_uniras_process_ecc_irq(struct amdgpu_device *adev,
402+ struct amdgpu_irq_src *source,
403+ struct amdgpu_iv_entry *entry)
404+{
405+ struct ras_ih_info ih_info = {0};
406+
407+ ih_info.block = RAS_BLOCK_ID__UMC;
408+ amdgpu_ras_mgr_dispatch_interrupt(adev, &ih_info);
409+ return 0;
410+}
411+
401412 int amdgpu_umc_fill_error_record(struct ras_err_data *err_data,
402413 uint64_t err_addr,
403414 uint64_t retired_page,
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h+3−0
@@ -161,6 +161,9 @@ int amdgpu_umc_pasid_poison_handler(struct amdgpu_device *adev, · 160 unmodified lines
161161 int amdgpu_umc_process_ecc_irq(struct amdgpu_device *adev,
162162 struct amdgpu_irq_src *source,
163163 struct amdgpu_iv_entry *entry);
164+int amdgpu_umc_uniras_process_ecc_irq(struct amdgpu_device *adev,
165+ struct amdgpu_irq_src *source,
166+ struct amdgpu_iv_entry *entry);
164167 int amdgpu_umc_fill_error_record(struct ras_err_data *err_data,
165168 uint64_t err_addr,
166169 uint64_t retired_page,
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c+49−61
@@ -156,7 +156,7 @@ static void amdgpu_userq_hang_detect_work(struct work_struct *work) · 155 unmodified lines
156156 struct dma_fence *fence;
157157 struct amdgpu_userq_mgr *uq_mgr;
158158
159− if (!queue || !queue->userq_mgr)
159+ if (!queue->userq_mgr)
160160 return;
161161
162162 uq_mgr = queue->userq_mgr;
@@ -472,17 +472,16 @@ void · 309 unmodified lines
472472 amdgpu_userq_ensure_ev_fence(struct amdgpu_userq_mgr *uq_mgr,
473473 struct amdgpu_eviction_fence_mgr *evf_mgr)
474474 {
475− struct amdgpu_eviction_fence *ev_fence;
475+ struct dma_fence *ev_fence;
476476
477477 retry:
478478 /* Flush any pending resume work to create ev_fence */
479479 flush_delayed_work(&uq_mgr->resume_work);
480480
481481 mutex_lock(&uq_mgr->userq_mutex);
482− spin_lock(&evf_mgr->ev_fence_lock);
483− ev_fence = evf_mgr->ev_fence;
484− spin_unlock(&evf_mgr->ev_fence_lock);
485− if (!ev_fence || dma_fence_is_signaled(&ev_fence->base)) {
482+ ev_fence = amdgpu_evf_mgr_get_fence(evf_mgr);
483+ if (dma_fence_is_signaled(ev_fence)) {
484+ dma_fence_put(ev_fence);
486485 mutex_unlock(&uq_mgr->userq_mutex);
487486 /*
488487 * Looks like there was no pending resume work,
@@ -491,6 +490,7 @@ retry: · 2 unmodified lines
491490 schedule_delayed_work(&uq_mgr->resume_work, 0);
492491 goto retry;
493492 }
493+ dma_fence_put(ev_fence);
494494 }
495495
496496 int amdgpu_userq_create_object(struct amdgpu_userq_mgr *uq_mgr,
@@ -600,6 +600,13 @@ amdgpu_userq_get_doorbell_index(struct amdgpu_userq_mgr *uq_mgr, · 103 unmodified lines
600600 goto unpin_bo;
601601 }
602602
603+ /* Validate doorbell_offset is within the doorbell BO */
604+ if ((u64)db_info->doorbell_offset * db_size + db_size >
605+ amdgpu_bo_size(db_obj->obj)) {
606+ r = -EINVAL;
607+ goto unpin_bo;
608+ }
609+
603610 index = amdgpu_doorbell_index_on_bar(uq_mgr->adev, db_obj->obj,
604611 db_info->doorbell_offset, db_size);
605612 drm_dbg_driver(adev_to_drm(uq_mgr->adev),
@@ -623,13 +630,14 @@ amdgpu_userq_destroy(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_que · 17 unmodified lines
623630 int r = 0;
624631
625632 cancel_delayed_work_sync(&uq_mgr->resume_work);
633+
634+ /* Cancel any pending hang detection work and cleanup */
635+ cancel_delayed_work_sync(&queue->hang_detect_work);
636+
626637 mutex_lock(&uq_mgr->userq_mutex);
638+ queue->hang_detect_fence = NULL;
627639 amdgpu_userq_wait_for_last_fence(queue);
628− /* Cancel any pending hang detection work and cleanup */
629− if (queue->hang_detect_fence) {
630− cancel_delayed_work_sync(&queue->hang_detect_work);
631− queue->hang_detect_fence = NULL;
632− }
640+
633641 r = amdgpu_bo_reserve(queue->db_obj.obj, true);
634642 if (!r) {
635643 amdgpu_bo_unpin(queue->db_obj.obj);
@@ -996,17 +1004,14 @@ amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr) · 360 unmodified lines
9961004 unsigned long queue_id;
9971005 int ret = 0, r;
9981006
1007+ mutex_lock(&uq_mgr->userq_mutex);
9991008 /* Resume all the queues for this process */
10001009 xa_for_each(&uq_mgr->userq_xa, queue_id, queue) {
1001− queue = amdgpu_userq_get(uq_mgr, queue_id);
1002− if (!queue)
1003− continue;
10041010
10051011 if (!amdgpu_userq_buffer_vas_mapped(queue)) {
10061012 drm_file_err(uq_mgr->file,
10071013 "trying restore queue without va mapping\n");
10081014 queue->state = AMDGPU_USERQ_STATE_INVALID_VA;
1009− amdgpu_userq_put(queue);
10101015 continue;
10111016 }
10121017
@@ -1014,8 +1019,8 @@ amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr) · 1 unmodified line
10141019 if (r)
10151020 ret = r;
10161021
1017− amdgpu_userq_put(queue);
10181022 }
1023+ mutex_unlock(&uq_mgr->userq_mutex);
10191024
10201025 if (ret)
10211026 drm_file_err(uq_mgr->file, "Failed to map all the queues\n");
@@ -1040,12 +1045,12 @@ amdgpu_userq_bo_validate(struct amdgpu_device *adev, struct drm_exec *exec, · 18 unmodified lines
10401045 struct amdgpu_bo *bo;
10411046 int ret;
10421047
1043− spin_lock(&vm->invalidated_lock);
1048+ spin_lock(&vm->status_lock);
10441049 while (!list_empty(&vm->invalidated)) {
10451050 bo_va = list_first_entry(&vm->invalidated,
10461051 struct amdgpu_bo_va,
10471052 base.vm_status);
1048− spin_unlock(&vm->invalidated_lock);
1053+ spin_unlock(&vm->status_lock);
10491054
10501055 bo = bo_va->base.bo;
10511056 ret = drm_exec_prepare_obj(exec, &bo->tbo.base, 2);
@@ -1062,9 +1067,9 @@ amdgpu_userq_bo_validate(struct amdgpu_device *adev, struct drm_exec *exec, · 10 unmodified lines
10621067 if (ret)
10631068 return ret;
10641069
1065− spin_lock(&vm->invalidated_lock);
1070+ spin_lock(&vm->status_lock);
10661071 }
1067− spin_unlock(&vm->invalidated_lock);
1072+ spin_unlock(&vm->status_lock);
10681073
10691074 return 0;
10701075 }
@@ -1196,7 +1201,7 @@ retry_lock: · 125 unmodified lines
11961201 dma_fence_wait(bo_va->last_pt_update, false);
11971202 dma_fence_wait(vm->last_update, false);
11981203
1199− ret = amdgpu_eviction_fence_replace_fence(&fpriv->evf_mgr, &exec);
1204+ ret = amdgpu_evf_mgr_rearm(&fpriv->evf_mgr, &exec);
12001205 if (ret)
12011206 drm_file_err(uq_mgr->file, "Failed to replace eviction fence\n");
12021207
@@ -1216,26 +1221,25 @@ static void amdgpu_userq_restore_worker(struct work_struct *work) · 13 unmodified lines
12161221 {
12171222 struct amdgpu_userq_mgr *uq_mgr = work_to_uq_mgr(work, resume_work.work);
12181223 struct amdgpu_fpriv *fpriv = uq_mgr_to_fpriv(uq_mgr);
1224+ struct dma_fence *ev_fence;
12191225 int ret;
12201226
1221− flush_delayed_work(&fpriv->evf_mgr.suspend_work);
1222−
1223− mutex_lock(&uq_mgr->userq_mutex);
1227+ ev_fence = amdgpu_evf_mgr_get_fence(&fpriv->evf_mgr);
1228+ if (!dma_fence_is_signaled(ev_fence))
1229+ goto put_fence;
12241230
12251231 ret = amdgpu_userq_vm_validate(uq_mgr);
12261232 if (ret) {
12271233 drm_file_err(uq_mgr->file, "Failed to validate BOs to restore\n");
1228− goto unlock;
1234+ goto put_fence;
12291235 }
12301236
12311237 ret = amdgpu_userq_restore_all(uq_mgr);
1232− if (ret) {
1238+ if (ret)
12331239 drm_file_err(uq_mgr->file, "Failed to restore all queues\n");
1234− goto unlock;
1235− }
12361240
1237−unlock:
1238− mutex_unlock(&uq_mgr->userq_mutex);
1241+put_fence:
1242+ dma_fence_put(ev_fence);
12391243 }
12401244
12411245 static int
@@ -1248,13 +1252,9 @@ amdgpu_userq_evict_all(struct amdgpu_userq_mgr *uq_mgr) · 6 unmodified lines
12481252 amdgpu_userq_detect_and_reset_queues(uq_mgr);
12491253 /* Try to unmap all the queues in this process ctx */
12501254 xa_for_each(&uq_mgr->userq_xa, queue_id, queue) {
1251− queue = amdgpu_userq_get(uq_mgr, queue_id);
1252− if (!queue)
1253− continue;
12541255 r = amdgpu_userq_preempt_helper(queue);
12551256 if (r)
12561257 ret = r;
1257− amdgpu_userq_put(queue);
12581258 }
12591259
12601260 if (ret)
@@ -1287,35 +1287,26 @@ amdgpu_userq_wait_for_signal(struct amdgpu_userq_mgr *uq_mgr) · 26 unmodified lines
12871287 int ret;
12881288
12891289 xa_for_each(&uq_mgr->userq_xa, queue_id, queue) {
1290− queue = amdgpu_userq_get(uq_mgr, queue_id);
1291− if (!queue)
1292− continue;
1293−
12941290 struct dma_fence *f = queue->last_fence;
12951291
1296− if (!f || dma_fence_is_signaled(f)) {
1297− amdgpu_userq_put(queue);
1292+ if (!f || dma_fence_is_signaled(f))
12981293 continue;
1299− }
1294+
13001295 ret = dma_fence_wait_timeout(f, true, msecs_to_jiffies(100));
13011296 if (ret <= 0) {
13021297 drm_file_err(uq_mgr->file, "Timed out waiting for fence=%llu:%llu\n",
13031298 f->context, f->seqno);
1304− amdgpu_userq_put(queue);
1299+
13051300 return -ETIMEDOUT;
13061301 }
1307− amdgpu_userq_put(queue);
13081302 }
13091303
13101304 return 0;
13111305 }
13121306
13131307 void
1314−amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr,
1315− struct amdgpu_eviction_fence *ev_fence)
1308+amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr)
13161309 {
1317− struct amdgpu_fpriv *fpriv = uq_mgr_to_fpriv(uq_mgr);
1318− struct amdgpu_eviction_fence_mgr *evf_mgr = &fpriv->evf_mgr;
13191310 struct amdgpu_device *adev = uq_mgr->adev;
13201311 int ret;
13211312
@@ -1328,16 +1319,6 @@ amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr, · 6 unmodified lines
13281319 if (ret)
13291320 dev_err(adev->dev, "Failed to evict userqueue\n");
13301321
1331− /* Signal current eviction fence */
1332− amdgpu_eviction_fence_signal(evf_mgr, ev_fence);
1333−
1334− if (evf_mgr->fd_closing) {
1335− cancel_delayed_work_sync(&uq_mgr->resume_work);
1336− return;
1337− }
1338−
1339− /* Schedule a resume work */
1340− schedule_delayed_work(&uq_mgr->resume_work, 0);
13411322 }
13421323
13431324 int amdgpu_userq_mgr_init(struct amdgpu_userq_mgr *userq_mgr, struct drm_file *file_priv,
@@ -1352,6 +1333,11 @@ int amdgpu_userq_mgr_init(struct amdgpu_userq_mgr *userq_mgr, struct drm_file *f · 8 unmodified lines
13521333 return 0;
13531334 }
13541335
1336+void amdgpu_userq_mgr_cancel_resume(struct amdgpu_userq_mgr *userq_mgr)
1337+{
1338+ cancel_delayed_work_sync(&userq_mgr->resume_work);
1339+}
1340+
13551341 void amdgpu_userq_mgr_fini(struct amdgpu_userq_mgr *userq_mgr)
13561342 {
13571343 struct amdgpu_usermode_queue *queue;
@@ -1475,17 +1461,19 @@ int amdgpu_userq_start_sched_for_enforce_isolation(struct amdgpu_device *adev, · 117 unmodified lines
14751461
14761462 if (!adev->userq_halt_for_enforce_isolation)
14771463 dev_warn(adev->dev, "userq scheduling already started!\n");
1464+
14781465 adev->userq_halt_for_enforce_isolation = false;
1466+
14791467 xa_for_each(&adev->userq_doorbell_xa, queue_id, queue) {
14801468 uqm = queue->userq_mgr;
14811469 mutex_lock(&uqm->userq_mutex);
1482− if (((queue->queue_type == AMDGPU_HW_IP_GFX) ||
1483− (queue->queue_type == AMDGPU_HW_IP_COMPUTE)) &&
1484− (queue->xcp_id == idx)) {
1470+ if (((queue->queue_type == AMDGPU_HW_IP_GFX) ||
1471+ (queue->queue_type == AMDGPU_HW_IP_COMPUTE)) &&
1472+ (queue->xcp_id == idx)) {
14851473 r = amdgpu_userq_restore_helper(queue);
14861474 if (r)
14871475 ret = r;
1488− }
1476+ }
14891477 mutex_unlock(&uqm->userq_mutex);
14901478 }
14911479
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h+2−2
@@ -123,6 +123,7 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data, struct drm_file *filp · 122 unmodified lines
123123 int amdgpu_userq_mgr_init(struct amdgpu_userq_mgr *userq_mgr, struct drm_file *file_priv,
124124 struct amdgpu_device *adev);
125125
126+void amdgpu_userq_mgr_cancel_resume(struct amdgpu_userq_mgr *userq_mgr);
126127 void amdgpu_userq_mgr_fini(struct amdgpu_userq_mgr *userq_mgr);
127128
128129 int amdgpu_userq_create_object(struct amdgpu_userq_mgr *uq_mgr,
@@ -132,8 +133,7 @@ int amdgpu_userq_create_object(struct amdgpu_userq_mgr *uq_mgr, · 3 unmodified lines
132133 void amdgpu_userq_destroy_object(struct amdgpu_userq_mgr *uq_mgr,
133134 struct amdgpu_userq_obj *userq_obj);
134135
135−void amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr,
136− struct amdgpu_eviction_fence *ev_fence);
136+void amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr);
137137
138138 void amdgpu_userq_ensure_ev_fence(struct amdgpu_userq_mgr *userq_mgr,
139139 struct amdgpu_eviction_fence_mgr *evf_mgr);
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c+336−270
@@ -597,11 +597,11 @@ exec_fini: · 596 unmodified lines
597597 put_gobj_write:
598598 for (i = 0; i < num_write_bo_handles; i++)
599599 drm_gem_object_put(gobj_write[i]);
600− kfree(gobj_write);
600+ kvfree(gobj_write);
601601 put_gobj_read:
602602 for (i = 0; i < num_read_bo_handles; i++)
603603 drm_gem_object_put(gobj_read[i]);
604− kfree(gobj_read);
604+ kvfree(gobj_read);
605605 free_syncobj:
606606 while (entry-- > 0)
607607 if (syncobj[entry])
@@ -616,339 +616,405 @@ free_syncobj_handles: · 8 unmodified lines
616616 return r;
617617 }
618618
619−int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
620− struct drm_file *filp)
619+/* Count the number of expected fences so userspace can alloc a buffer */
620+static int
621+amdgpu_userq_wait_count_fences(struct drm_file *filp,
622+ struct drm_amdgpu_userq_wait *wait_info,
623+ u32 *syncobj_handles, u32 *timeline_points,
624+ u32 *timeline_handles,
625+ struct drm_gem_object **gobj_write,
626+ struct drm_gem_object **gobj_read)
621627 {
622− struct drm_amdgpu_userq_wait *wait_info = data;
623− const unsigned int num_write_bo_handles = wait_info->num_bo_write_handles;
624− const unsigned int num_read_bo_handles = wait_info->num_bo_read_handles;
625− struct drm_amdgpu_userq_fence_info *fence_info = NULL;
626− struct amdgpu_fpriv *fpriv = filp->driver_priv;
627− struct amdgpu_userq_mgr *userq_mgr = &fpriv->userq_mgr;
628− struct drm_gem_object **gobj_write, **gobj_read;
629− u32 *timeline_points, *timeline_handles;
630− struct amdgpu_usermode_queue *waitq = NULL;
631− u32 *syncobj_handles, num_syncobj;
632− struct dma_fence **fences = NULL;
633− u16 num_points, num_fences = 0;
628+ int num_read_bo_handles, num_write_bo_handles;
629+ struct dma_fence_unwrap iter;
630+ struct dma_fence *fence, *f;
631+ unsigned int num_fences = 0;
634632 struct drm_exec exec;
635− int r, i, cnt;
636−
637− if (!amdgpu_userq_enabled(dev))
638− return -ENOTSUPP;
639−
640− if (wait_info->num_bo_write_handles > AMDGPU_USERQ_MAX_HANDLES ||
641− wait_info->num_bo_read_handles > AMDGPU_USERQ_MAX_HANDLES)
642− return -EINVAL;
643−
644− num_syncobj = wait_info->num_syncobj_handles;
645− syncobj_handles = memdup_array_user(u64_to_user_ptr(wait_info->syncobj_handles),
646− num_syncobj, sizeof(u32));
647− if (IS_ERR(syncobj_handles))
648− return PTR_ERR(syncobj_handles);
649−
633+ int i, r;
634+
635+ /*
636+ * This needs to be outside of the lock provided by drm_exec for
637+ * DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT to work correctly.
638+ */
639+
640+ /* Count timeline fences */
641+ for (i = 0; i < wait_info->num_syncobj_timeline_handles; i++) {
642+ r = drm_syncobj_find_fence(filp, timeline_handles[i],
643+ timeline_points[i],
644+ DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,
645+ &fence);
646+ if (r)
647+ return r;
648+
649+ dma_fence_unwrap_for_each(f, &iter, fence)
650+ num_fences++;
650651
651− num_points = wait_info->num_syncobj_timeline_handles;
652− timeline_handles = memdup_array_user(u64_to_user_ptr(wait_info->syncobj_timeline_handles),
653− num_points, sizeof(u32));
654− if (IS_ERR(timeline_handles)) {
655− r = PTR_ERR(timeline_handles);
656− goto free_syncobj_handles;
652+ dma_fence_put(fence);
657653 }
658654
659− timeline_points = memdup_array_user(u64_to_user_ptr(wait_info->syncobj_timeline_points),
660− num_points, sizeof(u32));
655+ /* Count boolean fences */
656+ for (i = 0; i < wait_info->num_syncobj_handles; i++) {
657+ r = drm_syncobj_find_fence(filp, syncobj_handles[i], 0,
658+ DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,
659+ &fence);
660+ if (r)
661+ return r;
661662
662− if (IS_ERR(timeline_points)) {
663− r = PTR_ERR(timeline_points);
664− goto free_timeline_handles;
663+ num_fences++;
664+ dma_fence_put(fence);
665665 }
666666
667− r = drm_gem_objects_lookup(filp,
668− u64_to_user_ptr(wait_info->bo_read_handles),
669− num_read_bo_handles,
670− &gobj_read);
671− if (r)
672− goto free_timeline_points;
673−
674− r = drm_gem_objects_lookup(filp,
675− u64_to_user_ptr(wait_info->bo_write_handles),
676− num_write_bo_handles,
677− &gobj_write);
678− if (r)
679− goto put_gobj_read;
680−
667+ /* Lock all the GEM objects */
668+ /* TODO: It is actually not necessary to lock them */
669+ num_read_bo_handles = wait_info->num_bo_read_handles;
670+ num_write_bo_handles = wait_info->num_bo_write_handles;
681671 drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT,
682− (num_read_bo_handles + num_write_bo_handles));
672+ num_read_bo_handles + num_write_bo_handles);
683673
684− /* Lock all BOs with retry handling */
685674 drm_exec_until_all_locked(&exec) {
686− r = drm_exec_prepare_array(&exec, gobj_read, num_read_bo_handles, 1);
675+ r = drm_exec_prepare_array(&exec, gobj_read,
676+ num_read_bo_handles, 1);
687677 drm_exec_retry_on_contention(&exec);
688− if (r) {
689− drm_exec_fini(&exec);
690− goto put_gobj_write;
691− }
678+ if (r)
679+ goto error_unlock;
692680
693− r = drm_exec_prepare_array(&exec, gobj_write, num_write_bo_handles, 1);
681+ r = drm_exec_prepare_array(&exec, gobj_write,
682+ num_write_bo_handles, 1);
694683 drm_exec_retry_on_contention(&exec);
695− if (r) {
696− drm_exec_fini(&exec);
697− goto put_gobj_write;
698− }
684+ if (r)
685+ goto error_unlock;
699686 }
700687
701− if (!wait_info->num_fences) {
702− if (num_points) {
703− struct dma_fence_unwrap iter;
704− struct dma_fence *fence;
705− struct dma_fence *f;
706−
707− for (i = 0; i < num_points; i++) {
708− r = drm_syncobj_find_fence(filp, timeline_handles[i],
709− timeline_points[i],
710− DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,
711− &fence);
712− if (r)
713− goto exec_fini;
714−
715− dma_fence_unwrap_for_each(f, &iter, fence)
716− num_fences++;
717−
718− dma_fence_put(fence);
719− }
720− }
688+ /* Count read fences */
689+ for (i = 0; i < num_read_bo_handles; i++) {
690+ struct dma_resv_iter resv_cursor;
691+ struct dma_fence *fence;

511 more lines aren’t shown here.

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c+6−2

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

drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c+2−7

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

drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c+2−4

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

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+115−73

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

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h+9−10

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

drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c+4−0

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

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c+6−6

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

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

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

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+15−1

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

drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c+49−31

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

drivers/gpu/drm/amd/amdgpu/gfx_v12_1_pkt.h+101−122

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

drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c+83−110

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

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

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

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

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

drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c+61−17

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

drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c+20−9

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

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c+81−55

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

drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c+2−2

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

drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c+840−0

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

drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.h+111−0

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

drivers/gpu/drm/amd/amdgpu/mes_userqueue.c+12−4

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

drivers/gpu/drm/amd/amdgpu/mes_v12_1.c+352−40

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

drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c+29−17

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

drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c+6−11

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

drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c+6−10

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

drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c+6−11

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

drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c+6−3

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

drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c+31−24

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

drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c+6−9

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

drivers/gpu/drm/amd/amdgpu/mmhub_v4_2_0.c+116−78

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

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

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

drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c+15−6

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

drivers/gpu/drm/amd/amdgpu/soc_v1_0.c+68−1

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

drivers/gpu/drm/amd/amdgpu/soc_v1_0.h+2−0

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

drivers/gpu/drm/amd/amdgpu/umc_v12_0.c+80−33

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

drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c+5−0

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

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

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

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c+1219−0

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

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.h+29−0

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

drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c+3−3

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

drivers/gpu/drm/amd/amdkfd/kfd_chardev.c+3−3

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

drivers/gpu/drm/amd/amdkfd/kfd_events.c+8−4

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

drivers/gpu/drm/amd/amdkfd/kfd_events.h+2−1

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

drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c+3−3

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

drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c+3−3

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

drivers/gpu/drm/amd/amdkfd/kfd_int_process_v12_1.c+30−16

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

drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c+3−3

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

drivers/gpu/drm/amd/amdkfd/kfd_migrate.c+1−1

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

drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c+15−8

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

drivers/gpu/drm/amd/amdkfd/kfd_priv.h+3−3

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

drivers/gpu/drm/amd/amdkfd/kfd_process.c+2−1

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

drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c+2−1

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

drivers/gpu/drm/amd/amdkfd/kfd_queue.c+6−5

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

drivers/gpu/drm/amd/amdkfd/kfd_svm.c+18−15

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

drivers/gpu/drm/amd/display/amdgpu_dm/Makefile+2−1

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+113−59

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h+22−0

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

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

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c+0−7

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h+0−1

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

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

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h+6−0

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c+52−0

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_ism.c+598−0

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_ism.h+151−0

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

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

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c+22−11

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h+63−0

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c+2−4

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

drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c+22−3

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

drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h+16−1

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

drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c+4−4

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

drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c+1−0

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

drivers/gpu/drm/amd/display/dc/basics/vector.c+1−0

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

drivers/gpu/drm/amd/display/dc/bios/bios_parser.c+2−1

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

drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c+9−0

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

drivers/gpu/drm/amd/display/dc/bios/command_table2.c+2−0

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

drivers/gpu/drm/amd/display/dc/bios/dce110/command_table_helper_dce110.c+1−0

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

drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper2_dce112.c+1−0

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

drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper_dce112.c+1−0

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

drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c+7−6

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c+1−1

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c+2−1

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c+1−2

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c+4−3

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c+7−3

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c+5−1

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c+7−3

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c+7−3

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c+2−2

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c+4−3

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c+3−0

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c+155−137

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

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h+8−1

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

drivers/gpu/drm/amd/display/dc/core/dc.c+109−34

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

drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c+1−0

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

drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c+2−2

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

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

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

drivers/gpu/drm/amd/display/dc/core/dc_state.c+57−20

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

drivers/gpu/drm/amd/display/dc/core/dc_stream.c+15−28

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

drivers/gpu/drm/amd/display/dc/core/dc_surface.c+1−0

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

drivers/gpu/drm/amd/display/dc/dc.h+15−3

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

drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c+36−2

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

drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h+9−0

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

drivers/gpu/drm/amd/display/dc/dc_helper.c+1−0

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

drivers/gpu/drm/amd/display/dc/dc_hw_types.h+5−1

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

drivers/gpu/drm/amd/display/dc/dc_spl_translate.c+2−1

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

drivers/gpu/drm/amd/display/dc/dc_types.h+6−2

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

drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c+2−0

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

drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c+1−0

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

drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c+2−0

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

drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c+4−4

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

drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c+1−0

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

drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.h+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_abm.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_audio.c+3−0

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

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

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

drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c+2−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c+3−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c+63−2

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

drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c+4−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_opp.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c+4−0

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

drivers/gpu/drm/amd/display/dc/dce/dce_transform.c+2−0

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

drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c+2−2

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

drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c+1−1

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

drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c+10−0

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

drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c+2−0

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

drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c+9−0

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

drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c+9−0

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

drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c+6−0

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

drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c+1−0

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

drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c+7−0

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

drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c+6−0

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

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c+4−4

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

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c+2−0

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

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c+2−2

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

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c+2−2

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

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c+1−0

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

drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c+2−0

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

drivers/gpu/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c+2−0

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

drivers/gpu/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c+2−0

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

drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c+1−0

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

drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c+3−0

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

drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.c+53−12

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

drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c+79−32

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

drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c+1−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c+1−1

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

drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c+2−1

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

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c+4−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c+5−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c+5−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c+5−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c+20−1

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

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c+5−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c+2−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c+23−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c+5−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c+24−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c+8−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c+1−5

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

drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c+24−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c+8−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c+2−0

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

drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c+26−3

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

drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c+2−6

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

drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c+1−6

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

drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c+1−0

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

drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_helpers.c+14−0

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

drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c+3−0

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

drivers/gpu/drm/amd/display/dc/dml2_0/Makefile+22−52

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c+25−14

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c+11−4

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c+6−374

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h+0−30

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c+381−0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h+60−0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h+1−0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c+1−0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c+38−16

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c+20−0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c+6−3

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c+6−3

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c+18−12

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.c+2−1

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c+6−6

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c+2−1

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c+16−7

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper_fpu.c+3−6

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

drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c+1−0

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

drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c+2−2

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

drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c+9−2

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

drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c+1−0

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

drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c+1−0

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

drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c+1−0

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

drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c+5−0

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

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

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

drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c+5−0

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

drivers/gpu/drm/amd/display/dc/dsc/dsc.h+5−0

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

drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c+1−0

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

drivers/gpu/drm/amd/display/dc/gpio/dcn42/hw_translate_dcn42.c+1−0

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

drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c+1−0

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

drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c+1−0

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

drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c+1−0

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

drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c+1−0

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

drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c+1−0

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

drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c+4−0

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

drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c+51−14

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

drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c+2−0

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

drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c+2−0

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

drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c+2−0

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

drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c+1−0

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

drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c+7−3

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

drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.c+35−1

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

drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.h+6−0

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

drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c+31−9

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

drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c+4−0

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

drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c+22−1

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

drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c+11−2

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

drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c+4−1

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

drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.c+11−0

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

drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c+3−1

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

drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c+1−0

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

drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c+14−7

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

drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c+4−2

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

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

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

drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c+23−10

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

drivers/gpu/drm/amd/display/dc/inc/core_types.h+1−0

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

drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h+1−1

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

drivers/gpu/drm/amd/display/dc/inc/hw/transform.h+1−1

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

drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c+7−5

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

drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c+1−1

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

drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c+5−5

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

drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c+4−1

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

drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c+4−1

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

drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c+4−1

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

drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c+4−1

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

drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c+4−1

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

drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c+5−2

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

drivers/gpu/drm/amd/display/dc/irq/dcn42/irq_service_dcn42.c+5−2

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

drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c+2−0

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

drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dpia.c+15−7

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

drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c+6−0

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

drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_fixed_vs_pe_retimer_dp.c+1−0

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

drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.c+6−0

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

drivers/gpu/drm/amd/display/dc/link/link_detection.c+2−0

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

drivers/gpu/drm/amd/display/dc/link/link_validation.c+1−0

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

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c+2−0

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

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_128b_132b.c+1−0

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

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c+6−0

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

drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c+1−0

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

drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c+5−1

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

drivers/gpu/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c+1−0

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

drivers/gpu/drm/amd/display/dc/opp/dcn10/dcn10_opp.c+1−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c+4−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.c+2−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.c+1−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c+1−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c+1−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c+1−0

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

drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c+1−0

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

drivers/gpu/drm/amd/display/dc/pg/dcn42/dcn42_pg_cntl.c+5−4

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

drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c+9−6

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

drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c+9−2

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

drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c+9−3

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

drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c+5−3

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

drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c+6−8

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

drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c+6−7

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

drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c+53−2

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

drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.h+2−0

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

drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c+65−4

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

drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c+43−1

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

drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c+56−14

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

drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.h+2−1

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

drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c+48−2

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

drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c+46−2

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

drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c+45−2

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

drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c+45−2

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

drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c+49−6

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

drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c+47−2

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

drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c+47−4

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

drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c+48−4

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

drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c+48−1

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

drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c+1−0

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

drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c+45−1

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

drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c+58−3

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

drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.h+1−0

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

drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c+58−3

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

drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c+49−3

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

drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c+32−11

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

drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.h+3−0

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

drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c+30−9

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

drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.h+3−0

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

drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c+9−0

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

drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h+2−0

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c+14−6

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn30.c+1−0

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c+16−7

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c+12−5

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c+12−6

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c+15−7

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c+22−15

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

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.h+134−2

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

drivers/gpu/drm/amd/display/dmub/src/dmub_reg.c+3−1

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

drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c+4−4

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

drivers/gpu/drm/amd/display/modules/color/color_gamma.c+2−0

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

drivers/gpu/drm/amd/display/modules/freesync/freesync.c+6−0

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

drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h+1−0

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

drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_offset.h+6−0

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

drivers/gpu/drm/amd/include/atomfirmware.h+4−1

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

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

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

drivers/gpu/drm/amd/pm/amdgpu_pm.c+24−35

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

drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c+3−1

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

drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c+15−0

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

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c+109−14

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

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.h+1−0

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

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c+0−83

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

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.h+0−2

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

drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h+1−1

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

drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c+11−4

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

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c+8−0

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

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

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

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu15_driver_if_v15_0_8.h+295−0

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

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v15_0_8_pmfw.h+427−0

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

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v15_0_8_ppsmc.h+100−0

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

drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h+18−1

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

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h+0−14

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

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

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

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

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

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h+0−7

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

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v15_0.h+21−36

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

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

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

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

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

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

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

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

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

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

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

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

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

drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c+1−1

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

drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c+0−37

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

drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c+1−1

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

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c+2−43

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

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c+33−2

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

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c+1−1

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

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c+1−1

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

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c+95−11

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

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c+33−2

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

drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c+1−1

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

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c+0−61

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

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c+17−1

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

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c+36−2

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

drivers/gpu/drm/amd/pm/swsmu/smu15/Makefile+1−1

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

drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c+67−145

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

drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c+2−1

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

drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c+2270−0

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

drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h+313−0

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

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c+35−0

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

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h+2−0

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

drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c+31−0

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

drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.h+1−0

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

drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c+10−0

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

drivers/gpu/drm/amd/ras/rascore/ras_core.c+30−3

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

drivers/gpu/drm/amd/ras/rascore/ras_umc.c+1−1

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

drivers/gpu/drm/arm/display/include/malidp_product.h+1−0

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

drivers/gpu/drm/arm/display/komeda/d71/d71_component.c+7−7

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

drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c+1−0

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

drivers/gpu/drm/arm/display/komeda/komeda_crtc.c+1−1

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

drivers/gpu/drm/arm/display/komeda/komeda_drv.c+1−0

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

drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h+3−2

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

drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c+1−1

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

drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c+8−8

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

drivers/gpu/drm/ast/ast_dp501.c+1−1

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

drivers/gpu/drm/bridge/Kconfig+11−0

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

drivers/gpu/drm/bridge/Makefile+1−0

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

drivers/gpu/drm/bridge/adv7511/adv7511_drv.c+1−1

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

drivers/gpu/drm/bridge/analogix/analogix_dp_core.c+22−113

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

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c+12−12

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

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h+1−1

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

drivers/gpu/drm/bridge/inno-hdmi.c+3−3

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

drivers/gpu/drm/bridge/ite-it6263.c+1−1

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

drivers/gpu/drm/bridge/lontium-lt8713sx.c+598−0

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

drivers/gpu/drm/bridge/samsung-dsim.c+2−5

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

drivers/gpu/drm/bridge/synopsys/dw-dp.c+36−35

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

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c+8−8

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

drivers/gpu/drm/bridge/ti-sn65dsi83.c+7−6

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

drivers/gpu/drm/bridge/waveshare-dsi.c+5−3

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

drivers/gpu/drm/ci/arm64.config+6−0

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

drivers/gpu/drm/ci/build.sh+5−8

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

drivers/gpu/drm/ci/build.yml+13−9

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

drivers/gpu/drm/ci/container.yml+22−6

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

drivers/gpu/drm/ci/gitlab-ci.yml+77−19

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

drivers/gpu/drm/ci/igt_runner.sh+4−2

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

drivers/gpu/drm/ci/image-tags.yml+13−9

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

drivers/gpu/drm/ci/lava-submit.sh+47−54

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

drivers/gpu/drm/ci/static-checks.yml+1−0

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

drivers/gpu/drm/ci/test.yml+65−54

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

drivers/gpu/drm/ci/xfails/amdgpu-stoney-fails.txt+9−4

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

drivers/gpu/drm/ci/xfails/amdgpu-stoney-flakes.txt+7−0

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

drivers/gpu/drm/ci/xfails/i915-amly-fails.txt+1−26

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

drivers/gpu/drm/ci/xfails/i915-apl-fails.txt+2−22

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

drivers/gpu/drm/ci/xfails/i915-cml-fails.txt+7−30

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

drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt+7−0

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

drivers/gpu/drm/ci/xfails/i915-glk-fails.txt+6−16

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

drivers/gpu/drm/ci/xfails/i915-jsl-fails.txt+3−24

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

drivers/gpu/drm/ci/xfails/i915-kbl-fails.txt+4−1

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

drivers/gpu/drm/ci/xfails/i915-tgl-fails.txt+2−3

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

drivers/gpu/drm/ci/xfails/i915-tgl-flakes.txt+6−0

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

drivers/gpu/drm/ci/xfails/i915-whl-fails.txt+5−8

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

drivers/gpu/drm/ci/xfails/mediatek-mt8173-fails.txt+5−7

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

drivers/gpu/drm/ci/xfails/mediatek-mt8173-flakes.txt+35−0

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

drivers/gpu/drm/ci/xfails/msm-apq8016-fails.txt+4−0

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

drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt+2−0

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

drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt+3−2

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

drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt+3−2

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

drivers/gpu/drm/ci/xfails/msm-sm8350-hdk-fails.txt+1−0

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

drivers/gpu/drm/ci/xfails/panfrost-mt8183-fails.txt+1−0

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

drivers/gpu/drm/ci/xfails/panfrost-rk3288-fails.txt+1−0

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

drivers/gpu/drm/ci/xfails/panfrost-rk3399-fails.txt+1−0

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

drivers/gpu/drm/ci/xfails/panthor-rk3588-fails.txt+5−0

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

drivers/gpu/drm/ci/xfails/panthor-rk3588-skips.txt+20−0

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

drivers/gpu/drm/ci/xfails/rockchip-rk3288-fails.txt+12−3

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

drivers/gpu/drm/ci/xfails/rockchip-rk3288-flakes.txt+21−0

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

drivers/gpu/drm/ci/xfails/rockchip-rk3399-fails.txt+7−5

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

drivers/gpu/drm/ci/xfails/rockchip-rk3399-flakes.txt+35−0

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

drivers/gpu/drm/ci/xfails/rockchip-rk3588-fails.txt+9−0

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

drivers/gpu/drm/ci/xfails/rockchip-rk3588-skips.txt+14−0

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

drivers/gpu/drm/ci/xfails/virtio_gpu-none-fails.txt+8−58

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

drivers/gpu/drm/ci/xfails/vkms-none-fails.txt+2−0

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

drivers/gpu/drm/display/drm_bridge_connector.c+2−2

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

drivers/gpu/drm/display/drm_dp_mst_topology.c+0−1

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

drivers/gpu/drm/display/drm_dp_tunnel.c+1−1

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

drivers/gpu/drm/display/drm_hdmi_helper.c+4−3

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

drivers/gpu/drm/display/drm_hdmi_state_helper.c+41−19

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

drivers/gpu/drm/drm_atomic.c+13−17

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

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

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

drivers/gpu/drm/drm_atomic_uapi.c+4−0

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

drivers/gpu/drm/drm_blend.c+35−4

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

drivers/gpu/drm/drm_bridge.c+46−7

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

drivers/gpu/drm/drm_colorop.c+19−9

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

drivers/gpu/drm/drm_connector.c+8−8

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

drivers/gpu/drm/drm_crtc.c+2−4

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

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

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

drivers/gpu/drm/drm_edid.c+9−9

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

drivers/gpu/drm/drm_gem.c+6−5

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

drivers/gpu/drm/drm_gem_atomic_helper.c+0−22

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

drivers/gpu/drm/drm_gem_dma_helper.c+13−10

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

drivers/gpu/drm/drm_gem_shmem_helper.c+28−17

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

drivers/gpu/drm/drm_ioc32.c+2−0

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

drivers/gpu/drm/drm_mipi_dbi.c+120−256

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

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

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

drivers/gpu/drm/drm_modeset_helper.c+0−3

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

drivers/gpu/drm/drm_pagemap_util.c+5−9

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

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

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

drivers/gpu/drm/drm_simple_kms_helper.c+0−83

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

drivers/gpu/drm/drm_syncobj.c+2−2

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

drivers/gpu/drm/gud/gud_drv.c+8−1

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

drivers/gpu/drm/gud/gud_internal.h+4−0

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

drivers/gpu/drm/gud/gud_pipe.c+36−18

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

drivers/gpu/drm/i915/Makefile+1−0

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

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

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

drivers/gpu/drm/i915/display/icl_dsi.c+14−7

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

drivers/gpu/drm/i915/display/icl_dsi_regs.h+2−1

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

drivers/gpu/drm/i915/display/intel_cdclk.c+54−0

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

drivers/gpu/drm/i915/display/intel_cx0_phy.c+6−4

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

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

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

drivers/gpu/drm/i915/display/intel_ddi.c+7−19

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

drivers/gpu/drm/i915/display/intel_de.c+178−0

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

drivers/gpu/drm/i915/display/intel_de.h+23−98

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

drivers/gpu/drm/i915/display/intel_display.c+9−34

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

drivers/gpu/drm/i915/display/intel_display_device.c+25−3

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

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

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

drivers/gpu/drm/i915/display/intel_display_types.h+2−2

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

drivers/gpu/drm/i915/display/intel_dmc.c+8−11

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

drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c+31−1

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

drivers/gpu/drm/i915/display/intel_dp_tunnel.c+14−6

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

drivers/gpu/drm/i915/display/intel_dp_tunnel.h+7−4

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

drivers/gpu/drm/i915/display/intel_dpll.c+2−24

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

drivers/gpu/drm/i915/display/intel_dpll_mgr.c+181−5

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

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

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

drivers/gpu/drm/i915/display/intel_dsi.h+4−3

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

drivers/gpu/drm/i915/display/intel_dsi_vbt.c+8−4

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

drivers/gpu/drm/i915/display/intel_gmbus.c+4−2

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

drivers/gpu/drm/i915/display/intel_lt_phy.c+107−86

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

drivers/gpu/drm/i915/display/intel_lt_phy.h+15−8

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

drivers/gpu/drm/i915/display/intel_modeset_verify.c+0−1

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

drivers/gpu/drm/i915/display/intel_pch.c+93−0

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

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

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

drivers/gpu/drm/i915/display/intel_plane.c+27−34

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

drivers/gpu/drm/i915/display/intel_psr.c+13−2

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

drivers/gpu/drm/i915/display/intel_quirks.c+22−3

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

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

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

drivers/gpu/drm/i915/display/skl_watermark.c+104−56

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

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

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

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c+2−0

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

drivers/gpu/drm/i915/gvt/edid.c+8−10

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

drivers/gpu/drm/i915/i915_initial_plane.c+2−1

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

drivers/gpu/drm/i915/i915_wait_util.h+1−1

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

drivers/gpu/drm/i915/intel_clock_gating.c+7−79

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

drivers/gpu/drm/i915/intel_step.h+2−55

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

drivers/gpu/drm/i915/intel_uncore.c+50−22

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

drivers/gpu/drm/i915/selftests/intel_uncore.c+0−62

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

drivers/gpu/drm/imagination/Makefile+1−0

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

drivers/gpu/drm/imagination/pvr_ccb.c+5−0

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

drivers/gpu/drm/imagination/pvr_device.c+0−17

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

drivers/gpu/drm/imagination/pvr_dump.c+113−0

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

drivers/gpu/drm/imagination/pvr_dump.h+17−0

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

drivers/gpu/drm/imagination/pvr_fw_startstop.c+66−34

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

drivers/gpu/drm/imagination/pvr_power.c+39−12

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

drivers/gpu/drm/imagination/pvr_rogue_fwif.h+6−2

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

drivers/gpu/drm/imagination/pvr_rogue_fwif_shared.h+17−1

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

drivers/gpu/drm/imx/ipuv3/Kconfig+1−0

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

drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c+11−12

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

drivers/gpu/drm/imx/ipuv3/parallel-display.c+12−3

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

drivers/gpu/drm/ingenic/ingenic-drm-drv.c+1−1

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

drivers/gpu/drm/ingenic/ingenic-ipu.c+1−1

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

drivers/gpu/drm/mediatek/Makefile+0−1

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

drivers/gpu/drm/mediatek/mtk_crtc.c+0−1

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

drivers/gpu/drm/mediatek/mtk_disp_ovl.c+12−0

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

drivers/gpu/drm/mediatek/mtk_dp.c+2−2

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

drivers/gpu/drm/mediatek/mtk_drm_drv.c+8−18

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

drivers/gpu/drm/mediatek/mtk_drm_drv.h+0−1

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

drivers/gpu/drm/mediatek/mtk_dsi.c+22−22

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

drivers/gpu/drm/mediatek/mtk_gem.c+0−231

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

drivers/gpu/drm/mediatek/mtk_gem.h+0−17

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

drivers/gpu/drm/mediatek/mtk_hdmi_v2.c+4−4

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

drivers/gpu/drm/meson/meson_dw_mipi_dsi.c+2−4

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

drivers/gpu/drm/msm/Makefile+1−0

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

drivers/gpu/drm/msm/adreno/a2xx_gpummu.c+1−1

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

drivers/gpu/drm/msm/adreno/a4xx_gpu.c+2−4

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

drivers/gpu/drm/msm/adreno/a5xx_gpu.c+8−4

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

drivers/gpu/drm/msm/adreno/a6xx_catalog.c+242−4

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

drivers/gpu/drm/msm/adreno/a6xx_gmu.c+116−24

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

drivers/gpu/drm/msm/adreno/a6xx_gmu.h+7−2

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

drivers/gpu/drm/msm/adreno/a6xx_gpu.c+78−92

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

drivers/gpu/drm/msm/adreno/a6xx_gpu.h+6−1

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

drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c+10−10

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

drivers/gpu/drm/msm/adreno/a6xx_hfi.c+23−10

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

drivers/gpu/drm/msm/adreno/a6xx_hfi.h+133−22

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

drivers/gpu/drm/msm/adreno/a6xx_preempt.c+1−76

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

drivers/gpu/drm/msm/adreno/a6xx_preempt.h+82−0

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

drivers/gpu/drm/msm/adreno/a8xx_gpu.c+168−18

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

drivers/gpu/drm/msm/adreno/a8xx_preempt.c+259−0

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

drivers/gpu/drm/msm/adreno/adreno_device.c+1−0

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

drivers/gpu/drm/msm/adreno/adreno_gpu.c+8−11

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

drivers/gpu/drm/msm/adreno/adreno_gpu.h+6−7

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h+4−6

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_4_eliza.h+363−0

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h+2−4

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

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

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

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

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h+1−9

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h+1−2

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h+1−2

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h+1−2

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

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

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h+2−3

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h+1−2

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h+1−3

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h+1−3

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h+1−3

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h+1−2

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h+1−3

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h+1−2

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h+1−2

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h+2−4

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h+1−3

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h+13−15

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h+8−10

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h+7−10

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h+8−10

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h+8−10

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

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h+10−13

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

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c+39−18

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

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

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

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c+6−0

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

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c+2−0

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

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c+3−4

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c+11−25

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h+3−6

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

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

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c+21−5

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

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

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c+13−8

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h+1−1

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h+0−6

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

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

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

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c+1−2

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

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

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

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c+25−51

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

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h+2−2

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

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c+183−120

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

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c+14−38

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

drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h+7−12

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

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c+63−100

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

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

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

drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c+2−92

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

drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c+0−90

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

drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.h+0−1

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

drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c+0−1

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

drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c+1−7

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

drivers/gpu/drm/msm/dp/dp_ctrl.c+0−18

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

drivers/gpu/drm/msm/dp/dp_display.c+1−0

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

drivers/gpu/drm/msm/dsi/dsi.c+1−0

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

drivers/gpu/drm/msm/dsi/dsi_cfg.c+2−2

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

drivers/gpu/drm/msm/dsi/dsi_cfg.h+1−1

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

drivers/gpu/drm/msm/dsi/dsi_host.c+70−15

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

drivers/gpu/drm/msm/dsi/phy/dsi_phy.c+1−0

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

drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c+19−19

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

drivers/gpu/drm/msm/hdmi/hdmi.c+16−19

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

drivers/gpu/drm/msm/hdmi/hdmi.h+3−3

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

drivers/gpu/drm/msm/hdmi/hdmi_audio.c+2−3

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

drivers/gpu/drm/msm/hdmi/hdmi_bridge.c+4−4

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

drivers/gpu/drm/msm/hdmi/hdmi_hpd.c+2−2

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

drivers/gpu/drm/msm/hdmi/hdmi_i2c.c+6−6

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

drivers/gpu/drm/msm/hdmi/hdmi_phy.c+2−1

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

drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c+1−1

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

drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c+1−1

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

drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c+1−1

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

drivers/gpu/drm/msm/msm_drv.c+6−1

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

drivers/gpu/drm/msm/msm_fb.c+6−1

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

drivers/gpu/drm/msm/msm_gem.c+3−0

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

drivers/gpu/drm/msm/msm_gem.h+1−0

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

drivers/gpu/drm/msm/msm_gem_shrinker.c+2−3

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

drivers/gpu/drm/msm/msm_gem_submit.c+3−1

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

drivers/gpu/drm/msm/msm_gem_vma.c+13−4

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

drivers/gpu/drm/msm/msm_gpu.c+31−22

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

drivers/gpu/drm/msm/msm_mdss.c+9−0

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

drivers/gpu/drm/msm/registers/adreno/a6xx.xml+4−0

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

drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml+4−2

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

drivers/gpu/drm/msm/registers/display/dsi.xml+4−1

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

drivers/gpu/drm/nova/gem.rs+3−2

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

drivers/gpu/drm/omapdrm/omap_drv.c+16−6

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

drivers/gpu/drm/panel/Kconfig+43−3

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

drivers/gpu/drm/panel/Makefile+5−1

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

drivers/gpu/drm/panel/panel-edp.c+3−0

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

drivers/gpu/drm/panel/panel-himax-hx83102.c+151−0

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

drivers/gpu/drm/panel/panel-himax-hx83121a.c+749−0

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

drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c+134−0

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

drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.h+15−0

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

drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.crenamed from drivers/gpu/drm/panel/panel-ilitek-ili9806e.c+44−109

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

drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c+323−0

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

drivers/gpu/drm/panel/panel-novatek-nt36672a.c+30−64

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

drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c+301−0

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

drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c+1−0

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

drivers/gpu/drm/panel/panel-simple.c+36−1

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

drivers/gpu/drm/panthor/panthor_drv.c+128−6

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

drivers/gpu/drm/panthor/panthor_fw.c+2−2

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

drivers/gpu/drm/radeon/si_dpm.c+3−1

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

drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c+13−13

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

drivers/gpu/drm/renesas/rcar-du/rcar_cmm.h+9−9

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

drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c+8−8

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

drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.h+2−1

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

drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.h+7−1

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

drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c+24−28

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

drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c+16−0

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

drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.h+2−0

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

drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c+1−2

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

drivers/gpu/drm/rockchip/analogix_dp-rockchip.c+2−2

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

drivers/gpu/drm/rockchip/rockchip_drm_vop2.c+23−1

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

drivers/gpu/drm/rockchip/rockchip_drm_vop2.h+4−0

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

drivers/gpu/drm/sitronix/st7586.c+144−54

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

drivers/gpu/drm/sitronix/st7735r.c+121−21

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

drivers/gpu/drm/sun4i/sun4i_backend.c+17−13

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

drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c+1−1

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

drivers/gpu/drm/sun4i/sun8i_mixer.c+15−12

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

drivers/gpu/drm/sun4i/sun8i_ui_layer.c+2−14

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

drivers/gpu/drm/sun4i/sun8i_vi_layer.c+2−25

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

drivers/gpu/drm/sysfb/efidrm.c+31−15

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

drivers/gpu/drm/tegra/hub.c+16−6

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

drivers/gpu/drm/tests/drm_connector_test.c+40−40

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

drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c+91−91

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

drivers/gpu/drm/tilcdc/tilcdc_panel.c+0−408

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

drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c+2−2

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

drivers/gpu/drm/tiny/hx8357d.c+124−14

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

drivers/gpu/drm/tiny/ili9163.c+124−14

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

drivers/gpu/drm/tiny/ili9225.c+145−47

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

drivers/gpu/drm/tiny/ili9341.c+124−14

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

drivers/gpu/drm/tiny/ili9486.c+124−15

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

drivers/gpu/drm/tiny/mi0283qt.c+124−14

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

drivers/gpu/drm/tiny/panel-mipi-dbi.c+124−17

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

drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c+41−0

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

drivers/gpu/drm/ttm/tests/ttm_device_test.c+1−1

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

drivers/gpu/drm/ttm/tests/ttm_pool_test.c+16−16

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

drivers/gpu/drm/ttm/ttm_backup.c+4−2

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

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

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

drivers/gpu/drm/ttm/ttm_pool.c+145−72

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

drivers/gpu/drm/tyr/driver.rs+56−44

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

drivers/gpu/drm/tyr/file.rs+20−16

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

drivers/gpu/drm/tyr/gem.rs+12−6

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

drivers/gpu/drm/tyr/gpu.rs+32−26

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

drivers/gpu/drm/tyr/regs.rs+10−6

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

drivers/gpu/drm/tyr/tyr.rs+2−2

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

drivers/gpu/drm/v3d/v3d_drv.c+29−26

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

drivers/gpu/drm/v3d/v3d_drv.h+31−15

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

drivers/gpu/drm/v3d/v3d_fence.c+1−1

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

drivers/gpu/drm/v3d/v3d_gem.c+27−16

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

drivers/gpu/drm/v3d/v3d_irq.c+1−1

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

drivers/gpu/drm/v3d/v3d_sched.c+51−82

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

drivers/gpu/drm/v3d/v3d_submit.c+6−0

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

drivers/gpu/drm/v3d/v3d_sysfs.c+1−1

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

drivers/gpu/drm/vc4/vc4_hdmi.c+9−9

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

drivers/gpu/drm/vc4/vc4_hdmi.h+1−1

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

drivers/gpu/drm/vc4/vc4_kms.c+1−3

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

drivers/gpu/drm/verisilicon/vs_dc.c+1−1

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

drivers/gpu/drm/vkms/vkms_composer.c+8−2

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

drivers/gpu/drm/vkms/vkms_crtc.c+3−0

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

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h+57−36

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

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c+2−1

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

drivers/gpu/drm/xe/Makefile+1−0

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

drivers/gpu/drm/xe/compat-i915-headers/intel_step.h+1−2

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

drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h+0−31

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

drivers/gpu/drm/xe/xe_device.c+8−1

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

drivers/gpu/nova-core/Kconfig+1−1

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

drivers/gpu/nova-core/dma.rs+0−54

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

drivers/gpu/nova-core/driver.rs+14−3

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

drivers/gpu/nova-core/falcon.rs+452−337

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

drivers/gpu/nova-core/falcon/gsp.rs+15−12

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

drivers/gpu/nova-core/falcon/hal.rs+5−1

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

drivers/gpu/nova-core/falcon/hal/ga102.rs+43−27

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

drivers/gpu/nova-core/falcon/hal/tu102.rs+8−4

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

drivers/gpu/nova-core/falcon/sec2.rs+7−10

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

drivers/gpu/nova-core/fb.rs+80−21

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

drivers/gpu/nova-core/fb/hal/ga100.rs+23−14

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

drivers/gpu/nova-core/fb/hal/ga102.rs+5−2

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

drivers/gpu/nova-core/fb/hal/tu102.rs+10−7

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

drivers/gpu/nova-core/firmware.rs+146−48

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

drivers/gpu/nova-core/firmware/booter.rs+45−42

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

drivers/gpu/nova-core/firmware/fwsec.rs+82−99

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

drivers/gpu/nova-core/firmware/fwsec/bootloader.rs+350−0

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

drivers/gpu/nova-core/firmware/gsp.rs+19−99

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

drivers/gpu/nova-core/firmware/riscv.rs+6−4

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

drivers/gpu/nova-core/gfw.rs+8−3

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

drivers/gpu/nova-core/gpu.rs+26−40

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

drivers/gpu/nova-core/gsp.rs+86−58

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

drivers/gpu/nova-core/gsp/boot.rs+37−45

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

drivers/gpu/nova-core/gsp/cmdq.rs+316−166

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

drivers/gpu/nova-core/gsp/cmdq/continuation.rs+307−0

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

drivers/gpu/nova-core/gsp/commands.rs+9−14

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

drivers/gpu/nova-core/gsp/fw.rs+166−182

This diff is large: its 586 lines aren’t shown here.

drivers/gpu/nova-core/gsp/fw/commands.rs+10−7

This diff is large: its 34 lines aren’t shown here.

drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/nova-core/gsp/sequencer.rs+9−13

This diff is large: its 78 lines aren’t shown here.

drivers/gpu/nova-core/nova_core.rs+50−4

This diff is large: its 77 lines aren’t shown here.

drivers/gpu/nova-core/num.rs+80−0

This diff is large: its 84 lines aren’t shown here.

drivers/gpu/nova-core/regs.rs+319−230

This diff is large: its 715 lines aren’t shown here.

drivers/gpu/nova-core/regs/macros.rs+0−739

This diff is large: its 740 lines aren’t shown here.

drivers/hid/bpf/hid_bpf_dispatch.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/hid/hid-appletb-kbd.c+3−2

This diff is large: its 19 lines aren’t shown here.

drivers/hid/hid-asus.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/hid/hid-core.c+4−3

This diff is large: its 14 lines aren’t shown here.

drivers/hid/hid-ids.h+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/hid/hid-input.c+11−7

This diff is large: its 71 lines aren’t shown here.

drivers/hid/hid-logitech-hidpp.c+5−1

This diff is large: its 23 lines aren’t shown here.

drivers/hid/hid-multitouch.c+7−0

This diff is large: its 20 lines aren’t shown here.

drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/hid/wacom_wac.c+10−0

This diff is large: its 21 lines aren’t shown here.

drivers/hv/mshv_regions.c+4−2

This diff is large: its 20 lines aren’t shown here.

drivers/hv/mshv_root.h+2−3

This diff is large: its 19 lines aren’t shown here.

drivers/hv/mshv_root_main.c+22−71

This diff is large: its 203 lines aren’t shown here.

drivers/hv/mshv_synic.c+173−15

This diff is large: its 280 lines aren’t shown here.

drivers/hwmon/Kconfig+2−4

This diff is large: its 20 lines aren’t shown here.

drivers/hwmon/adm1177.c+31−23

This diff is large: its 120 lines aren’t shown here.

drivers/hwmon/asus-ec-sensors.c+6−1

This diff is large: its 35 lines aren’t shown here.

drivers/hwmon/axi-fan-control.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/hwmon/max6639.c+5−5

This diff is large: its 31 lines aren’t shown here.

drivers/hwmon/occ/common.c+9−10

This diff is large: its 47 lines aren’t shown here.

drivers/hwmon/peci/cputemp.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/hwmon/pmbus/hac300s.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/hwmon/pmbus/ina233.c+4−1

This diff is large: its 15 lines aren’t shown here.

drivers/hwmon/pmbus/isl68137.c+23−5

This diff is large: its 59 lines aren’t shown here.

drivers/hwmon/pmbus/ltc4286.c+1−0

This diff is large: its 5 lines aren’t shown here.

drivers/hwmon/pmbus/mp2869.c+21−14

This diff is large: its 77 lines aren’t shown here.

drivers/hwmon/pmbus/mp2975.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/hwmon/pmbus/pmbus_core.c+154−38

This diff is large: its 540 lines aren’t shown here.

drivers/hwmon/pmbus/pxe1610.c+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/hwmon/pmbus/tps53679.c+5−5

This diff is large: its 25 lines aren’t shown here.

drivers/i2c/busses/Kconfig+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/i2c/busses/i2c-cp2615.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/i2c/busses/i2c-designware-amdisp.c+5−6

This diff is large: its 35 lines aren’t shown here.

drivers/i2c/busses/i2c-fsi.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/i2c/busses/i2c-imx.c+32−19

This diff is large: its 97 lines aren’t shown here.

drivers/i2c/busses/i2c-pxa.c+16−1

This diff is large: its 38 lines aren’t shown here.

drivers/i2c/busses/i2c-tegra.c+4−1

This diff is large: its 13 lines aren’t shown here.

drivers/i3c/Kconfig+12−0

This diff is large: its 16 lines aren’t shown here.

drivers/i3c/master/dw-i3c-master.c+4−2

This diff is large: its 27 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/cmd.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/cmd_v1.c+3−5

This diff is large: its 16 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/cmd_v2.c+3−5

This diff is large: its 23 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/core.c+90−53

This diff is large: its 255 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/dma.c+84−74

This diff is large: its 299 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/hci.h+5−0

This diff is large: its 32 lines aren’t shown here.

drivers/i3c/master/mipi-i3c-hci/pio.c+5−11

This diff is large: its 76 lines aren’t shown here.

drivers/iio/accel/adxl313_core.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/iio/accel/adxl355_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/accel/adxl380.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/adc/ad4062.c+3−5

This diff is large: its 22 lines aren’t shown here.

drivers/iio/adc/ad7768-1.c+11−2

This diff is large: its 41 lines aren’t shown here.

drivers/iio/adc/ade9000.c+6−6

This diff is large: its 42 lines aren’t shown here.

drivers/iio/adc/aspeed_adc.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/iio/adc/nxp-sar-adc.c+5−4

This diff is large: its 30 lines aren’t shown here.

drivers/iio/adc/ti-adc161s626.c+20−21

This diff is large: its 79 lines aren’t shown here.

drivers/iio/adc/ti-ads1018.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/adc/ti-ads1119.c+6−5

This diff is large: its 30 lines aren’t shown here.

drivers/iio/adc/ti-ads7950.c+5−3

This diff is large: its 35 lines aren’t shown here.

drivers/iio/chemical/bme680_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/chemical/sps30_i2c.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/chemical/sps30_serial.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/common/hid-sensors/hid-sensor-trigger.c+30−18

This diff is large: its 100 lines aren’t shown here.

drivers/iio/dac/ad5770r.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/dac/ds4424.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/dac/mcp47feb02.c+22−29

This diff is large: its 144 lines aren’t shown here.

drivers/iio/frequency/adf4377.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/gyro/mpu3050-core.c+34−16

This diff is large: its 106 lines aren’t shown here.

drivers/iio/gyro/mpu3050-i2c.c+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/iio/imu/adis.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/adis16550.c+4−4

This diff is large: its 27 lines aren’t shown here.

drivers/iio/imu/bmi160/bmi160_core.c+5−10

This diff is large: its 36 lines aren’t shown here.

drivers/iio/imu/bno055/bno055.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c+4−0

This diff is large: its 18 lines aren’t shown here.

drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/inv_icm45600/inv_icm45600.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/inv_icm45600/inv_icm45600_core.c+8−3

This diff is large: its 32 lines aren’t shown here.

drivers/iio/imu/inv_mpu6050/inv_mpu_core.c+8−0

This diff is large: its 15 lines aren’t shown here.

drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c+14−1

This diff is large: its 34 lines aren’t shown here.

drivers/iio/industrialio-buffer.c+4−2

This diff is large: its 13 lines aren’t shown here.

drivers/iio/light/bh1780.c+1−1

This diff is large: its 11 lines aren’t shown here.

drivers/iio/light/vcnl4035.c+12−6

This diff is large: its 46 lines aren’t shown here.

drivers/iio/light/veml6070.c+1−3

This diff is large: its 11 lines aren’t shown here.

drivers/iio/magnetometer/Kconfig+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/iio/magnetometer/tlv493d.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/orientation/hid-sensor-rotation.c+20−4

This diff is large: its 38 lines aren’t shown here.

drivers/iio/potentiometer/mcp4131.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/pressure/abp2030pa.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iio/proximity/hx9023s.c+4−2

This diff is large: its 21 lines aren’t shown here.

drivers/iio/proximity/rfd77402.c+4−3

This diff is large: its 22 lines aren’t shown here.

drivers/infiniband/core/rw.c+27−10

This diff is large: its 57 lines aren’t shown here.

drivers/infiniband/core/umem.c+3−2

This diff is large: its 19 lines aren’t shown here.

drivers/infiniband/hw/bng_re/bng_dev.c+9−5

This diff is large: its 54 lines aren’t shown here.

drivers/infiniband/hw/efa/efa_com.c+40−48

This diff is large: its 188 lines aren’t shown here.

drivers/infiniband/hw/ionic/ionic_controlpath.c+3−1

This diff is large: its 25 lines aren’t shown here.

drivers/infiniband/hw/irdma/cm.c+16−13

This diff is large: its 94 lines aren’t shown here.

drivers/infiniband/hw/irdma/uk.c+22−17

This diff is large: its 76 lines aren’t shown here.

drivers/infiniband/hw/irdma/utils.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/infiniband/hw/irdma/verbs.c+6−4

This diff is large: its 59 lines aren’t shown here.

drivers/input/joystick/xpad.c+5−0

This diff is large: its 26 lines aren’t shown here.

drivers/input/mouse/bcm5974.c+41−1

This diff is large: its 80 lines aren’t shown here.

drivers/input/rmi4/rmi_f54.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/input/serio/i8042-acpipnpio.h+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/interconnect/qcom/sm8450.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/iommu/amd/iommu.c+14−1

This diff is large: its 23 lines aren’t shown here.

drivers/iommu/dma-iommu.c+17−4

This diff is large: its 51 lines aren’t shown here.

drivers/iommu/generic_pt/fmt/amdv1.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iommu/generic_pt/iommu_pt.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/iommu/intel/dmar.c+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/iommu/intel/svm.c+8−4

This diff is large: its 26 lines aren’t shown here.

drivers/iommu/iommu-sva.c+6−6

This diff is large: its 20 lines aren’t shown here.

drivers/iommu/iommu.c+5−1

This diff is large: its 13 lines aren’t shown here.

drivers/irqchip/irq-qcom-mpm.c+3−0

This diff is large: its 17 lines aren’t shown here.

drivers/irqchip/irq-renesas-rzv2h.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/irqchip/irq-riscv-aplic-main.c+19−6

This diff is large: its 61 lines aren’t shown here.

drivers/irqchip/irq-riscv-rpmi-sysmsi.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/i2c/ccs/ccs-core.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/media/mc/mc-request.c+5−0

This diff is large: its 33 lines aren’t shown here.

drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c+4−0

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c+27−23

This diff is large: its 79 lines aren’t shown here.

drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/synopsys/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/synopsys/dw-mipi-csi2rx.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/verisilicon/imx8m_vpu_hw.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/uvc/uvc_video.c+5−4

This diff is large: its 37 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-ioctl.c+3−2

This diff is large: its 17 lines aren’t shown here.

drivers/misc/amd-sbi/Kconfig+1−2

This diff is large: its 12 lines aren’t shown here.

drivers/misc/fastrpc.c+4−1

This diff is large: its 20 lines aren’t shown here.

drivers/misc/lis3lv02d/lis3lv02d.c+4−2

This diff is large: its 15 lines aren’t shown here.

drivers/misc/mei/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/misc/mei/hw-me.c+4−10

This diff is large: its 24 lines aren’t shown here.

drivers/mmc/host/sdhci-pci-gli.c+9−0

This diff is large: its 27 lines aren’t shown here.

drivers/mmc/host/sdhci.c+8−1

This diff is large: its 17 lines aren’t shown here.

drivers/mtd/nand/raw/brcmnand/brcmnand.c+2−4

This diff is large: its 17 lines aren’t shown here.

drivers/mtd/nand/raw/cadence-nand-controller.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/mtd/nand/raw/nand_base.c+12−2

This diff is large: its 36 lines aren’t shown here.

drivers/mtd/nand/raw/pl35x-nand-controller.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/mtd/parsers/redboot.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/mtd/spi-nor/core.c+7−7

This diff is large: its 47 lines aren’t shown here.

drivers/net/bonding/bond_debugfs.c+11−5

This diff is large: its 23 lines aren’t shown here.

drivers/net/bonding/bond_main.c+66−8

This diff is large: its 120 lines aren’t shown here.

drivers/net/caif/caif_serial.c+3−0

This diff is large: its 24 lines aren’t shown here.

drivers/net/can/dev/calc_bittiming.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/can/dev/netlink.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/net/can/spi/hi311x.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/net/can/spi/mcp251x.c+24−5

This diff is large: its 51 lines aren’t shown here.

drivers/net/dsa/bcm_sf2.c+6−2

This diff is large: its 22 lines aren’t shown here.

drivers/net/dsa/microchip/ksz_ptp.c+8−3

This diff is large: its 25 lines aren’t shown here.

drivers/net/dsa/mxl862xx/mxl862xx.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/net/dsa/realtek/rtl8365mb.c+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/net/dsa/realtek/rtl8366rb-leds.c+3−3

This diff is large: its 15 lines aren’t shown here.

drivers/net/dsa/sja1105/sja1105_main.c+3−4

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/airoha/airoha_eth.c+19−2

This diff is large: its 53 lines aren’t shown here.

drivers/net/ethernet/airoha/airoha_eth.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/airoha/airoha_ppe.c+9−0

This diff is large: its 24 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe-drv.c+10−9

This diff is large: its 42 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c+75−7

This diff is large: its 125 lines aren’t shown here.

drivers/net/ethernet/amd/xgbe/xgbe.h+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/arc/emac_main.c+11−0

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/broadcom/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/broadcom/asp2/bcmasp.c+23−18

This diff is large: its 113 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt.c+54−24

This diff is large: its 187 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt.h+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c+3−6

This diff is large: its 30 lines aren’t shown here.

drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c+2−3

This diff is large: its 19 lines aren’t shown here.

drivers/net/ethernet/broadcom/genet/bcmgenet.c+12−19

This diff is large: its 78 lines aren’t shown here.

drivers/net/ethernet/broadcom/genet/bcmgenet.h+1−4

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/broadcom/genet/bcmmii.c+5−5

This diff is large: its 38 lines aren’t shown here.

drivers/net/ethernet/broadcom/tg3.c+12−1

This diff is large: its 34 lines aren’t shown here.

drivers/net/ethernet/cadence/macb_main.c+142−23

This diff is large: its 302 lines aren’t shown here.

drivers/net/ethernet/cadence/macb_pci.c+6−4

This diff is large: its 28 lines aren’t shown here.

drivers/net/ethernet/cadence/macb_ptp.c+3−1

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/faraday/ftgmac100.c+24−4

This diff is large: its 54 lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/enetc.c+12−1

This diff is large: its 30 lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/enetc4_hw.h+11−0

This diff is large: its 25 lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/enetc4_pf.c+104−14

This diff is large: its 157 lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/enetc_ethtool.c+11−1

This diff is large: its 28 lines aren’t shown here.

drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c+10−14

This diff is large: its 59 lines aren’t shown here.

drivers/net/ethernet/freescale/fec_ptp.c+0−3

This diff is large: its 10 lines aren’t shown here.

drivers/net/ethernet/intel/e1000/e1000_main.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/intel/e1000e/netdev.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c+7−7

This diff is large: its 37 lines aren’t shown here.

drivers/net/ethernet/intel/iavf/iavf.h+1−2

This diff is large: its 15 lines aren’t shown here.

drivers/net/ethernet/intel/iavf/iavf_ethtool.c+21−29

This diff is large: its 110 lines aren’t shown here.

drivers/net/ethernet/intel/iavf/iavf_main.c+34−56

This diff is large: its 188 lines aren’t shown here.

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/intel/ice/devlink/devlink.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice.h+22−0

This diff is large: its 29 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_ethtool.c+11−21

This diff is large: its 53 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_main.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/intel/ice/ice_repr.c+3−2

This diff is large: its 26 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf_idc.c+4−2

This diff is large: its 22 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf_txrx.c+1−1

This diff is large: its 15 lines aren’t shown here.

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc_main.c+9−5

This diff is large: its 28 lines aren’t shown here.

drivers/net/ethernet/intel/igc/igc_ptp.c+33−0

This diff is large: its 40 lines aren’t shown here.

drivers/net/ethernet/intel/libie/fwlog.c+36−13

This diff is large: its 117 lines aren’t shown here.

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c+3−3

This diff is large: its 22 lines aren’t shown here.

drivers/net/ethernet/mediatek/mtk_ppe_offload.c+20−1

This diff is large: its 35 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/devlink.c+1−3

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c+22−28

This diff is large: its 111 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c+9−14

This diff is large: its 88 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c+9−14

This diff is large: its 55 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c+4−3

This diff is large: its 15 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/eswitch.h+2−0

This diff is large: its 13 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+27−20

This diff is large: its 109 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/fw.c+34−19

This diff is large: its 83 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c+3−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_txrx.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/net/ethernet/meta/fbnic/fbnic_txrx.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/microchip/lan743x_main.c+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/ethernet/microsoft/mana/gdma_main.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/ethernet/microsoft/mana/hw_channel.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/net/ethernet/microsoft/mana/mana_en.c+11−2

This diff is large: its 41 lines aren’t shown here.

drivers/net/ethernet/pensando/ionic/ionic_lif.c+11−6

This diff is large: its 25 lines aren’t shown here.

drivers/net/ethernet/spacemit/k1_emac.c+13−6

This diff is large: its 47 lines aren’t shown here.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+4−10

This diff is large: its 34 lines aren’t shown here.

drivers/net/ethernet/ti/am65-cpsw-nuss.c+9−7

This diff is large: its 55 lines aren’t shown here.

drivers/net/ethernet/ti/am65-cpsw-nuss.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/ethernet/ti/icssg/icssg_common.c+8−3

This diff is large: its 60 lines aren’t shown here.

drivers/net/ethernet/xilinx/xilinx_axienet.h+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/ethernet/xilinx/xilinx_axienet_main.c+4−5

This diff is large: its 30 lines aren’t shown here.

drivers/net/mctp/mctp-i2c.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/mctp/mctp-usb.c+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/net/netdevsim/netdev.c+4−1

This diff is large: its 13 lines aren’t shown here.

drivers/net/phy/sfp.c+13−2

This diff is large: its 40 lines aren’t shown here.

drivers/net/team/team_core.c+64−1

This diff is large: its 79 lines aren’t shown here.

drivers/net/tun_vnet.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/usb/aqc111.c+6−6

This diff is large: its 21 lines aren’t shown here.

drivers/net/usb/cdc_ncm.c+6−4

This diff is large: its 38 lines aren’t shown here.

drivers/net/usb/lan78xx.c+8−4

This diff is large: its 47 lines aren’t shown here.

drivers/net/usb/lan78xx.h+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/net/usb/qmi_wwan.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/usb/usbnet.c+4−3

This diff is large: its 16 lines aren’t shown here.

drivers/net/virtio_net.c+15−12

This diff is large: its 78 lines aren’t shown here.

drivers/net/vxlan/vxlan_core.c+4−2

This diff is large: its 17 lines aren’t shown here.

drivers/net/wireless/ath/ath11k/dp_rx.c+7−8

This diff is large: its 49 lines aren’t shown here.

drivers/net/wireless/ath/ath12k/dp_rx.c+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/net/wireless/ath/ath9k/channel.c+2−4

This diff is large: its 21 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/fw/api/commands.h+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/fw/api/scan.h+10−0

This diff is large: its 17 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/iface.c+69−32

This diff is large: its 123 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/mac80211.c+19−0

This diff is large: its 33 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/mld.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/mlo.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/notif.c+5−0

This diff is large: its 26 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/scan.c+27−3

This diff is large: its 51 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mld/scan.h+6−3

This diff is large: its 30 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mvm/d3.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/intel/iwlwifi/mvm/fw.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/net/wireless/mediatek/mt76/scan.c+1−3

This diff is large: its 12 lines aren’t shown here.

drivers/net/wireless/microchip/wilc1000/hif.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/ti/wl1251/tx.c+5−3

This diff is large: its 18 lines aren’t shown here.

drivers/net/wireless/ti/wlcore/tx.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/wireless/virtual/mac80211_hwsim.c+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/net/wireless/virtual/virt_wifi.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/nfc/nxp-nci/i2c.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/nfc/pn533/uart.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/nvdimm/bus.c+3−2

This diff is large: its 18 lines aren’t shown here.

drivers/nvme/host/core.c+1−2

This diff is large: its 17 lines aren’t shown here.

drivers/nvme/host/pci.c+5−3

This diff is large: its 28 lines aren’t shown here.

drivers/nvme/target/admin-cmd.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/nvme/target/core.c+12−2

This diff is large: its 51 lines aren’t shown here.

drivers/nvme/target/nvmet.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/nvme/target/rdma.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/nvmem/imx-ocotp-ele.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/nvmem/imx-ocotp.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/nvmem/zynqmp_nvmem.c+4−4

This diff is large: its 36 lines aren’t shown here.

drivers/pci/endpoint/functions/pci-epf-test.c+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/pci/pwrctrl/core.c+43−13

This diff is large: its 70 lines aren’t shown here.

drivers/pci/pwrctrl/pci-pwrctrl-pwrseq.c+0−12

This diff is large: its 26 lines aren’t shown here.

drivers/pci/pwrctrl/slot.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/phy/Kconfig+2−3

This diff is large: its 19 lines aren’t shown here.

drivers/phy/freescale/phy-fsl-lynx-28g.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/phy/qualcomm/phy-qcom-qmp-ufs.c+1−2

This diff is large: its 22 lines aren’t shown here.

drivers/phy/spacemit/phy-k1-usb2.c+14−0

This diff is large: its 31 lines aren’t shown here.

drivers/phy/ti/phy-j721e-wiz.c+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/pinctrl/mediatek/pinctrl-mtk-common.c+6−3

This diff is large: its 16 lines aren’t shown here.

drivers/pinctrl/qcom/pinctrl-spmi-gpio.c+16−0

This diff is large: its 30 lines aren’t shown here.

drivers/pinctrl/renesas/pinctrl-rza1.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/pinctrl/renesas/pinctrl-rzt2h.c+8−7

This diff is large: its 71 lines aren’t shown here.

drivers/pinctrl/stm32/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/pinctrl/sunxi/pinctrl-sunxi.c+32−11

This diff is large: its 137 lines aren’t shown here.

drivers/pinctrl/sunxi/pinctrl-sunxi.h+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/platform/olpc/olpc-xo175-ec.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/platform/x86/amd/hsmp/hsmp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/platform/x86/asus-armoury.h+77−0

This diff is large: its 98 lines aren’t shown here.

drivers/platform/x86/asus-nb-wmi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/platform/x86/hp/hp-wmi.c+19−0

This diff is large: its 47 lines aren’t shown here.

drivers/platform/x86/intel/hid.c+9−1

This diff is large: its 24 lines aren’t shown here.

drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/platform/x86/lenovo/wmi-gamezone.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/pmdomain/bcm/bcm2835-power.c+4−8

This diff is large: its 40 lines aren’t shown here.

drivers/pmdomain/mediatek/mtk-pm-domains.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/power/sequencing/pwrseq-pcie-m2.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/regulator/pca9450-regulator.c+10−4

This diff is large: its 51 lines aren’t shown here.

drivers/remoteproc/imx_rproc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/remoteproc/mtk_scp.c+39−0

This diff is large: its 52 lines aren’t shown here.

drivers/remoteproc/qcom_sysmon.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/remoteproc/qcom_wcnss.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/resctrl/mpam_devices.c+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/resctrl/test_mpam_devices.c+15−7

This diff is large: its 59 lines aren’t shown here.

drivers/reset/reset-rzg2l-usbphy-ctrl.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/s390/block/dasd_eckd.c+16−0

This diff is large: its 37 lines aren’t shown here.

drivers/s390/crypto/zcrypt_ccamisc.c+7−5

This diff is large: its 19 lines aren’t shown here.

drivers/s390/crypto/zcrypt_cex4.c+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/s390/crypto/zcrypt_msgtype6.c+14−18

This diff is large: its 91 lines aren’t shown here.

drivers/scsi/hisi_sas/hisi_sas_main.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/scsi/ibmvscsi/ibmvfc.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/scsi/qla2xxx/qla_iocb.c+0−2

This diff is large: its 16 lines aren’t shown here.

drivers/scsi/scsi_scan.c+2−6

This diff is large: its 15 lines aren’t shown here.

drivers/scsi/scsi_transport_sas.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/scsi/ses.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/slimbus/qcom-ngd-ctrl.c+2−4

This diff is large: its 13 lines aren’t shown here.

drivers/soc/fsl/qbman/qman.c+22−2

This diff is large: its 41 lines aren’t shown here.

drivers/soc/fsl/qe/qmc.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/soc/microchip/mpfs-sys-controller.c+9−4

This diff is large: its 34 lines aren’t shown here.

drivers/soc/rockchip/grf.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/spi/spi-amlogic-spifc-a4.c+21−42

This diff is large: its 128 lines aren’t shown here.

drivers/spi/spi-amlogic-spisg.c+4−8

This diff is large: its 34 lines aren’t shown here.

drivers/spi/spi-atcspi200.c+16−22

This diff is large: its 56 lines aren’t shown here.

drivers/spi/spi-axiado.c+11−20

This diff is large: its 51 lines aren’t shown here.

drivers/spi/spi-cadence-quadspi.c+15−8

This diff is large: its 58 lines aren’t shown here.

drivers/spi/spi-fsl-lpspi.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/spi/spi-geni-qcom.c+7−6

This diff is large: its 37 lines aren’t shown here.

drivers/spi/spi-intel-pci.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/spi/spi-meson-spicc.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/spi/spi-rockchip-sfc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/spi/spi-sn-f-ospi.c+10−32

This diff is large: its 70 lines aren’t shown here.

drivers/spi/spi-stm32-ospi.c+6−6

This diff is large: its 46 lines aren’t shown here.

drivers/spi/spi.c+31−26

This diff is large: its 125 lines aren’t shown here.

drivers/staging/rtl8723bs/core/rtw_ieee80211.c+10−5

This diff is large: its 31 lines aren’t shown here.

drivers/staging/rtl8723bs/core/rtw_mlme.c+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/staging/sm750fb/sm750.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/staging/sm750fb/sm750_hw.c+11−11

This diff is large: its 50 lines aren’t shown here.

drivers/target/loopback/tcm_loop.c+46−6

This diff is large: its 81 lines aren’t shown here.

drivers/target/target_core_file.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/tee/tee_shm.c+0−27

This diff is large: its 53 lines aren’t shown here.

drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c+7−1

This diff is large: its 23 lines aren’t shown here.

drivers/thermal/thermal_core.c+27−5

This diff is large: its 104 lines aren’t shown here.

drivers/thunderbolt/nhi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/tty/serial/8250/8250.h+25−0

This diff is large: its 47 lines aren’t shown here.

drivers/tty/serial/8250/8250_dma.c+15−0

This diff is large: its 23 lines aren’t shown here.

drivers/tty/serial/8250/8250_dw.c+235−61

This diff is large: its 485 lines aren’t shown here.

drivers/tty/serial/8250/8250_pci.c+17−0

This diff is large: its 52 lines aren’t shown here.

drivers/tty/serial/8250/8250_port.c+45−30

This diff is large: its 183 lines aren’t shown here.

drivers/tty/serial/serial_core.c+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/tty/serial/uartlite.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/tty/vt/vt.c+26−0

This diff is large: its 54 lines aren’t shown here.

drivers/ufs/core/ufshcd.c+1−1

This diff is large: its 16 lines aren’t shown here.

drivers/usb/cdns3/cdns3-gadget.c+4−0

This diff is large: its 18 lines aren’t shown here.

drivers/usb/class/cdc-acm.c+14−0

This diff is large: its 42 lines aren’t shown here.

drivers/usb/class/cdc-acm.h+2−0

This diff is large: its 6 lines aren’t shown here.

drivers/usb/class/cdc-wdm.c+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/usb/class/usbtmc.c+6−3

This diff is large: its 37 lines aren’t shown here.

drivers/usb/common/ulpi.c+2−3

This diff is large: its 13 lines aren’t shown here.

drivers/usb/core/config.c+5−1

This diff is large: its 13 lines aren’t shown here.

drivers/usb/core/driver.c+14−9

This diff is large: its 99 lines aren’t shown here.

drivers/usb/core/hcd.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/core/message.c+79−21

This diff is large: its 174 lines aren’t shown here.

drivers/usb/core/offload.c+59−43

This diff is large: its 155 lines aren’t shown here.

drivers/usb/core/phy.c+12−8

This diff is large: its 44 lines aren’t shown here.

drivers/usb/core/quirks.c+24−0

This diff is large: its 86 lines aren’t shown here.

drivers/usb/core/usb.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/usb/dwc2/gadget.c+2−0

This diff is large: its 10 lines aren’t shown here.

drivers/usb/dwc3/dwc3-google.c+3−2

This diff is large: its 12 lines aren’t shown here.

drivers/usb/dwc3/dwc3-imx8mp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/dwc3/dwc3-pci.c+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/usb/gadget/function/f_ecm.c+24−13

This diff is large: its 82 lines aren’t shown here.

drivers/usb/gadget/function/f_eem.c+31−28

This diff is large: its 120 lines aren’t shown here.

drivers/usb/gadget/function/f_hid.c+14−9

This diff is large: its 59 lines aren’t shown here.

drivers/usb/gadget/function/f_mass_storage.c+10−2

This diff is large: its 26 lines aren’t shown here.

drivers/usb/gadget/function/f_ncm.c+80−66

This diff is large: its 301 lines aren’t shown here.

drivers/usb/gadget/function/f_rndis.c+31−20

This diff is large: its 110 lines aren’t shown here.

drivers/usb/gadget/function/f_subset.c+35−28

This diff is large: its 135 lines aren’t shown here.

drivers/usb/gadget/function/f_tcm.c+14−0

This diff is large: its 28 lines aren’t shown here.

drivers/usb/gadget/function/f_uac1_legacy.c+37−10

This diff is large: its 57 lines aren’t shown here.

drivers/usb/gadget/function/f_uvc.c+36−3

This diff is large: its 108 lines aren’t shown here.

drivers/usb/gadget/function/u_ecm.h+15−6

This diff is large: its 33 lines aren’t shown here.

drivers/usb/gadget/function/u_eem.h+15−6

This diff is large: its 33 lines aren’t shown here.

drivers/usb/gadget/function/u_ether.c+31−52

This diff is large: its 125 lines aren’t shown here.

drivers/usb/gadget/function/u_ether.h+26−30

This diff is large: its 77 lines aren’t shown here.

drivers/usb/gadget/function/u_ether_configfs.h+0−177

This diff is large: its 189 lines aren’t shown here.

drivers/usb/gadget/function/u_gether.h+15−7

This diff is large: its 33 lines aren’t shown here.

drivers/usb/gadget/function/u_ncm.h+16−9

This diff is large: its 39 lines aren’t shown here.

drivers/usb/gadget/function/u_rndis.h+23−8

This diff is large: its 50 lines aren’t shown here.

drivers/usb/gadget/function/uvc.h+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/usb/gadget/function/uvc_v4l2.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/usb/gadget/function/uvc_video.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/gadget/udc/dummy_hcd.c+26−16

This diff is large: its 71 lines aren’t shown here.

drivers/usb/host/ehci-brcm.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/usb/host/xhci-debugfs.c+9−1

This diff is large: its 21 lines aren’t shown here.

drivers/usb/host/xhci-ring.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/usb/host/xhci-sideband.c+3−15

This diff is large: its 55 lines aren’t shown here.

drivers/usb/host/xhci.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/usb/image/mdc800.c+4−2

This diff is large: its 22 lines aren’t shown here.

drivers/usb/misc/usbio.c+5−2

This diff is large: its 21 lines aren’t shown here.

drivers/usb/misc/uss720.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/misc/yurex.c+1−1

This diff is large: its 16 lines aren’t shown here.

drivers/usb/renesas_usbhs/common.c+9−0

This diff is large: its 16 lines aren’t shown here.

drivers/usb/roles/class.c+6−1

This diff is large: its 16 lines aren’t shown here.

drivers/usb/serial/io_edgeport.c+3−0

This diff is large: its 24 lines aren’t shown here.

drivers/usb/serial/io_usbvend.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/usb/serial/option.c+4−0

This diff is large: its 18 lines aren’t shown here.

drivers/usb/typec/altmodes/displayport.c+6−1

This diff is large: its 16 lines aren’t shown here.

drivers/usb/typec/altmodes/thunderbolt.c+22−22

This diff is large: its 65 lines aren’t shown here.

drivers/usb/typec/class.c+0−4

This diff is large: its 11 lines aren’t shown here.

drivers/usb/typec/tcpm/tcpm.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/typec/ucsi/ucsi.c+7−2

This diff is large: its 16 lines aren’t shown here.

drivers/vfio/pci/vfio_pci_dmabuf.c+2−3

This diff is large: its 14 lines aren’t shown here.

drivers/virt/coco/tdx-guest/tdx-guest.c+10−2

This diff is large: its 37 lines aren’t shown here.

drivers/virtio/virtio_ring.c+5−5

This diff is large: its 24 lines aren’t shown here.

drivers/xen/privcmd.c+73−3

This diff is large: its 141 lines aren’t shown here.

fs/afs/addr_list.c+4−4

This diff is large: its 22 lines aren’t shown here.

fs/binfmt_elf_fdpic.c+6−0

This diff is large: its 13 lines aren’t shown here.

fs/btrfs/backref.c+28−0

This diff is large: its 56 lines aren’t shown here.

fs/btrfs/block-group.c+37−1

This diff is large: its 94 lines aren’t shown here.

fs/btrfs/compression.c+8−3

This diff is large: its 28 lines aren’t shown here.

fs/btrfs/disk-io.c+25−6

This diff is large: its 80 lines aren’t shown here.

fs/btrfs/extent-tree.c+94−6

This diff is large: its 213 lines aren’t shown here.

fs/btrfs/extent_io.c+1−0

This diff is large: its 8 lines aren’t shown here.

fs/btrfs/file-item.c+7−0

This diff is large: its 14 lines aren’t shown here.

fs/btrfs/free-space-tree.c+8−1

This diff is large: its 23 lines aren’t shown here.

fs/btrfs/inode.c+39−5

This diff is large: its 81 lines aren’t shown here.

fs/btrfs/ioctl.c+37−7

This diff is large: its 99 lines aren’t shown here.

fs/btrfs/lzo.c+2−2

This diff is large: its 18 lines aren’t shown here.

fs/btrfs/messages.h+0−3

This diff is large: its 10 lines aren’t shown here.

fs/btrfs/print-tree.c+10−0

This diff is large: its 38 lines aren’t shown here.

fs/btrfs/qgroup.c+8−0

This diff is large: its 15 lines aren’t shown here.

fs/btrfs/raid56.c+10−2

This diff is large: its 26 lines aren’t shown here.

fs/btrfs/relocation.c+34−7

This diff is large: its 112 lines aren’t shown here.

fs/btrfs/space-info.c+4−1

This diff is large: its 13 lines aren’t shown here.

fs/btrfs/transaction.c+16−0

This diff is large: its 23 lines aren’t shown here.

fs/btrfs/tree-checker.c+18−1

This diff is large: its 29 lines aren’t shown here.

fs/btrfs/tree-log.c+92−33

This diff is large: its 216 lines aren’t shown here.

fs/btrfs/uuid-tree.c+38−0

This diff is large: its 45 lines aren’t shown here.

fs/btrfs/uuid-tree.h+2−0

This diff is large: its 9 lines aren’t shown here.

fs/btrfs/volumes.c+21−11

This diff is large: its 59 lines aren’t shown here.

fs/btrfs/zlib.c+3−1

This diff is large: its 11 lines aren’t shown here.

fs/btrfs/zoned.c+11−2

This diff is large: its 34 lines aren’t shown here.

fs/btrfs/zstd.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/ceph/addr.c+0−1

This diff is large: its 8 lines aren’t shown here.

fs/ceph/debugfs.c+2−2

This diff is large: its 18 lines aren’t shown here.

fs/ceph/dir.c+15−2

This diff is large: its 38 lines aren’t shown here.

fs/ceph/file.c+2−2

This diff is large: its 18 lines aren’t shown here.

fs/ceph/inode.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/ceph/mds_client.c+3−0

This diff is large: its 24 lines aren’t shown here.

fs/erofs/Kconfig+30−15

This diff is large: its 61 lines aren’t shown here.

fs/erofs/fileio.c+2−4

This diff is large: its 13 lines aren’t shown here.

fs/erofs/ishare.c+13−2

This diff is large: its 22 lines aren’t shown here.

fs/erofs/zdata.c+3−0

This diff is large: its 18 lines aren’t shown here.

fs/ext4/Makefile+3−2

This diff is large: its 11 lines aren’t shown here.

fs/ext4/crypto.c+8−1

This diff is large: its 19 lines aren’t shown here.

fs/ext4/ext4.h+6−0

This diff is large: its 20 lines aren’t shown here.

fs/ext4/ext4_extents.h+12−0

This diff is large: its 18 lines aren’t shown here.

fs/ext4/extents-test.c+7−5

This diff is large: its 34 lines aren’t shown here.

fs/ext4/extents.c+68−12

This diff is large: its 146 lines aren’t shown here.

fs/ext4/fast_commit.c+10−7

This diff is large: its 58 lines aren’t shown here.

fs/ext4/fsync.c+14−2

This diff is large: its 26 lines aren’t shown here.

fs/ext4/ialloc.c+6−0

This diff is large: its 13 lines aren’t shown here.

fs/ext4/inline.c+9−1

This diff is large: its 17 lines aren’t shown here.

fs/ext4/inode.c+60−15

This diff is large: its 120 lines aren’t shown here.

fs/ext4/mballoc-test.c+41−40

This diff is large: its 303 lines aren’t shown here.

fs/ext4/mballoc.c+114−18

This diff is large: its 184 lines aren’t shown here.

fs/ext4/mballoc.h+30−0

This diff is large: its 35 lines aren’t shown here.

fs/ext4/page-io.c+8−2

This diff is large: its 18 lines aren’t shown here.

fs/ext4/super.c+31−6

This diff is large: its 80 lines aren’t shown here.

fs/ext4/sysfs.c+9−1

This diff is large: its 34 lines aren’t shown here.

fs/fs-writeback.c+27−9

This diff is large: its 65 lines aren’t shown here.

fs/fuse/file.c+1−3

This diff is large: its 12 lines aren’t shown here.

fs/fuse/inode.c+1−0

This diff is large: its 8 lines aren’t shown here.

fs/iomap/bio.c+50−1

This diff is large: its 65 lines aren’t shown here.

fs/iomap/buffered-io.c+10−5

This diff is large: its 37 lines aren’t shown here.

fs/jbd2/checkpoint.c+13−2

This diff is large: its 29 lines aren’t shown here.

fs/mpage.c+24−6

This diff is large: its 54 lines aren’t shown here.

fs/namei.c+8−2

This diff is large: its 17 lines aren’t shown here.

fs/netfs/buffered_read.c+1−2

This diff is large: its 11 lines aren’t shown here.

fs/netfs/direct_read.c+1−2

This diff is large: its 11 lines aren’t shown here.

fs/netfs/direct_write.c+11−4

This diff is large: its 30 lines aren’t shown here.

fs/netfs/iterator.c+43−0

This diff is large: its 57 lines aren’t shown here.

fs/netfs/read_collect.c+2−2

This diff is large: its 18 lines aren’t shown here.

fs/netfs/read_retry.c+4−1

This diff is large: its 20 lines aren’t shown here.

fs/netfs/read_single.c+0−1

This diff is large: its 8 lines aren’t shown here.

fs/netfs/write_collect.c+2−2

This diff is large: its 18 lines aren’t shown here.

fs/netfs/write_issue.c+1−2

This diff is large: its 11 lines aren’t shown here.

fs/nfs/Kconfig+2−1

This diff is large: its 17 lines aren’t shown here.

fs/nfs/nfs3proc.c+6−1

This diff is large: its 15 lines aren’t shown here.

fs/nfsd/export.c+54−9

This diff is large: its 110 lines aren’t shown here.

fs/nfsd/export.h+5−2

This diff is large: its 35 lines aren’t shown here.

fs/nfsd/nfs4xdr.c+7−2

This diff is large: its 17 lines aren’t shown here.

fs/nfsd/nfsctl.c+19−3

This diff is large: its 69 lines aren’t shown here.

fs/nfsd/state.h+12−5

This diff is large: its 24 lines aren’t shown here.

fs/overlayfs/copy_up.c+3−3

This diff is large: its 19 lines aren’t shown here.

fs/overlayfs/overlayfs.h+21−0

This diff is large: its 35 lines aren’t shown here.

fs/overlayfs/ovl_entry.h+1−6

This diff is large: its 21 lines aren’t shown here.

fs/overlayfs/params.c+28−5

This diff is large: its 84 lines aren’t shown here.

fs/overlayfs/super.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/overlayfs/util.c+4−1

This diff is large: its 12 lines aren’t shown here.

fs/proc/meminfo.c+6−0

This diff is large: its 13 lines aren’t shown here.

fs/smb/client/Makefile+4−3

This diff is large: its 18 lines aren’t shown here.

fs/smb/client/cifsacl.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/smb/client/cifsfs.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/smb/client/cifsglob.h+23−6

This diff is large: its 48 lines aren’t shown here.

fs/smb/client/cifsproto.h+22−4

This diff is large: its 40 lines aren’t shown here.

fs/smb/client/connect.c+4−0

This diff is large: its 11 lines aren’t shown here.

fs/smb/client/dir.c+2−2

This diff is large: its 25 lines aren’t shown here.

fs/smb/client/file.c+70−62

This diff is large: its 237 lines aren’t shown here.

fs/smb/client/fs_context.c+5−1

This diff is large: its 20 lines aren’t shown here.

fs/smb/client/inode.c+9−18

This diff is large: its 69 lines aren’t shown here.

fs/smb/client/smb1ops.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/smb/client/smb1transport.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/smb/client/smb2inode.c+10−12

This diff is large: its 87 lines aren’t shown here.

fs/smb/client/smb2maperror.c+6−3

This diff is large: its 25 lines aren’t shown here.

fs/smb/client/smb2ops.c+18−20

This diff is large: its 101 lines aren’t shown here.

fs/smb/client/smb2pdu.c+4−1

This diff is large: its 12 lines aren’t shown here.

fs/smb/server/auth.c+2−20

This diff is large: its 39 lines aren’t shown here.

fs/smb/server/mgmt/tree_connect.c+6−3

This diff is large: its 26 lines aren’t shown here.

fs/smb/server/oplock.c+65−32

This diff is large: its 176 lines aren’t shown here.

fs/smb/server/oplock.h+3−2

This diff is large: its 12 lines aren’t shown here.

fs/smb/server/smb2pdu.c+157−62

This diff is large: its 481 lines aren’t shown here.

fs/smb/server/smbacl.c+43−0

This diff is large: its 50 lines aren’t shown here.

fs/smb/server/smbacl.h+2−0

This diff is large: its 9 lines aren’t shown here.

fs/smb/server/vfs_cache.c+5−5

This diff is large: its 26 lines aren’t shown here.

fs/tests/exec_kunit.c+0−3

This diff is large: its 10 lines aren’t shown here.

fs/udf/inode.c+15−18

This diff is large: its 51 lines aren’t shown here.

fs/xfs/libxfs/xfs_attr.h+2−1

This diff is large: its 10 lines aren’t shown here.

fs/xfs/libxfs/xfs_attr_leaf.c+22−0

This diff is large: its 29 lines aren’t shown here.

fs/xfs/libxfs/xfs_attr_leaf.h+3−0

This diff is large: its 10 lines aren’t shown here.

fs/xfs/libxfs/xfs_da_btree.c+44−17

This diff is large: its 104 lines aren’t shown here.

fs/xfs/libxfs/xfs_da_btree.h+2−0

This diff is large: its 9 lines aren’t shown here.

fs/xfs/libxfs/xfs_defer.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/xfs/scrub/quota.c+3−1

This diff is large: its 12 lines aren’t shown here.

fs/xfs/scrub/trace.h+2−10

This diff is large: its 23 lines aren’t shown here.

fs/xfs/xfs_attr_inactive.c+57−38

This diff is large: its 181 lines aren’t shown here.

fs/xfs/xfs_attr_item.c+2−49

This diff is large: its 72 lines aren’t shown here.

fs/xfs/xfs_bmap_item.c+1−1

This diff is large: its 9 lines aren’t shown here.

fs/xfs/xfs_dquot.c+7−1

This diff is large: its 17 lines aren’t shown here.

fs/xfs/xfs_dquot_item.c+7−2

This diff is large: its 32 lines aren’t shown here.

fs/xfs/xfs_handle.c+1−1

This diff is large: its 10 lines aren’t shown here.

fs/xfs/xfs_healthmon.c+10−7

This diff is large: its 31 lines aren’t shown here.

fs/xfs/xfs_icache.c+0−1

This diff is large: its 8 lines aren’t shown here.

fs/xfs/xfs_inode.c+2−1

This diff is large: its 10 lines aren’t shown here.

fs/xfs/xfs_inode_item.c+7−2

This diff is large: its 30 lines aren’t shown here.

fs/xfs/xfs_log.c+2−0

This diff is large: its 9 lines aren’t shown here.

fs/xfs/xfs_mount.c+4−3

This diff is large: its 23 lines aren’t shown here.

fs/xfs/xfs_trace.h+34−13

This diff is large: its 82 lines aren’t shown here.

fs/xfs/xfs_trans_ail.c+75−52

This diff is large: its 152 lines aren’t shown here.

fs/xfs/xfs_verify_media.c+8−10

This diff is large: its 61 lines aren’t shown here.

fs/xfs/xfs_xattr.c+1−1

This diff is large: its 10 lines aren’t shown here.

fs/xfs/xfs_zone_gc.c+0−2

This diff is large: its 16 lines aren’t shown here.

include/crypto/if_alg.h+2−3

This diff is large: its 12 lines aren’t shown here.

include/drm/bridge/dw_hdmi_qp.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/drm/display/drm_hdmi_helper.h+2−1

This diff is large: its 17 lines aren’t shown here.

include/drm/drm_atomic.h+0−1

This diff is large: its 8 lines aren’t shown here.

include/drm/drm_blend.h+3−1

This diff is large: its 17 lines aren’t shown here.

include/drm/drm_bridge.h+4−2

This diff is large: its 20 lines aren’t shown here.

include/drm/drm_connector.h+35−13

This diff is large: its 90 lines aren’t shown here.

include/drm/drm_crtc.h+12−0

This diff is large: its 19 lines aren’t shown here.

include/drm/drm_mipi_dbi.h+89−56

This diff is large: its 178 lines aren’t shown here.

include/drm/drm_mipi_dsi.h+4−0

This diff is large: its 18 lines aren’t shown here.

include/drm/drm_mode_config.h+5−0

This diff is large: its 12 lines aren’t shown here.

include/drm/drm_simple_kms_helper.h+5−211

This diff is large: its 269 lines aren’t shown here.

include/drm/intel/step.h+62−0

This diff is large: its 63 lines aren’t shown here.

include/drm/ttm/ttm_backup.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/drm/ttm/ttm_bo.h+19−9

This diff is large: its 44 lines aren’t shown here.

include/drm/ttm/ttm_pool.h+3−4

This diff is large: its 28 lines aren’t shown here.

include/hyperv/hvgdk_mini.h+2−1

This diff is large: its 17 lines aren’t shown here.

include/linux/auxvec.h+1−1

This diff is large: its 8 lines aren’t shown here.

include/linux/bpf.h+4−0

This diff is large: its 11 lines aren’t shown here.

include/linux/build_bug.h+3−1

This diff is large: its 18 lines aren’t shown here.

include/linux/cgroup-defs.h+3−0

This diff is large: its 10 lines aren’t shown here.

include/linux/console_struct.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/damon.h+6−0

This diff is large: its 13 lines aren’t shown here.

include/linux/device.h+54−0

This diff is large: its 75 lines aren’t shown here.

include/linux/device/bus.h+4−0

This diff is large: its 18 lines aren’t shown here.

include/linux/dma-mapping.h+13−6

This diff is large: its 34 lines aren’t shown here.

include/linux/etherdevice.h+2−1

This diff is large: its 10 lines aren’t shown here.

include/linux/firmware/intel/stratix10-svc-client.h+4−4

This diff is large: its 17 lines aren’t shown here.

include/linux/fs/super_types.h+1−0

This diff is large: its 7 lines aren’t shown here.

include/linux/gpio/gpio-nomadik.h+5−7

This diff is large: its 47 lines aren’t shown here.

include/linux/hid.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/if_ether.h+2−1

This diff is large: its 10 lines aren’t shown here.

include/linux/iio/iio.h+12−0

This diff is large: its 19 lines aren’t shown here.

include/linux/io-pgtable.h+8−2

This diff is large: its 38 lines aren’t shown here.

include/linux/io_uring_types.h+4−0

This diff is large: its 25 lines aren’t shown here.

include/linux/iommu.h+2−1

This diff is large: its 10 lines aren’t shown here.

include/linux/ipv6.h+6−1

This diff is large: its 14 lines aren’t shown here.

include/linux/kvm_host.h+35−48

This diff is large: its 110 lines aren’t shown here.

include/linux/leafops.h+21−11

This diff is large: its 53 lines aren’t shown here.

include/linux/lis3lv02d.h+2−2

This diff is large: its 11 lines aren’t shown here.

include/linux/local_lock_internal.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/math.h+1−17

This diff is large: its 25 lines aren’t shown here.

include/linux/mempolicy.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/mm.h+6−11

This diff is large: its 33 lines aren’t shown here.

include/linux/mmu_notifier.h+16−15

This diff is large: its 71 lines aren’t shown here.

include/linux/mmzone.h+2−0

This diff is large: its 9 lines aren’t shown here.

include/linux/mpage.h+9−2

This diff is large: its 17 lines aren’t shown here.

include/linux/netdevice.h+37−4

This diff is large: its 87 lines aren’t shown here.

include/linux/netfilter/ipset/ip_set.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/netfs.h+0−1

This diff is large: its 8 lines aren’t shown here.

include/linux/nvme-auth.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/linux/pagemap.h+0−11

This diff is large: its 25 lines aren’t shown here.

include/linux/platform_device.h+0−5

This diff is large: its 12 lines aren’t shown here.

include/linux/rseq_types.h+5−1

This diff is large: its 37 lines aren’t shown here.

include/linux/sched.h+0−2

This diff is large: its 16 lines aren’t shown here.

include/linux/security.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/serial_8250.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/skbuff.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/spi/spi.h+0−5

This diff is large: its 19 lines aren’t shown here.

include/linux/srcutiny.h+4−0

This diff is large: its 30 lines aren’t shown here.

include/linux/srcutree.h+5−4

This diff is large: its 44 lines aren’t shown here.

include/linux/timb_gpio.h+3−3

This diff is large: its 14 lines aren’t shown here.

include/linux/tracepoint.h+20−0

This diff is large: its 34 lines aren’t shown here.

include/linux/uaccess.h+2−2

This diff is large: its 18 lines aren’t shown here.

include/linux/usb.h+14−4

This diff is large: its 68 lines aren’t shown here.

include/linux/usb/quirks.h+3−0

This diff is large: its 8 lines aren’t shown here.

include/linux/usb/usbnet.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/linux/virtio_net.h+49−4

This diff is large: its 81 lines aren’t shown here.

include/net/bluetooth/l2cap.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/net/codel_impl.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/net/inet_hashtables.h+14−0

This diff is large: its 21 lines aren’t shown here.

include/net/ip6_fib.h+20−1

This diff is large: its 40 lines aren’t shown here.

include/net/ip6_tunnel.h+14−0

This diff is large: its 28 lines aren’t shown here.

include/net/ip_tunnels.h+30−7

This diff is large: its 51 lines aren’t shown here.

include/net/mac80211.h+3−1

This diff is large: its 11 lines aren’t shown here.

include/net/netfilter/nf_conntrack_core.h+5−0

This diff is large: its 12 lines aren’t shown here.

include/net/netfilter/nf_conntrack_expect.h+18−2

This diff is large: its 45 lines aren’t shown here.

include/net/netfilter/nf_tables.h+2−4

This diff is large: its 34 lines aren’t shown here.

include/net/netns/mpls.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/net/netns/xfrm.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/net/page_pool/types.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/net/sch_generic.h+33−0

This diff is large: its 47 lines aren’t shown here.

include/net/udp_tunnel.h+1−1

This diff is large: its 9 lines aren’t shown here.

include/sound/sdca_function.h+0−5

This diff is large: its 12 lines aren’t shown here.

include/trace/events/btrfs.h+7−4

This diff is large: its 20 lines aren’t shown here.

include/trace/events/dma.h+3−1

This diff is large: its 11 lines aren’t shown here.

include/trace/events/netfs.h+4−4

This diff is large: its 24 lines aren’t shown here.

include/trace/events/task.h+5−2

This diff is large: its 25 lines aren’t shown here.

include/uapi/drm/amdxdna_accel.h+40−4

This diff is large: its 67 lines aren’t shown here.

include/uapi/drm/drm_mode.h+80−0

This diff is large: its 94 lines aren’t shown here.

include/uapi/drm/msm_drm.h+1−0

This diff is large: its 8 lines aren’t shown here.

include/uapi/drm/panthor_drm.h+61−2

This diff is large: its 80 lines aren’t shown here.

include/uapi/linux/const.h+18−0

This diff is large: its 23 lines aren’t shown here.

include/uapi/linux/kvm.h+8−0

This diff is large: its 23 lines aren’t shown here.

include/uapi/linux/netfilter/nf_conntrack_common.h+4−0

This diff is large: its 10 lines aren’t shown here.

init/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

io_uring/bpf_filter.c+1−1

This diff is large: its 9 lines aren’t shown here.

io_uring/eventfd.c+7−3

This diff is large: its 19 lines aren’t shown here.

io_uring/fdinfo.c+3−1

This diff is large: its 16 lines aren’t shown here.

io_uring/io_uring.c+8−3

This diff is large: its 53 lines aren’t shown here.

io_uring/io_uring.h+29−5

This diff is large: its 73 lines aren’t shown here.

io_uring/kbuf.c+22−5

This diff is large: its 64 lines aren’t shown here.

io_uring/net.c+4−0

This diff is large: its 18 lines aren’t shown here.

io_uring/poll.c+7−2

This diff is large: its 31 lines aren’t shown here.

io_uring/register.c+22−3

This diff is large: its 63 lines aren’t shown here.

io_uring/rsrc.c+4−0

This diff is large: its 11 lines aren’t shown here.

io_uring/tw.c+20−2

This diff is large: its 43 lines aren’t shown here.

io_uring/wait.c+31−19

This diff is large: its 97 lines aren’t shown here.

io_uring/wait.h+5−2

This diff is large: its 18 lines aren’t shown here.

kernel/bpf/btf.c+20−4

This diff is large: its 59 lines aren’t shown here.

kernel/bpf/core.c+35−8

This diff is large: its 85 lines aren’t shown here.

kernel/bpf/syscall.c+23−2

This diff is large: its 47 lines aren’t shown here.

kernel/bpf/verifier.c+57−13

This diff is large: its 142 lines aren’t shown here.

kernel/cgroup/cgroup.c+91−3

This diff is large: its 136 lines aren’t shown here.

kernel/cgroup/cpuset.c+51−37

This diff is large: its 185 lines aren’t shown here.

kernel/crash_dump_dm_crypt.c+2−2

This diff is large: its 11 lines aren’t shown here.

kernel/dma/debug.c+5−4

This diff is large: its 37 lines aren’t shown here.

kernel/dma/direct.h+4−3

This diff is large: its 28 lines aren’t shown here.

kernel/dma/mapping.c+6−0

This diff is large: its 20 lines aren’t shown here.

kernel/dma/swiotlb.c+19−2

This diff is large: its 46 lines aren’t shown here.

kernel/events/core.c+8−11

This diff is large: its 58 lines aren’t shown here.

kernel/fork.c+1−2

This diff is large: its 24 lines aren’t shown here.

kernel/futex/core.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/futex/pi.c+2−1

This diff is large: its 17 lines aren’t shown here.

kernel/futex/syscalls.c+8−0

This diff is large: its 15 lines aren’t shown here.

kernel/kprobes.c+6−2

This diff is large: its 26 lines aren’t shown here.

kernel/power/em_netlink.c+2−0

This diff is large: its 9 lines aren’t shown here.

kernel/power/main.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/power/snapshot.c+11−0

This diff is large: its 18 lines aren’t shown here.

kernel/rcu/rcu.h+9−0

This diff is large: its 16 lines aren’t shown here.

kernel/rcu/srcutiny.c+18−1

This diff is large: its 54 lines aren’t shown here.

kernel/rcu/srcutree.c+102−109

This diff is large: its 586 lines aren’t shown here.

kernel/sched/core.c+28−51

This diff is large: its 146 lines aren’t shown here.

kernel/sched/debug.c+3−1

This diff is large: its 25 lines aren’t shown here.

kernel/sched/ext.c+116−50

This diff is large: its 327 lines aren’t shown here.

kernel/sched/ext_idle.c+20−13

This diff is large: its 54 lines aren’t shown here.

kernel/sched/ext_internal.h+98−16

This diff is large: its 125 lines aren’t shown here.

kernel/sched/fair.c+3−7

This diff is large: its 38 lines aren’t shown here.

kernel/sched/idle.c+30−9

This diff is large: its 94 lines aren’t shown here.

kernel/sched/sched.h+3−0

This diff is large: its 13 lines aren’t shown here.

kernel/sysctl.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/time/alarmtimer.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/time/time.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/trace/bpf_trace.c+4−0

This diff is large: its 11 lines aren’t shown here.

kernel/trace/ftrace.c+2−2

This diff is large: its 12 lines aren’t shown here.

kernel/trace/ring_buffer.c+1−1

This diff is large: its 9 lines aren’t shown here.

kernel/trace/trace.c+27−9

This diff is large: its 72 lines aren’t shown here.

kernel/trace/trace_events_trigger.c+66−13

This diff is large: its 104 lines aren’t shown here.

kernel/trace/trace_osnoise.c+5−5

This diff is large: its 52 lines aren’t shown here.

kernel/workqueue.c+50−30

This diff is large: its 201 lines aren’t shown here.

kernel/workqueue_internal.h+1−0

This diff is large: its 8 lines aren’t shown here.

lib/bootconfig.c+5−4

This diff is large: its 39 lines aren’t shown here.

lib/bug.c+2−5

This diff is large: its 21 lines aren’t shown here.

lib/crypto/Makefile+3−0

This diff is large: its 10 lines aren’t shown here.

lib/crypto/chacha-block-generic.c+4−0

This diff is large: its 17 lines aren’t shown here.

mm/cma.c+4−1

This diff is large: its 19 lines aren’t shown here.

mm/damon/core.c+14−1

This diff is large: its 58 lines aren’t shown here.

mm/damon/stat.c+50−3

This diff is large: its 72 lines aren’t shown here.

mm/damon/sysfs.c+9−1

This diff is large: its 35 lines aren’t shown here.

mm/hmm.c+2−2

This diff is large: its 18 lines aren’t shown here.

mm/huge_memory.c+11−5

This diff is large: its 39 lines aren’t shown here.

mm/hugetlb.c+2−2

This diff is large: its 18 lines aren’t shown here.

mm/list_lru.c+1−0

This diff is large: its 8 lines aren’t shown here.

mm/memcontrol.c+1−1

This diff is large: its 9 lines aren’t shown here.

mm/memfd_luo.c+43−6

This diff is large: its 63 lines aren’t shown here.

mm/memory.c+15−3

This diff is large: its 37 lines aren’t shown here.

mm/mempolicy.c+8−2

This diff is large: its 24 lines aren’t shown here.

mm/mseal.c+1−2

This diff is large: its 24 lines aren’t shown here.

mm/pagewalk.c+22−3

This diff is large: its 49 lines aren’t shown here.

mm/rmap.c+24−4

This diff is large: its 51 lines aren’t shown here.

mm/show_mem.c+5−1

This diff is large: its 20 lines aren’t shown here.

mm/slub.c+4−7

This diff is large: its 46 lines aren’t shown here.

mm/swap_state.c+4−5

This diff is large: its 23 lines aren’t shown here.

mm/vmstat.c+2−0

This diff is large: its 9 lines aren’t shown here.

mm/zswap.c+7−1

This diff is large: its 17 lines aren’t shown here.

net/atm/lec.c+47−25

This diff is large: its 154 lines aren’t shown here.

net/atm/lec.h+1−1

This diff is large: its 9 lines aren’t shown here.

net/batman-adv/bat_iv_ogm.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/bluetooth/hci_conn.c+10−4

This diff is large: its 51 lines aren’t shown here.

net/bluetooth/hci_core.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/bluetooth/hci_event.c+55−72

This diff is large: its 256 lines aren’t shown here.

net/bluetooth/hci_sync.c+73−37

This diff is large: its 288 lines aren’t shown here.

net/bluetooth/hidp/core.c+14−2

This diff is large: its 37 lines aren’t shown here.

net/bluetooth/l2cap_core.c+84−38

This diff is large: its 288 lines aren’t shown here.

net/bluetooth/l2cap_sock.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/bluetooth/mgmt.c+17−9

This diff is large: its 71 lines aren’t shown here.

net/bluetooth/sco.c+28−8

This diff is large: its 80 lines aren’t shown here.

net/bluetooth/smp.c+7−6

This diff is large: its 41 lines aren’t shown here.

net/bridge/br_arp_nd_proxy.c+11−7

This diff is large: its 60 lines aren’t shown here.

net/bridge/br_cfm.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/bridge/br_mrp_netlink.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/can/af_can.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/can/af_can.h+1−1

This diff is large: its 9 lines aren’t shown here.

net/can/gw.c+3−3

This diff is large: its 22 lines aren’t shown here.

net/can/isotp.c+18−6

This diff is large: its 45 lines aren’t shown here.

net/can/proc.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/ceph/auth.c+4−2

This diff is large: its 25 lines aren’t shown here.

net/ceph/messenger_v2.c+21−10

This diff is large: its 89 lines aren’t shown here.

net/ceph/mon_client.c+3−3

This diff is large: its 20 lines aren’t shown here.

net/core/dev.c+25−8

This diff is large: its 55 lines aren’t shown here.

net/core/dev.h+0−35

This diff is large: its 42 lines aren’t shown here.

net/core/filter.c+7−0

This diff is large: its 21 lines aren’t shown here.

net/core/neighbour.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/core/page_pool_user.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/core/rtnetlink.c+25−3

This diff is large: its 58 lines aren’t shown here.

net/core/skmsg.c+8−5

This diff is large: its 26 lines aren’t shown here.

net/ethernet/eth.c+3−6

This diff is large: its 18 lines aren’t shown here.

net/hsr/hsr_device.c+17−15

This diff is large: its 60 lines aren’t shown here.

net/hsr/hsr_framereg.c+36−2

This diff is large: its 59 lines aren’t shown here.

net/ipv4/af_inet.c+6−0

This diff is large: its 13 lines aren’t shown here.

net/ipv4/esp4.c+6−3

This diff is large: its 17 lines aren’t shown here.

net/ipv4/icmp.c+3−1

This diff is large: its 14 lines aren’t shown here.

net/ipv4/inet_connection_sock.c+3−17

This diff is large: its 48 lines aren’t shown here.

net/ipv4/ip_gre.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/ipv4/ip_tunnel_core.c+15−0

This diff is large: its 29 lines aren’t shown here.

net/ipv4/nexthop.c+11−3

This diff is large: its 46 lines aren’t shown here.

net/ipv4/udp.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/addrconf.c+5−5

This diff is large: its 34 lines aren’t shown here.

net/ipv6/af_inet6.c+0−8

This diff is large: its 22 lines aren’t shown here.

net/ipv6/datagram.c+10−0

This diff is large: its 40 lines aren’t shown here.

net/ipv6/esp6.c+6−3

This diff is large: its 17 lines aren’t shown here.

net/ipv6/exthdrs.c+4−0

This diff is large: its 11 lines aren’t shown here.

net/ipv6/icmp.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/ipv6/ioam6.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/ipv6/ip6_fib.c+24−5

This diff is large: its 68 lines aren’t shown here.

net/ipv6/ip6_flowlabel.c+0−5

This diff is large: its 12 lines aren’t shown here.

net/ipv6/ip6_tunnel.c+5−0

This diff is large: its 17 lines aren’t shown here.

net/ipv6/ndisc.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/ipv6/netfilter/ip6t_rt.c+4−0

This diff is large: its 11 lines aren’t shown here.

net/ipv6/route.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/ipv6/seg6_hmac.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/key/af_key.c+12−7

This diff is large: its 33 lines aren’t shown here.

net/mac80211/cfg.c+6−6

This diff is large: its 26 lines aren’t shown here.

net/mac80211/chan.c+4−2

This diff is large: its 19 lines aren’t shown here.

net/mac80211/debugfs.c+5−9

This diff is large: its 29 lines aren’t shown here.

net/mac80211/mesh.c+3−0

This diff is large: its 10 lines aren’t shown here.

net/mac80211/sta_info.c+5−2

This diff is large: its 21 lines aren’t shown here.

net/mac80211/tdls.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/mac80211/tx.c+3−1

This diff is large: its 12 lines aren’t shown here.

net/mac802154/iface.c+3−1

This diff is large: its 11 lines aren’t shown here.

net/mctp/route.c+7−4

This diff is large: its 27 lines aren’t shown here.

net/mpls/af_mpls.c+26−4

This diff is large: its 73 lines aren’t shown here.

net/mptcp/pm_kernel.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/mptcp/protocol.c+8−3

This diff is large: its 49 lines aren’t shown here.

net/ncsi/ncsi-aen.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/ncsi/ncsi-rsp.c+12−4

This diff is large: its 42 lines aren’t shown here.

net/netfilter/ipset/ip_set_core.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/netfilter/ipset/ip_set_hash_gen.h+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/ipset/ip_set_list_set.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/netfilter/nf_bpf_link.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/nf_conntrack_broadcast.c+6−2

This diff is large: its 22 lines aren’t shown here.

net/netfilter/nf_conntrack_ecache.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/netfilter/nf_conntrack_expect.c+34−5

This diff is large: its 118 lines aren’t shown here.

net/netfilter/nf_conntrack_h323_asn1.c+4−0

This diff is large: its 18 lines aren’t shown here.

net/netfilter/nf_conntrack_h323_main.c+6−6

This diff is large: its 54 lines aren’t shown here.

net/netfilter/nf_conntrack_helper.c+7−6

This diff is large: its 31 lines aren’t shown here.

net/netfilter/nf_conntrack_netlink.c+79−80

This diff is large: its 364 lines aren’t shown here.

net/netfilter/nf_conntrack_proto_sctp.c+2−1

This diff is large: its 10 lines aren’t shown here.

net/netfilter/nf_conntrack_proto_tcp.c+3−7

This diff is large: its 24 lines aren’t shown here.

net/netfilter/nf_conntrack_sip.c+17−7

This diff is large: its 86 lines aren’t shown here.

net/netfilter/nf_flow_table_ip.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/netfilter/nf_flow_table_offload.c+130−66

This diff is large: its 461 lines aren’t shown here.

net/netfilter/nf_tables_api.c+13−24

This diff is large: its 128 lines aren’t shown here.

net/netfilter/nfnetlink_cthelper.c+4−4

This diff is large: its 15 lines aren’t shown here.

net/netfilter/nfnetlink_log.c+3−7

This diff is large: its 27 lines aren’t shown here.

net/netfilter/nfnetlink_osf.c+13−0

This diff is large: its 28 lines aren’t shown here.

net/netfilter/nfnetlink_queue.c+3−1

This diff is large: its 12 lines aren’t shown here.

net/netfilter/nft_chain_filter.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/netfilter/nft_ct.c+4−0

This diff is large: its 32 lines aren’t shown here.

net/netfilter/nft_dynset.c+9−1

This diff is large: its 28 lines aren’t shown here.

net/netfilter/nft_set_pipapo.c+2−1

This diff is large: its 17 lines aren’t shown here.

net/netfilter/nft_set_pipapo_avx2.c+10−10

This diff is large: its 90 lines aren’t shown here.

net/netfilter/nft_set_rbtree.c+85−78

This diff is large: its 286 lines aren’t shown here.

net/netfilter/x_tables.c+23−0

This diff is large: its 37 lines aren’t shown here.

net/netfilter/xt_CT.c+4−0

This diff is large: its 18 lines aren’t shown here.

net/netfilter/xt_IDLETIMER.c+6−0

This diff is large: its 13 lines aren’t shown here.

net/netfilter/xt_cgroup.c+6−0

This diff is large: its 20 lines aren’t shown here.

net/netfilter/xt_dccp.c+2−2

This diff is large: its 13 lines aren’t shown here.

net/netfilter/xt_rateest.c+5−0

This diff is large: its 12 lines aren’t shown here.

net/netfilter/xt_tcpudp.c+4−2

This diff is large: its 13 lines aren’t shown here.

net/netfilter/xt_time.c+2−2

This diff is large: its 16 lines aren’t shown here.

net/nfc/nci/core.c+6−4

This diff is large: its 36 lines aren’t shown here.

net/openvswitch/flow_netlink.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/openvswitch/vport-netdev.c+8−3

This diff is large: its 36 lines aren’t shown here.

net/packet/af_packet.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/phonet/af_phonet.c+4−1

This diff is large: its 14 lines aren’t shown here.

net/qrtr/af_qrtr.c+13−18

This diff is large: its 107 lines aren’t shown here.

net/rds/ib_rdma.c+6−1

This diff is large: its 15 lines aren’t shown here.

net/rose/af_rose.c+5−0

This diff is large: its 12 lines aren’t shown here.

net/rxrpc/af_rxrpc.c+5−3

This diff is large: its 26 lines aren’t shown here.

net/sched/cls_api.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/sched/cls_flow.c+9−1

This diff is large: its 18 lines aren’t shown here.

net/sched/cls_fw.c+12−2

This diff is large: its 21 lines aren’t shown here.

net/sched/sch_generic.c+0−27

This diff is large: its 34 lines aren’t shown here.

net/sched/sch_hfsc.c+2−2

This diff is large: its 18 lines aren’t shown here.

net/sched/sch_ingress.c+8−6

This diff is large: its 50 lines aren’t shown here.

net/sched/sch_netem.c+3−2

This diff is large: its 12 lines aren’t shown here.

net/sched/sch_teql.c+3−5

This diff is large: its 26 lines aren’t shown here.

net/shaper/shaper.c+95−74

This diff is large: its 333 lines aren’t shown here.

net/shaper/shaper_nl_gen.c+6−6

This diff is large: its 34 lines aren’t shown here.

net/shaper/shaper_nl_gen.h+5−0

This diff is large: its 18 lines aren’t shown here.

net/smc/af_smc.c+17−6

This diff is large: its 73 lines aren’t shown here.

net/smc/smc.h+5−0

This diff is large: its 12 lines aren’t shown here.

net/smc/smc_close.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/smc/smc_rx.c+8−1

This diff is large: its 18 lines aren’t shown here.

net/sunrpc/cache.c+21−5

This diff is large: its 46 lines aren’t shown here.

net/sunrpc/xprtrdma/verbs.c+4−3

This diff is large: its 30 lines aren’t shown here.

net/tipc/socket.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/tls/tls_sw.c+1−1

This diff is large: its 16 lines aren’t shown here.

net/unix/af_unix.c+2−0

This diff is large: its 9 lines aren’t shown here.

net/unix/af_unix.h+1−0

This diff is large: its 8 lines aren’t shown here.

net/unix/garbage.c+51−28

This diff is large: its 133 lines aren’t shown here.

net/vmw_vsock/af_vsock.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/wireless/pmsr.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/x25/x25_in.c+6−3

This diff is large: its 24 lines aren’t shown here.

net/x25/x25_subr.c+1−0

This diff is large: its 8 lines aren’t shown here.

net/xfrm/xfrm_input.c+4−1

This diff is large: its 12 lines aren’t shown here.

net/xfrm/xfrm_iptfs.c+14−3

This diff is large: its 45 lines aren’t shown here.

net/xfrm/xfrm_nat_keepalive.c+1−1

This diff is large: its 9 lines aren’t shown here.

net/xfrm/xfrm_policy.c+7−5

This diff is large: its 47 lines aren’t shown here.

net/xfrm/xfrm_state.c+64−52

This diff is large: its 322 lines aren’t shown here.

net/xfrm/xfrm_user.c+22−10

This diff is large: its 117 lines aren’t shown here.

rust/Makefile+5−6

This diff is large: its 33 lines aren’t shown here.

rust/bindings/bindings_helper.h+14−0

This diff is large: its 46 lines aren’t shown here.

rust/helpers/device.c+5−0

This diff is large: its 9 lines aren’t shown here.

rust/helpers/dma-resv.c+14−0

This diff is large: its 15 lines aren’t shown here.

rust/helpers/drm.c+55−1

This diff is large: its 67 lines aren’t shown here.

rust/helpers/gpu.c+17−0

This diff is large: its 18 lines aren’t shown here.

rust/helpers/helpers.c+3−0

This diff is large: its 17 lines aren’t shown here.

rust/helpers/list.c+17−0

This diff is large: its 18 lines aren’t shown here.

rust/kernel/cpufreq.rs+1−0

This diff is large: its 8 lines aren’t shown here.

rust/kernel/device.rs+13−2

This diff is large: its 36 lines aren’t shown here.

rust/kernel/dma.rs+718−263

This diff is large: its 1163 lines aren’t shown here.

rust/kernel/drm/device.rs+82−5

This diff is large: its 102 lines aren’t shown here.

rust/kernel/drm/driver.rs+6−4

This diff is large: its 19 lines aren’t shown here.

rust/kernel/drm/file.rs+6−2

This diff is large: its 16 lines aren’t shown here.

rust/kernel/drm/gem/mod.rs+80−24

This diff is large: its 146 lines aren’t shown here.

rust/kernel/drm/gem/shmem.rs+228−0

This diff is large: its 229 lines aren’t shown here.

rust/kernel/error.rs+1−0

This diff is large: its 8 lines aren’t shown here.

rust/kernel/gpu.rs+6−0

This diff is large: its 7 lines aren’t shown here.

rust/kernel/gpu/buddy.rs+614−0

This diff is large: its 615 lines aren’t shown here.

rust/kernel/interop.rs+9−0

This diff is large: its 10 lines aren’t shown here.

rust/kernel/interop/list.rs+339−0

This diff is large: its 340 lines aren’t shown here.

rust/kernel/io.rs+490−290

This diff is large: its 948 lines aren’t shown here.

rust/kernel/io/mem.rs+6−4

This diff is large: its 40 lines aren’t shown here.

rust/kernel/io/register.rs+1260−0

This diff is large: its 1261 lines aren’t shown here.

rust/kernel/lib.rs+12−0

This diff is large: its 46 lines aren’t shown here.

rust/kernel/num/bounded.rs+68−2

This diff is large: its 95 lines aren’t shown here.

rust/kernel/pci/io.rs+30−69

This diff is large: its 125 lines aren’t shown here.

rust/kernel/ptr.rs+29−1

This diff is large: its 41 lines aren’t shown here.

rust/kernel/ptr/projection.rs+305−0

This diff is large: its 306 lines aren’t shown here.

rust/kernel/regulator.rs+18−15

This diff is large: its 102 lines aren’t shown here.

rust/kernel/str.rs+2−2

This diff is large: its 16 lines aren’t shown here.

rust/kernel/uaccess.rs+81−10

This diff is large: its 120 lines aren’t shown here.

rust/kernel/workqueue.rs+97−7

This diff is large: its 128 lines aren’t shown here.

rust/pin-init/internal/src/init.rs+23−46

This diff is large: its 154 lines aren’t shown here.

rust/pin-init/src/__internal.rs+24−4

This diff is large: its 51 lines aren’t shown here.

samples/landlock/sandboxer.c+3−2

This diff is large: its 19 lines aren’t shown here.

samples/rust/rust_dma.rs+25−18

This diff is large: its 78 lines aren’t shown here.

samples/rust/rust_driver_pci.rs+68−22

This diff is large: its 156 lines aren’t shown here.

samples/workqueue/stall_detector/Makefile+1−0

This diff is large: its 2 lines aren’t shown here.

samples/workqueue/stall_detector/wq_stall.c+98−0

This diff is large: its 99 lines aren’t shown here.

scripts/Makefile.build+4−1

This diff is large: its 21 lines aren’t shown here.

scripts/coccinelle/api/kmalloc_objs.cocci+11−0

This diff is large: its 15 lines aren’t shown here.

scripts/kconfig/merge_config.sh+10−14

This diff is large: its 85 lines aren’t shown here.

scripts/livepatch/klp-build+4−5

This diff is large: its 20 lines aren’t shown here.

security/apparmor/apparmorfs.c+134−91

This diff is large: its 548 lines aren’t shown here.

security/apparmor/include/label.h+8−8

This diff is large: its 72 lines aren’t shown here.

security/apparmor/include/lib.h+12−0

This diff is large: its 19 lines aren’t shown here.

security/apparmor/include/match.h+1−0

This diff is large: its 8 lines aren’t shown here.

security/apparmor/include/policy.h+5−5

This diff is large: its 45 lines aren’t shown here.

security/apparmor/include/policy_ns.h+2−0

This diff is large: its 9 lines aren’t shown here.

security/apparmor/include/policy_unpack.h+45−30

This diff is large: its 114 lines aren’t shown here.

security/apparmor/label.c+8−4

This diff is large: its 40 lines aren’t shown here.

security/apparmor/match.c+42−16

This diff is large: its 97 lines aren’t shown here.

security/apparmor/policy.c+67−10

This diff is large: its 162 lines aren’t shown here.

security/apparmor/policy_ns.c+2−0

This diff is large: its 9 lines aren’t shown here.

security/apparmor/policy_unpack.c+37−12

This diff is large: its 96 lines aren’t shown here.

security/landlock/domain.c+1−2

This diff is large: its 10 lines aren’t shown here.

security/landlock/ruleset.c+4−5

This diff is large: its 23 lines aren’t shown here.

security/landlock/tsync.c+73−19

This diff is large: its 194 lines aren’t shown here.

security/security.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/core/pcm_native.c+16−3

This diff is large: its 40 lines aren’t shown here.

sound/firewire/amdtp-stream.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/hda/codecs/realtek/alc269.c+89−8

This diff is large: its 266 lines aren’t shown here.

sound/hda/codecs/realtek/alc662.c+9−0

This diff is large: its 30 lines aren’t shown here.

sound/hda/controllers/intel.c+13−1

This diff is large: its 35 lines aren’t shown here.

sound/pci/asihpi/hpimsgx.c+4−2

This diff is large: its 13 lines aren’t shown here.

sound/pci/ctxfi/ctatc.c+7−3

This diff is large: its 18 lines aren’t shown here.

sound/pci/ctxfi/ctdaio.c+53−33

This diff is large: its 179 lines aren’t shown here.

sound/soc/amd/acp-config.c+14−1

This diff is large: its 30 lines aren’t shown here.

sound/soc/amd/acp/acp-mach-common.c+14−4

This diff is large: its 32 lines aren’t shown here.

sound/soc/amd/acp/acp-sdw-legacy-mach.c+8−0

This diff is large: its 15 lines aren’t shown here.

sound/soc/amd/acp/amd-acp70-acpi-match.c+61−0

This diff is large: its 82 lines aren’t shown here.

sound/soc/amd/acp3x-rt5682-max9836.c+7−2

This diff is large: its 16 lines aren’t shown here.

sound/soc/amd/ps/pci-ps.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/amd/yc/acp6x-mach.c+28−0

This diff is large: its 42 lines aren’t shown here.

sound/soc/cirrus/ep93xx-i2s.c+24−10

This diff is large: its 73 lines aren’t shown here.

sound/soc/codecs/adau1372.c+24−10

This diff is large: its 79 lines aren’t shown here.

sound/soc/codecs/rt1011.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/codecs/sma1307.c+4−2

This diff is large: its 13 lines aren’t shown here.

sound/soc/codecs/tas2781-fmwlib.c+3−0

This diff is large: its 10 lines aren’t shown here.

sound/soc/codecs/wcd934x.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/fsl/imx-card.c+2−0

This diff is large: its 9 lines aren’t shown here.

sound/soc/generic/simple-card-utils.c+10−6

This diff is large: its 32 lines aren’t shown here.

sound/soc/intel/boards/Kconfig+0−2

This diff is large: its 9 lines aren’t shown here.

sound/soc/intel/boards/ehl_rt5660.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/intel/catpt/device.c+9−1

This diff is large: its 17 lines aren’t shown here.

sound/soc/intel/catpt/dsp.c+0−3

This diff is large: its 10 lines aren’t shown here.

sound/soc/qcom/qdsp6/q6apm-dai.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/qcom/qdsp6/q6apm-lpass-dais.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/qcom/qdsp6/q6apm.c+1−0

This diff is large: its 8 lines aren’t shown here.

sound/soc/samsung/i2s.c+3−3

This diff is large: its 14 lines aren’t shown here.

sound/soc/sdca/sdca_functions.c+10−4

This diff is large: its 31 lines aren’t shown here.

sound/soc/soc-core.c+9−3

This diff is large: its 45 lines aren’t shown here.

sound/soc/sof/ipc4-topology.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/sof/topology.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/soc/tegra/tegra_audio_graph_card.c+11−0

This diff is large: its 25 lines aren’t shown here.

sound/usb/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

sound/usb/caiaq/device.c+1−1

This diff is large: its 9 lines aren’t shown here.

sound/usb/mixer_scarlett2.c+2−0

This diff is large: its 9 lines aren’t shown here.

sound/usb/qcom/qc_audio_offload.c+10−2

This diff is large: its 51 lines aren’t shown here.

sound/usb/quirks.c+10−0

This diff is large: its 38 lines aren’t shown here.

tools/arch/x86/include/asm/amd/ibs.h+1−1

This diff is large: its 9 lines aren’t shown here.

tools/arch/x86/include/asm/cpufeatures.h+3−1

This diff is large: its 25 lines aren’t shown here.

tools/arch/x86/include/asm/msr-index.h+10−1

This diff is large: its 32 lines aren’t shown here.

tools/arch/x86/include/uapi/asm/kvm.h+7−2

This diff is large: its 37 lines aren’t shown here.

tools/bootconfig/main.c+5−2

This diff is large: its 14 lines aren’t shown here.

tools/bootconfig/samples/bad-non-closed-brace.bconf+4−0

This diff is large: its 5 lines aren’t shown here.

tools/bootconfig/samples/bad-over-max-brace.bconf+19−0

This diff is large: its 20 lines aren’t shown here.

tools/bootconfig/samples/exp-good-nested-brace.bconf+1−0

This diff is large: its 2 lines aren’t shown here.

tools/bootconfig/samples/good-nested-brace.bconf+18−0

This diff is large: its 19 lines aren’t shown here.

tools/bootconfig/test-bootconfig.sh+9−0

This diff is large: its 16 lines aren’t shown here.

tools/build/Build.include+9−0

This diff is large: its 16 lines aren’t shown here.

tools/build/Makefile.build+4−2

This diff is large: its 16 lines aren’t shown here.

tools/include/linux/build_bug.h+3−1

This diff is large: its 18 lines aren’t shown here.

tools/include/linux/coresight-pmu.h+0−24

This diff is large: its 31 lines aren’t shown here.

tools/include/linux/gfp.h+4−0

This diff is large: its 11 lines aren’t shown here.

tools/include/linux/gfp_types.h+7−2

This diff is large: its 30 lines aren’t shown here.

tools/include/linux/overflow.h+19−0

This diff is large: its 26 lines aren’t shown here.

tools/include/linux/slab.h+9−0

This diff is large: its 14 lines aren’t shown here.

tools/include/uapi/asm-generic/unistd.h+4−1

This diff is large: its 13 lines aren’t shown here.

tools/include/uapi/linux/kvm.h+31−1

This diff is large: its 96 lines aren’t shown here.

tools/include/uapi/linux/perf_event.h+1−1

This diff is large: its 9 lines aren’t shown here.

tools/objtool/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

tools/objtool/arch/x86/decode.c+23−39

This diff is large: its 76 lines aren’t shown here.

tools/objtool/check.c+21−8

This diff is large: its 81 lines aren’t shown here.

tools/objtool/elf.c+4−21

This diff is large: its 58 lines aren’t shown here.

tools/objtool/include/objtool/warn.h+1−1

This diff is large: its 9 lines aren’t shown here.

tools/objtool/klp-diff.c+28−14

This diff is large: its 107 lines aren’t shown here.

tools/perf/Makefile.config+18−0

This diff is large: its 25 lines aren’t shown here.

tools/perf/Makefile.perf+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/arch/arm/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/arm/util/cs-etm.c+0−14

This diff is large: its 21 lines aren’t shown here.

tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/powerpc/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/s390/entry/syscalls/syscall.tbl+392−467

This diff is large: its 866 lines aren’t shown here.

tools/perf/arch/sh/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/sparc/entry/syscalls/syscall.tbl+2−1

This diff is large: its 14 lines aren’t shown here.

tools/perf/arch/x86/entry/syscalls/syscall_32.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/arch/x86/entry/syscalls/syscall_64.tbl+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/arch/xtensa/entry/syscalls/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/perf/builtin-ftrace.c+7−2

This diff is large: its 23 lines aren’t shown here.

tools/perf/check-headers.sh+0−1

This diff is large: its 8 lines aren’t shown here.

tools/perf/pmu-events/Build+2−1

This diff is large: its 10 lines aren’t shown here.

tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/fs.h+1−0

This diff is large: its 8 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/mount.h+11−2

This diff is large: its 32 lines aren’t shown here.

tools/perf/trace/beauty/include/uapi/linux/prctl.h+37−0

This diff is large: its 42 lines aren’t shown here.

tools/perf/util/annotate-arch/annotate-loongarch.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/util/annotate.c+4−1

This diff is large: its 20 lines aren’t shown here.

tools/perf/util/cs-etm-decoder/cs-etm-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/util/cs-etm.c+13−23

This diff is large: its 77 lines aren’t shown here.

tools/perf/util/cs-etm.h+15−0

This diff is large: its 22 lines aren’t shown here.

tools/perf/util/disasm.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/perf/util/kvm-stat-arch/kvm-stat-x86.c+3−3

This diff is large: its 13 lines aren’t shown here.

tools/perf/util/metricgroup.c+3−3

This diff is large: its 13 lines aren’t shown here.

tools/perf/util/parse-events.c+65−17

This diff is large: its 122 lines aren’t shown here.

tools/perf/util/synthetic-events.c+5−0

This diff is large: its 12 lines aren’t shown here.

tools/power/cpupower/cpupower-service.conf+5−0

This diff is large: its 9 lines aren’t shown here.

tools/power/cpupower/cpupower.sh+6−0

This diff is large: its 11 lines aren’t shown here.

tools/power/cpupower/utils/cpupower-set.c+5−1

This diff is large: its 13 lines aren’t shown here.

tools/power/cpupower/utils/helpers/helpers.h+4−1

This diff is large: its 26 lines aren’t shown here.

tools/power/cpupower/utils/helpers/misc.c+39−2

This diff is large: its 63 lines aren’t shown here.

tools/power/cpupower/utils/powercap-info.c+2−2

This diff is large: its 14 lines aren’t shown here.

tools/scripts/syscall.tbl+1−0

This diff is large: its 5 lines aren’t shown here.

tools/testing/selftests/bpf/Makefile+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/bpf/progs/exceptions_fail.c+53−3

This diff is large: its 85 lines aren’t shown here.

tools/testing/selftests/bpf/progs/verifier_bounds.c+94−0

This diff is large: its 99 lines aren’t shown here.

tools/testing/selftests/bpf/progs/verifier_bswap.c+22−0

This diff is large: its 29 lines aren’t shown here.

tools/testing/selftests/bpf/progs/verifier_linked_scalars.c+108−0

This diff is large: its 115 lines aren’t shown here.

tools/testing/selftests/bpf/progs/verifier_precision.c+341−0

This diff is large: its 353 lines aren’t shown here.

tools/testing/selftests/bpf/progs/verifier_sdiv.c+58−0

This diff is large: its 65 lines aren’t shown here.

tools/testing/selftests/cgroup/lib/cgroup_util.c+15−0

This diff is large: its 22 lines aren’t shown here.

tools/testing/selftests/cgroup/lib/include/cgroup_util.h+2−0

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/cgroup/test_core.c+2−1

This diff is large: its 10 lines aren’t shown here.

tools/testing/selftests/cgroup/test_kill.c+4−3

This diff is large: its 28 lines aren’t shown here.

tools/testing/selftests/drivers/net/team/Makefile+1−0

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/drivers/net/team/config+2−0

This diff is large: its 10 lines aren’t shown here.

tools/testing/selftests/drivers/net/team/non_ether_header_ops.sh+41−0

This diff is large: its 42 lines aren’t shown here.

tools/testing/selftests/hid/progs/hid_bpf_helpers.h+12−0

This diff is large: its 37 lines aren’t shown here.

tools/testing/selftests/kvm/Makefile.kvm+2−0

This diff is large: its 16 lines aren’t shown here.

tools/testing/selftests/kvm/guest_memfd_test.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/kvm/include/x86/processor.h+23−0

This diff is large: its 44 lines aren’t shown here.

tools/testing/selftests/kvm/include/x86/smm.h+17−0

This diff is large: its 18 lines aren’t shown here.

tools/testing/selftests/kvm/lib/x86/processor.c+26−0

This diff is large: its 37 lines aren’t shown here.

tools/testing/selftests/kvm/s390/irq_routing.c+75−0

This diff is large: its 76 lines aren’t shown here.

tools/testing/selftests/kvm/x86/evmcs_smm_controls_test.c+150−0

This diff is large: its 151 lines aren’t shown here.

tools/testing/selftests/kvm/x86/sev_smoke_test.c+30−0

This diff is large: its 58 lines aren’t shown here.

tools/testing/selftests/kvm/x86/smm_test.c+2−25

This diff is large: its 52 lines aren’t shown here.

tools/testing/selftests/landlock/tsync_test.c+90−1

This diff is large: its 105 lines aren’t shown here.

tools/testing/selftests/mount_setattr/mount_setattr_test.c+1−1

This diff is large: its 9 lines aren’t shown here.

tools/testing/selftests/net/fib_tests.sh+58−3

This diff is large: its 75 lines aren’t shown here.

tools/testing/selftests/net/netfilter/nft_concat_range.sh+69−1

This diff is large: its 91 lines aren’t shown here.

tools/testing/selftests/net/rtnetlink.sh+55−0

This diff is large: its 69 lines aren’t shown here.

tools/testing/selftests/powerpc/copyloops/.gitignore+2−2

This diff is large: its 11 lines aren’t shown here.

tools/testing/selftests/powerpc/copyloops/Makefile+8−3

This diff is large: its 26 lines aren’t shown here.

tools/testing/selftests/powerpc/copyloops/stubs.S+0−8

This diff is large: its 14 lines aren’t shown here.

tools/testing/selftests/powerpc/copyloops/validate.c+14−1

This diff is large: its 36 lines aren’t shown here.

tools/testing/selftests/riscv/vector/validate_v_ptrace.c+11−8

This diff is large: its 53 lines aren’t shown here.

tools/testing/selftests/sched_ext/Makefile+1−0

This diff is large: its 8 lines aren’t shown here.

tools/testing/selftests/sched_ext/cyclic_kick_wait.bpf.c+68−0

This diff is large: its 69 lines aren’t shown here.

tools/testing/selftests/sched_ext/cyclic_kick_wait.c+194−0

This diff is large: its 195 lines aren’t shown here.

tools/testing/selftests/sched_ext/util.c+2−2

This diff is large: its 14 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/infra/filter.json+44−0

This diff is large: its 50 lines aren’t shown here.

tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json+25−0

This diff is large: its 31 lines aren’t shown here.

tools/tracing/rtla/src/timerlat_bpf.h+0−1

This diff is large: its 8 lines aren’t shown here.

virt/kvm/binary_stats.c+1−1

This diff is large: its 9 lines aren’t shown here.

virt/kvm/kvm_main.c+10−10

This diff is large: its 76 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